Skip to content

Conversation

@AndreHeinemans-NXP
Copy link
Contributor

@AndreHeinemans-NXP AndreHeinemans-NXP commented Oct 3, 2025

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.

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]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2025

#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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@cfriedt cfriedt merged commit 35396b1 into zephyrproject-rtos:main Oct 20, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants