linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Resend/PATCH] arm: dts: dra7: Add qspi device.
@ 2014-05-06 11:07 Sourav Poddar
  2014-05-06 16:52 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Sourav Poddar @ 2014-05-06 11:07 UTC (permalink / raw)
  To: tony, bcousson, devicetree, linux-omap, linux-kernel; +Cc: Sourav Poddar

These add device tree entry for qspi controller driver on dra7-evm.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
Depends on sricharan's irq crossbar.

 arch/arm/boot/dts/dra7-evm.dts |   80 ++++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/dra7.dtsi    |   14 +++++++
 2 files changed, 94 insertions(+)

diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0..62f4256 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -93,6 +93,21 @@
 			0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
 		>;
 	};
+
+	qspi1_pins: pinmux_qspi1_pins {
+		pinctrl-single,pins = <
+			0x4c (PIN_INPUT | MUX_MODE1)  /* gpmc_a3.qspi1_cs2 */
+			0x50 (PIN_INPUT | MUX_MODE1)  /* gpmc_a4.qspi1_cs3 */
+			0x74 (PIN_INPUT | MUX_MODE1)  /* gpmc_a13.qspi1_rtclk */
+			0x78 (PIN_INPUT | MUX_MODE1)  /* gpmc_a14.qspi1_d3 */
+			0x7c (PIN_INPUT | MUX_MODE1)  /* gpmc_a15.qspi1_d2 */
+			0x80 (PIN_INPUT | MUX_MODE1) /* gpmc_a16.qspi1_d1 */
+			0x84 (PIN_INPUT | MUX_MODE1)  /* gpmc_a17.qspi1_d0 */
+			0x88 (PIN_INPUT | MUX_MODE1)  /* qpmc_a18.qspi1_sclk */
+			0xb8 (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs2.qspi1_cs0 */
+			0xbc (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs3.qspi1_cs1 */
+		>;
+	};
 };
 
 &i2c1 {
@@ -273,3 +288,68 @@
 &cpu0 {
 	cpu0-supply = <&smps123_reg>;
 };
+
+&qspi {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&qspi1_pins>;
+
+	spi-max-frequency = <48000000>;
+	m25p80@0 {
+		compatible = "s25fl256s1";
+		spi-max-frequency = <48000000>;
+		reg = <0>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <4>;
+		spi-cpol;
+		spi-cpha;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		/* MTD partition table.
+		 * The ROM checks the first four physical blocks
+		 * for a valid file to boot and the flash here is
+		 * 64KiB block size.
+		 */
+		partition@0 {
+			label = "QSPI.SPL";
+			reg = <0x00000000 0x000010000>;
+		};
+		partition@1 {
+			label = "QSPI.SPL.backup1";
+			reg = <0x00010000 0x00010000>;
+		};
+		partition@2 {
+			label = "QSPI.SPL.backup2";
+			reg = <0x00020000 0x00010000>;
+		};
+		partition@3 {
+			label = "QSPI.SPL.backup3";
+			reg = <0x00030000 0x00010000>;
+		};
+		partition@4 {
+			label = "QSPI.u-boot";
+			reg = <0x00040000 0x00100000>;
+		};
+		partition@5 {
+			label = "QSPI.u-boot-spl-os";
+			reg = <0x00140000 0x00010000>;
+		};
+		partition@6 {
+			label = "QSPI.u-boot-env";
+			reg = <0x00150000 0x00010000>;
+		};
+		partition@7 {
+			label = "QSPI.u-boot-env.backup1";
+			reg = <0x00160000 0x0010000>;
+		};
+		partition@8 {
+			label = "QSPI.kernel";
+			reg = <0x00170000 0x0800000>;
+		};
+		partition@9 {
+			label = "QSPI.file-system";
+			reg = <0x00970000 0x01690000>;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index d93311a..a4557b4 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -798,6 +798,20 @@
 			dma-names = "tx0", "rx0";
 			status = "disabled";
 		};
+
+		qspi: qspi@4b300000 {
+			compatible = "ti,dra7xxx-qspi";
+			reg = <0x4b300000 0x100>;
+			reg-names = "qspi_base";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			ti,hwmods = "qspi";
+			clocks = <&qspi_gfclk_div>;
+			clock-names = "fck";
+			num-cs = <4>;
+			interrupts = <0 343 0x4>;
+			status = "disabled";
+		};
 	};
 
 	crossbar_mpu: crossbar@4a020000 {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Resend/PATCH] arm: dts: dra7: Add qspi device.
  2014-05-06 11:07 [Resend/PATCH] arm: dts: dra7: Add qspi device Sourav Poddar
@ 2014-05-06 16:52 ` Tony Lindgren
  2014-05-30 11:34   ` Sricharan R
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2014-05-06 16:52 UTC (permalink / raw)
  To: Sourav Poddar; +Cc: bcousson, devicetree, linux-omap, linux-kernel

* Sourav Poddar <sourav.poddar@ti.com> [140506 04:08]:
> These add device tree entry for qspi controller driver on dra7-evm.

Thanks applying into omap-for-v3.16/dt.

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Resend/PATCH] arm: dts: dra7: Add qspi device.
  2014-05-06 16:52 ` Tony Lindgren
@ 2014-05-30 11:34   ` Sricharan R
  2014-05-30 13:16     ` Nishanth Menon
  0 siblings, 1 reply; 5+ messages in thread
From: Sricharan R @ 2014-05-30 11:34 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sourav Poddar, bcousson, devicetree, linux-omap, linux-kernel,
	Menon, Nishanth, Nayak, Rajendra, Santosh Shilimkar

Hi,

On Tuesday 06 May 2014 10:22 PM, Tony Lindgren wrote:
> * Sourav Poddar <sourav.poddar@ti.com> [140506 04:08]:
>> These add device tree entry for qspi controller driver on dra7-evm.
> Thanks applying into omap-for-v3.16/dt.
There is a problem with this. The qspi node defines crossbar number
 as its interrupt number. Since the crossbar dts patches are not yet
 there, this causes a warning during boot.  So interrupts = < >
 property should be removed from DT and added later by crossbar series.

Regards,
Sricharan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Resend/PATCH] arm: dts: dra7: Add qspi device.
  2014-05-30 11:34   ` Sricharan R
@ 2014-05-30 13:16     ` Nishanth Menon
  2014-06-16 10:41       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2014-05-30 13:16 UTC (permalink / raw)
  To: Sricharan R, Tony Lindgren
  Cc: Sourav Poddar, bcousson, devicetree, linux-omap, linux-kernel,
	Nayak, Rajendra, Santosh Shilimkar

On 05/30/2014 06:34 AM, Sricharan R wrote:
> Hi,
> 
> On Tuesday 06 May 2014 10:22 PM, Tony Lindgren wrote:
>> * Sourav Poddar <sourav.poddar@ti.com> [140506 04:08]:
>>> These add device tree entry for qspi controller driver on dra7-evm.
>> Thanks applying into omap-for-v3.16/dt.
> There is a problem with this. The qspi node defines crossbar number
>  as its interrupt number. Since the crossbar dts patches are not yet
>  there, this causes a warning during boot.  So interrupts = < >
>  property should be removed from DT and added later by crossbar series.
> 

https://github.com/nmenon/kernel-test-logs/blob/next-20140530/omap2plus_defconfig/dra7.txt#L151
as an indication of the warning.

Tony,
Would you prefer a patch on top of omap-for-v3.16/dt-v2 branch?

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Resend/PATCH] arm: dts: dra7: Add qspi device.
  2014-05-30 13:16     ` Nishanth Menon
@ 2014-06-16 10:41       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2014-06-16 10:41 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: Sricharan R, Sourav Poddar, bcousson, devicetree, linux-omap,
	linux-kernel, Nayak, Rajendra, Santosh Shilimkar

* Nishanth Menon <nm@ti.com> [140530 06:19]:
> On 05/30/2014 06:34 AM, Sricharan R wrote:
> > Hi,
> > 
> > On Tuesday 06 May 2014 10:22 PM, Tony Lindgren wrote:
> >> * Sourav Poddar <sourav.poddar@ti.com> [140506 04:08]:
> >>> These add device tree entry for qspi controller driver on dra7-evm.
> >> Thanks applying into omap-for-v3.16/dt.
> > There is a problem with this. The qspi node defines crossbar number
> >  as its interrupt number. Since the crossbar dts patches are not yet
> >  there, this causes a warning during boot.  So interrupts = < >
> >  property should be removed from DT and added later by crossbar series.
> > 
> 
> https://github.com/nmenon/kernel-test-logs/blob/next-20140530/omap2plus_defconfig/dra7.txt#L151
> as an indication of the warning.
> 
> Tony,
> Would you prefer a patch on top of omap-for-v3.16/dt-v2 branch?

Sorting through my mailbox.. If this is still an issue a
fix against v3.16-rc1 please.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-16 10:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 11:07 [Resend/PATCH] arm: dts: dra7: Add qspi device Sourav Poddar
2014-05-06 16:52 ` Tony Lindgren
2014-05-30 11:34   ` Sricharan R
2014-05-30 13:16     ` Nishanth Menon
2014-06-16 10:41       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).