[PW_SID:1063609] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2#1578
[PW_SID:1063609] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2#1578linux-riscv-bot wants to merge 7 commits into
Conversation
Ensure SD card pins receive clock signals by enabling pad clock generation and overriding automatic clock gating. Required for all SD operation modes. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add voltage switching infrastructure for UHS-I modes by integrating both regulator framework (for supply voltage control) and pinctrl state switching (for pin drive strength optimization). - Add regulator supply parsing and voltage switching callback - Add optional pinctrl state switching between "default" (3.3V) and "state_uhs" (1.8V) configurations - Enable coordinated voltage and pin configuration changes for UHS modes This provides complete voltage switching support while maintaining backward compatibility when pinctrl states are not defined. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add register definitions and delay line control functions to prepare for SDR50/SDR104 tuning support: - Add tuning register definitions (RX_CFG, DLINE_CTRL, DLINE_CFG) - Add delay line control helper functions - Add tuning preparation function This infrastructure prepares for implementing the SDR tuning algorithm while maintaining all existing functionality. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Implement software tuning algorithm to enable UHS-I SDR modes for SD card operation. This adds both TX and RX delay line tuning based on the SpacemiT K1 controller capabilities. Key features: - Conditional tuning: only tune when SD card is present and for high-speed modes (≥100MHz) - TX tuning: configure transmit delay line with default values (dline_reg=0, delaycode=127) to ensure optimal signal output timing - RX tuning: test full delay range (0-255) with window detection algorithm to find optimal receive timing - Retry mechanism: multiple fallback delays within optimal window for improved reliability - Complete register support: add delay line control and configuration register definitions for fine-grained timing control Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
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. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add Spacemit P1 PMIC configuration and board power infrastructure for voltage regulation support. - Add board power regulators (12V input, 4V rail) - Enable I2C8 for PMIC communication - Configure PMIC with buck4 (vmmc) and aldo1 (vqmmc) regulators - Set up regulator constraints for SD card operation Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…odes Add complete SD card controller support with UHS high-speed modes. - Enable sdhci0 controller with 4-bit bus width - Configure card detect GPIO with inversion - Connect vmmc-supply to buck4 for 3.3V card power - Connect vqmmc-supply to aldo1 for 1.8V/3.3V I/O switching - Add dual pinctrl states for voltage-dependent pin configuration - Support UHS-I SDR25, SDR50, and SDR104 modes This enables full SD card functionality including high-speed UHS modes for improved performance. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 1: "[v2,1/7] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 2: "[v2,2/7] mmc: sdhci-of-k1: add regulator and pinctrl voltage switching support" |
|
Patch 5: "[v2,5/7] riscv: dts: spacemit: k1: add SD card controller and pinctrl support" |
|
Patch 5: "[v2,5/7] riscv: dts: spacemit: k1: add SD card controller and pinctrl support" |
|
Patch 5: "[v2,5/7] riscv: dts: spacemit: k1: add SD card controller and pinctrl support" |
|
Patch 5: "[v2,5/7] riscv: dts: spacemit: k1: add SD card controller and pinctrl support" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 6: "[v2,6/7] riscv: dts: spacemit: k1-orangepi-rv2: add PMIC and power infrastructure" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
|
Patch 7: "[v2,7/7] riscv: dts: spacemit: k1-orangepi-rv2: add SD card support with UHS modes" |
PR for series 1063609 applied to workflow__riscv__fixes
Name: riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1063609
Version: 2