Skip to content

Commit 493d37c

Browse files
Anson-Huangrobherring
authored andcommitted
dt-bindings: mtd: Convert gpmi nand to json-schema
Convert the gpmi nand controller binding to DT schema format using json-schema. Signed-off-by: Anson Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
1 parent add48ba commit 493d37c

File tree

2 files changed

+118
-75
lines changed

2 files changed

+118
-75
lines changed

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

Lines changed: 0 additions & 75 deletions
This file was deleted.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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) binding
8+
9+
maintainers:
10+
- Han Xu <[email protected]>
11+
12+
allOf:
13+
- $ref: "nand-controller.yaml"
14+
15+
description: |
16+
The GPMI nand controller provides an interface to control the NAND
17+
flash chips. The device tree may optionally contain sub-nodes
18+
describing partitions of the address space. See partition.txt for
19+
more detail.
20+
21+
properties:
22+
compatible:
23+
enum:
24+
- fsl,imx23-gpmi-nand
25+
- fsl,imx28-gpmi-nand
26+
- fsl,imx6q-gpmi-nand
27+
- fsl,imx6sx-gpmi-nand
28+
- fsl,imx7d-gpmi-nand
29+
30+
reg:
31+
items:
32+
- description: Address and length of gpmi block.
33+
- description: Address and length of bch block.
34+
35+
reg-names:
36+
items:
37+
- const: gpmi-nand
38+
- const: bch
39+
40+
interrupts:
41+
maxItems: 1
42+
43+
interrupt-names:
44+
const: bch
45+
46+
dmas:
47+
maxItems: 1
48+
49+
dma-names:
50+
const: rx-tx
51+
52+
clocks:
53+
minItems: 1
54+
maxItems: 5
55+
items:
56+
- description: SoC gpmi io clock
57+
- description: SoC gpmi apb clock
58+
- description: SoC gpmi bch clock
59+
- description: SoC gpmi bch apb clock
60+
- description: SoC per1 bch clock
61+
62+
clock-names:
63+
minItems: 1
64+
maxItems: 5
65+
items:
66+
- const: gpmi_io
67+
- const: gpmi_apb
68+
- const: gpmi_bch
69+
- const: gpmi_bch_apb
70+
- const: per1_bch
71+
72+
fsl,use-minimum-ecc:
73+
type: boolean
74+
description: |
75+
Protect this NAND flash with the minimum ECC strength required.
76+
The required ECC strength is automatically discoverable for some
77+
flash (e.g., according to the ONFI standard). However, note that
78+
if this strength is not discoverable or this property is not enabled,
79+
the software may chooses an implementation-defined ECC scheme.
80+
81+
fsl,no-blockmark-swap:
82+
type: boolean
83+
description: |
84+
Don't swap the bad block marker from the OOB area with the byte in
85+
the data area but rely on the flash based BBT for identifying bad blocks.
86+
NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'.
87+
WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM
88+
in the FCB. Thus, partitions written from Linux with this feature turned
89+
on may not be accessible by the BootROM code.
90+
91+
required:
92+
- compatible
93+
- reg
94+
- reg-names
95+
- interrupts
96+
- interrupt-names
97+
- clocks
98+
- clock-names
99+
- dmas
100+
- dma-names
101+
102+
unevaluatedProperties: false
103+
104+
examples:
105+
- |
106+
nand-controller@8000c000 {
107+
#address-cells = <1>;
108+
#size-cells = <0>;
109+
compatible = "fsl,imx28-gpmi-nand";
110+
reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
111+
reg-names = "gpmi-nand", "bch";
112+
interrupts = <41>;
113+
interrupt-names = "bch";
114+
clocks = <&clks 50>;
115+
clock-names = "gpmi_io";
116+
dmas = <&dma_apbh 4>;
117+
dma-names = "rx-tx";
118+
};

0 commit comments

Comments
 (0)