realtek: move RTL8231 definitions to board files
authorSander Vanheule <sander@svanheule.net>
Sun, 20 Feb 2022 15:25:42 +0000 (16:25 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 20 Feb 2022 16:23:55 +0000 (16:23 +0000)
The RTL8231 is an external chip, and not part of the SoC. That means
it is more appropriate to define it in the board specific (base) files,
instead of the DT include for the SoC itself.

Moving the RTL8231 definition also ensures that boards with no GPIO
expander, or an alternative one, don't have a useless gpio1 node label
defined.

Tested on a Netgear GS110TPPv1.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
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_d-link_dgs-1210-10p.dts
target/linux/realtek/dts-5.10/rtl838x.dtsi

index db411def30d795d04a52f82ceaf9dbef10ef407a..078f8ff22892dd92f81a47d5714d4f2eab6f1e4b 100644 (file)
                gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                open-source;
        };
-};
-
-&gpio1 {
-       status = "okay";
 
-       indirect-access-bus-id = <31>;
+       gpio1: rtl8231-gpio {
+               compatible = "realtek,rtl8231-gpio";
+               #gpio-cells = <2>;
+               gpio-controller;
+               indirect-access-bus-id = <31>;
+       };
 };
 
 &ethernet0 {
index 7095006454a9f04dd47ff6c79089c87ecac6cb58..5993c1b798dfcd8cf6f437be984b4b69e2c17e23 100644 (file)
                        gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
                };
        };
-};
 
-&gpio1 {
-       status = "okay";
+       gpio1: rtl8231-gpio {
+               compatible = "realtek,rtl8231-gpio";
+               #gpio-cells = <2>;
+               gpio-controller;
+               indirect-access-bus-id = <0>;
 
-       poe_enable {
-               gpio-hog;
-               gpios = <13 0>;
-               output-high;
+               poe_enable {
+                       gpio-hog;
+                       gpios = <13 GPIO_ACTIVE_HIGH>;
+                       output-high;
+               };
        };
 };
 
index a0f377c4f4a7f15f201cac596f303b2674fbc7e7..3321887c9a5b13cff154659126f7ce60362a6751 100644 (file)
                        linux,code = <KEY_RESTART>;
                };*/
        };
+
+       gpio1: rtl8231-gpio {
+               compatible = "realtek,rtl8231-gpio";
+               #gpio-cells = <2>;
+               gpio-controller;
+               indirect-access-bus-id = <0>;
+       };
 };
 
 
index bfe75b8eb24132efc02e6bdff378e2fc0a477b1b..11cabc3f63cb7c8c0a61fcb8b0c5587f09ae33b6 100644 (file)
                };
        };
 
-       gpio1: rtl8231-gpio {
-               compatible = "realtek,rtl8231-gpio";
-               #gpio-cells = <2>;
-               indirect-access-bus-id = <0>;
-               gpio-controller;
-
-               status = "disabled";
-       };
-
        pinmux: pinmux@1b001000 {
                compatible = "pinctrl-single";
                reg = <0x1b001000 0x4>;