Skip to content

Commit 9286025

Browse files
AaronDotchenhuacai
authored andcommitted
LoongArch: dts: loongson-2k1000: 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 4fd5ca0 commit 9286025

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

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

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

51+
&apbdma0 {
52+
status = "okay";
53+
};
54+
55+
&nand {
56+
status = "okay";
57+
58+
pinctrl-0 = <&nand_pins_default>;
59+
pinctrl-names = "default";
60+
61+
#address-cells = <1>;
62+
#size-cells = <0>;
63+
nand@0 {
64+
reg = <0>;
65+
label = "ls2k1000-nand";
66+
nand-use-soft-ecc-engine;
67+
nand-ecc-algo = "bch";
68+
nand-ecc-strength = <8>;
69+
nand-ecc-step-size = <512>;
70+
};
71+
};
72+
5173
&apbdma1 {
5274
status = "okay";
5375
};

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
#thermal-sensor-cells = <1>;
249249
};
250250

251-
dma-controller@1fe00c00 {
251+
apbdma0: dma-controller@1fe00c00 {
252252
compatible = "loongson,ls2k1000-apbdma";
253253
reg = <0x0 0x1fe00c00 0x0 0x8>;
254254
interrupt-parent = <&liointc1>;
@@ -364,6 +364,17 @@
364364
status = "disabled";
365365
};
366366

367+
nand: nand-controller@1fe26000 {
368+
compatible = "loongson,ls2k1000-nand-controller";
369+
reg = <0 0x1fe26000 0 0x24>,
370+
<0 0x1fe26040 0 0x4>,
371+
<0 0x1fe00438 0 0x8>;
372+
reg-names = "nand", "nand-dma", "dma-config";
373+
dmas = <&apbdma0 0>;
374+
dma-names = "rxtx";
375+
status = "disabled";
376+
};
377+
367378
pmc: power-management@1fe27000 {
368379
compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
369380
reg = <0x0 0x1fe27000 0x0 0x58>;

0 commit comments

Comments
 (0)