From: Troy Mitchell <troy.mitchell@linux.dev>
To: Iker Pedrosa <ikerpedrosam@gmail.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Yixun Lan <dlan@kernel.org>
Cc: Michael Opdenacker <michael.opdenacker@rootcommit.com>,
Javier Martinez Canillas <javierm@redhat.com>,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
linux-kernel@vger.kernel.org, Anand Moon <linux.amoon@gmail.com>,
Trevor Gamblin <tgamblin@baylibre.com>,
Troy Mitchell <troy.mitchell@linux.dev>
Subject: Re: [PATCH v5 5/9] riscv: dts: spacemit: k1: add SD card controller and pinctrl support
Date: Mon, 30 Mar 2026 17:08:48 +0800 [thread overview]
Message-ID: <aco9oLumPh4OZtIo@kernel.org> (raw)
In-Reply-To: <20260330-orangepi-sd-card-uhs-v5-5-bd853604322d@gmail.com>
On Mon, Mar 30, 2026 at 16:38:06 CST, Iker Pedrosa wrote:
> Add SD card controller infrastructure for SpacemiT K1 SoC with complete
> pinctrl support for both standard and UHS modes.
>
> - Add sdhci0 controller definition with clocks, resets and interrupts
> - Add mmc1_cfg pinctrl for 3.3V standard SD operation
> - Add mmc1_uhs_cfg pinctrl for 1.8V UHS high-speed operation
> - Configure appropriate drive strength and power-source properties
>
> This provides complete SD card infrastructure that K1-based boards can
> enable.
>
> Tested-by: Anand Moon <linux.amoon@gmail.com>
> Tested-by: Trevor Gamblin <tgamblin@baylibre.com>
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
> arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 40 ++++++++++++++++++++++++++++
> arch/riscv/boot/dts/spacemit/k1.dtsi | 13 +++++++++
> 2 files changed, 53 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> index b13dcb10f4d66022d27307de73a6ea3287e97441..8d82011f1af666fb78c282a2abcc0cb88f962053 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> @@ -570,4 +570,44 @@ pwm14-1-pins {
> drive-strength = <32>;
> };
> };
> +
> + mmc1_cfg: mmc1-cfg {
> + mmc1-data-cmd-pins {
> + pinmux = <K1_PADCONF(104, 0)>, /* mmc1_d3 */
> + <K1_PADCONF(105, 0)>, /* mmc1_d2 */
> + <K1_PADCONF(106, 0)>, /* mmc1_d1 */
> + <K1_PADCONF(107, 0)>, /* mmc1_d0 */
> + <K1_PADCONF(108, 0)>; /* mmc1_cmd */
> + bias-pull-up = <1>;
> + drive-strength = <7>;
I'm a bit concerned about this value. Looking at the downstream 6.6 code, 3.3V uses DS4,
which equals 13mA. Since 7mA maps to DS0, what's the reasoning for using it here?
Do we have any documentation or measurement to back this up?
> + power-source = <3300>;
> + };
> +
> + mmc1-clk-pins {
> + pinmux = <K1_PADCONF(109, 0)>; /* mmc1_clk */
> + bias-pull-down = <1>;
> + drive-strength = <7>;
> + power-source = <3300>;
> + };
> + };
> +
> + mmc1_uhs_cfg: mmc1-uhs-cfg {
> + mmc1-data-cmd-pins {
> + pinmux = <K1_PADCONF(104, 0)>, /* mmc1_d3 */
> + <K1_PADCONF(105, 0)>, /* mmc1_d2 */
> + <K1_PADCONF(106, 0)>, /* mmc1_d1 */
> + <K1_PADCONF(107, 0)>, /* mmc1_d0 */
> + <K1_PADCONF(108, 0)>; /* mmc1_cmd */
> + bias-pull-up = <1>;
> + drive-strength = <13>;
See above.
- Troy
next prev parent reply other threads:[~2026-03-30 9:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 8:38 [PATCH v5 0/9] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation Iker Pedrosa
2026-03-30 9:11 ` Troy Mitchell
2026-03-30 8:38 ` [PATCH v5 3/9] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support Iker Pedrosa
2026-03-30 9:15 ` Troy Mitchell
2026-03-30 8:38 ` [PATCH v5 4/9] mmc: sdhci-of-k1: add comprehensive SDR tuning support Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 5/9] riscv: dts: spacemit: k1: add SD card controller and pinctrl support Iker Pedrosa
2026-03-30 9:08 ` Troy Mitchell [this message]
2026-03-30 8:38 ` [PATCH v5 6/9] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 7/9] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 8/9] riscv: dts: spacemit: k1-bananapi-f3: " Iker Pedrosa
2026-03-30 8:38 ` [PATCH v5 9/9] riscv: dts: spacemit: k1-musepi-pro: " Iker Pedrosa
2026-03-30 9:19 ` [PATCH v5 0/9] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2 Michael Opdenacker
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=aco9oLumPh4OZtIo@kernel.org \
--to=troy.mitchell@linux.dev \
--cc=adrian.hunter@intel.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=ikerpedrosam@gmail.com \
--cc=javierm@redhat.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux.amoon@gmail.com \
--cc=michael.opdenacker@rootcommit.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=tgamblin@baylibre.com \
--cc=ulf.hansson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox