Debian Codegraph @

Documentation/devicetree/bindings/mtd/gpmi-nand.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale General-Purpose Media Interface (GPMI)
8
9 maintainers:
10 - Han Xu <[email protected]>
11
12 description: |
13 The GPMI nand controller provides an interface to control the NAND
14 flash chips. The device tree may optionally contain sub-nodes
15 describing partitions of the address space. See mtd.yaml for
16 more detail.
17
18 properties:
19 compatible:
20 oneOf:
21 - enum:
22 - fsl,imx23-gpmi-nand
23 - fsl,imx28-gpmi-nand
24 - fsl,imx6q-gpmi-nand
25 - fsl,imx6sx-gpmi-nand
26 - fsl,imx7d-gpmi-nand
27 - fsl,imx8qxp-gpmi-nand
28 - items:
29 - enum:
30 - fsl,imx8mm-gpmi-nand
31 - fsl,imx8mn-gpmi-nand
32 - fsl,imx8mp-gpmi-nand
33 - fsl,imx8mq-gpmi-nand
34 - const: fsl,imx7d-gpmi-nand
35 - items:
36 - enum:
37 - fsl,imx8dxl-gpmi-nand
38 - fsl,imx8qm-gpmi-nand
39 - const: fsl,imx8qxp-gpmi-nand
40
41 reg:
42 items:
43 - description: Address and length of gpmi block.
44 - description: Address and length of bch block.
45
46 reg-names:
47 items:
48 - const: gpmi-nand
49 - const: bch
50
51 interrupts:
52 maxItems: 1
53
54 interrupt-names:
55 const: bch
56
57 dmas:
58 maxItems: 1
59
60 dma-names:
61 const: rx-tx
62
63 clocks:
64 minItems: 1
65 maxItems: 5
66
67 clock-names:
68 minItems: 1
69 maxItems: 5
70
71 fsl,use-minimum-ecc:
72 type: boolean
73 description: |
74 Protect this NAND flash with the minimum ECC strength required.
75 The required ECC strength is automatically discoverable for some
76 flash (e.g., according to the ONFI standard). However, note that
77 if this strength is not discoverable or this property is not enabled,
78 the software may chooses an implementation-defined ECC scheme.
79
80 fsl,no-blockmark-swap:
81 type: boolean
82 description: |
83 Don't swap the bad block marker from the OOB area with the byte in
84 the data area but rely on the flash based BBT for identifying bad blocks.
85 NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'.
86 WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM
87 in the FCB. Thus, partitions written from Linux with this feature turned
88 on may not be accessible by the BootROM code.
89
90 required:
91 - compatible
92 - reg
93 - reg-names
94 - interrupts
95 - interrupt-names
96 - clocks
97 - clock-names
98 - dmas
99 - dma-names
100
101 unevaluatedProperties: false
102
103 allOf:
104 - $ref: nand-controller.yaml
105
106 - if:
107 properties:
108 compatible:
109 contains:
110 enum:
111 - fsl,imx23-gpmi-nand
112 - fsl,imx28-gpmi-nand
113 then:
114 properties:
115 clocks:
116 items:
117 - description: SoC gpmi io clock
118 clock-names:
119 items:
120 - const: gpmi_io
121
122 - if:
123 properties:
124 compatible:
125 contains:
126 enum:
127 - fsl,imx6q-gpmi-nand
128 - fsl,imx6sx-gpmi-nand
129 then:
130 properties:
131 clocks:
132 items:
133 - description: SoC gpmi io clock
134 - description: SoC gpmi apb clock
135 - description: SoC gpmi bch clock
136 - description: SoC gpmi bch apb clock
137 - description: SoC per1 bch clock
138 clock-names:
139 items:
140 - const: gpmi_io
141 - const: gpmi_apb
142 - const: gpmi_bch
143 - const: gpmi_bch_apb
144 - const: per1_bch
145
146 - if:
147 properties:
148 compatible:
149 contains:
150 const: fsl,imx7d-gpmi-nand
151 then:
152 properties:
153 clocks:
154 items:
155 - description: SoC gpmi io clock
156 - description: SoC gpmi bch apb clock
157 clock-names:
158 items:
159 - const: gpmi_io
160 - const: gpmi_bch_apb
161
162 - if:
163 properties:
164 compatible:
165 contains:
166 enum:
167 - fsl,imx8qxp-gpmi-nand
168 then:
169 properties:
170 clocks:
171 items:
172 - description: SoC gpmi io clock
173 - description: SoC gpmi apb clock
174 - description: SoC gpmi bch clock
175 - description: SoC gpmi bch apb clock
176 clock-names:
177 items:
178 - const: gpmi_io
179 - const: gpmi_apb
180 - const: gpmi_bch
181 - const: gpmi_bch_apb
182
183 examples:
184 - |
185 nand-controller@8000c000 {
186 #address-cells = <1>;
187 #size-cells = <0>;
188 compatible = "fsl,imx28-gpmi-nand";
189 reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
190 reg-names = "gpmi-nand", "bch";
191 interrupts = <41>;
192 interrupt-names = "bch";
193 clocks = <&clks 50>;
194 clock-names = "gpmi_io";
195 dmas = <&dma_apbh 4>;
196 dma-names = "rx-tx";
197 };