Skip to contentSkip to conversation

spi:Add Freescale DSPI driver for Vybrid VF610 platform

PATCH Superseded Chao Fu 3 participants 11 messages Jul 8, 2013 – Jul 9, 2013

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Chao Fu

author
#0 lore raw

PATCH 1/3 spi:Add Freescale DSPI driver for Vybrid VF610 platform

From: Chao Fu <[email protected]>

The serial peripheral interface (SPI) module implemented on Freescale Vybrid platform provides a synchronous serial bus for communication between Vybrid and the external peripheral device. The SPI supports full-duplex, three-wire synchronous transfer, has TX/RX FIFO with depth of four entries.

This driver is the SPI master mode driver and has been tested on Vybrid VF610TWR board.

---
 drivers/spi/Kconfig        |   6 +
 drivers/spi/Makefile       |   1 +
 drivers/spi/spi-fsl-dspi.c | 675 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 682 insertions(+)
 create mode 100644 drivers/spi/spi-fsl-dspi.c
drivers/spi/Kconfig +6 -0
index 89cbbab..068715d 100644
@@ -248,6 +248,12 @@ config SPI_FSL_SPI
 	  This also enables using the Aeroflex Gaisler GRLIB SPI controller in
 	  master mode.
 
+config SPI_FSL_DSPI
+         tristate "Freescale DSPI controller"
+         help
+         This enables support for the Freescale DSPI controller in master
+         mode.
+
 config SPI_FSL_ESPI
 	bool "Freescale eSPI controller"
 	depends on FSL_SOC
drivers/spi/Makefile +1 -0
index 33f9c09..78416fd 100644
@@ -31,6 +31,7 @@ obj-$(CONFIG_SPI_EP93XX)		+= spi-ep93xx.o
 obj-$(CONFIG_SPI_FALCON)		+= spi-falcon.o
 obj-$(CONFIG_SPI_FSL_CPM)		+= spi-fsl-cpm.o
 obj-$(CONFIG_SPI_FSL_LIB)		+= spi-fsl-lib.o
+obj-$(CONFIG_SPI_FSL_DSPI)		+= spi-fsl-dspi.o
 obj-$(CONFIG_SPI_FSL_ESPI)		+= spi-fsl-espi.o
 obj-$(CONFIG_SPI_FSL_SPI)		+= spi-fsl-spi.o
 obj-$(CONFIG_SPI_GPIO)			+= spi-gpio.o
drivers/spi/spi-fsl-dspi.c new file +675 -0

675 lines not on this page · raw message

Signature · 1 line
1.8.0
author
#1 lore raw

PATCH 2/3 ARM:dts: vf610: Add DSPI nodes

From: Chao Fu <[email protected]>

Add Freescale DSPI node into vf610 dts.

---
 arch/arm/boot/dts/vf610.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/vf610.dtsi +11 -0
index e1eb7da..fc80f4a 100644
@@ -87,6 +87,17 @@
 				arm,tag-latency = <2 2 2>;
 			};
 
+			dspi0: dspi0 at 4002c000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "fsl,vf610-dspi";
+				reg = <0x4002c000 0x1000>;
+				interrupts = <0 67 0x04>;
+				clocks = <&clks VF610_CLK_DSPI0>;
+				clock-names = "dspi";
+				status = "disabled";
+			};
+
 			uart0: serial at 40027000 {
 				compatible = "fsl,vf610-lpuart";
 				reg = <0x40027000 0x1000>;
Signature · 1 line
1.8.0
maintainer
#2 lore raw

PATCH 2/3 ARM:dts: vf610: Add DSPI nodes

Quoted 5 lines · Chao Fu

From: Chao Fu <[email protected]>

Add Freescale DSPI node into vf610 dts.

This should be fine to merge via arm-soc, it's no real dependency on the
driver itself or driver specific bindings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130708/6012ee64/attachment.sig>

author
#3 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

In reply to Chao Fu

From: Chao Fu <[email protected]>

This patch enables DSPI0 and at26df081a flash device for Vybrid VF610 TOWER board.

---
 arch/arm/boot/dts/vf610-twr.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/vf610-twr.dts +22 -0
index b3905f5..bc5bf9d 100644
@@ -36,6 +36,28 @@
 
 };
 
