xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Freescale General-Purpose Media Interface (GPMI) binding
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Han Xu <han.xu@nxp.com>
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunallOf:
13*4882a593Smuzhiyun  - $ref: "nand-controller.yaml"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyundescription: |
16*4882a593Smuzhiyun  The GPMI nand controller provides an interface to control the NAND
17*4882a593Smuzhiyun  flash chips. The device tree may optionally contain sub-nodes
18*4882a593Smuzhiyun  describing partitions of the address space. See partition.txt for
19*4882a593Smuzhiyun  more detail.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyunproperties:
22*4882a593Smuzhiyun  compatible:
23*4882a593Smuzhiyun    oneOf:
24*4882a593Smuzhiyun      - enum:
25*4882a593Smuzhiyun          - fsl,imx23-gpmi-nand
26*4882a593Smuzhiyun          - fsl,imx28-gpmi-nand
27*4882a593Smuzhiyun          - fsl,imx6q-gpmi-nand
28*4882a593Smuzhiyun          - fsl,imx6sx-gpmi-nand
29*4882a593Smuzhiyun          - fsl,imx7d-gpmi-nand
30*4882a593Smuzhiyun      - items:
31*4882a593Smuzhiyun          - enum:
32*4882a593Smuzhiyun              - fsl,imx8mm-gpmi-nand
33*4882a593Smuzhiyun              - fsl,imx8mn-gpmi-nand
34*4882a593Smuzhiyun          - const: fsl,imx7d-gpmi-nand
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  reg:
37*4882a593Smuzhiyun    items:
38*4882a593Smuzhiyun      - description: Address and length of gpmi block.
39*4882a593Smuzhiyun      - description: Address and length of bch block.
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun  reg-names:
42*4882a593Smuzhiyun    items:
43*4882a593Smuzhiyun      - const: gpmi-nand
44*4882a593Smuzhiyun      - const: bch
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun  interrupts:
47*4882a593Smuzhiyun    maxItems: 1
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  interrupt-names:
50*4882a593Smuzhiyun    const: bch
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun  dmas:
53*4882a593Smuzhiyun    maxItems: 1
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun  dma-names:
56*4882a593Smuzhiyun    const: rx-tx
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun  clocks:
59*4882a593Smuzhiyun    minItems: 1
60*4882a593Smuzhiyun    maxItems: 5
61*4882a593Smuzhiyun    items:
62*4882a593Smuzhiyun      - description: SoC gpmi io clock
63*4882a593Smuzhiyun      - description: SoC gpmi apb clock
64*4882a593Smuzhiyun      - description: SoC gpmi bch clock
65*4882a593Smuzhiyun      - description: SoC gpmi bch apb clock
66*4882a593Smuzhiyun      - description: SoC per1 bch clock
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun  clock-names:
69*4882a593Smuzhiyun    minItems: 1
70*4882a593Smuzhiyun    maxItems: 5
71*4882a593Smuzhiyun    items:
72*4882a593Smuzhiyun      - const: gpmi_io
73*4882a593Smuzhiyun      - const: gpmi_apb
74*4882a593Smuzhiyun      - const: gpmi_bch
75*4882a593Smuzhiyun      - const: gpmi_bch_apb
76*4882a593Smuzhiyun      - const: per1_bch
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun  fsl,use-minimum-ecc:
79*4882a593Smuzhiyun    type: boolean
80*4882a593Smuzhiyun    description: |
81*4882a593Smuzhiyun      Protect this NAND flash with the minimum ECC strength required.
82*4882a593Smuzhiyun      The required ECC strength is automatically discoverable for some
83*4882a593Smuzhiyun      flash (e.g., according to the ONFI standard). However, note that
84*4882a593Smuzhiyun      if this strength is not discoverable or this property is not enabled,
85*4882a593Smuzhiyun      the software may chooses an implementation-defined ECC scheme.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun  fsl,no-blockmark-swap:
88*4882a593Smuzhiyun    type: boolean
89*4882a593Smuzhiyun    description: |
90*4882a593Smuzhiyun      Don't swap the bad block marker from the OOB area with the byte in
91*4882a593Smuzhiyun      the data area but rely on the flash based BBT for identifying bad blocks.
92*4882a593Smuzhiyun      NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'.
93*4882a593Smuzhiyun      WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM
94*4882a593Smuzhiyun      in the FCB. Thus, partitions written from Linux with this feature turned
95*4882a593Smuzhiyun      on may not be accessible by the BootROM code.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyunrequired:
98*4882a593Smuzhiyun  - compatible
99*4882a593Smuzhiyun  - reg
100*4882a593Smuzhiyun  - reg-names
101*4882a593Smuzhiyun  - interrupts
102*4882a593Smuzhiyun  - interrupt-names
103*4882a593Smuzhiyun  - clocks
104*4882a593Smuzhiyun  - clock-names
105*4882a593Smuzhiyun  - dmas
106*4882a593Smuzhiyun  - dma-names
107*4882a593Smuzhiyun
108*4882a593SmuzhiyununevaluatedProperties: false
109*4882a593Smuzhiyun
110*4882a593Smuzhiyunexamples:
111*4882a593Smuzhiyun  - |
112*4882a593Smuzhiyun    nand-controller@8000c000 {
113*4882a593Smuzhiyun        #address-cells = <1>;
114*4882a593Smuzhiyun        #size-cells = <0>;
115*4882a593Smuzhiyun        compatible = "fsl,imx28-gpmi-nand";
116*4882a593Smuzhiyun        reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
117*4882a593Smuzhiyun        reg-names = "gpmi-nand", "bch";
118*4882a593Smuzhiyun        interrupts = <41>;
119*4882a593Smuzhiyun        interrupt-names = "bch";
120*4882a593Smuzhiyun        clocks = <&clks 50>;
121*4882a593Smuzhiyun        clock-names = "gpmi_io";
122*4882a593Smuzhiyun        dmas = <&dma_apbh 4>;
123*4882a593Smuzhiyun        dma-names = "rx-tx";
124*4882a593Smuzhiyun    };
125