Skip to content
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

SDHCI vs EMMC on Pi 5 #5937

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Conversation

P33M
Copy link
Contributor

@P33M P33M commented Feb 9, 2024

This fixes writes on the Raspikey for me and corrects a few more benign bugs.

I still can't boot from it, though - something goes wrong when attempting to switch MMC partitions - unrelated to IO errors.

Switch to using card-detection via GPIO, and add missing emmc_cmd pin.
Also, "emmc_*" isn't the name of the respective function, but the name
of the pin. These pins are single-function, but need pulls set
accordingly.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
The SDIO_CFG register SD_PIN_SEL conflates two settings - whether eMMC
HS or SD UHS timings are applied to the interface, and whether or not
the card-detect line is functional. SD_PIN_SEL can only be changed when
the SD clock isn't running, so add a bcm2712-specific clock setup.

Toggling SD_PIN_SEL at runtime means the integrated card-detect feature
can't be used, so this controller needs a cd-gpios property.

Also fix conditionals for usage of the delay-line PHY - no-1-8-v will
imply no bits set in hsemmc_mask or uhs_mask, so remove it.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
The pad control registers are concatenated onto the GPIO pad control
registers, as with previous steppings.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
@pelwell
Copy link
Contributor

pelwell commented Feb 13, 2024

Is this worth merging as is, or would you rather wait until booting works?

@P33M
Copy link
Contributor Author

P33M commented Feb 13, 2024

This is an improvement (and gets CM5 HS400 working) - the raspikey is a separate issue.

@pelwell pelwell merged commit c5b9ec4 into raspberrypi:rpi-6.6.y Feb 13, 2024
12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Feb 13, 2024
See: raspberrypi/linux#5930

kernel: drm/vc4: Disable overrun interrupts
See: raspberrypi/linux#5935

kernel: drivers: thermal: step_wise: add support for hysteresis
See: raspberrypi/linux#5936

kernel: media: rp1: cfe: Actually use the number of lanes configured
See: raspberrypi/linux#5941

kernel: PCI: brcmstb: Enable CRS software visibility after linkup
See: raspberrypi/linux#5889

kernel: SDHCI vs EMMC on Pi 5
See: raspberrypi/linux#5937
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Feb 13, 2024
See: raspberrypi/linux#5930

kernel: drm/vc4: Disable overrun interrupts
See: raspberrypi/linux#5935

kernel: drivers: thermal: step_wise: add support for hysteresis
See: raspberrypi/linux#5936

kernel: media: rp1: cfe: Actually use the number of lanes configured
See: raspberrypi/linux#5941

kernel: PCI: brcmstb: Enable CRS software visibility after linkup
See: raspberrypi/linux#5889

kernel: SDHCI vs EMMC on Pi 5
See: raspberrypi/linux#5937
@geerlingguy
Copy link

Mmm... if I'm reading correctly, this could greatly speed up flashing compute module eMMC? Probably my number one pain point with CM4/eMMC modules.

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.

None yet

3 participants