nvidia,tegra30-emc.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. # SPDX-License-Identifier: (GPL-2.0)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra30-emc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: NVIDIA Tegra30 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 EMC interfaces with the off-chip SDRAM to service the request stream
  13. sent from Memory Controller. The EMC also has various performance-affecting
  14. settings beyond the obvious SDRAM configuration parameters and initialization
  15. settings. Tegra30 EMC supports multiple JEDEC standard protocols: LPDDR2,
  16. LPDDR3, and DDR3.
  17. properties:
  18. compatible:
  19. const: nvidia,tegra30-emc
  20. reg:
  21. maxItems: 1
  22. clocks:
  23. maxItems: 1
  24. interrupts:
  25. maxItems: 1
  26. "#interconnect-cells":
  27. const: 0
  28. nvidia,memory-controller:
  29. $ref: /schemas/types.yaml#/definitions/phandle
  30. description:
  31. Phandle of the Memory Controller node.
  32. power-domains:
  33. maxItems: 1
  34. description:
  35. Phandle of the SoC "core" power domain.
  36. operating-points-v2:
  37. description:
  38. Should contain freqs and voltages and opp-supported-hw property, which
  39. is a bitfield indicating SoC speedo ID mask.
  40. patternProperties:
  41. "^emc-timings-[0-9]+$":
  42. type: object
  43. properties:
  44. nvidia,ram-code:
  45. $ref: /schemas/types.yaml#/definitions/uint32
  46. description:
  47. Value of RAM_CODE this timing set is used for.
  48. patternProperties:
  49. "^timing-[0-9]+$":
  50. type: object
  51. properties:
  52. clock-frequency:
  53. description:
  54. Memory clock rate in Hz.
  55. minimum: 1000000
  56. maximum: 900000000
  57. nvidia,emc-auto-cal-interval:
  58. description:
  59. Pad calibration interval in microseconds.
  60. $ref: /schemas/types.yaml#/definitions/uint32
  61. minimum: 0
  62. maximum: 2097151
  63. nvidia,emc-mode-1:
  64. $ref: /schemas/types.yaml#/definitions/uint32
  65. description:
  66. Mode Register 1.
  67. nvidia,emc-mode-2:
  68. $ref: /schemas/types.yaml#/definitions/uint32
  69. description:
  70. Mode Register 2.
  71. nvidia,emc-mode-reset:
  72. $ref: /schemas/types.yaml#/definitions/uint32
  73. description:
  74. Mode Register 0.
  75. nvidia,emc-zcal-cnt-long:
  76. description:
  77. Number of EMC clocks to wait before issuing any commands after
  78. sending ZCAL_MRW_CMD.
  79. $ref: /schemas/types.yaml#/definitions/uint32
  80. minimum: 0
  81. maximum: 1023
  82. nvidia,emc-cfg-dyn-self-ref:
  83. type: boolean
  84. description:
  85. Dynamic self-refresh enabled.
  86. nvidia,emc-cfg-periodic-qrst:
  87. type: boolean
  88. description:
  89. FBIO "read" FIFO periodic resetting enabled.
  90. nvidia,emc-configuration:
  91. description:
  92. EMC timing characterization data. These are the registers
  93. (see section "18.13.2 EMC Registers" in the TRM) whose values
  94. need to be specified, according to the board documentation.
  95. $ref: /schemas/types.yaml#/definitions/uint32-array
  96. items:
  97. - description: EMC_RC
  98. - description: EMC_RFC
  99. - description: EMC_RAS
  100. - description: EMC_RP
  101. - description: EMC_R2W
  102. - description: EMC_W2R
  103. - description: EMC_R2P
  104. - description: EMC_W2P
  105. - description: EMC_RD_RCD
  106. - description: EMC_WR_RCD
  107. - description: EMC_RRD
  108. - description: EMC_REXT
  109. - description: EMC_WEXT
  110. - description: EMC_WDV
  111. - description: EMC_QUSE
  112. - description: EMC_QRST
  113. - description: EMC_QSAFE
  114. - description: EMC_RDV
  115. - description: EMC_REFRESH
  116. - description: EMC_BURST_REFRESH_NUM
  117. - description: EMC_PRE_REFRESH_REQ_CNT
  118. - description: EMC_PDEX2WR
  119. - description: EMC_PDEX2RD
  120. - description: EMC_PCHG2PDEN
  121. - description: EMC_ACT2PDEN
  122. - description: EMC_AR2PDEN
  123. - description: EMC_RW2PDEN
  124. - description: EMC_TXSR
  125. - description: EMC_TXSRDLL
  126. - description: EMC_TCKE
  127. - description: EMC_TFAW
  128. - description: EMC_TRPAB
  129. - description: EMC_TCLKSTABLE
  130. - description: EMC_TCLKSTOP
  131. - description: EMC_TREFBW
  132. - description: EMC_QUSE_EXTRA
  133. - description: EMC_FBIO_CFG6
  134. - description: EMC_ODT_WRITE
  135. - description: EMC_ODT_READ
  136. - description: EMC_FBIO_CFG5
  137. - description: EMC_CFG_DIG_DLL
  138. - description: EMC_CFG_DIG_DLL_PERIOD
  139. - description: EMC_DLL_XFORM_DQS0
  140. - description: EMC_DLL_XFORM_DQS1
  141. - description: EMC_DLL_XFORM_DQS2
  142. - description: EMC_DLL_XFORM_DQS3
  143. - description: EMC_DLL_XFORM_DQS4
  144. - description: EMC_DLL_XFORM_DQS5
  145. - description: EMC_DLL_XFORM_DQS6
  146. - description: EMC_DLL_XFORM_DQS7
  147. - description: EMC_DLL_XFORM_QUSE0
  148. - description: EMC_DLL_XFORM_QUSE1
  149. - description: EMC_DLL_XFORM_QUSE2
  150. - description: EMC_DLL_XFORM_QUSE3
  151. - description: EMC_DLL_XFORM_QUSE4
  152. - description: EMC_DLL_XFORM_QUSE5
  153. - description: EMC_DLL_XFORM_QUSE6
  154. - description: EMC_DLL_XFORM_QUSE7
  155. - description: EMC_DLI_TRIM_TXDQS0
  156. - description: EMC_DLI_TRIM_TXDQS1
  157. - description: EMC_DLI_TRIM_TXDQS2
  158. - description: EMC_DLI_TRIM_TXDQS3
  159. - description: EMC_DLI_TRIM_TXDQS4
  160. - description: EMC_DLI_TRIM_TXDQS5
  161. - description: EMC_DLI_TRIM_TXDQS6
  162. - description: EMC_DLI_TRIM_TXDQS7
  163. - description: EMC_DLL_XFORM_DQ0
  164. - description: EMC_DLL_XFORM_DQ1
  165. - description: EMC_DLL_XFORM_DQ2
  166. - description: EMC_DLL_XFORM_DQ3
  167. - description: EMC_XM2CMDPADCTRL
  168. - description: EMC_XM2DQSPADCTRL2
  169. - description: EMC_XM2DQPADCTRL2
  170. - description: EMC_XM2CLKPADCTRL
  171. - description: EMC_XM2COMPPADCTRL
  172. - description: EMC_XM2VTTGENPADCTRL
  173. - description: EMC_XM2VTTGENPADCTRL2
  174. - description: EMC_XM2QUSEPADCTRL
  175. - description: EMC_XM2DQSPADCTRL3
  176. - description: EMC_CTT_TERM_CTRL
  177. - description: EMC_ZCAL_INTERVAL
  178. - description: EMC_ZCAL_WAIT_CNT
  179. - description: EMC_MRS_WAIT_CNT
  180. - description: EMC_AUTO_CAL_CONFIG
  181. - description: EMC_CTT
  182. - description: EMC_CTT_DURATION
  183. - description: EMC_DYN_SELF_REF_CONTROL
  184. - description: EMC_FBIO_SPARE
  185. - description: EMC_CFG_RSV
  186. required:
  187. - clock-frequency
  188. - nvidia,emc-auto-cal-interval
  189. - nvidia,emc-mode-1
  190. - nvidia,emc-mode-2
  191. - nvidia,emc-mode-reset
  192. - nvidia,emc-zcal-cnt-long
  193. - nvidia,emc-configuration
  194. additionalProperties: false
  195. required:
  196. - nvidia,ram-code
  197. additionalProperties: false
  198. required:
  199. - compatible
  200. - reg
  201. - interrupts
  202. - clocks
  203. - nvidia,memory-controller
  204. - "#interconnect-cells"
  205. - operating-points-v2
  206. additionalProperties: false
  207. examples:
  208. - |
  209. external-memory-controller@7000f400 {
  210. compatible = "nvidia,tegra30-emc";
  211. reg = <0x7000f400 0x400>;
  212. interrupts = <0 78 4>;
  213. clocks = <&tegra_car 57>;
  214. nvidia,memory-controller = <&mc>;
  215. operating-points-v2 = <&dvfs_opp_table>;
  216. power-domains = <&domain>;
  217. #interconnect-cells = <0>;
  218. emc-timings-1 {
  219. nvidia,ram-code = <1>;
  220. timing-667000000 {
  221. clock-frequency = <667000000>;
  222. nvidia,emc-auto-cal-interval = <0x001fffff>;
  223. nvidia,emc-mode-1 = <0x80100002>;
  224. nvidia,emc-mode-2 = <0x80200018>;
  225. nvidia,emc-mode-reset = <0x80000b71>;
  226. nvidia,emc-zcal-cnt-long = <0x00000040>;
  227. nvidia,emc-cfg-periodic-qrst;
  228. nvidia,emc-configuration = <
  229. 0x00000020 /* EMC_RC */
  230. 0x0000006a /* EMC_RFC */
  231. 0x00000017 /* EMC_RAS */
  232. 0x00000007 /* EMC_RP */
  233. 0x00000005 /* EMC_R2W */
  234. 0x0000000c /* EMC_W2R */
  235. 0x00000003 /* EMC_R2P */
  236. 0x00000011 /* EMC_W2P */
  237. 0x00000007 /* EMC_RD_RCD */
  238. 0x00000007 /* EMC_WR_RCD */
  239. 0x00000002 /* EMC_RRD */
  240. 0x00000001 /* EMC_REXT */
  241. 0x00000000 /* EMC_WEXT */
  242. 0x00000007 /* EMC_WDV */
  243. 0x0000000a /* EMC_QUSE */
  244. 0x00000009 /* EMC_QRST */
  245. 0x0000000b /* EMC_QSAFE */
  246. 0x00000011 /* EMC_RDV */
  247. 0x00001412 /* EMC_REFRESH */
  248. 0x00000000 /* EMC_BURST_REFRESH_NUM */
  249. 0x00000504 /* EMC_PRE_REFRESH_REQ_CNT */
  250. 0x00000002 /* EMC_PDEX2WR */
  251. 0x0000000e /* EMC_PDEX2RD */
  252. 0x00000001 /* EMC_PCHG2PDEN */
  253. 0x00000000 /* EMC_ACT2PDEN */
  254. 0x0000000c /* EMC_AR2PDEN */
  255. 0x00000016 /* EMC_RW2PDEN */
  256. 0x00000072 /* EMC_TXSR */
  257. 0x00000200 /* EMC_TXSRDLL */
  258. 0x00000005 /* EMC_TCKE */
  259. 0x00000015 /* EMC_TFAW */
  260. 0x00000000 /* EMC_TRPAB */
  261. 0x00000006 /* EMC_TCLKSTABLE */
  262. 0x00000007 /* EMC_TCLKSTOP */
  263. 0x00001453 /* EMC_TREFBW */
  264. 0x0000000b /* EMC_QUSE_EXTRA */
  265. 0x00000006 /* EMC_FBIO_CFG6 */
  266. 0x00000000 /* EMC_ODT_WRITE */
  267. 0x00000000 /* EMC_ODT_READ */
  268. 0x00005088 /* EMC_FBIO_CFG5 */
  269. 0xf00b0191 /* EMC_CFG_DIG_DLL */
  270. 0x00008000 /* EMC_CFG_DIG_DLL_PERIOD */
  271. 0x00000008 /* EMC_DLL_XFORM_DQS0 */
  272. 0x00000008 /* EMC_DLL_XFORM_DQS1 */
  273. 0x00000008 /* EMC_DLL_XFORM_DQS2 */
  274. 0x00000008 /* EMC_DLL_XFORM_DQS3 */
  275. 0x0000000a /* EMC_DLL_XFORM_DQS4 */
  276. 0x0000000a /* EMC_DLL_XFORM_DQS5 */
  277. 0x0000000a /* EMC_DLL_XFORM_DQS6 */
  278. 0x0000000a /* EMC_DLL_XFORM_DQS7 */
  279. 0x00018000 /* EMC_DLL_XFORM_QUSE0 */
  280. 0x00018000 /* EMC_DLL_XFORM_QUSE1 */
  281. 0x00018000 /* EMC_DLL_XFORM_QUSE2 */
  282. 0x00018000 /* EMC_DLL_XFORM_QUSE3 */
  283. 0x00000000 /* EMC_DLL_XFORM_QUSE4 */
  284. 0x00000000 /* EMC_DLL_XFORM_QUSE5 */
  285. 0x00000000 /* EMC_DLL_XFORM_QUSE6 */
  286. 0x00000000 /* EMC_DLL_XFORM_QUSE7 */
  287. 0x00000000 /* EMC_DLI_TRIM_TXDQS0 */
  288. 0x00000000 /* EMC_DLI_TRIM_TXDQS1 */
  289. 0x00000000 /* EMC_DLI_TRIM_TXDQS2 */
  290. 0x00000000 /* EMC_DLI_TRIM_TXDQS3 */
  291. 0x00000000 /* EMC_DLI_TRIM_TXDQS4 */
  292. 0x00000000 /* EMC_DLI_TRIM_TXDQS5 */
  293. 0x00000000 /* EMC_DLI_TRIM_TXDQS6 */
  294. 0x00000000 /* EMC_DLI_TRIM_TXDQS7 */
  295. 0x0000000a /* EMC_DLL_XFORM_DQ0 */
  296. 0x0000000a /* EMC_DLL_XFORM_DQ1 */
  297. 0x0000000a /* EMC_DLL_XFORM_DQ2 */
  298. 0x0000000a /* EMC_DLL_XFORM_DQ3 */
  299. 0x000002a0 /* EMC_XM2CMDPADCTRL */
  300. 0x0800013d /* EMC_XM2DQSPADCTRL2 */
  301. 0x22220000 /* EMC_XM2DQPADCTRL2 */
  302. 0x77fff884 /* EMC_XM2CLKPADCTRL */
  303. 0x01f1f501 /* EMC_XM2COMPPADCTRL */
  304. 0x07077404 /* EMC_XM2VTTGENPADCTRL */
  305. 0x54000000 /* EMC_XM2VTTGENPADCTRL2 */
  306. 0x080001e8 /* EMC_XM2QUSEPADCTRL */
  307. 0x0c000021 /* EMC_XM2DQSPADCTRL3 */
  308. 0x00000802 /* EMC_CTT_TERM_CTRL */
  309. 0x00020000 /* EMC_ZCAL_INTERVAL */
  310. 0x00000100 /* EMC_ZCAL_WAIT_CNT */
  311. 0x0155000c /* EMC_MRS_WAIT_CNT */
  312. 0xa0f10000 /* EMC_AUTO_CAL_CONFIG */
  313. 0x00000000 /* EMC_CTT */
  314. 0x00000000 /* EMC_CTT_DURATION */
  315. 0x800028a5 /* EMC_DYN_SELF_REF_CONTROL */
  316. 0xe8000000 /* EMC_FBIO_SPARE */
  317. 0xff00ff49 /* EMC_CFG_RSV */
  318. >;
  319. };
  320. };
  321. };