Skip to content

Commit 82d0bf3

Browse files
author
Boris Brezillon
committed
mtd: nand: atmel: Document the new DT bindings
The old NAND bindings were not exactly describing the hardware topology and were preventing definitions of several NAND chips under the same NAND controller. New bindings address these limitations and should be preferred over the old ones for new SoCs/boards. Old bindings are still supported for backward compatibility but are marked deprecated in the doc. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by: Rob Herring <robh@kernel.org>
1 parent f88fc12 commit 82d0bf3

1 file changed

Lines changed: 106 additions & 1 deletion

File tree

‎Documentation/devicetree/bindings/mtd/atmel-nand.txt‎

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,109 @@
1-
Atmel NAND flash
1+
Atmel NAND flash controller bindings
2+
3+
The NAND flash controller node should be defined under the EBI bus (see
4+
Documentation/devicetree/bindings/memory-controllers/atmel,ebi.txt).
5+
One or several NAND devices can be defined under this NAND controller.
6+
The NAND controller might be connected to an ECC engine.
7+
8+
* NAND controller bindings:
9+
10+
Required properties:
11+
- compatible: should be one of the following
12+
"atmel,at91rm9200-nand-controller"
13+
"atmel,at91sam9260-nand-controller"
14+
"atmel,at91sam9261-nand-controller"
15+
"atmel,at91sam9g45-nand-controller"
16+
"atmel,sama5d3-nand-controller"
17+
- ranges: empty ranges property to forward EBI ranges definitions.
18+
- #address-cells: should be set to 2.
19+
- #size-cells: should be set to 1.
20+
- atmel,nfc-io: phandle to the NFC IO block. Only required for sama5d3
21+
controllers.
22+
- atmel,nfc-sram: phandle to the NFC SRAM block. Only required for sama5d3
23+
controllers.
24+
25+
Optional properties:
26+
- ecc-engine: phandle to the PMECC block. Only meaningful if the SoC embeds
27+
a PMECC engine.
28+
29+
* NAND device/chip bindings:
30+
31+
Required properties:
32+
- reg: describes the CS lines assigned to the NAND device. If the NAND device
33+
exposes multiple CS lines (multi-dies chips), your reg property will
34+
contain X tuples of 3 entries.
35+
1st entry: the CS line this NAND chip is connected to
36+
2nd entry: the base offset of the memory region assigned to this
37+
device (always 0)
38+
3rd entry: the memory region size (always 0x800000)
39+
40+
Optional properties:
41+
- rb-gpios: the GPIO(s) used to check the Ready/Busy status of the NAND.
42+
- cs-gpios: the GPIO(s) used to control the CS line.
43+
- det-gpios: the GPIO used to detect if a Smartmedia Card is present.
44+
- atmel,rb: an integer identifying the native Ready/Busy pin. Only meaningful
45+
on sama5 SoCs.
46+
47+
All generic properties described in
48+
Documentation/devicetree/bindings/mtd/{common,nand}.txt also apply to the NAND
49+
device node, and NAND partitions should be defined under the NAND node as
50+
described in Documentation/devicetree/bindings/mtd/partition.txt.
51+
52+
* ECC engine (PMECC) bindings:
53+
54+
Required properties:
55+
- compatible: should be one of the following
56+
"atmel,at91sam9g45-pmecc"
57+
"atmel,sama5d4-pmecc"
58+
"atmel,sama5d2-pmecc"
59+
- reg: should contain 2 register ranges. The first one is pointing to the PMECC
60+
block, and the second one to the PMECC_ERRLOC block.
61+
62+
Example:
63+
64+
pmecc: ecc-engine@ffffc070 {
65+
compatible = "atmel,at91sam9g45-pmecc";
66+
reg = <0xffffc070 0x490>,
67+
<0xffffc500 0x100>;
68+
};
69+
70+
ebi: ebi@10000000 {
71+
compatible = "atmel,sama5d3-ebi";
72+
#address-cells = <2>;
73+
#size-cells = <1>;
74+
atmel,smc = <&hsmc>;
75+
reg = <0x10000000 0x10000000
76+
0x40000000 0x30000000>;
77+
ranges = <0x0 0x0 0x10000000 0x10000000
78+
0x1 0x0 0x40000000 0x10000000
79+
0x2 0x0 0x50000000 0x10000000
80+
0x3 0x0 0x60000000 0x10000000>;
81+
clocks = <&mck>;
82+
83+
nand_controller: nand-controller {
84+
compatible = "atmel,sama5d3-nand-controller";
85+
atmel,nfc-sram = <&nfc_sram>;
86+
atmel,nfc-io = <&nfc_io>;
87+
ecc-engine = <&pmecc>;
88+
#address-cells = <2>;
89+
#size-cells = <1>;
90+
ranges;
91+
92+
nand@3 {
93+
reg = <0x3 0x0 0x800000>;
94+
atmel,rb = <0>;
95+
96+
/*
97+
* Put generic NAND/MTD properties and
98+
* subnodes here.
99+
*/
100+
};
101+
};
102+
};
103+
104+
-----------------------------------------------------------------------
105+
106+
Deprecated bindings (should not be used in new device trees):
2107

3108
Required properties:
4109
- compatible: The possible values are:

0 commit comments

Comments
 (0)