0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/st,stm32-fmc2-nand.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: STMicroelectronics Flexible Memory Controller 2 (FMC2) Bindings
0008
0009 maintainers:
0010 - Christophe Kerello <christophe.kerello@foss.st.com>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - st,stm32mp15-fmc2
0016 - st,stm32mp1-fmc2-nfc
0017
0018 reg:
0019 minItems: 6
0020 maxItems: 7
0021
0022 interrupts:
0023 maxItems: 1
0024
0025 dmas:
0026 items:
0027 - description: tx DMA channel
0028 - description: rx DMA channel
0029 - description: ecc DMA channel
0030
0031 dma-names:
0032 items:
0033 - const: tx
0034 - const: rx
0035 - const: ecc
0036
0037 patternProperties:
0038 "^nand@[a-f0-9]$":
0039 type: object
0040 properties:
0041 nand-ecc-step-size:
0042 const: 512
0043
0044 nand-ecc-strength:
0045 enum: [1, 4, 8]
0046
0047 allOf:
0048 - $ref: "nand-controller.yaml#"
0049
0050 - if:
0051 properties:
0052 compatible:
0053 contains:
0054 const: st,stm32mp15-fmc2
0055 then:
0056 properties:
0057 reg:
0058 items:
0059 - description: Registers
0060 - description: Chip select 0 data
0061 - description: Chip select 0 command
0062 - description: Chip select 0 address space
0063 - description: Chip select 1 data
0064 - description: Chip select 1 command
0065 - description: Chip select 1 address space
0066
0067 clocks:
0068 maxItems: 1
0069
0070 resets:
0071 maxItems: 1
0072
0073 required:
0074 - clocks
0075
0076 - if:
0077 properties:
0078 compatible:
0079 contains:
0080 const: st,stm32mp1-fmc2-nfc
0081 then:
0082 properties:
0083 reg:
0084 items:
0085 - description: Chip select 0 data
0086 - description: Chip select 0 command
0087 - description: Chip select 0 address space
0088 - description: Chip select 1 data
0089 - description: Chip select 1 command
0090 - description: Chip select 1 address space
0091
0092 required:
0093 - compatible
0094 - reg
0095 - interrupts
0096
0097 unevaluatedProperties: false
0098
0099 examples:
0100 - |
0101 #include <dt-bindings/interrupt-controller/arm-gic.h>
0102 #include <dt-bindings/clock/stm32mp1-clks.h>
0103 #include <dt-bindings/reset/stm32mp1-resets.h>
0104 nand-controller@58002000 {
0105 compatible = "st,stm32mp15-fmc2";
0106 reg = <0x58002000 0x1000>,
0107 <0x80000000 0x1000>,
0108 <0x88010000 0x1000>,
0109 <0x88020000 0x1000>,
0110 <0x81000000 0x1000>,
0111 <0x89010000 0x1000>,
0112 <0x89020000 0x1000>;
0113 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
0114 dmas = <&mdma1 20 0x2 0x12000a02 0x0 0x0>,
0115 <&mdma1 20 0x2 0x12000a08 0x0 0x0>,
0116 <&mdma1 21 0x2 0x12000a0a 0x0 0x0>;
0117 dma-names = "tx", "rx", "ecc";
0118 clocks = <&rcc FMC_K>;
0119 resets = <&rcc FMC_R>;
0120 #address-cells = <1>;
0121 #size-cells = <0>;
0122
0123 nand@0 {
0124 reg = <0>;
0125 nand-on-flash-bbt;
0126 #address-cells = <1>;
0127 #size-cells = <1>;
0128 };
0129 };
0130
0131 ...