emc.txt 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Embedded Memory Controller
  2. Properties:
  3. - name : Should be emc
  4. - #address-cells : Should be 1
  5. - #size-cells : Should be 0
  6. - compatible : Should contain "nvidia,tegra20-emc".
  7. - reg : Offset and length of the register set for the device
  8. - nvidia,use-ram-code : If present, the sub-nodes will be addressed
  9. and chosen using the ramcode board selector. If omitted, only one
  10. set of tables can be present and said tables will be used
  11. irrespective of ram-code configuration.
  12. Child device nodes describe the memory settings for different configurations and clock rates.
  13. Example:
  14. emc@7000f400 {
  15. #address-cells = < 1 >;
  16. #size-cells = < 0 >;
  17. compatible = "nvidia,tegra20-emc";
  18. reg = <0x7000f4000 0x200>;
  19. }
  20. Embedded Memory Controller ram-code table
  21. If the emc node has the nvidia,use-ram-code property present, then the
  22. next level of nodes below the emc table are used to specify which settings
  23. apply for which ram-code settings.
  24. If the emc node lacks the nvidia,use-ram-code property, this level is omitted
  25. and the tables are stored directly under the emc node (see below).
  26. Properties:
  27. - name : Should be emc-tables
  28. - nvidia,ram-code : the binary representation of the ram-code board strappings
  29. for which this node (and children) are valid.
  30. Embedded Memory Controller configuration table
  31. This is a table containing the EMC register settings for the various
  32. operating speeds of the memory controller. They are always located as
  33. subnodes of the emc controller node.
  34. There are two ways of specifying which tables to use:
  35. * The simplest is if there is just one set of tables in the device tree,
  36. and they will always be used (based on which frequency is used).
  37. This is the preferred method, especially when firmware can fill in
  38. this information based on the specific system information and just
  39. pass it on to the kernel.
  40. * The slightly more complex one is when more than one memory configuration
  41. might exist on the system. The Tegra20 platform handles this during
  42. early boot by selecting one out of possible 4 memory settings based
  43. on a 2-pin "ram code" bootstrap setting on the board. The values of
  44. these strappings can be read through a register in the SoC, and thus
  45. used to select which tables to use.
  46. Properties:
  47. - name : Should be emc-table
  48. - compatible : Should contain "nvidia,tegra20-emc-table".
  49. - reg : either an opaque enumerator to tell different tables apart, or
  50. the valid frequency for which the table should be used (in kHz).
  51. - clock-frequency : the clock frequency for the EMC at which this
  52. table should be used (in kHz).
  53. - nvidia,emc-registers : a 46 word array of EMC registers to be programmed
  54. for operation at the 'clock-frequency' setting.
  55. The order and contents of the registers are:
  56. RC, RFC, RAS, RP, R2W, W2R, R2P, W2P, RD_RCD, WR_RCD, RRD, REXT,
  57. WDV, QUSE, QRST, QSAFE, RDV, REFRESH, BURST_REFRESH_NUM, PDEX2WR,
  58. PDEX2RD, PCHG2PDEN, ACT2PDEN, AR2PDEN, RW2PDEN, TXSR, TCKE, TFAW,
  59. TRPAB, TCLKSTABLE, TCLKSTOP, TREFBW, QUSE_EXTRA, FBIO_CFG6, ODT_WRITE,
  60. ODT_READ, FBIO_CFG5, CFG_DIG_DLL, DLL_XFORM_DQS, DLL_XFORM_QUSE,
  61. ZCAL_REF_CNT, ZCAL_WAIT_CNT, AUTO_CAL_INTERVAL, CFG_CLKTRIM_0,
  62. CFG_CLKTRIM_1, CFG_CLKTRIM_2
  63. emc-table@166000 {
  64. reg = <166000>;
  65. compatible = "nvidia,tegra20-emc-table";
  66. clock-frequency = < 166000 >;
  67. nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  68. 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  69. 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  70. 0 0 0 0 >;
  71. };
  72. emc-table@333000 {
  73. reg = <333000>;
  74. compatible = "nvidia,tegra20-emc-table";
  75. clock-frequency = < 333000 >;
  76. nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  77. 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  78. 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  79. 0 0 0 0 >;
  80. };