* [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms
@ 2014-03-12 9:45 Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 1/2] ARM: dts: dra7: add support for parallel NAND flash Pekon Gupta
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Pekon Gupta @ 2014-03-12 9:45 UTC (permalink / raw)
To: Tony Lindgren, bcousson; +Cc: linux-omap, Pekon Gupta
*changes v1 -> v2*
- AM335x (am335x-evm): <already accepted, so dropping in v2>
- DRA7xx (dra7-evm): resending
- AM43xx (am43X-epos-evm): fix MTD NAND.filesystem partition offset
*Original v1*
This patch-set adds and updates parallel NAND support on following TI platforms
- AM335x (am335x-evm)
- DRA7xx (dra7-evm
- AM43xx (am43X-epos-evm)
In addition, following OMAP2+/GPMC patch is also added in this series as
it add checks DRA7xx and AM43xxx platforms for non-DT kernels.
ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms
Minal Shah (1):
ARM: dts: dra7: add support for parallel NAND flash
Pekon Gupta (1):
ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
arch/arm/boot/dts/dra7-evm.dts | 117 +++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7.dtsi | 20 ++++++
3 files changed, 138 insertions(+), 1 deletion(-)
--
1.8.5.1.163.gd7aced9
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] ARM: dts: dra7: add support for parallel NAND flash
2014-03-12 9:45 [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Pekon Gupta
@ 2014-03-12 9:45 ` Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 2/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition Pekon Gupta
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Pekon Gupta @ 2014-03-12 9:45 UTC (permalink / raw)
To: Tony Lindgren, bcousson; +Cc: linux-omap, Minal Shah, Pekon Gupta
From: Minal Shah <minal.shah@ti.com>
DRA7xx platform has in-build GPMC and ELM h/w engines which can be used
for accessing externel NAND flash device. This patch:
- adds generic DT binding in dra7.dtsi for enabling GPMC and ELM h/w engines
- adds DT binding for Micron NAND Flash (MT29F2G16AADWP) present on dra7-evm
*Important*
On DRA7 EVM, GPMC_WPN and NAND_BOOTn are controlled by DIP switch
So following board settings are required for NAND device detection:
SW5.9 (GPMC_WPN) = LOW
SW5.1 (NAND_BOOTn) = HIGH
Signed-off-by: Minal Shah <minal.shah@ti.com>
Signed-off-by: Pekon Gupta <pekon@ti.com>
---
arch/arm/boot/dts/dra7-evm.dts | 117 +++++++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/dra7.dtsi | 20 +++++++
2 files changed, 137 insertions(+)
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index 5babba0..7b4e6f5 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -93,6 +93,37 @@
0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
>;
};
+
+ nand_flash_x16: nand_flash_x16 {
+ /* On DRA7 EVM, GPMC_WPN and NAND_BOOTn comes from DIP switch
+ * So NAND flash requires following switch settings:
+ * SW5.9 (GPMC_WPN) = LOW
+ * SW5.1 (NAND_BOOTn) = HIGH */
+ pinctrl-single,pins = <
+ 0x0 (PIN_INPUT | MUX_MODE0) /* gpmc_ad0 */
+ 0x4 (PIN_INPUT | MUX_MODE0) /* gpmc_ad1 */
+ 0x8 (PIN_INPUT | MUX_MODE0) /* gpmc_ad2 */
+ 0xc (PIN_INPUT | MUX_MODE0) /* gpmc_ad3 */
+ 0x10 (PIN_INPUT | MUX_MODE0) /* gpmc_ad4 */
+ 0x14 (PIN_INPUT | MUX_MODE0) /* gpmc_ad5 */
+ 0x18 (PIN_INPUT | MUX_MODE0) /* gpmc_ad6 */
+ 0x1c (PIN_INPUT | MUX_MODE0) /* gpmc_ad7 */
+ 0x20 (PIN_INPUT | MUX_MODE0) /* gpmc_ad8 */
+ 0x24 (PIN_INPUT | MUX_MODE0) /* gpmc_ad9 */
+ 0x28 (PIN_INPUT | MUX_MODE0) /* gpmc_ad10 */
+ 0x2c (PIN_INPUT | MUX_MODE0) /* gpmc_ad11 */
+ 0x30 (PIN_INPUT | MUX_MODE0) /* gpmc_ad12 */
+ 0x34 (PIN_INPUT | MUX_MODE0) /* gpmc_ad13 */
+ 0x38 (PIN_INPUT | MUX_MODE0) /* gpmc_ad14 */
+ 0x3c (PIN_INPUT | MUX_MODE0) /* gpmc_ad15 */
+ 0xD8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0 */
+ 0xCC (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen */
+ 0xB4 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_csn0 */
+ 0xC4 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale */
+ 0xC8 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren */
+ 0xD0 (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle */
+ >;
+ };
};
&i2c1 {
@@ -273,3 +304,89 @@
&cpu0 {
cpu0-supply = <&smps123_reg>;
};
+
+&elm {
+ status = "okay";
+};
+
+&gpmc {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&nand_flash_x16>;
+ ranges = <0 0 0x08000000 0x10000000>;
+ nand@0,0 {
+ reg = <0 0 0>;
+ ti,nand-ecc-opt = "bch8";
+ ti,elm-id = <&elm>;
+ nand-bus-width = <16>;
+ gpmc,device-width = <2>;
+ gpmc,sync-clk-ps = <0>;
+ gpmc,cs-on-ns = <0>;
+ gpmc,cs-rd-off-ns = <40>;
+ gpmc,cs-wr-off-ns = <40>;
+ gpmc,adv-on-ns = <0>;
+ gpmc,adv-rd-off-ns = <30>;
+ gpmc,adv-wr-off-ns = <30>;
+ gpmc,we-on-ns = <5>;
+ gpmc,we-off-ns = <25>;
+ gpmc,oe-on-ns = <2>;
+ gpmc,oe-off-ns = <20>;
+ gpmc,access-ns = <20>;
+ gpmc,wr-access-ns = <40>;
+ gpmc,rd-cycle-ns = <40>;
+ gpmc,wr-cycle-ns = <40>;
+ gpmc,wait-on-read = "true";
+ gpmc,wait-on-write = "true";
+ gpmc,bus-turnaround-ns = <0>;
+ gpmc,cycle2cycle-delay-ns = <0>;
+ gpmc,clk-activation-ns = <0>;
+ gpmc,wait-monitoring-ns = <0>;
+ gpmc,wr-data-mux-bus-ns = <0>;
+ /* MTD partition table */
+ /* All SPL-* partitions are sized to minimal length
+ * which can be independently programmable. For
+ * NAND flash this is equal to size of erase-block */
+ #address-cells = <1>;
+ #size-cells = <1>;
+ partition@0 {
+ label = "NAND.SPL";
+ reg = <0x00000000 0x000020000>;
+ };
+ partition@1 {
+ label = "NAND.SPL.backup1";
+ reg = <0x00020000 0x00020000>;
+ };
+ partition@2 {
+ label = "NAND.SPL.backup2";
+ reg = <0x00040000 0x00020000>;
+ };
+ partition@3 {
+ label = "NAND.SPL.backup3";
+ reg = <0x00060000 0x00020000>;
+ };
+ partition@4 {
+ label = "NAND.u-boot-spl-os";
+ reg = <0x00080000 0x00040000>;
+ };
+ partition@5 {
+ label = "NAND.u-boot";
+ reg = <0x000C0000 0x00100000>;
+ };
+ partition@6 {
+ label = "NAND.u-boot-env";
+ reg = <0x001C0000 0x00020000>;
+ };
+ partition@7 {
+ label = "NAND.u-boot-env";
+ reg = <0x001E0000 0x00020000>;
+ };
+ partition@8 {
+ label = "NAND.kernel";
+ reg = <0x00200000 0x00800000>;
+ };
+ partition@9 {
+ label = "NAND.file-system";
+ reg = <0x00A00000 0x0F600000>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index 9e3caf3..dbabf67 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -772,6 +772,26 @@
dma-names = "tx0", "rx0";
status = "disabled";
};
+
+ elm: elm@48078000 {
+ compatible = "ti,am3352-elm";
+ reg = <0x48078000 0x2000>;
+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+ ti,hwmods = "elm";
+ status = "disabled";
+ };
+
+ gpmc: gpmc@50000000 {
+ compatible = "ti,am3352-gpmc";
+ ti,hwmods = "gpmc";
+ reg = <0x50000000 0x2000>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ gpmc,num-cs = <8>;
+ gpmc,num-waitpins = <2>;
+ #address-cells = <2>;
+ #size-cells = <1>;
+ status = "disabled";
+ };
};
};
--
1.8.5.1.163.gd7aced9
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
2014-03-12 9:45 [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 1/2] ARM: dts: dra7: add support for parallel NAND flash Pekon Gupta
@ 2014-03-12 9:45 ` Pekon Gupta
2014-03-19 9:17 ` [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Gupta, Pekon
2014-03-27 7:19 ` Gupta, Pekon
3 siblings, 0 replies; 6+ messages in thread
From: Pekon Gupta @ 2014-03-12 9:45 UTC (permalink / raw)
To: Tony Lindgren, bcousson; +Cc: linux-omap, Pekon Gupta
MTD NAND partition for file-system should start at offset=0xA00000
Signed-off-by: Pekon Gupta <pekon@ti.com>
---
arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 167dbc8..d09e6fb 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -341,7 +341,7 @@
};
partition@9 {
label = "NAND.file-system";
- reg = <0x00800000 0x1F600000>;
+ reg = <0x00A00000 0x1F600000>;
};
};
};
--
1.8.5.1.163.gd7aced9
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms
2014-03-12 9:45 [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 1/2] ARM: dts: dra7: add support for parallel NAND flash Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 2/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition Pekon Gupta
@ 2014-03-19 9:17 ` Gupta, Pekon
2014-03-27 7:19 ` Gupta, Pekon
3 siblings, 0 replies; 6+ messages in thread
From: Gupta, Pekon @ 2014-03-19 9:17 UTC (permalink / raw)
To: Tony Lindgren, bcousson@baylibre.com; +Cc: linux-omap
Hi Tony,
>From: Gupta, Pekon
>*changes v1 -> v2*
> - AM335x (am335x-evm): <already accepted, so dropping in v2>
> - DRA7xx (dra7-evm): resending
> - AM43xx (am43X-epos-evm): fix MTD NAND.filesystem partition offset
>
I see following patches in your tree/branch "omap-for-v3.15/dt"
But probably they were omitted in the pull request. Is there something, I need to do for these ?
f68e355 2014-03-02 ARM: dts: am43xx: add support for parallel NAND flash
c06c527 2014-03-02 ARM: dts: AM33xx: updated default ECC scheme in nand-ecc-opt
91994fa 2014-03-02 ARM: dts: am335x-evm: NAND: update MTD partition table
0611c41 2014-03-02 ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes
Also, I had sent a [v2] for one of the patches, dropped by you. Please see if that can be picked
[Patch v2 1/2] ARM: dts: dra7: add support for parallel NAND flash
[Patch v2 1/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
with regards, pekon
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms
2014-03-12 9:45 [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Pekon Gupta
` (2 preceding siblings ...)
2014-03-19 9:17 ` [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Gupta, Pekon
@ 2014-03-27 7:19 ` Gupta, Pekon
2014-04-18 16:33 ` Tony Lindgren
3 siblings, 1 reply; 6+ messages in thread
From: Gupta, Pekon @ 2014-03-27 7:19 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, bcousson@baylibre.com
HI Tony,
>From: Gupta, Pekon
[...]
>I see following patches in your tree/branch "omap-for-v3.15/dt"
>But probably they were omitted in the pull request. Is there something, I need to do for these ?
>
> f68e355 2014-03-02 ARM: dts: am43xx: add support for parallel NAND flash
> c06c527 2014-03-02 ARM: dts: AM33xx: updated default ECC scheme in nand-ecc-opt
> 91994fa 2014-03-02 ARM: dts: am335x-evm: NAND: update MTD partition table
> 0611c41 2014-03-02 ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes
>
>
>Also, I had sent a [v2] for one of the patches, dropped by you. Please see if that can be picked
> [Patch v2 1/2] ARM: dts: dra7: add support for parallel NAND flash
> [Patch v2 1/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
>
>
Please let me know, if I need to rebase any of the patches in follow series
against your for_3.15/dt or any other branch.
(1) [Partly Merged] "add parallel NAND support for TI's new OMAPx and AMxx platforms"
http://www.spinics.net/lists/linux-omap/msg104305.html
(2) [New Patches] "add parallel NAND support for TI's new OMAPx and AMxx platforms (part-2)"
http://www.spinics.net/lists/linux-omap/msg104668.html
with regards, pekon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms
2014-03-27 7:19 ` Gupta, Pekon
@ 2014-04-18 16:33 ` Tony Lindgren
0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2014-04-18 16:33 UTC (permalink / raw)
To: Gupta, Pekon; +Cc: linux-omap, bcousson@baylibre.com
* Gupta, Pekon <pekon@ti.com> [140327 00:22]:
> HI Tony,
>
> >From: Gupta, Pekon
> [...]
> >I see following patches in your tree/branch "omap-for-v3.15/dt"
> >But probably they were omitted in the pull request. Is there something, I need to do for these ?
> >
> > f68e355 2014-03-02 ARM: dts: am43xx: add support for parallel NAND flash
> > c06c527 2014-03-02 ARM: dts: AM33xx: updated default ECC scheme in nand-ecc-opt
> > 91994fa 2014-03-02 ARM: dts: am335x-evm: NAND: update MTD partition table
> > 0611c41 2014-03-02 ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes
> >
> >
> >Also, I had sent a [v2] for one of the patches, dropped by you. Please see if that can be picked
> > [Patch v2 1/2] ARM: dts: dra7: add support for parallel NAND flash
> > [Patch v2 1/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition
> >
> >
> Please let me know, if I need to rebase any of the patches in follow series
> against your for_3.15/dt or any other branch.
Yes please rebase against v3.15-rc1 and repost, otherwise I'll have hard
time keeping track of what's still missing.
BTW, I think we have few more GPMC issue to debug before we can drop omap3
legacy booting support:
1. At least the gpmc_probe_generic_child fails if the device is initialized
by the bootloader, and then initialized by the kernel based on the .dts
entries. This works just fine when booted in legacy mode.
2. Also gpmc_cs_remap hangs the system if the bootloader address for the
device was different from the address in the .dts file.
3. The gpmc_cs_remap should use the ranges property instead of the child
reg property. The child reg property should be the offset from the
GPMC ranges property as at least smc91x wants 0x300 as the offset to
avoid extra warnings from the driver when it checks the address space.
Regards,
Tony
> (1) [Partly Merged] "add parallel NAND support for TI's new OMAPx and AMxx platforms"
> http://www.spinics.net/lists/linux-omap/msg104305.html
>
> (2) [New Patches] "add parallel NAND support for TI's new OMAPx and AMxx platforms (part-2)"
> http://www.spinics.net/lists/linux-omap/msg104668.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-04-18 16:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 9:45 [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 1/2] ARM: dts: dra7: add support for parallel NAND flash Pekon Gupta
2014-03-12 9:45 ` [PATCH v2 2/2] ARM: dts: am43xx: fix starting offset of NAND.filesystem MTD partition Pekon Gupta
2014-03-19 9:17 ` [PATCH v2 0/2] add parallel NAND support for TI's new OMAPx and AMxx platforms Gupta, Pekon
2014-03-27 7:19 ` Gupta, Pekon
2014-04-18 16:33 ` 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).