arm64: dts: ti: k3-am69-aquila: fix SPI hardware CS issue
cover arm64: dts: ti: k3-am69-aquila: fix SPI hardware CS issue
From: Vitor Soares <[email protected]>
Hardware chip select does not work correctly on main_spi0 and main_spi2 controllers on the Aquila AM69 module. Testing revealed main_spi2 loses CS state during runtime PM suspend, while main_spi0 cannot drive CS HIGH when bus is idle. This series switches both controllers to use GPIO-based chip select instead.
Vitor Soares (2):
arm64: dts: ti: k3-am69-aquila: change main_spi0/2 CS to GPIO mode
arm64: dts: ti: k3-am69-aquila-clover: change main_spi2 CS0 to GPIO
mode
arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts | 3 ++- arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/2 arm64: dts: ti: k3-am69-aquila: change main_spi0/2 CS to GPIO mode
From: Vitor Soares <[email protected]>
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.
--- arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am69-aquila.dtsi +4 -2
@@ -479,7 +479,7 @@ J784S4_IOPAD(0x0dc, PIN_OUTPUT, 0) /* (AM36) SPI0_D1 */ /* AQUILA D17 */ /* 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 */ >; };
@@ -495,7 +495,7 @@ J784S4_IOPAD(0x0ac, PIN_OUTPUT, 10) /* (AE34) MCASP0_AXR15.SPI2_D1 */ /* AQUILA /* 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 */ >; };
@@ -1204,6 +1204,7 @@ &main_sdhci1 { &main_spi0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_main_spi0>, <&pinctrl_main_spi0_cs0>; + cs-gpios = <&main_gpio0 51 GPIO_ACTIVE_LOW>; status = "disabled"; };
@@ -1211,6 +1212,7 @@ &main_spi0 { &main_spi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_main_spi2>, <&pinctrl_main_spi2_cs0>; + cs-gpios = <&main_gpio0 39 GPIO_ACTIVE_LOW>; status = "disabled"; };
Signature · 1 line
2.52.0
PATCH 2/2 arm64: dts: ti: k3-am69-aquila-clover: change main_spi2 CS0 to GPIO mode
In reply to Vitor SoaresFrom: Vitor Soares <[email protected]>
Change CS0 from hardware chip select to GPIO-based chip select to align with the base aquila device tree configuration.
--- arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am69-aquila-clover.dts +2 -1
@@ -208,7 +208,8 @@ &main_spi2 { pinctrl-0 = <&pinctrl_main_spi2>, <&pinctrl_main_spi2_cs0>, <&pinctrl_gpio_05>; - cs-gpios = <0>, <&wkup_gpio0 29 GPIO_ACTIVE_LOW>; + cs-gpios = <&main_gpio0 39 GPIO_ACTIVE_LOW>, + <&wkup_gpio0 29 GPIO_ACTIVE_LOW>; status = "okay"; tpm@1 {
Signature · 1 line
2.52.0
Quoted 7 lines · Vitor Soares
From: Vitor Soares <[email protected]>
Hardware chip select does not work correctly on
main_spi0andmain_spi2controllers on the Aquila AM69 module. Testing revealedmain_spi2loses CS state during runtime PM suspend, whilemain_spi0cannot drive CS HIGH when bus is idle. This series switches both controllers to use GPIO-based chip select instead.
Hi Vitor Soares,
Quoted 9 lines · Vitor Soares
From: Vitor Soares <[email protected]>
Hardware chip select does not work correctly on
main_spi0andmain_spi2controllers on the Aquila AM69 module. Testing revealedmain_spi2loses CS state during runtime PM suspend, whilemain_spi0cannot drive CS HIGH when bus is idle. This series switches both controllers to use GPIO-based chip select instead.[...]
I have applied the following to branch ti-k3-dts-next on [1]. Thank you!
[1/2] arm64: dts: ti: k3-am69-aquila: change main_spi0/2 CS to GPIO mode
commit: 78a123f45a7e9ac2a59f0eff8a37d31773e7a021
[2/2] arm64: dts: ti: k3-am69-aquila-clover: change main_spi2 CS0 to GPIO mode
commit: 319fff9c7d620af83d8ab67050a54f63f16ae4e8All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource