nand-controller.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mtd/nand-controller.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NAND Controller Common Properties
  7. maintainers:
  8. - Miquel Raynal <miquel.raynal@bootlin.com>
  9. - Richard Weinberger <richard@nod.at>
  10. description: |
  11. The NAND controller should be represented with its own DT node, and
  12. all NAND chips attached to this controller should be defined as
  13. children nodes of the NAND controller. This representation should be
  14. enforced even for simple controllers supporting only one chip.
  15. properties:
  16. $nodename:
  17. pattern: "^nand-controller(@.*)?"
  18. "#address-cells":
  19. const: 1
  20. "#size-cells":
  21. const: 0
  22. ranges: true
  23. cs-gpios:
  24. description:
  25. Array of chip-select available to the controller. The first
  26. entries are a 1:1 mapping of the available chip-select on the
  27. NAND controller (even if they are not used). As many additional
  28. chip-select as needed may follow and should be phandles of GPIO
  29. lines. 'reg' entries of the NAND chip subnodes become indexes of
  30. this array when this property is present.
  31. minItems: 1
  32. maxItems: 8
  33. patternProperties:
  34. "^nand@[a-f0-9]$":
  35. type: object
  36. $ref: raw-nand-chip.yaml#
  37. required:
  38. - "#address-cells"
  39. - "#size-cells"
  40. # This is a generic file other binding inherit from and extend
  41. additionalProperties: true
  42. examples:
  43. - |
  44. nand-controller {
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. cs-gpios = <0>, <&gpioA 1>; /* A single native CS is available */
  48. /* controller specific properties */
  49. nand@0 {
  50. reg = <0>; /* Native CS */
  51. /* NAND chip specific properties */
  52. };
  53. nand@1 {
  54. reg = <1>; /* GPIO CS */
  55. };
  56. };