1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
4 $id: http://devicetree.org/schemas/mtd/brcm,brcmnand.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Broadcom STB NAND Controller
10 - Brian Norris <computersforpeace@gmail.com>
11 - Kamal Dasu <kdasu.kdev@gmail.com>
12 - William Zhang <william.zhang@broadcom.com>
15 The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND
16 flash chips. It has a memory-mapped register interface for both control
17 registers and for its data input/output buffer. On some SoCs, this controller
18 is paired with a custom DMA engine (inventively named "Flash DMA") which
19 supports basic PROGRAM and READ functions, among other features.
21 This controller was originally designed for STB SoCs (BCM7xxx) but is now
22 available on a variety of Broadcom SoCs, including some BCM3xxx, MIPS based
23 Broadband SoC (BCM63xx), ARM based Broadband SoC (BCMBCA) and iProc/Cygnus.
24 Its history includes several similar (but not fully register compatible)
27 -- Additional SoC-specific NAND controller properties --
29 The NAND controller is integrated differently on the variety of SoCs on which
30 it is found. Part of this integration involves providing status and enable
31 bits with which to control the 8 exposed NAND interrupts, as well as hardware
32 for configuring the endianness of the data bus. On some SoCs, these features
33 are handled via standard, modular components (e.g., their interrupts look like
34 a normal IRQ chip), but on others, they are controlled in unique and
35 interesting ways, sometimes with registers that lump multiple NAND-related
36 functions together. The former case can be described simply by the standard
37 interrupts properties in the main controller node. But for the latter
38 exceptional cases, we define additional 'compatible' properties and associated
39 register resources within the NAND controller node above.
57 - const: brcm,brcmnand
58 - description: BCMBCA SoC-specific NAND controller
60 - const: brcm,nand-bcm63138
64 - const: brcm,brcmnand
65 - description: iProc SoC-specific NAND controller
67 - const: brcm,nand-iproc
68 - const: brcm,brcmnand-v6.1
69 - const: brcm,brcmnand
70 - description: BCM63168 SoC-specific NAND controller
72 - const: brcm,nand-bcm63168
73 - const: brcm,nand-bcm6368
74 - const: brcm,brcmnand-v4.0
75 - const: brcm,brcmnand
85 enum: [ nand, flash-dma, flash-edu, nand-cache, nand-int-base, iproc-idm, iproc-ext ]
90 - description: NAND CTLRDY interrupt
91 - description: FLASH_DMA_DONE (if flash DMA is available) or FLASH_EDU_DONE (if EDU is available)
103 description: reference to the clock for the NAND controller
110 Some versions of this IP include a write-protect
111 (WP) control bit. It is always available on >=
112 v7.0. Use this property to describe the rare
113 earlier versions of this core that include WP
116 brcm,wp-not-connected:
118 Use this property when WP pin is not physically wired to the NAND chip.
119 Write protection feature cannot be used. By default, controller assumes
120 the pin is connected and feature is used.
121 $ref: /schemas/types.yaml#/definitions/flag
126 $ref: raw-nand-chip.yaml
134 brcm,nand-oob-sector-size:
136 integer, to denote the spare area sector size
137 expected for the ECC layout in use. This size, in
138 addition to the strength and step-size,
139 determines how the hardware BCH engine will lay
140 out the parity bytes it stores on the flash.
141 This property can be automatically determined by
142 the flash geometry (particularly the NAND page
143 and OOB size) in many cases, but when booting
144 from NAND, the boot controller has only a limited
145 number of available options for its default ECC
147 $ref: /schemas/types.yaml#/definitions/uint32
149 brcm,nand-ecc-use-strap:
151 This property requires the host system to get the ECC related
152 settings from the SoC NAND boot strap configuration instead of
153 the generic NAND ECC settings. This is a common hardware design
154 on BCMBCA based boards. This strap ECC option and generic NAND
155 ECC option can not be specified at the same time.
156 $ref: /schemas/types.yaml#/definitions/flag
158 unevaluatedProperties: false
161 - $ref: nand-controller.yaml#
166 const: brcm,nand-bcm63138
172 - const: nand-int-base
177 const: brcm,nand-bcm6368
183 - const: nand-int-base
189 const: brcm,nand-iproc
211 - brcm,nand-ecc-use-strap
216 nand-ecc-strength: false
217 nand-ecc-step-size: false
218 nand-ecc-maximize: false
220 brcm,nand-oob-sector-size: false
222 unevaluatedProperties: false
230 nand-controller@f0442800 {
231 compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
232 reg = <0xf0442800 0x600>,
234 reg-names = "nand", "flash-dma";
235 interrupt-parent = <&hif_intr2_intc>;
236 interrupts = <24>, <4>;
237 interrupt-names = "nand_ctlrdy", "flash_dma_done";
239 #address-cells = <1>;
243 compatible = "brcm,nandcs";
244 reg = <1>; // Chip select 1
246 nand-ecc-strength = <12>;
247 nand-ecc-step-size = <512>;
249 #address-cells = <1>;
254 nand-controller@10000200 {
255 compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368",
256 "brcm,brcmnand-v4.0", "brcm,brcmnand";
257 reg = <0x10000200 0x180>,
260 reg-names = "nand", "nand-int-base", "nand-cache";
261 interrupt-parent = <&periph_intc>;
263 clocks = <&periph_clk 20>;
264 clock-names = "nand";
266 #address-cells = <1>;
270 compatible = "brcm,nandcs";
273 nand-ecc-strength = <1>;
274 nand-ecc-step-size = <512>;
276 #address-cells = <1>;