[openwrt/openwrt] realtek: update GPIO bindings in the dts files in dts-5.10

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 25 15:37:42 PDT 2021


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/61a3d0075b151f6742862e123fdff1897d876176

commit 61a3d0075b151f6742862e123fdff1897d876176
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 8 17:51:29 2021 +0900

    realtek: update GPIO bindings in the dts files in dts-5.10
    
    this patch includes the following changes:
    
    - adjust mapping for the new driver
      - GPIO 24 -> GPIO 0
      - GPIO 47 -> GPIO 0 (+ disabling system LED)
    
    - disable pins in the invalid range
      (out of the range 0-31 of the new driver)
      - are these pins on the external RTL8231 (&gpio1)?
        - GPIO 67 (-> GPIO 3 on &gpio1?)
        - GPIO 94 (-> GPIO 30 on &gpio1?)
    
    - drop "indirect-access-bus-id" property from gpio0 node in device dts
      files
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi  |  2 +-
 .../realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi     | 24 ++++++++++++----------
 .../dts-5.10/rtl8382_allnet_all-sg8208m.dts        | 13 ++++++------
 .../dts-5.10/rtl8382_d-link_dgs-1210-10p.dts       | 15 +++++++-------
 .../realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi  |  2 +-
 .../realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts   |  6 +-----
 6 files changed, 29 insertions(+), 33 deletions(-)

diff --git a/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
index 8ba66d6023..9cde00517e 100644
--- a/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
@@ -23,7 +23,7 @@
 
 		mode {
 			label = "reset";
-			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
 	};
diff --git a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi
index d61ac3b2b8..7233f6086c 100644
--- a/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi
@@ -22,16 +22,6 @@
 		reg = <0x0 0x8000000>;
 	};
 
-	gpio1: rtl8231-gpio {
-		status = "okay";
-
-		poe_enable {
-			gpio-hog;
-			gpios = <13 0>;
-			output-high;
-		};
-	};
-
 	keys {
 		compatible = "gpio-keys-polled";
 		poll-interval = <20>;
@@ -44,15 +34,27 @@
 	};
 
 	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_disable_sys_led>;
 		compatible = "gpio-leds";
 
 		led_sys: sys {
 			label = "green:sys";
-			gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
 		};
 	};
 };
 
+&gpio1 {
+	status = "okay";
+
+	poe_enable {
+		gpio-hog;
+		gpios = <13 0>;
+		output-high;
+	};
+};
+
 &spi0 {
 	status = "okay";
 
diff --git a/target/linux/realtek/dts-5.10/rtl8382_allnet_all-sg8208m.dts b/target/linux/realtek/dts-5.10/rtl8382_allnet_all-sg8208m.dts
index fdcc01fdac..f4ca1686dd 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_allnet_all-sg8208m.dts
+++ b/target/linux/realtek/dts-5.10/rtl8382_allnet_all-sg8208m.dts
@@ -29,28 +29,27 @@
 		compatible = "gpio-keys-polled";
 		poll-interval = <20>;
 
-		reset {
+		/* is this pin 3 on the external RTL8231 (&gpio1)? */
+		/*reset {
 			label = "reset";
 			gpios = <&gpio0 67 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
-		};
+		};*/
 	};
 
 	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_disable_sys_led>;
 		compatible = "gpio-leds";
 
 		led_sys: sys {
 			label = "green:sys";
-			gpios = <&gpio0 47 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
 		};
 		// GPIO 25: power on/off all port leds
 	};
 };
 
-&gpio0 {
-	indirect-access-bus-id = <0>;
-};
-
 &spi0 {
 	status = "okay";
 
diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
index e2f5e7a4c0..f347660283 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
+++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
@@ -26,12 +26,14 @@
 	};
 
 	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_disable_sys_led>;
 		compatible = "gpio-leds";
 
 		led_power: power {
-			// GPIO 24 seems to provide power to the leds
+			// GPIO 0 seems to provide power to the leds
 			label = "green:power";
-			gpios = <&gpio0 47 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 		};
 	};
 
@@ -39,19 +41,16 @@
 		compatible = "gpio-keys-polled";
 		poll-interval = <20>;
 
-		mode {
+		/* is this pin 30 on the external RTL8231 (&gpio1)? */
+		/*mode {
 			label = "reset";
 			gpios = <&gpio0 94 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
-		};
+		};*/
 	};
 };
 
 
-&gpio0 {
-	indirect-access-bus-id = <0>;
-};
-
 &spi0 {
 	status = "okay";
 	flash at 0 {
diff --git a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
index a14738c8a9..a4811dbf30 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
+++ b/target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
@@ -27,7 +27,7 @@
 
 		led_power: power {
 			label = "green:power";
-			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 		};
 	};
 };
diff --git a/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts b/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
index 87761ac462..a9af1d44f5 100644
--- a/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
+++ b/target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts
@@ -24,16 +24,12 @@
 
 		reset {
 			label = "reset";
-			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
 	};
 };
 
-&gpio0 {
-	indirect-access-bus-id = <0>;
-};
-
 &spi0 {
 	status = "okay";
 



More information about the lede-commits mailing list