+&dspi0 {
+	spi-num-chipselects = <1>;
+	bus-num = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_dspi0_1>;
+	status = "okay";
+
+	sflash: at26df081a at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "atmel,at26df081a";
+		spi-max-frequency = <16000000>;
+		spi-cpol;
+		spi-cpha;
+		dspi,ctar-dbr = <0>;
+		dspi,ctar-pbr = <0>;
+		reg = <0>;
+		linux,modalias = "m25p80";
+		modal = "at26df081a";
+	};
+};
+
 &fec0 {
 	phy-mode = "rmii";
 	pinctrl-names = "default";
Signature · 1 line
1.8.0
maintainer
#4 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 3 lines · Chao Fu

From: Chao Fu <[email protected]>

This patch enables DSPI0 and at26df081a flash device for Vybrid VF610 TOWER board.

This should be fine to merge via arm-soc, it's no real dependency on the
actual SPI driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130708/b9f66886/attachment.sig>

#5 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 9 lines · Mark Brown
Quoted 3 lines · Chao Fu

From: Chao Fu <[email protected]>

This patch enables DSPI0 and at26df081a flash device for Vybrid VF610 TOWER board.

This should be fine to merge via arm-soc, it's no real dependency on the actual SPI driver.

It has dependency on the actual SPI driver where the DT bindings are defined, so I would only take the patches after the driver parts gets accepted.

Shawn

maintainer
#6 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 8 lines · Shawn Guo
Quoted 2 lines · Mark Brown

This should be fine to merge via arm-soc, it's no real dependency on the actual SPI driver.

It has dependency on the actual SPI driver where the DT bindings are defined, so I would only take the patches after the driver parts gets accepted.

The bindings are all totally generic ones for a SPI controller, there's
nothing controversial or even device specific about them so I'm happy to
say the bindings are fine as-is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130709/06099851/attachment.sig>

#7 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 6 lines · Mark Brown
Quoted 4 lines · Shawn Guo
Quoted 2 lines · Mark Brown

This should be fine to merge via arm-soc, it's no real dependency on the actual SPI driver.

Quoted 7 lines
Quoted 3 lines

It has dependency on the actual SPI driver where the DT bindings are defined, so I would only take the patches after the driver parts gets accepted.

The bindings are all totally generic ones for a SPI controller, there's nothing controversial or even device specific about them so I'm happy to say the bindings are fine as-is.

Am I missing something? I do not even see a bindings doc in patch #1. How can I think the bindings are fine?

Shawn

maintainer
#8 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 8 lines · Shawn Guo
Quoted 3 lines · Mark Brown

The bindings are all totally generic ones for a SPI controller, there's nothing controversial or even device specific about them so I'm happy to say the bindings are fine as-is.

Am I missing something? I do not even see a bindings doc in patch #1. How can I think the bindings are fine?

Hrm, I was sure I was seeing one... though in any case there's nothing
here except for interrupt and DMA hookup so any additional properties
aren't going to affect this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130709/6540129f/attachment.sig>

#9 lore raw

PATCH 3/3 ARM:dts:vf610-twr:Enable DSPI0 devices and Flash at26df081a

Quoted 7 lines · Mark Brown
Quoted 5 lines · Shawn Guo
Quoted 3 lines · Mark Brown

The bindings are all totally generic ones for a SPI controller, there's nothing controversial or even device specific about them so I'm happy to say the bindings are fine as-is.

Quoted 6 lines
Quoted 2 lines

Am I missing something? I do not even see a bindings doc in patch #1. How can I think the bindings are fine?

Hrm, I was sure I was seeing one... though in any case there's nothing here except for interrupt and DMA hookup so any additional properties aren't going to affect this patch.

You are probably talking about patch #2. But this patch does add two properties "spi-num-chipselects" and "bus-num".

Shawn

maintainer
#10 lore raw

PATCH 1/3 spi:Add Freescale DSPI driver for Vybrid VF610 platform

In reply to Chao Fu
Quoted 4 lines · Chao Fu
 drivers/spi/Kconfig        |   6 +
 drivers/spi/Makefile       |   1 +
 drivers/spi/spi-fsl-dspi.c | 675 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 682 insertions(+)

There is no binding documentation here. Binding documentation is
mandatory for any new bindings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130709/46480b04/attachment.sig>