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

So far Allwinner boards controlled the USB OTG ID 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_id_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