xref: /linux/Documentation/devicetree/bindings/mtd/raw-nand-property.yaml (revision 8541d8f725c673db3bd741947f27974358b2e163)
1*0ba8da2fSFrank Li# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0ba8da2fSFrank Li%YAML 1.2
3*0ba8da2fSFrank Li---
4*0ba8da2fSFrank Li$id: http://devicetree.org/schemas/mtd/raw-nand-property.yaml#
5*0ba8da2fSFrank Li$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0ba8da2fSFrank Li
7*0ba8da2fSFrank Lititle: Raw NAND Chip Common Properties
8*0ba8da2fSFrank Li
9*0ba8da2fSFrank Limaintainers:
10*0ba8da2fSFrank Li  - Miquel Raynal <miquel.raynal@bootlin.com>
11*0ba8da2fSFrank Li
12*0ba8da2fSFrank Lidescription: |
13*0ba8da2fSFrank Li  The ECC strength and ECC step size properties define the user
14*0ba8da2fSFrank Li  desires in terms of correction capability of a controller. Together,
15*0ba8da2fSFrank Li  they request the ECC engine to correct {strength} bit errors per
16*0ba8da2fSFrank Li  {size} bytes for a particular raw NAND chip.
17*0ba8da2fSFrank Li
18*0ba8da2fSFrank Li  The interpretation of these parameters is implementation-defined, so
19*0ba8da2fSFrank Li  not all implementations must support all possible
20*0ba8da2fSFrank Li  combinations. However, implementations are encouraged to further
21*0ba8da2fSFrank Li  specify the value(s) they support.
22*0ba8da2fSFrank Li
23*0ba8da2fSFrank Liproperties:
24*0ba8da2fSFrank Li  nand-ecc-placement:
25*0ba8da2fSFrank Li    description:
26*0ba8da2fSFrank Li      Location of the ECC bytes. This location is unknown by default
27*0ba8da2fSFrank Li      but can be explicitly set to "oob", if all ECC bytes are
28*0ba8da2fSFrank Li      known to be stored in the OOB area, or "interleaved" if ECC
29*0ba8da2fSFrank Li      bytes will be interleaved with regular data in the main area.
30*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/string
31*0ba8da2fSFrank Li    enum: [ oob, interleaved ]
32*0ba8da2fSFrank Li    deprecated: true
33*0ba8da2fSFrank Li
34*0ba8da2fSFrank Li  nand-ecc-mode:
35*0ba8da2fSFrank Li    description:
36*0ba8da2fSFrank Li      Legacy ECC configuration mixing the ECC engine choice and
37*0ba8da2fSFrank Li      configuration.
38*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/string
39*0ba8da2fSFrank Li    enum: [none, soft, soft_bch, hw, hw_syndrome, on-die]
40*0ba8da2fSFrank Li    deprecated: true
41*0ba8da2fSFrank Li
42*0ba8da2fSFrank Li  nand-bus-width:
43*0ba8da2fSFrank Li    description:
44*0ba8da2fSFrank Li      Bus width to the NAND chip
45*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/uint32
46*0ba8da2fSFrank Li    enum: [8, 16]
47*0ba8da2fSFrank Li    default: 8
48*0ba8da2fSFrank Li
49*0ba8da2fSFrank Li  nand-on-flash-bbt:
50*0ba8da2fSFrank Li    description:
51*0ba8da2fSFrank Li      With this property, the OS will search the device for a Bad
52*0ba8da2fSFrank Li      Block Table (BBT). If not found, it will create one, reserve
53*0ba8da2fSFrank Li      a few blocks at the end of the device to store it and update
54*0ba8da2fSFrank Li      it as the device ages. Otherwise, the out-of-band area of a
55*0ba8da2fSFrank Li      few pages of all the blocks will be scanned at boot time to
56*0ba8da2fSFrank Li      find Bad Block Markers (BBM). These markers will help to
57*0ba8da2fSFrank Li      build a volatile BBT in RAM.
58*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/flag
59*0ba8da2fSFrank Li
60*0ba8da2fSFrank Li  nand-ecc-maximize:
61*0ba8da2fSFrank Li    description:
62*0ba8da2fSFrank Li      Whether or not the ECC strength should be maximized. The
63*0ba8da2fSFrank Li      maximum ECC strength is both controller and chip
64*0ba8da2fSFrank Li      dependent. The ECC engine has to select the ECC config
65*0ba8da2fSFrank Li      providing the best strength and taking the OOB area size
66*0ba8da2fSFrank Li      constraint into account. This is particularly useful when
67*0ba8da2fSFrank Li      only the in-band area is used by the upper layers, and you
68*0ba8da2fSFrank Li      want to make your NAND as reliable as possible.
69*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/flag
70*0ba8da2fSFrank Li
71*0ba8da2fSFrank Li  nand-is-boot-medium:
72*0ba8da2fSFrank Li    description:
73*0ba8da2fSFrank Li      Whether or not the NAND chip is a boot medium. Drivers might
74*0ba8da2fSFrank Li      use this information to select ECC algorithms supported by
75*0ba8da2fSFrank Li      the boot ROM or similar restrictions.
76*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/flag
77*0ba8da2fSFrank Li
78*0ba8da2fSFrank Li  nand-rb:
79*0ba8da2fSFrank Li    description:
80*0ba8da2fSFrank Li      Contains the native Ready/Busy IDs.
81*0ba8da2fSFrank Li    $ref: /schemas/types.yaml#/definitions/uint32-array
82*0ba8da2fSFrank Li
83*0ba8da2fSFrank Li  rb-gpios:
84*0ba8da2fSFrank Li    description:
85*0ba8da2fSFrank Li      Contains one or more GPIO descriptor (the numper of descriptor
86*0ba8da2fSFrank Li      depends on the number of R/B pins exposed by the flash) for the
87*0ba8da2fSFrank Li      Ready/Busy pins. Active state refers to the NAND ready state and
88*0ba8da2fSFrank Li      should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.
89*0ba8da2fSFrank Li
90*0ba8da2fSFrank Li  wp-gpios:
91*0ba8da2fSFrank Li    description:
92*0ba8da2fSFrank Li      Contains one GPIO descriptor for the Write Protect pin.
93*0ba8da2fSFrank Li      Active state refers to the NAND Write Protect state and should be
94*0ba8da2fSFrank Li      set to GPIOD_ACTIVE_LOW unless the signal is inverted.
95*0ba8da2fSFrank Li    maxItems: 1
96*0ba8da2fSFrank Li
97*0ba8da2fSFrank Li# This is a generic file other binding inherit from and extend
98*0ba8da2fSFrank LiadditionalProperties: true
99