-
Notifications
You must be signed in to change notification settings - Fork 8.1k
drivers: memc_mcux_flexspi: force applying OVRDVAL #96957
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: memc_mcux_flexspi: force applying OVRDVAL #96957
Conversation
Enable this kconfig setting to force using a specific raw value for the OVRDVAL field in the DLLCR registers. This option gives more granularity than the 'data-valid-time' field in the dts. The unit of 'data-valid-time' is nanoseconds while the unit of OVRDVAL are raw delay cells. Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device will set the OVRDVAL and OVRDEN fields in the DLLCR register but works only when the 'rx-clock-source' is configured to '#0 External input from DQS pad' and the frequency <= 100MHz. Signed-off-by: Andre Heinemans <[email protected]>
|
| #if (CONFIG_FLASH_MCUX_FLEXSPI_FORCE_USING_OVRDVAL == 1) | ||
| data->base->DLLCR[port >> 1U] = FLEXSPI_DLLCR_OVRDEN(1) | | ||
| FLEXSPI_DLLCR_OVRDVAL(CONFIG_FLASH_MCUX_FLEXSPI_OVRDVAL); | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AndreHeinemans-NXP, May I ask about your motivation or a specific use case for proposing these changes?
In the function FLEXSPI_SetFlashConfig(), there is a mechanism that allows override and calculates the override value based on flexspirootclk.
Did you find that this function does not meet your use case requirements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are referring to 'data-valid-time' which can be configured in the dts. I tried to use it but it seems that this field is only effective when rx-clock-source=3 (external DQS). See src. In the other cases, the boolean isUnifiedConfig will be set and results in having a default value being used.
I'm am working on the NavQ95 and currently there are some problems with the DQS signal. So I need to configure the rx-clock-source to 1 (Loopback from DQS pad). Within this mode it is not possible to get the correct value set by using the 'data-valid-time'.
Besides, it allows more granularity since the unit of 'data-valid-time' is nanoseconds while the unit of OVRDVAL are raw delay cells.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AndreHeinemans-NXP, thank you for your explanations. It is clear to me.



Enable this kconfig setting to force using a specific raw value for the OVRDVAL field in the DLLCR registers.
This option gives more granularity than the 'data-valid-time' field in the dts. The unit of 'data-valid-time' is nanoseconds while the unit of OVRDVAL are raw delay cells.
Normally the 'data-valid-time' on any 'nxp,imx-flexspi-device' device will set the OVRDVAL and OVRDEN fields in the DLLCR register but works only when the 'rx-clock-source' is configured to '# 3 External input from DQS pad' and the frequency <= 100MHz.
This option allows this OVRDVAL value being set under all circumstances.