Skip to content

Commit 4fd5ca0

Browse files
AaronDotchenhuacai
authored andcommitted
LoongArch: dts: loongson-2k0500: Add nand controller support
The module is supported, enable it. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 4fdb5dd commit 4fd5ca0

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@
4141
};
4242
};
4343

44+
&apbdma0 {
45+
status = "okay";
46+
};
47+
48+
&nand {
49+
status = "okay";
50+
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
nand@0 {
54+
reg = <0>;
55+
label = "ls2k0500-nand";
56+
nand-use-soft-ecc-engine;
57+
nand-ecc-algo = "bch";
58+
nand-ecc-strength = <8>;
59+
nand-ecc-step-size = <512>;
60+
};
61+
};
62+
4463
&apbdma3 {
4564
status = "okay";
4665
};

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
clock-names = "ref_100m";
8585
};
8686

87-
dma-controller@1fe10c00 {
87+
apbdma0: dma-controller@1fe10c00 {
8888
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
8989
reg = <0 0x1fe10c00 0 0x8>;
9090
interrupt-parent = <&eiointc>;
@@ -172,6 +172,16 @@
172172
interrupts = <3>;
173173
};
174174

175+
nand: nand-controller@1ff58000 {
176+
compatible = "loongson,ls2k0500-nand-controller";
177+
reg = <0 0x1ff58000 0 0x24>,
178+
<0 0x1ff58040 0 0x4>;
179+
reg-names = "nand", "nand-dma";
180+
dmas = <&apbdma0 0>;
181+
dma-names = "rxtx";
182+
status = "disabled";
183+
};
184+
175185
pwm@1ff5c000 {
176186
compatible = "loongson,ls2k0500-pwm", "loongson,ls7a-pwm";
177187
reg = <0x0 0x1ff5c000 0x0 0x10>;

0 commit comments

Comments
 (0)