phy: sun4i-usb: Determine VBUS detection pin from devicetree
authorAndre Przywara <andre.przywara@arm.com>
Sun, 30 Mar 2025 16:13:23 +0000 (17:13 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 28 Apr 2025 18:45:44 +0000 (12:45 -0600)
commitaf24fbb24a35cd892c27fbbea3caed726211f018
treea6ffdb816e1f187c5d29bc26d11c3e77bddb82ad
parent01658ef333b9e1a92daa35de8f4052bed98e0d47
phy: sun4i-usb: Determine VBUS detection pin from devicetree

So far Allwinner boards controlled the USB VBUS detection via the
respective GPIO pin specified in Kconfig, as a string. All boards should
have the same GPIO already specified in the devicetree, in the
usb0_vbus_det-gpios property.

Convert the usage of the Kconfig configured GPIO over to query that
information from the devicetree, then use the existing DM GPIO
infrastructure to request the GPIO.
Only PHY0 supports USB-OTG, so limit the GPIO request to that PHY, to
avoid claiming it multiple times.

This removes the need to name that GPIO in the defconfig file.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
drivers/phy/allwinner/phy-sun4i-usb.c