* [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn @ 2024-04-08 12:43 Hui Wang 2024-04-08 12:53 ` Michael Walle 0 siblings, 1 reply; 7+ messages in thread From: Hui Wang @ 2024-04-08 12:43 UTC (permalink / raw) To: linux-mtd, tudor.ambarus, pratyush, mwalle It is 2Mbit F-RAM which is logically organized as 256K x 8. Signed-off-by: Hui Wang <hui.wang@canonical.com> --- drivers/mtd/spi-nor/spansion.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index 6cc237c24e07..5dc94926b2cb 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s28hs02gt", .mfr_flags = USE_CLPEF, .fixups = &s28hx_t_fixups, + }, { + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), + .name = "cy15v102qsn", + .size = SZ_256K, + .sector_size = SZ_256K, + .flags = SPI_NOR_NO_ERASE, }, { .id = SNOR_ID(0xef, 0x40, 0x13), .name = "s25fl004k", -- 2.34.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-08 12:43 [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn Hui Wang @ 2024-04-08 12:53 ` Michael Walle 2024-04-09 8:35 ` Hui Wang 0 siblings, 1 reply; 7+ messages in thread From: Michael Walle @ 2024-04-08 12:53 UTC (permalink / raw) To: Hui Wang, linux-mtd, tudor.ambarus, pratyush [-- Attachment #1.1: Type: text/plain, Size: 1197 bytes --] Hi, On Mon Apr 8, 2024 at 2:43 PM CEST, Hui Wang wrote: > It is 2Mbit F-RAM which is logically organized as 256K x 8. Please have a look at drivers/misc/at25.c. I'm trying to get rid of the NO_ERASE flag. This is more of an EEPROM like device. The at25 driver already have some kind of FRAM type support. > Signed-off-by: Hui Wang <hui.wang@canonical.com> > --- > drivers/mtd/spi-nor/spansion.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c > index 6cc237c24e07..5dc94926b2cb 100644 > --- a/drivers/mtd/spi-nor/spansion.c > +++ b/drivers/mtd/spi-nor/spansion.c > @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { > .name = "s28hs02gt", > .mfr_flags = USE_CLPEF, > .fixups = &s28hx_t_fixups, > + }, { > + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), This doesn't look like a JEDEC id. The datasheet says it is a 11bit manufacturer id? -michael > + .name = "cy15v102qsn", > + .size = SZ_256K, > + .sector_size = SZ_256K, > + .flags = SPI_NOR_NO_ERASE, > }, { > .id = SNOR_ID(0xef, 0x40, 0x13), > .name = "s25fl004k", [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 297 bytes --] [-- Attachment #2: Type: text/plain, Size: 144 bytes --] ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-08 12:53 ` Michael Walle @ 2024-04-09 8:35 ` Hui Wang 2024-04-09 8:41 ` Michael Walle 0 siblings, 1 reply; 7+ messages in thread From: Hui Wang @ 2024-04-09 8:35 UTC (permalink / raw) To: Michael Walle, linux-mtd, tudor.ambarus, pratyush On 4/8/24 20:53, Michael Walle wrote: > Hi, > > On Mon Apr 8, 2024 at 2:43 PM CEST, Hui Wang wrote: >> It is 2Mbit F-RAM which is logically organized as 256K x 8. > Please have a look at drivers/misc/at25.c. I'm trying to get rid of > the NO_ERASE flag. This is more of an EEPROM like device. The at25 > driver already have some kind of FRAM type support. After reading your comment, I checked the drivers/misc/at25.c, I found It couldn't work on my hardware. In my case, the F-RAM is under a spi bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So currently, the mtd/spi-nor is the only choice. >> Signed-off-by: Hui Wang <hui.wang@canonical.com> >> --- >> drivers/mtd/spi-nor/spansion.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c >> index 6cc237c24e07..5dc94926b2cb 100644 >> --- a/drivers/mtd/spi-nor/spansion.c >> +++ b/drivers/mtd/spi-nor/spansion.c >> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { >> .name = "s28hs02gt", >> .mfr_flags = USE_CLPEF, >> .fixups = &s28hx_t_fixups, >> + }, { >> + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), > This doesn't look like a JEDEC id. The datasheet says it is a 11bit > manufacturer id? > > -michael From the page 82 of datasheet, the Device ID is 0000000006805148, and the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is 0x51, ...). Thanks, Hui. > >> + .name = "cy15v102qsn", >> + .size = SZ_256K, >> + .sector_size = SZ_256K, >> + .flags = SPI_NOR_NO_ERASE, >> }, { >> .id = SNOR_ID(0xef, 0x40, 0x13), >> .name = "s25fl004k", ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-09 8:35 ` Hui Wang @ 2024-04-09 8:41 ` Michael Walle 2024-04-09 13:22 ` Hui Wang 0 siblings, 1 reply; 7+ messages in thread From: Michael Walle @ 2024-04-09 8:41 UTC (permalink / raw) To: Hui Wang, linux-mtd, tudor.ambarus, pratyush [-- Attachment #1.1: Type: text/plain, Size: 1600 bytes --] Hi, > >> It is 2Mbit F-RAM which is logically organized as 256K x 8. > > Please have a look at drivers/misc/at25.c. I'm trying to get rid of > > the NO_ERASE flag. This is more of an EEPROM like device. The at25 > > driver already have some kind of FRAM type support. > After reading your comment, I checked the drivers/misc/at25.c, I found > It couldn't work on my hardware. In my case, the F-RAM is under a spi > bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So > currently, the mtd/spi-nor is the only choice. Then it will be a great opportunity to make the at25 driver spi-mem ready :) > >> Signed-off-by: Hui Wang <hui.wang@canonical.com> > >> --- > >> drivers/mtd/spi-nor/spansion.c | 6 ++++++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c > >> index 6cc237c24e07..5dc94926b2cb 100644 > >> --- a/drivers/mtd/spi-nor/spansion.c > >> +++ b/drivers/mtd/spi-nor/spansion.c > >> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { > >> .name = "s28hs02gt", > >> .mfr_flags = USE_CLPEF, > >> .fixups = &s28hx_t_fixups, > >> + }, { > >> + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), > > This doesn't look like a JEDEC id. The datasheet says it is a 11bit > > manufacturer id? > > > > -michael > > From the page 82 of datasheet, the Device ID is 0000000006805148, and > the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is > 0x51, ...). JEDEC manufacturer IDs are not 11bit wide. -michael [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 297 bytes --] [-- Attachment #2: Type: text/plain, Size: 144 bytes --] ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-09 8:41 ` Michael Walle @ 2024-04-09 13:22 ` Hui Wang 2024-04-09 13:25 ` Michael Walle 0 siblings, 1 reply; 7+ messages in thread From: Hui Wang @ 2024-04-09 13:22 UTC (permalink / raw) To: Michael Walle, linux-mtd, tudor.ambarus, pratyush On 4/9/24 16:41, Michael Walle wrote: > Hi, > >>>> It is 2Mbit F-RAM which is logically organized as 256K x 8. >>> Please have a look at drivers/misc/at25.c. I'm trying to get rid of >>> the NO_ERASE flag. This is more of an EEPROM like device. The at25 >>> driver already have some kind of FRAM type support. >> After reading your comment, I checked the drivers/misc/at25.c, I found >> It couldn't work on my hardware. In my case, the F-RAM is under a spi >> bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So >> currently, the mtd/spi-nor is the only choice. > Then it will be a great opportunity to make the at25 driver spi-mem > ready :) OK. :-) >>>> Signed-off-by: Hui Wang <hui.wang@canonical.com> >>>> --- >>>> drivers/mtd/spi-nor/spansion.c | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c >>>> index 6cc237c24e07..5dc94926b2cb 100644 >>>> --- a/drivers/mtd/spi-nor/spansion.c >>>> +++ b/drivers/mtd/spi-nor/spansion.c >>>> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { >>>> .name = "s28hs02gt", >>>> .mfr_flags = USE_CLPEF, >>>> .fixups = &s28hx_t_fixups, >>>> + }, { >>>> + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), >>> This doesn't look like a JEDEC id. The datasheet says it is a 11bit >>> manufacturer id? >>> >>> -michael >> From the page 82 of datasheet, the Device ID is 0000000006805148, and >> the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is >> 0x51, ...). > JEDEC manufacturer IDs are not 11bit wide. Have no idea here. I thought it is same as the cy15x104q and the spansion.c has the support for cy15x104q. > > -michael ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-09 13:22 ` Hui Wang @ 2024-04-09 13:25 ` Michael Walle 2024-04-10 0:36 ` Hui Wang 0 siblings, 1 reply; 7+ messages in thread From: Michael Walle @ 2024-04-09 13:25 UTC (permalink / raw) To: Hui Wang, linux-mtd, tudor.ambarus, pratyush [-- Attachment #1.1: Type: text/plain, Size: 1942 bytes --] Hi, > >>>> It is 2Mbit F-RAM which is logically organized as 256K x 8. > >>> Please have a look at drivers/misc/at25.c. I'm trying to get rid of > >>> the NO_ERASE flag. This is more of an EEPROM like device. The at25 > >>> driver already have some kind of FRAM type support. > >> After reading your comment, I checked the drivers/misc/at25.c, I found > >> It couldn't work on my hardware. In my case, the F-RAM is under a spi > >> bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So > >> currently, the mtd/spi-nor is the only choice. > > Then it will be a great opportunity to make the at25 driver spi-mem > > ready :) > OK. :-) > >>>> Signed-off-by: Hui Wang <hui.wang@canonical.com> > >>>> --- > >>>> drivers/mtd/spi-nor/spansion.c | 6 ++++++ > >>>> 1 file changed, 6 insertions(+) > >>>> > >>>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c > >>>> index 6cc237c24e07..5dc94926b2cb 100644 > >>>> --- a/drivers/mtd/spi-nor/spansion.c > >>>> +++ b/drivers/mtd/spi-nor/spansion.c > >>>> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { > >>>> .name = "s28hs02gt", > >>>> .mfr_flags = USE_CLPEF, > >>>> .fixups = &s28hx_t_fixups, > >>>> + }, { > >>>> + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), > >>> This doesn't look like a JEDEC id. The datasheet says it is a 11bit > >>> manufacturer id? > >>> > >>> -michael > >> From the page 82 of datasheet, the Device ID is 0000000006805148, and > >> the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is > >> 0x51, ...). > > JEDEC manufacturer IDs are not 11bit wide. > Have no idea here. I thought it is same as the cy15x104q and the > spansion.c has the support for cy15x104q. That one was already broken (and I'd like to move that one to the at25 too); it had the ID bits reversed and this one is even more broken :( -michael [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 297 bytes --] [-- Attachment #2: Type: text/plain, Size: 144 bytes --] ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn 2024-04-09 13:25 ` Michael Walle @ 2024-04-10 0:36 ` Hui Wang 0 siblings, 0 replies; 7+ messages in thread From: Hui Wang @ 2024-04-10 0:36 UTC (permalink / raw) To: Michael Walle, linux-mtd, tudor.ambarus, pratyush On 4/9/24 21:25, Michael Walle wrote: > Hi, > >>>>>> It is 2Mbit F-RAM which is logically organized as 256K x 8. >>>>> Please have a look at drivers/misc/at25.c. I'm trying to get rid of >>>>> the NO_ERASE flag. This is more of an EEPROM like device. The at25 >>>>> driver already have some kind of FRAM type support. >>>> After reading your comment, I checked the drivers/misc/at25.c, I found >>>> It couldn't work on my hardware. In my case, the F-RAM is under a spi >>>> bus (spi-nxp-fspi.c) which only supports spi_mem transfer mode. So >>>> currently, the mtd/spi-nor is the only choice. >>> Then it will be a great opportunity to make the at25 driver spi-mem >>> ready :) >> OK. :-) >>>>>> Signed-off-by: Hui Wang <hui.wang@canonical.com> >>>>>> --- >>>>>> drivers/mtd/spi-nor/spansion.c | 6 ++++++ >>>>>> 1 file changed, 6 insertions(+) >>>>>> >>>>>> diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c >>>>>> index 6cc237c24e07..5dc94926b2cb 100644 >>>>>> --- a/drivers/mtd/spi-nor/spansion.c >>>>>> +++ b/drivers/mtd/spi-nor/spansion.c >>>>>> @@ -981,6 +981,12 @@ static const struct flash_info spansion_nor_parts[] = { >>>>>> .name = "s28hs02gt", >>>>>> .mfr_flags = USE_CLPEF, >>>>>> .fixups = &s28hx_t_fixups, >>>>>> + }, { >>>>>> + .id = SNOR_ID(0x48, 0x51, 0x80, 0x06, 0x00, 0x00), >>>>> This doesn't look like a JEDEC id. The datasheet says it is a 11bit >>>>> manufacturer id? >>>>> >>>>> -michael >>>> From the page 82 of datasheet, the Device ID is 0000000006805148, and >>>> the ID read by spi_nor_read_id() matches it (id[0] is 0x48, id[1] is >>>> 0x51, ...). >>> JEDEC manufacturer IDs are not 11bit wide. >> Have no idea here. I thought it is same as the cy15x104q and the >> spansion.c has the support for cy15x104q. > That one was already broken (and I'd like to move that one to the > at25 too); it had the ID bits reversed and this one is even more > broken :( OK, got it. :-) will focus on at25 then. > -michael ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-10 0:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-08 12:43 [PATCH] mtd: spi-nor: spansion: Add support for infineon cy15v102qsn Hui Wang 2024-04-08 12:53 ` Michael Walle 2024-04-09 8:35 ` Hui Wang 2024-04-09 8:41 ` Michael Walle 2024-04-09 13:22 ` Hui Wang 2024-04-09 13:25 ` Michael Walle 2024-04-10 0:36 ` Hui Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox