Skip to contentSkip to conversation

Patch enables support for m25p64 SPI flash support on da850-EVM.

PATCH Superseded Manjunathappa, Prakash 3 participants 10 messages Apr 3, 2013 – Apr 16, 2013

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

v5 cover Patch enables support for m25p64 SPI flash support on da850-EVM.

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Applies on top of linux_davinci/master tree:
git://gitorious.org/linux-davinci/linux-davinci.git

Since v4:
Separate out chip_select pinmuxing so as to allow boards choose accordingly.

Since v3:
Minor nit, fix tabs and commit message of 2/5.

Since v2:
Fix compatible property DT naming convention.

Since v1:
Look for m25p64 instead of m25p80 flash chip and correct partition information. Dropped below accepted patch:
"spi/davinci: fix module build error"
Considered below missed out patch:
spi/davinci: add DT binding documentation

Manjunathappa, Prakash (4):
spi/davinci: no wildcards in DT compatible property
ARM: davinci: da850: add SPI1 DT node
ARM: davinci: da850: override SPI DT node device name
ARM: davinci: da850-evm: add SPI flash support

Murali Karicheri (1):
spi/davinci: add DT binding documentation

 .../devicetree/bindings/spi/spi-davinci.txt        |   51 ++++++++++++++++++++
 arch/arm/boot/dts/da850-evm.dts                    |   40 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi                       |   22 ++++++++
 arch/arm/mach-davinci/da8xx-dt.c                   |    1 +
 drivers/spi/spi-davinci.c                          |    4 +-
 5 files changed, 116 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-davinci.txt
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v5 1/5 spi/davinci: no wildcards in DT compatible property

Follow DT naming convention for compatible property of the blob. Use first chip name that introduced the specific version of the device.

---
 drivers/spi/spi-davinci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/spi/spi-davinci.c +2 -2
index 8234d22..2e8f24a 100644
@@ -776,10 +776,10 @@ rx_dma_failed:
 #if defined(CONFIG_OF)
 static const struct of_device_id davinci_spi_of_match[] = {
 	{
-		.compatible = "ti,dm644x-spi",
+		.compatible = "ti,dm6441-spi",
 	},
 	{
-		.compatible = "ti,da8xx-spi",
+		.compatible = "ti,da830-spi",
 		.data = (void *)SPI_VERSION_2,
 	},
 	{ },
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH v5 2/5 spi/davinci: add DT binding documentation

In reply to Manjunathappa, Prakash

From: Murali Karicheri <[email protected]>

Add binding documentation for spi-davinci module.

[prakash.pm at ti.com: Follow DT naming convention for compatible property]

---
Since v3:
Changed the commit message and fixed alignment issues.

 .../devicetree/bindings/spi/spi-davinci.txt        |   51 ++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-davinci.txt
Documentation/devicetree/bindings/spi/spi-davinci.txt new file +51 -0
new file mode 100644
index 0000000..6d0ac8d
@@ -0,0 +1,51 @@
+Davinci SPI controller device bindings
+
+Required properties:
+- #address-cells: number of cells required to define a chip select
+	address on the SPI bus. Should be set to 1.
+- #size-cells: should be zero.
+- compatible:
+	- "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
+	- "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
+- reg: Offset and length of SPI controller register space
+- num-cs: Number of chip selects
+- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
+	IP to the interrupt controller within the SoC. Possible values
+	are 0 and 1. Manual says one of the two possible interrupt
+	lines can be tied to the interrupt controller. Set this
+	based on a specifc SoC configuration.
+- interrupts: interrupt number mapped to CPU.
+- clocks: spi clk phandle
+
+Example of a NOR flash slave device (n25q032) connected to DaVinci
+SPI controller device over the SPI bus.
+
+spi0:spi at 20BF0000 {
+	#address-cells			= <1>;
+	#size-cells			= <0>;
+	compatible			= "ti,dm6446-spi";
+	reg				= <0x20BF0000 0x1000>;
+	num-cs				= <4>;
+	ti,davinci-spi-intr-line	= <0>;
+	interrupts			= <338>;
+	clocks				= <&clkspi>;
+
+	flash: n25q032 at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "st,m25p32";
+		spi-max-frequency = <25000000>;
+		reg = <0>;
+
+		partition at 0 {
+			label = "u-boot-spl";
+			reg = <0x0 0x80000>;
+			read-only;
+		};
+
+		partition at 1 {
+			label = "test";
+			reg = <0x80000 0x380000>;
+		};
+	};
+};
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH v5 3/5 ARM: davinci: da850: add SPI1 DT node

