1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mtd/loongson,ls1b-nand-controller.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Loongson-1 NAND Controller
8
9maintainers:
10  - Keguang Zhang <keguang.zhang@gmail.com>
11
12description:
13  The Loongson-1 NAND controller abstracts all supported operations,
14  meaning it does not support low-level access to raw NAND flash chips.
15  Moreover, the controller is paired with the DMA engine to perform
16  READ and PROGRAM functions.
17
18allOf:
19  - $ref: nand-controller.yaml
20
21properties:
22  compatible:
23    oneOf:
24      - enum:
25          - loongson,ls1b-nand-controller
26          - loongson,ls1c-nand-controller
27      - items:
28          - enum:
29              - loongson,ls1a-nand-controller
30          - const: loongson,ls1b-nand-controller
31
32  reg:
33    maxItems: 2
34
35  reg-names:
36    items:
37      - const: nand
38      - const: nand-dma
39
40  dmas:
41    maxItems: 1
42
43  dma-names:
44    const: rxtx
45
46required:
47  - compatible
48  - reg
49  - reg-names
50  - dmas
51  - dma-names
52
53unevaluatedProperties: false
54
55examples:
56  - |
57    nand-controller@1fe78000 {
58        compatible = "loongson,ls1b-nand-controller";
59        reg = <0x1fe78000 0x24>, <0x1fe78040 0x4>;
60        reg-names = "nand", "nand-dma";
61        dmas = <&dma 0>;
62        dma-names = "rxtx";
63        #address-cells = <1>;
64        #size-cells = <0>;
65
66        nand@0 {
67            reg = <0>;
68            label = "ls1x-nand";
69            nand-use-soft-ecc-engine;
70            nand-ecc-algo = "hamming";
71        };
72    };
73