1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mtd/st,stm32-fmc2-nand.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: STMicroelectronics Flexible Memory Controller 2 (FMC2) 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 108cc087a1SEmmanuel Vadot - Christophe Kerello <christophe.kerello@foss.st.com> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotproperties: 13c66ec88fSEmmanuel Vadot compatible: 14c66ec88fSEmmanuel Vadot enum: 15c66ec88fSEmmanuel Vadot - st,stm32mp15-fmc2 16c66ec88fSEmmanuel Vadot - st,stm32mp1-fmc2-nfc 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel Vadot reg: 19c66ec88fSEmmanuel Vadot minItems: 6 20c66ec88fSEmmanuel Vadot maxItems: 7 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot interrupts: 23c66ec88fSEmmanuel Vadot maxItems: 1 24c66ec88fSEmmanuel Vadot 25c66ec88fSEmmanuel Vadot dmas: 26c66ec88fSEmmanuel Vadot items: 27c66ec88fSEmmanuel Vadot - description: tx DMA channel 28c66ec88fSEmmanuel Vadot - description: rx DMA channel 29c66ec88fSEmmanuel Vadot - description: ecc DMA channel 30c66ec88fSEmmanuel Vadot 31c66ec88fSEmmanuel Vadot dma-names: 32c66ec88fSEmmanuel Vadot items: 33c66ec88fSEmmanuel Vadot - const: tx 34c66ec88fSEmmanuel Vadot - const: rx 35c66ec88fSEmmanuel Vadot - const: ecc 36c66ec88fSEmmanuel Vadot 37c66ec88fSEmmanuel VadotpatternProperties: 38c66ec88fSEmmanuel Vadot "^nand@[a-f0-9]$": 39c66ec88fSEmmanuel Vadot type: object 40*f126890aSEmmanuel Vadot $ref: raw-nand-chip.yaml 41c66ec88fSEmmanuel Vadot properties: 42c66ec88fSEmmanuel Vadot nand-ecc-step-size: 43c66ec88fSEmmanuel Vadot const: 512 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot nand-ecc-strength: 46c66ec88fSEmmanuel Vadot enum: [1, 4, 8] 47c66ec88fSEmmanuel Vadot 48*f126890aSEmmanuel Vadot unevaluatedProperties: false 49*f126890aSEmmanuel Vadot 50c66ec88fSEmmanuel VadotallOf: 51fac71e4eSEmmanuel Vadot - $ref: nand-controller.yaml# 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel Vadot - if: 54c66ec88fSEmmanuel Vadot properties: 55c66ec88fSEmmanuel Vadot compatible: 56c66ec88fSEmmanuel Vadot contains: 57c66ec88fSEmmanuel Vadot const: st,stm32mp15-fmc2 58c66ec88fSEmmanuel Vadot then: 59c66ec88fSEmmanuel Vadot properties: 60c66ec88fSEmmanuel Vadot reg: 61c66ec88fSEmmanuel Vadot items: 62c66ec88fSEmmanuel Vadot - description: Registers 63c66ec88fSEmmanuel Vadot - description: Chip select 0 data 64c66ec88fSEmmanuel Vadot - description: Chip select 0 command 65c66ec88fSEmmanuel Vadot - description: Chip select 0 address space 66c66ec88fSEmmanuel Vadot - description: Chip select 1 data 67c66ec88fSEmmanuel Vadot - description: Chip select 1 command 68c66ec88fSEmmanuel Vadot - description: Chip select 1 address space 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel Vadot clocks: 71c66ec88fSEmmanuel Vadot maxItems: 1 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadot resets: 74c66ec88fSEmmanuel Vadot maxItems: 1 75c66ec88fSEmmanuel Vadot 76c66ec88fSEmmanuel Vadot required: 77c66ec88fSEmmanuel Vadot - clocks 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel Vadot - if: 80c66ec88fSEmmanuel Vadot properties: 81c66ec88fSEmmanuel Vadot compatible: 82c66ec88fSEmmanuel Vadot contains: 83c66ec88fSEmmanuel Vadot const: st,stm32mp1-fmc2-nfc 84c66ec88fSEmmanuel Vadot then: 85c66ec88fSEmmanuel Vadot properties: 86c66ec88fSEmmanuel Vadot reg: 87c66ec88fSEmmanuel Vadot items: 88c66ec88fSEmmanuel Vadot - description: Chip select 0 data 89c66ec88fSEmmanuel Vadot - description: Chip select 0 command 90c66ec88fSEmmanuel Vadot - description: Chip select 0 address space 91c66ec88fSEmmanuel Vadot - description: Chip select 1 data 92c66ec88fSEmmanuel Vadot - description: Chip select 1 command 93c66ec88fSEmmanuel Vadot - description: Chip select 1 address space 94c66ec88fSEmmanuel Vadot 95c66ec88fSEmmanuel Vadotrequired: 96c66ec88fSEmmanuel Vadot - compatible 97c66ec88fSEmmanuel Vadot - reg 98c66ec88fSEmmanuel Vadot - interrupts 99c66ec88fSEmmanuel Vadot 1006be33864SEmmanuel VadotunevaluatedProperties: false 1016be33864SEmmanuel Vadot 102c66ec88fSEmmanuel Vadotexamples: 103c66ec88fSEmmanuel Vadot - | 104c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 105c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/stm32mp1-clks.h> 106c66ec88fSEmmanuel Vadot #include <dt-bindings/reset/stm32mp1-resets.h> 1078bab661aSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot nand-controller@58002000 { 109c66ec88fSEmmanuel Vadot compatible = "st,stm32mp15-fmc2"; 110c66ec88fSEmmanuel Vadot reg = <0x58002000 0x1000>, 111c66ec88fSEmmanuel Vadot <0x80000000 0x1000>, 112c66ec88fSEmmanuel Vadot <0x88010000 0x1000>, 113c66ec88fSEmmanuel Vadot <0x88020000 0x1000>, 114c66ec88fSEmmanuel Vadot <0x81000000 0x1000>, 115c66ec88fSEmmanuel Vadot <0x89010000 0x1000>, 116c66ec88fSEmmanuel Vadot <0x89020000 0x1000>; 117c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 118c66ec88fSEmmanuel Vadot dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>, 119c66ec88fSEmmanuel Vadot <&mdma1 20 0x2 0x12000a08 0x0 0x0>, 120c66ec88fSEmmanuel Vadot <&mdma1 21 0x2 0x12000a0a 0x0 0x0>; 121c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "ecc"; 122c66ec88fSEmmanuel Vadot clocks = <&rcc FMC_K>; 123c66ec88fSEmmanuel Vadot resets = <&rcc FMC_R>; 124c66ec88fSEmmanuel Vadot #address-cells = <1>; 125c66ec88fSEmmanuel Vadot #size-cells = <0>; 126c66ec88fSEmmanuel Vadot 127c66ec88fSEmmanuel Vadot nand@0 { 128c66ec88fSEmmanuel Vadot reg = <0>; 129c66ec88fSEmmanuel Vadot nand-on-flash-bbt; 130c66ec88fSEmmanuel Vadot #address-cells = <1>; 131c66ec88fSEmmanuel Vadot #size-cells = <1>; 132c66ec88fSEmmanuel Vadot }; 133c66ec88fSEmmanuel Vadot }; 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel Vadot... 136