Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: flash: flash_mcux_flexspi_nor: check all 3 bytes of JEDEC ID #82448

Merged

Conversation

danieldegrasse
Copy link
Collaborator

@danieldegrasse danieldegrasse commented Dec 2, 2024

The FlexSPI NOR driver should verify all 3 bytes of the JEDEC ID match the expected value before attempting to use a custom LUT table with a flash chip. This reduces the odds that an incompatible LUT will be used with a flash chip, as some flash chips may share the same first byte of their device ID but not be compatible with the custom LUT table.

This PR has been validated on the following flash chips using tests/drivers/flash/common:

  • W25Q128JW (RT1180)
  • W25Q64JVSSIQ (RT1040)
  • W25Q32JVWJ0 (RT1064,RT1024)
  • AT25SF128A (RT1010, RT1015)
  • IS25WP128 (RT1170,RT1160)
  • IS25LP064 (RT1020)
  • IS25WP064 (RT1060, RT1060-EVKB, RT1064)
  • MX25U51245G (RD RW612)
  • W25Q512JVFIQ (FRDM RW612)
  • W25Q64JVSSIQ (FRDM MCXN947)
  • W25Q512NW (RT1170-EVKB)

@danieldegrasse danieldegrasse added the DNM This PR should not be merged (Do Not Merge) label Dec 2, 2024
@zephyrbot zephyrbot added the platform: NXP Drivers NXP Semiconductors, drivers label Dec 2, 2024
@danieldegrasse
Copy link
Collaborator Author

Marking as DNM until I have verified this change on the full set of flash chips that these switch cases should support.

@danieldegrasse danieldegrasse added the block: HW Test Testing on hardware required before merging label Dec 2, 2024
The FlexSPI NOR driver should verify all 3 bytes of the JEDEC ID match
the expected value before attempting to use a custom LUT table with a
flash chip. This reduces the odds that an incompatible LUT will be used
with a flash chip, as some flash chips may share the same first byte of
their device ID but not be compatible with the custom LUT table.

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse danieldegrasse removed DNM This PR should not be merged (Do Not Merge) block: HW Test Testing on hardware required before merging labels Dec 3, 2024
@danieldegrasse danieldegrasse force-pushed the fix/flexspi-jedec-check branch from 27e7d99 to 58892bb Compare December 3, 2024 22:18
@danieldegrasse
Copy link
Collaborator Author

Hardware tests completed, PR should be good to go

@danieldegrasse
Copy link
Collaborator Author

@jtlas19 if you'd like to try this PR on your hardware please do. I expect flash should work correctly now that we are checking all 3 bytes of the JEDEC ID.

@jtlas19
Copy link

jtlas19 commented Dec 4, 2024

@jtlas19 if you'd like to try this PR on your hardware please do. I expect flash should work correctly now that we are checking all 3 bytes of the JEDEC ID.

Awesome work, I will give this a go today.

@jtlas19
Copy link

jtlas19 commented Dec 5, 2024

Tested and it is working on my hardware with the W25Q128JV.

@mmahadevan108 mmahadevan108 self-assigned this Dec 6, 2024
@mmahadevan108
Copy link
Collaborator

@de-nordic , I have added myself as the assignee as well as this touching only NXP Flash driver.

@kartben kartben merged commit c12030a into zephyrproject-rtos:main Dec 6, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash backport v3.7-branch Request backport to the v3.7-branch backport v4.0-branch Backport to the v4.0-branch platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants