Skip to content

Emmcio module - #11257

Merged
tannewt merged 9 commits into
adafruit:mainfrom
FoamyGuy:emmcio_module
Aug 31, 2026
Merged

tannewt merged 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.

Comment thread shared-module/emmcio/__init__.h
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

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

Thank you! I think the one failing test is unrelated and fixed already.

@tannewt
tannewt merged commit dce73ac into adafruit:main Aug 31, 2026
693 of 695 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants