rockchip,nand-controller.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mtd/rockchip,nand-controller.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip SoCs NAND FLASH Controller (NFC)
  7. allOf:
  8. - $ref: nand-controller.yaml#
  9. maintainers:
  10. - Heiko Stuebner <heiko@sntech.de>
  11. properties:
  12. compatible:
  13. oneOf:
  14. - const: rockchip,px30-nfc
  15. - const: rockchip,rk2928-nfc
  16. - const: rockchip,rv1108-nfc
  17. - items:
  18. - enum:
  19. - rockchip,rk3036-nfc
  20. - rockchip,rk3128-nfc
  21. - const: rockchip,rk2928-nfc
  22. - items:
  23. - const: rockchip,rk3308-nfc
  24. - const: rockchip,rv1108-nfc
  25. reg:
  26. maxItems: 1
  27. interrupts:
  28. maxItems: 1
  29. clocks:
  30. minItems: 1
  31. items:
  32. - description: Bus Clock
  33. - description: Module Clock
  34. clock-names:
  35. minItems: 1
  36. items:
  37. - const: ahb
  38. - const: nfc
  39. assigned-clocks:
  40. maxItems: 1
  41. assigned-clock-rates:
  42. maxItems: 1
  43. power-domains:
  44. maxItems: 1
  45. patternProperties:
  46. "^nand@[0-7]$":
  47. type: object
  48. $ref: raw-nand-chip.yaml
  49. properties:
  50. reg:
  51. minimum: 0
  52. maximum: 7
  53. nand-ecc-mode:
  54. const: hw
  55. nand-ecc-step-size:
  56. const: 1024
  57. nand-ecc-strength:
  58. enum: [16, 24, 40, 60, 70]
  59. description: |
  60. The ECC configurations that can be supported are as follows.
  61. NFC v600 ECC 16, 24, 40, 60
  62. RK2928, RK3066, RK3188
  63. NFC v622 ECC 16, 24, 40, 60
  64. RK3036, RK3128
  65. NFC v800 ECC 16
  66. RK3308, RV1108
  67. NFC v900 ECC 16, 40, 60, 70
  68. RK3326, PX30
  69. nand-bus-width:
  70. const: 8
  71. rockchip,boot-blks:
  72. $ref: /schemas/types.yaml#/definitions/uint32
  73. minimum: 2
  74. default: 16
  75. description:
  76. The NFC driver need this information to select ECC
  77. algorithms supported by the boot ROM.
  78. Only used in combination with 'nand-is-boot-medium'.
  79. rockchip,boot-ecc-strength:
  80. enum: [16, 24, 40, 60, 70]
  81. $ref: /schemas/types.yaml#/definitions/uint32
  82. description: |
  83. If specified it indicates that a different BCH/ECC setting is
  84. supported by the boot ROM.
  85. NFC v600 ECC 16, 24
  86. RK2928, RK3066, RK3188
  87. NFC v622 ECC 16, 24, 40, 60
  88. RK3036, RK3128
  89. NFC v800 ECC 16
  90. RK3308, RV1108
  91. NFC v900 ECC 16, 70
  92. RK3326, PX30
  93. Only used in combination with 'nand-is-boot-medium'.
  94. unevaluatedProperties: false
  95. required:
  96. - compatible
  97. - reg
  98. - interrupts
  99. - clocks
  100. - clock-names
  101. unevaluatedProperties: false
  102. examples:
  103. - |
  104. #include <dt-bindings/clock/rk3308-cru.h>
  105. #include <dt-bindings/interrupt-controller/arm-gic.h>
  106. nfc: nand-controller@ff4b0000 {
  107. compatible = "rockchip,rk3308-nfc",
  108. "rockchip,rv1108-nfc";
  109. reg = <0xff4b0000 0x4000>;
  110. interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
  111. clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>;
  112. clock-names = "ahb", "nfc";
  113. assigned-clocks = <&clks SCLK_NANDC>;
  114. assigned-clock-rates = <150000000>;
  115. pinctrl-0 = <&flash_ale &flash_bus8 &flash_cle &flash_csn0
  116. &flash_rdn &flash_rdy &flash_wrn>;
  117. pinctrl-names = "default";
  118. #address-cells = <1>;
  119. #size-cells = <0>;
  120. nand@0 {
  121. reg = <0>;
  122. label = "rk-nand";
  123. nand-bus-width = <8>;
  124. nand-ecc-mode = "hw";
  125. nand-ecc-step-size = <1024>;
  126. nand-ecc-strength = <16>;
  127. nand-is-boot-medium;
  128. rockchip,boot-blks = <8>;
  129. rockchip,boot-ecc-strength = <16>;
  130. };
  131. };
  132. ...