nvidia,tegra186-mc.yaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  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/nvidia,tegra186-mc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVIDIA Tegra186 (and later) SoC Memory Controller
  7. maintainers:
  8. - Jon Hunter <jonathanh@nvidia.com>
  9. - Thierry Reding <thierry.reding@gmail.com>
  10. description: |
  11. The NVIDIA Tegra186 SoC features a 128 bit memory controller that is split
  12. into four 32 bit channels to support LPDDR4 with x16 subpartitions. The MC
  13. handles memory requests for 40-bit virtual addresses from internal clients
  14. and arbitrates among them to allocate memory bandwidth.
  15. Up to 15 GiB of physical memory can be supported. Security features such as
  16. encryption of traffic to and from DRAM via general security apertures are
  17. available for video and other secure applications, as well as DRAM ECC for
  18. automotive safety applications (single bit error correction and double bit
  19. error detection).
  20. properties:
  21. $nodename:
  22. pattern: "^memory-controller@[0-9a-f]+$"
  23. compatible:
  24. items:
  25. - enum:
  26. - nvidia,tegra186-mc
  27. - nvidia,tegra194-mc
  28. - nvidia,tegra234-mc
  29. reg:
  30. minItems: 6
  31. maxItems: 18
  32. reg-names:
  33. minItems: 6
  34. maxItems: 18
  35. interrupts:
  36. items:
  37. - description: MC general interrupt
  38. "#address-cells":
  39. const: 2
  40. "#size-cells":
  41. const: 2
  42. ranges: true
  43. dma-ranges: true
  44. "#interconnect-cells":
  45. const: 1
  46. patternProperties:
  47. "^external-memory-controller@[0-9a-f]+$":
  48. description:
  49. The bulk of the work involved in controlling the external memory
  50. controller on NVIDIA Tegra186 and later is performed on the BPMP. This
  51. coprocessor exposes the EMC clock that is used to set the frequency at
  52. which the external memory is clocked and a remote procedure call that
  53. can be used to obtain the set of available frequencies.
  54. type: object
  55. properties:
  56. compatible:
  57. items:
  58. - enum:
  59. - nvidia,tegra186-emc
  60. - nvidia,tegra194-emc
  61. - nvidia,tegra234-emc
  62. reg:
  63. minItems: 1
  64. maxItems: 2
  65. interrupts:
  66. items:
  67. - description: EMC general interrupt
  68. clocks:
  69. items:
  70. - description: external memory clock
  71. clock-names:
  72. items:
  73. - const: emc
  74. "#interconnect-cells":
  75. const: 0
  76. nvidia,bpmp:
  77. $ref: /schemas/types.yaml#/definitions/phandle
  78. description:
  79. phandle of the node representing the BPMP
  80. allOf:
  81. - if:
  82. properties:
  83. compatible:
  84. const: nvidia,tegra186-emc
  85. then:
  86. properties:
  87. reg:
  88. maxItems: 1
  89. - if:
  90. properties:
  91. compatible:
  92. const: nvidia,tegra194-emc
  93. then:
  94. properties:
  95. reg:
  96. minItems: 2
  97. - if:
  98. properties:
  99. compatible:
  100. const: nvidia,tegra234-emc
  101. then:
  102. properties:
  103. reg:
  104. minItems: 2
  105. additionalProperties: false
  106. required:
  107. - compatible
  108. - reg
  109. - interrupts
  110. - clocks
  111. - clock-names
  112. - "#interconnect-cells"
  113. - nvidia,bpmp
  114. allOf:
  115. - if:
  116. properties:
  117. compatible:
  118. const: nvidia,tegra186-mc
  119. then:
  120. properties:
  121. reg:
  122. maxItems: 6
  123. description: 5 memory controller channels and 1 for stream-id registers
  124. reg-names:
  125. items:
  126. - const: sid
  127. - const: broadcast
  128. - const: ch0
  129. - const: ch1
  130. - const: ch2
  131. - const: ch3
  132. - if:
  133. properties:
  134. compatible:
  135. const: nvidia,tegra194-mc
  136. then:
  137. properties:
  138. reg:
  139. minItems: 18
  140. description: 17 memory controller channels and 1 for stream-id registers
  141. reg-names:
  142. items:
  143. - const: sid
  144. - const: broadcast
  145. - const: ch0
  146. - const: ch1
  147. - const: ch2
  148. - const: ch3
  149. - const: ch4
  150. - const: ch5
  151. - const: ch6
  152. - const: ch7
  153. - const: ch8
  154. - const: ch9
  155. - const: ch10
  156. - const: ch11
  157. - const: ch12
  158. - const: ch13
  159. - const: ch14
  160. - const: ch15
  161. - if:
  162. properties:
  163. compatible:
  164. const: nvidia,tegra234-mc
  165. then:
  166. properties:
  167. reg:
  168. minItems: 18
  169. description: 17 memory controller channels and 1 for stream-id registers
  170. reg-names:
  171. items:
  172. - const: sid
  173. - const: broadcast
  174. - const: ch0
  175. - const: ch1
  176. - const: ch2
  177. - const: ch3
  178. - const: ch4
  179. - const: ch5
  180. - const: ch6
  181. - const: ch7
  182. - const: ch8
  183. - const: ch9
  184. - const: ch10
  185. - const: ch11
  186. - const: ch12
  187. - const: ch13
  188. - const: ch14
  189. - const: ch15
  190. additionalProperties: false
  191. required:
  192. - compatible
  193. - reg
  194. - reg-names
  195. - interrupts
  196. - "#address-cells"
  197. - "#size-cells"
  198. examples:
  199. - |
  200. #include <dt-bindings/clock/tegra186-clock.h>
  201. #include <dt-bindings/interrupt-controller/arm-gic.h>
  202. bus {
  203. #address-cells = <2>;
  204. #size-cells = <2>;
  205. memory-controller@2c00000 {
  206. compatible = "nvidia,tegra186-mc";
  207. reg = <0x0 0x02c00000 0x0 0x10000>, /* MC-SID */
  208. <0x0 0x02c10000 0x0 0x10000>, /* Broadcast channel */
  209. <0x0 0x02c20000 0x0 0x10000>, /* MC0 */
  210. <0x0 0x02c30000 0x0 0x10000>, /* MC1 */
  211. <0x0 0x02c40000 0x0 0x10000>, /* MC2 */
  212. <0x0 0x02c50000 0x0 0x10000>; /* MC3 */
  213. reg-names = "sid", "broadcast", "ch0", "ch1", "ch2", "ch3";
  214. interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
  215. #address-cells = <2>;
  216. #size-cells = <2>;
  217. ranges = <0x0 0x02c00000 0x0 0x02c00000 0x0 0xb0000>;
  218. /*
  219. * Memory clients have access to all 40 bits that the memory
  220. * controller can address.
  221. */
  222. dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
  223. external-memory-controller@2c60000 {
  224. compatible = "nvidia,tegra186-emc";
  225. reg = <0x0 0x02c60000 0x0 0x50000>;
  226. interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
  227. clocks = <&bpmp TEGRA186_CLK_EMC>;
  228. clock-names = "emc";
  229. #interconnect-cells = <0>;
  230. nvidia,bpmp = <&bpmp>;
  231. };
  232. };
  233. };