xref: /linux/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml (revision bce49d1e3cfe48eb7a33a39da2530156c27fa3b2)
11e25c5f5SBenjamin Gaignard# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21e25c5f5SBenjamin Gaignard%YAML 1.2
31e25c5f5SBenjamin Gaignard---
41e25c5f5SBenjamin Gaignard$id: http://devicetree.org/schemas/mtd/st,stm32-fmc2-nand.yaml#
51e25c5f5SBenjamin Gaignard$schema: http://devicetree.org/meta-schemas/core.yaml#
61e25c5f5SBenjamin Gaignard
71e25c5f5SBenjamin Gaignardtitle: STMicroelectronics Flexible Memory Controller 2 (FMC2) Bindings
81e25c5f5SBenjamin Gaignard
91e25c5f5SBenjamin Gaignardmaintainers:
101e25c5f5SBenjamin Gaignard  - Christophe Kerello <christophe.kerello@st.com>
111e25c5f5SBenjamin Gaignard
121e25c5f5SBenjamin Gaignardproperties:
131e25c5f5SBenjamin Gaignard  compatible:
14*bce49d1eSChristophe Kerello    enum:
15*bce49d1eSChristophe Kerello      - st,stm32mp15-fmc2
16*bce49d1eSChristophe Kerello      - st,stm32mp1-fmc2-nfc
171e25c5f5SBenjamin Gaignard
181e25c5f5SBenjamin Gaignard  reg:
19*bce49d1eSChristophe Kerello    minItems: 6
20*bce49d1eSChristophe Kerello    maxItems: 7
211e25c5f5SBenjamin Gaignard
221e25c5f5SBenjamin Gaignard  interrupts:
231e25c5f5SBenjamin Gaignard    maxItems: 1
241e25c5f5SBenjamin Gaignard
251e25c5f5SBenjamin Gaignard  dmas:
261e25c5f5SBenjamin Gaignard    items:
271e25c5f5SBenjamin Gaignard      - description: tx DMA channel
281e25c5f5SBenjamin Gaignard      - description: rx DMA channel
291e25c5f5SBenjamin Gaignard      - description: ecc DMA channel
301e25c5f5SBenjamin Gaignard
311e25c5f5SBenjamin Gaignard  dma-names:
321e25c5f5SBenjamin Gaignard    items:
331e25c5f5SBenjamin Gaignard      - const: tx
341e25c5f5SBenjamin Gaignard      - const: rx
351e25c5f5SBenjamin Gaignard      - const: ecc
361e25c5f5SBenjamin Gaignard
371e25c5f5SBenjamin GaignardpatternProperties:
381e25c5f5SBenjamin Gaignard  "^nand@[a-f0-9]$":
391e25c5f5SBenjamin Gaignard    type: object
401e25c5f5SBenjamin Gaignard    properties:
411e25c5f5SBenjamin Gaignard      nand-ecc-step-size:
421e25c5f5SBenjamin Gaignard        const: 512
431e25c5f5SBenjamin Gaignard
441e25c5f5SBenjamin Gaignard      nand-ecc-strength:
451e25c5f5SBenjamin Gaignard        enum: [1, 4 ,8 ]
461e25c5f5SBenjamin Gaignard
47*bce49d1eSChristophe KerelloallOf:
48*bce49d1eSChristophe Kerello  - $ref: "nand-controller.yaml#"
49*bce49d1eSChristophe Kerello
50*bce49d1eSChristophe Kerello  - if:
51*bce49d1eSChristophe Kerello      properties:
52*bce49d1eSChristophe Kerello        compatible:
53*bce49d1eSChristophe Kerello          contains:
54*bce49d1eSChristophe Kerello            const: st,stm32mp15-fmc2
55*bce49d1eSChristophe Kerello    then:
56*bce49d1eSChristophe Kerello      properties:
57*bce49d1eSChristophe Kerello        reg:
58*bce49d1eSChristophe Kerello          items:
59*bce49d1eSChristophe Kerello            - description: Registers
60*bce49d1eSChristophe Kerello            - description: Chip select 0 data
61*bce49d1eSChristophe Kerello            - description: Chip select 0 command
62*bce49d1eSChristophe Kerello            - description: Chip select 0 address space
63*bce49d1eSChristophe Kerello            - description: Chip select 1 data
64*bce49d1eSChristophe Kerello            - description: Chip select 1 command
65*bce49d1eSChristophe Kerello            - description: Chip select 1 address space
66*bce49d1eSChristophe Kerello
67*bce49d1eSChristophe Kerello        clocks:
68*bce49d1eSChristophe Kerello          maxItems: 1
69*bce49d1eSChristophe Kerello
70*bce49d1eSChristophe Kerello        resets:
71*bce49d1eSChristophe Kerello          maxItems: 1
72*bce49d1eSChristophe Kerello
73*bce49d1eSChristophe Kerello      required:
74*bce49d1eSChristophe Kerello        - clocks
75*bce49d1eSChristophe Kerello
76*bce49d1eSChristophe Kerello  - if:
77*bce49d1eSChristophe Kerello      properties:
78*bce49d1eSChristophe Kerello        compatible:
79*bce49d1eSChristophe Kerello          contains:
80*bce49d1eSChristophe Kerello            const: st,stm32mp1-fmc2-nfc
81*bce49d1eSChristophe Kerello    then:
82*bce49d1eSChristophe Kerello      properties:
83*bce49d1eSChristophe Kerello        reg:
84*bce49d1eSChristophe Kerello          items:
85*bce49d1eSChristophe Kerello            - description: Chip select 0 data
86*bce49d1eSChristophe Kerello            - description: Chip select 0 command
87*bce49d1eSChristophe Kerello            - description: Chip select 0 address space
88*bce49d1eSChristophe Kerello            - description: Chip select 1 data
89*bce49d1eSChristophe Kerello            - description: Chip select 1 command
90*bce49d1eSChristophe Kerello            - description: Chip select 1 address space
91*bce49d1eSChristophe Kerello
921e25c5f5SBenjamin Gaignardrequired:
931e25c5f5SBenjamin Gaignard  - compatible
941e25c5f5SBenjamin Gaignard  - reg
951e25c5f5SBenjamin Gaignard  - interrupts
961e25c5f5SBenjamin Gaignard
971e25c5f5SBenjamin Gaignardexamples:
981e25c5f5SBenjamin Gaignard  - |
991e25c5f5SBenjamin Gaignard    #include <dt-bindings/interrupt-controller/arm-gic.h>
1001e25c5f5SBenjamin Gaignard    #include <dt-bindings/clock/stm32mp1-clks.h>
1011e25c5f5SBenjamin Gaignard    #include <dt-bindings/reset/stm32mp1-resets.h>
1021e25c5f5SBenjamin Gaignard    nand-controller@58002000 {
1031e25c5f5SBenjamin Gaignard      compatible = "st,stm32mp15-fmc2";
1041e25c5f5SBenjamin Gaignard      reg = <0x58002000 0x1000>,
1051e25c5f5SBenjamin Gaignard            <0x80000000 0x1000>,
1061e25c5f5SBenjamin Gaignard            <0x88010000 0x1000>,
1071e25c5f5SBenjamin Gaignard            <0x88020000 0x1000>,
1081e25c5f5SBenjamin Gaignard            <0x81000000 0x1000>,
1091e25c5f5SBenjamin Gaignard            <0x89010000 0x1000>,
1101e25c5f5SBenjamin Gaignard            <0x89020000 0x1000>;
1111e25c5f5SBenjamin Gaignard      interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
112*bce49d1eSChristophe Kerello      dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>,
113*bce49d1eSChristophe Kerello             <&mdma1 20 0x2 0x12000a08 0x0 0x0>,
114*bce49d1eSChristophe Kerello             <&mdma1 21 0x2 0x12000a0a 0x0 0x0>;
1151e25c5f5SBenjamin Gaignard      dma-names = "tx", "rx", "ecc";
1161e25c5f5SBenjamin Gaignard      clocks = <&rcc FMC_K>;
1171e25c5f5SBenjamin Gaignard      resets = <&rcc FMC_R>;
1181e25c5f5SBenjamin Gaignard      #address-cells = <1>;
1191e25c5f5SBenjamin Gaignard      #size-cells = <0>;
1201e25c5f5SBenjamin Gaignard
1211e25c5f5SBenjamin Gaignard      nand@0 {
1221e25c5f5SBenjamin Gaignard        reg = <0>;
1231e25c5f5SBenjamin Gaignard        nand-on-flash-bbt;
1241e25c5f5SBenjamin Gaignard        #address-cells = <1>;
1251e25c5f5SBenjamin Gaignard        #size-cells = <1>;
1261e25c5f5SBenjamin Gaignard      };
1271e25c5f5SBenjamin Gaignard    };
1281e25c5f5SBenjamin Gaignard
1291e25c5f5SBenjamin Gaignard...
130