ARM: dts: sunxi: H3/H5: Add phys property to USB HCI0
authorAndre Przywara <andre.przywara@arm.com>
Thu, 10 Nov 2022 00:55:07 +0000 (00:55 +0000)
committerJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 16 Nov 2022 18:53:56 +0000 (19:53 +0100)
commitb13d48408e9f0aa80f3d9f93960aa49bd0da7af8
tree4c71ba26748c8683c2f94cf3d4ced399efd5b979
parentdee020350091498fdeb919e35f37bf3f3dca1bdd
ARM: dts: sunxi: H3/H5: Add phys property to USB HCI0

As many other Allwinner SoCs from the last years, the first USB host
controller pair in the Allwinner H3 and H5 chips share a USB PHY with
the MUSB OTG controller. This is probably the reason why we didn't have
a "phys" property in those host controller nodes.
This works fine as long as the MUSB controller driver is loaded, as this
takes care of the proper PHY setup, including the muxing between MUSB
and the HCI.

However this requires the MUSB driver to be enabled and loaded, and also
upsets U-Boot, which cannot use a HCI port without a "phys" property.

Similar to what we did in commit cc72570747e4 ("arm64: dts: allwinner:
A64: properly connect USB PHY to port 0"), add the "phys" property to
the OHCI0 and EHCI0 DT nodes in the shared H3/H5 .dtsi file.

This is not only the proper description of the hardware, but also avoids
a nasty error message in U-Boot triggered by a recent patch. (The port
never worked in host mode, but the error was suppressed due to a bug.)

When using the MUSB port in OTG mode, this also fixes host mode
switching, so people can use OTG adapters to connect a USB device to
port 0.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20221110005507.19464-1-andre.przywara@arm.com
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
arch/arm/boot/dts/sunxi-h3-h5.dtsi