[openwrt/openwrt] ipq40xx: dts: convert PHY GPIO bindings

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 23 10:36:34 EST 2020


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2a5bfb6600d5d8a20cf361b7b99ef66027fe412e

commit 2a5bfb6600d5d8a20cf361b7b99ef66027fe412e
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Mon Oct 19 18:49:29 2020 +0200

    ipq40xx: dts: convert PHY GPIO bindings
    
    Since the new PHY driver manages each PHY individually and therefore
    registers each PHY that is marked with gpio-controller; DT property as a
    GPIO controller we need to convert old DT bindings to account for this.
    
    Only 2 boards use this so its not much of an issue.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 .../arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts   | 12 ++---
 .../arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts    | 51 ++++++++++++++--------
 2 files changed, 41 insertions(+), 22 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
index 28d27d9959..c35ce5ccc4 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
@@ -37,7 +37,7 @@
 
 		wan {
 			label = "amber:wan";
-			gpios = <&qca8075 19 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy4 1 GPIO_ACTIVE_HIGH>;
 		};
 
 		wlan2g {
@@ -119,14 +119,11 @@
 			status = "okay";
 		};
 
-		qca8075: ess-switch at c000000 {
+		ess-switch at c000000 {
 			status = "okay";
 
 			switch_lan_bmp = <0x10>;
 			switch_wan_bmp = <0x20>;
-
-			#gpio-cells = <2>;
-			gpio-controller;
 		};
 
 		edma at c080000 {
@@ -264,6 +261,11 @@
 	status = "okay";
 };
 
+&ethphy4 {
+	gpio-controller;
+	#gpio-cells = <2>;
+};
+
 &gmac0 {
 	qcom,forced_duplex = <1>;
 	qcom,forced_speed = <1000>;
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
index fb1762cc05..77b1810f09 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
@@ -70,18 +70,8 @@
 			status = "okay";
 		};
 
-		qca8075: ess-switch at c000000 {
+		ess-switch at c000000 {
 			status = "okay";
-
-			#gpio-cells = <2>;
-			gpio-controller;
-
-			enable-usb-power {
-				gpio-hog;
-				line-name = "enable USB3 power";
-				gpios = <7 GPIO_ACTIVE_HIGH>;
-				output-high;
-			};
 		};
 
 		edma at c080000 {
@@ -110,33 +100,33 @@
 
 		wlan {
 			label = "green:wlan";
-			gpios = <&qca8075 1 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy0 0 GPIO_ACTIVE_HIGH>;
 		};
 
 		panic: info_red {
 			label = "red:info";
-			gpios = <&qca8075 3 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy0 1 GPIO_ACTIVE_HIGH>;
 			panic-indicator;
 		};
 
 		wan {
 			label = "green:wan";
-			gpios = <&qca8075 5 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy1 0 GPIO_ACTIVE_HIGH>;
 		};
 
 		power: power {
 			label = "green:power";
-			gpios = <&qca8075 11 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy2 1 GPIO_ACTIVE_HIGH>;
 		};
 
 		lan {
 			label = "green:lan";
-			gpios = <&qca8075 13 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy3 0 GPIO_ACTIVE_HIGH>;
 		};
 
 		flash: info_amber {
 			label = "amber:info";
-			gpios = <&qca8075 15 GPIO_ACTIVE_HIGH>;
+			gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
 		};
 	};
 };
@@ -269,6 +259,33 @@
 	status = "okay";
 };
 
+&ethphy0 {
+	gpio-controller;
+	#gpio-cells = <2>;
+};
+
+&ethphy1 {
+	gpio-controller;
+	#gpio-cells = <2>;
+
+	enable-usb-power {
+		gpio-hog;
+		line-name = "enable USB3 power";
+		gpios = <1 GPIO_ACTIVE_HIGH>;
+		output-high;
+	};
+};
+
+&ethphy2 {
+	gpio-controller;
+	#gpio-cells = <2>;
+};
+
+&ethphy3 {
+	gpio-controller;
+	#gpio-cells = <2>;
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };



More information about the lede-commits mailing list