linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] spi: imx: support word delay in ecspi
@ 2024-11-07 15:35 Jonas Rebmann
  2024-11-07 15:35 ` [PATCH 1/2] spi: imx: pass struct spi_transfer to prepare_transfer() Jonas Rebmann
  2024-11-07 15:35 ` [PATCH 2/2] spi: imx: support word delay Jonas Rebmann
  0 siblings, 2 replies; 5+ messages in thread
From: Jonas Rebmann @ 2024-11-07 15:35 UTC (permalink / raw)
  To: Mark Brown, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-spi, imx, linux-arm-kernel, linux-kernel, devicetree,
	kernel, Jonas Rebmann

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.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
Jonas Rebmann (2):
      spi: imx: pass struct spi_transfer to prepare_transfer()
      spi: imx: support word delay

 drivers/spi/spi-imx.c | 106 ++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 90 insertions(+), 16 deletions(-)
---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241009-imx-spi-word-delay-21dc01f098cc

Best regards,
-- 
Jonas Rebmann <jre@pengutronix.de>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-08  1:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 15:35 [PATCH 0/2] spi: imx: support word delay in ecspi Jonas Rebmann
2024-11-07 15:35 ` [PATCH 1/2] spi: imx: pass struct spi_transfer to prepare_transfer() Jonas Rebmann
2024-11-07 15:35 ` [PATCH 2/2] spi: imx: support word delay Jonas Rebmann
2024-11-07 20:01   ` kernel test robot
2024-11-08  1:02   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).