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