lantiq: dts: define the SPI pins in {amazonse,ar9,vr9}.dtsi
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Mon, 8 Jul 2019 09:50:23 +0000 (11:50 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 22 Dec 2019 00:24:23 +0000 (01:24 +0100)
Define the SPI pins in the corresponding SoCs.dtsi and assign them to
the SPI controller node. All known boards use CS4 and it's likely that
this is hardcoded in bootrom so this doesn't bother with having
per-board SPI pinmux settings.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
12 files changed:
target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts
target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts
target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts
target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts
target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi

index b4eee73b739ba1979e0b35d7b4326643c928ae39..0143a21a9cd99c29fbe1eb3a748a45c96cde14b1 100644 (file)
                        lantiq,open-drain = <1>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs1";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &gsw {
 
 &spi {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
 
        flash@1 {
                compatible = "jedec,spi-nor";
index 4a20dcefd32fdae07c6e84d04e08bad5b64175c1..b12101a5d12aefca25f78d52787d6b455c4407c6 100644 (file)
                        lantiq,pull = <0>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &gsw {
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index 362dccfda7f358a5c71ecdd8cfbf18ca4369eaea..cdba656e49fdd1aedbbf123f8731cd34c82bcf01 100644 (file)
        lantiq,gphy-mode = <GPHY_MODE_FE>;
 };
 
-&gpio {
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk", "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
-};
-
 &pcie0 {
        status = "disabled";
 };
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index d09a9626bb6b495dbf3377722c7561db3e77c31f..687a2f409892742c5bb7e1db7a334d7d822d33fa 100644 (file)
                        lantiq,pull = <2>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &spi {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        status = "okay";
 
        flash@4 {
index 6790815a24ec8eb13cb10194eb16aa02e5db0191..b83f0f058a31e5c4eff35d474df73884a549fb07 100644 (file)
                        lantiq,output = <1>;
                };
        };
-
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &pcie0 {
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index cca79c926eb0f33c7c28e9e042cc4be13c79678e..8f1fc261fbea6d4cdcedf0330159fc29f02723b4 100644 (file)
        label = "fritz7362sl:green:dect";
 };
 
-&gpio {
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
-};
-
 &state_default {
        nand {
                lantiq,groups = "nand ale", "nand cle",
@@ -67,8 +51,6 @@
 
 &spi {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
 
        flash@4 {
                #address-cells = <1>;
index 00475e734e07f17c45f9c2ad359bf2d9c7008f14..d0e8cd8ced2b7a39a8adfab24a65dd576ba53439 100644 (file)
                        lantiq,output = <1>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &pcie0 {
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index 7fedcee92f5cb73a2d9dd9dd27e84ba5c49230a5..44938eddd3420e6e0ef86dbdd52a12fdfa9c2911 100644 (file)
                        lantiq,output = <1>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &pci0 {
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index 7e5f58c71e01cce6943524bbb27d3b604090ab69..4631ad4ffe0ec3b94ba54ae813568c2d878ac0dc 100644 (file)
                        lantiq,output = <1>;
                };
        };
-       pins_spi_default: pins_spi_default {
-               spi_in {
-                       lantiq,groups = "spi_di";
-                       lantiq,function = "spi";
-               };
-               spi_out {
-                       lantiq,groups = "spi_do", "spi_clk",
-                               "spi_cs4";
-                       lantiq,function = "spi";
-                       lantiq,output = <1>;
-               };
-       };
 };
 
 &spi {
        status = "okay";
 
-       pinctrl-names = "default";
-       pinctrl-0 = <&pins_spi_default>;
-
        flash@4 {
                compatible = "jedec,spi-nor";
                reg = <4>;
index 33dc5612bf6d1870d868126ad0b2f16ff2f75ce3..6b5606d8ab3d605c8b27ca365fbe10812a979177 100644 (file)
                                        "spi_frm";
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>;
                        status = "disabled";
                };
 
                                        lantiq,function = "mdio";
                                };
                        };
+
+                       spi_pins: spi {
+                               mux-0 {
+                                       lantiq,groups = "spi_di";
+                                       lantiq,function = "spi";
+                               };
+                               mux-1 {
+                                       lantiq,groups = "spi_do", "spi_clk";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
+
+                       spi_cs4_pins: spi-cs4 {
+                               mux {
+                                       lantiq,groups = "spi_cs4";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
                };
 
                asc1: serial@e100c00 {
index 3244908e323ef6bbf2023b19471f69b97d9723f7..ab518e75c6e0824f31eea36268a80c1a02224583 100644 (file)
                                        "spi_frm";
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>;
                        status = "disabled";
                };
 
                                        lantiq,function = "mdio";
                                };
                        };
+
+                       spi_pins: spi {
+                               mux-0 {
+                                       lantiq,groups = "spi_di";
+                                       lantiq,function = "spi";
+                               };
+                               mux-1 {
+                                       lantiq,groups = "spi_do", "spi_clk";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
+
+                       spi_cs4_pins: spi-cs4 {
+                               mux {
+                                       lantiq,groups = "spi_cs4";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
                };
 
                stp: stp@e100bb0 {
index 81e2fea54943ad4619b50dbc7214c63e628a467e..4639aaf490304071542d7c0820a7eb2efe1d1340 100644 (file)
                                        "spi_frm";
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>;
                        status = "disabled";
                };
 
                                        lantiq,function = "mdio";
                                };
                        };
+
+                       spi_pins: spi {
+                               mux-0 {
+                                       lantiq,groups = "spi_di";
+                                       lantiq,function = "spi";
+                               };
+                               mux-1 {
+                                       lantiq,groups = "spi_do", "spi_clk";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
+
+                       spi_cs4_pins: spi-cs4 {
+                               mux {
+                                       lantiq,groups = "spi_cs4";
+                                       lantiq,function = "spi";
+                                       lantiq,output = <1>;
+                               };
+                       };
                };
 
                stp: stp@e100bb0 {