[PW_SID:1080556] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2#1779
[PW_SID:1080556] riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2#1779linux-riscv-bot wants to merge 10 commits into
Conversation
…tching Document pinctrl properties to support voltage-dependent pin configuration switching for UHS-I SD card modes. Add optional pinctrl-names property with two states: - "default": For 3.3V operation with standard drive strength - "state_uhs": For 1.8V operation with optimized drive strength These pinctrl states allow the SDHCI driver to coordinate voltage switching with pin configuration changes, ensuring proper signal integrity during UHS-I mode transitions. Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Ensure SD card pins receive clock signals by enabling pad clock generation and overriding automatic clock gating. Required for all SD operation modes. The SDHC_GEN_PAD_CLK_ON setting in LEGACY_CTRL_REG is safe for both SD and eMMC operation as both protocols use the same physical MMC interface pins and require proper clock signal generation at the hardware level for signal integrity and timing. Additional SD-specific clock overrides (SDHC_OVRRD_CLK_OEN and SDHC_FORCE_CLK_ON) are conditionally applied only for SD-only controllers to handle removable card scenarios. Tested-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev> Tested-by: Vincent Legoll <legoll@online.fr> 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. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev> Tested-by: Vincent Legoll <legoll@online.fr> 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 and HS200 mode for eMMC. This adds both TX and RX delay line tuning based on the SpacemiT K1 controller capabilities. Algorithm features: - Add tuning register definitions (RX_CFG, DLINE_CTRL, DLINE_CFG) - Conditional tuning: only for high-speed modes (≥100MHz) - TX tuning: configure transmit delay line with optimal values (dline_reg=0, delaycode=127) to ensure optimal signal output timing - RX tuning: single-pass window detection algorithm testing full delay range (0-255) to find optimal receive timing window - Retry mechanism: multiple fallback delays within optimal window for improved reliability Tested-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Tested-by: Vincent Legoll <legoll@online.fr> 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. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Tested-by: Vincent Legoll <legoll@online.fr> Reviewed-by: Troy Mitchell <troy.mitchell@linux.dev> 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 (5V 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 Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Tested-by: Vincent Legoll <legoll@online.fr> 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. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Trevor Gamblin <tgamblin@baylibre.com> Tested-by: Michael Opdenacker <michael.opdenacker@rootcommit.com> Tested-by: Vincent Legoll <legoll@online.fr> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
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. Suggested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Update the Muse Pi Pro devicetree with SD card support to match what was done for the OrangePi RV2 in [1]. More precisely: - 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 [1] https://lore.kernel.org/linux-riscv/20260316-orangepi-sd-card-uhs-v3-0-aefd3b7832df@gmail.com/T/# Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 1: "[v8,1/9] dt-bindings: mmc: spacemit,sdhci: add pinctrl support for voltage switching" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 2: "[v8,2/9] mmc: sdhci-of-k1: enable essential clock infrastructure for SD operation" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
|
Patch 9: "[v8,9/9] riscv: dts: spacemit: k1-musepi-pro: add SD card support with UHS modes" |
93d3be3 to
8663b88
Compare
PR for series 1080556 applied to workflow
Name: riscv: spacemit: enable SD card support with UHS modes for OrangePi RV2
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1080556
Version: 8