]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: ti: k3-am69-aquila: Change main_spi0/2 CS to GPIO mode
authorVitor Soares <vitor.soares@toradex.com>
Mon, 12 Jan 2026 17:53:46 +0000 (17:53 +0000)
committerNishanth Menon <nm@ti.com>
Wed, 14 Jan 2026 17:03:45 +0000 (11:03 -0600)
Hardware chip select does not work correctly on main_spi0 and
main_spi2 controllers. Testing shows main_spi2 loses CS state
during runtime PM suspend, while main_spi0 cannot drive CS HIGH
when bus is idle.

Use GPIO-based chip select for both controllers.

Fixes: 39ac6623b1d8 ("arm64: dts: ti: Add Aquila AM69 Support")
Cc: stable@vger.kernel.org
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.msgid.link/20260112175350.79270-2-ivitro@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi

index 0866eb8a6f34825b6d1c73cf6721190f81ca9b55..5119baf62a4c23621c318b4505e628d4f4141b2d 100644 (file)
        /* Aquila SPI_2 CS */
        pinctrl_main_spi0_cs0: main-spi0-cs0-default-pins {
                pinctrl-single,pins = <
-                       J784S4_IOPAD(0x0cc, PIN_OUTPUT, 0) /* (AM37) SPI0_CS0 */ /* AQUILA D16 */
+                       J784S4_IOPAD(0x0cc, PIN_OUTPUT, 7) /* (AM37) SPI0_CS0.GPIO0_51 */ /* AQUILA D16 */
                >;
        };
 
        /* Aquila SPI_1 CS */
        pinctrl_main_spi2_cs0: main-spi2-cs0-default-pins {
                pinctrl-single,pins = <
-                       J784S4_IOPAD(0x09c, PIN_OUTPUT, 10) /* (AF35) MCASP0_AXR11.SPI2_CS1 */ /* AQUILA D9 */
+                       J784S4_IOPAD(0x09c, PIN_OUTPUT, 7) /* (AF35) MCASP0_AXR11.GPIO0_39 */ /* AQUILA D9 */
                >;
        };
 
 &main_spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_main_spi0>, <&pinctrl_main_spi0_cs0>;
+       cs-gpios = <&main_gpio0 51 GPIO_ACTIVE_LOW>;
        status = "disabled";
 };
 
 &main_spi2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_main_spi2>, <&pinctrl_main_spi2_cs0>;
+       cs-gpios = <&main_gpio0 39 GPIO_ACTIVE_LOW>;
        status = "disabled";
 };