devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: da850-lcdk: Add NAND to DT
@ 2016-08-29 15:32 Karl Beldan
       [not found] ` <20160829153242.18615-1-kbeldan-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Karl Beldan @ 2016-08-29 15:32 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel
  Cc: Mark Rutland, Karl Beldan, Kevin Hilman, Sekhar Nori,
	Russell King, Rob Herring, Karl Beldan

This adds DT support for the NAND connected to the SoC AEMIF.
Passed torture hashing a 40MB file on top of UBIFS using subpages.

Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
---
v2:

- Removed comments pertaining to the BSP the LCDK ships with (Sekhar)
- s/"ok"/"okay"/
- Removed partitions since it relates to the BSP the LCDK ships with and
  also removed the references to the shortcomings of davinci_nand wrt DT
  parsing vs scan_ident (use of ti,davinci-ecc* vs nand-ecc*)
- use 4-bit ECC (since I have sent a fix for the driver)

 arch/arm/boot/dts/da850-lcdk.dts | 53 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index 7563260..1665eee 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -63,6 +63,27 @@
 			0x04 0x00000110 0x00000ff0
 		>;
 	};
+
+	nand_pins: nand_pins {
+		pinctrl-single,bits = <
+			/* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
+			0x1c 0x10110010  0xf0ff00f0
+			/*
+			 * EMA_D[0], EMA_D[1], EMA_D[2],
+			 * EMA_D[3], EMA_D[4], EMA_D[5],
+			 * EMA_D[6], EMA_D[7]
+			 */
+			0x24 0x11111111  0xffffffff
+			/*
+			 * EMA_D[8],  EMA_D[9],  EMA_D[10],
+			 * EMA_D[11], EMA_D[12], EMA_D[13],
+			 * EMA_D[14], EMA_D[15]
+			 */
+			0x20 0x11111111  0xffffffff
+			/* EMA_A[1], EMA_A[2] */
+			0x30 0x01100000  0x0ff00000
+		>;
+	};
 };
 
 &serial2 {
@@ -136,3 +157,35 @@
 	tx-num-evt = <32>;
 	rx-num-evt = <32>;
 };
+
+&aemif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&nand_pins>;
+	status = "okay";
+	cs3 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		clock-ranges;
+		ranges;
+
+		ti,cs-chipselect = <3>;
+
+		nand@2000000,0 {
+			compatible = "ti,davinci-nand";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0 0x02000000 0x02000000
+			       1 0x00000000 0x00008000>;
+
+			ti,davinci-chipselect = <1>;
+			ti,davinci-mask-ale = <0>;
+			ti,davinci-mask-cle = <0>;
+			ti,davinci-mask-chipsel = <0>;
+
+			ti,davinci-nand-buswidth = <16>;
+			ti,davinci-ecc-mode = "hw";
+			ti,davinci-ecc-bits = <4>;
+			ti,davinci-nand-use-bbt;
+		};
+	};
+};
-- 
2.9.2

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

end of thread, other threads:[~2016-09-01 13:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 15:32 [PATCH] ARM: dts: da850-lcdk: Add NAND to DT Karl Beldan
     [not found] ` <20160829153242.18615-1-kbeldan-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-08-31 23:44   ` Kevin Hilman
     [not found]     ` <7h37lk5wrd.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-09-01  5:17       ` Sekhar Nori
     [not found]         ` <3945712b-d02f-d97a-2356-9383d7fe1984-l0cyMroinI0@public.gmane.org>
2016-09-01 10:00           ` Karl Beldan
2016-09-01 10:16             ` Sekhar Nori
     [not found]               ` <fdf48f3c-c7f5-4b9b-ff6b-f801b04f3f33-l0cyMroinI0@public.gmane.org>
2016-09-01 13:16                 ` Karl Beldan

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).