1493d37ceSAnson Huang# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2493d37ceSAnson Huang%YAML 1.2 3493d37ceSAnson Huang--- 4493d37ceSAnson Huang$id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml# 5493d37ceSAnson Huang$schema: http://devicetree.org/meta-schemas/core.yaml# 6493d37ceSAnson Huang 784e85359SKrzysztof Kozlowskititle: Freescale General-Purpose Media Interface (GPMI) 8493d37ceSAnson Huang 9493d37ceSAnson Huangmaintainers: 10493d37ceSAnson Huang - Han Xu <han.xu@nxp.com> 11493d37ceSAnson Huang 12493d37ceSAnson Huangdescription: | 13493d37ceSAnson Huang The GPMI nand controller provides an interface to control the NAND 14493d37ceSAnson Huang flash chips. The device tree may optionally contain sub-nodes 158709aa3eSNayab Sayed describing partitions of the address space. See mtd.yaml for 16493d37ceSAnson Huang more detail. 17493d37ceSAnson Huang 18493d37ceSAnson Huangproperties: 19493d37ceSAnson Huang compatible: 20b781592cSKrzysztof Kozlowski oneOf: 21b781592cSKrzysztof Kozlowski - enum: 22493d37ceSAnson Huang - fsl,imx23-gpmi-nand 23493d37ceSAnson Huang - fsl,imx28-gpmi-nand 24493d37ceSAnson Huang - fsl,imx6q-gpmi-nand 25493d37ceSAnson Huang - fsl,imx6sx-gpmi-nand 26493d37ceSAnson Huang - fsl,imx7d-gpmi-nand 27*70cdc145SFrank Li - fsl,imx8qxp-gpmi-nand 28b781592cSKrzysztof Kozlowski - items: 29b781592cSKrzysztof Kozlowski - enum: 30b781592cSKrzysztof Kozlowski - fsl,imx8mm-gpmi-nand 31b781592cSKrzysztof Kozlowski - fsl,imx8mn-gpmi-nand 32b781592cSKrzysztof Kozlowski - const: fsl,imx7d-gpmi-nand 33493d37ceSAnson Huang 34493d37ceSAnson Huang reg: 35493d37ceSAnson Huang items: 36493d37ceSAnson Huang - description: Address and length of gpmi block. 37493d37ceSAnson Huang - description: Address and length of bch block. 38493d37ceSAnson Huang 39493d37ceSAnson Huang reg-names: 40493d37ceSAnson Huang items: 41493d37ceSAnson Huang - const: gpmi-nand 42493d37ceSAnson Huang - const: bch 43493d37ceSAnson Huang 44493d37ceSAnson Huang interrupts: 45493d37ceSAnson Huang maxItems: 1 46493d37ceSAnson Huang 47493d37ceSAnson Huang interrupt-names: 48493d37ceSAnson Huang const: bch 49493d37ceSAnson Huang 50493d37ceSAnson Huang dmas: 51493d37ceSAnson Huang maxItems: 1 52493d37ceSAnson Huang 53493d37ceSAnson Huang dma-names: 54493d37ceSAnson Huang const: rx-tx 55493d37ceSAnson Huang 56493d37ceSAnson Huang clocks: 57493d37ceSAnson Huang minItems: 1 58493d37ceSAnson Huang maxItems: 5 59493d37ceSAnson Huang 60493d37ceSAnson Huang clock-names: 61493d37ceSAnson Huang minItems: 1 62493d37ceSAnson Huang maxItems: 5 63493d37ceSAnson Huang 64493d37ceSAnson Huang fsl,use-minimum-ecc: 65493d37ceSAnson Huang type: boolean 66493d37ceSAnson Huang description: | 67493d37ceSAnson Huang Protect this NAND flash with the minimum ECC strength required. 68493d37ceSAnson Huang The required ECC strength is automatically discoverable for some 69493d37ceSAnson Huang flash (e.g., according to the ONFI standard). However, note that 70493d37ceSAnson Huang if this strength is not discoverable or this property is not enabled, 71493d37ceSAnson Huang the software may chooses an implementation-defined ECC scheme. 72493d37ceSAnson Huang 73493d37ceSAnson Huang fsl,no-blockmark-swap: 74493d37ceSAnson Huang type: boolean 75493d37ceSAnson Huang description: | 76493d37ceSAnson Huang Don't swap the bad block marker from the OOB area with the byte in 77493d37ceSAnson Huang the data area but rely on the flash based BBT for identifying bad blocks. 78493d37ceSAnson Huang NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'. 79493d37ceSAnson Huang WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM 80493d37ceSAnson Huang in the FCB. Thus, partitions written from Linux with this feature turned 81493d37ceSAnson Huang on may not be accessible by the BootROM code. 82493d37ceSAnson Huang 83493d37ceSAnson Huangrequired: 84493d37ceSAnson Huang - compatible 85493d37ceSAnson Huang - reg 86493d37ceSAnson Huang - reg-names 87493d37ceSAnson Huang - interrupts 88493d37ceSAnson Huang - interrupt-names 89493d37ceSAnson Huang - clocks 90493d37ceSAnson Huang - clock-names 91493d37ceSAnson Huang - dmas 92493d37ceSAnson Huang - dma-names 93493d37ceSAnson Huang 94493d37ceSAnson HuangunevaluatedProperties: false 95493d37ceSAnson Huang 966d912c49SKrzysztof KozlowskiallOf: 971f79a611SRob Herring - $ref: nand-controller.yaml 986d912c49SKrzysztof Kozlowski 996d912c49SKrzysztof Kozlowski - if: 1006d912c49SKrzysztof Kozlowski properties: 1016d912c49SKrzysztof Kozlowski compatible: 1026d912c49SKrzysztof Kozlowski contains: 1036d912c49SKrzysztof Kozlowski enum: 1046d912c49SKrzysztof Kozlowski - fsl,imx23-gpmi-nand 1056d912c49SKrzysztof Kozlowski - fsl,imx28-gpmi-nand 1066d912c49SKrzysztof Kozlowski then: 1076d912c49SKrzysztof Kozlowski properties: 1086d912c49SKrzysztof Kozlowski clocks: 1096d912c49SKrzysztof Kozlowski items: 1106d912c49SKrzysztof Kozlowski - description: SoC gpmi io clock 1116d912c49SKrzysztof Kozlowski clock-names: 1126d912c49SKrzysztof Kozlowski items: 1136d912c49SKrzysztof Kozlowski - const: gpmi_io 1146d912c49SKrzysztof Kozlowski 1156d912c49SKrzysztof Kozlowski - if: 1166d912c49SKrzysztof Kozlowski properties: 1176d912c49SKrzysztof Kozlowski compatible: 1186d912c49SKrzysztof Kozlowski contains: 1196d912c49SKrzysztof Kozlowski enum: 1206d912c49SKrzysztof Kozlowski - fsl,imx6q-gpmi-nand 1216d912c49SKrzysztof Kozlowski - fsl,imx6sx-gpmi-nand 1226d912c49SKrzysztof Kozlowski then: 1236d912c49SKrzysztof Kozlowski properties: 1246d912c49SKrzysztof Kozlowski clocks: 1256d912c49SKrzysztof Kozlowski items: 1266d912c49SKrzysztof Kozlowski - description: SoC gpmi io clock 1276d912c49SKrzysztof Kozlowski - description: SoC gpmi apb clock 1286d912c49SKrzysztof Kozlowski - description: SoC gpmi bch clock 1296d912c49SKrzysztof Kozlowski - description: SoC gpmi bch apb clock 1306d912c49SKrzysztof Kozlowski - description: SoC per1 bch clock 1316d912c49SKrzysztof Kozlowski clock-names: 1326d912c49SKrzysztof Kozlowski items: 1336d912c49SKrzysztof Kozlowski - const: gpmi_io 1346d912c49SKrzysztof Kozlowski - const: gpmi_apb 1356d912c49SKrzysztof Kozlowski - const: gpmi_bch 1366d912c49SKrzysztof Kozlowski - const: gpmi_bch_apb 1376d912c49SKrzysztof Kozlowski - const: per1_bch 1386d912c49SKrzysztof Kozlowski 1396d912c49SKrzysztof Kozlowski - if: 1406d912c49SKrzysztof Kozlowski properties: 1416d912c49SKrzysztof Kozlowski compatible: 1426d912c49SKrzysztof Kozlowski contains: 1436d912c49SKrzysztof Kozlowski const: fsl,imx7d-gpmi-nand 1446d912c49SKrzysztof Kozlowski then: 1456d912c49SKrzysztof Kozlowski properties: 1466d912c49SKrzysztof Kozlowski clocks: 1476d912c49SKrzysztof Kozlowski items: 1486d912c49SKrzysztof Kozlowski - description: SoC gpmi io clock 1496d912c49SKrzysztof Kozlowski - description: SoC gpmi bch apb clock 1506d912c49SKrzysztof Kozlowski clock-names: 1516d912c49SKrzysztof Kozlowski items: 1526d912c49SKrzysztof Kozlowski - const: gpmi_io 1536d912c49SKrzysztof Kozlowski - const: gpmi_bch_apb 1546d912c49SKrzysztof Kozlowski 155*70cdc145SFrank Li - if: 156*70cdc145SFrank Li properties: 157*70cdc145SFrank Li compatible: 158*70cdc145SFrank Li contains: 159*70cdc145SFrank Li enum: 160*70cdc145SFrank Li - fsl,imx8qxp-gpmi-nand 161*70cdc145SFrank Li then: 162*70cdc145SFrank Li properties: 163*70cdc145SFrank Li clocks: 164*70cdc145SFrank Li items: 165*70cdc145SFrank Li - description: SoC gpmi io clock 166*70cdc145SFrank Li - description: SoC gpmi apb clock 167*70cdc145SFrank Li - description: SoC gpmi bch clock 168*70cdc145SFrank Li - description: SoC gpmi bch apb clock 169*70cdc145SFrank Li clock-names: 170*70cdc145SFrank Li items: 171*70cdc145SFrank Li - const: gpmi_io 172*70cdc145SFrank Li - const: gpmi_apb 173*70cdc145SFrank Li - const: gpmi_bch 174*70cdc145SFrank Li - const: gpmi_bch_apb 175*70cdc145SFrank Li 176493d37ceSAnson Huangexamples: 177493d37ceSAnson Huang - | 178493d37ceSAnson Huang nand-controller@8000c000 { 179493d37ceSAnson Huang #address-cells = <1>; 180493d37ceSAnson Huang #size-cells = <0>; 181493d37ceSAnson Huang compatible = "fsl,imx28-gpmi-nand"; 182493d37ceSAnson Huang reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>; 183493d37ceSAnson Huang reg-names = "gpmi-nand", "bch"; 184493d37ceSAnson Huang interrupts = <41>; 185493d37ceSAnson Huang interrupt-names = "bch"; 186493d37ceSAnson Huang clocks = <&clks 50>; 187493d37ceSAnson Huang clock-names = "gpmi_io"; 188493d37ceSAnson Huang dmas = <&dma_apbh 4>; 189493d37ceSAnson Huang dma-names = "rx-tx"; 190493d37ceSAnson Huang }; 191