Преглед изворни кода

ramips: use regulator for USB

The DWC2 driver used here supports a vbus-supply property to control
the GPIO. Use it instead of the local gpio,exports solution.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/17357
Signed-off-by: Robert Marko <[email protected]>
Rosen Penev пре 1 година
родитељ
комит
0cdcba238f
1 измењених фајлова са 8 додато и 9 уклоњено
  1. 8 9
      target/linux/ramips/dts/rt3052_accton_wr6202.dts

+ 8 - 9
target/linux/ramips/dts/rt3052_accton_wr6202.dts

@@ -94,15 +94,12 @@
 		};
 	};
 
-	gpio_export {
-		compatible = "gpio-export";
-		#size-cells = <0>;
-
-		usb {
-			gpio-export,name = "usb";
-			gpio-export,output = <0>;
-			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
-		};
+	reg_usb_power: regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_power";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 	};
 };
 
@@ -129,4 +126,6 @@
 
 &otg {
 	status = "okay";
+
+	vbus-supply = <&reg_usb_power>;
 };