blob: 3733300de8dd949bd822154c469aabcc75b40520 [file] [log] [blame]
Boris Brezillon2d472ab2016-04-01 14:26:35 +02001* NAND chip and NAND controller generic binding
2
3NAND controller/NAND chip representation:
4
5The NAND controller should be represented with its own DT node, and all
6NAND chips attached to this controller should be defined as children nodes
7of the NAND controller. This representation should be enforced even for
8simple controllers supporting only one chip.
9
10Mandatory NAND controller properties:
11- #address-cells: depends on your controller. Should at least be 1 to
12 encode the CS line id.
13- #size-cells: depends on your controller. Put zero unless you need a
14 mapping between CS lines and dedicated memory regions
15
16Optional NAND controller properties
17- ranges: only needed if you need to define a mapping between CS lines and
18 memory regions
19
20Optional NAND chip properties:
Jean-Christophe PLAGNIOL-VILLARD770d7c32012-01-28 12:12:36 +080021
22- nand-ecc-mode : String, operation mode of the NAND ecc mode.
Rafał Miłecki32698aa2016-04-22 13:23:14 +020023 Supported values are: "none", "soft", "hw", "hw_syndrome",
24 "hw_oob_first".
25 Deprecated values:
26 "soft_bch": use "soft" and nand-ecc-algo instead
Rafał Miłeckiba4f46b2016-04-22 13:23:13 +020027- nand-ecc-algo: string, algorithm of NAND ECC.
28 Supported values are: "hamming", "bch".
Jean-Christophe PLAGNIOL-VILLARD770d7c32012-01-28 12:12:36 +080029- nand-bus-width : 8 or 16 bus width if not present 8
30- nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
Ezequiel Garcia8dd49162014-02-24 19:24:49 -030031
32- nand-ecc-strength: integer representing the number of bits to correct
33 per ECC step.
34
35- nand-ecc-step-size: integer representing the number of data bytes
36 that are covered by a single ECC step.
37
38The ECC strength and ECC step size properties define the correction capability
39of a controller. Together, they say a controller can correct "{strength} bit
40errors per {size} bytes".
41
42The interpretation of these parameters is implementation-defined, so not all
43implementations must support all possible combinations. However, implementations
44are encouraged to further specify the value(s) they support.
Boris Brezillon2d472ab2016-04-01 14:26:35 +020045
46Example:
47
48 nand-controller {
49 #address-cells = <1>;
50 #size-cells = <0>;
51
52 /* controller specific properties */
53
54 nand@0 {
55 reg = <0>;
Baruch Siach507e6172016-05-25 06:45:10 +030056 nand-ecc-mode = "soft";
57 nand-ecc-algo = "bch";
Boris Brezillon2d472ab2016-04-01 14:26:35 +020058
59 /* controller specific properties */
60 };
61 };