-
Notifications
You must be signed in to change notification settings - Fork 8k
drivers: flash: flexspi_mx25um51345g: fix DDR dummy cycles and correct max speed #97040
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
base: main
Are you sure you want to change the base?
drivers: flash: flexspi_mx25um51345g: fix DDR dummy cycles and correct max speed #97040
Conversation
In the DDR LUT, the dummy cycles were not defined for READ_STATUS_REG and had a wrong value for READ. The default amount of dummy cycles on this chip are 20 (0x14). This means the LUT should contain the value of 0x28 (0x14*2) for DDR at these entries. Signed-off-by: Andre Heinemans <[email protected]>
Maximum speed is 200MHz according to the mx25um51345g datasheet. Signed-off-by: Andre Heinemans <[email protected]>
The DDR LUT entry for ERASE_CHIP was configured with an incorrect kFLEXSPI_Command, resulting in the erase operation not being executed. Signed-off-by: Andre Heinemans <[email protected]>
|
@AndreHeinemans-NXP which platform(s) did you see issues with? This driver has been in the tree for a while so curious how you identified these needed changes. Would like to coordinate with @hakehuang to confirm CI coverage. |
@dleach02 The difference is maybe in the rx-clock-source setting. At first I had the driver configured with rx-clock-source='3 # External input from DQS pad'. With this setting the driver worked without a problem. But we encountered some issues with the DQS signal and for that reason I started using rx-clock-source='1 # Loopback from DQS pad'. With this setting the driver did not read the data correctly anymore as it requires the correct amount of dummy cycles in the lut. |
200M is quick challenging, let me run a regression, and feedback. |
@hakehuang I am going to make this change and lower the spi-max-frequency for the boards that require 120MHz. Depending on the results of your tests. |
In the DDR LUT, the dummy cycles were not defined for READ_STATUS_REG and had a wrong value for READ. The default amount of dummy cycles on this chip are 20 (0x14). This means the LUT should contain the value of 0x28 (0x14*2) for DDR
at these entries.
Maximum speed is 200MHz according to the mx25um51345g datasheet and is adjusted in the driver code accordingly.
Both changes were tested with an imx95 m7 connected to a mx25um51345g.
edit: Just discovered that the ERASE_CHIP DDR entry in the LUT was also incorrect. I put the fix for that in this PR as well.