Add support for more XMC series
PATCH 1/1 Add support for more XMC series
Add XMC XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
site: https://www.xmcwh.com/site/product
--- configs/evb-ast2600_defconfig | 1 + drivers/mtd/spi/spi-nor-ids.c | 4 ++++ 2 files changed, 5 insertions(+)
configs/evb-ast2600_defconfig +1 -0
@@ -100,6 +100,7 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHY_REALTEK=y CONFIG_PHY_NCSI=y
drivers/mtd/spi/spi-nor-ids.c +4 -0
@@ -531,6 +531,10 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QH512C", 0x204020, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU512C", 0x204120, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, #endif #ifdef CONFIG_SPI_FLASH_XTX /* XTX Technology Limited */
Signature · 1 line
2.34.1
Quoted 9 lines · SSunk
Add XMC XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
site: https://www.xmcwh.com/site/productSigned-off-by Kankan Sun <[email protected]>--- configs/evb-ast2600_defconfig | 1 + drivers/mtd/spi/spi-nor-ids.c | 4 ++++ 2 files changed, 5 insertions(+)
I think this is v2 so it should have that as well as a change list. You can use 'patman' to help with this.
Regards,
Simon
Quoted 31 lines
configs/evb-ast2600_defconfig +1
-0@@ -100,6 +100,7 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHY_REALTEK=y CONFIG_PHY_NCSI=ydrivers/mtd/spi/spi-nor-ids.c +4
-1@@ -531,6 +531,10 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QH512C", 0x204020, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU512C", 0x204120, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, #endif #ifdef CONFIG_SPI_FLASH_XTX /* XTX Technology Limited */ --2.34.1
Hi Simon,
I'm not quite sure what you mean by v2, if it's the previous email, it only removes the XM25QH128C part of the commit message compared to the previous one.
Thanks,
SSunk
Quoted 62 lines · Simon Glass <[email protected]> 于2023年8月13日周日 21:36写道:
Quoted 9 lines · SSunk
Add XMC XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
site: https://www.xmcwh.com/site/productSigned-off-by Kankan Sun <[email protected]>--- configs/evb-ast2600_defconfig | 1 + drivers/mtd/spi/spi-nor-ids.c | 4 ++++ 2 files changed, 5 insertions(+)Reviewed-by Simon Glass <[email protected]>I think this is v2 so it should have that as well as a change list. You can use 'patman' to help with this.
Regards,
SimonReview
Quoted 2 lines
(quoted diff) +0
-0b/configs/evb-ast2600_defconfig
Review
Quoted 12 lines
index
9244654c82..f06c0e1fe1100644configs/evb-ast2600_defconfig +1
-0@@ -100,6 +100,7 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHY_REALTEK=y CONFIG_PHY_NCSI=y(quoted diff) +0
-0
b/drivers/mtd/spi/spi-nor-ids.cdrivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 531
Quoted 5 lines
index 4587215984..80d7678293 100644
drivers/mtd/spi/spi-nor-ids.c +0
-0@@ -531,6 +531,10 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 532
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +0
-0{ INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 533
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +0
-0{ INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 534
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 535
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 536
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QH512C", 0x204020, 0, 64 * 1024, 1024, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 537
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QU512C", 0x204120, 0, 64 * 1024, 1024, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },Quoted 6 lines
drivers/mtd/spi/spi-nor-ids.c +0
-1#endif #ifdef CONFIG_SPI_FLASH_XTX /* XTX Technology Limited */ --2.34.1
Hi,
Quoted 4 lines · Clus Tom
Hi Simon,
I'm not quite sure what you mean by v2, if it's the previous email, it only removes the XM25QH128C part of the commit message compared to the previous one.
Right, so it is v2.
Your emails seem to have generated 3 patches:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
The version number helps the maintainer figure out which one to apply.
Regards,
Simon
- Simon
Quoted 57 lines
Thanks,
SSunkQuoted 53 lines · Simon Glass <[email protected]> 于2023年8月13日周日 21:36写道:
Quoted 9 lines · SSunk
Add XMC XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
site: https://www.xmcwh.com/site/productSigned-off-by Kankan Sun <[email protected]>--- configs/evb-ast2600_defconfig | 1 + drivers/mtd/spi/spi-nor-ids.c | 4 ++++ 2 files changed, 5 insertions(+)Reviewed-by Simon Glass <[email protected]>I think this is v2 so it should have that as well as a change list. You can use 'patman' to help with this.
Regards,
SimonQuoted 31 lines
configs/evb-ast2600_defconfig +1
-0@@ -100,6 +100,7 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHY_REALTEK=y CONFIG_PHY_NCSI=ydrivers/mtd/spi/spi-nor-ids.c +4
-1@@ -531,6 +531,10 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QH512C", 0x204020, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { INFO("XM25QU512C", 0x204120, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, #endif #ifdef CONFIG_SPI_FLASH_XTX /* XTX Technology Limited */ --2.34.1
Hi Simon,
I just want to apply:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]
Thanks,
SSunk
Quoted 100 lines · Simon Glass <[email protected]> 于2023年8月15日周二 06:43写道:
Hi,
Quoted 3 lines · Clus Tom
Hi Simon,
I'm not quite sure what you mean by v2, if it's the previous email, itonly removes the XM25QH128C part of the commit message compared to the previous one.
Quoted 1 line
Right, so it is v2.
Your emails seem to have generated 3 patches:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
The version number helps the maintainer figure out which one to apply.
Regards,
Simon- Simon
Quoted 21 lines
Thanks,
SSunkQuoted 17 lines · Simon Glass <[email protected]> 于2023年8月13日周日 21:36写道:
Quoted 9 lines · SSunk
Add XMC XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
site: https://www.xmcwh.com/site/productSigned-off-by Kankan Sun <[email protected]>--- configs/evb-ast2600_defconfig | 1 + drivers/mtd/spi/spi-nor-ids.c | 4 ++++ 2 files changed, 5 insertions(+)Reviewed-by Simon Glass <[email protected]>I think this is v2 so it should have that as well as a change list. You can use 'patman' to help with this.
Quoted 7 lines
Quoted 7 lines
Regards,
SimonReview
Quoted 2 lines
(quoted diff) +0
-0b/configs/evb-ast2600_defconfig
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
index
9244654c82..f06c0e1fe1100644configs/evb-ast2600_defconfig +0
-0@@ -100,6 +100,7 @@ CONFIG_SPI_FLASH_SPANSION=yQuoted 8 lines
Quoted 8 lines
Review
Quoted 8 lines
configs/evb-ast2600_defconfig +1
-0CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_XMC=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHY_REALTEK=y CONFIG_PHY_NCSI=y(quoted diff) +0
-0
b/drivers/mtd/spi/spi-nor-ids.cQuoted 5 lines
Quoted 5 lines
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 531
Quoted 5 lines
index 4587215984..80d7678293 100644
drivers/mtd/spi/spi-nor-ids.c +0
-0@@ -531,6 +531,10 @@ const struct flash_info spi_nor_ids[] = { { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 532
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +0
-0{ INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 533
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +0
-0{ INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 534
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QH256C", 0x204019, 0, 64 * 1024, 512, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 535
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QU256C", 0x204119, 0, 64 * 1024, 512, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 536
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QH512C", 0x204020, 0, 64 * 1024, 1024, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },Quoted 1 line
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c const struct flash_info spi_nor_ids[] = { · line 537
Quoted 1 line
drivers/mtd/spi/spi-nor-ids.c +1
-0+ { INFO("XM25QU512C", 0x204120, 0, 64 * 1024, 1024, SECT_4K |
SPI_NOR_DUAL_READ|SPI_NOR_QUAD_READ|SPI_NOR_4B_OPCODES) },Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mtd/spi/spi-nor-ids.c +0
-1#endif #ifdef CONFIG_SPI_FLASH_XTX /* XTX Technology Limited */ --2.34.1
Quoted 48 lines
Hi Michael,
Since this is the first time I've submitted code to the Linux community, please forgive me for some of the missteps that I've made. I uploaded the incorrect patch file.
In a previous e-mail you said:
XMC parts seem to have SFDP tables and they should work out of the box
without any patches with the generic spi nor driver [1]. Therefore,
you don't need any entry at all.I think it is related to the
PARSE_SFDPflag.
The XMC flash part supports SFDP, so i don’t need to addNO_SFDP_FLAGS()macro.drivers/mtd/spi-nor/xmc.c| 17 +++++++++++++----1 file changed, 13 insertions(+), 4 deletions(-)drivers/mtd/spi-nor/xmc.c +13
-4@@ -11,11 +11,20 @@static const struct flash_info xmc_nor_parts[] = {/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ {"XM25QH64A" ,INFO (0x207017 ,0 ,64 *1024 ,128 ) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ | -SPI_NOR_QUAD_READ ) }, + PARSE_SFDP }, {"XM25QH128A" ,INFO (0x207018 ,0 ,64 *1024 ,256 ) -NO_SFDP_FLAGS (SECT_4K |SPI_NOR_DUAL_READ | -SPI_NOR_QUAD_READ ) }, + PARSE_SFDP }, + {"XM25QH128C" ,INFO (0x204018 ,0 ,64 *1024 ,256 ) + PARSE_SFDP }, + {"XM25QH256C" ,INFO (0x204019 ,0 ,64 *1024 ,512 ) + PARSE_SFDP }, + {"XM25QU256C" ,INFO (0x204119 ,0 ,64 *1024 ,512 ) + PARSE_SFDP }, + {"XM25QH512C" ,INFO (0x204020 ,0 ,64 *1024 ,1024 ) + PARSE_SFDP }, + {"XM25QU512C" ,INFO (0x204120 ,0 ,64 *1024 ,1024 ) + PARSE_SFDP }, + };const struct spi_nor_manufacturer spi_nor_xmc = {Quoted 6 lines
Correct. If the flash is working with
PARSE_SFDP, it has SFDP and all the information of theflash_infotable is pulled from the SFDP tables, except for the part name. Therefore, you don't need any entry at all. The flash should just work out of the box. Are you using the latest kernel?
Quoted 1 line
Quoted 1 line
-michael
--
Hi Michael,
According to you, does this piece of my code still need to be modified?
Thanks,
Ssunk
Quoted 4 lines
Hi Simon,
I just want to apply:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]
Quoted 38 lines
Thanks,
SSunkQuoted 33 lines · Simon Glass <[email protected]> 于2023年8月15日周二 06:43写道:
Hi,
Quoted 3 lines · Clus Tom
Hi Simon,
I'm not quite sure what you mean by v2, if it's the previous email, itonly removes the XM25QH128C part of the commit message compared to the previous one.
Quoted 1 line
Right, so it is v2.
Your emails seem to have generated 3 patches:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
The version number helps the maintainer figure out which one to apply.
Regards,
Simon- Simon
--
Hi Simon,
When will this patch be merged into the master branch?
Thanks,
SSunk