-
Notifications
You must be signed in to change notification settings - Fork 6k
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
sd: fix frequency and timing selection logic #72705
sd: fix frequency and timing selection logic #72705
Conversation
Use frequency macros to define SD frequencies, this should increase readability of the file and reduce errors. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add UNSUPPORTED frequency macro for HS mode frequencies, used when a card does not support any high speed mode frequencies Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add DEFAULT and HIGH_SPEED bus speeds to SD spec definition, for non UHS cards. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
SDMMC framework frequency and timing selection logic has several longstanding issues, including: - requiring that SD hosts support the maximum frequency possible for a given UHS mode in order to apply that timing - selecting SDHC_TIMING_SDR25 for high speed mode, when SDHC_TIMING_HS would be correct Rework the frequency and timing selection logic within the SD framework to resolve these issues. Fixes zephyrproject-rtos#52589 Fixes zephyrproject-rtos#67943 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Reword frequency and timing selection logic for SDIO framework so that the maximum supported timing mode between the card and host will be selected, even if the maximum frequency supported by the host is not equal to the maximum frequency for that mode. Also, resolve an issue where a host and card combo only supporting HS mode or worse would still use legacy timing mode, because the CCCR flags were not being checked when checking if HS bus speed could be used. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Report bus frequency, and use correct names for the timing modes when SD cards do not support UHS modes. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
RCAR MMC driver previously had to report inaccurate maximum supported frequency to SD subsystem so that the subsystem would select SDR104 mode timing. Remove this logic, as it should no longer be needed. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
03fac6a
to
609e638
Compare
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.
Changes have been checked on a real board; everything works as expected.
Thanks for verifying this- I also checked these changes on an RT1170 ( |
Reassigning, as I can't review my own PR |
SDMMC framework frequency and timing selection logic has several
longstanding issues, including:
given UHS mode in order to apply that timing
would be correct
Rework the frequency and timing selection logic within the SD framework
to resolve these issues.
Fixes #52589
Fixes #67943
This PR also includes a similar rework for the frequency selection logic in the SDIO framework, as the same issue exists there