1// SPDX-License-Identifier: GPL-2.0
2
3#include "tegra30-asus-nexus7-grouper-memory-timings.dtsi"
4
5/ {
6	/*
7	 * Tilapia's memory timings are pretty much the same as the Grouper's
8	 * ones. There are few minor tunings made for a higher clock rates,
9	 * these differentiating timings are overridden here for Tilapia.
10	 */
11
12	memory-controller@7000f400 {
13		emc-timings-0 {
14			timing-667000000 {
15				clock-frequency = <667000000>;
16
17				nvidia,emc-auto-cal-interval = <0x001fffff>;
18				nvidia,emc-mode-1 = <0x80100002>;
19				nvidia,emc-mode-2 = <0x80200018>;
20				nvidia,emc-mode-reset = <0x80000b71>;
21				nvidia,emc-zcal-cnt-long = <0x00000040>;
22				nvidia,emc-cfg-periodic-qrst;
23
24				nvidia,emc-configuration = <
25					0x0000001f /* EMC_RC */
26					0x00000069 /* EMC_RFC */
27					0x00000017 /* EMC_RAS */
28					0x00000007 /* EMC_RP */
29					0x00000005 /* EMC_R2W */
30					0x0000000c /* EMC_W2R */
31					0x00000003 /* EMC_R2P */
32					0x00000011 /* EMC_W2P */
33					0x00000007 /* EMC_RD_RCD */
34					0x00000007 /* EMC_WR_RCD */
35					0x00000002 /* EMC_RRD */
36					0x00000001 /* EMC_REXT */
37					0x00000000 /* EMC_WEXT */
38					0x00000007 /* EMC_WDV */
39					0x0000000b /* EMC_QUSE */
40					0x00000009 /* EMC_QRST */
41					0x0000000b /* EMC_QSAFE */
42					0x00000011 /* EMC_RDV */
43					0x00001412 /* EMC_REFRESH */
44					0x00000000 /* EMC_BURST_REFRESH_NUM */
45					0x00000504 /* EMC_PRE_REFRESH_REQ_CNT */
46					0x00000002 /* EMC_PDEX2WR */
47					0x0000000e /* EMC_PDEX2RD */
48					0x00000001 /* EMC_PCHG2PDEN */
49					0x00000000 /* EMC_ACT2PDEN */
50					0x0000000c /* EMC_AR2PDEN */
51					0x00000016 /* EMC_RW2PDEN */
52					0x00000072 /* EMC_TXSR */
53					0x00000200 /* EMC_TXSRDLL */
54					0x00000005 /* EMC_TCKE */
55					0x00000015 /* EMC_TFAW */
56					0x00000000 /* EMC_TRPAB */
57					0x00000006 /* EMC_TCLKSTABLE */
58					0x00000007 /* EMC_TCLKSTOP */
59					0x00001453 /* EMC_TREFBW */
60					0x0000000c /* EMC_QUSE_EXTRA */
61					0x00000004 /* EMC_FBIO_CFG6 */
62					0x00000000 /* EMC_ODT_WRITE */
63					0x00000000 /* EMC_ODT_READ */
64					0x00005088 /* EMC_FBIO_CFG5 */
65					0xf00b0191 /* EMC_CFG_DIG_DLL */
66					0x00008000 /* EMC_CFG_DIG_DLL_PERIOD */
67					0x00000008 /* EMC_DLL_XFORM_DQS0 */
68					0x00000008 /* EMC_DLL_XFORM_DQS1 */
69					0x00000008 /* EMC_DLL_XFORM_DQS2 */
70					0x00000008 /* EMC_DLL_XFORM_DQS3 */
71					0x0000000a /* EMC_DLL_XFORM_DQS4 */
72					0x0000000a /* EMC_DLL_XFORM_DQS5 */
73					0x0000000a /* EMC_DLL_XFORM_DQS6 */
74					0x0000000a /* EMC_DLL_XFORM_DQS7 */
75					0x00000000 /* EMC_DLL_XFORM_QUSE0 */
76					0x00000000 /* EMC_DLL_XFORM_QUSE1 */
77					0x00000000 /* EMC_DLL_XFORM_QUSE2 */
78					0x00000000 /* EMC_DLL_XFORM_QUSE3 */
79					0x00000000 /* EMC_DLL_XFORM_QUSE4 */
80					0x00000000 /* EMC_DLL_XFORM_QUSE5 */
81					0x00000000 /* EMC_DLL_XFORM_QUSE6 */
82					0x00000000 /* EMC_DLL_XFORM_QUSE7 */
83					0x00000000 /* EMC_DLI_TRIM_TXDQS0 */
84					0x00000000 /* EMC_DLI_TRIM_TXDQS1 */
85					0x00000000 /* EMC_DLI_TRIM_TXDQS2 */
86					0x00000000 /* EMC_DLI_TRIM_TXDQS3 */
87					0x00000000 /* EMC_DLI_TRIM_TXDQS4 */
88					0x00000000 /* EMC_DLI_TRIM_TXDQS5 */
89					0x00000000 /* EMC_DLI_TRIM_TXDQS6 */
90					0x00000000 /* EMC_DLI_TRIM_TXDQS7 */
91					0x0000000c /* EMC_DLL_XFORM_DQ0 */
92					0x0000000c /* EMC_DLL_XFORM_DQ1 */
93					0x0000000c /* EMC_DLL_XFORM_DQ2 */
94					0x0000000c /* EMC_DLL_XFORM_DQ3 */
95					0x000002a0 /* EMC_XM2CMDPADCTRL */
96					0x0800013d /* EMC_XM2DQSPADCTRL2 */
97					0x22220000 /* EMC_XM2DQPADCTRL2 */
98					0x77fff884 /* EMC_XM2CLKPADCTRL */
99					0x01f1f501 /* EMC_XM2COMPPADCTRL */
100					0x07077404 /* EMC_XM2VTTGENPADCTRL */
101					0x54000000 /* EMC_XM2VTTGENPADCTRL2 */
102					0x080001e8 /* EMC_XM2QUSEPADCTRL */
103					0x08000021 /* EMC_XM2DQSPADCTRL3 */
104					0x00000802 /* EMC_CTT_TERM_CTRL */
105					0x00020000 /* EMC_ZCAL_INTERVAL */
106					0x00000100 /* EMC_ZCAL_WAIT_CNT */
107					0x0156000c /* EMC_MRS_WAIT_CNT */
108					0xa0f10000 /* EMC_AUTO_CAL_CONFIG */
109					0x00000000 /* EMC_CTT */
110					0x00000000 /* EMC_CTT_DURATION */
111					0x800028a5 /* EMC_DYN_SELF_REF_CONTROL */
112					0xe8000000 /* EMC_FBIO_SPARE */
113					0xff00ff49 /* EMC_CFG_RSV */
114				>;
115			};
116		};
117
118		emc-timings-1 {
119			timing-333500000 {
120				clock-frequency = <333500000>;
121
122				nvidia,emc-auto-cal-interval = <0x001fffff>;
123				nvidia,emc-mode-1 = <0x80100002>;
124				nvidia,emc-mode-2 = <0x80200000>;
125				nvidia,emc-mode-reset = <0x80000321>;
126				nvidia,emc-zcal-cnt-long = <0x00000040>;
127
128				nvidia,emc-configuration = <
129					0x0000000f /* EMC_RC */
130					0x00000034 /* EMC_RFC */
131					0x0000000a /* EMC_RAS */
132					0x00000003 /* EMC_RP */
133					0x00000003 /* EMC_R2W */
134					0x00000008 /* EMC_W2R */
135					0x00000002 /* EMC_R2P */
136					0x00000009 /* EMC_W2P */
137					0x00000003 /* EMC_RD_RCD */
138					0x00000003 /* EMC_WR_RCD */
139					0x00000002 /* EMC_RRD */
140					0x00000001 /* EMC_REXT */
141					0x00000000 /* EMC_WEXT */
142					0x00000004 /* EMC_WDV */
143					0x00000006 /* EMC_QUSE */
144					0x00000004 /* EMC_QRST */
145					0x0000000a /* EMC_QSAFE */
146					0x0000000c /* EMC_RDV */
147					0x000009e9 /* EMC_REFRESH */
148					0x00000000 /* EMC_BURST_REFRESH_NUM */
149					0x0000027a /* EMC_PRE_REFRESH_REQ_CNT */
150					0x00000001 /* EMC_PDEX2WR */
151					0x00000008 /* EMC_PDEX2RD */
152					0x00000001 /* EMC_PCHG2PDEN */
153					0x00000000 /* EMC_ACT2PDEN */
154					0x00000007 /* EMC_AR2PDEN */
155					0x0000000e /* EMC_RW2PDEN */
156					0x00000039 /* EMC_TXSR */
157					0x00000200 /* EMC_TXSRDLL */
158					0x00000004 /* EMC_TCKE */
159					0x0000000a /* EMC_TFAW */
160					0x00000000 /* EMC_TRPAB */
161					0x00000004 /* EMC_TCLKSTABLE */
162					0x00000005 /* EMC_TCLKSTOP */
163					0x00000a2a /* EMC_TREFBW */
164					0x00000000 /* EMC_QUSE_EXTRA */
165					0x00000004 /* EMC_FBIO_CFG6 */
166					0x00000000 /* EMC_ODT_WRITE */
167					0x00000000 /* EMC_ODT_READ */
168					0x00007088 /* EMC_FBIO_CFG5 */
169					0x002600a4 /* EMC_CFG_DIG_DLL */
170					0x00008000 /* EMC_CFG_DIG_DLL_PERIOD */
171					0x0003c000 /* EMC_DLL_XFORM_DQS0 */
172					0x0003c000 /* EMC_DLL_XFORM_DQS1 */
173					0x0003c000 /* EMC_DLL_XFORM_DQS2 */
174					0x0003c000 /* EMC_DLL_XFORM_DQS3 */
175					0x00014000 /* EMC_DLL_XFORM_DQS4 */
176					0x00014000 /* EMC_DLL_XFORM_DQS5 */
177					0x00014000 /* EMC_DLL_XFORM_DQS6 */
178					0x00014000 /* EMC_DLL_XFORM_DQS7 */
179					0x00000000 /* EMC_DLL_XFORM_QUSE0 */
180					0x00000000 /* EMC_DLL_XFORM_QUSE1 */
181					0x00000000 /* EMC_DLL_XFORM_QUSE2 */
182					0x00000000 /* EMC_DLL_XFORM_QUSE3 */
183					0x00000000 /* EMC_DLL_XFORM_QUSE4 */
184					0x00000000 /* EMC_DLL_XFORM_QUSE5 */
185					0x00000000 /* EMC_DLL_XFORM_QUSE6 */
186					0x00000000 /* EMC_DLL_XFORM_QUSE7 */
187					0x00000000 /* EMC_DLI_TRIM_TXDQS0 */
188					0x00000000 /* EMC_DLI_TRIM_TXDQS1 */
189					0x00000000 /* EMC_DLI_TRIM_TXDQS2 */
190					0x00000000 /* EMC_DLI_TRIM_TXDQS3 */
191					0x00000000 /* EMC_DLI_TRIM_TXDQS4 */
192					0x00000000 /* EMC_DLI_TRIM_TXDQS5 */
193					0x00000000 /* EMC_DLI_TRIM_TXDQS6 */
194					0x00000000 /* EMC_DLI_TRIM_TXDQS7 */
195					0x00048000 /* EMC_DLL_XFORM_DQ0 */
196					0x00048000 /* EMC_DLL_XFORM_DQ1 */
197					0x00048000 /* EMC_DLL_XFORM_DQ2 */
198					0x00048000 /* EMC_DLL_XFORM_DQ3 */
199					0x000002a0 /* EMC_XM2CMDPADCTRL */
200					0x0800013d /* EMC_XM2DQSPADCTRL2 */
201					0x00000000 /* EMC_XM2DQPADCTRL2 */
202					0x77fff884 /* EMC_XM2CLKPADCTRL */
203					0x01f1f508 /* EMC_XM2COMPPADCTRL */
204					0x05057404 /* EMC_XM2VTTGENPADCTRL */
205					0x54000007 /* EMC_XM2VTTGENPADCTRL2 */
206					0x080001e8 /* EMC_XM2QUSEPADCTRL */
207					0x08000021 /* EMC_XM2DQSPADCTRL3 */
208					0x00000802 /* EMC_CTT_TERM_CTRL */
209					0x00020000 /* EMC_ZCAL_INTERVAL */
210					0x00000100 /* EMC_ZCAL_WAIT_CNT */
211					0x018b000c /* EMC_MRS_WAIT_CNT */
212					0xa0f10000 /* EMC_AUTO_CAL_CONFIG */
213					0x00000000 /* EMC_CTT */
214					0x00000000 /* EMC_CTT_DURATION */
215					0x800014d4 /* EMC_DYN_SELF_REF_CONTROL */
216					0xe8000000 /* EMC_FBIO_SPARE */
217					0xff00ff89 /* EMC_CFG_RSV */
218				>;
219			};
220
221			timing-667000000 {
222				clock-frequency = <667000000>;
223
224				nvidia,emc-auto-cal-interval = <0x001fffff>;
225				nvidia,emc-mode-1 = <0x80100002>;
226				nvidia,emc-mode-2 = <0x80200018>;
227				nvidia,emc-mode-reset = <0x80000b71>;
228				nvidia,emc-zcal-cnt-long = <0x00000040>;
229				nvidia,emc-cfg-periodic-qrst;
230
231				nvidia,emc-configuration = <
232					0x00000020 /* EMC_RC */
233					0x0000006a /* EMC_RFC */
234					0x00000017 /* EMC_RAS */
235					0x00000007 /* EMC_RP */
236					0x00000005 /* EMC_R2W */
237					0x0000000c /* EMC_W2R */
238					0x00000003 /* EMC_R2P */
239					0x00000011 /* EMC_W2P */
240					0x00000007 /* EMC_RD_RCD */
241					0x00000007 /* EMC_WR_RCD */
242					0x00000002 /* EMC_RRD */
243					0x00000001 /* EMC_REXT */
244					0x00000000 /* EMC_WEXT */
245					0x00000007 /* EMC_WDV */
246					0x0000000a /* EMC_QUSE */
247					0x00000009 /* EMC_QRST */
248					0x0000000b /* EMC_QSAFE */
249					0x00000011 /* EMC_RDV */
250					0x00001412 /* EMC_REFRESH */
251					0x00000000 /* EMC_BURST_REFRESH_NUM */
252					0x00000504 /* EMC_PRE_REFRESH_REQ_CNT */
253					0x00000002 /* EMC_PDEX2WR */
254					0x0000000e /* EMC_PDEX2RD */
255					0x00000001 /* EMC_PCHG2PDEN */
256					0x00000000 /* EMC_ACT2PDEN */
257					0x0000000c /* EMC_AR2PDEN */
258					0x00000016 /* EMC_RW2PDEN */
259					0x00000072 /* EMC_TXSR */
260					0x00000200 /* EMC_TXSRDLL */
261					0x00000005 /* EMC_TCKE */
262					0x00000015 /* EMC_TFAW */
263					0x00000000 /* EMC_TRPAB */
264					0x00000006 /* EMC_TCLKSTABLE */
265					0x00000007 /* EMC_TCLKSTOP */
266					0x00001453 /* EMC_TREFBW */
267					0x0000000b /* EMC_QUSE_EXTRA */
268					0x00000006 /* EMC_FBIO_CFG6 */
269					0x00000000 /* EMC_ODT_WRITE */
270					0x00000000 /* EMC_ODT_READ */
271					0x00005088 /* EMC_FBIO_CFG5 */
272					0xf00b0191 /* EMC_CFG_DIG_DLL */
273					0x00008000 /* EMC_CFG_DIG_DLL_PERIOD */
274					0x00000008 /* EMC_DLL_XFORM_DQS0 */
275					0x00000008 /* EMC_DLL_XFORM_DQS1 */
276					0x00000008 /* EMC_DLL_XFORM_DQS2 */
277					0x00000008 /* EMC_DLL_XFORM_DQS3 */
278					0x0000000a /* EMC_DLL_XFORM_DQS4 */
279					0x0000000a /* EMC_DLL_XFORM_DQS5 */
280					0x0000000a /* EMC_DLL_XFORM_DQS6 */
281					0x0000000a /* EMC_DLL_XFORM_DQS7 */
282					0x00018000 /* EMC_DLL_XFORM_QUSE0 */
283					0x00018000 /* EMC_DLL_XFORM_QUSE1 */
284					0x00018000 /* EMC_DLL_XFORM_QUSE2 */
285					0x00018000 /* EMC_DLL_XFORM_QUSE3 */
286					0x00000000 /* EMC_DLL_XFORM_QUSE4 */
287					0x00000000 /* EMC_DLL_XFORM_QUSE5 */
288					0x00000000 /* EMC_DLL_XFORM_QUSE6 */
289					0x00000000 /* EMC_DLL_XFORM_QUSE7 */
290					0x00000000 /* EMC_DLI_TRIM_TXDQS0 */
291					0x00000000 /* EMC_DLI_TRIM_TXDQS1 */
292					0x00000000 /* EMC_DLI_TRIM_TXDQS2 */
293					0x00000000 /* EMC_DLI_TRIM_TXDQS3 */
294					0x00000000 /* EMC_DLI_TRIM_TXDQS4 */
295					0x00000000 /* EMC_DLI_TRIM_TXDQS5 */
296					0x00000000 /* EMC_DLI_TRIM_TXDQS6 */
297					0x00000000 /* EMC_DLI_TRIM_TXDQS7 */
298					0x0000000a /* EMC_DLL_XFORM_DQ0 */
299					0x0000000a /* EMC_DLL_XFORM_DQ1 */
300					0x0000000a /* EMC_DLL_XFORM_DQ2 */
301					0x0000000a /* EMC_DLL_XFORM_DQ3 */
302					0x000002a0 /* EMC_XM2CMDPADCTRL */
303					0x0800013d /* EMC_XM2DQSPADCTRL2 */
304					0x22220000 /* EMC_XM2DQPADCTRL2 */
305					0x77fff884 /* EMC_XM2CLKPADCTRL */
306					0x01f1f501 /* EMC_XM2COMPPADCTRL */
307					0x07077404 /* EMC_XM2VTTGENPADCTRL */
308					0x54000000 /* EMC_XM2VTTGENPADCTRL2 */
309					0x080001e8 /* EMC_XM2QUSEPADCTRL */
310					0x0c000021 /* EMC_XM2DQSPADCTRL3 */
311					0x00000802 /* EMC_CTT_TERM_CTRL */
312					0x00020000 /* EMC_ZCAL_INTERVAL */
313					0x00000100 /* EMC_ZCAL_WAIT_CNT */
314					0x0155000c /* EMC_MRS_WAIT_CNT */
315					0xa0f10000 /* EMC_AUTO_CAL_CONFIG */
316					0x00000000 /* EMC_CTT */
317					0x00000000 /* EMC_CTT_DURATION */
318					0x800028a5 /* EMC_DYN_SELF_REF_CONTROL */
319					0xe8000000 /* EMC_FBIO_SPARE */
320					0xff00ff49 /* EMC_CFG_RSV */
321				>;
322			};
323		};
324	};
325};
326