public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mtd: spi-nor: Add Winbond w25q512jvdtr
@ 2025-09-10  0:20 Kang.Kerry 康宇良 TAO
  2025-09-10 15:47 ` Pratyush Yadav
  0 siblings, 1 reply; 6+ messages in thread
From: Kang.Kerry 康宇良 TAO @ 2025-09-10  0:20 UTC (permalink / raw)
  To: linux-mtd

Similar to the other ones, different size. The "JV-DTR" suffix is in
the datasheet, I haven't seen mentions of a different one.

The datasheet indicates DUAL and QUAD are supported.

https://www.winbond.com/resource-files/W25Q512JV%20DTR%20RevD%2006292020%20133.pdf

Signed-off-by: Kang.Kerry <kang.kerry@inventec.corp-partner.google.com>
---

This modification is add BIOS W25Q512JV-DTR chip to winbond list

---
 drivers/mtd/spi-nor/winbond.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 8d0a00d69e12..6ce5f70bc11a 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -146,6 +146,11 @@ static const struct flash_info winbond_nor_parts[] = {
  .name = "w25q512jvq",
  .size = SZ_64M,
  .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+ }, {
+ .id = SNOR_ID(0xef, 0x70, 0x20),
+ .name = "w25q512jvdtr",
+ .szie = SZ_64M,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
  }, {
  .id = SNOR_ID(0xef, 0x50, 0x12),
  .name = "w25q20bw",
--
2.43.0

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: mtd: spi-nor: Add Winbond w25q512jvdtr
  2025-09-10  0:20 mtd: spi-nor: Add Winbond w25q512jvdtr Kang.Kerry 康宇良 TAO
@ 2025-09-10 15:47 ` Pratyush Yadav
  2025-09-15  9:29   ` Kang.Kerry 康宇良 TAO
  0 siblings, 1 reply; 6+ messages in thread
From: Pratyush Yadav @ 2025-09-10 15:47 UTC (permalink / raw)
  To: Kang.Kerry 康宇良 TAO; +Cc: linux-mtd

Hi,

On Wed, Sep 10 2025, Kang.Kerry 康宇良 TAO wrote:

> Similar to the other ones, different size. The "JV-DTR" suffix is in
> the datasheet, I haven't seen mentions of a different one.
>
> The datasheet indicates DUAL and QUAD are supported.
>
> https://www.winbond.com/resource-files/W25Q512JV%20DTR%20RevD%2006292020%20133.pdf

The flash seems to have SFDP. I don't think you need an entry here at
all. The generic SFDP-based driver should be enough for you. Just add
the jedec,spi-nor node to your device tree. Try that out and only add
the entry if something isn't working, and that with explanations and
fixes to the problems.

>
> Signed-off-by: Kang.Kerry <kang.kerry@inventec.corp-partner.google.com>
> ---
>
> This modification is add BIOS W25Q512JV-DTR chip to winbond list
>
> ---
>  drivers/mtd/spi-nor/winbond.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
> index 8d0a00d69e12..6ce5f70bc11a 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -146,6 +146,11 @@ static const struct flash_info winbond_nor_parts[] = {
>   .name = "w25q512jvq",
>   .size = SZ_64M,
>   .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> + }, {
> + .id = SNOR_ID(0xef, 0x70, 0x20),
> + .name = "w25q512jvdtr",
> + .szie = SZ_64M,
> + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
>   }, {
>   .id = SNOR_ID(0xef, 0x50, 0x12),
>   .name = "w25q20bw",
> --
> 2.43.0
>

>

-- 
Regards,
Pratyush Yadav

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: mtd: spi-nor: Add Winbond w25q512jvdtr
  2025-09-10 15:47 ` Pratyush Yadav
@ 2025-09-15  9:29   ` Kang.Kerry 康宇良 TAO
  2025-09-15 12:14     ` Pratyush Yadav
  0 siblings, 1 reply; 6+ messages in thread
From: Kang.Kerry 康宇良 TAO @ 2025-09-15  9:29 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: linux-mtd@lists.infradead.org

Hi Pratyush,
I configured the DTS with 'compatible = "jedec,spi-nor";'
and enabled the kernel options:
CONFIG_MTD_PARTITIONED_MASTER=y
CONFIG_MTD_SPI_NOR=y

