1 # SPDX-License-Identifier: (GPL-2.0-only OR BS 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/mtd/marvell 4 $id: http://devicetree.org/schemas/mtd/marvell,nand-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Marvell NAND Flash Controller (NFC) 7 title: Marvell NAND Flash Controller (NFC) 8 8 9 maintainers: 9 maintainers: 10 - Miquel Raynal <miquel.raynal@bootlin.com> 10 - Miquel Raynal <miquel.raynal@bootlin.com> 11 11 12 properties: 12 properties: 13 compatible: 13 compatible: 14 oneOf: 14 oneOf: 15 - items: 15 - items: 16 - const: marvell,armada-8k-nand-cont 16 - const: marvell,armada-8k-nand-controller 17 - const: marvell,armada370-nand-cont 17 - const: marvell,armada370-nand-controller 18 - enum: 18 - enum: 19 - marvell,ac5-nand-controller << 20 - marvell,armada370-nand-controller 19 - marvell,armada370-nand-controller 21 - marvell,pxa3xx-nand-controller 20 - marvell,pxa3xx-nand-controller 22 - description: legacy bindings 21 - description: legacy bindings 23 deprecated: true 22 deprecated: true 24 enum: 23 enum: 25 - marvell,armada-8k-nand 24 - marvell,armada-8k-nand 26 - marvell,armada370-nand 25 - marvell,armada370-nand 27 - marvell,pxa3xx-nand 26 - marvell,pxa3xx-nand 28 27 29 reg: 28 reg: 30 maxItems: 1 29 maxItems: 1 31 30 32 interrupts: 31 interrupts: 33 maxItems: 1 32 maxItems: 1 34 33 35 clocks: 34 clocks: 36 description: 35 description: 37 Shall reference the NAND controller cloc 36 Shall reference the NAND controller clocks, the second one is 38 is only needed for the Armada 7K/8K SoCs 37 is only needed for the Armada 7K/8K SoCs 39 minItems: 1 38 minItems: 1 40 maxItems: 2 39 maxItems: 2 41 40 42 clock-names: 41 clock-names: 43 minItems: 1 42 minItems: 1 44 items: 43 items: 45 - const: core 44 - const: core 46 - const: reg 45 - const: reg 47 46 48 dmas: 47 dmas: 49 maxItems: 1 48 maxItems: 1 50 49 51 dma-names: 50 dma-names: 52 items: 51 items: 53 - const: data 52 - const: data 54 53 55 marvell,system-controller: 54 marvell,system-controller: 56 $ref: /schemas/types.yaml#/definitions/pha 55 $ref: /schemas/types.yaml#/definitions/phandle 57 description: Syscon node that handles NAND 56 description: Syscon node that handles NAND controller related registers 58 57 59 patternProperties: 58 patternProperties: 60 "^nand@[a-f0-9]$": 59 "^nand@[a-f0-9]$": 61 type: object 60 type: object 62 $ref: raw-nand-chip.yaml 61 $ref: raw-nand-chip.yaml 63 62 64 properties: 63 properties: 65 reg: 64 reg: 66 minimum: 0 65 minimum: 0 67 maximum: 3 66 maximum: 3 68 67 69 nand-rb: 68 nand-rb: 70 items: 69 items: 71 - minimum: 0 70 - minimum: 0 72 maximum: 1 71 maximum: 1 73 72 74 nand-ecc-step-size: 73 nand-ecc-step-size: 75 const: 512 74 const: 512 76 75 77 nand-ecc-strength: 76 nand-ecc-strength: 78 enum: [1, 4, 8, 12, 16] 77 enum: [1, 4, 8, 12, 16] 79 78 80 nand-ecc-mode: 79 nand-ecc-mode: 81 const: hw 80 const: hw 82 81 83 marvell,nand-keep-config: 82 marvell,nand-keep-config: 84 $ref: /schemas/types.yaml#/definitions 83 $ref: /schemas/types.yaml#/definitions/flag 85 description: 84 description: 86 Orders the driver not to take the ti 85 Orders the driver not to take the timings from the core and 87 leaving them completely untouched. B 86 leaving them completely untouched. Bootloader timings will then 88 be used. 87 be used. 89 88 90 marvell,nand-enable-arbiter: 89 marvell,nand-enable-arbiter: 91 $ref: /schemas/types.yaml#/definitions 90 $ref: /schemas/types.yaml#/definitions/flag 92 description: 91 description: 93 To enable the arbiter, all boards bl 92 To enable the arbiter, all boards blindly used it, 94 this bit was set by the bootloader f 93 this bit was set by the bootloader for many boards and even if 95 it is marked reserved in several dat 94 it is marked reserved in several datasheets, it might be needed to set 96 it (otherwise it is harmless). 95 it (otherwise it is harmless). 97 deprecated: true 96 deprecated: true 98 97 99 required: 98 required: 100 - reg 99 - reg 101 - nand-rb 100 - nand-rb 102 101 103 unevaluatedProperties: false 102 unevaluatedProperties: false 104 103 105 required: 104 required: 106 - compatible 105 - compatible 107 - reg 106 - reg 108 - interrupts 107 - interrupts 109 - clocks 108 - clocks 110 109 111 allOf: 110 allOf: 112 - $ref: nand-controller.yaml# 111 - $ref: nand-controller.yaml# 113 112 114 - if: 113 - if: 115 properties: 114 properties: 116 compatible: 115 compatible: 117 contains: 116 contains: 118 const: marvell,pxa3xx-nand-control 117 const: marvell,pxa3xx-nand-controller 119 then: 118 then: 120 required: 119 required: 121 - dmas 120 - dmas 122 - dma-names 121 - dma-names 123 122 124 - if: 123 - if: 125 properties: 124 properties: 126 compatible: 125 compatible: 127 contains: 126 contains: 128 const: marvell,armada-8k-nand-cont 127 const: marvell,armada-8k-nand-controller 129 then: 128 then: 130 properties: 129 properties: 131 clocks: 130 clocks: 132 minItems: 2 131 minItems: 2 133 132 134 clock-names: 133 clock-names: 135 minItems: 2 134 minItems: 2 136 135 137 required: 136 required: 138 - marvell,system-controller 137 - marvell,system-controller 139 138 140 else: 139 else: 141 properties: 140 properties: 142 clocks: 141 clocks: 143 minItems: 1 142 minItems: 1 144 143 145 clock-names: 144 clock-names: 146 minItems: 1 145 minItems: 1 147 146 148 147 149 unevaluatedProperties: false 148 unevaluatedProperties: false 150 149 151 examples: 150 examples: 152 - | 151 - | 153 #include <dt-bindings/interrupt-controller 152 #include <dt-bindings/interrupt-controller/arm-gic.h> 154 nand_controller: nand-controller@d0000 { 153 nand_controller: nand-controller@d0000 { 155 compatible = "marvell,armada370-nand-c 154 compatible = "marvell,armada370-nand-controller"; 156 reg = <0xd0000 0x54>; 155 reg = <0xd0000 0x54>; 157 #address-cells = <1>; 156 #address-cells = <1>; 158 #size-cells = <0>; 157 #size-cells = <0>; 159 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVE 158 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 160 clocks = <&coredivclk 0>; 159 clocks = <&coredivclk 0>; 161 160 162 nand@0 { 161 nand@0 { 163 reg = <0>; 162 reg = <0>; 164 label = "main-storage"; 163 label = "main-storage"; 165 nand-rb = <0>; 164 nand-rb = <0>; 166 nand-ecc-mode = "hw"; 165 nand-ecc-mode = "hw"; 167 marvell,nand-keep-config; 166 marvell,nand-keep-config; 168 nand-on-flash-bbt; 167 nand-on-flash-bbt; 169 nand-ecc-strength = <4>; 168 nand-ecc-strength = <4>; 170 nand-ecc-step-size = <512>; 169 nand-ecc-step-size = <512>; 171 170 172 partitions { 171 partitions { 173 compatible = "fixed-partitions 172 compatible = "fixed-partitions"; 174 #address-cells = <1>; 173 #address-cells = <1>; 175 #size-cells = <1>; 174 #size-cells = <1>; 176 175 177 partition@0 { 176 partition@0 { 178 label = "Rootfs"; 177 label = "Rootfs"; 179 reg = <0x00000000 0x400000 178 reg = <0x00000000 0x40000000>; 180 }; 179 }; 181 }; 180 }; 182 }; 181 }; 183 }; 182 }; 184 183 185 - | 184 - | 186 cp0_nand_controller: nand-controller@72000 185 cp0_nand_controller: nand-controller@720000 { 187 compatible = "marvell,armada-8k-nand-c 186 compatible = "marvell,armada-8k-nand-controller", 188 "marvell,armada370-nand-contro 187 "marvell,armada370-nand-controller"; 189 reg = <0x720000 0x54>; 188 reg = <0x720000 0x54>; 190 #address-cells = <1>; 189 #address-cells = <1>; 191 #size-cells = <0>; 190 #size-cells = <0>; 192 interrupts = <115 IRQ_TYPE_LEVEL_HIGH> 191 interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; 193 clock-names = "core", "reg"; 192 clock-names = "core", "reg"; 194 clocks = <&cp0_clk 1 2>, 193 clocks = <&cp0_clk 1 2>, 195 <&cp0_clk 1 17>; 194 <&cp0_clk 1 17>; 196 marvell,system-controller = <&cp0_sysc 195 marvell,system-controller = <&cp0_syscon0>; 197 196 198 nand@0 { 197 nand@0 { 199 reg = <0>; 198 reg = <0>; 200 label = "main-storage"; 199 label = "main-storage"; 201 nand-rb = <0>; 200 nand-rb = <0>; 202 nand-ecc-mode = "hw"; 201 nand-ecc-mode = "hw"; 203 nand-ecc-strength = <8>; 202 nand-ecc-strength = <8>; 204 nand-ecc-step-size = <512>; 203 nand-ecc-step-size = <512>; 205 }; 204 }; 206 }; 205 }; 207 206 208 - | 207 - | 209 nand-controller@43100000 { 208 nand-controller@43100000 { 210 compatible = "marvell,pxa3xx-nand-cont 209 compatible = "marvell,pxa3xx-nand-controller"; 211 reg = <0x43100000 90>; 210 reg = <0x43100000 90>; 212 interrupts = <45>; 211 interrupts = <45>; 213 clocks = <&clks 1>; 212 clocks = <&clks 1>; 214 clock-names = "core"; 213 clock-names = "core"; 215 dmas = <&pdma 97 3>; 214 dmas = <&pdma 97 3>; 216 dma-names = "data"; 215 dma-names = "data"; 217 #address-cells = <1>; 216 #address-cells = <1>; 218 #size-cells = <0>; 217 #size-cells = <0>; 219 nand@0 { 218 nand@0 { 220 reg = <0>; 219 reg = <0>; 221 nand-rb = <0>; 220 nand-rb = <0>; 222 nand-ecc-mode = "hw"; 221 nand-ecc-mode = "hw"; 223 marvell,nand-keep-config; 222 marvell,nand-keep-config; 224 }; 223 }; 225 }; 224 }; 226 225 227 ... 226 ...
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.