xref: /linux/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
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
17*c1e04ab4SChristophe Kerello      - st,stm32mp25-fmc2-nfc
181e25c5f5SBenjamin Gaignard
191e25c5f5SBenjamin Gaignard  reg:
20bce49d1eSChristophe Kerello    minItems: 6
21*c1e04ab4SChristophe Kerello    maxItems: 12
221e25c5f5SBenjamin Gaignard
231e25c5f5SBenjamin Gaignard  interrupts:
241e25c5f5SBenjamin Gaignard    maxItems: 1
251e25c5f5SBenjamin Gaignard
261e25c5f5SBenjamin Gaignard  dmas:
271e25c5f5SBenjamin Gaignard    items:
281e25c5f5SBenjamin Gaignard      - description: tx DMA channel
291e25c5f5SBenjamin Gaignard      - description: rx DMA channel
301e25c5f5SBenjamin Gaignard      - description: ecc DMA channel
311e25c5f5SBenjamin Gaignard
321e25c5f5SBenjamin Gaignard  dma-names:
331e25c5f5SBenjamin Gaignard    items:
341e25c5f5SBenjamin Gaignard      - const: tx
351e25c5f5SBenjamin Gaignard      - const: rx
361e25c5f5SBenjamin Gaignard      - const: ecc
371e25c5f5SBenjamin Gaignard
381e25c5f5SBenjamin GaignardpatternProperties:
391e25c5f5SBenjamin Gaignard  "^nand@[a-f0-9]$":
401e25c5f5SBenjamin Gaignard    type: object
41be907ba6SMiquel Raynal    $ref: raw-nand-chip.yaml
421e25c5f5SBenjamin Gaignard    properties:
431e25c5f5SBenjamin Gaignard      nand-ecc-step-size:
441e25c5f5SBenjamin Gaignard        const: 512
451e25c5f5SBenjamin Gaignard
461e25c5f5SBenjamin Gaignard      nand-ecc-strength:
471e25c5f5SBenjamin Gaignard        enum: [1, 4, 8]
481e25c5f5SBenjamin Gaignard
49be907ba6SMiquel Raynal    unevaluatedProperties: false
50be907ba6SMiquel Raynal
51bce49d1eSChristophe KerelloallOf:
521f79a611SRob Herring  - $ref: nand-controller.yaml#
53bce49d1eSChristophe Kerello
54bce49d1eSChristophe Kerello  - if:
55bce49d1eSChristophe Kerello      properties:
56bce49d1eSChristophe Kerello        compatible:
57bce49d1eSChristophe Kerello          contains:
58bce49d1eSChristophe Kerello            const: st,stm32mp15-fmc2
59bce49d1eSChristophe Kerello    then:
60bce49d1eSChristophe Kerello      properties:
61bce49d1eSChristophe Kerello        reg:
62bce49d1eSChristophe Kerello          items:
63bce49d1eSChristophe Kerello            - description: Registers
64bce49d1eSChristophe Kerello            - description: Chip select 0 data
65bce49d1eSChristophe Kerello            - description: Chip select 0 command
66bce49d1eSChristophe Kerello            - description: Chip select 0 address space
67bce49d1eSChristophe Kerello            - description: Chip select 1 data
68bce49d1eSChristophe Kerello            - description: Chip select 1 command
69bce49d1eSChristophe Kerello            - description: Chip select 1 address space
70bce49d1eSChristophe Kerello
71bce49d1eSChristophe Kerello        clocks:
72bce49d1eSChristophe Kerello          maxItems: 1
73bce49d1eSChristophe Kerello
74bce49d1eSChristophe Kerello        resets:
75bce49d1eSChristophe Kerello          maxItems: 1
76bce49d1eSChristophe Kerello
77bce49d1eSChristophe Kerello      required:
78bce49d1eSChristophe Kerello        - clocks
79bce49d1eSChristophe Kerello
80bce49d1eSChristophe Kerello  - if:
81bce49d1eSChristophe Kerello      properties:
82bce49d1eSChristophe Kerello        compatible:
83bce49d1eSChristophe Kerello          contains:
84bce49d1eSChristophe Kerello            const: st,stm32mp1-fmc2-nfc
85bce49d1eSChristophe Kerello    then:
86bce49d1eSChristophe Kerello      properties:
87bce49d1eSChristophe Kerello        reg:
88bce49d1eSChristophe Kerello          items:
89bce49d1eSChristophe Kerello            - description: Chip select 0 data
90bce49d1eSChristophe Kerello            - description: Chip select 0 command
91bce49d1eSChristophe Kerello            - description: Chip select 0 address space
92bce49d1eSChristophe Kerello            - description: Chip select 1 data
93bce49d1eSChristophe Kerello            - description: Chip select 1 command
94bce49d1eSChristophe Kerello            - description: Chip select 1 address space
95bce49d1eSChristophe Kerello
96*c1e04ab4SChristophe Kerello  - if:
97*c1e04ab4SChristophe Kerello      properties:
98*c1e04ab4SChristophe Kerello        compatible:
99*c1e04ab4SChristophe Kerello          contains:
100*c1e04ab4SChristophe Kerello            const: st,stm32mp25-fmc2-nfc
101*c1e04ab4SChristophe Kerello    then:
102*c1e04ab4SChristophe Kerello      properties:
103*c1e04ab4SChristophe Kerello        reg:
104*c1e04ab4SChristophe Kerello          items:
105*c1e04ab4SChristophe Kerello            - description: Chip select 0 data
106*c1e04ab4SChristophe Kerello            - description: Chip select 0 command
107*c1e04ab4SChristophe Kerello            - description: Chip select 0 address space
108*c1e04ab4SChristophe Kerello            - description: Chip select 1 data
109*c1e04ab4SChristophe Kerello            - description: Chip select 1 command
110*c1e04ab4SChristophe Kerello            - description: Chip select 1 address space
111*c1e04ab4SChristophe Kerello            - description: Chip select 2 data
112*c1e04ab4SChristophe Kerello            - description: Chip select 2 command
113*c1e04ab4SChristophe Kerello            - description: Chip select 2 address space
114*c1e04ab4SChristophe Kerello            - description: Chip select 3 data
115*c1e04ab4SChristophe Kerello            - description: Chip select 3 command
116*c1e04ab4SChristophe Kerello            - description: Chip select 3 address space
117*c1e04ab4SChristophe Kerello
1181e25c5f5SBenjamin Gaignardrequired:
1191e25c5f5SBenjamin Gaignard  - compatible
1201e25c5f5SBenjamin Gaignard  - reg
1211e25c5f5SBenjamin Gaignard  - interrupts
1221e25c5f5SBenjamin Gaignard
1236fdc6e23SRob HerringunevaluatedProperties: false
1246fdc6e23SRob Herring
1251e25c5f5SBenjamin Gaignardexamples:
1261e25c5f5SBenjamin Gaignard  - |
1271e25c5f5SBenjamin Gaignard    #include <dt-bindings/interrupt-controller/arm-gic.h>
1281e25c5f5SBenjamin Gaignard    #include <dt-bindings/clock/stm32mp1-clks.h>
1291e25c5f5SBenjamin Gaignard    #include <dt-bindings/reset/stm32mp1-resets.h>
13074f4d797SMiquel Raynal
1311e25c5f5SBenjamin Gaignard    nand-controller@58002000 {
1321e25c5f5SBenjamin Gaignard        compatible = "st,stm32mp15-fmc2";
1331e25c5f5SBenjamin Gaignard        reg = <0x58002000 0x1000>,
1341e25c5f5SBenjamin Gaignard              <0x80000000 0x1000>,
1351e25c5f5SBenjamin Gaignard              <0x88010000 0x1000>,
1361e25c5f5SBenjamin Gaignard              <0x88020000 0x1000>,
1371e25c5f5SBenjamin Gaignard              <0x81000000 0x1000>,
1381e25c5f5SBenjamin Gaignard              <0x89010000 0x1000>,
1391e25c5f5SBenjamin Gaignard              <0x89020000 0x1000>;
1401e25c5f5SBenjamin Gaignard        interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
141bce49d1eSChristophe Kerello        dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>,
142bce49d1eSChristophe Kerello               <&mdma1 20 0x2 0x12000a08 0x0 0x0>,
143bce49d1eSChristophe Kerello               <&mdma1 21 0x2 0x12000a0a 0x0 0x0>;
1441e25c5f5SBenjamin Gaignard        dma-names = "tx", "rx", "ecc";
1451e25c5f5SBenjamin Gaignard        clocks = <&rcc FMC_K>;
1461e25c5f5SBenjamin Gaignard        resets = <&rcc FMC_R>;
1471e25c5f5SBenjamin Gaignard        #address-cells = <1>;
1481e25c5f5SBenjamin Gaignard        #size-cells = <0>;
1491e25c5f5SBenjamin Gaignard
1501e25c5f5SBenjamin Gaignard        nand@0 {
1511e25c5f5SBenjamin Gaignard            reg = <0>;
1521e25c5f5SBenjamin Gaignard            nand-on-flash-bbt;
1531e25c5f5SBenjamin Gaignard            #address-cells = <1>;
1541e25c5f5SBenjamin Gaignard            #size-cells = <1>;
1551e25c5f5SBenjamin Gaignard        };
1561e25c5f5SBenjamin Gaignard    };
1571e25c5f5SBenjamin Gaignard
1581e25c5f5SBenjamin Gaignard...
159