[openwrt/openwrt] qualcommax: use PHY regulator for USB GPIO

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 13 12:05:03 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1306237fab40781f01a5635f1688d28fc68b77f4

commit 1306237fab40781f01a5635f1688d28fc68b77f4
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Dec 3 13:40:28 2024 -0800

    qualcommax: use PHY regulator for USB GPIO
    
    The PHY can handle turning off the GPIOs when turning off all USB ports.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17192
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/qualcommax/config-6.6                      |  1 -
 .../files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts   |  7 ++-----
 .../files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts   | 17 +++++++++++------
 .../files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts | 14 ++++----------
 4 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/target/linux/qualcommax/config-6.6 b/target/linux/qualcommax/config-6.6
index 05e2f51bf2..3519557bcc 100644
--- a/target/linux/qualcommax/config-6.6
+++ b/target/linux/qualcommax/config-6.6
@@ -444,7 +444,6 @@ CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_CPR3 is not set
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_USERSPACE_CONSUMER=y
 # CONFIG_REGULATOR_VQMMC_IPQ4019 is not set
 CONFIG_RELOCATABLE=y
 CONFIG_REMOTEPROC=y
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts
index 5761c3b582..8714b34499 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6000-mr7350.dts
@@ -123,11 +123,6 @@
 		gpio = <&tlmm 61 GPIO_ACTIVE_LOW>;
 		regulator-boot-on;
 	};
-
-	output-usb0-power {
-		compatible = "regulator-output";
-		vout-supply = <&reg_usb_vbus>;
-	};
 };
 
 &tlmm {
@@ -246,6 +241,8 @@
 
 &qusb_phy_0 {
 	status = "okay";
+
+	vdd-supply = <&reg_usb_vbus>;
 };
 
 &ssphy_0 {
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts
index c85e9f1993..1b5f58e51b 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-aw1000.dts
@@ -57,12 +57,6 @@
 			gpio-export,output = <1>;
 			gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
 		};
-
-		usb-vbus {
-			gpio-export,name = "usb_vbus";
-			gpio-export,output = <0>;
-			gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
-		};
 	};
 
 	keys {
@@ -160,6 +154,15 @@
 			gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
 		};
 	};
+
+	usb_vbus: regulator-usb-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&tlmm 9 GPIO_ACTIVE_LOW>;
+		regulator-boot-on;
+	};
 };
 
 &tlmm {
@@ -221,6 +224,8 @@
 
 &qusb_phy_1 {
 	status = "okay";
+
+	vdd-supply = <&usb_vbus>;
 };
 
 &ssphy_0 {
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts
index 4af942c289..781b647811 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rt-ax89x.dts
@@ -160,16 +160,6 @@
 		enable-active-high;
 		regulator-boot-on;
 	};
-
-	output-usb0-power {
-		compatible = "regulator-output";
-		vout-supply = <&usb0_vbus>;
-	};
-
-	output-usb1-power {
-		compatible = "regulator-output";
-		vout-supply = <&usb1_vbus>;
-	};
 };
 
 &cpu0_thermal {
@@ -374,6 +364,8 @@
 
 &qusb_phy_0 {
 	status = "okay";
+
+	vdda-phy-supply = <&usb0_vbus>;
 };
 
 &ssphy_1 {
@@ -382,6 +374,8 @@
 
 &qusb_phy_1 {
 	status = "okay";
+
+	vdda-phy-supply = <&usb1_vbus>;
 };
 
 &usb_0 {




More information about the lede-commits mailing list