[PATCH v6 21/21] mtd: spi-nor-core: Allow using Micron mt35xu512aba in Octal DTR mode

Vignesh Raghavendra vigneshr at ti.com
Mon Jul 13 10:25:49 CEST 2020



On 08/07/20 5:26 pm, Jagan Teki wrote:
> On Fri, Jun 5, 2020 at 6:16 PM Pratyush Yadav <p.yadav at ti.com> wrote:
>>
>> Since this flash doesn't have a Profile 1.0 table, the Octal DTR
>> capabilities are enabled in the post SFDP fixup, along with the 8D-8D-8D
>> fast read settings.
>>
>> Enable Octal DTR mode with 20 dummy cycles to allow running at the
>> maximum supported frequency of 200Mhz.
>>
>> The flash supports the soft reset sequence. So, add the flag in the
>> flash's info.
>>
>> Signed-off-by: Pratyush Yadav <p.yadav at ti.com>
>> ---
>>  drivers/mtd/spi/Kconfig        |  8 ++++
>>  drivers/mtd/spi/spi-nor-core.c | 87 ++++++++++++++++++++++++++++++++++
>>  drivers/mtd/spi/spi-nor-ids.c  |  4 +-
>>  include/linux/mtd/spi-nor.h    | 10 +++-
>>  4 files changed, 106 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
>> index ecfed6d215..9c549b39b7 100644
>> --- a/drivers/mtd/spi/Kconfig
>> +++ b/drivers/mtd/spi/Kconfig
>> @@ -170,6 +170,14 @@ config SPI_FLASH_STMICRO
>>         help
>>           Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx)
>>
>> +config SPI_FLASH_MT35XU
>> +       bool "Micron MT35XU chip support"
>> +       depends on SPI_FLASH_STMICRO
>> +       help
>> +        Add support for the Micron MT35XU chip. This is a separate config
>> +        because the fixup hooks for this flash add extra size overhead. Boards
>> +        that don't use the flash can disable this to save space.
> 
> This one and 20/21 are introducing the Kconfig options for single type
> flashes in the micron family, does other effect size issues if dtr
> make it available for STMICRO chips? if so, having a flash option of
> dtr would much better and I hope Linux does it similarly.
> 

Yeah, making DTR sequence available to all flashes in STMICRO is not
good idea given the fact that increase in code size is not negligible.
Currently DTR mode is only supported for Octal flashes also majority of
the flashes supported by U-Boot are legacy devices that have no support
for DTR mode at all. So it does not make DTR mode available with just
SPI_FLASH_STMICRO enabled.

As evident from code DTR switch sequence is different for different
vendors... MT35XU flash is from Micron (patch 21/21) and S28 (patch
20/21) is from Cypress. Both flashes have very different Octal DTR
programming sequence, and I expect this to be different for other
vendors such as STM and Macronix etc.
Also, DTR switch sequence differs across family of flashes even if they
are from same vendor.. Hence, unfortunately, vendor + family specific
Kconfigs are required to keep the code size in check.




More information about the U-Boot mailing list