* [PATCHv3 1/2] arm: dts: dra7: Add qspi device.
@ 2014-03-10 11:51 Sourav Poddar
2014-03-10 11:51 ` [PATCHv3 2/2] arm: dts: am43x-epos: " Sourav Poddar
2014-03-12 17:34 ` [PATCHv3 1/2] arm: dts: dra7: " Tony Lindgren
0 siblings, 2 replies; 4+ messages in thread
From: Sourav Poddar @ 2014-03-10 11:51 UTC (permalink / raw)
To: tony, bcousson, devicetree; +Cc: linux-omap, Sourav Poddar
These add device tree entry for qspi controller driver on dra7-evm.
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
Done and tested on top of
linux-next + benoit for_15 + tony crossbar branch +
crossbar dts patches.
v2->v3:
This was added as part of the following series,
http://www.spinics.net/lists/linux-omap/msg101024.html
Few patches of the above series are picked.
Sending this dts patch with updates[1] to enable spi mode
operations with flash device.
[1]:
- Enables only SPI mode operations
- Add partition table
- Add crossbar interrupt value.
arch/arm/boot/dts/dra7-evm.dts | 80 ++++++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7.dtsi | 13 +++++++
2 files changed, 93 insertions(+)
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0..986fcf3 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 0x00180000>;
+ };
+ partition@5 {
+ label = "QSPI.u-boot-spl-os";
+ reg = <0x001c0000 0x00010000>;
+ };
+ partition@6 {
+ label = "QSPI.u-boot-env";
+ reg = <0x001d0000 0x00010000>;
+ };
+ partition@7 {
+ label = "QSPI.u-boot-env.backup1";
+ reg = <0x001e0000 0x0010000>;
+ };
+ partition@8 {
+ label = "QSPI.kernel";
+ reg = <0x001f0000 0x00500000>;
+ };
+ partition@9 {
+ label = "QSPI.file-system";
+ reg = <0x006f0000 0x01910000>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 5d2ff52..a7a2fa8 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -645,6 +645,19 @@
dma-names = "tx0", "rx0";
status = "disabled";
};
+
+ qspi: qspi@4b300000 {
+ compatible = "ti,dra7xxx-qspi";
+ reg = <0x4b300000 0x100>;
+ #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";
+ };
};
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv3 2/2] arm: dts: am43x-epos: Add qspi device.
2014-03-10 11:51 [PATCHv3 1/2] arm: dts: dra7: Add qspi device Sourav Poddar
@ 2014-03-10 11:51 ` Sourav Poddar
2014-03-12 17:34 ` [PATCHv3 1/2] arm: dts: dra7: " Tony Lindgren
1 sibling, 0 replies; 4+ messages in thread
From: Sourav Poddar @ 2014-03-10 11:51 UTC (permalink / raw)
To: tony, bcousson, devicetree; +Cc: linux-omap, Sourav Poddar
These add device tree entry for qspi controller driver on am43x-epos-evm.
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
---
This was added as part of the following series,
http://www.spinics.net/lists/linux-omap/msg101024.html
Few patches of the above series are picked.
Sending this dts patch with updates[1] to enable spi mode
operations with flash device.
[1]: v2->v3
- Enables only SPI mode operations
- Add partition table
arch/arm/boot/dts/am4372.dtsi | 11 ++++++
arch/arm/boot/dts/am43x-epos-evm.dts | 63 ++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+)
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 5a7cc38..c426d25 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -698,6 +698,17 @@
<&edma 11>;
dma-names = "tx", "rx";
};
+
+ qspi: qspi@47900000 {
+ compatible = "ti,am4372-qspi";
+ reg = <0x47900000 0x100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ ti,hwmods = "qspi";
+ interrupts = <0 138 0x4>;
+ num-cs = <4>;
+ status = "disabled";
+ };
};
};
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index a7d0db1..20c7fa6 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -111,6 +111,17 @@
0x19c (PIN_OUTPUT | MUX_MODE3) /* mcasp0_ahclkr.spi1_cs0 */
>;
};
+
+ qspi1_default: qspi1_default {
+ pinctrl-single,pins = <
+ 0x7c (PIN_INPUT_PULLUP | MUX_MODE3)
+ 0x88 (PIN_INPUT_PULLUP | MUX_MODE2)
+ 0x90 (PIN_INPUT_PULLUP | MUX_MODE3)
+ 0x94 (PIN_INPUT_PULLUP | MUX_MODE3)
+ 0x98 (PIN_INPUT_PULLUP | MUX_MODE3)
+ 0x9c (PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
};
matrix_keypad: matrix_keypad@0 {
@@ -251,3 +262,55 @@
pinctrl-0 = <&spi1_pins>;
status = "okay";
};
+
+&qspi {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&qspi1_default>;
+
+ spi-max-frequency = <48000000>;
+ m25p80@0 {
+ compatible = "mx66l51235l";
+ spi-max-frequency = <48000000>;
+ reg = <0>;
+ spi-cpol;
+ spi-cpha;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <4>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* MTD partition table.
+ * The ROM checks the first 512KiB
+ * for a valid file to boot(XIP).
+ */
+ partition@0 {
+ label = "QSPI.U_BOOT";
+ reg = <0x00000000 0x000080000>;
+ };
+ partition@1 {
+ label = "QSPI.U_BOOT.backup";
+ reg = <0x00080000 0x00080000>;
+ };
+ partition@2 {
+ label = "QSPI.U-BOOT-SPL_OS";
+ reg = <0x00100000 0x00010000>;
+ };
+ partition@3 {
+ label = "QSPI.U_BOOT_ENV";
+ reg = <0x00110000 0x00010000>;
+ };
+ partition@4 {
+ label = "QSPI.U-BOOT-ENV.backup";
+ reg = <0x00120000 0x00010000>;
+ };
+ partition@5 {
+ label = "QSPI.KERNEL";
+ reg = <0x00130000 0x0800000>;
+ };
+ partition@6 {
+ label = "QSPI.FILESYSTEM";
+ reg = <0x00930000 0x36D0000>;
+ };
+ };
+};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCHv3 1/2] arm: dts: dra7: Add qspi device.
2014-03-10 11:51 [PATCHv3 1/2] arm: dts: dra7: Add qspi device Sourav Poddar
2014-03-10 11:51 ` [PATCHv3 2/2] arm: dts: am43x-epos: " Sourav Poddar
@ 2014-03-12 17:34 ` Tony Lindgren
2014-03-13 4:42 ` sourav
1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2014-03-12 17:34 UTC (permalink / raw)
To: Sourav Poddar; +Cc: bcousson, devicetree, linux-omap
* Sourav Poddar <sourav.poddar@ti.com> [140310 04:54]:
> These add device tree entry for qspi controller driver on dra7-evm.
It seems that we need to wait for the crossbar dependencies
to get cleared in the mainline kernel before we can apply this
as otherwise the interrupts will be wrong in omap-for-v3.15/dt
branch.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCHv3 1/2] arm: dts: dra7: Add qspi device.
2014-03-12 17:34 ` [PATCHv3 1/2] arm: dts: dra7: " Tony Lindgren
@ 2014-03-13 4:42 ` sourav
0 siblings, 0 replies; 4+ messages in thread
From: sourav @ 2014-03-13 4:42 UTC (permalink / raw)
To: Tony Lindgren; +Cc: bcousson, devicetree, linux-omap
Tony,
On Wednesday 12 March 2014 11:04 PM, Tony Lindgren wrote:
> * Sourav Poddar<sourav.poddar@ti.com> [140310 04:54]:
>> These add device tree entry for qspi controller driver on dra7-evm.
> It seems that we need to wait for the crossbar dependencies
> to get cleared in the mainline kernel before we can apply this
> as otherwise the interrupts will be wrong in omap-for-v3.15/dt
> branch.
>
> Regards,
>
> Tony
Ok.
Can patch2 of this series be picked? It does not depend on crossbar and
is targetted for
a different SOC(AM43x).
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-13 4:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 11:51 [PATCHv3 1/2] arm: dts: dra7: Add qspi device Sourav Poddar
2014-03-10 11:51 ` [PATCHv3 2/2] arm: dts: am43x-epos: " Sourav Poddar
2014-03-12 17:34 ` [PATCHv3 1/2] arm: dts: dra7: " Tony Lindgren
2014-03-13 4:42 ` sourav
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).