Skip to content

Commit df0fbf7

Browse files
AaronDotchenhuacai
authored andcommitted
LoongArch: dts: Add SDIO controller support to Loongson-2K1000
The Loongson-2K1000 integrates one SDIO controller for SD storage cards and SDIO cards. The module is supported now, enable it. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 06d380c commit df0fbf7

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

arch/loongarch/boot/dts/loongson-2k1000-ref.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@
4848
};
4949
};
5050

51+
&apbdma1 {
52+
status = "okay";
53+
};
54+
55+
&mmc {
56+
status = "okay";
57+
58+
pinctrl-0 = <&sdio_pins_default>;
59+
pinctrl-names = "default";
60+
bus-width = <4>;
61+
cd-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
62+
};
63+
5164
&gmac0 {
5265
status = "okay";
5366

arch/loongarch/boot/dts/loongson-2k1000.dtsi

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@
187187
<26 IRQ_TYPE_LEVEL_HIGH>,
188188
<26 IRQ_TYPE_LEVEL_HIGH>,
189189
<26 IRQ_TYPE_LEVEL_HIGH>,
190-
<>,
191-
<26 IRQ_TYPE_LEVEL_HIGH>,
190+
<0 IRQ_TYPE_NONE>,
192191
<26 IRQ_TYPE_LEVEL_HIGH>,
193192
<26 IRQ_TYPE_LEVEL_HIGH>,
194193
<26 IRQ_TYPE_LEVEL_HIGH>,
195194
<26 IRQ_TYPE_LEVEL_HIGH>,
196195
<26 IRQ_TYPE_LEVEL_HIGH>,
197196
<26 IRQ_TYPE_LEVEL_HIGH>,
197+
<26 IRQ_TYPE_NONE>,
198198
<26 IRQ_TYPE_LEVEL_HIGH>,
199199
<26 IRQ_TYPE_LEVEL_HIGH>,
200200
<26 IRQ_TYPE_LEVEL_HIGH>,
@@ -209,13 +209,13 @@
209209
<27 IRQ_TYPE_LEVEL_HIGH>,
210210
<27 IRQ_TYPE_LEVEL_HIGH>,
211211
<27 IRQ_TYPE_LEVEL_HIGH>,
212-
<>,
212+
<0 IRQ_TYPE_NONE>,
213213
<27 IRQ_TYPE_LEVEL_HIGH>,
214214
<27 IRQ_TYPE_LEVEL_HIGH>,
215215
<27 IRQ_TYPE_LEVEL_HIGH>,
216216
<27 IRQ_TYPE_LEVEL_HIGH>,
217-
<>,
218-
<>,
217+
<0 IRQ_TYPE_NONE>,
218+
<0 IRQ_TYPE_NONE>,
219219
<27 IRQ_TYPE_LEVEL_HIGH>,
220220
<27 IRQ_TYPE_LEVEL_HIGH>,
221221
<27 IRQ_TYPE_LEVEL_HIGH>,
@@ -256,7 +256,7 @@
256256
status = "disabled";
257257
};
258258

259-
dma-controller@1fe00c10 {
259+
apbdma1: dma-controller@1fe00c10 {
260260
compatible = "loongson,ls2k1000-apbdma";
261261
reg = <0x0 0x1fe00c10 0x0 0x8>;
262262
interrupt-parent = <&liointc1>;
@@ -405,6 +405,18 @@
405405
status = "disabled";
406406
};
407407

408+
mmc: mmc@1fe2c000 {
409+
compatible = "loongson,ls2k1000-mmc";
410+
reg = <0 0x1fe2c000 0 0x68>,
411+
<0 0x1fe00438 0 0x8>;
412+
interrupt-parent = <&liointc0>;
413+
interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
414+
clocks = <&clk LOONGSON2_APB_CLK>;
415+
dmas = <&apbdma1 0>;
416+
dma-names = "rx-tx";
417+
status = "disabled";
418+
};
419+
408420
spi0: spi@1fff0220 {
409421
compatible = "loongson,ls2k1000-spi";
410422
reg = <0x0 0x1fff0220 0x0 0x10>;

0 commit comments

Comments
 (0)