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

enable SDHC support on imx93 Cortex-A Core platform #87635

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JiafeiPan
Copy link
Collaborator

@JiafeiPan JiafeiPan commented Mar 25, 2025

imx usdhc driver updates:

  1. clang format the driver
  2. include soc.h conditionally
  3. enable MMIP mapping

Enable USDHC support for imx93 Cortex-A Core platform

Depend on zephyrproject-rtos/hal_nxp#524

@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 25, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@c41a401 zephyrproject-rtos/hal_nxp#524 zephyrproject-rtos/hal_nxp#524/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_nxp DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Mar 25, 2025
@JiafeiPan JiafeiPan changed the title Develop/imx93 sdhc enable SDHC support on imx93 Cortex-A Core platform Mar 25, 2025
@@ -108,6 +110,23 @@ Serial Port
This board configuration uses a single serial communication channel with the
CPU's UART2 for A55 core and M33 core.

uSDHC (SD or eMMC Interface)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming this can't be enabled on the board by default (is this USDHC interface shared with Linux/Uboot?)- can we add some form of testcase definition in tests/subsys/sd/sdmmc to validate that the subsystem works on this board?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi, @danieldegrasse, good catch, currently we rely on uboot or linux to start A-core zephyr, so Zephyr can't use the same uSDHC controller with uboot or Linux, that is to say:

  1. if board is booted from SD Card (which uses uSDHC2), so we only could use uSDHC1 for Zephyr tests/subsys/sd/mmc testing.
  2. if board is booted from mmc (which uses uSDHC1), so we only could use uSDHC2 for Zephyr tests/subsys/sd/sdmmc testing

I will update this document and provides overlay for both uSDHC controllers to address this issues, thanks.

@JiafeiPan JiafeiPan force-pushed the develop/imx93-sdhc branch 2 times, most recently from b4b7fd1 to 3c3f288 Compare March 26, 2025 07:46
@JiafeiPan
Copy link
Collaborator Author

V2: Addressed @danieldegrasse's comments, added two overlay for each uSDHC controller, and updated document to address need to avoid conflict with U-Boot and Linux.

Format the driver by using clang-format.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
There is no soc.h for some platform, so only include it when it is
available.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Enable MMIO mapping in the driver.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Add device nodes for SDHC.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Tmp patch for dependency on hal_nxp PR 524.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
@JiafeiPan JiafeiPan force-pushed the develop/imx93-sdhc branch 2 times, most recently from af1d47f to 0244d33 Compare March 26, 2025 08:18
Added pinctrl and dts nodes for uSDHC1 and uSDHC2, they are disabled
by default, and provided overlay file to enable uSDHC2 if needed.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Signed-off-by: Lei Xu <lei.xu@nxp.com>
@JiafeiPan
Copy link
Collaborator Author

Hi, @danieldegrasse , would you please review this PR again? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM64 ARM (64-bit) Architecture area: Disk Access DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers platform: NXP MPU
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants