spi: imx: support word delay in ecspi
authorMark Brown <broonie@kernel.org>
Thu, 14 Nov 2024 11:43:39 +0000 (11:43 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 14 Nov 2024 11:43:39 +0000 (11:43 +0000)
commit26470a2e87a6fc40750f4bfe962519e9ae9a9e72
tree227ddbbbb68ff2f6cda79890d88e2586360303eb
parentf3c605147741e0ad8f1c51a7decef2040debfd16
parenta3bb4e663df318b232746478e7b191bcf6e3af40
spi: imx: support word delay in ecspi

Merge series from Jonas Rebmann <jre@pengutronix.de>:

The i.MX SPI controller supports inserting a configurable delay between
subsequent words, which is needed for some slower devices that couldn't
keep up otherwise.

This patch series introduces support for the word delay parameters for
i.MX51 onwards.

The SPI clock (CSRC=0) was chosen as the clock source over the also
available 32.768 KHz Low-Frequency Reference Clock (CSRC=1). The sample
period control bits (SAMPLE_PERIOD) are set to the selected word delay
converted to SPI clock cycles. A deviation from the requested number of
wait cycles and the actual word delay was observed via both software
timings and oscilloscope measurements and accounted for.

The Chip Select Delay Control bits in the Sample Period Control Register
remain zero.

Behaviour on i.MX35 and earlier, where the CSPI interface is used,
remains unchanged.