Skip to content

Commit

Permalink
arm64: dts: allwinner: A64: properly connect USB PHY to port 0
Browse files Browse the repository at this point in the history
[ Upstream commit cc72570 ]

In recent Allwinner SoCs the first USB host controller (HCI0) shares
the first PHY with the MUSB controller. Probably to make this sharing
work, we were avoiding to declare this in the DT. This has two
shortcomings:
- U-Boot (which uses the same .dts) cannot use this port in host mode
  without a PHY linked, so we were loosing one USB port there.
- It requires the MUSB driver to be enabled and loaded, although we
  don't actually use it.

To avoid those issues, let's add this PHY link to the A64 .dtsi file.
After all PHY port 0 *is* connected to HCI0, so we should describe
it as this. Remove the part from the Pinebook DTS which already had
this property.

This makes it work in U-Boot, also improves compatiblity when no MUSB
driver is loaded (for instance in distribution installers).

Fixes: dc03a04 ("arm64: allwinner: a64: add EHCI0/OHCI0 nodes to A64 DTSI")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210113152630.28810-2-andre.przywara@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Andre-ARM authored and gregkh committed Mar 4, 2021
1 parent 0291e2c commit 71c4341
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
Expand Up @@ -126,8 +126,6 @@
};

&ehci0 {
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};

Expand Down Expand Up @@ -177,8 +175,6 @@
};

&ohci0 {
phys = <&usbphy 0>;
phy-names = "usb";
status = "okay";
};

Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
Expand Up @@ -593,6 +593,8 @@
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>,
<&ccu RST_BUS_EHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};

Expand All @@ -603,6 +605,8 @@
clocks = <&ccu CLK_BUS_OHCI0>,
<&ccu CLK_USB_OHCI0>;
resets = <&ccu RST_BUS_OHCI0>;
phys = <&usbphy 0>;
phy-names = "usb";
status = "disabled";
};

Expand Down

0 comments on commit 71c4341

Please sign in to comment.