lantiq: fritz736x: Move GPIO resets to the inidvidual board.dts files
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Fri, 18 Mar 2022 22:36:41 +0000 (23:36 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 16 Apr 2022 12:02:11 +0000 (14:02 +0200)
FRITZ!Box 7360 V2 and FRITZ!Box 7360 SL both use GPIOs 37 (for &phy0)
and GPIO 44 (for &phy1) to control the PHY's reset lines. FRITZ!Box 7362
SL however uses GPIO 45 (for &phy0) and GPIO 44 (for &phy1). Move the
GPIO reset definitions to each individual board .dts and while at it,
fix the GPIOs for the FRITZ!Box 7362 SL.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi

index 8881745819556bd0d14f0ad433684ea56185cf44..063d6dca5e0d25c962a2658b5e13ec2933a60c8e 100644 (file)
@@ -7,11 +7,23 @@
        model = "AVM FRITZ!Box 7360 V2";
 };
 
-&state_default {
-       pcie-rst {
-               lantiq,pins = "io21";
-               lantiq,pull = <0>;
-               lantiq,output = <1>;
+&gpio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&state_default>;
+
+       state_default: pinmux {
+               pcie-rst {
+                       lantiq,pins = "io21";
+                       lantiq,pull = <0>;
+                       lantiq,output = <1>;
+               };
+
+               phy-rst {
+                       lantiq,pins = "io37", "io44";
+                       lantiq,pull = <0>;
+                       lantiq,open-drain;
+                       lantiq,output = <1>;
+               };
        };
 };
 
        mac-address-increment = <(-2)>;
 };
 
+&phy0 {
+       reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+       reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
 &urlader {
        compatible = "nvmem-cells";
        #address-cells = <1>;
index 945c553688bc6c89fddde513111ac6b31c39f5d4..31523eaae00340cda88304a7c2f7d96dc3f10211 100644 (file)
@@ -7,12 +7,25 @@
        model = "AVM FRITZ!Box 7360 SL";
 };
 
-&state_default {
-       pcie-rst {
-               lantiq,pins = "io38";
-               lantiq,pull = <0>;
-               lantiq,output = <1>;
+&gpio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&state_default>;
+
+       state_default: pinmux {
+               pcie-rst {
+                       lantiq,pins = "io21";
+                       lantiq,pull = <0>;
+                       lantiq,output = <1>;
+               };
+
+               phy-rst {
+                       lantiq,pins = "io37", "io44";
+                       lantiq,pull = <0>;
+                       lantiq,open-drain;
+                       lantiq,output = <1>;
+               };
        };
+
 };
 
 &localbus {
        mac-address-increment = <(-2)>;
 };
 
+&phy0 {
+       reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+       reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
 &urlader {
        compatible = "nvmem-cells";
        #address-cells = <1>;
index c75edd933c4451ba16f3519da93e4c1dc182d555..7995b34971abb38aa4910b3932b4b78c18183684 100644 (file)
@@ -7,12 +7,25 @@
        model = "AVM FRITZ!Box 7362 SL";
 };
 
-&state_default {
-       pcie-rst {
-               lantiq,pins = "io21";
-               lantiq,open-drain = <1>;
-               lantiq,output = <1>;
+&gpio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&state_default>;
+
+       state_default: pinmux {
+               pcie-rst {
+                       lantiq,pins = "io21";
+                       lantiq,pull = <0>;
+                       lantiq,output = <1>;
+               };
+
+               phy-rst {
+                       lantiq,pins = "io44", "io45";
+                       lantiq,pull = <0>;
+                       lantiq,open-drain;
+                       lantiq,output = <1>;
+               };
        };
+
 };
 
 &spi {
        mac-address-increment = <(-2)>;
 };
 
+&phy0 {
+       reset-gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
+};
+
+&phy1 {
+       reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+};
+
 &urlader {
        compatible = "nvmem-cells";
        #address-cells = <1>;
index 8406539f69cd9837a013e2bd94bffd6fb07c6fce..73f6e152bfac3eebfd54d50962d16efec1c2d0be 100644 (file)
        lantiq,gphy-mode = <GPHY_MODE_GE>;
 };
 
-&gpio {
-       pinctrl-names = "default";
-       pinctrl-0 = <&state_default>;
-
-       state_default: pinmux {
-               phy-rst {
-                       lantiq,pins = "io37", "io44";
-                       lantiq,pull = <0>;
-                       lantiq,open-drain;
-                       lantiq,output = <1>;
-               };
-       };
-
-};
-
 &gswip {
        pinctrl-0 = <&mdio_pins>;
        pinctrl-names = "default";
 &gswip_mdio {
        phy0: ethernet-phy@0 {
                reg = <0x00>;
-               reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
        };
 
        phy1: ethernet-phy@1 {
                reg = <0x01>;
-               reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
        };
 
        phy11: ethernet-phy@11 {