Skip to content

Commit

Permalink
general-fix-mmc-signal-voltage-before-reboot(:1)
Browse files Browse the repository at this point in the history
Original-Subject: mmc: core: set initial signal voltage on power off
Some boards have SD card connectors where the power rail cannot be switched
off by the driver. If the card has not been power cycled, it may still be
using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
will fail to boot from a UHS card that continue to use 1.8V signaling.

Set initial signal voltage in mmc_power_off() to allow re-boot to function.

This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
same issue have been seen on some Rockchip RK3399 boards.

I am sending this as a RFC because I have no insights into SD/MMC subsystem,
this change fix a re-boot issue on my boards and does not break emmc/sdio.
Is this an acceptable workaround? Any advice is appreciated.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
X-Armbian: Patch-File: general-fix-mmc-signal-voltage-before-reboot
X-Armbian: Patch-File-Counter: 1
X-Armbian: Patch-Rel-Directory: patch/kernel/archive/rockchip64-6.1
X-Armbian: Patch-Type: kernel
X-Armbian: Patch-Root-Type: core
X-Armbian: Patch-Sub-Type: common
X-Armbian: Original-Subject: mmc: core: set initial signal voltage on power off
  • Loading branch information
Kwiboo authored and Armbian AutoPatcher committed Feb 17, 2019
1 parent abb0c49 commit 922ea1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,14 @@ void mmc_power_off(struct mmc_host *host)
if (host->ios.power_mode == MMC_POWER_OFF)
return;

mmc_set_initial_signal_voltage(host);

/*
* This delay should be sufficient to allow the power supply
* to reach the minimum voltage.
*/
mmc_delay(host->ios.power_delay_ms);

mmc_pwrseq_power_off(host);

host->ios.clock = 0;
Expand Down

0 comments on commit 922ea1e

Please sign in to comment.