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