rk3399_dmc.txt 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. * Rockchip rk3399 DMC(Dynamic Memory Controller) device
  2. Required properties:
  3. - compatible: Must be "rockchip,rk3399-dmc".
  4. - devfreq-events: Node to get DDR loading, Refer to
  5. Documentation/devicetree/bindings/devfreq/
  6. rockchip-dfi.txt
  7. - interrupts: The interrupt number to the CPU. The interrupt
  8. specifier format depends on the interrupt controller.
  9. It should be DCF interrupts, when DDR dvfs finish,
  10. it will happen.
  11. - clocks: Phandles for clock specified in "clock-names" property
  12. - clock-names : The name of clock used by the DFI, must be
  13. "pclk_ddr_mon";
  14. - operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt
  15. for details.
  16. - center-supply: DMC supply node.
  17. - status: Marks the node enabled/disabled.
  18. Following properties are ddr timing:
  19. - rockchip,dram_speed_bin : Value reference include/dt-bindings/clock/ddr.h,
  20. it select ddr3 cl-trp-trcd type, default value
  21. "DDR3_DEFAULT".it must selected according to
  22. "Speed Bin" in ddr3 datasheet, DO NOT use
  23. smaller "Speed Bin" than ddr3 exactly is.
  24. - rockchip,pd_idle : Config the PD_IDLE value, defined the power-down
  25. idle period, memories are places into power-down
  26. mode if bus is idle for PD_IDLE DFI clocks.
  27. - rockchip,sr_idle : Configure the SR_IDLE value, defined the
  28. selfrefresh idle period, memories are places
  29. into self-refresh mode if bus is idle for
  30. SR_IDLE*1024 DFI clocks (DFI clocks freq is
  31. half of dram's clocks), defaule value is "0".
  32. - rockchip,sr_mc_gate_idle : Defined the self-refresh with memory and
  33. controller clock gating idle period, memories
  34. are places into self-refresh mode and memory
  35. controller clock arg gating if bus is idle for
  36. sr_mc_gate_idle*1024 DFI clocks.
  37. - rockchip,srpd_lite_idle : Defined the self-refresh power down idle
  38. period, memories are places into self-refresh
  39. power down mode if bus is idle for
  40. srpd_lite_idle*1024 DFI clocks. This parameter
  41. is for LPDDR4 only.
  42. - rockchip,standby_idle : Defined the standby idle period, memories are
  43. places into self-refresh than controller, pi,
  44. phy and dram clock will gating if bus is idle
  45. for standby_idle * DFI clocks.
  46. - rockchip,dram_dll_disb_freq : It's defined the DDR3 dll bypass frequency in
  47. MHz, when ddr freq less than DRAM_DLL_DISB_FREQ,
  48. ddr3 dll will bypssed note: if dll was bypassed,
  49. the odt also stop working.
  50. - rockchip,phy_dll_disb_freq : Defined the PHY dll bypass frequency in
  51. MHz (Mega Hz), when ddr freq less than
  52. DRAM_DLL_DISB_FREQ, phy dll will bypssed.
  53. note: phy dll and phy odt are independent.
  54. - rockchip,ddr3_odt_disb_freq : When dram type is DDR3, this parameter defined
  55. the odt disable frequency in MHz (Mega Hz),
  56. when ddr frequency less then ddr3_odt_disb_freq,
  57. the odt on dram side and controller side are
  58. both disabled.
  59. - rockchip,ddr3_drv : When dram type is DDR3, this parameter define
  60. the dram side driver stength in ohm, default
  61. value is DDR3_DS_40ohm.
  62. - rockchip,ddr3_odt : When dram type is DDR3, this parameter define
  63. the dram side ODT stength in ohm, default value
  64. is DDR3_ODT_120ohm.
  65. - rockchip,phy_ddr3_ca_drv : When dram type is DDR3, this parameter define
  66. the phy side CA line(incluing command line,
  67. address line and clock line) driver strength.
  68. Default value is PHY_DRV_ODT_40.
  69. - rockchip,phy_ddr3_dq_drv : When dram type is DDR3, this parameter define
  70. the phy side DQ line(incluing DQS/DQ/DM line)
  71. driver strength. default value is PHY_DRV_ODT_40.
  72. - rockchip,phy_ddr3_odt : When dram type is DDR3, this parameter define the
  73. phy side odt strength, default value is
  74. PHY_DRV_ODT_240.
  75. - rockchip,lpddr3_odt_disb_freq : When dram type is LPDDR3, this parameter defined
  76. then odt disable frequency in MHz (Mega Hz),
  77. when ddr frequency less then ddr3_odt_disb_freq,
  78. the odt on dram side and controller side are
  79. both disabled.
  80. - rockchip,lpddr3_drv : When dram type is LPDDR3, this parameter define
  81. the dram side driver stength in ohm, default
  82. value is LP3_DS_34ohm.
  83. - rockchip,lpddr3_odt : When dram type is LPDDR3, this parameter define
  84. the dram side ODT stength in ohm, default value
  85. is LP3_ODT_240ohm.
  86. - rockchip,phy_lpddr3_ca_drv : When dram type is LPDDR3, this parameter define
  87. the phy side CA line(incluing command line,
  88. address line and clock line) driver strength.
  89. default value is PHY_DRV_ODT_40.
  90. - rockchip,phy_lpddr3_dq_drv : When dram type is LPDDR3, this parameter define
  91. the phy side DQ line(incluing DQS/DQ/DM line)
  92. driver strength. default value is
  93. PHY_DRV_ODT_40.
  94. - rockchip,phy_lpddr3_odt : When dram type is LPDDR3, this parameter define
  95. the phy side odt strength, default value is
  96. PHY_DRV_ODT_240.
  97. - rockchip,lpddr4_odt_disb_freq : When dram type is LPDDR4, this parameter
  98. defined the odt disable frequency in
  99. MHz (Mega Hz), when ddr frequency less then
  100. ddr3_odt_disb_freq, the odt on dram side and
  101. controller side are both disabled.
  102. - rockchip,lpddr4_drv : When dram type is LPDDR4, this parameter define
  103. the dram side driver stength in ohm, default
  104. value is LP4_PDDS_60ohm.
  105. - rockchip,lpddr4_dq_odt : When dram type is LPDDR4, this parameter define
  106. the dram side ODT on dqs/dq line stength in ohm,
  107. default value is LP4_DQ_ODT_40ohm.
  108. - rockchip,lpddr4_ca_odt : When dram type is LPDDR4, this parameter define
  109. the dram side ODT on ca line stength in ohm,
  110. default value is LP4_CA_ODT_40ohm.
  111. - rockchip,phy_lpddr4_ca_drv : When dram type is LPDDR4, this parameter define
  112. the phy side CA line(incluing command address
  113. line) driver strength. default value is
  114. PHY_DRV_ODT_40.
  115. - rockchip,phy_lpddr4_ck_cs_drv : When dram type is LPDDR4, this parameter define
  116. the phy side clock line and cs line driver
  117. strength. default value is PHY_DRV_ODT_80.
  118. - rockchip,phy_lpddr4_dq_drv : When dram type is LPDDR4, this parameter define
  119. the phy side DQ line(incluing DQS/DQ/DM line)
  120. driver strength. default value is PHY_DRV_ODT_80.
  121. - rockchip,phy_lpddr4_odt : When dram type is LPDDR4, this parameter define
  122. the phy side odt strength, default value is
  123. PHY_DRV_ODT_60.
  124. Example:
  125. dmc_opp_table: dmc_opp_table {
  126. compatible = "operating-points-v2";
  127. opp00 {
  128. opp-hz = /bits/ 64 <300000000>;
  129. opp-microvolt = <900000>;
  130. };
  131. opp01 {
  132. opp-hz = /bits/ 64 <666000000>;
  133. opp-microvolt = <900000>;
  134. };
  135. };
  136. dmc: dmc {
  137. compatible = "rockchip,rk3399-dmc";
  138. devfreq-events = <&dfi>;
  139. interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  140. clocks = <&cru SCLK_DDRCLK>;
  141. clock-names = "dmc_clk";
  142. operating-points-v2 = <&dmc_opp_table>;
  143. center-supply = <&ppvar_centerlogic>;
  144. upthreshold = <15>;
  145. downdifferential = <10>;
  146. rockchip,ddr3_speed_bin = <21>;
  147. rockchip,pd_idle = <0x40>;
  148. rockchip,sr_idle = <0x2>;
  149. rockchip,sr_mc_gate_idle = <0x3>;
  150. rockchip,srpd_lite_idle = <0x4>;
  151. rockchip,standby_idle = <0x2000>;
  152. rockchip,dram_dll_dis_freq = <300>;
  153. rockchip,phy_dll_dis_freq = <125>;
  154. rockchip,auto_pd_dis_freq = <666>;
  155. rockchip,ddr3_odt_dis_freq = <333>;
  156. rockchip,ddr3_drv = <DDR3_DS_40ohm>;
  157. rockchip,ddr3_odt = <DDR3_ODT_120ohm>;
  158. rockchip,phy_ddr3_ca_drv = <PHY_DRV_ODT_40>;
  159. rockchip,phy_ddr3_dq_drv = <PHY_DRV_ODT_40>;
  160. rockchip,phy_ddr3_odt = <PHY_DRV_ODT_240>;
  161. rockchip,lpddr3_odt_dis_freq = <333>;
  162. rockchip,lpddr3_drv = <LP3_DS_34ohm>;
  163. rockchip,lpddr3_odt = <LP3_ODT_240ohm>;
  164. rockchip,phy_lpddr3_ca_drv = <PHY_DRV_ODT_40>;
  165. rockchip,phy_lpddr3_dq_drv = <PHY_DRV_ODT_40>;
  166. rockchip,phy_lpddr3_odt = <PHY_DRV_ODT_240>;
  167. rockchip,lpddr4_odt_dis_freq = <333>;
  168. rockchip,lpddr4_drv = <LP4_PDDS_60ohm>;
  169. rockchip,lpddr4_dq_odt = <LP4_DQ_ODT_40ohm>;
  170. rockchip,lpddr4_ca_odt = <LP4_CA_ODT_40ohm>;
  171. rockchip,phy_lpddr4_ca_drv = <PHY_DRV_ODT_40>;
  172. rockchip,phy_lpddr4_ck_cs_drv = <PHY_DRV_ODT_80>;
  173. rockchip,phy_lpddr4_dq_drv = <PHY_DRV_ODT_80>;
  174. rockchip,phy_lpddr4_odt = <PHY_DRV_ODT_60>;
  175. status = "disabled";
  176. };