linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Chunhe Lan <Chunhe.Lan@freescale.com>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: scottwood@freescale.com, kumar.gala@freescale.com,
	Chunhe Lan <Chunhe.Lan@freescale.com>
Subject: [PATCH] powerpc/p1023rds: Add nand flash node support in the dts
Date: Mon, 15 Aug 2011 16:43:10 +0800	[thread overview]
Message-ID: <1313397790-15432-1-git-send-email-Chunhe.Lan@freescale.com> (raw)

In the p1023rds, accessing exclusively nor flash or nand flash
device by BR0/OR0. When booting from nor flash, nand node is
disabled and nor node is enabled in the default dts. So, when
booting from nand flash, u-boot should do some operations:

   o The "status" property of nand node should be enabled.
   o The "status" property of nor node should be disabled.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
---
 arch/powerpc/boot/dts/p1023rds.dts |   46 +++++++++++++++++++++++++++++++++--
 1 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/boot/dts/p1023rds.dts b/arch/powerpc/boot/dts/p1023rds.dts
index d9b7767..aa63b81 100644
--- a/arch/powerpc/boot/dts/p1023rds.dts
+++ b/arch/powerpc/boot/dts/p1023rds.dts
@@ -58,6 +58,9 @@
 		rtic_b = &rtic_b;
 		rtic_c = &rtic_c;
 		rtic_d = &rtic_d;
+
+		nor_flash = &nor_flash;
+		nand_flash = &nand_flash;
 	};
 
 	cpus {
@@ -378,11 +381,12 @@
 		interrupts = <19 2>;
 		interrupt-parent = <&mpic>;
 
-		/* NOR Flash, BCSR */
+		/* NOR Flash, BCSR, NAND Flash */
 		ranges = <0x0 0x0 0x0 0xee000000 0x02000000
-			  0x1 0x0 0x0 0xe0000000 0x00008000>;
+			  0x1 0x0 0x0 0xe0000000 0x00008000
+			  0x2 0x0 0x0 0xffa00000 0x00040000>;
 
-		nor@0,0 {
+		nor_flash: nor@0,0 {
 			#address-cells = <1>;
 			#size-cells = <1>;
 			compatible = "cfi-flash";
@@ -425,6 +429,42 @@
 				reg = <0x20 0x20>;
 			};
 		};
+
+		nand_flash: nand@2,0 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			compatible = "fsl,p1023-fcm-nand",
+				     "fsl,elbc-fcm-nand";
+			reg = <0x2 0x0 0x00040000>;
+			status = "disabled";
+
+			u-boot-nand@0 {
+				/* This location must not be altered  */
+				/* 1MB for u-boot Bootloader Image */
+				reg = <0x0 0x00100000>;
+				read-only;
+			};
+
+			dtb-nand@100000 {
+				/* 1MB for DTB Image */
+				reg = <0x00100000 0x00100000>;
+			};
+
+			kernel-nand@200000 {
+				/* 4MB for Linux Kernel Image */
+				reg = <0x00200000 0x00400000>;
+			};
+
+			ramdisk-nand@600000 {
+				/* 57MB for Compressed Root file System Image */
+				reg = <0x00600000 0x03900000>;
+			};
+
+			empty-nand@3f00000 {
+				/* 1MB for reserved space */
+				reg = <0x03f00000 0x00100000>;
+			};
+		};
 	};
 
 	pci0: pcie@ff60a000 {
-- 
1.5.6.5

                 reply	other threads:[~2011-08-15  8:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313397790-15432-1-git-send-email-Chunhe.Lan@freescale.com \
    --to=chunhe.lan@freescale.com \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).