ramips: mt7621: convert usb power to regulators

These things are regulators. Should silence dmesg messages about using
dummy regulators.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16804
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2024-10-24 14:51:29 -07:00 committed by Robert Marko
parent ef4df2b5e9
commit e612900ae0
7 changed files with 86 additions and 52 deletions

View File

@ -80,15 +80,13 @@
}; };
}; };
gpio_export { reg_power_usb3: regulator {
compatible = "gpio-export"; compatible = "regulator-fixed";
#size-cells = <0>; regulator-name = "power_usb3";
regulator-min-microvolt = <5000000>;
power_usb3 { regulator-max-microvolt = <5000000>;
gpio-export,name = "power_usb3"; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
gpio-export,output = <1>; enable-active-high;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
};
}; };
}; };
@ -155,6 +153,10 @@
}; };
}; };
&xhci {
vbus-supply = <&reg_power_usb3>;
};
&pcie { &pcie {
status = "okay"; status = "okay";
}; };

View File

@ -19,16 +19,6 @@
label-mac-device = &gmac1; label-mac-device = &gmac1;
}; };
gpio-export {
compatible = "gpio-export";
gpio-usb-power {
gpio-export,name = "power:usb";
gpio-export,output = <1>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
@ -65,6 +55,15 @@
linux,code = <KEY_RESTART>; 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;
};
}; };
&spi0 { &spi0 {
@ -131,6 +130,10 @@
}; };
}; };
&xhci {
vbus-supply = <&reg_power_usb>;
};
&pcie { &pcie {
status = "okay"; status = "okay";
}; };

View File

@ -13,13 +13,20 @@
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
}; };
usb_power {
gpio-export,name = "usb_power";
gpio-export,output = <1>;
gpios = <&gpio 12 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;
};
};
&xhci {
vbus-supply = <&reg_usb_power>;
}; };
&keys { &keys {

View File

@ -48,6 +48,15 @@
}; };
}; };
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 { watchdog {
compatible = "linux,wdt-gpio"; compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@ -72,15 +81,13 @@
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
}; };
ext-usb {
gpio-export,name = "ext-usb";
gpio-export,output = <1>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
}; };
}; };
&xhci {
vbus-supply = <&reg_power_usb>;
};
&sdhci { &sdhci {
status = "okay"; status = "okay";
}; };

View File

@ -47,6 +47,15 @@
}; };
}; };
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 { watchdog {
compatible = "linux,wdt-gpio"; compatible = "linux,wdt-gpio";
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
@ -71,15 +80,13 @@
gpio-export,output = <1>; gpio-export,output = <1>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
}; };
ext-usb {
gpio-export,name = "ext-usb";
gpio-export,output = <1>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
}; };
}; };
&xhci {
vbus-supply = <&reg_power_usb>;
};
&sdhci { &sdhci {
status = "okay"; status = "okay";
}; };

View File

@ -96,17 +96,18 @@
}; };
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;
};
}; };
&gpio { &xhci {
status = "okay"; vbus-supply = <&reg_power_usb>;
enable_usb_power {
gpio-hog;
line-name = "enable USB power";
gpios = <7 GPIO_ACTIVE_HIGH>;
output-high;
};
}; };
&nand { &nand {

View File

@ -92,13 +92,20 @@
gpio-export,output = <0>; gpio-export,output = <0>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>; gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
}; };
usb_power {
gpio-export,name = "usb_power";
gpio-export,output = <1>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
}; };
reg_usb_power: regulator {
compatible = "regulator-fixed";
reglator-name = "usb_power";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&xhci {
vbus-supply = <&reg_usb_power>;
}; };
&nand { &nand {