u-boot/drivers/phy/allwinner
Andre Przywara 999bc5e660 phy: sun4i-usb: Fix of_xlate() argument check
In its of_xlate() function, the Allwinner USB PHY driver compares the
args_count variable against the number of implemented USB PHYs, although
this is the *number of arguments* to the DT phandle property. Per the DT
binding for this PHY device, this number is always one, so this check
will always fail if the particular SoC implements exactly one USB PHY.
So far this affected only the V3s (which has USB support disabled), but
the F1C100s also sports one PHY only.

Fix that check to compare args_count against exactly 1, and the args[0]
content (requested PHY number) against the number of implemented PHYs.

This fixes USB operation on the Allwinner V3s and allows to enable USB
on the Allwinner F1C100s SoC.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2023-07-21 00:21:42 +01:00
..
Kconfig sunxi: Move INITIAL_USB_SCAN_DELAY to driver Kconfig 2022-07-18 23:48:09 +01:00
Makefile phy: sun50i-usb3: Add a driver for the H6 USB3 PHY 2021-09-22 21:29:56 +02:00
phy-sun4i-usb.c phy: sun4i-usb: Fix of_xlate() argument check 2023-07-21 00:21:42 +01:00
phy-sun50i-usb3.c drivers: use dev_read_addr_ptr when cast to pointer 2023-05-06 17:28:18 +08:00