drivers: flash: flash_mcux_flexspi_nor: add IS25LP support

IS25LP flash chips have a similar P[6:3] register to the IS25WP series,
and need the same workaround.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-10-17 14:40:16 -05:00 committed by Stephanos Ioannidis
parent 43b07894c3
commit e8e43b60eb

View file

@ -936,6 +936,7 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
{ {
int ret; int ret;
uint32_t vendor_id; uint32_t vendor_id;
uint32_t read_params;
ret = flash_flexspi_nor_read_id_helper(data, (uint8_t *)&vendor_id); ret = flash_flexspi_nor_read_id_helper(data, (uint8_t *)&vendor_id);
if (ret < 0) { if (ret < 0) {
@ -944,13 +945,26 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
/* Switch on manufacturer and vendor ID */ /* Switch on manufacturer and vendor ID */
switch (vendor_id & 0xFFFF) { switch (vendor_id & 0xFFFF) {
case 0x609d: /* IS25LP flash, needs P[4:3] cleared with same method as IS25WP */
read_params = 0xE0U;
ret = flash_flexspi_nor_is25_clear_read_param(data, flexspi_lut, &read_params);
if (ret < 0) {
while (1) {
/*
* Spin here, this flash won't configure correctly.
* We can't print a warning, as we are unlikely to
* be able to XIP at this point.
*/
}
}
/* Still return an error- we want the JEDEC configuration to run */
return -ENOTSUP;
case 0x709d: case 0x709d:
/* /*
* IS25WP flash. We can support this flash with the JEDEC probe, * IS25WP flash. We can support this flash with the JEDEC probe,
* but we need to insure P[6:3] are at the default value * but we need to insure P[6:3] are at the default value
*/ */
/* Install Set Read Parameters (Volatile) command */ read_params = 0;
uint32_t read_params = 0;
ret = flash_flexspi_nor_is25_clear_read_param(data, flexspi_lut, &read_params); ret = flash_flexspi_nor_is25_clear_read_param(data, flexspi_lut, &read_params);
if (ret < 0) { if (ret < 0) {
while (1) { while (1) {