Skip to content

Commit

Permalink
FydetabDuo: Disable UHS-I speed modes for SDMMC in ACPI
Browse files Browse the repository at this point in the history
Windows may fail to load with UNMOUNTABLE_BOOT_DEVICE otherwise. I was
able to boot *mostly* fine until today, but now it crashes constantly.

It appears there are some signal integrity issues at SDR50/104, no
matter the clock rate (tried lowering it to 150, 100 and 50 MHz).
Tuning seems to complete okay, but after a CMD18 it starts going haywire
with Data/Command CRC errors and can't recover.

Tested again on an Indiedroid Nova and the issue does not reproduce.

So unfortunately we have to limit the speed here to HS 25 MB/s.

Signed-off-by: Mario Bălănică <[email protected]>
  • Loading branch information
mariobalanica committed Jul 10, 2024
1 parent 19360cf commit 915093f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
#define BOARD_CODEC_GPIO "\\_SB.GPI1"
#define BOARD_CODEC_GPIO_PIN GPIO_PIN_PC0

//
// WORKAROUND:
// SDMMC may be unreliable at UHS-I speeds.
//
#define SDMMC_CAP_DDR50 0
#define SDMMC_CAP_SDR50 0
#define SDMMC_CAP_SDR104 0

DefinitionBlock ("Dsdt.aml", "DSDT", 2, "RKCP ", "RK3588 ", 2)
{
Scope (\_SB_)
Expand Down
16 changes: 13 additions & 3 deletions edk2-rockchip/Silicon/Rockchip/RK3588/AcpiTables/Sdhc.asl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

#include "AcpiTables.h"

#ifndef SDMMC_CAP_DDR50
#define SDMMC_CAP_DDR50 1
#endif
#ifndef SDMMC_CAP_SDR50
#define SDMMC_CAP_SDR50 1
#endif
#ifndef SDMMC_CAP_SDR104
#define SDMMC_CAP_SDR104 1
#endif

Scope (\_SB_) {
Name (SDRM, 1) // SD slot is removable

Expand Down Expand Up @@ -41,9 +51,9 @@ Scope (\_SB_) {
Package () { "max-frequency", 200000000 },
Package () { "bus-width", 4 },
Package () { "cap-sd-highspeed", 1 },
Package () { "sd-uhs-ddr50", 1 },
Package () { "sd-uhs-sdr50", 1 },
Package () { "sd-uhs-sdr104", 1 },
Package () { "sd-uhs-ddr50", SDMMC_CAP_DDR50 },
Package () { "sd-uhs-sdr50", SDMMC_CAP_SDR50 },
Package () { "sd-uhs-sdr104", SDMMC_CAP_SDR104 },
}
})

Expand Down

0 comments on commit 915093f

Please sign in to comment.