U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] mmc: dw_mmc: Allow use of in-spec voltage range for vqmmc-supply
@ 2026-06-28 10:25 Jonas Karlman
  2026-06-28 10:25 ` [PATCH 1/4] power: regulator: Add helper to set voltage within an acceptable range Jonas Karlman
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jonas Karlman @ 2026-06-28 10:25 UTC (permalink / raw)
  To: Peng Fan, Jaehoon Chung, Tom Rini
  Cc: Kaustabh Chakraborty, Simon Glass, u-boot, Jonas Karlman

The Rockchip RK3399 SoC SDMMC IO domain supports 1.8V and 3.0V mode, so
vqmmc-supply for SD-cards is typically limited to max 3.0V to avoid
damage to the SoC.

The SD Standards allow for an operating voltage range of 1.70V-1.95V and
2.7V-3.6V, meaning the 3.0V mode follows spec.

The commit 0b75109b6aaf ("mmc: dw_mmc: return error for invalid voltage
setting") help enforce strict 1.8V and 3.3V when setting vqmmc-supply
making mmc_set_signal_voltage() possible fail for MMC_SIGNAL_VOLTAGE_330
and can lead to an improper switch to MMC_SIGNAL_VOLTAGE_180.

This series adds a regulator_set_value_clamp() helper set voltage value
within a requested voltage range instead of an exact value, and changes
dw_mmc to use this helper to set a voltage within in-spec range to fix
use of SD-cards with 3.3V signal voltage on Rockchip RK3399 boards using
MMC_IO_VOLTAGE=y.

Jonas Karlman (4):
  power: regulator: Add helper to set voltage within an acceptable range
  test: dm: regulator: Add regulator_set_value_clamp() tests
  mmc: dw_mmc: Allow use of in-spec voltage range for vqmmc-supply
  mmc: sdhci: Use CONFIG_IS_ENABLED for MMC_IO_VOLTAGE

 arch/sandbox/dts/sandbox_pmic.dtsi         |  6 ++++
 doc/usage/cmd/dm.rst                       |  3 +-
 drivers/mmc/dw_mmc.c                       |  6 ++--
 drivers/mmc/sdhci.c                        |  2 +-
 drivers/power/regulator/regulator-uclass.c | 27 +++++++++++++++
 drivers/power/regulator/sandbox.c          | 11 ++++---
 include/power/regulator.h                  | 12 +++++++
 include/power/sandbox_pmic.h               | 15 +++++++--
 test/dm/regulator.c                        | 38 ++++++++++++++++++++++
 9 files changed, 109 insertions(+), 11 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-29  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 10:25 [PATCH 0/4] mmc: dw_mmc: Allow use of in-spec voltage range for vqmmc-supply Jonas Karlman
2026-06-28 10:25 ` [PATCH 1/4] power: regulator: Add helper to set voltage within an acceptable range Jonas Karlman
2026-06-29  5:21   ` Peng Fan
2026-06-28 10:25 ` [PATCH 2/4] test: dm: regulator: Add regulator_set_value_clamp() tests Jonas Karlman
2026-06-29  5:31   ` Peng Fan
2026-06-28 10:25 ` [PATCH 3/4] mmc: dw_mmc: Allow use of in-spec voltage range for vqmmc-supply Jonas Karlman
2026-06-29  5:27   ` Peng Fan
2026-06-28 10:25 ` [PATCH 4/4] mmc: sdhci: Use CONFIG_IS_ENABLED for MMC_IO_VOLTAGE Jonas Karlman
2026-06-29  5:31   ` Peng Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox