From: Eric Chung <eric.chung@riscstar.com>
To: u-boot-spacemit@groups.io, u-boot@lists.u-boot-project.org,
u-boot@lists.u-boot-project.org
Cc: Tom Rini <trini@konsulko.com>, Tim Ouyang <tim609@andestech.com>,
Leo Liang <leo.liang@sifive.com>, Peng Fan <peng.fan@nxp.com>,
Huan Zhou <pericycle.cc@gmail.com>,
Raymond Mao <raymond.mao@riscstar.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>,
Tanmay Kathpalia <tanmay.kathpalia@altera.com>,
Kaustabh Chakraborty <kauschluss@disroot.org>,
Han Xu <han.xu@nxp.com>, Yanir Levin <yanir.levin@tandemg.com>,
Christoph Stoidner <c.stoidner@phytec.de>,
Balsundar Ponnusamy <balsundar.ponnusamy@altera.com>,
Daniel Palmer <daniel@thingy.jp>, Anshul Dalal <anshuld@ti.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>,
Angelo Dureghello <angelo@kernel-space.org>,
Johan Jonker <jbx6244@gmail.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
Guodong Xu <guodong@riscstar.com>, Yao Zi <me@ziyao.cc>,
Rick Chen <rick@andestech.com>, Leo <ycliang@andestech.com>,
Eric Chung <eric.chung@riscstar.com>
Subject: [PATCH v8 06/11] dts: k1: add SD card support in u-boot overlay
Date: Sun, 02 Aug 2026 00:40:47 +0800 [thread overview]
Message-ID: <20260802-m4-v8-6-e916643205f3@riscstar.com> (raw)
In-Reply-To: <20260802-m4-v8-0-e916643205f3@riscstar.com>
Add the SDH0 controller node and its pinctrl groups to the u-boot
overlay. The upstream DTS only contains the eMMC node; the SD card
controller (sdhci@d4280000) and its MMC1 pinctrl configuration are
missing. Place the new node inside the storage-bus via path-based
merge so it inherits the dma-ranges from the parent bus.
Signed-off-by: Eric Chung <eric.chung@riscstar.com>
---
v5:
- Append power source field on eMMC/SD pinctrl.
v3:
- Fix SD pinctrl as uhs.
v2:
- Use vmmc-supply as vqmmc-supply on SD node.
- Add alias of mmc0 and mmc1.
---
arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi | 91 ++++++++++++++++++++++++++++++-
arch/riscv/dts/k1-musepi-pro-u-boot.dtsi | 86 ++++++++++++++++++++++++++++-
2 files changed, 173 insertions(+), 4 deletions(-)
diff --git a/arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi b/arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi
index 7f9443d69510..4823cbc1f339 100644
--- a/arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi
+++ b/arch/riscv/dts/k1-bananapi-f3-u-boot.dtsi
@@ -6,6 +6,11 @@
#include "binman.dtsi"
/ {
+ aliases {
+ mmc0 = &emmc;
+ mmc1 = &sdhci0;
+ };
+
memory@0 {
device_type = "memory";
reg = <0x00000000 0x00000000 0x00000000 0x80000000>;
@@ -76,12 +81,14 @@
bootph-pre-ram;
};
- buck3 {
+ buck3_1v8: buck3 {
regulator-name = "vdd_1v8";
bootph-pre-ram;
};
- aldo1 {
+ buck4_3v3: buck4 { };
+
+ aldo1: aldo1 {
regulator-name = "vdd_1v8_mmc";
bootph-pre-ram;
};
@@ -89,6 +96,86 @@
};
};
+/ {
+ soc {
+ storage-bus {
+ sdhci0: mmc@d4280000 {
+ bootph-pre-ram;
+ compatible = "spacemit,k1-sdhci";
+ reg = <0x0 0xd4280000 0x0 0x200>;
+ clocks = <&syscon_apmu CLK_SDH_AXI>,
+ <&syscon_apmu CLK_SDH0>;
+ clock-names = "core", "io";
+ interrupts = <99>;
+ resets = <&syscon_apmu RESET_SDH_AXI>,
+ <&syscon_apmu RESET_SDH0>;
+ reset-names = "sdh_axi", "sdh0";
+ bus-width = <4>;
+ max-frequency = <204800000>;
+ cd-gpios = <&gpio K1_GPIO(80) GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default", "uhs";
+ pinctrl-0 = <&sdhci0_0_cfg>;
+ pinctrl-1 = <&sdhci0_1_cfg>;
+ status = "okay";
+ };
+ };
+ };
+};
+
+/* SD card pinctrl groups -- not present in upstream k1-pinctrl.dtsi */
+&pinctrl {
+ sdhci0_0_cfg: sdhci0-0-cfg {
+ grp_cmd_data {
+ pinmux = <K1_PADCONF(104, 0)>, /* MMC1_DAT3 */
+ <K1_PADCONF(105, 0)>, /* MMC1_DAT2 */
+ <K1_PADCONF(106, 0)>, /* MMC1_DAT1 */
+ <K1_PADCONF(107, 0)>, /* MMC1_DAT0 */
+ <K1_PADCONF(108, 0)>; /* MMC1_CMD */
+ bias-pull-up = <1>;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+ grp_clk {
+ pinmux = <K1_PADCONF(109, 0)>; /* MMC1_CLK */
+ bias-pull-down = <1>;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+ };
+
+ sdhci0_1_cfg: sdhci0-1-cfg { /* uhs */
+ grp_cmd_data {
+ pinmux = <K1_PADCONF(104, 0)>, /* MMC1_DAT3 */
+ <K1_PADCONF(105, 0)>, /* MMC1_DAT2 */
+ <K1_PADCONF(106, 0)>, /* MMC1_DAT1 */
+ <K1_PADCONF(107, 0)>, /* MMC1_DAT0 */
+ <K1_PADCONF(108, 0)>; /* MMC1_CMD */
+ bias-pull-up = <1>;
+ drive-strength = <42>;
+ power-source = <1800>;
+ };
+ grp_clk {
+ pinmux = <K1_PADCONF(109, 0)>; /* MMC1_CLK */
+ bias-pull-down = <1>;
+ drive-strength = <42>;
+ power-source = <1800>;
+ };
+ };
+};
+
+&emmc {
+ bootph-pre-ram;
+ resets = <&syscon_apmu RESET_SDH_AXI>, <&syscon_apmu RESET_SDH2>;
+ reset-names = "sdh_axi", "sdh2";
+ vqmmc-supply = <&buck3_1v8>;
+ vmmc-supply = <&aldo1>;
+ max-frequency = <204800000>;
+};
+
+&sdhci0 {
+ vmmc-supply = <&buck4_3v3>;
+};
+
&binman {
u-boot-spl-ddr {
type = "section";
diff --git a/arch/riscv/dts/k1-musepi-pro-u-boot.dtsi b/arch/riscv/dts/k1-musepi-pro-u-boot.dtsi
index 8a9a2a09de99..f730f79e3e7a 100644
--- a/arch/riscv/dts/k1-musepi-pro-u-boot.dtsi
+++ b/arch/riscv/dts/k1-musepi-pro-u-boot.dtsi
@@ -10,6 +10,8 @@
aliases {
console = &uart0;
serial0 = &uart0;
+ mmc0 = &emmc;
+ mmc1 = &sdhci0;
};
chosen {
@@ -147,7 +149,7 @@
regulator-always-on;
};
- buck4 {
+ buck4_3v3: buck4 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3300000>;
regulator-ramp-delay = <5000>;
@@ -168,7 +170,7 @@
regulator-always-on;
};
- aldo1 {
+ aldo1: aldo1 {
bootph-pre-ram;
regulator-name = "vdd_1v8_mmc";
regulator-min-microvolt = <500000>;
@@ -249,6 +251,86 @@
};
};
+/ {
+ soc {
+ storage-bus {
+ sdhci0: mmc@d4280000 {
+ bootph-pre-ram;
+ compatible = "spacemit,k1-sdhci";
+ reg = <0x0 0xd4280000 0x0 0x200>;
+ clocks = <&syscon_apmu CLK_SDH_AXI>,
+ <&syscon_apmu CLK_SDH0>;
+ clock-names = "core", "io";
+ interrupts = <99>;
+ resets = <&syscon_apmu RESET_SDH_AXI>,
+ <&syscon_apmu RESET_SDH0>;
+ reset-names = "sdh_axi", "sdh0";
+ bus-width = <4>;
+ max-frequency = <204800000>;
+ cd-gpios = <&gpio K1_GPIO(80) GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default", "uhs";
+ pinctrl-0 = <&sdhci0_0_cfg>;
+ pinctrl-1 = <&sdhci0_1_cfg>;
+ status = "okay";
+ };
+ };
+ };
+};
+
+/* SD card pinctrl groups -- not present in upstream k1-pinctrl.dtsi */
+&pinctrl {
+ sdhci0_0_cfg: sdhci0-0-cfg {
+ grp_cmd_data {
+ pinmux = <K1_PADCONF(104, 0)>, /* MMC1_DAT3 */
+ <K1_PADCONF(105, 0)>, /* MMC1_DAT2 */
+ <K1_PADCONF(106, 0)>, /* MMC1_DAT1 */
+ <K1_PADCONF(107, 0)>, /* MMC1_DAT0 */
+ <K1_PADCONF(108, 0)>; /* MMC1_CMD */
+ bias-pull-up = <1>;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+ grp_clk {
+ pinmux = <K1_PADCONF(109, 0)>; /* MMC1_CLK */
+ bias-pull-down = <1>;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+ };
+
+ sdhci0_1_cfg: sdhci0-1-cfg { /* uhs */
+ grp_cmd_data {
+ pinmux = <K1_PADCONF(104, 0)>, /* MMC1_DAT3 */
+ <K1_PADCONF(105, 0)>, /* MMC1_DAT2 */
+ <K1_PADCONF(106, 0)>, /* MMC1_DAT1 */
+ <K1_PADCONF(107, 0)>, /* MMC1_DAT0 */
+ <K1_PADCONF(108, 0)>; /* MMC1_CMD */
+ bias-pull-up = <1>;
+ drive-strength = <42>;
+ power-source = <1800>;
+ };
+ grp_clk {
+ pinmux = <K1_PADCONF(109, 0)>; /* MMC1_CLK */
+ bias-pull-down = <1>;
+ drive-strength = <42>;
+ power-source = <1800>;
+ };
+ };
+};
+
+&emmc {
+ bootph-pre-ram;
+ resets = <&syscon_apmu RESET_SDH_AXI>, <&syscon_apmu RESET_SDH2>;
+ reset-names = "sdh_axi", "sdh2";
+ vqmmc-supply = <&buck3_1v8>;
+ vmmc-supply = <&aldo1>;
+ max-frequency = <204800000>;
+};
+
+&sdhci0 {
+ vmmc-supply = <&buck4_3v3>;
+};
+
&binman {
u-boot-spl-ddr {
type = "section";
--
2.51.0
next prev parent reply other threads:[~2026-08-01 16:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 16:40 [PATCH v8 00/11] spacemit mmc driver Eric Chung
2026-08-01 16:40 ` [PATCH v8 01/11] spacemit: k1: select boot device via config registers Eric Chung
2026-08-01 16:40 ` [PATCH v8 02/11] pinctrl: k1: fix drive strength configuration Eric Chung
2026-08-17 2:12 ` Yixun Lan
2026-08-01 16:40 ` [PATCH v8 03/11] pinctrl: k1: fix pull-up/pull-down configuration Eric Chung
2026-08-17 1:39 ` Yixun Lan
2026-08-01 16:40 ` [PATCH v8 04/11] pinctrl: k1: add IO power domain configuration support Eric Chung
2026-08-17 2:48 ` Yixun Lan
2026-08-01 16:40 ` [PATCH v8 05/11] mmc: k1: add sdhci platform driver Eric Chung
2026-08-01 16:40 ` Eric Chung [this message]
2026-08-16 4:15 ` [PATCH v8 06/11] dts: k1: add SD card support in u-boot overlay Yixun Lan
2026-08-01 16:40 ` [PATCH v8 07/11] configs: k1: enable SD and eMMC support Eric Chung
2026-08-01 16:40 ` [PATCH v8 08/11] MAINTAINER: update Spacemit K1 entry Eric Chung
2026-08-01 16:40 ` [PATCH v8 09/11] doc: spacemit: flash on K1 SoC based boards Eric Chung
2026-08-01 16:40 ` [PATCH v8 10/11] config: k1: enable ENV support for eMMC Eric Chung
2026-08-01 16:40 ` [PATCH v8 11/11] spacemit: k1: fix product name detection and DTB matching in SPL Eric Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260802-m4-v8-6-e916643205f3@riscstar.com \
--to=eric.chung@riscstar.com \
--cc=angelo@kernel-space.org \
--cc=anshuld@ti.com \
--cc=balsundar.ponnusamy@altera.com \
--cc=bastien.curutchet@bootlin.com \
--cc=bhimeswararao.matsa@gmail.com \
--cc=c.stoidner@phytec.de \
--cc=daniel@thingy.jp \
--cc=guodong@riscstar.com \
--cc=han.xu@nxp.com \
--cc=jbx6244@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=kauschluss@disroot.org \
--cc=leo.liang@sifive.com \
--cc=me@ziyao.cc \
--cc=peng.fan@nxp.com \
--cc=pericycle.cc@gmail.com \
--cc=raymond.mao@riscstar.com \
--cc=rick@andestech.com \
--cc=semen.protsenko@linaro.org \
--cc=tanmay.kathpalia@altera.com \
--cc=tim609@andestech.com \
--cc=trini@konsulko.com \
--cc=u-boot-spacemit@groups.io \
--cc=u-boot@lists.u-boot-project.org \
--cc=yanir.levin@tandemg.com \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.