However, the dmesg output shows that the kernel is failing to recognize the flash's JEDEC ID. This suggests that the generic SFDP-based driver isn't working as expected.

[  135.294624] spi-nor spi1.0: unrecognized JEDEC id bytes: ef 70 20 00 00 00
[  135.301602] spi-nor: probe of spi1.0 failed with error -2

I think we need to add this to table to make sure W25Q512JV-DTR is recognized.

BR,
Kerry

-----Original Message-----
From: Pratyush Yadav <pratyush@kernel.org> 
Sent: Wednesday, September 10, 2025 11:47 PM
To: Kang.Kerry 康宇良 TAO <Kang.Kerry@inventec.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mtd: spi-nor: Add Winbond w25q512jvdtr

Hi,

On Wed, Sep 10 2025, Kang.Kerry 康宇良 TAO wrote:

> Similar to the other ones, different size. The "JV-DTR" suffix is in 
> the datasheet, I haven't seen mentions of a different one.
>
> The datasheet indicates DUAL and QUAD are supported.
>
> https://www.winbond.com/resource-files/W25Q512JV%20DTR%20RevD%20062920
> 20%20133.pdf

The flash seems to have SFDP. I don't think you need an entry here at all. The generic SFDP-based driver should be enough for you. Just add the jedec,spi-nor node to your device tree. Try that out and only add the entry if something isn't working, and that with explanations and fixes to the problems.

