Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: dts: ti: verdin-am62: Improve spi1 chip-select pinctrl

Verdin SPI_1 interface has a dedicated hardware controlled chip select
that is currently configured in the same pinctrl group as MISO/MOSI/CLK,
however it is possible that it can be used only as a standard GPIO be it
a chip select or not.

To maximize flexibility and avoid duplication in the carrier board dts
files move the SPI_1 CS in a dedicated pinctrl and also adds an
additional pinctrl to simplify using SPI_1 CS as a GPIO.

Signed-off-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20231205184605.35225-2-francesco@dolcini.it
Signed-off-by: Nishanth Menon <nm@ti.com>

authored by

Joao Paulo Goncalves and committed by
Nishanth Menon
fcb33593 fecdf6de

+15 -2
+15 -2
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
··· 233 233 >; 234 234 }; 235 235 236 + /* Verdin SPI_1 CS as GPIO */ 237 + pinctrl_qspi1_io4_gpio: main-gpio0-7-default-pins { 238 + pinctrl-single,pins = < 239 + AM62X_IOPAD(0x001c, PIN_INPUT, 7) /* (J23) OSPI0_D4.GPIO0_7 */ /* SODIMM 202 */ 240 + >; 241 + }; 242 + 236 243 /* Verdin QSPI_1_CS# as GPIO (conflict with Verdin QSPI_1 interface) */ 237 244 pinctrl_qspi1_cs_gpio: main-gpio0-11-default-pins { 238 245 pinctrl-single,pins = < ··· 606 599 pinctrl_spi1: main-spi1-default-pins { 607 600 pinctrl-single,pins = < 608 601 AM62X_IOPAD(0x0020, PIN_INPUT, 1) /* (J25) OSPI0_D5.SPI1_CLK */ /* SODIMM 196 */ 609 - AM62X_IOPAD(0x001c, PIN_INPUT, 1) /* (J23) OSPI0_D4.SPI1_CS0 */ /* SODIMM 202 */ 610 602 AM62X_IOPAD(0x0024, PIN_INPUT, 1) /* (H25) OSPI0_D6.SPI1_D0 */ /* SODIMM 200 */ 611 603 AM62X_IOPAD(0x0028, PIN_INPUT, 1) /* (J22) OSPI0_D7.SPI1_D1 */ /* SODIMM 198 */ 604 + >; 605 + }; 606 + 607 + /* Verdin SPI_1 CS */ 608 + pinctrl_spi1_cs0: main-spi1-cs0-default-pins { 609 + pinctrl-single,pins = < 610 + AM62X_IOPAD(0x001c, PIN_INPUT, 1) /* (J23) OSPI0_D4.SPI1_CS0 */ /* SODIMM 202 */ 612 611 >; 613 612 }; 614 613 ··· 1291 1278 /* Verdin SPI_1 */ 1292 1279 &main_spi1 { 1293 1280 pinctrl-names = "default"; 1294 - pinctrl-0 = <&pinctrl_spi1>; 1281 + pinctrl-0 = <&pinctrl_spi1>, <&pinctrl_spi1_cs0>; 1295 1282 ti,pindir-d0-out-d1-in; 1296 1283 status = "disabled"; 1297 1284 };