spi: imx: support word delay
authorJonas Rebmann <jre@pengutronix.de>
Wed, 13 Nov 2024 12:18:32 +0000 (13:18 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 13 Nov 2024 15:40:39 +0000 (15:40 +0000)
commita3bb4e663df318b232746478e7b191bcf6e3af40
treec57cce4618fa72e54e5b86cf3e468b651b50d7aa
parent7b94af24a7a4d12a76183f1b2f0d363d2c9ced43
spi: imx: support word delay

Implement support for the word delay feature of i.MX51 (and onwards) via
the ECSPI interface.

Convert the requested delay to SPI cycles and account for an extra
inter-word delay inserted by the controller in addition to the requested
number of cycles, which was observed when testing this patch.

Disable dynamic burst when word delay is set. As the configurable delay
period in the controller is inserted after bursts, the burst length must
equal the word length.

Account for word delay in the transfer time estimation for
polling_limit_us.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20241113-imx-spi-word-delay-v2-2-2b65b737bf29@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c