>
> Signed-off-by: Kang.Kerry 
> <kang.kerry@inventec.corp-partner.google.com>
> ---
>
> This modification is add BIOS W25Q512JV-DTR chip to winbond list
>
> ---
>  drivers/mtd/spi-nor/winbond.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mtd/spi-nor/winbond.c 
> b/drivers/mtd/spi-nor/winbond.c index 8d0a00d69e12..6ce5f70bc11a 
> 100644
> --- a/drivers/mtd/spi-nor/winbond.c
> +++ b/drivers/mtd/spi-nor/winbond.c
> @@ -146,6 +146,11 @@ static const struct flash_info winbond_nor_parts[] = {
>   .name = "w25q512jvq",
>   .size = SZ_64M,
>   .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> + }, {
> + .id = SNOR_ID(0xef, 0x70, 0x20),
> + .name = "w25q512jvdtr",
> + .szie = SZ_64M,
> + .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
>   }, {
>   .id = SNOR_ID(0xef, 0x50, 0x12),
>   .name = "w25q20bw",
> --
> 2.43.0
>

>

--
Regards,
Pratyush Yadav
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: spi-nor: Add Winbond w25q512jvdtr
  2025-09-15  9:29   ` Kang.Kerry 康宇良 TAO
@ 2025-09-15 12:14     ` Pratyush Yadav
  2025-09-16  8:14       ` Kang.Kerry 康宇良 TAO
  0 siblings, 1 reply; 6+ messages in thread
From: Pratyush Yadav @ 2025-09-15 12:14 UTC (permalink / raw)
  To: Kang.Kerry 康宇良 TAO
  Cc: Pratyush Yadav, linux-mtd@lists.infradead.org

Hi,

On Mon, Sep 15 2025, Kang.Kerry 康宇良 TAO wrote:

Please don't top-post. https://www.idallen.com/topposting.html

> Hi Pratyush,
> I configured the DTS with 'compatible = "jedec,spi-nor";'
> and enabled the kernel options:
> CONFIG_MTD_PARTITIONED_MASTER=y
> CONFIG_MTD_SPI_NOR=y
>
> However, the dmesg output shows that the kernel is failing to recognize the flash's JEDEC ID. This suggests that the generic SFDP-based driver isn't working as expected.
>
> [  135.294624] spi-nor spi1.0: unrecognized JEDEC id bytes: ef 70 20 00 00 00
> [  135.301602] spi-nor: probe of spi1.0 failed with error -2
>
> I think we need to add this to table to make sure W25Q512JV-DTR is recognized.

This means spi_nor_check_sfdp_signature() fails. Can you check why? The
flash datasheet says it has a SFDP table so this should work.

BTW, which kernel version are you testing this on?

[...]

-- 
Regards,
Pratyush Yadav

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: mtd: spi-nor: Add Winbond w25q512jvdtr
  2025-09-15 12:14     ` Pratyush Yadav
@ 2025-09-16  8:14       ` Kang.Kerry 康宇良 TAO
  2025-09-16 10:13         ` Pratyush Yadav
  0 siblings, 1 reply; 6+ messages in thread
From: Kang.Kerry 康宇良 TAO @ 2025-09-16  8:14 UTC (permalink / raw)
  To: Pratyush Yadav; +Cc: linux-mtd@lists.infradead.org

>Hi,
>
>On Mon, Sep 15 2025, Kang.Kerry 康宇良 TAO wrote:
>
>Please don't top-post. https://www.idallen.com/topposting.html
>
>> Hi Pratyush,
>> I configured the DTS with 'compatible = "jedec,spi-nor";'
> and enabled the kernel options:
> CONFIG_MTD_PARTITIONED_MASTER=y
> CONFIG_MTD_SPI_NOR=y
>
>> However, the dmesg output shows that the kernel is failing to recognize the flash's JEDEC ID. This suggests that the generic SFDP-based driver isn't working as expected.
>>
>> [  135.294624] spi-nor spi1.0: unrecognized JEDEC id bytes: ef 70 20 
>> 00 00 00 [  135.301602] spi-nor: probe of spi1.0 failed with error -2
>>
>> I think we need to add this to table to make sure W25Q512JV-DTR is recognized.
>
>This means spi_nor_check_sfdp_signature() fails. Can you check why? The flash datasheet says it has a SFDP table so this should work.
>
>BTW, which kernel version are you testing this on?
>
>[...]
>
>--
>Regards,
>Pratyush Yadav

I used kernel 5.15 for testing.
It seems the kernel is failing to recognize JEDEC id of the Winbond flash, which is causing the error.

When I test with Nuvoton kernel 6.6, it is able to recognize the flash as a generic device.
[   50.804160] spi-nor spi1.0: spi-nor-generic (65536 Kbytes)

--
BR,
Kerry
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd: spi-nor: Add Winbond w25q512jvdtr
  2025-09-16  8:14       ` Kang.Kerry 康宇良 TAO
@ 2025-09-16 10:13         ` Pratyush Yadav
  0 siblings, 0 replies; 6+ messages in thread
From: Pratyush Yadav @ 2025-09-16 10:13 UTC (permalink / raw)
  To: Kang.Kerry 康宇良 TAO
  Cc: Pratyush Yadav, linux-mtd@lists.infradead.org

Hi,

On Tue, Sep 16 2025, Kang.Kerry 康宇良 TAO wrote:

>>> I configured the DTS with 'compatible = "jedec,spi-nor";'
>> and enabled the kernel options:
>> CONFIG_MTD_PARTITIONED_MASTER=y
>> CONFIG_MTD_SPI_NOR=y
>>
>>> However, the dmesg output shows that the kernel is failing to recognize the flash's JEDEC ID. This suggests that the generic SFDP-based driver isn't working as expected.
>>>
>>> [  135.294624] spi-nor spi1.0: unrecognized JEDEC id bytes: ef 70 20 
>>> 00 00 00 [  135.301602] spi-nor: probe of spi1.0 failed with error -2
>>>
>>> I think we need to add this to table to make sure W25Q512JV-DTR is recognized.
>>
>>This means spi_nor_check_sfdp_signature() fails. Can you check why? The flash datasheet says it has a SFDP table so this should work.
>>
>>BTW, which kernel version are you testing this on?
>>
>>[...]
>>
>>--
>>Regards,
>>Pratyush Yadav
>
> I used kernel 5.15 for testing.
> It seems the kernel is failing to recognize JEDEC id of the Winbond flash, which is causing the error.
>
> When I test with Nuvoton kernel 6.6, it is able to recognize the flash as a generic device.
> [   50.804160] spi-nor spi1.0: spi-nor-generic (65536 Kbytes)

We only accept patches for the latest kernel. Since the latest seems to
be working for you, I think the onus is on you to backport the right set
of patches to your 5.15 kernel.

-- 
Regards,
Pratyush Yadav

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-16 10:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10  0:20 mtd: spi-nor: Add Winbond w25q512jvdtr Kang.Kerry 康宇良 TAO
2025-09-10 15:47 ` Pratyush Yadav
2025-09-15  9:29   ` Kang.Kerry 康宇良 TAO
2025-09-15 12:14     ` Pratyush Yadav
2025-09-16  8:14       ` Kang.Kerry 康宇良 TAO
2025-09-16 10:13         ` Pratyush Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox