overlays: sdhost: Add gpios_22_27 and bus_width parameters#7467
Merged
Conversation
pelwell
reviewed
Jul 2, 2026
|
|
||
| debug Enable debug output (default off) | ||
|
|
||
| bus_width MMC bus width (default 1) |
Contributor
There was a problem hiding this comment.
The default bus-width is theoretically platform-dependent, but in practice it is always going to be 4.
Contributor
Author
There was a problem hiding this comment.
I've removed the bus_width parameter per your feedback and kept only gpios_22_27 . The commit has been updated with a proper description and Signed-off-by. Ready for review.
2d8d014 to
71f517c
Compare
Contributor
|
Delete the README entry for the bus_width parameter, then I'll merge it. |
Add a new optional parameter to the sdhost overlay: - gpios_22_27: Routes the SD0 interface to GPIO 22-27 (CLK, CMD, DAT0-3) using ALT0 function, with appropriate pull configuration (CLK: no pull, CMD/DAT: pull-up). This allows custom CM4 carrier boards to use a secondary SD card slot wired to these pins. The parameter is implemented as dormant fragments and has no effect unless explicitly activated, preserving full backward compatibility with existing configurations. Tested on CM4 carrier board (EDATEC IPC2100) with: dtoverlay=sdhost,gpios_22_27=on,pio_limit=1 Signed-off-by: zjzhao <zjzhao@edatec.cn>
71f517c to
872575c
Compare
Contributor
Author
|
Sorry, I forgot to update the README as well. I've now removed the bus_width parameter from both the DTS and the README. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
gpios_22_27andbus_widthparameters to the sdhost overlayto support CM4 custom carrier boards that route SD0 to GPIO 22-27.
Motivation
Some CM4 carrier boards (e.g. industrial IPC boards) wire a secondary
SD card slot to GPIO 22-27 rather than using eMMC. The stock sdhost
overlay provides no way to configure this pinmux, forcing users to
maintain separate out-of-tree overlays.
Changes
gpios_22_27override: activates fragments 3 and 4bus_widthoverride: exposes bus-width configurationTesting
Verified on CM4 + EDATEC IPC2100 carrier board:
config.txt used for testing:
dtoverlay=sdhost,gpios_22_27=on,bus_width=4,pio_limit=1