realtek: update GPIO bindings in the dts files in dts-5.10
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sat, 8 May 2021 08:51:29 +0000 (17:51 +0900)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 25 Sep 2021 22:32:18 +0000 (00:32 +0200)
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@gmail.com>
target/linux/realtek/dts-5.10/rtl8380_netgear_gigabit.dtsi
target/linux/realtek/dts-5.10/rtl8380_zyxel_gs1900.dtsi
target/linux/realtek/dts-5.10/rtl8382_allnet_all-sg8208m.dts
target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210-10p.dts
target/linux/realtek/dts-5.10/rtl8382_d-link_dgs-1210.dtsi
target/linux/realtek/dts-5.10/rtl8382_inaba_aml2-17gp.dts

index 8ba66d6023716c4532baf22038a46459bedded67..9cde00517ee6250bd4843a7145d2421f6c9c787d 100644 (file)
@@ -23,7 +23,7 @@
 
                mode {
                        label = "reset";
-                       gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };
index d61ac3b2b8f094859f946b7c56d027b77e26efe1..7233f6086c6fb057812cf09105bda8bcd7ed330b 100644 (file)
                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>;
        };
 
        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";
 
index fdcc01fdac410c5fe6391d9e8c321a78e5d60267..f4ca1686dd08cdfa139cfaaef82473e6171cba95 100644 (file)
                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";
 
index e2f5e7a4c0e15e765c195d0f8fe1d271ce1954d2..f347660283c456d829caa672a01c008b1a1e4ff6 100644 (file)
        };
 
        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>;
                };
        };
 
                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@0 {
index a14738c8a962d0b99cf42c4d26e0507be4d0ff45..a4811dbf3073ab7483471cd25ad3cb00acb15d97 100644 (file)
@@ -27,7 +27,7 @@
 
                led_power: power {
                        label = "green:power";
-                       gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
                };
        };
 };
index 87761ac46202324d2a97a388a6b7b66f07d3a09a..a9af1d44f5949853fe087ec37950091225e25eec 100644 (file)
 
                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";