From: Enric Balletbo i Serra Date: Mon, 24 Jan 2011 08:47:30 +0000 (+0530) Subject: onenand|ddr: Add support for M39B0Rx0xxN1 Numonyx POP device X-Git-Tag: v1.5.0~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b9ee44e411242118b6793d857080d1d137aa18e;p=pandora-x-loader.git onenand|ddr: Add support for M39B0Rx0xxN1 Numonyx POP device 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 --- diff --git a/drivers/onenand.c b/drivers/onenand.c index 9902a0d..ec057c8 100644 --- a/drivers/onenand.c +++ b/drivers/onenand.c @@ -31,9 +31,12 @@ #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; diff --git a/include/asm/arch-omap3/mem.h b/include/asm/arch-omap3/mem.h index 284c665..154114a 100644 --- a/include/asm/arch-omap3/mem.h +++ b/include/asm/arch-omap3/mem.h @@ -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 */