ARM: sunxi: dt: Split the SPI pinctrl groups
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 3 May 2015 07:25:41 +0000 (09:25 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 10 May 2015 08:23:56 +0000 (10:23 +0200)
The pinctrl groups for SPI until now were also adding the chip selects in
the SPI pinctrl group.

This was causing a few issues, since a board was forced to use a random
number of chipselects, even though it might use one of these chip selects
for another pin.

The number of chipselects defined was also not the same from one group to
another because of different needs at the time these groups have been
introduced, resulting in no clear view from the board DTS on what exactly
is being muxed, which even might change in the future.

Solve this by creating different pinctrl groups for the chipselects and the
standard SPI pins (CLK, MOSI and MISO) so that we fix both issues.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun4i-a10-cubieboard.dts
arch/arm/boot/dts/sun4i-a10-marsboard.dts
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/boot/dts/sun7i-a20-bananapi.dts
arch/arm/boot/dts/sun7i-a20-bananapro.dts
arch/arm/boot/dts/sun7i-a20-hummingbird.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/boot/dts/sun7i-a20.dtsi

index e6763b499740616d59816aa1a313e37079893b36..170811088fae284b746214de9b9165df2c4aeac2 100644 (file)
 
 &spi0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi0_pins_a>;
+       pinctrl-0 = <&spi0_pins_a>,
+                   <&spi0_cs0_pins_a>;
        status = "okay";
 };
 
index c8566558067acdd025e31906c3b849f6e44124de..0bc9501699433b54e64a1a3aa6ad135ed04c5c20 100644 (file)
 
 &spi0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi0_pins_a>;
+       pinctrl-0 = <&spi0_pins_a>,
+                   <&spi0_cs0_pins_a>;
        status = "okay";
 };
 
index 139c21f7542f43dfbfdb16ec991dabb0e95c7d1b..73b6143e3e9137efc70e51b607406951d53e945c 100644 (file)
                        };
 
                        spi0_pins_a: spi0@0 {
-                               allwinner,pins = "PI10", "PI11", "PI12", "PI13";
+                               allwinner,pins = "PI11", "PI12", "PI13";
+                               allwinner,function = "spi0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi0_cs0_pins_a: spi0_cs0@0 {
+                               allwinner,pins = "PI10";
                                allwinner,function = "spi0";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi1_pins_a: spi1@0 {
-                               allwinner,pins = "PI16", "PI17", "PI18", "PI19";
+                               allwinner,pins = "PI17", "PI18", "PI19";
+                               allwinner,function = "spi1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi1_cs0_pins_a: spi1_cs0@0 {
+                               allwinner,pins = "PI16";
                                allwinner,function = "spi1";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi2_pins_a: spi2@0 {
-                               allwinner,pins = "PB14", "PB15", "PB16", "PB17";
+                               allwinner,pins = "PC20", "PC21", "PC22";
                                allwinner,function = "spi2";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi2_pins_b: spi2@1 {
-                               allwinner,pins = "PC19", "PC20", "PC21", "PC22";
+                               allwinner,pins = "PB15", "PB16", "PB17";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi2_cs0_pins_a: spi2_cs0@0 {
+                               allwinner,pins = "PC19";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi2_cs0_pins_b: spi2_cs0@1 {
+                               allwinner,pins = "PB14";
                                allwinner,function = "spi2";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
index 040e241ccc91cde7da4c8a6e75b0c9a39e818bdb..9f7b472e6725606cfd850cf1fc69b961ea6d6e20 100644 (file)
 
 &spi0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi0_pins_a>;
+       pinctrl-0 = <&spi0_pins_a>,
+                   <&spi0_cs0_pins_a>,
+                   <&spi0_cs1_pins_a>;
        status = "okay";
 };
 
index c6f40791083c0eb6a6a0b46fa5b1e3c64ca7f222..45e2a024c6d5a91ff5aea8c50b97be83c6725ddb 100644 (file)
 
 &spi0 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi0_pins_a>;
+       pinctrl-0 = <&spi0_pins_a>,
+                   <&spi0_cs0_pins_a>,
+                   <&spi0_cs1_pins_a>;
        status = "okay";
 };
 
index 4f52a9c243ab03b281a2b478433df84f7af2b30a..37f4a54974526f2c484fcf23e2c6432aabd467df 100644 (file)
 
 &spi2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi2_pins_b>;
+       pinctrl-0 = <&spi2_pins_b>,
+                   <&spi2_cs0_pins_b>;
        status = "okay";
 };
 
index 0e3205064f17ba474e54398bf6282fca3f4f8b9d..00f8f25eccae57f7a5d64f138d71a9dc8dc8af65 100644 (file)
 
 &spi1 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi1_pins_a>;
+       pinctrl-0 = <&spi1_pins_a>,
+                   <&spi1_cs0_pins_a>;
        status = "okay";
 };
 
 &spi2 {
        pinctrl-names = "default";
-       pinctrl-0 = <&spi2_pins_a>;
+       pinctrl-0 = <&spi2_pins_a>,
+                   <&spi2_cs0_pins_a>;
        status = "okay";
 };
 
index 358fa1f10024603f301c15b7b06b5988f7606b8e..e04cdf9d53f94d2c94b58ea31a91a68c84673c58 100644 (file)
                        };
 
                        spi0_pins_a: spi0@0 {
-                               allwinner,pins = "PI10", "PI11", "PI12", "PI13", "PI14";
+                               allwinner,pins = "PI11", "PI12", "PI13";
+                               allwinner,function = "spi0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi0_cs0_pins_a: spi0_cs0@0 {
+                               allwinner,pins = "PI10";
+                               allwinner,function = "spi0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi0_cs1_pins_a: spi0_cs1@0 {
+                               allwinner,pins = "PI14";
                                allwinner,function = "spi0";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi1_pins_a: spi1@0 {
-                               allwinner,pins = "PI16", "PI17", "PI18", "PI19";
+                               allwinner,pins = "PI17", "PI18", "PI19";
+                               allwinner,function = "spi1";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi1_cs0_pins_a: spi1_cs0@0 {
+                               allwinner,pins = "PI16";
                                allwinner,function = "spi1";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi2_pins_a: spi2@0 {
-                               allwinner,pins = "PC19", "PC20", "PC21", "PC22";
+                               allwinner,pins = "PC20", "PC21", "PC22";
                                allwinner,function = "spi2";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
                        spi2_pins_b: spi2@1 {
-                               allwinner,pins = "PB14", "PB15", "PB16", "PB17";
+                               allwinner,pins = "PB15", "PB16", "PB17";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi2_cs0_pins_a: spi2_cs0@0 {
+                               allwinner,pins = "PC19";
+                               allwinner,function = "spi2";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       spi2_cs0_pins_b: spi2_cs0@1 {
+                               allwinner,pins = "PB14";
                                allwinner,function = "spi2";
                                allwinner,drive = <SUN4I_PINCTRL_10_MA>;
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;