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: 10*f4eedebdSPatrice 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 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 47bce49d1eSChristophe KerelloallOf: 48bce49d1eSChristophe Kerello - $ref: "nand-controller.yaml#" 49bce49d1eSChristophe Kerello 50bce49d1eSChristophe Kerello - if: 51bce49d1eSChristophe Kerello properties: 52bce49d1eSChristophe Kerello compatible: 53bce49d1eSChristophe Kerello contains: 54bce49d1eSChristophe Kerello const: st,stm32mp15-fmc2 55bce49d1eSChristophe Kerello then: 56bce49d1eSChristophe Kerello properties: 57bce49d1eSChristophe Kerello reg: 58bce49d1eSChristophe Kerello items: 59bce49d1eSChristophe Kerello - description: Registers 60bce49d1eSChristophe Kerello - description: Chip select 0 data 61bce49d1eSChristophe Kerello - description: Chip select 0 command 62bce49d1eSChristophe Kerello - description: Chip select 0 address space 63bce49d1eSChristophe Kerello - description: Chip select 1 data 64bce49d1eSChristophe Kerello - description: Chip select 1 command 65bce49d1eSChristophe Kerello - description: Chip select 1 address space 66bce49d1eSChristophe Kerello 67bce49d1eSChristophe Kerello clocks: 68bce49d1eSChristophe Kerello maxItems: 1 69bce49d1eSChristophe Kerello 70bce49d1eSChristophe Kerello resets: 71bce49d1eSChristophe Kerello maxItems: 1 72bce49d1eSChristophe Kerello 73bce49d1eSChristophe Kerello required: 74bce49d1eSChristophe Kerello - clocks 75bce49d1eSChristophe Kerello 76bce49d1eSChristophe Kerello - if: 77bce49d1eSChristophe Kerello properties: 78bce49d1eSChristophe Kerello compatible: 79bce49d1eSChristophe Kerello contains: 80bce49d1eSChristophe Kerello const: st,stm32mp1-fmc2-nfc 81bce49d1eSChristophe Kerello then: 82bce49d1eSChristophe Kerello properties: 83bce49d1eSChristophe Kerello reg: 84bce49d1eSChristophe Kerello items: 85bce49d1eSChristophe Kerello - description: Chip select 0 data 86bce49d1eSChristophe Kerello - description: Chip select 0 command 87bce49d1eSChristophe Kerello - description: Chip select 0 address space 88bce49d1eSChristophe Kerello - description: Chip select 1 data 89bce49d1eSChristophe Kerello - description: Chip select 1 command 90bce49d1eSChristophe Kerello - description: Chip select 1 address space 91bce49d1eSChristophe Kerello 921e25c5f5SBenjamin Gaignardrequired: 931e25c5f5SBenjamin Gaignard - compatible 941e25c5f5SBenjamin Gaignard - reg 951e25c5f5SBenjamin Gaignard - interrupts 961e25c5f5SBenjamin Gaignard 976fdc6e23SRob HerringunevaluatedProperties: false 986fdc6e23SRob Herring 991e25c5f5SBenjamin Gaignardexamples: 1001e25c5f5SBenjamin Gaignard - | 1011e25c5f5SBenjamin Gaignard #include <dt-bindings/interrupt-controller/arm-gic.h> 1021e25c5f5SBenjamin Gaignard #include <dt-bindings/clock/stm32mp1-clks.h> 1031e25c5f5SBenjamin Gaignard #include <dt-bindings/reset/stm32mp1-resets.h> 1041e25c5f5SBenjamin Gaignard nand-controller@58002000 { 1051e25c5f5SBenjamin Gaignard compatible = "st,stm32mp15-fmc2"; 1061e25c5f5SBenjamin Gaignard reg = <0x58002000 0x1000>, 1071e25c5f5SBenjamin Gaignard <0x80000000 0x1000>, 1081e25c5f5SBenjamin Gaignard <0x88010000 0x1000>, 1091e25c5f5SBenjamin Gaignard <0x88020000 0x1000>, 1101e25c5f5SBenjamin Gaignard <0x81000000 0x1000>, 1111e25c5f5SBenjamin Gaignard <0x89010000 0x1000>, 1121e25c5f5SBenjamin Gaignard <0x89020000 0x1000>; 1131e25c5f5SBenjamin Gaignard interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 114bce49d1eSChristophe Kerello dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>, 115bce49d1eSChristophe Kerello <&mdma1 20 0x2 0x12000a08 0x0 0x0>, 116bce49d1eSChristophe Kerello <&mdma1 21 0x2 0x12000a0a 0x0 0x0>; 1171e25c5f5SBenjamin Gaignard dma-names = "tx", "rx", "ecc"; 1181e25c5f5SBenjamin Gaignard clocks = <&rcc FMC_K>; 1191e25c5f5SBenjamin Gaignard resets = <&rcc FMC_R>; 1201e25c5f5SBenjamin Gaignard #address-cells = <1>; 1211e25c5f5SBenjamin Gaignard #size-cells = <0>; 1221e25c5f5SBenjamin Gaignard 1231e25c5f5SBenjamin Gaignard nand@0 { 1241e25c5f5SBenjamin Gaignard reg = <0>; 1251e25c5f5SBenjamin Gaignard nand-on-flash-bbt; 1261e25c5f5SBenjamin Gaignard #address-cells = <1>; 1271e25c5f5SBenjamin Gaignard #size-cells = <1>; 1281e25c5f5SBenjamin Gaignard }; 1291e25c5f5SBenjamin Gaignard }; 1301e25c5f5SBenjamin Gaignard 1311e25c5f5SBenjamin Gaignard... 132