In reply to Manjunathappa, Prakash

Patch adds SPI1 DT node along with pinmux data.

---
Since v4:
Separate out chip_select pinmuxing so as to allow boards choose what to configure. Dropped unused CS1 and ENA pinmuxing.

 arch/arm/boot/dts/da850.dtsi |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
arch/arm/boot/dts/da850.dtsi +22 -0
index 3ec1bda..1d445cd 100644
@@ -62,6 +62,18 @@
 					0x10 0x00002200 0x0000ff00
 				>;
 			};
+			spi1_pins: pinmux_spi_pins {
+				pinctrl-single,bits = <
+					/* SIMO, SOMI, CLK */
+					0x14 0x00110100 0x00ff0f00
+				>;
+			};
+			spi1_cs0_pin: pinmux_spi1_cs0 {
+				pinctrl-single,bits = <
+					/* CS0 */
+					0x14 0x00000010 0x000000f0
+				>;
+			};
 		};
 		serial0: serial at 1c42000 {
 			compatible = "ns16550a";
@@ -107,6 +119,16 @@
 			reg = <0x21000 0x1000>;
 			status = "disabled";
 		};
+		spi1: spi at 1f0e000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "ti,da830-spi";
+			reg = <0x30e000 0x1000>;
+			num-cs = <4>;
+			ti,davinci-spi-intr-line = <1>;
+			interrupts = <56>;
+			status = "disabled";
+		};
 	};
 	nand_cs3 at 62000000 {
 		compatible = "ti,davinci-nand";
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH v5 4/5 ARM: davinci: da850: override SPI DT node device name

In reply to Manjunathappa, Prakash

Populate OF_DEV_AUXDATA with desired device name expected by spi-davinci driver. Without this clk_get of spi-davinci DT driver fails.

---
 arch/arm/mach-davinci/da8xx-dt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-davinci/da8xx-dt.c +1 -0
index 6b7a0a2..24146de 100644
@@ -40,6 +40,7 @@ static void __init da8xx_init_irq(void)
 struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "watchdog", NULL),
+	OF_DEV_AUXDATA("ti,da830-spi", 0x01f0e000, "spi_davinci.1", NULL),
 	{}
 };
 
Signature · 1 line
1.7.4.1
#5 lore raw

PATCH v5 5/5 ARM: davinci: da850-evm: add SPI flash support

In reply to Manjunathappa, Prakash

Enable m25p64 SPI flash support on da850-EVM. Also add partition information of SPI flash.

---
Since v2:
Fixed partition sizes.

Since v1:
Look for m25p64 instead of m25p80.
Corrected the filesystem partition information.

 arch/arm/boot/dts/da850-evm.dts |   40 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
arch/arm/boot/dts/da850-evm.dts +40 -0
index c359872..8fbde9a 100644
@@ -41,6 +41,46 @@
 		wdt: wdt at 1c21000 {
 			status = "okay";
 		};
