riscv: dts: spacemit: k3: Enable SD card support
Subsystems (3)
Yixun Lan
maintainerPATCH 1/1 riscv: dts: spacemit: k3: Enable SD card support
Add the device tree node of SDHCI-0 controller which found on CoM260-IFX board, it's currenty used for Micro SD card slot, and one GPIO pin is configured as card insertion/removal detection pin, the slot use 4-bit data bus, and up support to SDR104 speed mode.
--- arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 18 +++++++++++ arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 44 ++++++++++++++++++++++++++ arch/riscv/boot/dts/spacemit/k3.dtsi | 13 ++++++++ 3 files changed, 75 insertions(+)
arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts +18 -0
@@ -19,3 +19,21 @@ chosen { stdout-path = "serial0:115200n8"; }; }; + +&sdhci0 { + pinctrl-names = "default","uhs"; + pinctrl-0 = <&mmc1_cfg>; + pinctrl-1 = <&mmc1_uhs_cfg>; + bus-width = <4>; + cd-gpios = <&gpio K3_GPIO(4) GPIO_ACTIVE_HIGH>; + no-mmc; + no-sdio; + disable-wp; + cap-sd-highspeed; + vmmc-supply = <&aldo4>; + vqmmc-supply = <&aldo1>; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + status = "okay"; +};
arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi +44 -0
48 lines not on this page · raw message
arch/riscv/boot/dts/spacemit/k3.dtsi +13 -0
@@ -1099,6 +1099,19 @@ pll: clock-controller@d4090000 { #clock-cells = <1>; }; + sdhci0: mmc@d4280000 { + compatible = "spacemit,k3-sdhci"; + reg = <0x0 0xd4280000 0x0 0x200>; + clocks = <&syscon_apmu CLK_APMU_SDH_AXI>, + <&syscon_apmu CLK_APMU_SDH0>; + clock-names = "core", "io"; + resets = <&syscon_apmu RESET_APMU_SDH_AXI>, + <&syscon_apmu RESET_APMU_SDH0>; + reset-names = "axi", "sdh"; + interrupts = <99 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; + syscon_apmu: system-controller@d4282800 { compatible = "spacemit,k3-syscon-apmu"; reg = <0x0 0xd4282800 0x0 0x400>;
---
base-commit: 38d5f73d1f5af60d87047b981736b89521e49213
change-id: 20260609-07-k3-enable-sd-e1ddf090e87f
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>
Quoted 4 lines · Yixun Lan
Add the device tree node of SDHCI-0 controller which found on CoM260-IFX board, it's currenty used for Micro SD card slot, and one GPIO pin is configured as card insertion/removal detection pin, the slot use 4-bit data bus, and up support to SDR104 speed mode.
Applied, thanks!
[1/1] riscv: dts: spacemit: k3: Enable SD card support
https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=055044260e7a603ff587537651e12c8fbfbed851
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>