From: Martin Blumenstingl Date: Mon, 8 Jul 2019 09:50:23 +0000 (+0200) Subject: lantiq: dts: define the SPI pins in {amazonse,ar9,vr9}.dtsi X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Frmilecki.git;a=commitdiff_plain;h=edb0a936f0af134ed2fb01c05e5d31b9944d2454 lantiq: dts: define the SPI pins in {amazonse,ar9,vr9}.dtsi 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 --- diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts b/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts index b4eee73b739..0143a21a9cd 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts @@ -96,18 +96,6 @@ 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 { @@ -117,8 +105,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; flash@1 { compatible = "jedec,spi-nor"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi index 4a20dcefd32..b12101a5d12 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi @@ -131,18 +131,6 @@ 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 { @@ -163,9 +151,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts b/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts index 362dccfda7f..cdba656e49f 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts @@ -118,20 +118,6 @@ lantiq,gphy-mode = ; }; -&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"; }; @@ -139,9 +125,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi index d09a9626bb6..687a2f40989 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi @@ -222,24 +222,9 @@ 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 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi index 6790815a24e..b83f0f058a3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi @@ -213,20 +213,6 @@ 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 { @@ -250,9 +236,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts index cca79c926eb..8f1fc261fbe 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts @@ -35,22 +35,6 @@ 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>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi index 00475e734e0..d0e8cd8ced2 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi @@ -194,18 +194,6 @@ 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 { @@ -232,9 +220,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi index 7fedcee92f5..44938eddd34 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi @@ -114,18 +114,6 @@ 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 { @@ -136,9 +124,6 @@ &spi { status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pins_spi_default>; - flash@4 { compatible = "jedec,spi-nor"; reg = <4>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts b/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts index 7e5f58c71e0..4631ad4ffe0 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts @@ -237,26 +237,11 @@ 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>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi index 33dc5612bf6..6b5606d8ab3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi @@ -133,6 +133,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -155,6 +157,26 @@ 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 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi index 3244908e323..ab518e75c6e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi @@ -160,6 +160,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -175,6 +177,26 @@ 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 { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi index 81e2fea5494..4639aaf4903 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi @@ -202,6 +202,8 @@ "spi_frm"; #address-cells = <1>; #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs4_pins>; status = "disabled"; }; @@ -217,6 +219,26 @@ 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 {