Broadcom STB NAND Controller
Schema identifier ($id): "http://devicetree.org/schemas/mtd/brcm,brcmnand.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Brian Norris <computersforpeace@gmail.com>", "Kamal Dasu <kdasu.kdev@gmail.com>", "William Zhang <william.zhang@broadcom.com>"
The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND flash chips. It has a memory-mapped register interface for both control registers and for its data input/output buffer. On some SoCs, this controller is paired with a custom DMA engine (inventively named "Flash DMA") which supports basic PROGRAM and READ functions, among other features.
This controller was originally designed for STB SoCs (BCM7xxx) but is now available on a variety of Broadcom SoCs, including some BCM3xxx, MIPS based Broadband SoC (BCM63xx), ARM based Broadband SoC (BCMBCA) and iProc/Cygnus. Its history includes several similar (but not fully register compatible) versions.
-- Additional SoC-specific NAND controller properties --
The NAND controller is integrated differently on the variety of SoCs on which it is found. Part of this integration involves providing status and enable bits with which to control the 8 exposed NAND interrupts, as well as hardware for configuring the endianness of the data bus. On some SoCs, these features are handled via standard, modular components (e.g., their interrupts look like a normal IRQ chip), but on others, they are controlled in unique and interesting ways, sometimes with registers that lump multiple NAND-related functions together. The former case can be described simply by the standard interrupts properties in the main controller node. But for the latter exceptional cases, we define additional 'compatible' properties and associated register resources within the NAND controller node above.
Properties and child nodes (properties) #
compatible — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"brcm,brcmnand-v2.1","brcm,brcmnand-v2.2","brcm,brcmnand-v4.0","brcm,brcmnand-v5.0","brcm,brcmnand-v6.0","brcm,brcmnand-v6.1","brcm,brcmnand-v6.2","brcm,brcmnand-v7.0","brcm,brcmnand-v7.1","brcm,brcmnand-v7.2","brcm,brcmnand-v7.3"Item 2
Exact value (
const):"brcm,brcmnand"
Rule 2
BCMBCA SoC-specific NAND controller
Array item rules (
items)Item 1
Exact value (
const):"brcm,nand-bcm63138"Item 2
Allowed values (
enum):"brcm,brcmnand-v7.0","brcm,brcmnand-v7.1"Item 3
Exact value (
const):"brcm,brcmnand"
Rule 3
iProc SoC-specific NAND controller
Array item rules (
items)Item 1
Exact value (
const):"brcm,nand-iproc"Item 2
Exact value (
const):"brcm,brcmnand-v6.1"
Rule 4
BCM63168 SoC-specific NAND controller
Array item rules (
items)Item 1
Exact value (
const):"brcm,nand-bcm63168"Item 2
Exact value (
const):"brcm,nand-bcm6368"Item 3
Exact value (
const):"brcm,brcmnand-v4.0"Item 4
Exact value (
const):"brcm,brcmnand"
reg — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 6
reg-names — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 6
Array item rules (items) #
Allowed values (
enum):"nand","flash-dma","flash-edu","nand-cache","nand-int-base","iproc-idm","iproc-ext"
interrupts — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
NAND CTLRDY interrupt
Item 2
FLASH_DMA_DONE (if flash DMA is available) or FLASH_EDU_DONE (if EDU is available)
interrupt-names — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"nand_ctlrdy"
Item 2
clocks — not listed as required here #
Maximum number of items (maxItems): 1
reference to the clock for the NAND controller
clock-names — not listed as required here #
Exact value (const): "nand"
brcm,nand-has-wp — not listed as required here #
Some versions of this IP include a write-protect (WP) control bit. It is always available on >= v7.0. Use this property to describe the rare earlier versions of this core that include WP
Value type (type): "boolean"
brcm,wp-not-connected — not listed as required here #
Use this property when WP pin is not physically wired to the NAND chip. Write protection feature cannot be used. By default, controller assumes the pin is connected and feature is used.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
Properties matching a name pattern (patternProperties) #
^nand@[a-f0-9]$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): raw-nand-chip.yaml
Properties and child nodes (properties) #
compatible — not listed as required here
Exact value (const): "brcm,nandcs"
nand-ecc-step-size — not listed as required here
Allowed values (enum): 512, 1024
brcm,nand-oob-sector-size — not listed as required here
integer, to denote the spare area sector size expected for the ECC layout in use. This size, in addition to the strength and step-size, determines how the hardware BCH engine will lay out the parity bytes it stores on the flash. This property can be automatically determined by the flash geometry (particularly the NAND page and OOB size) in many cases, but when booting from NAND, the boot controller has only a limited number of available options for its default ECC layout.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
brcm,nand-ecc-use-strap — not listed as required here
This property requires the host system to get the ECC related settings from the SoC NAND boot strap configuration instead of the generic NAND ECC settings. This is a common hardware design on BCMBCA based boards. This strap ECC option and generic NAND ECC option can not be specified at the same time.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):nand-controller.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"brcm,nand-bcm63138"When the condition matches (
then) #Properties and child nodes (
properties)
reg-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"nand"Item 2
Exact value (
const):"nand-int-base"
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"brcm,nand-bcm6368"When the condition matches (
then) #Properties and child nodes (
properties)
reg-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"nand"Item 2
Exact value (
const):"nand-int-base"Item 3
Exact value (
const):"nand-cache"
Rule 4 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Exact value (
const):"brcm,nand-iproc"When the condition matches (
then) #Properties and child nodes (
properties)
reg-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"nand"Item 2
Exact value (
const):"iproc-idm"Item 3
Exact value (
const):"iproc-ext"
Rule 5 #
Condition (
if) #Required in this object (
required):"interrupts"Properties and child nodes (
properties)
interrupts— required hereMinimum number of items (
minItems):2When the condition matches (
then) #
Rule 6 #
Condition (
if) #Properties matching a name pattern (
patternProperties)
^nand@[a-f0-9]$— name matches this regular expressionRequired in this object (
required):"brcm,nand-ecc-use-strap"When the condition matches (
then) #Properties matching a name pattern (
patternProperties)
^nand@[a-f0-9]$— name matches this regular expressionProperties and child nodes (
properties)
nand-ecc-strength— not listed as required here
false— Not permitted by this property rule.
nand-ecc-step-size— not listed as required here
false— Not permitted by this property rule.
nand-ecc-maximize— not listed as required here
false— Not permitted by this property rule.
nand-ecc-algo— not listed as required here
false— Not permitted by this property rule.
brcm,nand-oob-sector-size— not listed as required here
false— Not permitted by this property rule.
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Required in this object (required): "reg", "reg-names"
Examples (examples) #
nand-controller@f0442800 {
compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
reg = <0xf0442800 0x600>,
<0xf0443000 0x100>;
reg-names = "nand", "flash-dma";
interrupt-parent = <&hif_intr2_intc>;
interrupts = <24>, <4>;
interrupt-names = "nand_ctlrdy", "flash_dma_done";
#address-cells = <1>;
#size-cells = <0>;
nand@1 {
compatible = "brcm,nandcs";
reg = <1>; // Chip select 1
nand-on-flash-bbt;
nand-ecc-strength = <12>;
nand-ecc-step-size = <512>;
#address-cells = <1>;
#size-cells = <1>;
};
};
nand-controller@10000200 {
compatible = "brcm,nand-bcm63168", "brcm,nand-bcm6368",
"brcm,brcmnand-v4.0", "brcm,brcmnand";
reg = <0x10000200 0x180>,
<0x100000b0 0x10>,
<0x10000600 0x200>;
reg-names = "nand", "nand-int-base", "nand-cache";
interrupt-parent = <&periph_intc>;
interrupts = <50>;
clocks = <&periph_clk 20>;
clock-names = "nand";
#address-cells = <1>;
#size-cells = <0>;
nand@0 {
compatible = "brcm,nandcs";
reg = <0>;
nand-on-flash-bbt;
nand-ecc-strength = <1>;
nand-ecc-step-size = <512>;
#address-cells = <1>;
#size-cells = <1>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause