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
784e85359SKrzysztof Kozlowskititle: STMicroelectronics Flexible Memory Controller 2 (FMC2)
81e25c5f5SBenjamin Gaignard
91e25c5f5SBenjamin Gaignardmaintainers:
10f4eedebdSPatrice Chotard  - Christophe Kerello <christophe.kerello@foss.st.com>
111e25c5f5SBenjamin Gaignard
121e25c5f5SBenjamin Gaignardproperties:
131e25c5f5SBenjamin Gaignard  compatible:
14bce49d1eSChristophe Kerello    enum:
15bce49d1eSChristophe Kerello      - st,stm32mp15-fmc2
16bce49d1eSChristophe Kerello      - st,stm32mp1-fmc2-nfc
171e25c5f5SBenjamin Gaignard
181e25c5f5SBenjamin Gaignard  reg:
19bce49d1eSChristophe Kerello    minItems: 6
20bce49d1eSChristophe 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
40*be907ba6SMiquel Raynal    $ref: raw-nand-chip.yaml
411e25c5f5SBenjamin Gaignard    properties:
421e25c5f5SBenjamin Gaignard      nand-ecc-step-size:
431e25c5f5SBenjamin Gaignard        const: 512
441e25c5f5SBenjamin Gaignard
451e25c5f5SBenjamin Gaignard      nand-ecc-strength:
461e25c5f5SBenjamin Gaignard        enum: [1, 4, 8]
471e25c5f5SBenjamin Gaignard
48*be907ba6SMiquel Raynal    unevaluatedProperties: false
49*be907ba6SMiquel Raynal
50bce49d1eSChristophe KerelloallOf:
511f79a611SRob Herring  - $ref: nand-controller.yaml#
52bce49d1eSChristophe Kerello
53bce49d1eSChristophe Kerello  - if:
54bce49d1eSChristophe Kerello      properties:
55bce49d1eSChristophe Kerello        compatible:
56bce49d1eSChristophe Kerello          contains:
57bce49d1eSChristophe Kerello            const: st,stm32mp15-fmc2
58bce49d1eSChristophe Kerello    then:
59bce49d1eSChristophe Kerello      properties:
60bce49d1eSChristophe Kerello        reg:
61bce49d1eSChristophe Kerello          items:
62bce49d1eSChristophe Kerello            - description: Registers
63bce49d1eSChristophe Kerello            - description: Chip select 0 data
64bce49d1eSChristophe Kerello            - description: Chip select 0 command
65bce49d1eSChristophe Kerello            - description: Chip select 0 address space
66bce49d1eSChristophe Kerello            - description: Chip select 1 data
67bce49d1eSChristophe Kerello            - description: Chip select 1 command
68bce49d1eSChristophe Kerello            - description: Chip select 1 address space
69bce49d1eSChristophe Kerello
70bce49d1eSChristophe Kerello        clocks:
71bce49d1eSChristophe Kerello          maxItems: 1
72bce49d1eSChristophe Kerello
73bce49d1eSChristophe Kerello        resets:
74bce49d1eSChristophe Kerello          maxItems: 1
75bce49d1eSChristophe Kerello
76bce49d1eSChristophe Kerello      required:
77bce49d1eSChristophe Kerello        - clocks
78bce49d1eSChristophe Kerello
79bce49d1eSChristophe Kerello  - if:
80bce49d1eSChristophe Kerello      properties:
81bce49d1eSChristophe Kerello        compatible:
82bce49d1eSChristophe Kerello          contains:
83bce49d1eSChristophe Kerello            const: st,stm32mp1-fmc2-nfc
84bce49d1eSChristophe Kerello    then:
85bce49d1eSChristophe Kerello      properties:
86bce49d1eSChristophe Kerello        reg:
87bce49d1eSChristophe Kerello          items:
88bce49d1eSChristophe Kerello            - description: Chip select 0 data
89bce49d1eSChristophe Kerello            - description: Chip select 0 command
90bce49d1eSChristophe Kerello            - description: Chip select 0 address space
91bce49d1eSChristophe Kerello            - description: Chip select 1 data
92bce49d1eSChristophe Kerello            - description: Chip select 1 command
93bce49d1eSChristophe Kerello            - description: Chip select 1 address space
94bce49d1eSChristophe Kerello
951e25c5f5SBenjamin Gaignardrequired:
961e25c5f5SBenjamin Gaignard  - compatible
971e25c5f5SBenjamin Gaignard  - reg
981e25c5f5SBenjamin Gaignard  - interrupts
991e25c5f5SBenjamin Gaignard
1006fdc6e23SRob HerringunevaluatedProperties: false
1016fdc6e23SRob Herring
1021e25c5f5SBenjamin Gaignardexamples:
1031e25c5f5SBenjamin Gaignard  - |
1041e25c5f5SBenjamin Gaignard    #include <dt-bindings/interrupt-controller/arm-gic.h>
1051e25c5f5SBenjamin Gaignard    #include <dt-bindings/clock/stm32mp1-clks.h>
1061e25c5f5SBenjamin Gaignard    #include <dt-bindings/reset/stm32mp1-resets.h>
10774f4d797SMiquel Raynal
1081e25c5f5SBenjamin Gaignard    nand-controller@58002000 {
1091e25c5f5SBenjamin Gaignard        compatible = "st,stm32mp15-fmc2";
1101e25c5f5SBenjamin Gaignard        reg = <0x58002000 0x1000>,
1111e25c5f5SBenjamin Gaignard              <0x80000000 0x1000>,
1121e25c5f5SBenjamin Gaignard              <0x88010000 0x1000>,
1131e25c5f5SBenjamin Gaignard              <0x88020000 0x1000>,
1141e25c5f5SBenjamin Gaignard              <0x81000000 0x1000>,
1151e25c5f5SBenjamin Gaignard              <0x89010000 0x1000>,
1161e25c5f5SBenjamin Gaignard              <0x89020000 0x1000>;
1171e25c5f5SBenjamin Gaignard        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
118bce49d1eSChristophe Kerello        dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>,
119bce49d1eSChristophe Kerello               <&mdma1 20 0x2 0x12000a08 0x0 0x0>,
120bce49d1eSChristophe Kerello               <&mdma1 21 0x2 0x12000a0a 0x0 0x0>;
1211e25c5f5SBenjamin Gaignard        dma-names = "tx", "rx", "ecc";
1221e25c5f5SBenjamin Gaignard        clocks = <&rcc FMC_K>;
1231e25c5f5SBenjamin Gaignard        resets = <&rcc FMC_R>;
1241e25c5f5SBenjamin Gaignard        #address-cells = <1>;
1251e25c5f5SBenjamin Gaignard        #size-cells = <0>;
1261e25c5f5SBenjamin Gaignard
1271e25c5f5SBenjamin Gaignard        nand@0 {
1281e25c5f5SBenjamin Gaignard            reg = <0>;
1291e25c5f5SBenjamin Gaignard            nand-on-flash-bbt;
1301e25c5f5SBenjamin Gaignard            #address-cells = <1>;
1311e25c5f5SBenjamin Gaignard            #size-cells = <1>;
1321e25c5f5SBenjamin Gaignard        };
1331e25c5f5SBenjamin Gaignard    };
1341e25c5f5SBenjamin Gaignard
1351e25c5f5SBenjamin Gaignard...
136