onenand|ddr: Add support for M39B0Rx0xxN1 Numonyx POP device
authorEnric Balletbo i Serra <eballetbo@gmail.com>
Mon, 24 Jan 2011 08:47:30 +0000 (14:17 +0530)
committerAnand Gadiyar <gadiyar@ti.com>
Mon, 24 Jan 2011 08:47:30 +0000 (14:17 +0530)
The M39B0Rx0xxN1 combines the following memory devices in MCP (multichip package):
  * 2-Gbit (x16), 1.8 V OneNANDTM flash memory, the NAND02GR4E0A
  * 4-Gbit DDP (DUAL DIE PLAN) (x16), 1.8 V OneNANDTM flash memory, the
    NAND04GR4E1A
  * Two or one single die of 2-Gbit double data rate LPSDRAM (low-power SDRAM), the
    M65KD002AM.

The datasheets are available from your local Numonyx distributor.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
drivers/onenand.c
include/asm/arch-omap3/mem.h

index 9902a0d..ec057c8 100644 (file)
 #define onenand_writew(v, a)   ((*(volatile unsigned short *)(a)) = (u16) (v))
 
 #define SAMSUNG_MFR_ID         0xEC
+#define NUMONYX_MFR_ID         0x20
 #define KFM1G16Q2A_DEV_ID      0x30
 #define KFN2G16Q2A_DEV_ID      0x40
-
+#define NAND01GR4E_DEV_ID      0x30
+#define NAND02GR4E_DEV_ID      0x40
+#define NAND04GR4E_DEV_ID      0x58
 
 #define THIS_ONENAND(a)                (ONENAND_ADDR + (a))
 
@@ -123,6 +126,20 @@ onenand_chip()
                        printf(" ONENAND Flash unsupported\r\n");
                         return 1;
                }
+       } else if (mf_id == NUMONYX_MFR_ID) {
+               if (dev_id == NAND01GR4E_DEV_ID) {
+                       printf("Detected Numonyx OneNAND 1G Flash \r\n");
+                       return 0;
+               } else if (dev_id == NAND02GR4E_DEV_ID) {
+                       printf("Detected Numonyx OneNAND 2G Flash \r\n");
+                       return 0;
+               } else if (dev_id == NAND04GR4E_DEV_ID) {
+                       printf("Detected Numonyx OneNAND 4G Flash \r\n");
+                       return 0;
+               } else {
+                       printf("Numonyx OneNAND Flash unsupported \r\n");
+                       return 1;
+               }
        } else {
                printf("ONENAND Flash Unsupported\r\n");
                return 1;
index 284c665..154114a 100644 (file)
@@ -77,6 +77,10 @@ typedef enum {
 #define SDP_SDRC_MDCFG_0_DDR_HYNIX     (0x03588019|B_ALL)
 #endif
 
+/* Numonyx devices */
+#define MK65KX001AM_SDRC_MCDCFG        (0x02584019|B_ALL)
+#define MK65KX002AM_SDRC_MCDCFG        (0x03588019|B_ALL)
+
 #define SDP_SDRC_MR_0_DDR              0x00000032
 
 /* Diabling power down mode using CKE pin */