Skip to content

Commit 8549302

Browse files
committed
Restore Agilex 5 SDHCI host reset to match hardware-proven behavior
1 parent c8c0f08 commit 8549302

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

arch.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ ifeq ($(ARCH),AARCH64)
175175
CFLAGS+=-DWOLFBOOT_DUALBOOT -DWOLFBOOT_UBOOT_LEGACY
176176
# BL31 owns GICv3 and secondary-core/PSCI setup. Do not touch RVBAR.
177177
CFLAGS+=-DSKIP_RVBAR=1 -DSKIP_GIC_INIT=1
178-
# SPL/TF-A leave the Cadence host initialized; retain its PHY state and
179-
# allow the controller's required post-command settle time.
180-
CFLAGS_EXTRA+=-DSDHCI_SKIP_HOST_RESET=1 -DSDHCI_WAIT_AFTER_CMD_US=1000
178+
# Full SDHCI host reset: SPL leaves the Cadence host in UHS-I 1.8V/SDR104,
179+
# which mutes CMD8 against the 3.3V re-powered card (hardware-verified).
181180
endif
182181

183182
ifeq ($(TARGET),nxp_ls1028a)

hal/agilex5.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ void sdhci_reg_write(uint32_t offset, uint32_t value)
301301

302302
void sdhci_platform_init(void)
303303
{
304-
/* SPL initialized the host, clocks, reset and pinmux while loading BL31
305-
* and BL33. Preserve that live host state and restore the 013B PHY timing
306-
* required after wolfBoot takes ownership from TF-A. */
304+
/* SPL initialized the clocks and pinmux; the generic driver then soft
305+
* resets the host, so restore the 013B PHY timing here. */
307306
if (agilex5_sdhci_phy_init() != 0)
308307
wolfBoot_printf("SDHCI: Cadence PHY initialization timed out\n");
309308
}

0 commit comments

Comments
 (0)