From 0cdcba238fe61793e14dd0792e16445f0fa07f05 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 23 Dec 2024 14:20:29 -0800 Subject: [PATCH] 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 Link: https://github.com/openwrt/openwrt/pull/17357 Signed-off-by: Robert Marko --- .../linux/ramips/dts/rt3052_accton_wr6202.dts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts index 685f596177..b459894d0d 100644 --- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts +++ b/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 = <®_usb_power>; }; -- 2.30.2