diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index ffa405133b5..a0f8a621063 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -60,21 +60,27 @@ }; }; + reg_usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + gpio_export { compatible = "gpio-export"; - power_usb2 { - gpio-export,name = "power_usb2"; - gpio-export,output = <1>; - gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; - }; - - power_usb3 { - gpio-export,name = "power_usb3"; - gpio-export,output = <1>; - gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; - }; - power_sata { gpio-export,name = "power_sata"; gpio-export,output = <1>; @@ -102,6 +108,11 @@ status = "okay"; }; +&xhci { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_usb_vbus>; +}; + &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts index 8b2df414173..3499e14f950 100644 --- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts +++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts @@ -21,22 +21,6 @@ bootargs = "console=ttyS0,115200"; }; - gpio-export { - compatible = "gpio-export"; - - usb-30-power { - gpio-export,name = "usb-30-power"; - gpio-export,output = <0>; - gpios = <&gpio 22 GPIO_ACTIVE_LOW>; - }; - - usb-20-power { - gpio-export,name = "usb-20-power"; - gpio-export,output = <0>; - gpios = <&gpio 23 GPIO_ACTIVE_LOW>; - }; - }; - keys { compatible = "gpio-keys"; @@ -91,6 +75,27 @@ gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; }; + + reg_usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; +}; + +&xhci { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_usb_vbus>; }; &spi0 { diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index a4d55a5e870..c43ed152f65 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -59,20 +59,22 @@ }; }; - gpio_export { - compatible = "gpio-export"; + reg_usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; - usb2power { - gpio-export,name = "usb2power"; - gpio-export,output = <1>; - gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; - }; - - usb3power { - gpio-export,name = "usb3power"; - gpio-export,output = <1>; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - }; + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; + enable-active-high; }; }; @@ -80,6 +82,11 @@ status = "okay"; }; +&xhci { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_usb_vbus>; +}; + &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 00e4171d932..8830320954b 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -67,24 +67,35 @@ gpio_export { compatible = "gpio-export"; - power_usb2 { - gpio-export,name = "power_usb2"; - gpio-export,output = <1>; - gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; - }; - - power_usb3 { - gpio-export,name = "power_usb3"; - gpio-export,output = <1>; - gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; - }; - power_sata { gpio-export,name = "power_sata"; gpio-export,output = <1>; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; }; + + reg_usb_vbus: regulator-usb { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&xhci { + vusb33-supply = <®_3p3v>; + vbus-supply = <®_usb_vbus>; }; &spi0 {