Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

@danieldegrasse danieldegrasse commented Oct 17, 2024

Add support for the W25Q512NW-IQ/IN with the FLEXSPI, using a custom
LUT table.

This PR also corrects the FLEXSPI frequency check for the RT1170 SOC, which was previously reclocking the FlexSPI to 24 MHz when running in XIP mode.

Note this change depends on #80016, and contains commits from that PR until it merges

Tested on mimxrt1170_evk//cm7 and mimxrt1170_evk@B//cm7 with samples/drivers/flash_shell

Fixes #80592

@decsny
Copy link
Member

decsny commented Oct 18, 2024

you might want to run clang format on the lines you are adding, you can run clang format on a line range

@danieldegrasse danieldegrasse force-pushed the feature/W25Q512NW-flexspi branch from c95fbdc to e237bbb Compare October 23, 2024 13:41
@danieldegrasse danieldegrasse marked this pull request as ready for review October 23, 2024 13:41
@danieldegrasse danieldegrasse added this to the v4.0.0 milestone Oct 23, 2024
@danieldegrasse
Copy link
Contributor Author

@de-nordic could you take a look at this PR?

@danieldegrasse danieldegrasse force-pushed the feature/W25Q512NW-flexspi branch from e237bbb to 5ea46f3 Compare October 25, 2024 18:54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just noticed that device identification here is done by two bytes only, which is not correct.
The W25Q512 IQ, full id 0xef6020 or 0xef8020 (the second bytes indicate QE fixed/select), has the same two bytes as w25Q128 0xef6019.
This means that the below identification may by mistake set 4 byte address config to 3 byte address device, which neither supports 133MHz operation nor configured commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch- would you like me to add a commit to this PR extending the device ID check for all the flash chips here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this can be too much of a change for this PR, just add if within case to filter out the w25Q128, using the last byte, or configure it properly.
I do not think it is proper to fix everything in this PR and you will have to go through docs to gather info which will probably delay the PR till you are ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've added a check to skip configuration if the full ID does not match the W25Q512NW. I don't have hardware to verify on at the moment, but reading the datasheet I believe the vendor ID should be read as 0x2060ef

@danieldegrasse danieldegrasse force-pushed the feature/W25Q512NW-flexspi branch from 5ea46f3 to b9f254f Compare October 26, 2024 19:08
Add support for the W25Q512NW-IQ/IN with the FLEXSPI, using a custom
LUT table.

Fixes zephyrproject-rtos#80592

Signed-off-by: Daniel DeGrasse <[email protected]>
RT11xx SOC init should check to see if the zephyr flash node is
set to a device on the FLEXSPI bus to determine if the part is running
in XIP mode. This check was incorrect, so the FLEXSPI was being
reclocked in XIP mode to 24 MHz. Fix this check so the FlexSPI is not
downclocked.

Fixes zephyrproject-rtos#75702

Signed-off-by: Daniel DeGrasse <[email protected]>
@decsny
Copy link
Member

decsny commented Nov 4, 2024

should this have bug label and 4.0 milestone

@mmahadevan108 mmahadevan108 merged commit 0856cee into zephyrproject-rtos:main Nov 5, 2024
24 checks passed
@mmahadevan108 mmahadevan108 deleted the feature/W25Q512NW-flexspi branch November 5, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not possible to write beyond 16MB using flash sample on RT1170 EVKB

5 participants