Skip to content

Commit 9861a6a

Browse files
committed
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 <[email protected]>
1 parent a8c3025 commit 9861a6a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/flash/flash_mcux_flexspi_nor.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,13 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
978978
/* Still return an error- we want the JEDEC configuration to run */
979979
return -ENOTSUP;
980980
case 0x40ef:
981+
if ((vendor_id & 0xFFFFFF) != 0x2040ef) {
982+
/*
983+
* This is not the correct flash chip, and will not
984+
* support the LUT table. Return here
985+
*/
986+
return -ENOTSUP;
987+
}
981988
/* W25Q512JV flash, use 4 byte read/write */
982989
flexspi_lut[READ][0] = FLEXSPI_LUT_SEQ(
983990
kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, SPI_NOR_CMD_4READ_4B,

0 commit comments

Comments
 (0)