Skip to content

Commit cfdca11

Browse files
nfrapradoSasha Levin
authored andcommitted
arm64: dts: mediatek: mt8186: Add missing xhci clock to usb controllers
[ Upstream commit 1af98c3 ] The mtu3 usb controllers don't list the xhci clock, though they require it, and thus rely on the bootloader leaving it on in order to work. When booting with the upstream arm64 defconfig, the usb controllers will defer probe until modules have loaded since they have an indirect dependency on CONFIG_MTK_CMDQ, which is configured as a module. However at the point where modules are loaded, unused clocks are also disabled, causing the usb controllers to probe without the xhci clock enabled and fail to probe: mtu3 11201000.usb: clks of sts1 are not stable! mtu3 11201000.usb: device enable failed -110 mtu3 11201000.usb: mtu3 hw init failed:-110 mtu3 11201000.usb: failed to initialize gadget mtu3: probe of 11201000.usb failed with error -110 (and same for the one at 11281000) Add the missing clock for the usb controllers so that they can successfully probe without relying on the bootloader state. Fixes: f6c3e61 ("arm64: dts: mediatek: mt8186: Add MTU3 nodes") Signed-off-by: Nícolas F. R. A. Prado <[email protected]> Link: https://lore.kernel.org/r/20240213-mt8186-ssusb-domain-clk-fix-v2-2-1f981d35f3fd@collabora.com Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8781c3f commit cfdca11

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

arch/arm64/boot/dts/mediatek/mt8186.dtsi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,8 +1536,9 @@
15361536
clocks = <&topckgen CLK_TOP_USB_TOP>,
15371537
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_REF>,
15381538
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_HCLK>,
1539-
<&infracfg_ao CLK_INFRA_AO_ICUSB>;
1540-
clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
1539+
<&infracfg_ao CLK_INFRA_AO_ICUSB>,
1540+
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_XHCI>;
1541+
clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
15411542
interrupts = <GIC_SPI 303 IRQ_TYPE_LEVEL_HIGH 0>;
15421543
phys = <&u2port0 PHY_TYPE_USB2>;
15431544
power-domains = <&spm MT8186_POWER_DOMAIN_SSUSB>;
@@ -1601,8 +1602,9 @@
16011602
clocks = <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_P1_SYS>,
16021603
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_P1_REF>,
16031604
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_P1_HCLK>,
1604-
<&clk26m>;
1605-
clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
1605+
<&clk26m>,
1606+
<&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_P1_XHCI>;
1607+
clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck";
16061608
interrupts = <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH 0>;
16071609
phys = <&u2port1 PHY_TYPE_USB2>, <&u3port1 PHY_TYPE_USB3>;
16081610
power-domains = <&spm MT8186_POWER_DOMAIN_SSUSB_P1>;

0 commit comments

Comments
 (0)