[openwrt/openwrt] ramips: dts: mt7621: reuse the default USB dummy regulators
LEDE Commits
lede-commits at lists.infradead.org
Sat Jun 7 11:30:16 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a617ab6639bbd24b5ff81ade628710ae094bcad1
commit a617ab6639bbd24b5ff81ade628710ae094bcad1
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Tue May 20 07:50:56 2025 +0800
ramips: dts: mt7621: reuse the default USB dummy regulators
To simplify the device specific dts, reuse the mt7621 default
XHCI voltage regulators by adding the corresponding GPIO pin
and polarity properties.
Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
.../linux/ramips/dts/mt7621_d-team_newifi-d2.dts | 21 +++++--------
target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts | 35 ++++++++--------------
target/linux/ramips/dts/mt7621_dual-q_h721.dts | 31 +++++++------------
target/linux/ramips/dts/mt7621_humax_e10.dts | 21 +++++--------
.../linux/ramips/dts/mt7621_keenetic_kn-1910.dts | 35 ++++++++--------------
.../linux/ramips/dts/mt7621_lenovo_newifi-d1.dts | 35 ++++++++--------------
.../dts/mt7621_mikrotik_routerboard-7xx.dtsi | 21 +++++--------
.../ramips/dts/mt7621_netgear_sercomm_ayx.dtsi | 19 ++++--------
.../ramips/dts/mt7621_netgear_sercomm_chj.dtsi | 19 ++++--------
target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts | 19 ++++--------
.../ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts | 17 ++++-------
.../ramips/dts/mt7621_tplink_archer-c6u-v1.dts | 19 ++++--------
target/linux/ramips/dts/mt7621_tplink_er605-v2.dts | 20 ++++---------
.../ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts | 19 ++++--------
.../ramips/dts/mt7621_xiaomi_mi-router-3g.dts | 19 ++++--------
.../ramips/dts/mt7621_xzwifi_creativebox-v1.dts | 35 ++++++++--------------
.../ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi | 19 ++++--------
.../ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi | 19 ++++--------
.../linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts | 21 +++++--------
.../linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts | 21 +++++--------
20 files changed, 152 insertions(+), 313 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
index cba4ceae72..22e8ca4807 100644
--- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
+++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
@@ -79,16 +79,6 @@
linux,code = <KEY_WPS_BUTTON>;
};
};
-
- reg_power_usb3: regulator {
- compatible = "regulator-fixed";
- regulator-name = "power_usb3";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
};
&spi0 {
@@ -154,10 +144,6 @@
};
};
-&xhci {
- vbus-supply = <®_power_usb3>;
-};
-
&pcie {
status = "okay";
};
@@ -184,6 +170,13 @@
nvmem-cell-names = "mac-address";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
+
&switch0 {
ports {
port at 0 {
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 a0f8a62106..1037a648dc 100644
--- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
+++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
@@ -60,24 +60,6 @@
};
};
- 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";
@@ -108,11 +90,6 @@
status = "okay";
};
-&xhci {
- vusb33-supply = <®_3p3v>;
- vbus-supply = <®_usb_vbus>;
-};
-
&spi0 {
status = "okay";
@@ -219,6 +196,18 @@
nvmem-cell-names = "mac-address";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
+®_vusb33 {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts
index 3499e14f95..4f8249228a 100644
--- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts
+++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts
@@ -75,27 +75,6 @@
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 {
@@ -158,6 +137,16 @@
status = "okay";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+};
+
+®_vusb33 {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts
index fd66578eaf..57d934519e 100644
--- a/target/linux/ramips/dts/mt7621_humax_e10.dts
+++ b/target/linux/ramips/dts/mt7621_humax_e10.dts
@@ -55,16 +55,6 @@
linux,code = <KEY_RESTART>;
};
};
-
- reg_power_usb: regulator {
- compatible = "regulator-fixed";
- regulator-name = "power:usb";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
};
&spi0 {
@@ -131,10 +121,6 @@
};
};
-&xhci {
- vbus-supply = <®_power_usb>;
-};
-
&pcie {
status = "okay";
};
@@ -177,6 +163,13 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
+
&switch0 {
ports {
port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-1910.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-1910.dts
index ee09b8895c..a6ce11b2f7 100644
--- a/target/linux/ramips/dts/mt7621_keenetic_kn-1910.dts
+++ b/target/linux/ramips/dts/mt7621_keenetic_kn-1910.dts
@@ -17,24 +17,6 @@
label-mac-device = &gmac0;
};
- reg_usb_vbus: regulator-usb {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 5 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 11 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-
keys {
compatible = "gpio-keys";
@@ -115,11 +97,6 @@
};
};
-&xhci {
- vbus-supply = <®_usb_vbus>;
- vusb33-supply = <®_3p3v>;
-};
-
&nand {
status = "okay";
@@ -259,6 +236,18 @@
nvmem-cell-names = "mac-address";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
+®_vusb33 {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
index c43ed152f6..8b05b122b9 100644
--- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
+++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
@@ -58,35 +58,12 @@
linux,code = <KEY_WPS_BUTTON>;
};
};
-
- 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;
- };
-
- 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;
- };
};
&sdhci {
status = "okay";
};
-&xhci {
- vusb33-supply = <®_3p3v>;
- vbus-supply = <®_usb_vbus>;
-};
-
&spi0 {
status = "okay";
@@ -189,6 +166,18 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
+®_vusb33 {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi
index 2f96f7316f..44155eb9ee 100644
--- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-7xx.dtsi
@@ -13,20 +13,6 @@
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
};
-
- reg_usb_power: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_power>;
};
&keys {
@@ -45,6 +31,13 @@
};
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
+
&switch0 {
ports {
port0: port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
index 40d853d48e..b192352037 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
@@ -73,19 +73,6 @@
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
};
&pcie {
@@ -122,6 +109,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
index 16f20d9408..6d70b3b557 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -62,19 +62,6 @@
linux,code = <KEY_RESTART>;
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
};
&pcie {
@@ -119,6 +106,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
index 4cbdc3ab97..1b9e6caece 100644
--- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
+++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
@@ -56,15 +56,6 @@
linux,code = <KEY_RESTART>;
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
};
&gmac0 {
@@ -109,6 +100,12 @@
};
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&spi0 {
status = "okay";
@@ -206,7 +203,3 @@
};
};
};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
-};
diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts
index 93d17766e9..9c36add8cb 100644
--- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts
+++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-sfp.dts
@@ -58,15 +58,12 @@
tx-disable-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <1000>;
};
+};
- reg_usb_vbus: regulator-usb {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
&state_default {
@@ -193,10 +190,6 @@
};
};
-&xhci {
- vbus-supply = <®_usb_vbus>;
-};
-
&pcie {
status = "okay";
};
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
index 4917ffc81e..ab20c13966 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
@@ -85,15 +85,6 @@
gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
};
&spi0 {
@@ -210,6 +201,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 1 {
@@ -240,7 +237,3 @@
function = "gpio";
};
};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
-};
diff --git a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
index be9efbf0e9..1c5a32613f 100644
--- a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
@@ -58,15 +58,6 @@
linux,code = <KEY_RESTART>;
};
};
-
- reg_usb_vbus: regulator-usb {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
};
&gmac0 {
@@ -150,6 +141,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&state_default {
gpio {
groups = "uart2", "uart3", "pcie", "jtag";
@@ -160,8 +157,3 @@
&spi0 {
status = "disabled";
};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
-};
-
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
index 2ed4b2c311..6838bb9bc4 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
@@ -84,19 +84,6 @@
linux,code = <KEY_RESTART>;
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
};
&nand {
@@ -228,6 +215,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
index 7af316de6a..539bfadc5a 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
@@ -57,19 +57,6 @@
linux,default-trigger = "mt7530-0:02:1Gbps";
};
};
-
- reg_usb_vbus: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_vbus";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_vbus>;
};
&pcie {
@@ -101,6 +88,12 @@
nvmem-cell-names = "mac-address";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
index 8830320954..89a1635b28 100644
--- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
+++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
@@ -73,29 +73,6 @@
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 {
@@ -195,6 +172,18 @@
nvmem-cell-names = "mac-address";
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
+®_vusb33 {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
index fcfe97c126..2e76d21ae1 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
@@ -48,15 +48,6 @@
};
};
- reg_power_usb: regulator {
- compatible = "regulator-fixed";
- regulator-name = "power_usb";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@@ -83,10 +74,6 @@
};
};
-&xhci {
- vbus-supply = <®_power_usb>;
-};
-
&sdhci {
status = "okay";
};
@@ -197,6 +184,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
index d3990eeede..d77fd2f14f 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
@@ -47,15 +47,6 @@
};
};
- reg_power_usb: regulator {
- compatible = "regulator-fixed";
- regulator-name = "power_usb";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
-
watchdog {
compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@@ -82,10 +73,6 @@
};
};
-&xhci {
- vbus-supply = <®_power_usb>;
-};
-
&sdhci {
status = "okay";
};
@@ -196,6 +183,12 @@
/delete-property/ interrupts;
};
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+};
+
&switch0 {
ports {
port at 0 {
diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
index 0657eb6992..4b4e142b58 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_lte3301-plus.dts
@@ -89,20 +89,6 @@
};
};
-
- reg_power_usb: regulator {
- compatible = "regulator-fixed";
- regulator-name = "power_usb";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
-};
-
-&xhci {
- vbus-supply = <®_power_usb>;
};
&nand {
@@ -214,3 +200,10 @@
};
};
+
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts
index 9787181ba1..fd0dd5cbb4 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts
@@ -92,20 +92,6 @@
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
};
-
- reg_usb_power: regulator {
- compatible = "regulator-fixed";
- regulator-name = "usb_power";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- regulator-boot-on;
- };
-};
-
-&xhci {
- vbus-supply = <®_usb_power>;
};
&nand {
@@ -239,3 +225,10 @@
nvmem-cell-names = "eeprom";
};
};
+
+®_vbus {
+ /delete-property/ regulator-always-on;
+ gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-boot-on;
+};
More information about the lede-commits
mailing list