Skip to content

drivers: sdhc: Add support for Apollo510 SDIO host #92455

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fanwang-ambiq
Copy link

This commit adds apollo510 dts, dtsi, yaml to support apollo510 SDIO host, configured sdio power delay time to enhance apollo510 SDIO performance, fs_sample worked normally, the passed log as follow picture
fs_sample_pass_log

Copy link

github-actions bot commented Jul 1, 2025

Hello @fanwang-ambiq, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds Apollo510 SDIO host support by defining device tree nodes, board configuration, sample overlay, and YAML updates.

  • Introduces SDIO nodes (sdio0, sdio1) with power-delay settings in the SoC DTS include
  • Updates board DTS (apollo510_evb.dts) and pinctrl to configure SDIO interfaces
  • Provides sample overlay and Kconfig for FS sample, and marks sdio as a supported feature in board YAML

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
samples/subsys/fs/fs_sample/boards/apollo510_evb.overlay Enables SDIO0 and aliases it for the FS sample
samples/subsys/fs/fs_sample/boards/apollo510_evb.conf Turns on MMC/SDHC and related configs for Apollo510 EVB
dts/arm/ambiq/ambiq_apollo510.dtsi Adds sdio0/sdio1 nodes with timing and power-delay
boards/ambiq/apollo510_evb/apollo510_evb.yaml Includes sdio in supported features
boards/ambiq/apollo510_evb/apollo510_evb.dts Configures pinctrl, delays, and status for SDIO ports
boards/ambiq/apollo510_evb/apollo510_evb-pinctrl.dtsi Defines pin groups for SDIO0 and SDIO1 interfaces
Comments suppressed due to low confidence (4)

dts/arm/ambiq/ambiq_apollo510.dtsi:588

  • This 50ms value is a magic number that impacts card power-up timing; please add a comment or reference explaining how it was derived and why it optimizes performance.
			power-delay-ms = <50>;

boards/ambiq/apollo510_evb/apollo510_evb.dts:215

  • The &sdio1 node is enabled but has no mmc child for a disk device. If you intend to expose an SD card on SDIO1, add a mmc subnode (compatible = "zephyr,mmc-disk", disk-name, and status) similar to sdio0.
&sdio1 {

boards/ambiq/apollo510_evb/apollo510_evb-pinctrl.dtsi:440

  • [nitpick] Groups 2–5 reuse the same GPIO pins (GPIO_P161, GPIO_P175) with different ambiq,sdif-cdwp values, which may be confusing. Consider documenting the purpose of each group or refactoring duplicated settings.
		group5 {

samples/subsys/fs/fs_sample/boards/apollo510_evb.conf:1

  • There’s no test added to verify SDIO disk functionality with this configuration. Consider adding or enabling a CI test under tests/drivers/mmc or in the FS sample to catch SDIO regressions.
CONFIG_DISK_DRIVER_MMC=y

Copy link
Contributor

@swift-tk swift-tk left a comment

Choose a reason for hiding this comment

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

Please add or reuse a section in the zephyr\samples\subsys\fs\fs_sample\sample.yaml to let CI compile the sample for our boards.

@fanwang-ambiq fanwang-ambiq force-pushed the apollo510-sdio-update branch 2 times, most recently from 836cda8 to 8a6bcb7 Compare July 2, 2025 05:03
@swift-tk swift-tk force-pushed the apollo510-sdio-update branch from 8a6bcb7 to a3af4b2 Compare July 3, 2025 03:29
This commit adds support for ambiq SDIO host driver

Signed-off-by: Fan Wang <fan.wang@ambiq.com>
Copy link

sonarqubecloud bot commented Jul 3, 2025

@de-nordic de-nordic assigned swift-tk and unassigned de-nordic Jul 8, 2025
@de-nordic
Copy link
Contributor

@swift-tk Re-assigning to you as this is your platform (and I do not really know much about SDIO).

@swift-tk swift-tk assigned AlessandroLuo and unassigned swift-tk Jul 8, 2025
@danieldegrasse danieldegrasse added this to the v4.3.0 milestone Jul 8, 2025
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.

5 participants