drivers: flexspi_nor: Fix Flash failures seen on FRDM-MCXN947

The flash_flexspi_nor_check_jedec() checks the lower 16-bits of
the manufacturer ID and installs a custom LUT table.
Add an exception to check for the whole 32-bits so we do not
accidentally install custom LUT for flash devices that do not
support this LUT table.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2024-11-07 14:41:32 -06:00
parent a8c3025de2
commit 9861a6a7c1
1 changed files with 7 additions and 0 deletions

View File

@ -978,6 +978,13 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
/* Still return an error- we want the JEDEC configuration to run */
return -ENOTSUP;
case 0x40ef:
if ((vendor_id & 0xFFFFFF) != 0x2040ef) {
/*
* This is not the correct flash chip, and will not
* support the LUT table. Return here
*/
return -ENOTSUP;
}
/* W25Q512JV flash, use 4 byte read/write */
flexspi_lut[READ][0] = FLEXSPI_LUT_SEQ(
kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, SPI_NOR_CMD_4READ_4B,