+		spi1: spi at 1f0e000 {
+			status = "okay";
+			pinctrl-names = "default";
+			pinctrl-0 = <&spi1_pins &spi1_cs0_pin>;
+			flash: m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "m25p64";
+				spi-max-frequency = <30000000>;
+				reg = <0>;
+				partition at 0 {
+					label = "U-Boot-SPL";
+					reg = <0x00000000 0x00010000>;
+					read-only;
+				};
+				partition at 1 {
+					label = "U-Boot";
+					reg = <0x00010000 0x00080000>;
+					read-only;
+				};
+				partition at 2 {
+					label = "U-Boot-Env";
+					reg = <0x00090000 0x00010000>;
+					read-only;
+				};
+				partition at 3 {
+					label = "Kernel";
+					reg = <0x000a0000 0x00280000>;
+				};
+				partition at 4 {
+					label = "Filesystem";
+					reg = <0x00320000 0x00400000>;
+				};
+				partition at 5 {
+					label = "MAC-Address";
+					reg = <0x007f0000 0x00010000>;
+					read-only;
+				};
+			};
+		};
 	};
 	nand_cs3 at 62000000 {
 		status = "okay";
Signature · 1 line
1.7.4.1
#6 lore raw

v5 cover Patch enables support for m25p64 SPI flash support on da850-EVM.

In reply to Manjunathappa, Prakash

Hi Grant,

Quoted 4 lines · Prakash

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Could you please ack the driver(1/5) and documentation(2/5) changes so that Sekhar can merge the platform changes, he doesn't have any objection on this series.
http://marc.info/?l=linux-doc&m=136489750130615&w=1

Thanks,
Prakash

Quoted 41 lines

Applies on top of linux_davinci/master tree:
git://gitorious.org/linux-davinci/linux-davinci.git

Since v4:
Separate out chip_select pinmuxing so as to allow boards choose accordingly.

Since v3:
Minor nit, fix tabs and commit message of 2/5.

Since v2:
Fix compatible property DT naming convention.

Since v1:
Look for m25p64 instead of m25p80 flash chip and correct partition information. Dropped below accepted patch:
"spi/davinci: fix module build error"
Considered below missed out patch:
spi/davinci: add DT binding documentation

Manjunathappa, Prakash (4):
spi/davinci: no wildcards in DT compatible property
ARM: davinci: da850: add SPI1 DT node
ARM: davinci: da850: override SPI DT node device name
ARM: davinci: da850-evm: add SPI flash support

Murali Karicheri (1):
spi/davinci: add DT binding documentation

 .../devicetree/bindings/spi/spi-davinci.txt        |   51 ++++++++++++++++++++
 arch/arm/boot/dts/da850-evm.dts                    |   40 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi                       |   22 ++++++++
 arch/arm/mach-davinci/da8xx-dt.c                   |    1 +
 drivers/spi/spi-davinci.c                          |    4 +-
 5 files changed, 116 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-davinci.txt
Signature · 1 line
1.7.4.1
#7 lore raw

v5 cover Patch enables support for m25p64 SPI flash support on da850-EVM.

Quoted 8 lines · Prakash

Hi Grant,

Quoted 4 lines · Prakash

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Quoted 4 lines

Could you please ack the driver(1/5) and documentation(2/5) changes so that Sekhar can merge the platform changes, he doesn't have any objection on this series.
http://marc.info/?l=linux-doc&m=136489750130615&w=1

I am planning to queue these patches for ARM-SoC today. Grant has not acked these but 1/5 just fixes the binding name to not use wild cards and 2/5 just documents existing bindings and is something that should have been merge last merge window itself (when the bindings were accepted). So, the patches pending on Grant's ack seem very low risk to me and we are much delayed already to wait further.

Thanks,
Sekhar

#8 lore raw

v5 cover Patch enables support for m25p64 SPI flash support on da850-EVM.

Quoted 14 lines · Sekhar Nori
Quoted 8 lines · Prakash

Hi Grant,

Quoted 4 lines · Prakash

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Quoted 4 lines

Could you please ack the driver(1/5) and documentation(2/5) changes so that Sekhar can merge the platform changes, he doesn't have any objection on this series.
http://marc.info/?l=linux-doc&m=136489750130615&w=1

Quoted 6 lines

I am planning to queue these patches for ARM-SoC today. Grant has not acked these but 1/5 just fixes the binding name to not use wild cards and 2/5 just documents existing bindings and is something that should have been merge last merge window itself (when the bindings were accepted). So, the patches pending on Grant's ack seem very low risk to me and we are much delayed already to wait further.

For both of those patches:

#9 lore raw

v5 cover Patch enables support for m25p64 SPI flash support on da850-EVM.

Quoted 22 lines · Grant Likely
Quoted 14 lines · Sekhar Nori
Quoted 8 lines · Prakash

Hi Grant,

Quoted 4 lines · Prakash

Testing information:
da850-evm comes with partitions specified in DT blob.
Able to mount/umount and create/delete files on filesystem partition.

Quoted 4 lines

Could you please ack the driver(1/5) and documentation(2/5) changes so that Sekhar can merge the platform changes, he doesn't have any objection on this series.
http://marc.info/?l=linux-doc&m=136489750130615&w=1

Quoted 6 lines

I am planning to queue these patches for ARM-SoC today. Grant has not acked these but 1/5 just fixes the binding name to not use wild cards and 2/5 just documents existing bindings and is something that should have been merge last merge window itself (when the bindings were accepted). So, the patches pending on Grant's ack seem very low risk to me and we are much delayed already to wait further.

Quoted 2 lines

For both of those patches:

Thanks Grant. I sent my pull request already. CCing Olof to see if adding your ack locally when he pulls is something he is open to.

Thanks,
Sekhar