191 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Freescale General-Purpose Media Interface (GPMI)8 9maintainers:10 - Han Xu <han.xu@nxp.com>11 12description: |13 The GPMI nand controller provides an interface to control the NAND14 flash chips. The device tree may optionally contain sub-nodes15 describing partitions of the address space. See mtd.yaml for16 more detail.17 18properties:19 compatible:20 oneOf:21 - enum:22 - fsl,imx23-gpmi-nand23 - fsl,imx28-gpmi-nand24 - fsl,imx6q-gpmi-nand25 - fsl,imx6sx-gpmi-nand26 - fsl,imx7d-gpmi-nand27 - fsl,imx8qxp-gpmi-nand28 - items:29 - enum:30 - fsl,imx8mm-gpmi-nand31 - fsl,imx8mn-gpmi-nand32 - const: fsl,imx7d-gpmi-nand33 34 reg:35 items:36 - description: Address and length of gpmi block.37 - description: Address and length of bch block.38 39 reg-names:40 items:41 - const: gpmi-nand42 - const: bch43 44 interrupts:45 maxItems: 146 47 interrupt-names:48 const: bch49 50 dmas:51 maxItems: 152 53 dma-names:54 const: rx-tx55 56 clocks:57 minItems: 158 maxItems: 559 60 clock-names:61 minItems: 162 maxItems: 563 64 fsl,use-minimum-ecc:65 type: boolean66 description: |67 Protect this NAND flash with the minimum ECC strength required.68 The required ECC strength is automatically discoverable for some69 flash (e.g., according to the ONFI standard). However, note that70 if this strength is not discoverable or this property is not enabled,71 the software may chooses an implementation-defined ECC scheme.72 73 fsl,no-blockmark-swap:74 type: boolean75 description: |76 Don't swap the bad block marker from the OOB area with the byte in77 the data area but rely on the flash based BBT for identifying bad blocks.78 NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'.79 WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM80 in the FCB. Thus, partitions written from Linux with this feature turned81 on may not be accessible by the BootROM code.82 83required:84 - compatible85 - reg86 - reg-names87 - interrupts88 - interrupt-names89 - clocks90 - clock-names91 - dmas92 - dma-names93 94unevaluatedProperties: false95 96allOf:97 - $ref: nand-controller.yaml98 99 - if:100 properties:101 compatible:102 contains:103 enum:104 - fsl,imx23-gpmi-nand105 - fsl,imx28-gpmi-nand106 then:107 properties:108 clocks:109 items:110 - description: SoC gpmi io clock111 clock-names:112 items:113 - const: gpmi_io114 115 - if:116 properties:117 compatible:118 contains:119 enum:120 - fsl,imx6q-gpmi-nand121 - fsl,imx6sx-gpmi-nand122 then:123 properties:124 clocks:125 items:126 - description: SoC gpmi io clock127 - description: SoC gpmi apb clock128 - description: SoC gpmi bch clock129 - description: SoC gpmi bch apb clock130 - description: SoC per1 bch clock131 clock-names:132 items:133 - const: gpmi_io134 - const: gpmi_apb135 - const: gpmi_bch136 - const: gpmi_bch_apb137 - const: per1_bch138 139 - if:140 properties:141 compatible:142 contains:143 const: fsl,imx7d-gpmi-nand144 then:145 properties:146 clocks:147 items:148 - description: SoC gpmi io clock149 - description: SoC gpmi bch apb clock150 clock-names:151 items:152 - const: gpmi_io153 - const: gpmi_bch_apb154 155 - if:156 properties:157 compatible:158 contains:159 enum:160 - fsl,imx8qxp-gpmi-nand161 then:162 properties:163 clocks:164 items:165 - description: SoC gpmi io clock166 - description: SoC gpmi apb clock167 - description: SoC gpmi bch clock168 - description: SoC gpmi bch apb clock169 clock-names:170 items:171 - const: gpmi_io172 - const: gpmi_apb173 - const: gpmi_bch174 - const: gpmi_bch_apb175 176examples:177 - |178 nand-controller@8000c000 {179 #address-cells = <1>;180 #size-cells = <0>;181 compatible = "fsl,imx28-gpmi-nand";182 reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;183 reg-names = "gpmi-nand", "bch";184 interrupts = <41>;185 interrupt-names = "bch";186 clocks = <&clks 50>;187 clock-names = "gpmi_io";188 dmas = <&dma_apbh 4>;189 dma-names = "rx-tx";190 };191