Re: [PATCH v14 1/1] arm64: dts: Add MediaTek MT8186 dts and evaluation board and Makefile

From: Nícolas F. R. A. Prado
Date: Thu Aug 11 2022 - 13:30:13 EST


On Thu, Aug 11, 2022 at 08:58:05PM +0800, Allen-KH Cheng wrote:
> Add basic chip support for MediaTek MT8186.
>
> Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@xxxxxxxxxxxx>
> ---
> arch/arm64/boot/dts/mediatek/Makefile | 1 +
> arch/arm64/boot/dts/mediatek/mt8186-evb.dts | 228 ++++++
> arch/arm64/boot/dts/mediatek/mt8186.dtsi | 858 ++++++++++++++++++++
> 3 files changed, 1087 insertions(+)
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186-evb.dts
> create mode 100644 arch/arm64/boot/dts/mediatek/mt8186.dtsi
[..]
> --- /dev/null
> +++ b/arch/arm64/boot/dts/mediatek/mt8186-evb.dts
[..]
> + xhci0: usb@11200000 {
> + compatible = "mediatek,mt8186-xhci",
> + "mediatek,mtk-xhci";
> + reg = <0 0x11200000 0 0x1000>,
> + <0 0x11203e00 0 0x0100>;
> + reg-names = "mac", "ippc";
> + interrupts = <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH 0>;
> + phys = <&u2port0 PHY_TYPE_USB2>;
> + clocks = <&topckgen CLK_TOP_USB_TOP>,
> + <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_REF>,
> + <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_HCLK>,
> + <&infracfg_ao CLK_INFRA_AO_ICUSB>,
> + <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_XHCI>;
> + clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
> + mediatek,syscon-wakeup = <&pericfg 0x420 2>;
> + wakeup-source;
> + status = "disabled";
> + };

You mention in the cover letter that the DSI node was removed from the patch
since it requires a power domain, and so will be added later when the MTK power
controller binding is sorted out. But the XHCI controller nodes also depend on
power domains:

MT8186_POWER_DOMAIN_SSUSB
MT8186_POWER_DOMAIN_SSUSB_P1

You're omitting the power domain for the xhci nodes here to avoid the dependency
on the power controller, which means you're relying on the bootloader to leave
them on for them to work.

I don't see any problem with adding the nodes without the reference to the
power domain for now, and just adding those later when the binding is sorted
out. The DT will be incomplete for a while, but that's usually the case anyway.

This is to say I think you should keep the DSI node in the patch without the
power-domain for now, like in the previous version. But let's see what others
think, in case omitting the power domain isn't acceptable, then you should
remove the XHCI nodes as well.

Matthias, any thoughts on this?

Thanks,
Nícolas