[PATCH v2] mtd: spi-nor: Enable mt35xu512aba_fixups for all mt35xx flashes

Add SPI_NOR_OCTAL_DTR_READ flags to micron flashes mt35xu01g and mt35xu02g. Also move them under CONFIG_SPI_FLASH_MT35XU config, so that in driver mt35xu512aba_fixups will be applied.
Signed-off-by: Venkatesh Yadav Abbarapu venkatesh.abbarapu@amd.com --- Changes in v2: - Add the OCTAL_DTR_READ flags for mt35xu01g and mt35xu02g. - Removed the return after nor->fixups. --- drivers/mtd/spi/spi-nor-core.c | 5 ++++- drivers/mtd/spi/spi-nor-ids.c | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index ec841fb13bd..700593f7739 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -4404,7 +4404,10 @@ void spi_nor_set_fixups(struct spi_nor *nor) #endif
#ifdef CONFIG_SPI_FLASH_MT35XU - if (!strcmp(nor->info->name, "mt35xu512aba")) + if (!strcmp(nor->info->name, "mt35xu512aba") || + !strcmp(nor->info->name, "mt35xl512aba") || + !strcmp(nor->info->name, "mt35xu01g") || + !strcmp(nor->info->name, "mt35xu02g")) nor->fixups = &mt35xu512aba_fixups; #endif
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c index 91ae49c9484..9a69e210eb4 100644 --- a/drivers/mtd/spi/spi-nor-ids.c +++ b/drivers/mtd/spi/spi-nor-ids.c @@ -359,9 +359,11 @@ const struct flash_info spi_nor_ids[] = { { INFO("mt35xl512aba", 0x2c5a1a, 0, 128 * 1024, 512, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) }, { INFO("mt35xu512aba", 0x2c5b1a, 0, 128 * 1024, 512, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) }, { INFO("mt35xu01gaba", 0x2c5b1b, 0, 128 * 1024, 1024, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) }, + { INFO6("mt35xu01g", 0x2c5b1b, 0x104100, 128 * 1024, 1024, + USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) }, + { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, + USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES | SPI_NOR_OCTAL_DTR_READ) }, #endif /* CONFIG_SPI_FLASH_MT35XU */ - { INFO6("mt35xu01g", 0x2c5b1b, 0x104100, 128 * 1024, 1024, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) }, - { INFO("mt35xu02g", 0x2c5b1c, 0, 128 * 1024, 2048, USE_FSR | SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES) }, #endif #ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */ /* Spansion/Cypress -- single (large) sector size only, at least

On 12/5/24 4:29 AM, Venkatesh Yadav Abbarapu wrote:
Add SPI_NOR_OCTAL_DTR_READ flags to micron flashes mt35xu01g and mt35xu02g. Also move them under CONFIG_SPI_FLASH_MT35XU config, so that in driver mt35xu512aba_fixups will be applied.
Why? What problem are you trying to solve? Should we have a fixes tag? Why didn't you split these 2 changes in 2 dedicated patches?
Please read the following before submitting v3: https://docs.u-boot.org/en/latest/develop/sending_patches.html https://www.kernel.org/doc/html/latest/process/submitting-patches.html#descr...

-----Original Message----- From: Tudor Ambarus tudor.ambarus@linaro.org Sent: Thursday, December 5, 2024 1:20 PM To: Abbarapu, Venkatesh venkatesh.abbarapu@amd.com; u-boot@lists.denx.de; j-humphreys@ti.com Cc: Simek, Michal michal.simek@amd.com; jagan@amarulasolutions.com; vigneshr@ti.com; u-kumar1@ti.com; trini@konsulko.com; seanga2@gmail.com; caleb.connolly@linaro.org; sjg@chromium.org; william.zhang@broadcom.com; stefan_b@posteo.net; quentin.schulz@cherry.de; Takahiro.Kuwano@infineon.com; p-mantena@ti.com; git (AMD-Xilinx) git@amd.com Subject: Re: [PATCH v2] mtd: spi-nor: Enable mt35xu512aba_fixups for all mt35xx flashes
On 12/5/24 4:29 AM, Venkatesh Yadav Abbarapu wrote:
Add SPI_NOR_OCTAL_DTR_READ flags to micron flashes mt35xu01g and mt35xu02g. Also move them under CONFIG_SPI_FLASH_MT35XU config, so that in driver mt35xu512aba_fixups will be applied.
Why? What problem are you trying to solve? Should we have a fixes tag?
These two flashes mt35xu01g and mt35xu02g support DTR, so updated the flag SPI_NOR_OCTAL_DTR_READ which in turn uses this spi_nor_micron_octal_dtr_enable. Adding the support, not fixing anything. Let me know if anything missing from my side.
Why didn't you split these 2 changes in 2 dedicated patches?
Sure. Will split to two separate patches.
Thanks Venkatesh
Please read the following before submitting v3: https://docs.u-boot.org/en/latest/develop/sending_patches.html https://www.kernel.org/doc/html/latest/process/submitting-patches.html#descr... your-changes
participants (3)
-
Abbarapu, Venkatesh
-
Tudor Ambarus
-
Venkatesh Yadav Abbarapu