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@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18886
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Shiji Yang 2025-05-20 07:50:56 +08:00 committed by Hauke Mehrtens
parent 548d993a04
commit a617ab6639
20 changed files with 152 additions and 313 deletions

View file

@ -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 = <&reg_power_usb3>;
};
&pcie {
status = "okay";
};
@ -184,6 +170,13 @@
nvmem-cell-names = "mac-address";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_3p3v>;
vbus-supply = <&reg_usb_vbus>;
};
&spi0 {
status = "okay";
@ -219,6 +196,18 @@
nvmem-cell-names = "mac-address";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&reg_vusb33 {
/delete-property/ regulator-always-on;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_3p3v>;
vbus-supply = <&reg_usb_vbus>;
};
&spi0 {
@ -158,6 +137,16 @@
status = "okay";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
&reg_vusb33 {
/delete-property/ regulator-always-on;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_power_usb>;
};
&pcie {
status = "okay";
};
@ -177,6 +163,13 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};
&switch0 {
ports {
port@1 {

View file

@ -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 = <&reg_usb_vbus>;
vusb33-supply = <&reg_3p3v>;
};
&nand {
status = "okay";
@ -259,6 +236,18 @@
nvmem-cell-names = "mac-address";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&reg_vusb33 {
/delete-property/ regulator-always-on;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@1 {

View file

@ -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 = <&reg_3p3v>;
vbus-supply = <&reg_usb_vbus>;
};
&spi0 {
status = "okay";
@ -189,6 +166,18 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&reg_vusb33 {
/delete-property/ regulator-always-on;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@1 {

View file

@ -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 = <&reg_usb_power>;
};
&keys {
@ -45,6 +31,13 @@
};
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};
&switch0 {
ports {
port0: port@0 {

View file

@ -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 = <&reg_usb_vbus>;
};
&pcie {
@ -122,6 +109,12 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_usb_vbus>;
};
&pcie {
@ -119,6 +106,12 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 @@
};
};
&reg_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 = <&reg_usb_vbus>;
};

View file

@ -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;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&state_default {
@ -193,10 +190,6 @@
};
};
&xhci {
vbus-supply = <&reg_usb_vbus>;
};
&pcie {
status = "okay";
};

View file

@ -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;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@1 {
@ -240,7 +237,3 @@
function = "gpio";
};
};
&xhci {
vbus-supply = <&reg_usb_vbus>;
};

View file

@ -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;
};
&reg_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 = <&reg_usb_vbus>;
};

View file

@ -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 = <&reg_usb_vbus>;
};
&nand {
@ -228,6 +215,12 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@1 {

View file

@ -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 = <&reg_usb_vbus>;
};
&pcie {
@ -101,6 +88,12 @@
nvmem-cell-names = "mac-address";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@1 {

View file

@ -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 = <&reg_3p3v>;
vbus-supply = <&reg_usb_vbus>;
};
&spi0 {
@ -195,6 +172,18 @@
nvmem-cell-names = "mac-address";
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&reg_vusb33 {
/delete-property/ regulator-always-on;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_power_usb>;
};
&sdhci {
status = "okay";
};
@ -197,6 +184,12 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_power_usb>;
};
&sdhci {
status = "okay";
};
@ -196,6 +183,12 @@
/delete-property/ interrupts;
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
&switch0 {
ports {
port@0 {

View file

@ -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 = <&reg_power_usb>;
};
&nand {
@ -214,3 +200,10 @@
};
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};

View file

@ -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 = <&reg_usb_power>;
};
&nand {
@ -239,3 +225,10 @@
nvmem-cell-names = "eeprom";
};
};
&reg_vbus {
/delete-property/ regulator-always-on;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-boot-on;
};