Просмотр исходного кода

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 год назад
Родитель
Сommit
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 {
 &otg {
 	status = "okay";
 	status = "okay";
+
+	vbus-supply = <&reg_usb_power>;
 };
 };