Skip to content

Commit 0b1ae64

Browse files
AaronDotmiquelraynal
authored andcommitted
dt-bindings: mtd: loongson,ls1b-nand-controller: Document the Loongson-2K1000 NAND controller
Add new compatible for the Loongson-2K NAND controller used for Loongson-2K1000 SoC. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
1 parent e55bbdd commit 0b1ae64

1 file changed

Lines changed: 49 additions & 1 deletion

File tree

Documentation/devicetree/bindings/mtd/loongson,ls1b-nand-controller.yaml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,22 @@ properties:
2626
- loongson,ls1b-nand-controller
2727
- loongson,ls1c-nand-controller
2828
- loongson,ls2k0500-nand-controller
29+
- loongson,ls2k1000-nand-controller
2930
- items:
3031
- enum:
3132
- loongson,ls1a-nand-controller
3233
- const: loongson,ls1b-nand-controller
3334

3435
reg:
35-
maxItems: 2
36+
minItems: 2
37+
maxItems: 3
3638

3739
reg-names:
40+
minItems: 2
3841
items:
3942
- const: nand
4043
- const: nand-dma
44+
- const: dma-config
4145

4246
dmas:
4347
maxItems: 1
@@ -54,6 +58,27 @@ required:
5458

5559
unevaluatedProperties: false
5660

61+
if:
62+
properties:
63+
compatible:
64+
contains:
65+
enum:
66+
- loongson,ls2k1000-nand-controller
67+
68+
then:
69+
properties:
70+
reg:
71+
minItems: 3
72+
reg-names:
73+
minItems: 3
74+
75+
else:
76+
properties:
77+
reg:
78+
maxItems: 2
79+
reg-names:
80+
maxItems: 2
81+
5782
examples:
5883
- |
5984
nand-controller@1fe78000 {
@@ -72,3 +97,26 @@ examples:
7297
nand-ecc-algo = "hamming";
7398
};
7499
};
100+
101+
- |
102+
nand-controller@1fe26000 {
103+
compatible = "loongson,ls2k1000-nand-controller";
104+
reg = <0x1fe26000 0x24>,
105+
<0x1fe26040 0x4>,
106+
<0x1fe00438 0x8>;
107+
reg-names = "nand", "nand-dma", "dma-config";
108+
dmas = <&apbdma0 0>;
109+
dma-names = "rxtx";
110+
111+
#address-cells = <1>;
112+
#size-cells = <0>;
113+
114+
nand@0 {
115+
reg = <0>;
116+
label = "ls2k1000-nand";
117+
nand-use-soft-ecc-engine;
118+
nand-ecc-algo = "bch";
119+
nand-ecc-strength = <8>;
120+
nand-ecc-step-size = <512>;
121+
};
122+
};

0 commit comments

Comments
 (0)