ARM: sunxi: dt: Split the SPI pinctrl groups
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>
This commit is contained in:
@@ -201,7 +201,8 @@
|
|||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi0_pins_a>;
|
pinctrl-0 = <&spi0_pins_a>,
|
||||||
|
<&spi0_cs0_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,8 @@
|
|||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi0_pins_a>;
|
pinctrl-0 = <&spi0_pins_a>,
|
||||||
|
<&spi0_cs0_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -825,28 +825,56 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
spi0_pins_a: spi0@0 {
|
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,function = "spi0";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi1_pins_a: spi1@0 {
|
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,function = "spi1";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi2_pins_a: spi2@0 {
|
spi2_pins_a: spi2@0 {
|
||||||
allwinner,pins = "PB14", "PB15", "PB16", "PB17";
|
allwinner,pins = "PC20", "PC21", "PC22";
|
||||||
allwinner,function = "spi2";
|
allwinner,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi2_pins_b: spi2@1 {
|
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,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
|||||||
@@ -192,7 +192,9 @@
|
|||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi0_pins_a>;
|
pinctrl-0 = <&spi0_pins_a>,
|
||||||
|
<&spi0_cs0_pins_a>,
|
||||||
|
<&spi0_cs1_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,9 @@
|
|||||||
|
|
||||||
&spi0 {
|
&spi0 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi0_pins_a>;
|
pinctrl-0 = <&spi0_pins_a>,
|
||||||
|
<&spi0_cs0_pins_a>,
|
||||||
|
<&spi0_cs1_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,8 @@
|
|||||||
|
|
||||||
&spi2 {
|
&spi2 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi2_pins_b>;
|
pinctrl-0 = <&spi2_pins_b>,
|
||||||
|
<&spi2_cs0_pins_b>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -245,13 +245,15 @@
|
|||||||
|
|
||||||
&spi1 {
|
&spi1 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi1_pins_a>;
|
pinctrl-0 = <&spi1_pins_a>,
|
||||||
|
<&spi1_cs0_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi2 {
|
&spi2 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&spi2_pins_a>;
|
pinctrl-0 = <&spi2_pins_a>,
|
||||||
|
<&spi2_cs0_pins_a>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -945,28 +945,63 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
spi0_pins_a: spi0@0 {
|
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,function = "spi0";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi1_pins_a: spi1@0 {
|
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,function = "spi1";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi2_pins_a: spi2@0 {
|
spi2_pins_a: spi2@0 {
|
||||||
allwinner,pins = "PC19", "PC20", "PC21", "PC22";
|
allwinner,pins = "PC20", "PC21", "PC22";
|
||||||
allwinner,function = "spi2";
|
allwinner,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
};
|
};
|
||||||
|
|
||||||
spi2_pins_b: spi2@1 {
|
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,function = "spi2";
|
||||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||||
|
|||||||
Reference in New Issue
Block a user