spi: dw: Add support for RX sample delay register
authorLars Povlsen <lars.povlsen@microchip.com>
Mon, 24 Aug 2020 20:30:05 +0000 (22:30 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 8 Sep 2020 15:15:36 +0000 (16:15 +0100)
commitbac70b54ecb53b3d5af862dd4fcbaaad8f34ed23
treeb8c9116cf9dd75cc082f5027f72b65051f1a638a
parent2abaad678575acd54e9939e1174becd82ecc884b
spi: dw: Add support for RX sample delay register

This add support for the RX_SAMPLE_DLY register. If enabled in the
Designware IP, it allows tuning of the rx data signal by means of an
internal rx sample fifo.

The register is controlled by the rx-sample-delay-ns DT property,
which is defined per SPI slave as well on controller level.

The controller level rx-sample-delay-ns will apply to all slaves
without the property explicitly defined.

The register is located at offset 0xf0, and if the option is not
enabled in the IP, changing the register will have no effect. The
register will only be written if any slave defines a nonzero value
(after scaling by the clock period).

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
Link: https://lore.kernel.org/r/20200824203010.2033-2-lars.povlsen@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-core.c
drivers/spi/spi-dw.h