ARM: dts: sun6i: mixtile-loftq: Add USB1 VBUS regulator
authorSamuel Holland <samuel@sholland.org>
Sun, 22 Jan 2023 23:50:19 +0000 (17:50 -0600)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 11 Apr 2023 23:17:21 +0000 (00:17 +0100)
This board is configured with CONFIG_USB1_VBUS_PIN="PH24", but no
regulator exists in its device tree. Add the regulator, so USB will
continue to work when the PHY driver switches to using the regulator
uclass instead of a GPIO.

Update the device tree here because it does not exist in Linux.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/dts/sun6i-a31-mixtile-loftq.dts

index dde9bdf..bd98fb3 100644 (file)
@@ -6,6 +6,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
 #include "sun6i-a31.dtsi"
 
 / {
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       reg_usb1_vbus: usb1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb1-vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */
+       };
 };
 
 &ehci0 {
@@ -56,3 +68,8 @@
        pinctrl-0 = <&uart0_ph_pins>;
        status = "okay";
 };
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       status = "okay";
+};