Skip to contentSkip to conversation

spi: sh-msiof: Configure MSIOF sync signal timing in device tree

PATCH Applied Yoshihiro Shimoda 2 participants 2 messages Dec 19, 2014 – Dec 24, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spi: sh-msiof: Configure MSIOF sync signal timing in device tree

The MSIOF controller has DTDL and SYNCDL in SITMDR1 register. So, this patch adds new properties like the following commit:
d0fb47a5237d8b9576113568bacfd27892308b62
(spi: fsl-espi: Configure FSL eSPI CSBEF and CSAFT)

---
Changes from v1:
- Remove properties for receive mode
- Change properties for transmit mode to use percentage values instead of register values
- Add actual code in the msiof driver

 Documentation/devicetree/bindings/spi/sh-msiof.txt |   16 +++++++
 drivers/spi/spi-sh-msiof.c                         |   47 ++++++++++++++++++++
 include/linux/spi/sh_msiof.h                       |    2 +
 3 files changed, 65 insertions(+)
Documentation/devicetree/bindings/spi/sh-msiof.txt +16 -0
index d11c372..4c388bb 100644
@@ -30,6 +30,22 @@ Optional properties:
 			 specifiers, one for transmission, and one for
 			 reception.
 - dma-names            : Must contain a list of two DMA names, "tx" and "rx".
+- renesas,dtdl         : delay sync signal (setup) in transmit mode.
+			 Must contain one of the following values:
+			 0   (no bit delay)
+			 50  (0.5-clock-cycle delay)
+			 100 (1-clock-cycle delay)
+			 150 (1.5-clock-cycle delay)
+			 200 (2-clock-cycle delay)
+
+- renesas,syncdl       : delay sync signal (hold) in transmit mode.
+			 Must contain one of the following values:
+			 0   (no bit delay)
+			 50  (0.5-clock-cycle delay)
+			 100 (1-clock-cycle delay)
+			 150 (1.5-clock-cycle delay)
+			 200 (2-clock-cycle delay)
+			 300 (3-clock-cycle delay)
 
 Optional properties, deprecated for soctype-specific bindings:
 - renesas,tx-fifo-size : Overrides the default tx fifo size given in words
drivers/spi/spi-sh-msiof.c +47 -0

71 lines not on this page · raw message

include/linux/spi/sh_msiof.h +2 -0
index 88a14d8..b087a85 100644
@@ -7,6 +7,8 @@ struct sh_msiof_spi_info {
 	u16 num_chipselect;
 	unsigned int dma_tx_id;
 	unsigned int dma_rx_id;
+	u32 dtdl;
+	u32 syncdl;
 };
 
 #endif /* __SPI_SH_MSIOF_H__ */
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 4 lines · Yoshihiro Shimoda

The MSIOF controller has DTDL and SYNCDL in SITMDR1 register. So, this patch adds new properties like the following commit:
d0fb47a5237d8b9576113568bacfd27892308b62
(spi: fsl-espi: Configure FSL eSPI CSBEF and CSAFT)

Applied, thanks.