nvidia,tegra-mc.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. NVIDIA Tegra Memory Controller device tree bindings
  2. ===================================================
  3. memory-controller node
  4. ----------------------
  5. Required properties:
  6. - compatible: Should be "nvidia,tegra<chip>-mc"
  7. - reg: Physical base address and length of the controller's registers.
  8. - clocks: Must contain an entry for each entry in clock-names.
  9. See ../clocks/clock-bindings.txt for details.
  10. - clock-names: Must include the following entries:
  11. - mc: the module's clock input
  12. - interrupts: The interrupt outputs from the controller.
  13. - #iommu-cells: Should be 1. The single cell of the IOMMU specifier defines
  14. the SWGROUP of the master.
  15. This device implements an IOMMU that complies with the generic IOMMU binding.
  16. See ../iommu/iommu.txt for details.
  17. emc-timings subnode
  18. -------------------
  19. The node should contain a "emc-timings" subnode for each supported RAM type (see field RAM_CODE in
  20. register PMC_STRAPPING_OPT_A).
  21. Required properties for "emc-timings" nodes :
  22. - nvidia,ram-code : Should contain the value of RAM_CODE this timing set is used for.
  23. timing subnode
  24. --------------
  25. Each "emc-timings" node should contain a subnode for every supported EMC clock rate.
  26. Required properties for timing nodes :
  27. - clock-frequency : Should contain the memory clock rate in Hz.
  28. - nvidia,emem-configuration : Values to be written to the EMEM register block. For the Tegra124 SoC
  29. (see section "15.6.1 MC Registers" in the TRM), these are the registers whose values need to be
  30. specified, according to the board documentation:
  31. MC_EMEM_ARB_CFG
  32. MC_EMEM_ARB_OUTSTANDING_REQ
  33. MC_EMEM_ARB_TIMING_RCD
  34. MC_EMEM_ARB_TIMING_RP
  35. MC_EMEM_ARB_TIMING_RC
  36. MC_EMEM_ARB_TIMING_RAS
  37. MC_EMEM_ARB_TIMING_FAW
  38. MC_EMEM_ARB_TIMING_RRD
  39. MC_EMEM_ARB_TIMING_RAP2PRE
  40. MC_EMEM_ARB_TIMING_WAP2PRE
  41. MC_EMEM_ARB_TIMING_R2R
  42. MC_EMEM_ARB_TIMING_W2W
  43. MC_EMEM_ARB_TIMING_R2W
  44. MC_EMEM_ARB_TIMING_W2R
  45. MC_EMEM_ARB_DA_TURNS
  46. MC_EMEM_ARB_DA_COVERS
  47. MC_EMEM_ARB_MISC0
  48. MC_EMEM_ARB_MISC1
  49. MC_EMEM_ARB_RING1_THROTTLE
  50. Example SoC include file:
  51. / {
  52. mc: memory-controller@0,70019000 {
  53. compatible = "nvidia,tegra124-mc";
  54. reg = <0x0 0x70019000 0x0 0x1000>;
  55. clocks = <&tegra_car TEGRA124_CLK_MC>;
  56. clock-names = "mc";
  57. interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
  58. #iommu-cells = <1>;
  59. };
  60. sdhci@0,700b0000 {
  61. compatible = "nvidia,tegra124-sdhci";
  62. ...
  63. iommus = <&mc TEGRA_SWGROUP_SDMMC1A>;
  64. };
  65. };
  66. Example board file:
  67. / {
  68. memory-controller@0,70019000 {
  69. emc-timings-3 {
  70. nvidia,ram-code = <3>;
  71. timing-12750000 {
  72. clock-frequency = <12750000>;
  73. nvidia,emem-configuration = <
  74. 0x40040001 /* MC_EMEM_ARB_CFG */
  75. 0x8000000a /* MC_EMEM_ARB_OUTSTANDING_REQ */
  76. 0x00000001 /* MC_EMEM_ARB_TIMING_RCD */
  77. 0x00000001 /* MC_EMEM_ARB_TIMING_RP */
  78. 0x00000002 /* MC_EMEM_ARB_TIMING_RC */
  79. 0x00000000 /* MC_EMEM_ARB_TIMING_RAS */
  80. 0x00000002 /* MC_EMEM_ARB_TIMING_FAW */
  81. 0x00000001 /* MC_EMEM_ARB_TIMING_RRD */
  82. 0x00000002 /* MC_EMEM_ARB_TIMING_RAP2PRE */
  83. 0x00000008 /* MC_EMEM_ARB_TIMING_WAP2PRE */
  84. 0x00000003 /* MC_EMEM_ARB_TIMING_R2R */
  85. 0x00000002 /* MC_EMEM_ARB_TIMING_W2W */
  86. 0x00000003 /* MC_EMEM_ARB_TIMING_R2W */
  87. 0x00000006 /* MC_EMEM_ARB_TIMING_W2R */
  88. 0x06030203 /* MC_EMEM_ARB_DA_TURNS */
  89. 0x000a0402 /* MC_EMEM_ARB_DA_COVERS */
  90. 0x77e30303 /* MC_EMEM_ARB_MISC0 */
  91. 0x70000f03 /* MC_EMEM_ARB_MISC1 */
  92. 0x001f0000 /* MC_EMEM_ARB_RING1_THROTTLE */
  93. >;
  94. };
  95. };
  96. };
  97. };