162306a36Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
262306a36Sopenharmony_ci%YAML 1.2
362306a36Sopenharmony_ci---
462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/mtd/nand-chip.yaml#
562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
662306a36Sopenharmony_ci
762306a36Sopenharmony_cititle: NAND Chip Common Properties
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimaintainers:
1062306a36Sopenharmony_ci  - Miquel Raynal <miquel.raynal@bootlin.com>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciallOf:
1362306a36Sopenharmony_ci  - $ref: mtd.yaml#
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cidescription: |
1662306a36Sopenharmony_ci  This file covers the generic description of a NAND chip. It implies that the
1762306a36Sopenharmony_ci  bus interface should not be taken into account: both raw NAND devices and
1862306a36Sopenharmony_ci  SPI-NAND devices are concerned by this description.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciproperties:
2162306a36Sopenharmony_ci  reg:
2262306a36Sopenharmony_ci    description:
2362306a36Sopenharmony_ci      Contains the chip-select IDs.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci  nand-ecc-engine:
2662306a36Sopenharmony_ci    description: |
2762306a36Sopenharmony_ci      A phandle on the hardware ECC engine if any. There are
2862306a36Sopenharmony_ci      basically three possibilities:
2962306a36Sopenharmony_ci      1/ The ECC engine is part of the NAND controller, in this
3062306a36Sopenharmony_ci      case the phandle should reference the parent node.
3162306a36Sopenharmony_ci      2/ The ECC engine is part of the NAND part (on-die), in this
3262306a36Sopenharmony_ci      case the phandle should reference the node itself.
3362306a36Sopenharmony_ci      3/ The ECC engine is external, in this case the phandle should
3462306a36Sopenharmony_ci      reference the specific ECC engine node.
3562306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/phandle
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci  nand-use-soft-ecc-engine:
3862306a36Sopenharmony_ci    description: Use a software ECC engine.
3962306a36Sopenharmony_ci    type: boolean
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci  nand-no-ecc-engine:
4262306a36Sopenharmony_ci    description: Do not use any ECC correction.
4362306a36Sopenharmony_ci    type: boolean
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci  nand-ecc-algo:
4662306a36Sopenharmony_ci    description:
4762306a36Sopenharmony_ci      Desired ECC algorithm.
4862306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/string
4962306a36Sopenharmony_ci    enum: [hamming, bch, rs]
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci  nand-ecc-strength:
5262306a36Sopenharmony_ci    description:
5362306a36Sopenharmony_ci      Maximum number of bits that can be corrected per ECC step.
5462306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
5562306a36Sopenharmony_ci    minimum: 1
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci  nand-ecc-step-size:
5862306a36Sopenharmony_ci    description:
5962306a36Sopenharmony_ci      Number of data bytes covered by a single ECC step.
6062306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint32
6162306a36Sopenharmony_ci    minimum: 1
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci  secure-regions:
6462306a36Sopenharmony_ci    description:
6562306a36Sopenharmony_ci      Regions in the NAND chip which are protected using a secure element
6662306a36Sopenharmony_ci      like Trustzone. This property contains the start address and size of
6762306a36Sopenharmony_ci      the secure regions present.
6862306a36Sopenharmony_ci    $ref: /schemas/types.yaml#/definitions/uint64-matrix
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_cirequired:
7162306a36Sopenharmony_ci  - reg
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci# This file can be referenced by more specific devices (like spi-nands)
7462306a36Sopenharmony_ciadditionalProperties: true
75