Skip to content

Commit

Permalink
riscv: dts: sophgo: add sdcard support for milkv duo
Browse files Browse the repository at this point in the history
Add sdhci dt node in SoC dtsi and enable it in milkv duo dts.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
  • Loading branch information
xhackerustc authored and wangjunqiang committed Mar 8, 2024
1 parent 0564e11 commit 41e7a2e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
clock-frequency = <25000000>;
};

&sdhci0 {
status = "okay";
bus-width = <4>;
no-1-8-v;
no-mmc;
no-sdio;
};

&uart0 {
status = "okay";
};
17 changes: 17 additions & 0 deletions arch/riscv/boot/dts/sophgo/cv18xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
*/

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/reset/sophgo,cv1800b-reset.h>

Expand Down Expand Up @@ -47,6 +48,13 @@
#clock-cells = <0>;
};

sdhci_clk: sdhci-clock {
compatible = "fixed-clock";
clock-frequency = <375000000>;
clock-output-names = "sdhci_clk";
#clock-cells = <0>;
};

soc {
compatible = "simple-bus";
interrupt-parent = <&plic>;
Expand Down Expand Up @@ -188,6 +196,15 @@
status = "disabled";
};

sdhci0: mmc@4310000 {
compatible = "sophgo,cv1800b-dwcmshc";
reg = <0x4310000 0x1000>;
interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&sdhci_clk>;
clock-names = "core";
status = "disabled";
};

plic: interrupt-controller@70000000 {
reg = <0x70000000 0x4000000>;
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
Expand Down

0 comments on commit 41e7a2e

Please sign in to comment.