Skip to content

Conversation

@JiafeiPan
Copy link
Contributor

@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, it has been merged.

@zephyrbot
Copy link

zephyrbot commented Mar 25, 2025

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

Name Old Revision New Revision Diff

All manifest checks OK

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
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
Contributor

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
Contributor 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
Contributor 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.

@JiafeiPan JiafeiPan force-pushed the develop/imx93-sdhc branch 2 times, most recently from af1d47f to 0244d33 Compare March 26, 2025 08:18
decsny
decsny previously approved these changes May 5, 2025
dleach02
dleach02 previously approved these changes May 6, 2025
@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label May 6, 2025
danieldegrasse
danieldegrasse previously approved these changes May 6, 2025
decsny
decsny previously approved these changes May 6, 2025
JiafeiPan added 5 commits May 11, 2025 20:14
Format the driver by using clang-format.

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>
Some drivers need header file soc.h, according to Zephyr SoC Porting Guide
soc.h must be provided for each SoC, so created an empty one.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
Added pinctrl and dts nodes for uSDHC1 and uSDHC2, they are disabled
by default, and provided overlay files to enable them if needed.

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

Rebased and removed west.yaml update as current commit of hal_nxp hal already included the update which this PR depends on.

@sonarqubecloud
Copy link

@kartben kartben merged commit 1a7642b into zephyrproject-rtos:main May 12, 2025
31 checks passed
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 platform: NXP Drivers NXP Semiconductors, drivers platform: NXP MPU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants