Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Freescale General-Purpose Media Interface (GPMI) binding
0008 
0009 maintainers:
0010   - Han Xu <han.xu@nxp.com>
0011 
0012 description: |
0013   The GPMI nand controller provides an interface to control the NAND
0014   flash chips. The device tree may optionally contain sub-nodes
0015   describing partitions of the address space. See partition.txt for
0016   more detail.
0017 
0018 properties:
0019   compatible:
0020     oneOf:
0021       - enum:
0022           - fsl,imx23-gpmi-nand
0023           - fsl,imx28-gpmi-nand
0024           - fsl,imx6q-gpmi-nand
0025           - fsl,imx6sx-gpmi-nand
0026           - fsl,imx7d-gpmi-nand
0027       - items:
0028           - enum:
0029               - fsl,imx8mm-gpmi-nand
0030               - fsl,imx8mn-gpmi-nand
0031           - const: fsl,imx7d-gpmi-nand
0032 
0033   reg:
0034     items:
0035       - description: Address and length of gpmi block.
0036       - description: Address and length of bch block.
0037 
0038   reg-names:
0039     items:
0040       - const: gpmi-nand
0041       - const: bch
0042 
0043   interrupts:
0044     maxItems: 1
0045 
0046   interrupt-names:
0047     const: bch
0048 
0049   dmas:
0050     maxItems: 1
0051 
0052   dma-names:
0053     const: rx-tx
0054 
0055   clocks:
0056     minItems: 1
0057     maxItems: 5
0058 
0059   clock-names:
0060     minItems: 1
0061     maxItems: 5
0062 
0063   fsl,use-minimum-ecc:
0064     type: boolean
0065     description: |
0066       Protect this NAND flash with the minimum ECC strength required.
0067       The required ECC strength is automatically discoverable for some
0068       flash (e.g., according to the ONFI standard). However, note that
0069       if this strength is not discoverable or this property is not enabled,
0070       the software may chooses an implementation-defined ECC scheme.
0071 
0072   fsl,no-blockmark-swap:
0073     type: boolean
0074     description: |
0075       Don't swap the bad block marker from the OOB area with the byte in
0076       the data area but rely on the flash based BBT for identifying bad blocks.
0077       NOTE: this is only valid in conjunction with 'nand-on-flash-bbt'.
0078       WARNING: on i.MX28 blockmark swapping cannot be disabled for the BootROM
0079       in the FCB. Thus, partitions written from Linux with this feature turned
0080       on may not be accessible by the BootROM code.
0081 
0082 required:
0083   - compatible
0084   - reg
0085   - reg-names
0086   - interrupts
0087   - interrupt-names
0088   - clocks
0089   - clock-names
0090   - dmas
0091   - dma-names
0092 
0093 unevaluatedProperties: false
0094 
0095 allOf:
0096   - $ref: "nand-controller.yaml"
0097 
0098   - if:
0099       properties:
0100         compatible:
0101           contains:
0102             enum:
0103               - fsl,imx23-gpmi-nand
0104               - fsl,imx28-gpmi-nand
0105     then:
0106       properties:
0107         clocks:
0108           items:
0109             - description: SoC gpmi io clock
0110         clock-names:
0111           items:
0112             - const: gpmi_io
0113 
0114   - if:
0115       properties:
0116         compatible:
0117           contains:
0118             enum:
0119               - fsl,imx6q-gpmi-nand
0120               - fsl,imx6sx-gpmi-nand
0121     then:
0122       properties:
0123         clocks:
0124           items:
0125             - description: SoC gpmi io clock
0126             - description: SoC gpmi apb clock
0127             - description: SoC gpmi bch clock
0128             - description: SoC gpmi bch apb clock
0129             - description: SoC per1 bch clock
0130         clock-names:
0131           items:
0132             - const: gpmi_io
0133             - const: gpmi_apb
0134             - const: gpmi_bch
0135             - const: gpmi_bch_apb
0136             - const: per1_bch
0137 
0138   - if:
0139       properties:
0140         compatible:
0141           contains:
0142             const: fsl,imx7d-gpmi-nand
0143     then:
0144       properties:
0145         clocks:
0146           items:
0147             - description: SoC gpmi io clock
0148             - description: SoC gpmi bch apb clock
0149         clock-names:
0150           items:
0151             - const: gpmi_io
0152             - const: gpmi_bch_apb
0153 
0154 examples:
0155   - |
0156     nand-controller@8000c000 {
0157         #address-cells = <1>;
0158         #size-cells = <0>;
0159         compatible = "fsl,imx28-gpmi-nand";
0160         reg = <0x8000c000 0x2000>, <0x8000a000 0x2000>;
0161         reg-names = "gpmi-nand", "bch";
0162         interrupts = <41>;
0163         interrupt-names = "bch";
0164         clocks = <&clks 50>;
0165         clock-names = "gpmi_io";
0166         dmas = <&dma_apbh 4>;
0167         dma-names = "rx-tx";
0168     };