arm,pl35x-smc.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/memory-controllers/arm,pl35x-smc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Arm PL35x Series Static Memory Controller (SMC)
  7. maintainers:
  8. - Miquel Raynal <miquel.raynal@bootlin.com>
  9. description: |
  10. The PL35x Static Memory Controller is a bus where you can connect two kinds
  11. of memory interfaces, which are NAND and memory mapped interfaces (such as
  12. SRAM or NOR) depending on the specific configuration.
  13. The TRM is available here:
  14. https://documentation-service.arm.com/static/5e8e2524fd977155116a58aa
  15. # We need a select here so we don't match all nodes with 'arm,primecell'
  16. select:
  17. properties:
  18. compatible:
  19. contains:
  20. enum:
  21. - arm,pl353-smc-r2p1
  22. - arm,pl354
  23. required:
  24. - compatible
  25. properties:
  26. $nodename:
  27. pattern: "^memory-controller@[0-9a-f]+$"
  28. compatible:
  29. items:
  30. - enum:
  31. - arm,pl353-smc-r2p1
  32. - arm,pl354
  33. - const: arm,primecell
  34. "#address-cells":
  35. const: 2
  36. "#size-cells":
  37. const: 1
  38. reg:
  39. items:
  40. - description:
  41. Configuration registers for the host and sub-controllers.
  42. The three chip select regions are defined in 'ranges'.
  43. clocks:
  44. minItems: 1
  45. maxItems: 2
  46. clock-names:
  47. minItems: 1
  48. maxItems: 2
  49. ranges:
  50. minItems: 1
  51. maxItems: 8
  52. interrupts:
  53. minItems: 1
  54. items:
  55. - description: Combined or Memory interface 0 IRQ
  56. - description: Memory interface 1 IRQ
  57. patternProperties:
  58. "@[0-7],[a-f0-9]+$":
  59. type: object
  60. additionalProperties: true
  61. description: |
  62. The child device node represents the controller connected to the SMC
  63. bus. The controller can be a NAND controller or a pair of any memory
  64. mapped controllers such as NOR and SRAM controllers.
  65. properties:
  66. compatible:
  67. description:
  68. Compatible of memory controller.
  69. reg:
  70. items:
  71. - items:
  72. - description: |
  73. Chip-select ID, as in the parent range property.
  74. minimum: 0
  75. maximum: 7
  76. - description: |
  77. Offset of the memory region requested by the device.
  78. - description: |
  79. Length of the memory region requested by the device.
  80. required:
  81. - compatible
  82. - reg
  83. required:
  84. - compatible
  85. - reg
  86. - clock-names
  87. - clocks
  88. additionalProperties: false
  89. allOf:
  90. - if:
  91. properties:
  92. compatible:
  93. contains:
  94. const: arm,pl354
  95. then:
  96. properties:
  97. clocks:
  98. # According to TRM, really should be 3 clocks
  99. maxItems: 1
  100. clock-names:
  101. const: apb_pclk
  102. else:
  103. properties:
  104. clocks:
  105. items:
  106. - description: clock for the memory device bus
  107. - description: main clock of the SMC
  108. clock-names:
  109. items:
  110. - const: memclk
  111. - const: apb_pclk
  112. examples:
  113. - |
  114. smcc: memory-controller@e000e000 {
  115. compatible = "arm,pl353-smc-r2p1", "arm,primecell";
  116. reg = <0xe000e000 0x0001000>;
  117. clock-names = "memclk", "apb_pclk";
  118. clocks = <&clkc 11>, <&clkc 44>;
  119. ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
  120. 0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
  121. 0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
  122. #address-cells = <2>;
  123. #size-cells = <1>;
  124. nfc0: nand-controller@0,0 {
  125. compatible = "arm,pl353-nand-r2p1";
  126. reg = <0 0 0x1000000>;
  127. #address-cells = <1>;
  128. #size-cells = <0>;
  129. };
  130. };