* [PATCH 0/3] Add device tree support for NAND flash in am335x-evm @ 2013-01-18 6:41 Philip Avinash 2013-01-18 6:41 ` [PATCH 1/3] ARM: dts: AM33XX: Add ELM node Philip Avinash ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Philip Avinash @ 2013-01-18 6:41 UTC (permalink / raw) To: linux-arm-kernel This patch series adds device tree support for NAND flash in am335x-evm. Also ELM node is populated in device tree and been used for BCH error correction in NAND flash part. Also this patch series ensures RBL ecc layout maintained in Linux kernel with BCH8 ecc scheme. This patch series based on [1] and depends on [2] & [3]. 1. http://git.kernel.org/?p=linux/kernel/git/bcousson/linux-omap-dt.git;a=tree;h=refs/heads/for_3.9/dts;hb=refs/heads/for_3.9/dts 2. OMAP GPMC DT bindings http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;a=shortlog;h=refs/heads/omap-for-v3.9/gpmc 3. mtd: nand: OMAP: ELM error correction support for BCH ecc http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/shortlog/refs/heads/master Philip Avinash (1): ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm Philip, Avinash (2): ARM: dts: AM33XX: Add ELM node ARM: dts: AM33XX: Add GPMC node arch/arm/boot/dts/am335x-evm.dts | 93 +++++++++++++++++++++++++++++++++++++- arch/arm/boot/dts/am33xx.dtsi | 18 ++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: dts: AM33XX: Add ELM node 2013-01-18 6:41 [PATCH 0/3] Add device tree support for NAND flash in am335x-evm Philip Avinash @ 2013-01-18 6:41 ` Philip Avinash 2013-01-21 20:47 ` Peter Korsgaard 2013-01-18 6:41 ` [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node Philip Avinash 2013-01-18 6:41 ` [PATCH 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm Philip Avinash 2 siblings, 1 reply; 9+ messages in thread From: Philip Avinash @ 2013-01-18 6:41 UTC (permalink / raw) To: linux-arm-kernel From: "Philip, Avinash" <avinashphilip@ti.com> Add ELM data node to AM33XX device tree file. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index c2f14e8..eaef5e7 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -385,5 +385,13 @@ mac-address = [ 00 00 00 00 00 00 ]; }; }; + + elm: elm at 48080000 { + compatible = "ti,am33xx-elm"; + reg = <0x48080000 0x2000>; + interrupts = <4>; + ti,hwmods = "elm"; + status = "disabled"; + }; }; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: dts: AM33XX: Add ELM node 2013-01-18 6:41 ` [PATCH 1/3] ARM: dts: AM33XX: Add ELM node Philip Avinash @ 2013-01-21 20:47 ` Peter Korsgaard 2013-01-23 6:32 ` Philip, Avinash 0 siblings, 1 reply; 9+ messages in thread From: Peter Korsgaard @ 2013-01-21 20:47 UTC (permalink / raw) To: linux-arm-kernel >>>>> "Philip" == Philip Avinash <avinashphilip@ti.com> writes: Philip> From: "Philip, Avinash" <avinashphilip@ti.com> Philip> Add ELM data node to AM33XX device tree file. Philip> Signed-off-by: Philip Avinash <avinashphilip@ti.com> Philip> --- Philip> arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ Philip> 1 file changed, 8 insertions(+) Philip> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi Philip> index c2f14e8..eaef5e7 100644 Philip> --- a/arch/arm/boot/dts/am33xx.dtsi Philip> +++ b/arch/arm/boot/dts/am33xx.dtsi Philip> @@ -385,5 +385,13 @@ Philip> mac-address = [ 00 00 00 00 00 00 ]; Philip> }; Philip> }; Philip> + Philip> + elm: elm at 48080000 { Philip> + compatible = "ti,am33xx-elm"; Please drop the <tab> after compatible. Other than that it looks goood. Acked-by: Peter Korsgaard <jacmet@sunsite.dk> -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] ARM: dts: AM33XX: Add ELM node 2013-01-21 20:47 ` Peter Korsgaard @ 2013-01-23 6:32 ` Philip, Avinash 0 siblings, 0 replies; 9+ messages in thread From: Philip, Avinash @ 2013-01-23 6:32 UTC (permalink / raw) To: linux-arm-kernel On Tue, Jan 22, 2013 at 02:17:38, Peter Korsgaard wrote: > >>>>> "Philip" == Philip Avinash <avinashphilip@ti.com> writes: > > Philip> From: "Philip, Avinash" <avinashphilip@ti.com> > Philip> Add ELM data node to AM33XX device tree file. > > Philip> Signed-off-by: Philip Avinash <avinashphilip@ti.com> > Philip> --- > Philip> arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ > Philip> 1 file changed, 8 insertions(+) > > Philip> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi > Philip> index c2f14e8..eaef5e7 100644 > Philip> --- a/arch/arm/boot/dts/am33xx.dtsi > Philip> +++ b/arch/arm/boot/dts/am33xx.dtsi > Philip> @@ -385,5 +385,13 @@ > Philip> mac-address = [ 00 00 00 00 00 00 ]; > Philip> }; > Philip> }; > Philip> + > Philip> + elm: elm at 48080000 { > Philip> + compatible = "ti,am33xx-elm"; > > Please drop the <tab> after compatible. I will replace with space and submit another version > > Other than that it looks goood. > > Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Thanks Avinash > > -- > Bye, Peter Korsgaard > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node 2013-01-18 6:41 [PATCH 0/3] Add device tree support for NAND flash in am335x-evm Philip Avinash 2013-01-18 6:41 ` [PATCH 1/3] ARM: dts: AM33XX: Add ELM node Philip Avinash @ 2013-01-18 6:41 ` Philip Avinash 2013-01-18 13:17 ` Jan Lübbe 2013-01-21 21:01 ` Peter Korsgaard 2013-01-18 6:41 ` [PATCH 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm Philip Avinash 2 siblings, 2 replies; 9+ messages in thread From: Philip Avinash @ 2013-01-18 6:41 UTC (permalink / raw) To: linux-arm-kernel From: "Philip, Avinash" <avinashphilip@ti.com> Add GPMC data node to AM33XX device tree file. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index eaef5e7..f4209d8 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -393,5 +393,17 @@ ti,hwmods = "elm"; status = "disabled"; }; + + gpmc: gpmc at 50000000 { + compatible = "ti,am3352-gpmc"; + ti,hwmods = "gpmc"; + reg = <0x50000000 0x2000>; + interrupts = <100>; + num-cs = <8>; + num-waitpins = <2>; + #address-cells = <2>; + #size-cells = <1>; + status = "disabled"; + }; }; }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node 2013-01-18 6:41 ` [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node Philip Avinash @ 2013-01-18 13:17 ` Jan Lübbe 2013-01-21 21:01 ` Peter Korsgaard 1 sibling, 0 replies; 9+ messages in thread From: Jan Lübbe @ 2013-01-18 13:17 UTC (permalink / raw) To: linux-arm-kernel On Fri, 2013-01-18 at 12:11 +0530, Philip Avinash wrote: > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi > index eaef5e7..f4209d8 100644 > --- a/arch/arm/boot/dts/am33xx.dtsi > +++ b/arch/arm/boot/dts/am33xx.dtsi > @@ -393,5 +393,17 @@ > ti,hwmods = "elm"; > status = "disabled"; > }; > + > + gpmc: gpmc at 50000000 { > + compatible = "ti,am3352-gpmc"; > + ti,hwmods = "gpmc"; > + reg = <0x50000000 0x2000>; > + interrupts = <100>; > + num-cs = <8>; According to the AM335x TRM (SPRUH73G) page 254 we have GPMC_CSn[6:0], so num-cs should probably be <7>. > + num-waitpins = <2>; > + #address-cells = <2>; > + #size-cells = <1>; > + status = "disabled"; > + }; > }; > }; -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node 2013-01-18 6:41 ` [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node Philip Avinash 2013-01-18 13:17 ` Jan Lübbe @ 2013-01-21 21:01 ` Peter Korsgaard 2013-01-23 6:32 ` Philip, Avinash 1 sibling, 1 reply; 9+ messages in thread From: Peter Korsgaard @ 2013-01-21 21:01 UTC (permalink / raw) To: linux-arm-kernel >>>>> "Philip" == Philip Avinash <avinashphilip@ti.com> writes: Philip> From: "Philip, Avinash" <avinashphilip@ti.com> Philip> Add GPMC data node to AM33XX device tree file. Philip> Signed-off-by: Philip Avinash <avinashphilip@ti.com> Philip> --- Philip> arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++++++ Philip> 1 file changed, 12 insertions(+) Philip> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi Philip> index eaef5e7..f4209d8 100644 Philip> --- a/arch/arm/boot/dts/am33xx.dtsi Philip> +++ b/arch/arm/boot/dts/am33xx.dtsi Philip> @@ -393,5 +393,17 @@ Philip> ti,hwmods = "elm"; Philip> status = "disabled"; Philip> }; Philip> + Philip> + gpmc: gpmc at 50000000 { Philip> + compatible = "ti,am3352-gpmc"; Philip> + ti,hwmods = "gpmc"; Philip> + reg = <0x50000000 0x2000>; Philip> + interrupts = <100>; Philip> + num-cs = <8>; Next to Jan's comment about am335x having 7 cs signals, I just realized the difference in compatible string between the gpmc and elm. The gpmc refers to a real device (which is afaik how it should be done), but the elm compatible is simply ti,am33xx-elm. Presumably it should have been ti,am3352-elm in the binding instead? Other than that it looks fine. Acked-by: Peter Korsgaard <jacmet@sunsite.dk> -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node 2013-01-21 21:01 ` Peter Korsgaard @ 2013-01-23 6:32 ` Philip, Avinash 0 siblings, 0 replies; 9+ messages in thread From: Philip, Avinash @ 2013-01-23 6:32 UTC (permalink / raw) To: linux-arm-kernel On Tue, Jan 22, 2013 at 02:31:53, Peter Korsgaard wrote: > >>>>> "Philip" == Philip Avinash <avinashphilip@ti.com> writes: > > Philip> From: "Philip, Avinash" <avinashphilip@ti.com> > Philip> Add GPMC data node to AM33XX device tree file. > > Philip> Signed-off-by: Philip Avinash <avinashphilip@ti.com> > Philip> --- > Philip> arch/arm/boot/dts/am33xx.dtsi | 12 ++++++++++++ > Philip> 1 file changed, 12 insertions(+) > > Philip> diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi > Philip> index eaef5e7..f4209d8 100644 > Philip> --- a/arch/arm/boot/dts/am33xx.dtsi > Philip> +++ b/arch/arm/boot/dts/am33xx.dtsi > Philip> @@ -393,5 +393,17 @@ > Philip> ti,hwmods = "elm"; > Philip> status = "disabled"; > Philip> }; > Philip> + > Philip> + gpmc: gpmc at 50000000 { > Philip> + compatible = "ti,am3352-gpmc"; > Philip> + ti,hwmods = "gpmc"; > Philip> + reg = <0x50000000 0x2000>; > Philip> + interrupts = <100>; > Philip> + num-cs = <8>; > > Next to Jan's comment about am335x having 7 cs signals, I just realized > the difference in compatible string between the gpmc and elm. The gpmc > refers to a real device (which is afaik how it should be done), but the > elm compatible is simply ti,am33xx-elm. > > Presumably it should have been ti,am3352-elm in the binding instead? I thought of following the file name convention. I will correct to "ti,am3352-elm" > > Other than that it looks fine. > > Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Thanks Avinash > > -- > Bye, Peter Korsgaard > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm 2013-01-18 6:41 [PATCH 0/3] Add device tree support for NAND flash in am335x-evm Philip Avinash 2013-01-18 6:41 ` [PATCH 1/3] ARM: dts: AM33XX: Add ELM node Philip Avinash 2013-01-18 6:41 ` [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node Philip Avinash @ 2013-01-18 6:41 ` Philip Avinash 2 siblings, 0 replies; 9+ messages in thread From: Philip Avinash @ 2013-01-18 6:41 UTC (permalink / raw) To: linux-arm-kernel NAND flash connected in am335x-evm on GPMC controller. This patch adds device tree node in am335x-evm with GPMC controller timing for NAND flash interface, NAND partition table, ECC scheme, elm handle id, pin-mux setup. Signed-off-by: Philip Avinash <avinashphilip@ti.com> --- arch/arm/boot/dts/am335x-evm.dts | 98 +++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index d649644..1c6b1a8 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -26,7 +26,8 @@ am33xx_pinmux: pinmux at 44e10800 { pinctrl-names = "default"; - pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0>; + pinctrl-0 = <&matrix_keypad_s0 &volume_keys_s0 + &nandflash_pins_s0>; matrix_keypad_s0: matrix_keypad_s0 { pinctrl-single,pins = < @@ -44,6 +45,26 @@ 0x154 0x27 /* spi0_d0.gpio0_3, INPUT | MODE7 */ >; }; + + nandflash_pins_s0: nandflash_pins_s0 { + pinctrl-single,pins = < + 0x0 0x30 /* gpmc_ad0.gpmc_ad0, INPUT | PULLUP | MODE0 */ + 0x4 0x30 /* gpmc_ad1.gpmc_ad1, INPUT | PULLUP | MODE0 */ + 0x8 0x30 /* gpmc_ad2.gpmc_ad2, INPUT | PULLUP | MODE0 */ + 0xc 0x30 /* gpmc_ad3.gpmc_ad3, INPUT | PULLUP | MODE0 */ + 0x10 0x30 /* gpmc_ad4.gpmc_ad4, INPUT | PULLUP | MODE0 */ + 0x14 0x30 /* gpmc_ad5.gpmc_ad5, INPUT | PULLUP | MODE0 */ + 0x18 0x30 /* gpmc_ad6.gpmc_ad6, INPUT | PULLUP | MODE0 */ + 0x1c 0x30 /* gpmc_ad7.gpmc_ad7, INPUT | PULLUP | MODE0 */ + 0x70 0x30 /* gpmc_wait0.gpmc_wait0, INPUT | PULLUP | MODE0 */ + 0x74 0x37 /* gpmc_wpn.gpio0_30, INPUT | PULLUP | MODE7 */ + 0x7c 0x8 /* gpmc_csn0.gpmc_csn0, PULL DISA */ + 0x90 0x8 /* gpmc_advn_ale.gpmc_advn_ale, PULL DISA */ + 0x94 0x8 /* gpmc_oen_ren.gpmc_oen_ren, PULL DISA */ + 0x98 0x8 /* gpmc_wen.gpmc_wen, PULL DISA */ + 0x9c 0x8 /* gpmc_be0n_cle.gpmc_be0n_cle, PULL DISA */ + >; + }; }; ocp { @@ -102,6 +123,81 @@ reg = <0x48>; }; }; + + elm: elm at 48080000 { + status = "okay"; + }; + + gpmc: gpmc at 50000000 { + status = "okay"; + ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */ + + nand at 0,0 { + reg = <0 0 0>; /* CS0, offset 0 */ + nand-bus-width = <8>; + ti,nand-ecc-opt = "bch8"; + + gpmc,sync-clk = <0>; + gpmc,cs-on = <0>; + gpmc,cs-rd-off = <44>; + gpmc,cs-wr-off = <44>; + gpmc,adv-on = <6>; + gpmc,adv-rd-off = <34>; + gpmc,adv-wr-off = <44>; + gpmc,we-off = <40>; + gpmc,oe-off = <54>; + gpmc,access = <64>; + gpmc,rd-cycle = <82>; + gpmc,wr-cycle = <82>; + gpmc,wr-access = <40>; + gpmc,wr-data-mux-bus = <0>; + + #address-cells = <1>; + #size-cells = <1>; + elm_id = <&elm>; + + /* MTD partition table */ + partition at 0 { + label = "SPL1"; + reg = <0x00000000 0x000020000>; + }; + + partition at 1 { + label = "SPL2"; + reg = <0x00020000 0x00020000>; + }; + + partition at 2 { + label = "SPL3"; + reg = <0x00040000 0x00020000>; + }; + + partition at 3 { + label = "SPL4"; + reg = <0x00060000 0x00020000>; + }; + + partition at 4 { + label = "U-boot"; + reg = <0x00080000 0x001e0000>; + }; + + partition at 5 { + label = "environment"; + reg = <0x00260000 0x00020000>; + }; + + partition at 6 { + label = "Kernel"; + reg = <0x00280000 0x00500000>; + }; + + partition at 7 { + label = "File-System"; + reg = <0x00780000 0x0F880000>; + }; + }; + }; }; vbat: fixedregulator at 0 { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-23 6:32 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-18 6:41 [PATCH 0/3] Add device tree support for NAND flash in am335x-evm Philip Avinash 2013-01-18 6:41 ` [PATCH 1/3] ARM: dts: AM33XX: Add ELM node Philip Avinash 2013-01-21 20:47 ` Peter Korsgaard 2013-01-23 6:32 ` Philip, Avinash 2013-01-18 6:41 ` [PATCH 2/3] ARM: dts: AM33XX: Add GPMC node Philip Avinash 2013-01-18 13:17 ` Jan Lübbe 2013-01-21 21:01 ` Peter Korsgaard 2013-01-23 6:32 ` Philip, Avinash 2013-01-18 6:41 ` [PATCH 3/3] ARM: dts: AM33XX: Add NAND flash device tree data to am335x-evm Philip Avinash
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).