]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: tegra114: Preserve SPI mode bits in def_command1_reg
authorVishwaroop A <va@nvidia.com>
Wed, 4 Feb 2026 14:12:12 +0000 (14:12 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 5 Feb 2026 19:29:36 +0000 (19:29 +0000)
commita0a75b40c919b9f6d3a0b6c978e6ccf344c1be5a
tree735517eba4f1fbb919b692a6c5c832bf618bcdbe
parent41d9a6795b95d6ea28439ac1e9ce8c95bbca20fc
spi: tegra114: Preserve SPI mode bits in def_command1_reg

The COMMAND1 register bits [29:28] set the SPI mode, which controls
the clock idle level. When a transfer ends, tegra_spi_transfer_end()
writes def_command1_reg back to restore the default state, but this
register value currently lacks the mode bits. This results in the
clock always being configured as idle low, breaking devices that
need it high.

Fix this by storing the mode bits in def_command1_reg during setup,
to prevent this field from always being cleared.

Fixes: f333a331adfa ("spi/tegra114: add spi driver")
Signed-off-by: Vishwaroop A <va@nvidia.com>
Link: https://patch.msgid.link/20260204141212.1540382-1-va@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-tegra114.c