spi: tegra114: add support for TX and RX trimmers
authorSowjanya Komatineni <skomatineni@nvidia.com>
Tue, 14 May 2019 05:03:55 +0000 (22:03 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 15 May 2019 11:17:56 +0000 (12:17 +0100)
commit318dacbd049b447a5b45290b39f1c889b9cbde4d
treed9ae6433e75e125f0de28f19a850304064adfc95
parent9b76ef39b7fbc2ddb0869725f9745a402d93cce5
spi: tegra114: add support for TX and RX trimmers

Tegra SPI master controller has programmable trimmers to adjust the
data with respect to the clock.

These trimmers are programmed in TX_CLK_TAP_DELAY and RX_CLK_TAP_DELAY
fields of COMMAND2 register.

SPI TX trimmer is to adjust the outgoing data with respect to the
outgoing clock and SPI RX trimmer is to adjust the loopback clock with
respect to the incoming data from the slave device.

These trimmers vary based on trace lengths of the platform design for
each of the slaves on the SPI bus and optimal value programmed is from
the platform validation across PVT.

This patch adds support for configuring TX and RX clock delay trimmers
through the device tree properties.

Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-tegra114.c