rockchip,rk3399-dmc.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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/rockchip,rk3399-dmc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Rockchip rk3399 DMC (Dynamic Memory Controller) device
  7. maintainers:
  8. - Brian Norris <briannorris@chromium.org>
  9. properties:
  10. compatible:
  11. enum:
  12. - rockchip,rk3399-dmc
  13. devfreq-events:
  14. $ref: /schemas/types.yaml#/definitions/phandle
  15. description:
  16. Node to get DDR loading. Refer to
  17. Documentation/devicetree/bindings/devfreq/event/rockchip,dfi.yaml.
  18. clocks:
  19. maxItems: 1
  20. clock-names:
  21. items:
  22. - const: dmc_clk
  23. operating-points-v2: true
  24. center-supply:
  25. description:
  26. DMC regulator supply.
  27. rockchip,pmu:
  28. $ref: /schemas/types.yaml#/definitions/phandle
  29. description:
  30. Phandle to the syscon managing the "PMU general register files".
  31. interrupts:
  32. maxItems: 1
  33. description:
  34. The CPU interrupt number. It should be a DCF interrupt. When DDR DVFS
  35. finishes, a DCF interrupt is triggered.
  36. rockchip,ddr3_speed_bin:
  37. deprecated: true
  38. $ref: /schemas/types.yaml#/definitions/uint32
  39. description:
  40. For values, reference include/dt-bindings/clock/rk3399-ddr.h. Selects the
  41. DDR3 cl-trp-trcd type. It must be set according to "Speed Bin" in DDR3
  42. datasheet; DO NOT use a smaller "Speed Bin" than specified for the DDR3
  43. being used.
  44. rockchip,pd_idle:
  45. deprecated: true
  46. $ref: /schemas/types.yaml#/definitions/uint32
  47. description:
  48. Configure the PD_IDLE value. Defines the power-down idle period in which
  49. memories are placed into power-down mode if bus is idle for PD_IDLE DFI
  50. clock cycles.
  51. See also rockchip,pd-idle-ns.
  52. rockchip,sr_idle:
  53. deprecated: true
  54. $ref: /schemas/types.yaml#/definitions/uint32
  55. description:
  56. Configure the SR_IDLE value. Defines the self-refresh idle period in
  57. which memories are placed into self-refresh mode if bus is idle for
  58. SR_IDLE * 1024 DFI clock cycles (DFI clocks freq is half of DRAM clock).
  59. See also rockchip,sr-idle-ns.
  60. default: 0
  61. rockchip,sr_mc_gate_idle:
  62. deprecated: true
  63. $ref: /schemas/types.yaml#/definitions/uint32
  64. description:
  65. Defines the memory self-refresh and controller clock gating idle period.
  66. Memories are placed into self-refresh mode and memory controller clock
  67. arg gating started if bus is idle for sr_mc_gate_idle*1024 DFI clock
  68. cycles.
  69. See also rockchip,sr-mc-gate-idle-ns.
  70. rockchip,srpd_lite_idle:
  71. deprecated: true
  72. $ref: /schemas/types.yaml#/definitions/uint32
  73. description:
  74. Defines the self-refresh power down idle period in which memories are
  75. placed into self-refresh power down mode if bus is idle for
  76. srpd_lite_idle * 1024 DFI clock cycles. This parameter is for LPDDR4
  77. only.
  78. See also rockchip,srpd-lite-idle-ns.
  79. rockchip,standby_idle:
  80. deprecated: true
  81. $ref: /schemas/types.yaml#/definitions/uint32
  82. description:
  83. Defines the standby idle period in which memories are placed into
  84. self-refresh mode. The controller, pi, PHY and DRAM clock will be gated
  85. if bus is idle for standby_idle * DFI clock cycles.
  86. See also rockchip,standby-idle-ns.
  87. rockchip,dram_dll_dis_freq:
  88. deprecated: true
  89. $ref: /schemas/types.yaml#/definitions/uint32
  90. description: |
  91. Defines the DDR3 DLL bypass frequency in MHz. When DDR frequency is less
  92. than DRAM_DLL_DISB_FREQ, DDR3 DLL will be bypassed.
  93. Note: if DLL was bypassed, the odt will also stop working.
  94. rockchip,phy_dll_dis_freq:
  95. deprecated: true
  96. $ref: /schemas/types.yaml#/definitions/uint32
  97. description: |
  98. Defines the PHY dll bypass frequency in MHz (Mega Hz). When DDR frequency
  99. is less than DRAM_DLL_DISB_FREQ, PHY DLL will be bypassed.
  100. Note: PHY DLL and PHY ODT are independent.
  101. rockchip,auto_pd_dis_freq:
  102. deprecated: true
  103. $ref: /schemas/types.yaml#/definitions/uint32
  104. description:
  105. Defines the auto PD disable frequency in MHz.
  106. rockchip,ddr3_odt_dis_freq:
  107. $ref: /schemas/types.yaml#/definitions/uint32
  108. minimum: 1000000 # In case anyone thought this was MHz.
  109. description:
  110. When the DRAM type is DDR3, this parameter defines the ODT disable
  111. frequency in Hz. When the DDR frequency is less then ddr3_odt_dis_freq,
  112. the ODT on the DRAM side and controller side are both disabled.
  113. rockchip,ddr3_drv:
  114. deprecated: true
  115. $ref: /schemas/types.yaml#/definitions/uint32
  116. description:
  117. When the DRAM type is DDR3, this parameter defines the DRAM side drive
  118. strength in ohms.
  119. default: 40
  120. rockchip,ddr3_odt:
  121. deprecated: true
  122. $ref: /schemas/types.yaml#/definitions/uint32
  123. description:
  124. When the DRAM type is DDR3, this parameter defines the DRAM side ODT
  125. strength in ohms.
  126. default: 120
  127. rockchip,phy_ddr3_ca_drv:
  128. deprecated: true
  129. $ref: /schemas/types.yaml#/definitions/uint32
  130. description:
  131. When the DRAM type is DDR3, this parameter defines the phy side CA line
  132. (including command line, address line and clock line) drive strength.
  133. default: 40
  134. rockchip,phy_ddr3_dq_drv:
  135. deprecated: true
  136. $ref: /schemas/types.yaml#/definitions/uint32
  137. description:
  138. When the DRAM type is DDR3, this parameter defines the PHY side DQ line
  139. (including DQS/DQ/DM line) drive strength.
  140. default: 40
  141. rockchip,phy_ddr3_odt:
  142. deprecated: true
  143. $ref: /schemas/types.yaml#/definitions/uint32
  144. description:
  145. When the DRAM type is DDR3, this parameter defines the PHY side ODT
  146. strength.
  147. default: 240
  148. rockchip,lpddr3_odt_dis_freq:
  149. $ref: /schemas/types.yaml#/definitions/uint32
  150. minimum: 1000000 # In case anyone thought this was MHz.
  151. description:
  152. When the DRAM type is LPDDR3, this parameter defines then ODT disable
  153. frequency in Hz. When DDR frequency is less then ddr3_odt_dis_freq, the
  154. ODT on the DRAM side and controller side are both disabled.
  155. rockchip,lpddr3_drv:
  156. deprecated: true
  157. $ref: /schemas/types.yaml#/definitions/uint32
  158. description:
  159. When the DRAM type is LPDDR3, this parameter defines the DRAM side drive
  160. strength in ohms.
  161. default: 34
  162. rockchip,lpddr3_odt:
  163. deprecated: true
  164. $ref: /schemas/types.yaml#/definitions/uint32
  165. description:
  166. When the DRAM type is LPDDR3, this parameter defines the DRAM side ODT
  167. strength in ohms.
  168. default: 240
  169. rockchip,phy_lpddr3_ca_drv:
  170. deprecated: true
  171. $ref: /schemas/types.yaml#/definitions/uint32
  172. description:
  173. When the DRAM type is LPDDR3, this parameter defines the PHY side CA line
  174. (including command line, address line and clock line) drive strength.
  175. default: 40
  176. rockchip,phy_lpddr3_dq_drv:
  177. deprecated: true
  178. $ref: /schemas/types.yaml#/definitions/uint32
  179. description:
  180. When the DRAM type is LPDDR3, this parameter defines the PHY side DQ line
  181. (including DQS/DQ/DM line) drive strength.
  182. default: 40
  183. rockchip,phy_lpddr3_odt:
  184. deprecated: true
  185. $ref: /schemas/types.yaml#/definitions/uint32
  186. description:
  187. When dram type is LPDDR3, this parameter define the phy side odt
  188. strength, default value is 240.
  189. rockchip,lpddr4_odt_dis_freq:
  190. $ref: /schemas/types.yaml#/definitions/uint32
  191. minimum: 1000000 # In case anyone thought this was MHz.
  192. description:
  193. When the DRAM type is LPDDR4, this parameter defines the ODT disable
  194. frequency in Hz. When the DDR frequency is less then ddr3_odt_dis_freq,
  195. the ODT on the DRAM side and controller side are both disabled.
  196. rockchip,lpddr4_drv:
  197. deprecated: true
  198. $ref: /schemas/types.yaml#/definitions/uint32
  199. description:
  200. When the DRAM type is LPDDR4, this parameter defines the DRAM side drive
  201. strength in ohms.
  202. default: 60
  203. rockchip,lpddr4_dq_odt:
  204. deprecated: true
  205. $ref: /schemas/types.yaml#/definitions/uint32
  206. description:
  207. When the DRAM type is LPDDR4, this parameter defines the DRAM side ODT on
  208. DQS/DQ line strength in ohms.
  209. default: 40
  210. rockchip,lpddr4_ca_odt:
  211. deprecated: true
  212. $ref: /schemas/types.yaml#/definitions/uint32
  213. description:
  214. When the DRAM type is LPDDR4, this parameter defines the DRAM side ODT on
  215. CA line strength in ohms.
  216. default: 40
  217. rockchip,phy_lpddr4_ca_drv:
  218. deprecated: true
  219. $ref: /schemas/types.yaml#/definitions/uint32
  220. description:
  221. When the DRAM type is LPDDR4, this parameter defines the PHY side CA line
  222. (including command address line) drive strength.
  223. default: 40
  224. rockchip,phy_lpddr4_ck_cs_drv:
  225. deprecated: true
  226. $ref: /schemas/types.yaml#/definitions/uint32
  227. description:
  228. When the DRAM type is LPDDR4, this parameter defines the PHY side clock
  229. line and CS line drive strength.
  230. default: 80
  231. rockchip,phy_lpddr4_dq_drv:
  232. deprecated: true
  233. $ref: /schemas/types.yaml#/definitions/uint32
  234. description:
  235. When the DRAM type is LPDDR4, this parameter defines the PHY side DQ line
  236. (including DQS/DQ/DM line) drive strength.
  237. default: 80
  238. rockchip,phy_lpddr4_odt:
  239. deprecated: true
  240. $ref: /schemas/types.yaml#/definitions/uint32
  241. description:
  242. When the DRAM type is LPDDR4, this parameter defines the PHY side ODT
  243. strength.
  244. default: 60
  245. rockchip,pd-idle-ns:
  246. description:
  247. Configure the PD_IDLE value in nanoseconds. Defines the power-down idle
  248. period in which memories are placed into power-down mode if bus is idle
  249. for PD_IDLE nanoseconds.
  250. rockchip,sr-idle-ns:
  251. description:
  252. Configure the SR_IDLE value in nanoseconds. Defines the self-refresh idle
  253. period in which memories are placed into self-refresh mode if bus is idle
  254. for SR_IDLE nanoseconds.
  255. default: 0
  256. rockchip,sr-mc-gate-idle-ns:
  257. description:
  258. Defines the memory self-refresh and controller clock gating idle period in nanoseconds.
  259. Memories are placed into self-refresh mode and memory controller clock
  260. arg gating started if bus is idle for sr_mc_gate_idle nanoseconds.
  261. rockchip,srpd-lite-idle-ns:
  262. description:
  263. Defines the self-refresh power down idle period in which memories are
  264. placed into self-refresh power down mode if bus is idle for
  265. srpd_lite_idle nanoseconds. This parameter is for LPDDR4 only.
  266. rockchip,standby-idle-ns:
  267. description:
  268. Defines the standby idle period in which memories are placed into
  269. self-refresh mode. The controller, pi, PHY and DRAM clock will be gated
  270. if bus is idle for standby_idle nanoseconds.
  271. rockchip,pd-idle-dis-freq-hz:
  272. description:
  273. Defines the power-down idle disable frequency in Hz. When the DDR
  274. frequency is greater than pd-idle-dis-freq, power-down idle is disabled.
  275. See also rockchip,pd-idle-ns.
  276. rockchip,sr-idle-dis-freq-hz:
  277. description:
  278. Defines the self-refresh idle disable frequency in Hz. When the DDR
  279. frequency is greater than sr-idle-dis-freq, self-refresh idle is
  280. disabled. See also rockchip,sr-idle-ns.
  281. rockchip,sr-mc-gate-idle-dis-freq-hz:
  282. description:
  283. Defines the self-refresh and memory-controller clock gating disable
  284. frequency in Hz. When the DDR frequency is greater than
  285. sr-mc-gate-idle-dis-freq, the clock will not be gated when idle. See also
  286. rockchip,sr-mc-gate-idle-ns.
  287. rockchip,srpd-lite-idle-dis-freq-hz:
  288. description:
  289. Defines the self-refresh power down idle disable frequency in Hz. When
  290. the DDR frequency is greater than srpd-lite-idle-dis-freq, memory will
  291. not be placed into self-refresh power down mode when idle. See also
  292. rockchip,srpd-lite-idle-ns.
  293. rockchip,standby-idle-dis-freq-hz:
  294. description:
  295. Defines the standby idle disable frequency in Hz. When the DDR frequency
  296. is greater than standby-idle-dis-freq, standby idle is disabled. See also
  297. rockchip,standby-idle-ns.
  298. required:
  299. - compatible
  300. - devfreq-events
  301. - clocks
  302. - clock-names
  303. - operating-points-v2
  304. - center-supply
  305. additionalProperties: false
  306. examples:
  307. - |
  308. #include <dt-bindings/clock/rk3399-cru.h>
  309. #include <dt-bindings/interrupt-controller/arm-gic.h>
  310. memory-controller {
  311. compatible = "rockchip,rk3399-dmc";
  312. devfreq-events = <&dfi>;
  313. rockchip,pmu = <&pmu>;
  314. interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  315. clocks = <&cru SCLK_DDRC>;
  316. clock-names = "dmc_clk";
  317. operating-points-v2 = <&dmc_opp_table>;
  318. center-supply = <&ppvar_centerlogic>;
  319. rockchip,pd-idle-ns = <160>;
  320. rockchip,sr-idle-ns = <10240>;
  321. rockchip,sr-mc-gate-idle-ns = <40960>;
  322. rockchip,srpd-lite-idle-ns = <61440>;
  323. rockchip,standby-idle-ns = <81920>;
  324. rockchip,ddr3_odt_dis_freq = <333000000>;
  325. rockchip,lpddr3_odt_dis_freq = <333000000>;
  326. rockchip,lpddr4_odt_dis_freq = <333000000>;
  327. rockchip,pd-idle-dis-freq-hz = <1000000000>;
  328. rockchip,sr-idle-dis-freq-hz = <1000000000>;
  329. rockchip,sr-mc-gate-idle-dis-freq-hz = <1000000000>;
  330. rockchip,srpd-lite-idle-dis-freq-hz = <0>;
  331. rockchip,standby-idle-dis-freq-hz = <928000000>;
  332. };