Skip to content

Emmcio module - #11257

Open
FoamyGuy wants to merge 9 commits into
adafruit:mainfrom
FoamyGuy:emmcio_module
Open

Emmcio module#11257
FoamyGuy wants to merge 9 commits into
adafruit:mainfrom
FoamyGuy:emmcio_module

Conversation

@FoamyGuy

Copy link
Copy Markdown
Collaborator

adds emmcio module with support for auto-mounting at /sd.

Some changes based on feedback in the prior PR:

  • Error messages are refactored to use existing strings instead of new ones
  • removed scsi inquiry product id for emmc LUN
  • removed automount crumb fallback
  • removed automount_status(), it had no analogy in sdcardio or sdioio.

Currently compile tested only. Testing on hardware requires SP-1 board def which I'm working on next and then will make a local merged branch to validate the behavior of this branch. Will un-draft after it's tested

Question from previous PR review:

Instead of using SPI directly, could you use the common_hal abstraction and put this in shared modules?

The module isn't speaking SPI. It's the 1-bit MMC bus: a clock, a bidirectional CMD line, and a bidirectional DAT0 line. SPIM3 is being used as a raw shift-and-clock engine on a single wire, not as a SPI primary/controller. MOSI and MISO are the same pin, rebound per transfer. The DMA transfer happens mid-frame, between bit-banged phases.

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Getting better! Do we really need to guard so heavily against the emmc not coming up? Since it's on the board I'd expect it to just work.

#if CIRCUITPY_EMMC_USB

#ifndef CIRCUITPY_EMMC_MOUNT_PATH
#define CIRCUITPY_EMMC_MOUNT_PATH "/sd"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we sure we want this? Or should it be /emmc?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I had it as /emmc at first and changed it to /sd to be consistent with Yoto devices after it was mentioned that I should try to model this on the work that done in them. Personally I have no strong opinion which it uses.

Comment thread shared-bindings/emmcio/__init__.c
Comment thread shared-bindings/emmcio/__init__.c Outdated
Comment thread shared-bindings/emmcio/__init__.c Outdated
Comment thread ports/nordic/common-hal/emmcio/__init__.c
Comment thread ports/nordic/common-hal/emmcio/EMMC.c Outdated
@tannewt

tannewt commented Aug 28, 2026

Copy link
Copy Markdown
Member

I think you can mark this ready. It looks fine to me. I poked the CI. The two failing tests are in Zephyr and I have a separate PR to extend their timeouts.

@FoamyGuy
FoamyGuy marked this pull request as ready for review August 28, 2026 16:31
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

2 participants