Skip to content
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

boards: nxp: frdm_mcxn947: enable USDHC0 #72601

Merged
merged 5 commits into from May 15, 2024

Conversation

danieldegrasse
Copy link
Collaborator

Enable support for USDHC0 sd host controller on FRDM_MCXN947. This support was verified with tests/subsys/sd/sdmmc, and tests/subsys/sd/sdio

Some USDHC IP instances do not have the voltage control bit present, as
they can only operate at 3.3V. Move code to select 1.8V mode into a
separate helper, and guard the call to UDSHC_SelectVoltage() behind a
feature macro from MCUX SDK.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Remove function for waiting for clock gate, as this is not used anywhere
within the USDHC driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Some instances of the USDHC peripheral take longer to reset, and will
timeout with the previous delay of 100 cycles. Extend this delay to 1000
cycles to resolve this.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add USDHC0 node to the mcxn94x devicetree. This node describes the one
instance of the Ultra Secured Digital Host Controller IP present on the
MCXN94x series SOCs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support for USDHC0 controller on FRDM_MCXN947 board. This support
was verified using the `tests/subsys/sd/sdmmc` and
`tests/subsys/sd/sdio` testcases. Note that this board does not ship
with the SD header (J12) populated by default, so the user must populate
one.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
@danieldegrasse
Copy link
Collaborator Author

Reassigning to @dleach02, as this PR only touches NXP drivers/hardware

if SD_STACK

# SD stack requires larger main stack size
config MAIN_STACK_SIZE
Copy link
Member

Choose a reason for hiding this comment

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

meaning "for most in tree samples" it needs a larger main stack size?

@@ -159,6 +159,14 @@ static void card_detect_gpio_cb(const struct device *port,
}
}

static void imx_usdhc_select_1_8v(USDHC_Type *base, bool enable_1_8v)
{
Copy link
Member

Choose a reason for hiding this comment

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

does this give no warning about empty body?

@nashif nashif merged commit f0af6aa into zephyrproject-rtos:main May 15, 2024
28 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.

None yet

7 participants