]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: dts: spacemit: enable eMMC for K1 SoC
authorYixun Lan <dlan@gentoo.org>
Fri, 23 May 2025 13:21:04 +0000 (21:21 +0800)
committerYixun Lan <dlan@gentoo.org>
Mon, 9 Jun 2025 16:42:58 +0000 (00:42 +0800)
Enable eMMC support for SpacemiT K1 SoC, successfully tested on
Bananapi-F3 board which shipped with a 16GB eMMC chip - KLMAG1JETD-B041.

Link: https://lore.kernel.org/r/20250523-22-k1-sdhci-v1-1-6e0adddf7494@gentoo.org
Signed-off-by: Yixun Lan <dlan@gentoo.org>
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
arch/riscv/boot/dts/spacemit/k1.dtsi

index 816ef1bc358ec490aff184d5915d680dbd9f00cb..fe22c747c5012fe56d42ac8a7efdbbdb694f31b6 100644 (file)
        };
 };
 
+&emmc {
+       bus-width = <8>;
+       mmc-hs400-1_8v;
+       mmc-hs400-enhanced-strobe;
+       non-removable;
+       no-sd;
+       no-sdio;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_2_cfg>;
index c0f8c5fca975d73b6ea6886da13fcf55289cb16c..14097f1f6f447bd33ff3aaa07382d27ca8e59a48 100644 (file)
                        #clock-cells = <1>;
                };
 
+               emmc: mmc@d4281000 {
+                       compatible = "spacemit,k1-sdhci";
+                       reg = <0x0 0xd4281000 0x0 0x200>;
+                       clocks = <&syscon_apmu CLK_SDH_AXI>, <&syscon_apmu CLK_SDH2>;
+                       clock-names = "core", "io";
+                       interrupts = <101>;
+                       status = "disabled";
+               };
+
                syscon_apmu: system-controller@d4282800 {
                        compatible = "spacemit,k1-syscon-apmu";
                        reg = <0x0 0xd4282800 0x0 0x400>;