Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi framework

2018-10-12 Thread Jagan Teki
On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar  wrote:
>> Signed-off-by: Suresh Gupta 
> Signed-off-by: Yogesh Gaur 
> Signed-off-by: Ashish Kumar 
> ---

Applied to u-boot-spi/master
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi framework

2018-10-10 Thread Yogesh Narayan Gaur
Hi Jagan,

> -Original Message-
> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Ashish
> Kumar
> Sent: Wednesday, October 10, 2018 4:23 PM
> To: Jagan Teki 
> Cc: U-Boot-Denx ; Jagan Teki ;
> Rajat Srivastava ; Suresh Gupta
> 
> Subject: Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi
> framework
> 
> > -Original Message-
> > From: Jagan Teki 
> > Sent: Wednesday, October 10, 2018 11:51 AM
> > To: Ashish Kumar 
> > Cc: U-Boot-Denx ; Jagan Teki
> > ; Rajat Srivastava ;
> > Suresh Gupta 
> > 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 
> > wrote:
> > >
> > > Signed-off-by: Suresh Gupta 
> > > Signed-off-by: Yogesh Gaur 
> > > Signed-off-by: Ashish Kumar 
> > > ---
> > >  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-
> bootdata=02%7C01%7Cyogeshnarayan.gaur%40nxp.com%7Cd2c8d343b
> b8646a75c1b08d62e9eabc3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7
> C0%7C636747656373729732sdata=58px6wLL96jaImJ6MGXC6rRHiXO3oe
> sj1EFfCrEmoGY%3Dreserved=0
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi framework

2018-10-10 Thread Ashish Kumar
> -Original Message-
> From: Jagan Teki 
> Sent: Wednesday, October 10, 2018 11:51 AM
> To: Ashish Kumar 
> Cc: U-Boot-Denx ; Jagan Teki ;
> Rajat Srivastava ; Suresh Gupta
> 
> 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 
> wrote:
> >
> > Signed-off-by: Suresh Gupta 
> > Signed-off-by: Yogesh Gaur 
> > Signed-off-by: Ashish Kumar 
> > ---
> >  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 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi framework

2018-10-10 Thread Jagan Teki
On Tue, Sep 25, 2018 at 2:13 PM Ashish Kumar  wrote:
>
> Signed-off-by: Suresh Gupta 
> Signed-off-by: Yogesh Gaur 
> Signed-off-by: Ashish Kumar 
> ---
>  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?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] driver/mtd: Add MICRON manufacturer id in spi framework

2018-09-25 Thread Ashish Kumar
Signed-off-by: Suresh Gupta 
Signed-off-by: Yogesh Gaur 
Signed-off-by: Ashish Kumar 
---
 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
 #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;
-- 
2.17.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot