spi: fsl_dspi: Introduce DT bindings for CS-to-SCK and SCK-to-CS delays
PATCH 1/1 spi: fsl_dspi: Introduce DT bindings for CS-to-SCK and SCK-to-CS delays
From: Vladimir Oltean <[email protected]>
Communication with some SPI slaves just won't cut it if these delays (before the beginning, and after the end of a transfer) are not added to the Chip Select signal.
These are a straight copy from Linux:Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt drivers/spi/spi-fsl-dspi.c
Signed-off-by Vladimir Oltean <[email protected]>
--- doc/device-tree-bindings/spi/spi-mcf-dspi.txt | 4 ++ drivers/spi/fsl_dspi.c | 54 ++++++++++++++++++- include/fsl_dspi.h | 1 + 3 files changed, 58 insertions(+), 1 deletion(-)
doc/device-tree-bindings/spi/spi-mcf-dspi.txt +4 -0
@@ -13,6 +13,10 @@ Optional properties: - ctar-params: CTAR0 to 7 register configuration, as an array of 8 integer fields for each register, where each register is defined as: <fmsz, pcssck, pasc, pdt, cssck, asc, dt, br>. +- fsl,spi-cs-sck-delay: a delay in nanoseconds between activating chip + select and the start of clock signal, at the start of a transfer. +- fsl,spi-sck-cs-delay: a delay in nanoseconds between stopping the clock + signal and deactivating chip select, at the end of a transfer. Example:
drivers/spi/fsl_dspi.c +53 -1
84 lines not on this page · raw message
include/fsl_dspi.h +1 -0
@@ -94,6 +94,7 @@ struct dspi {#define DSPI_CTAR_ASC (x) (((x) & 0x0F) << 8)#define DSPI_CTAR_DT (x) (((x) & 0x0F) << 4)#define DSPI_CTAR_BR (x) ((x) & 0x0F) +#define DSPI_CTAR_SCALE_BITS 0xf/* Status */ #define DSPI_SR_TCF 0x80000000
Signature · 1 line
2.17.1