lantiq: dts: assign the GPHY LED pins to the Ethernet controller node
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Mon, 8 Jul 2019 12:47:37 +0000 (14:47 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 22 Dec 2019 00:24:23 +0000 (01:24 +0100)
Assign the GPHY LED pins to the Ethernet controller node instead of
using pin hogging (where pins are assigned to the pin controller).
This is the preferred way of assigning pins upstream.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts
target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi

index d02c8837f4d507c9bc2a94c5c83390d0b141bd89..f22dc912decb7a87cecccf50b8ada05e13c82362 100644 (file)
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>,
+                   <&gphy0_led0_pins>, <&gphy0_led2_pins>,
+                   <&gphy1_led1_pins>, <&gphy1_led2_pins>;
+       pinctrl-names = "default";
+
        lan: interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
                        lantiq,groups = "exin3";
                        lantiq,function = "exin";
                };
-               gphy-leds {
-                       lantiq,groups = "gphy0 led1", "gphy1 led1",
-                                       "gphy0 led2", "gphy1 led2";
-                       lantiq,function = "gphy";
-                       lantiq,pull = <2>;
-                       lantiq,open-drain = <0>;
-                       lantiq,output = <1>;
-               };
                stp {
                        lantiq,groups = "stp";
                        lantiq,function = "stp";
index d0e8cd8ced2b7a39a8adfab24a65dd576ba53439..eabbc0257f92d8f37665cb7277295dff9a9fd98f 100644 (file)
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>;
+       pinctrl-names = "default";
+
        lan: interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
        pinctrl-0 = <&state_default>;
 
        state_default: pinmux {
-               gphy-leds {
-                       lantiq,groups = "gphy0 led1", "gphy1 led1";
-                       lantiq,function = "gphy";
-                       lantiq,pull = <2>;
-                       lantiq,open-drain = <0>;
-                       lantiq,output = <1>;
-               };
                phy-rst {
                        lantiq,pins = "io42";
                        lantiq,pull = <0>;
index f37980a536123a3d1be615a48135fabccedd898c..e074147d66e7d243574b072bd3d20a40e1c9f706 100644 (file)
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>,
+                   <&gphy0_led0_pins>, <&gphy0_led1_pins>, <&gphy0_led2_pins>,
+                   <&gphy1_led0_pins>, <&gphy1_led1_pins>, <&gphy1_led2_pins>;
+
        interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
        lantiq,gphy-mode = <GPHY_MODE_GE>;
 };
 
-&gpio {
-       pinctrl-names = "default";
-       pinctrl-0 = <&state_default>;
-
-       state_default: pinmux {
-               gphy-leds {
-                       lantiq,groups = "gphy0 led0", "gphy0 led1",
-                                       "gphy0 led2", "gphy1 led0",
-                                       "gphy1 led1", "gphy1 led2";
-                       lantiq,function = "gphy";
-                       lantiq,pull = <2>;
-                       lantiq,open-drain = <0>;
-                       lantiq,output = <1>;
-               };
-       };
-};
-
 &localbus {
        flash@0 {
                compatible = "lantiq,nor";
index 6dc45f057d987ef82294db45a73c84ee41bcb116..8db1ffbf812490c488d3192eb17762505de075c6 100644 (file)
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>,
+                   <&gphy0_led0_pins>, <&gphy0_led1_pins>,
+                   <&gphy1_led0_pins>, <&gphy1_led1_pins>;
+       pinctrl-names = "default";
+
        lan: interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
        pinctrl-0 = <&state_default>;
 
        state_default: pinmux {
-               gphy-leds {
-                       lantiq,groups = "gphy0 led0", "gphy0 led1",
-                                       "gphy1 led0", "gphy1 led1";
-                       lantiq,function = "gphy";
-                       lantiq,open-drain = <0>;
-                       lantiq,pull = <2>;
-                       lantiq,output = <1>;
-               };
                pci-rst {
                        lantiq,pins = "io21";
                        lantiq,open-drain = <0>;
index e71e3837ea43b3b7e659dd537457fe2b7fdd3d6d..f9e60774cbcf3aeafd75c7c87016fe94e5e8c42d 100644 (file)
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led0_pins>;
+       pinctrl-names = "default";
+
        lan: interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
                        lantiq,pull = <0>;
                        lantiq,output = <1>;
                };
-               gphy-leds {
-                       lantiq,groups = "gphy0 led1", "gphy1 led0";
-                       lantiq,function = "gphy";
-                       lantiq,open-drain = <0>;
-                       lantiq,pull = <0>;
-                       lantiq,output = <1>;
-               };
        };
 };
 
index 44938eddd3420e6e0ef86dbdd52a12fdfa9c2911..93178da7e2b5464d25e278aafad55858ba8ba011 100644 (file)
@@ -23,6 +23,9 @@
 };
 
 &eth0 {
+       pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led1_pins>;
+       pinctrl-names = "default";
+
        lan: interface@0 {
                compatible = "lantiq,xrx200-pdi";
                #address-cells = <1>;
        pinctrl-0 = <&state_default>;
 
        state_default: pinmux {
-               gphy-leds {
-                       lantiq,groups = "gphy0 led1", "gphy1 led1";
-                       lantiq,function = "gphy";
-                       lantiq,pull = <2>;
-                       lantiq,open-drain = <0>;
-                       lantiq,output = <1>;
-               };
                phy-rst {
                        lantiq,pins = "io42";
                        lantiq,pull = <0>;
index caedad8bce773d6530e9cdb02e23d6083410c8d5..2cb34eab010fd1994ebf836a66e83fd71d93a52e 100644 (file)
                        gpio-controller;
                        reg = <0xe100b10 0xa0>;
 
+                       gphy0_led0_pins: gphy0-led0 {
+                               lantiq,groups = "gphy0 led0";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
+                       gphy0_led1_pins: gphy0-led1 {
+                               lantiq,groups = "gphy0 led1";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
+                       gphy0_led2_pins: gphy0-led2 {
+                               lantiq,groups = "gphy0 led2";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
+                       gphy1_led0_pins: gphy1-led0 {
+                               lantiq,groups = "gphy1 led0";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
+                       gphy1_led1_pins: gphy1-led1 {
+                               lantiq,groups = "gphy1 led1";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
+                       gphy1_led2_pins: gphy1-led2 {
+                               lantiq,groups = "gphy1 led2";
+                               lantiq,function = "gphy";
+                               lantiq,open-drain = <0>;
+                               lantiq,pull = <2>;
+                               lantiq,output = <1>;
+                       };
+
                        mdio_pins: mdio {
                                mux {
                                        lantiq,groups = "mdio";