diff mbox series

[15/16] spacemit: k1: Add support for mmc regulator initialization

Message ID 20260422143112.1329478-16-raymondmaoca@gmail.com
State New
Delegated to: Andes
Headers show
Series Add PIN and SPI support for Spacemit K1 | expand

Commit Message

Raymond Mao April 22, 2026, 2:31 p.m. UTC
From: Raymond Mao <raymond.mao@riscstar.com>

Initialize the 1.8V supply for the MMC I/O domain to ensure proper
voltage configuration for MMC interfaces. This is required for
reliable operation of the MMC controller.

Signed-off-by: Raymond Mao <raymond.mao@riscstar.com>
---
 board/spacemit/k1/spl.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/board/spacemit/k1/spl.c b/board/spacemit/k1/spl.c
index 9b30bc9ea7e..2556dfe047a 100644
--- a/board/spacemit/k1/spl.c
+++ b/board/spacemit/k1/spl.c
@@ -196,6 +196,9 @@  static void set_vdd_mmc(void)
 	ret = regulator_get_by_platname("vdd_1v8_mmc", &dev);
 	if (ret)
 		panic("Fail to detect vdd_1v8_mmc (%d)\n", ret);
+	ret = regulator_set_value(dev, 1800000);
+	if (ret)
+		log_warning("Fail to set vdd_1v8_mmc as 1800000 (%d)\n", ret);
 	ret = regulator_set_enable(dev, true);
 	if (ret)
 		log_warning("Fail to enable vdd_1v8_mmc (%d)\n", ret);