arm64: dts: qcom: sm8250: add pinctrl for SPI using GPIO as a CS
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 10 Feb 2021 13:34:57 +0000 (16:34 +0300)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Thu, 18 Mar 2021 14:35:35 +0000 (09:35 -0500)
GENI SPI controller shows several issues if it manages the CS on its own
(see 37dd4b777942 ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to
use GPIO for CS")) for the details. Provide pinctrl entries for SPI
controllers using the same CS pin but in GPIO mode.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20210210133458.1201066-4-dmitry.baryshkov@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
arch/arm64/boot/dts/qcom/sm8250.dtsi

index 39d50d0..9fe1d39 100644 (file)
                                function = "qup0";
                        };
 
+                       qup_spi0_cs_gpio: qup-spi0-cs-gpio {
+                               pins = "gpio31";
+                               function = "gpio";
+                       };
+
                        qup_spi0_data_clk: qup-spi0-data-clk {
                                pins = "gpio28", "gpio29",
                                       "gpio30";
                                function = "qup1";
                        };
 
+                       qup_spi1_cs_gpio: qup-spi1-cs-gpio {
+                               pins = "gpio7";
+                               function = "gpio";
+                       };
+
                        qup_spi1_data_clk: qup-spi1-data-clk {
                                pins = "gpio4", "gpio5",
                                       "gpio6";
                                function = "qup2";
                        };
 
+                       qup_spi2_cs_gpio: qup-spi2-cs-gpio {
+                               pins = "gpio118";
+                               function = "gpio";
+                       };
+
                        qup_spi2_data_clk: qup-spi2-data-clk {
                                pins = "gpio115", "gpio116",
                                       "gpio117";
                                function = "qup3";
                        };
 
+                       qup_spi3_cs_gpio: qup-spi3-cs-gpio {
+                               pins = "gpio122";
+                               function = "gpio";
+                       };
+
                        qup_spi3_data_clk: qup-spi3-data-clk {
                                pins = "gpio119", "gpio120",
                                       "gpio121";
                                function = "qup4";
                        };
 
+                       qup_spi4_cs_gpio: qup-spi4-cs-gpio {
+                               pins = "gpio11";
+                               function = "gpio";
+                       };
+
                        qup_spi4_data_clk: qup-spi4-data-clk {
                                pins = "gpio8", "gpio9",
                                       "gpio10";
                                function = "qup5";
                        };
 
+                       qup_spi5_cs_gpio: qup-spi5-cs-gpio {
+                               pins = "gpio15";
+                               function = "gpio";
+                       };
+
                        qup_spi5_data_clk: qup-spi5-data-clk {
                                pins = "gpio12", "gpio13",
                                       "gpio14";
                                function = "qup6";
                        };
 
+                       qup_spi6_cs_gpio: qup-spi6-cs-gpio {
+                               pins = "gpio19";
+                               function = "gpio";
+                       };
+
                        qup_spi6_data_clk: qup-spi6-data-clk {
                                pins = "gpio16", "gpio17",
                                       "gpio18";
                                function = "qup7";
                        };
 
+                       qup_spi7_cs_gpio: qup-spi7-cs-gpio {
+                               pins = "gpio23";
+                               function = "gpio";
+                       };
+
                        qup_spi7_data_clk: qup-spi7-data-clk {
                                pins = "gpio20", "gpio21",
                                       "gpio22";
                                function = "qup8";
                        };
 
+                       qup_spi8_cs_gpio: qup-spi8-cs-gpio {
+                               pins = "gpio27";
+                               function = "gpio";
+                       };
+
                        qup_spi8_data_clk: qup-spi8-data-clk {
                                pins = "gpio24", "gpio25",
                                       "gpio26";
                                function = "qup9";
                        };
 
+                       qup_spi9_cs_gpio: qup-spi9-cs-gpio {
+                               pins = "gpio128";
+                               function = "gpio";
+                       };
+
                        qup_spi9_data_clk: qup-spi9-data-clk {
                                pins = "gpio125", "gpio126",
                                       "gpio127";
                                function = "qup10";
                        };
 
+                       qup_spi10_cs_gpio: qup-spi10-cs-gpio {
+                               pins = "gpio132";
+                               function = "gpio";
+                       };
+
                        qup_spi10_data_clk: qup-spi10-data-clk {
                                pins = "gpio129", "gpio130",
                                       "gpio131";
                                function = "qup11";
                        };
 
+                       qup_spi11_cs_gpio: qup-spi11-cs-gpio {
+                               pins = "gpio63";
+                               function = "gpio";
+                       };
+
                        qup_spi11_data_clk: qup-spi11-data-clk {
                                pins = "gpio60", "gpio61",
                                       "gpio62";
                                function = "qup12";
                        };
 
+                       qup_spi12_cs_gpio: qup-spi12-cs-gpio {
+                               pins = "gpio35";
+                               function = "gpio";
+                       };
+
                        qup_spi12_data_clk: qup-spi12-data-clk {
                                pins = "gpio32", "gpio33",
                                       "gpio34";
                                function = "qup13";
                        };
 
+                       qup_spi13_cs_gpio: qup-spi13-cs-gpio {
+                               pins = "gpio39";
+                               function = "gpio";
+                       };
+
                        qup_spi13_data_clk: qup-spi13-data-clk {
                                pins = "gpio36", "gpio37",
                                       "gpio38";
                                function = "qup14";
                        };
 
+                       qup_spi14_cs_gpio: qup-spi14-cs-gpio {
+                               pins = "gpio43";
+                               function = "gpio";
+                       };
+
                        qup_spi14_data_clk: qup-spi14-data-clk {
                                pins = "gpio40", "gpio41",
                                       "gpio42";
                                function = "qup15";
                        };
 
+                       qup_spi15_cs_gpio: qup-spi15-cs-gpio {
+                               pins = "gpio47";
+                               function = "gpio";
+                       };
+
                        qup_spi15_data_clk: qup-spi15-data-clk {
                                pins = "gpio44", "gpio45",
                                       "gpio46";
                                function = "qup16";
                        };
 
+                       qup_spi16_cs_gpio: qup-spi16-cs-gpio {
+                               pins = "gpio51";
+                               function = "gpio";
+                       };
+
                        qup_spi16_data_clk: qup-spi16-data-clk {
                                pins = "gpio48", "gpio49",
                                       "gpio50";
                                function = "qup17";
                        };
 
+                       qup_spi17_cs_gpio: qup-spi17-cs-gpio {
+                               pins = "gpio55";
+                               function = "gpio";
+                       };
+
                        qup_spi17_data_clk: qup-spi17-data-clk {
                                pins = "gpio52", "gpio53",
                                       "gpio54";
                                function = "qup18";
                        };
 
+                       qup_spi18_cs_gpio: qup-spi18-cs-gpio {
+                               pins = "gpio59";
+                               function = "gpio";
+                       };
+
                        qup_spi18_data_clk: qup-spi18-data-clk {
                                pins = "gpio56", "gpio57",
                                       "gpio58";
                                function = "qup19";
                        };
 
+                       qup_spi19_cs_gpio: qup-spi19-cs-gpio {
+                               pins = "gpio3";
+                               function = "gpio";
+                       };
+
                        qup_spi19_data_clk: qup-spi19-data-clk {
                                pins = "gpio0", "gpio1",
                                       "gpio2";