Skip to content

Commit 89a7056

Browse files
xhackerustcinochisa
authored andcommitted
riscv: dts: sophgo: add sdcard support for milkv duo
Add sdhci dt node in SoC dtsi and enable it in milkv duo dts. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Inochi Amaoto <inochiama@outlook.com> Link: https://lore.kernel.org/r/20240217144826.3944-1-jszhang@kernel.org Signed-off-by: Inochi Amaoto <inochiama@outlook.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
1 parent 4cece76 commit 89a7056

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
clock-frequency = <25000000>;
3434
};
3535

36+
&sdhci0 {
37+
status = "okay";
38+
bus-width = <4>;
39+
no-1-8-v;
40+
no-mmc;
41+
no-sdio;
42+
};
43+
3644
&uart0 {
3745
status = "okay";
3846
};

arch/riscv/boot/dts/sophgo/cv18xx.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
55
*/
66

7+
#include <dt-bindings/gpio/gpio.h>
78
#include <dt-bindings/interrupt-controller/irq.h>
89

910
/ {
@@ -45,6 +46,13 @@
4546
#clock-cells = <0>;
4647
};
4748

49+
sdhci_clk: sdhci-clock {
50+
compatible = "fixed-clock";
51+
clock-frequency = <375000000>;
52+
clock-output-names = "sdhci_clk";
53+
#clock-cells = <0>;
54+
};
55+
4856
soc {
4957
compatible = "simple-bus";
5058
interrupt-parent = <&plic>;
@@ -175,6 +183,15 @@
175183
status = "disabled";
176184
};
177185

186+
sdhci0: mmc@4310000 {
187+
compatible = "sophgo,cv1800b-dwcmshc";
188+
reg = <0x4310000 0x1000>;
189+
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
190+
clocks = <&sdhci_clk>;
191+
clock-names = "core";
192+
status = "disabled";
193+
};
194+
178195
plic: interrupt-controller@70000000 {
179196
reg = <0x70000000 0x4000000>;
180197
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;

0 commit comments

Comments
 (0)