nvidia,tegra20-emc.yaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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,tegra20-emc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVIDIA Tegra20 SoC External Memory Controller
  7. maintainers:
  8. - Dmitry Osipenko <digetx@gmail.com>
  9. - Jon Hunter <jonathanh@nvidia.com>
  10. - Thierry Reding <thierry.reding@gmail.com>
  11. description: |
  12. The External Memory Controller (EMC) interfaces with the off-chip SDRAM to
  13. service the request stream sent from Memory Controller. The EMC also has
  14. various performance-affecting settings beyond the obvious SDRAM configuration
  15. parameters and initialization settings. Tegra20 EMC supports multiple JEDEC
  16. standard protocols: DDR1, LPDDR2 and DDR2.
  17. properties:
  18. compatible:
  19. const: nvidia,tegra20-emc
  20. reg:
  21. maxItems: 1
  22. clocks:
  23. maxItems: 1
  24. interrupts:
  25. maxItems: 1
  26. "#address-cells":
  27. const: 1
  28. "#size-cells":
  29. const: 0
  30. "#interconnect-cells":
  31. const: 0
  32. nvidia,memory-controller:
  33. $ref: /schemas/types.yaml#/definitions/phandle
  34. description:
  35. Phandle of the Memory Controller node.
  36. power-domains:
  37. maxItems: 1
  38. description:
  39. Phandle of the SoC "core" power domain.
  40. operating-points-v2:
  41. description:
  42. Should contain freqs and voltages and opp-supported-hw property, which
  43. is a bitfield indicating SoC process ID mask.
  44. nvidia,use-ram-code:
  45. type: boolean
  46. description:
  47. If present, the emc-tables@ sub-nodes will be addressed.
  48. $defs:
  49. emc-table:
  50. type: object
  51. properties:
  52. compatible:
  53. const: nvidia,tegra20-emc-table
  54. clock-frequency:
  55. description:
  56. Memory clock rate in kHz.
  57. minimum: 1000
  58. maximum: 900000
  59. reg:
  60. maxItems: 1
  61. description:
  62. Either an opaque enumerator to tell different tables apart, or
  63. the valid frequency for which the table should be used (in kHz).
  64. nvidia,emc-registers:
  65. description:
  66. EMC timing characterization data. These are the registers
  67. (see section "15.4.1 EMC Registers" in the TRM) whose values
  68. need to be specified, according to the board documentation.
  69. $ref: /schemas/types.yaml#/definitions/uint32-array
  70. items:
  71. - description: EMC_RC
  72. - description: EMC_RFC
  73. - description: EMC_RAS
  74. - description: EMC_RP
  75. - description: EMC_R2W
  76. - description: EMC_W2R
  77. - description: EMC_R2P
  78. - description: EMC_W2P
  79. - description: EMC_RD_RCD
  80. - description: EMC_WR_RCD
  81. - description: EMC_RRD
  82. - description: EMC_REXT
  83. - description: EMC_WDV
  84. - description: EMC_QUSE
  85. - description: EMC_QRST
  86. - description: EMC_QSAFE
  87. - description: EMC_RDV
  88. - description: EMC_REFRESH
  89. - description: EMC_BURST_REFRESH_NUM
  90. - description: EMC_PDEX2WR
  91. - description: EMC_PDEX2RD
  92. - description: EMC_PCHG2PDEN
  93. - description: EMC_ACT2PDEN
  94. - description: EMC_AR2PDEN
  95. - description: EMC_RW2PDEN
  96. - description: EMC_TXSR
  97. - description: EMC_TCKE
  98. - description: EMC_TFAW
  99. - description: EMC_TRPAB
  100. - description: EMC_TCLKSTABLE
  101. - description: EMC_TCLKSTOP
  102. - description: EMC_TREFBW
  103. - description: EMC_QUSE_EXTRA
  104. - description: EMC_FBIO_CFG6
  105. - description: EMC_ODT_WRITE
  106. - description: EMC_ODT_READ
  107. - description: EMC_FBIO_CFG5
  108. - description: EMC_CFG_DIG_DLL
  109. - description: EMC_DLL_XFORM_DQS
  110. - description: EMC_DLL_XFORM_QUSE
  111. - description: EMC_ZCAL_REF_CNT
  112. - description: EMC_ZCAL_WAIT_CNT
  113. - description: EMC_AUTO_CAL_INTERVAL
  114. - description: EMC_CFG_CLKTRIM_0
  115. - description: EMC_CFG_CLKTRIM_1
  116. - description: EMC_CFG_CLKTRIM_2
  117. required:
  118. - clock-frequency
  119. - compatible
  120. - reg
  121. - nvidia,emc-registers
  122. additionalProperties: false
  123. patternProperties:
  124. "^emc-table@[0-9]+$":
  125. $ref: "#/$defs/emc-table"
  126. "^emc-tables@[a-f0-9-]+$":
  127. type: object
  128. properties:
  129. reg:
  130. maxItems: 1
  131. description:
  132. An opaque enumerator to tell different tables apart.
  133. nvidia,ram-code:
  134. $ref: /schemas/types.yaml#/definitions/uint32
  135. description:
  136. Value of RAM_CODE this timing set is used for.
  137. "#address-cells":
  138. const: 1
  139. "#size-cells":
  140. const: 0
  141. lpddr2:
  142. $ref: ddr/jedec,lpddr2.yaml#
  143. type: object
  144. patternProperties:
  145. "^emc-table@[0-9]+$":
  146. $ref: "#/$defs/emc-table"
  147. oneOf:
  148. - required:
  149. - nvidia,ram-code
  150. - required:
  151. - lpddr2
  152. additionalProperties: false
  153. required:
  154. - compatible
  155. - reg
  156. - interrupts
  157. - clocks
  158. - nvidia,memory-controller
  159. - "#interconnect-cells"
  160. - operating-points-v2
  161. additionalProperties: false
  162. examples:
  163. - |
  164. external-memory-controller@7000f400 {
  165. compatible = "nvidia,tegra20-emc";
  166. reg = <0x7000f400 0x400>;
  167. interrupts = <0 78 4>;
  168. clocks = <&clock_controller 57>;
  169. nvidia,memory-controller = <&mc>;
  170. operating-points-v2 = <&dvfs_opp_table>;
  171. power-domains = <&domain>;
  172. #interconnect-cells = <0>;
  173. #address-cells = <1>;
  174. #size-cells = <0>;
  175. nvidia,use-ram-code;
  176. emc-tables@0 {
  177. nvidia,ram-code = <0>;
  178. reg = <0>;
  179. #address-cells = <1>;
  180. #size-cells = <0>;
  181. emc-table@333000 {
  182. reg = <333000>;
  183. compatible = "nvidia,tegra20-emc-table";
  184. clock-frequency = <333000>;
  185. nvidia,emc-registers = <0x00000018 0x00000033
  186. 0x00000012 0x00000004 0x00000004 0x00000005
  187. 0x00000003 0x0000000c 0x00000006 0x00000006
  188. 0x00000003 0x00000001 0x00000004 0x00000005
  189. 0x00000004 0x00000009 0x0000000d 0x00000bff
  190. 0x00000000 0x00000003 0x00000003 0x00000006
  191. 0x00000006 0x00000001 0x00000011 0x000000c8
  192. 0x00000003 0x0000000e 0x00000007 0x00000008
  193. 0x00000002 0x00000000 0x00000000 0x00000002
  194. 0x00000000 0x00000000 0x00000083 0xf0440303
  195. 0x007fe010 0x00001414 0x00000000 0x00000000
  196. 0x00000000 0x00000000 0x00000000 0x00000000>;
  197. };
  198. };
  199. emc-tables@1 {
  200. reg = <1>;
  201. lpddr2 {
  202. compatible = "elpida,B8132B2PB-6D-F", "jedec,lpddr2-s4";
  203. revision-id1 = <1>;
  204. density = <2048>;
  205. io-width = <16>;
  206. };
  207. };
  208. };