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:
parent
43b07894c3
commit
e8e43b60eb
1 changed files with 16 additions and 2 deletions
|
|
@ -936,6 +936,7 @@ static int flash_flexspi_nor_check_jedec(struct flash_flexspi_nor_data *data,
|
|||
{
|
||||
int ret;
|
||||
uint32_t vendor_id;
|
||||
uint32_t read_params;
|
||||
|
||||
ret = flash_flexspi_nor_read_id_helper(data, (uint8_t *)&vendor_id);
|
||||
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 (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:
|
||||
/*
|
||||
* IS25WP flash. We can support this flash with the JEDEC probe,
|
||||
* but we need to insure P[6:3] are at the default value
|
||||
*/
|
||||
/* Install Set Read Parameters (Volatile) command */
|
||||
uint32_t read_params = 0;
|
||||
read_params = 0;
|
||||
ret = flash_flexspi_nor_is25_clear_read_param(data, flexspi_lut, &read_params);
|
||||
if (ret < 0) {
|
||||
while (1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue