1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mtd/nand-controller.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: NAND Controller Common Properties 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Miquel Raynal <miquel.raynal@bootlin.com> 11c66ec88fSEmmanuel Vadot - Richard Weinberger <richard@nod.at> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotdescription: | 14c66ec88fSEmmanuel Vadot The NAND controller should be represented with its own DT node, and 15c66ec88fSEmmanuel Vadot all NAND chips attached to this controller should be defined as 16c66ec88fSEmmanuel Vadot children nodes of the NAND controller. This representation should be 17c66ec88fSEmmanuel Vadot enforced even for simple controllers supporting only one chip. 18c66ec88fSEmmanuel Vadot 19c66ec88fSEmmanuel Vadotproperties: 20c66ec88fSEmmanuel Vadot $nodename: 21c66ec88fSEmmanuel Vadot pattern: "^nand-controller(@.*)?" 22c66ec88fSEmmanuel Vadot 23c66ec88fSEmmanuel Vadot "#address-cells": 24c66ec88fSEmmanuel Vadot const: 1 25c66ec88fSEmmanuel Vadot 26c66ec88fSEmmanuel Vadot "#size-cells": 27c66ec88fSEmmanuel Vadot const: 0 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot ranges: true 30c66ec88fSEmmanuel Vadot 315956d97fSEmmanuel Vadot cs-gpios: 325956d97fSEmmanuel Vadot description: 335956d97fSEmmanuel Vadot Array of chip-select available to the controller. The first 345956d97fSEmmanuel Vadot entries are a 1:1 mapping of the available chip-select on the 355956d97fSEmmanuel Vadot NAND controller (even if they are not used). As many additional 365956d97fSEmmanuel Vadot chip-select as needed may follow and should be phandles of GPIO 375956d97fSEmmanuel Vadot lines. 'reg' entries of the NAND chip subnodes become indexes of 385956d97fSEmmanuel Vadot this array when this property is present. 39c9ccf3a3SEmmanuel Vadot minItems: 1 40c9ccf3a3SEmmanuel Vadot maxItems: 8 415956d97fSEmmanuel Vadot 42c66ec88fSEmmanuel VadotpatternProperties: 43c66ec88fSEmmanuel Vadot "^nand@[a-f0-9]$": 44f126890aSEmmanuel Vadot type: object 45f126890aSEmmanuel Vadot $ref: raw-nand-chip.yaml# 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel Vadotrequired: 48c66ec88fSEmmanuel Vadot - "#address-cells" 49c66ec88fSEmmanuel Vadot - "#size-cells" 50c66ec88fSEmmanuel Vadot 518bab661aSEmmanuel Vadot# This is a generic file other binding inherit from and extend 526be33864SEmmanuel VadotadditionalProperties: true 536be33864SEmmanuel Vadot 54c66ec88fSEmmanuel Vadotexamples: 55c66ec88fSEmmanuel Vadot - | 56c66ec88fSEmmanuel Vadot nand-controller { 57c66ec88fSEmmanuel Vadot #address-cells = <1>; 58c66ec88fSEmmanuel Vadot #size-cells = <0>; 595956d97fSEmmanuel Vadot cs-gpios = <0>, <&gpioA 1>; /* A single native CS is available */ 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot /* controller specific properties */ 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot nand@0 { 645956d97fSEmmanuel Vadot reg = <0>; /* Native CS */ 65c9ccf3a3SEmmanuel Vadot /* NAND chip specific properties */ 66c66ec88fSEmmanuel Vadot }; 675956d97fSEmmanuel Vadot 685956d97fSEmmanuel Vadot nand@1 { 695956d97fSEmmanuel Vadot reg = <1>; /* GPIO CS */ 705956d97fSEmmanuel Vadot }; 71c66ec88fSEmmanuel Vadot }; 72