Message ID | 20180925084134.21944-1-Ashish.Kumar@nxp.com |
---|---|
State | Accepted |
Commit | 5c391486b411025785e064f160d248bef31b3d28 |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | [U-Boot] driver/mtd: Add MICRON manufacturer id in spi framework | expand |
On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar <Ashish.Kumar@nxp.com> wrote: > > Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com> > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> > Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> > --- > drivers/mtd/spi/sf_internal.h | 1 + > drivers/mtd/spi/spi_flash.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h > index 4f63cacc64..26f5c7c995 100644 > --- a/drivers/mtd/spi/sf_internal.h > +++ b/drivers/mtd/spi/sf_internal.h > @@ -32,6 +32,7 @@ enum spi_nor_option_flags { > /* CFI Manufacture ID's */ > #define SPI_FLASH_CFI_MFR_SPANSION 0x01 > #define SPI_FLASH_CFI_MFR_STMICRO 0x20 > +#define SPI_FLASH_CFI_MFR_MICRON 0x2C Why we need this? is it to support old micron chips?
> -----Original Message----- > From: Jagan Teki <jagan@amarulasolutions.com> > Sent: Wednesday, October 10, 2018 11:51 AM > To: Ashish Kumar <ashish.kumar@nxp.com> > Cc: U-Boot-Denx <u-boot@lists.denx.de>; Jagan Teki <jagan@openedev.com>; > Rajat Srivastava <rajat.srivastava@nxp.com>; Suresh Gupta > <suresh.gupta@nxp.com> > Subject: Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi > framework > > On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar <Ashish.Kumar@nxp.com> > wrote: > > > > Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com> > > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> > > Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> > > --- > > drivers/mtd/spi/sf_internal.h | 1 + > > drivers/mtd/spi/spi_flash.c | 2 ++ > > 2 files changed, 3 insertions(+) > > > > diff --git a/drivers/mtd/spi/sf_internal.h > > b/drivers/mtd/spi/sf_internal.h index 4f63cacc64..26f5c7c995 100644 > > --- a/drivers/mtd/spi/sf_internal.h > > +++ b/drivers/mtd/spi/sf_internal.h > > @@ -32,6 +32,7 @@ enum spi_nor_option_flags { > > /* CFI Manufacture ID's */ > > #define SPI_FLASH_CFI_MFR_SPANSION 0x01 > > #define SPI_FLASH_CFI_MFR_STMICRO 0x20 > > +#define SPI_FLASH_CFI_MFR_MICRON 0x2C > > Why we need this? is it to support old micron chips? NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has manufacturer id as 0x2C, which are rather for newer flashes after the split of Micron from ST. Regards Ashish
Hi Jagan, > -----Original Message----- > From: U-Boot [mailto:u-boot-bounces@lists.denx.de] On Behalf Of Ashish > Kumar > Sent: Wednesday, October 10, 2018 4:23 PM > To: Jagan Teki <jagan@amarulasolutions.com> > Cc: U-Boot-Denx <u-boot@lists.denx.de>; Jagan Teki <jagan@openedev.com>; > Rajat Srivastava <rajat.srivastava@nxp.com>; Suresh Gupta > <suresh.gupta@nxp.com> > Subject: Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi > framework > > > -----Original Message----- > > From: Jagan Teki <jagan@amarulasolutions.com> > > Sent: Wednesday, October 10, 2018 11:51 AM > > To: Ashish Kumar <ashish.kumar@nxp.com> > > Cc: U-Boot-Denx <u-boot@lists.denx.de>; Jagan Teki > > <jagan@openedev.com>; Rajat Srivastava <rajat.srivastava@nxp.com>; > > Suresh Gupta <suresh.gupta@nxp.com> > > Subject: Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id > > in spi framework > > > > On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar <Ashish.Kumar@nxp.com> > > wrote: > > > > > > Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com> > > > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> > > > Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> > > > --- > > > drivers/mtd/spi/sf_internal.h | 1 + > > > drivers/mtd/spi/spi_flash.c | 2 ++ > > > 2 files changed, 3 insertions(+) > > > > > > diff --git a/drivers/mtd/spi/sf_internal.h > > > b/drivers/mtd/spi/sf_internal.h index 4f63cacc64..26f5c7c995 100644 > > > --- a/drivers/mtd/spi/sf_internal.h > > > +++ b/drivers/mtd/spi/sf_internal.h > > > @@ -32,6 +32,7 @@ enum spi_nor_option_flags { > > > /* CFI Manufacture ID's */ > > > #define SPI_FLASH_CFI_MFR_SPANSION 0x01 > > > #define SPI_FLASH_CFI_MFR_STMICRO 0x20 > > > +#define SPI_FLASH_CFI_MFR_MICRON 0x2C > > > > Why we need this? is it to support old micron chips? > > NOR flash name MT35X_QLKA and MT25Q_** used on NXP board has > manufacturer id as 0x2C, which are rather for newer flashes after the split of > Micron from ST. > Same is being discussed in Linux-mtd mailing list [1]. Public data sheet of MT35x flash can be checked at[2] -- Regards Yogesh Gaur. [1] https://patchwork.ozlabs.org/patch/971439/ [2] https://www.micron.com/resource-details/0b74b806-bbf1-4c24-b07b-35e2799bb6ff > Regards > Ashish > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.de > nx.de%2Flistinfo%2Fu- > boot&data=02%7C01%7Cyogeshnarayan.gaur%40nxp.com%7Cd2c8d343b > b8646a75c1b08d62e9eabc3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7 > C0%7C636747656373729732&sdata=58px6wLL96jaImJ6MGXC6rRHiXO3oe > sj1EFfCrEmoGY%3D&reserved=0
On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar <Ashish.Kumar@nxp.com> wrote: >> Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com> > Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> > Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> > --- Applied to u-boot-spi/master
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index 4f63cacc64..26f5c7c995 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -32,6 +32,7 @@ enum spi_nor_option_flags { /* CFI Manufacture ID's */ #define SPI_FLASH_CFI_MFR_SPANSION 0x01 #define SPI_FLASH_CFI_MFR_STMICRO 0x20 +#define SPI_FLASH_CFI_MFR_MICRON 0x2C #define SPI_FLASH_CFI_MFR_MACRONIX 0xc2 #define SPI_FLASH_CFI_MFR_SST 0xbf #define SPI_FLASH_CFI_MFR_WINBOND 0xef diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index c159124259..c73011748e 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1096,6 +1096,7 @@ static int set_quad_mode(struct spi_flash *flash, #endif #ifdef CONFIG_SPI_FLASH_STMICRO case SPI_FLASH_CFI_MFR_STMICRO: + case SPI_FLASH_CFI_MFR_MICRON: debug("SF: QEB is volatile for %02x flash\n", JEDEC_MFR(info)); return 0; #endif @@ -1183,6 +1184,7 @@ int spi_flash_scan(struct spi_flash *flash) #if defined(CONFIG_SPI_FLASH_STMICRO) || defined(CONFIG_SPI_FLASH_SST) /* NOR protection support for STmicro/Micron chips and similar */ if (JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_STMICRO || + JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_MICRON || JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_SST) { flash->flash_lock = stm_lock; flash->flash_unlock = stm_unlock;