[PATCH v2 0/7] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2
Anand Moon
linux.amoon at gmail.com
Mon Mar 9 11:49:58 PDT 2026
Hi Iker,
On Mon, 9 Mar 2026 at 17:11, Iker Pedrosa <ikerpedrosam at gmail.com> wrote:
>
> This series enables complete SD card support for the Spacemit K1-based
> OrangePi RV2 board, including UHS (Ultra High Speed) modes for
> high-performance SD card operation.
>
> Background
>
> The Spacemit K1 SoC includes an SDHCI controller capable of supporting
> SD cards up to UHS-I speeds (SDR104 at 208MHz). However, mainline
> currently lacks basic SD controller configuration, SDHCI driver
> enhancements for voltage switching and tuning, and power management
> infrastructure.
>
> Implementation
>
> The series enables SD card support through coordinated layers:
>
> - Hardware infrastructure (patches 1-2): Device tree bindings for voltage
> switching hardware and essential clock infrastructure.
> - SDHCI driver enhancements (patches 3-7): Regulator framework
> integration, pinctrl state switching for voltage domains, AIB register
> programming, and comprehensive SDR tuning support for reliable UHS
> operation.
> - SoC and board integration (patches 8-10): Complete K1 SoC controller
> definitions, PMIC power infrastructure, and OrangePi RV2 board enablement
> with full UHS support.
>
> This transforms the OrangePi RV2 from having no SD card support to full
> UHS-I capability, enabling high-performance storage up to 208MHz.
>
> Signed-off-by: Iker Pedrosa <ikerpedrosam at gmail.com>
> ---
> Changes in v2:
> - Removed custom AIB voltage switching code per maintainer feedback. The
> existing pinctrl driver already handles AIB voltage switching
> automatically via power-source property changes during UHS mode
> transitions. This eliminates code duplication.
> - Squashed regulator and pinctrl commits into single voltage switching
> implementation.
> - Moved voltage switching callback from dynamic probe assignment to
> static sdhci_ops declaration. Removed redundant SDHCI core call since
> the framework handles standard voltage switching automatically.
> - Made clock override (SDHC_OVRRD_CLK_OEN | SDHC_FORCE_CLK_ON)
> conditional for SD/SDIO cards only. This follows vendor driver pattern
> of differentiating SD and eMMC card handling.
> - Include no-mmc property for SD card.
> - Link to v1: https://lore.kernel.org/r/20260302-orangepi-sd-card-uhs-v1-0-89c219973c0c@gmail.com
>
Thanks. Please include my tested with the SpacemiT Banna F3
Tested-by: Anand Moon <linux.amoon at gmail.com>
Thanks
-Anand
> ---
> Iker Pedrosa (7):
> mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation
> mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support
> mmc: sdhci-of-k1: add SDR tuning infrastructure
> mmc: sdhci-of-k1: add comprehensive SDR tuning support
> riscv: dts: spacemit: k1: add SD card controller and pinctrl support
> riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure
> riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes
>
> arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 67 ++++++
> arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 40 ++++
> arch/riscv/boot/dts/spacemit/k1.dtsi | 13 ++
> drivers/mmc/host/sdhci-of-k1.c | 252 +++++++++++++++++++++++
> 4 files changed, 372 insertions(+)
> ---
> base-commit: ec1fb4e55df47ed043ab2ccc6787e39b9d67e49b
> change-id: 20260226-orangepi-sd-card-uhs-0ecb05839b0c
>
> Best regards,
> --
> Iker Pedrosa <ikerpedrosam at gmail.com>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
More information about the linux-riscv
mailing list