]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: spi-nor-ids: Add support of flash protection to w25q128
authorSu Baocheng <baocheng.su@siemens.com>
Mon, 25 Jan 2021 02:59:05 +0000 (10:59 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 26 Feb 2021 08:05:25 +0000 (13:35 +0530)
commitde76ae36f622177e9af38b158d7f2f753d826d2c
treec375e4fe4611e5b54a120968b0c566a3926d5d53
parent6770c96fe59eca919805904c48fafac97720be74
mtd: spi-nor-ids: Add support of flash protection to w25q128

The NOR flash w25q128 denoted by JEDEC ID 0xef4018 actually represents
various models. From Winbond's website, I could only find 3 types of
them:

    W25Q128JV-IQ/JQ
    datasheet:https://www.winbond.com/resource-files/
w25q128jv%20revg%2004082019%20plus.pdf

    W25Q128FV (SPI Mode)
    datasheet: https://www.winbond.com/resource-files/
w25q128fv%20rev.m%2005132016%20kms.pdf

    W25Q128BV
    datesheet: https://www.winbond.com/resource-files/
w25q128bv_revh_100313_wo_automotive.pdf

According to the datasheets, all of these 3 types support BP(0,1,2) and
TB bits in the status register (SR), so it could reuse the flash
protection logic for ST Micro.

So it should be safe to add the SPI_NOR_HAS_LOCK and SPI_NOR_HAS_TB
flags to the w25q128 entry of spi_nor_ids table.

Signed-off-by: Su Baocheng <baocheng.su@siemens.com>
[jagan: remove comments in spi-nor-ids.c]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/mtd/spi/spi-nor-ids.c