overlays: sdhost: Add gpios_22_27 and bus_width parameters#7467
Open
zjzhao-eda wants to merge 1 commit into
Open
overlays: sdhost: Add gpios_22_27 and bus_width parameters#7467zjzhao-eda wants to merge 1 commit into
zjzhao-eda wants to merge 1 commit into
Conversation
Add two new optional parameters 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. - bus_width: Allows configuring the MMC bus width (defaults to 1). Both parameters are implemented as dormant fragments and have 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,bus_width=4,pio_limit=1
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