xref: /openbmc/linux/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml (revision c68fc5ed9529987d69d34b367cb390b2285c3ac9)
1a3c5a11dSMaxime Ripard# SPDX-License-Identifier: GPL-2.0
2a3c5a11dSMaxime Ripard%YAML 1.2
3a3c5a11dSMaxime Ripard---
4a3c5a11dSMaxime Ripard$id: http://devicetree.org/schemas/mtd/allwinner,sun4i-a10-nand.yaml#
5a3c5a11dSMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
6a3c5a11dSMaxime Ripard
7dd3cb467SAndrew Lunntitle: Allwinner A10 NAND Controller
8a3c5a11dSMaxime Ripard
9a3c5a11dSMaxime RipardallOf:
10a3c5a11dSMaxime Ripard  - $ref: "nand-controller.yaml"
11a3c5a11dSMaxime Ripard
12a3c5a11dSMaxime Ripardmaintainers:
13a3c5a11dSMaxime Ripard  - Chen-Yu Tsai <wens@csie.org>
145c7404bbSMaxime Ripard  - Maxime Ripard <mripard@kernel.org>
15a3c5a11dSMaxime Ripard
16a3c5a11dSMaxime Ripardproperties:
17a3c5a11dSMaxime Ripard  compatible:
18aee02f82SMiquel Raynal    enum:
19aee02f82SMiquel Raynal      - allwinner,sun4i-a10-nand
20aee02f82SMiquel Raynal      - allwinner,sun8i-a23-nand-controller
21a3c5a11dSMaxime Ripard  reg:
22a3c5a11dSMaxime Ripard    maxItems: 1
23a3c5a11dSMaxime Ripard
24a3c5a11dSMaxime Ripard  interrupts:
25a3c5a11dSMaxime Ripard    maxItems: 1
26a3c5a11dSMaxime Ripard
27a3c5a11dSMaxime Ripard  clocks:
28a3c5a11dSMaxime Ripard    items:
29a3c5a11dSMaxime Ripard      - description: Bus Clock
30a3c5a11dSMaxime Ripard      - description: Module Clock
31a3c5a11dSMaxime Ripard
32a3c5a11dSMaxime Ripard  clock-names:
33a3c5a11dSMaxime Ripard    items:
34a3c5a11dSMaxime Ripard      - const: ahb
35a3c5a11dSMaxime Ripard      - const: mod
36a3c5a11dSMaxime Ripard
37a3c5a11dSMaxime Ripard  resets:
38a3c5a11dSMaxime Ripard    maxItems: 1
39a3c5a11dSMaxime Ripard
40a3c5a11dSMaxime Ripard  reset-names:
41a3c5a11dSMaxime Ripard    const: ahb
42a3c5a11dSMaxime Ripard
43a3c5a11dSMaxime Ripard  dmas:
44a3c5a11dSMaxime Ripard    maxItems: 1
45a3c5a11dSMaxime Ripard
46a3c5a11dSMaxime Ripard  dma-names:
47a3c5a11dSMaxime Ripard    const: rxtx
48a3c5a11dSMaxime Ripard
49a3c5a11dSMaxime RipardpatternProperties:
50488f19adSMiquel Raynal  "^nand@[a-f0-9]$":
5115ffef1aSRob Herring    type: object
52a3c5a11dSMaxime Ripard    properties:
53a3c5a11dSMaxime Ripard      reg:
54a3c5a11dSMaxime Ripard        minimum: 0
55a3c5a11dSMaxime Ripard        maximum: 7
56a3c5a11dSMaxime Ripard
57a3c5a11dSMaxime Ripard      nand-ecc-mode: true
58a3c5a11dSMaxime Ripard
59a3c5a11dSMaxime Ripard      nand-ecc-algo:
60a3c5a11dSMaxime Ripard        const: bch
61a3c5a11dSMaxime Ripard
62a3c5a11dSMaxime Ripard      nand-ecc-step-size:
63a3c5a11dSMaxime Ripard        enum: [ 512, 1024 ]
64a3c5a11dSMaxime Ripard
65a3c5a11dSMaxime Ripard      nand-ecc-strength:
66a3c5a11dSMaxime Ripard        maximum: 80
67a3c5a11dSMaxime Ripard
68a3c5a11dSMaxime Ripard      allwinner,rb:
69a3c5a11dSMaxime Ripard        description:
70a3c5a11dSMaxime Ripard          Contains the native Ready/Busy IDs.
713d21a460SRob Herring        $ref: /schemas/types.yaml#/definitions/uint32-array
723d21a460SRob Herring        minItems: 1
73a3c5a11dSMaxime Ripard        maxItems: 2
74a3c5a11dSMaxime Ripard        items:
75a3c5a11dSMaxime Ripard          minimum: 0
76a3c5a11dSMaxime Ripard          maximum: 1
77a3c5a11dSMaxime Ripard
78a3c5a11dSMaxime Ripard    additionalProperties: false
79a3c5a11dSMaxime Ripard
80a3c5a11dSMaxime Ripardrequired:
81a3c5a11dSMaxime Ripard  - compatible
82a3c5a11dSMaxime Ripard  - reg
83a3c5a11dSMaxime Ripard  - interrupts
84a3c5a11dSMaxime Ripard  - clocks
85a3c5a11dSMaxime Ripard  - clock-names
86a3c5a11dSMaxime Ripard
87e598511bSMiquel RaynalunevaluatedProperties: false
88a3c5a11dSMaxime Ripard
89*c68fc5edSMiquel Raynalexamples:
90*c68fc5edSMiquel Raynal  - |
91*c68fc5edSMiquel Raynal    #include <dt-bindings/interrupt-controller/arm-gic.h>
92*c68fc5edSMiquel Raynal    #include <dt-bindings/clock/sun6i-rtc.h>
93*c68fc5edSMiquel Raynal    #include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
94*c68fc5edSMiquel Raynal    #include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
95*c68fc5edSMiquel Raynal
96*c68fc5edSMiquel Raynal    nand-controller@1c03000 {
97*c68fc5edSMiquel Raynal        compatible = "allwinner,sun8i-a23-nand-controller";
98*c68fc5edSMiquel Raynal        reg = <0x01c03000 0x1000>;
99*c68fc5edSMiquel Raynal        interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
100*c68fc5edSMiquel Raynal        clocks = <&ccu CLK_BUS_NAND>, <&ccu CLK_NAND>;
101*c68fc5edSMiquel Raynal        clock-names = "ahb", "mod";
102*c68fc5edSMiquel Raynal        resets = <&ccu RST_BUS_NAND>;
103*c68fc5edSMiquel Raynal        reset-names = "ahb";
104*c68fc5edSMiquel Raynal        dmas = <&dma 5>;
105*c68fc5edSMiquel Raynal        dma-names = "rxtx";
106*c68fc5edSMiquel Raynal        pinctrl-names = "default";
107*c68fc5edSMiquel Raynal        pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
108*c68fc5edSMiquel Raynal        #address-cells = <1>;
109*c68fc5edSMiquel Raynal        #size-cells = <0>;
110*c68fc5edSMiquel Raynal    };
111*c68fc5edSMiquel Raynal
112a3c5a11dSMaxime Ripard...
113