xref: /linux/arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts (revision 6d9b262afe0ec1d6e0ef99321ca9d6b921310471)
1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3
4#include "tegra30-lg-x3.dtsi"
5
6/ {
7	model = "LG Optimus 4X HD P880";
8	compatible = "lg,p880", "nvidia,tegra30";
9
10	aliases {
11		mmc1 = &sdmmc3; /* uSD slot */
12		mmc2 = &sdmmc1; /* WiFi */
13	};
14
15	pinmux@70000868 {
16		pinctrl-names = "default";
17		pinctrl-0 = <&state_default>;
18
19		state_default: pinmux {
20			/* WLAN SDIO pinmux */
21			host-wlan-wake {
22				nvidia,pins = "pu4";
23				nvidia,function = "pwm1";
24				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
25				nvidia,tristate = <TEGRA_PIN_ENABLE>;
26				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
27			};
28
29			/* GNSS UART-B pinmux */
30			uartb-rxd {
31				nvidia,pins = "uart2_rxd_pc3";
32				nvidia,function = "uartb";
33				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
34				nvidia,tristate = <TEGRA_PIN_DISABLE>;
35				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
36			};
37			uartb-txd {
38				nvidia,pins = "uart2_txd_pc2";
39				nvidia,function = "uartb";
40				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
41				nvidia,tristate = <TEGRA_PIN_DISABLE>;
42				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
43			};
44			gps-reset {
45				nvidia,pins = "kb_row7_pr7";
46				nvidia,function = "kbc";
47				nvidia,pull = <TEGRA_PIN_PULL_UP>;
48				nvidia,tristate = <TEGRA_PIN_DISABLE>;
49				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
50			};
51
52			/* MicroSD pinmux */
53			sdmmc3-clk {
54				nvidia,pins = "sdmmc3_clk_pa6";
55				nvidia,function = "sdmmc3";
56				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
57				nvidia,tristate = <TEGRA_PIN_DISABLE>;
58				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
59			};
60			sdmmc3-data {
61				nvidia,pins = "sdmmc3_cmd_pa7",
62						"sdmmc3_dat0_pb7",
63						"sdmmc3_dat1_pb6",
64						"sdmmc3_dat2_pb5",
65						"sdmmc3_dat3_pb4";
66				nvidia,function = "sdmmc3";
67				nvidia,pull = <TEGRA_PIN_PULL_UP>;
68				nvidia,tristate = <TEGRA_PIN_DISABLE>;
69				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
70			};
71			microsd-detect {
72				nvidia,pins = "clk2_out_pw5";
73				nvidia,function = "rsvd2";
74				nvidia,pull = <TEGRA_PIN_PULL_UP>;
75				nvidia,tristate = <TEGRA_PIN_DISABLE>;
76				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
77			};
78
79			/* GPIO keys pinmux */
80			volume-up {
81				nvidia,pins = "ulpi_data6_po7";
82				nvidia,function = "spi2";
83				nvidia,pull = <TEGRA_PIN_PULL_UP>;
84				nvidia,tristate = <TEGRA_PIN_DISABLE>;
85				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
86			};
87
88			/* Sensors pinmux */
89			current-alert-irq {
90				nvidia,pins = "uart2_rts_n_pj6";
91				nvidia,function = "uartb";
92				nvidia,pull = <TEGRA_PIN_PULL_UP>;
93				nvidia,tristate = <TEGRA_PIN_DISABLE>;
94				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
95			};
96
97			/* AUDIO pinmux */
98			sub-mic-ldo {
99				nvidia,pins = "gmi_cs7_n_pi6";
100				nvidia,function = "gmi";
101				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
102				nvidia,tristate = <TEGRA_PIN_DISABLE>;
103				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
104			};
105		};
106	};
107
108	i2c@7000c400 {
109		touchscreen@20 {
110			rmi4-f11@11 {
111				syna,clip-x-high = <1110>;
112				syna,clip-y-high = <1973>;
113
114				touchscreen-inverted-y;
115			};
116		};
117	};
118
119	memory-controller@7000f000 {
120		emc-timings-0 {
121			/* SAMSUNG 1GB K4P8G304EB FGC1 533MHz */
122			nvidia,ram-code = <0>;
123
124			timing-12750000 {
125				clock-frequency = <12750000>;
126
127				nvidia,emem-configuration = < 0x00050001 0xc0000010
128					0x00000001 0x00000001 0x00000002 0x00000000
129					0x00000003 0x00000001 0x00000002 0x00000004
130					0x00000001 0x00000000 0x00000002 0x00000002
131					0x02020001 0x00060402 0x77230303 0x001f0000 >;
132			};
133
134			timing-25500000 {
135				clock-frequency = <25500000>;
136
137				nvidia,emem-configuration = < 0x00020001 0xc0000010
138					0x00000001 0x00000001 0x00000002 0x00000000
139					0x00000003 0x00000001 0x00000002 0x00000004
140					0x00000001 0x00000000 0x00000002 0x00000002
141					0x02020001 0x00060402 0x73e30303 0x001f0000 >;
142			};
143
144			timing-51000000 {
145				clock-frequency = <51000000>;
146
147				nvidia,emem-configuration = < 0x00010001 0xc0000010
148					0x00000001 0x00000001 0x00000002 0x00000000
149					0x00000003 0x00000001 0x00000002 0x00000004
150					0x00000001 0x00000000 0x00000002 0x00000002
151					0x02020001 0x00060402 0x72c30303 0x001f0000 >;
152			};
153
154			timing-102000000 {
155				clock-frequency = <102000000>;
156
157				nvidia,emem-configuration = < 0x00000001 0xc0000018
158					0x00000001 0x00000001 0x00000003 0x00000001
159					0x00000003 0x00000001 0x00000002 0x00000004
160					0x00000001 0x00000000 0x00000002 0x00000002
161					0x02020001 0x00060403 0x72430504 0x001f0000 >;
162			};
163
164			timing-204000000 {
165				clock-frequency = <204000000>;
166
167				nvidia,emem-configuration = < 0x00000003 0xc0000025
168					0x00000001 0x00000001 0x00000006 0x00000003
169					0x00000005 0x00000001 0x00000002 0x00000004
170					0x00000001 0x00000000 0x00000003 0x00000002
171					0x02030001 0x00070506 0x71e40a07 0x001f0000 >;
172			};
173
174			timing-266500000 {
175				clock-frequency = <266500000>;
176
177				nvidia,emem-configuration = < 0x00000004 0xC0000030
178					0x00000001 0x00000002 0x00000008 0x00000004
179					0x00000006 0x00000001 0x00000002 0x00000005
180					0x00000001 0x00000000 0x00000003 0x00000003
181					0x03030001 0x00090608 0x70040c09 0x001f0000 >;
182			};
183
184			timing-533000000 {
185				clock-frequency = <533000000>;
186
187				nvidia,emem-configuration = < 0x00000008 0xC0000060
188					0x00000003 0x00000004 0x00000010 0x0000000a
189					0x0000000d 0x00000002 0x00000002 0x00000008
190					0x00000002 0x00000000 0x00000004 0x00000005
191					0x05040002 0x00110b10 0x70281811 0x001f0000 >;
192			};
193		};
194	};
195
196	memory-controller@7000f400 {
197		emc-timings-0 {
198			/* SAMSUNG 1GB K4P8G304EB FGC1 533MHz */
199			nvidia,ram-code = <0>;
200
201			timing-12750000 {
202				clock-frequency = <12750000>;
203
204				nvidia,emc-auto-cal-interval = <0x001fffff>;
205				nvidia,emc-mode-1 = <0x00010022>;
206				nvidia,emc-mode-2 = <0x00020001>;
207				nvidia,emc-mode-reset = <0x00000000>;
208				nvidia,emc-zcal-cnt-long = <0x00000009>;
209				nvidia,emc-cfg-dyn-self-ref;
210				nvidia,emc-cfg-periodic-qrst;
211
212				nvidia,emc-configuration =  < 0x00000000
213					0x00000001 0x00000002 0x00000002 0x00000004
214					0x00000004 0x00000001 0x00000005 0x00000002
215					0x00000002 0x00000001 0x00000001 0x00000000
216					0x00000001 0x00000003 0x00000001 0x0000000b
217					0x00000009 0x0000002f 0x00000000 0x0000000b
218					0x00000001 0x00000001 0x00000002 0x00000000
219					0x00000001 0x00000007 0x00000002 0x00000002
220					0x00000003 0x00000008 0x00000004 0x00000001
221					0x00000002 0x00000036 0x00000004 0x00000004
222					0x00000000 0x00000000 0x00004282 0x007800a4
223					0x00008000 0x000fc000 0x000fc000 0x000fc000
224					0x000fc000 0x000fc000 0x000fc000 0x000fc000
225					0x000fc000 0x00000000 0x00000000 0x00000000
226					0x00000000 0x00000000 0x00000000 0x00000000
227					0x00000000 0x00000000 0x00000000 0x00000000
228					0x00000000 0x00000000 0x00000000 0x00000000
229					0x00000000 0x000fc000 0x000fc000 0x000fc000
230					0x000fc000 0x00100220 0x0800201c 0x00000000
231					0x77ffc004 0x01f1f008 0x00000000 0x00000007
232					0x08000068 0x08000000 0x00000802 0x00064000
233					0x00000009 0x00090009 0xa0f10000 0x00000000
234					0x00000000 0x80000164 0xe0000000 0xff00ff00 >;
235			};
236
237			timing-25500000 {
238				clock-frequency = <25500000>;
239
240				nvidia,emc-auto-cal-interval = <0x001fffff>;
241				nvidia,emc-mode-1 = <0x00010022>;
242				nvidia,emc-mode-2 = <0x00020001>;
243				nvidia,emc-mode-reset = <0x00000000>;
244				nvidia,emc-zcal-cnt-long = <0x00000009>;
245				nvidia,emc-cfg-dyn-self-ref;
246				nvidia,emc-cfg-periodic-qrst;
247
248				nvidia,emc-configuration =  < 0x00000001
249					0x00000003 0x00000002 0x00000002 0x00000004
250					0x00000004 0x00000001 0x00000005 0x00000002
251					0x00000002 0x00000001 0x00000001 0x00000000
252					0x00000001 0x00000003 0x00000001 0x0000000b
253					0x00000009 0x00000060 0x00000000 0x00000018
254					0x00000001 0x00000001 0x00000002 0x00000000
255					0x00000001 0x00000007 0x00000004 0x00000004
256					0x00000003 0x00000008 0x00000004 0x00000001
257					0x00000002 0x0000006b 0x00000004 0x00000004
258					0x00000000 0x00000000 0x00004282 0x007800a4
259					0x00008000 0x000fc000 0x000fc000 0x000fc000
260					0x000fc000 0x000fc000 0x000fc000 0x000fc000
261					0x000fc000 0x00000000 0x00000000 0x00000000
262					0x00000000 0x00000000 0x00000000 0x00000000
263					0x00000000 0x00000000 0x00000000 0x00000000
264					0x00000000 0x00000000 0x00000000 0x00000000
265					0x00000000 0x000fc000 0x000fc000 0x000fc000
266					0x000fc000 0x00100220 0x0800201c 0x00000000
267					0x77ffc004 0x01f1f008 0x00000000 0x00000007
268					0x08000068 0x08000000 0x00000802 0x00064000
269					0x0000000a 0x00090009 0xa0f10000 0x00000000
270					0x00000000 0x800001c5 0xe0000000 0xff00ff00 >;
271			};
272
273			timing-51000000 {
274				clock-frequency = <51000000>;
275
276				nvidia,emc-auto-cal-interval = <0x001fffff>;
277				nvidia,emc-mode-1 = <0x00010022>;
278				nvidia,emc-mode-2 = <0x00020001>;
279				nvidia,emc-mode-reset = <0x00000000>;
280				nvidia,emc-zcal-cnt-long = <0x00000009>;
281				nvidia,emc-cfg-dyn-self-ref;
282				nvidia,emc-cfg-periodic-qrst;
283
284				nvidia,emc-configuration =  < 0x00000003
285					0x00000006 0x00000002 0x00000002 0x00000004
286					0x00000004 0x00000001 0x00000005 0x00000002
287					0x00000002 0x00000001 0x00000001 0x00000000
288					0x00000001 0x00000003 0x00000001 0x0000000b
289					0x00000009 0x000000c0 0x00000000 0x00000030
290					0x00000001 0x00000001 0x00000002 0x00000000
291					0x00000001 0x00000007 0x00000008 0x00000008
292					0x00000003 0x00000008 0x00000004 0x00000001
293					0x00000002 0x000000d5 0x00000004 0x00000004
294					0x00000000 0x00000000 0x00004282 0x007800a4
295					0x00008000 0x000fc000 0x000fc000 0x000fc000
296					0x000fc000 0x000fc000 0x000fc000 0x000fc000
297					0x000fc000 0x00000000 0x00000000 0x00000000
298					0x00000000 0x00000000 0x00000000 0x00000000
299					0x00000000 0x00000000 0x00000000 0x00000000
300					0x00000000 0x00000000 0x00000000 0x00000000
301					0x00000000 0x000fc000 0x000fc000 0x000fc000
302					0x000fc000 0x00100220 0x0800201c 0x00000000
303					0x77ffc004 0x01f1f008 0x00000000 0x00000007
304					0x08000068 0x08000000 0x00000802 0x00064000
305					0x00000013 0x00090009 0xa0f10000 0x00000000
306					0x00000000 0x80000287 0xe0000000 0xff00ff00 >;
307			};
308
309			timing-102000000 {
310				clock-frequency = <102000000>;
311
312				nvidia,emc-auto-cal-interval = <0x001fffff>;
313				nvidia,emc-mode-1 = <0x00010022>;
314				nvidia,emc-mode-2 = <0x00020001>;
315				nvidia,emc-mode-reset = <0x00000000>;
316				nvidia,emc-zcal-cnt-long = <0x0000000a>;
317				nvidia,emc-cfg-dyn-self-ref;
318				nvidia,emc-cfg-periodic-qrst;
319
320				nvidia,emc-configuration =  < 0x00000006
321					0x0000000d 0x00000004 0x00000002 0x00000004
322					0x00000004 0x00000001 0x00000005 0x00000002
323					0x00000002 0x00000001 0x00000001 0x00000000
324					0x00000001 0x00000003 0x00000001 0x0000000b
325					0x00000009 0x00000181 0x00000000 0x00000060
326					0x00000001 0x00000001 0x00000002 0x00000000
327					0x00000001 0x00000007 0x0000000f 0x0000000f
328					0x00000003 0x00000008 0x00000004 0x00000001
329					0x00000002 0x000001a9 0x00000004 0x00000004
330					0x00000000 0x00000000 0x00004282 0x007800a4
331					0x00008000 0x000fc000 0x000fc000 0x000fc000
332					0x000fc000 0x000fc000 0x000fc000 0x000fc000
333					0x000fc000 0x00000000 0x00000000 0x00000000
334					0x00000000 0x00000000 0x00000000 0x00000000
335					0x00000000 0x00000000 0x00000000 0x00000000
336					0x00000000 0x00000000 0x00000000 0x00000000
337					0x00000000 0x000fc000 0x000fc000 0x000fc000
338					0x000fc000 0x00100220 0x0800201c 0x00000000
339					0x77ffc004 0x01f1f008 0x00000000 0x00000007
340					0x08000068 0x08000000 0x00000802 0x00064000
341					0x00000025 0x00090009 0xa0f10000 0x00000000
342					0x00000000 0x8000040b 0xe0000000 0xff00ff00 >;
343			};
344
345			timing-204000000 {
346				clock-frequency = <204000000>;
347
348				nvidia,emc-auto-cal-interval = <0x001fffff>;
349				nvidia,emc-mode-1 = <0x00010042>;
350				nvidia,emc-mode-2 = <0x00020001>;
351				nvidia,emc-mode-reset = <0x00000000>;
352				nvidia,emc-zcal-cnt-long = <0x00000013>;
353				nvidia,emc-cfg-dyn-self-ref;
354				nvidia,emc-cfg-periodic-qrst;
355
356				nvidia,emc-configuration =  < 0x0000000c
357					0x0000001a 0x00000008 0x00000003 0x00000005
358					0x00000004 0x00000001 0x00000006 0x00000003
359					0x00000003 0x00000002 0x00000002 0x00000000
360					0x00000001 0x00000003 0x00000001 0x0000000c
361					0x0000000a 0x00000303 0x00000000 0x000000c0
362					0x00000001 0x00000001 0x00000003 0x00000000
363					0x00000001 0x00000007 0x0000001d 0x0000001d
364					0x00000004 0x0000000b 0x00000005 0x00000001
365					0x00000002 0x00000351 0x00000004 0x00000006
366					0x00000000 0x00000000 0x00004282 0x004400a4
367					0x00008000 0x00070000 0x00070000 0x00070000
368					0x00070000 0x00070000 0x00070000 0x00070000
369					0x00070000 0x00000000 0x00000000 0x00000000
370					0x00000000 0x00000000 0x00000000 0x00000000
371					0x00000000 0x00000000 0x00000000 0x00000000
372					0x00000000 0x00000000 0x00000000 0x00000000
373					0x00000000 0x00080000 0x00080000 0x00080000
374					0x00080000 0x000e0220 0x0800201c 0x00000000
375					0x77ffc004 0x01f1f008 0x00000000 0x00000007
376					0x08000068 0x08000000 0x00000802 0x00064000
377					0x0000004a 0x00090009 0xa0f10000 0x00000000
378					0x00000000 0x80000713 0xe0000000 0xff00ff00 >;
379			};
380
381			timing-266500000 {
382				clock-frequency = <266500000>;
383
384				nvidia,emc-auto-cal-interval = <0x001fffff>;
385				nvidia,emc-mode-1 = <0x00010042>;
386				nvidia,emc-mode-2 = <0x00020002>;
387				nvidia,emc-mode-reset = <0x00000000>;
388				nvidia,emc-zcal-cnt-long = <0x00000018>;
389				nvidia,emc-cfg-periodic-qrst;
390
391				nvidia,emc-configuration =  < 0x0000000f
392					0x00000022 0x0000000b 0x00000004 0x00000005
393					0x00000005 0x00000001 0x00000007 0x00000004
394					0x00000004 0x00000002 0x00000002 0x00000000
395					0x00000002 0x00000005 0x00000002 0x0000000c
396					0x0000000b 0x000003ef 0x00000000 0x000000fb
397					0x00000001 0x00000001 0x00000004 0x00000000
398					0x00000001 0x00000009 0x00000026 0x00000026
399					0x00000004 0x0000000e 0x00000006 0x00000001
400					0x00000002 0x00000455 0x00000000 0x00000004
401					0x00000000 0x00000000 0x00006282 0x003200a4
402					0x00008000 0x00050000 0x00050000 0x00050000
403					0x00050000 0x00050000 0x00050000 0x00050000
404					0x00050000 0x00000000 0x00000000 0x00000000
405					0x00000000 0x00000000 0x00000000 0x00000000
406					0x00000000 0x00000000 0x00000000 0x00000000
407					0x00000000 0x00000000 0x00000000 0x00000000
408					0x00000000 0x00060000 0x00060000 0x00060000
409					0x00060000 0x000b0220 0x0800003d 0x00000000
410					0x77ffc004 0x01f1f008 0x00000000 0x00000007
411					0x08000068 0x08000000 0x00000802 0x00064000
412					0x00000060 0x000a000a 0xa0f10000 0x00000000
413					0x00000000 0x800008ee 0xe0000000 0xff00ff00 >;
414			};
415
416			timing-533000000 {
417				clock-frequency = <533000000>;
418
419				nvidia,emc-auto-cal-interval = <0x001fffff>;
420				nvidia,emc-mode-1 = <0x000100c2>;
421				nvidia,emc-mode-2 = <0x00020006>;
422				nvidia,emc-mode-reset = <0x00000000>;
423				nvidia,emc-zcal-cnt-long = <0x00000030>;
424				nvidia,emc-cfg-periodic-qrst;
425
426				nvidia,emc-configuration =  < 0x0000001f
427					0x00000045 0x00000016 0x00000009 0x00000008
428					0x00000009 0x00000003 0x0000000d 0x00000009
429					0x00000009 0x00000005 0x00000003 0x00000000
430					0x00000004 0x00000009 0x00000006 0x0000000d
431					0x00000010 0x000007df 0x00000000 0x000001f7
432					0x00000003 0x00000003 0x00000009 0x00000000
433					0x00000001 0x0000000f 0x0000004b 0x0000004b
434					0x00000008 0x0000001b 0x0000000c 0x00000001
435					0x00000002 0x000008aa 0x00000000 0x00000006
436					0x00000000 0x00000000 0x00006282 0xf0120091
437					0x00008000 0x0000000a 0x0000000a 0x0000000a
438					0x0000000a 0x0000000a 0x0000000a 0x0000000a
439					0x0000000a 0x00000000 0x00000000 0x00000000
440					0x00000000 0x00000000 0x00000000 0x00000000
441					0x00000000 0x00000000 0x00000000 0x00000000
442					0x00000000 0x00000000 0x00000000 0x00000000
443					0x00000000 0x0000000a 0x0000000a 0x0000000a
444					0x0000000a 0x00090220 0x0800003d 0x00000000
445					0x77ffc004 0x01f1f408 0x00000000 0x00000007
446					0x08000068 0x08000000 0x00000802 0x00064000
447					0x000000c0 0x000e000e 0xa0f10000 0x00000000
448					0x00000000 0x800010d9 0xe0000000 0xff00ff88 >;
449			};
450		};
451	};
452
453	sdmmc3: mmc@78000400 {
454		status = "okay";
455
456		cd-gpios = <&gpio TEGRA_GPIO(W, 5) GPIO_ACTIVE_LOW>;
457		bus-width = <4>;
458
459		vmmc-supply = <&vdd_usd>;
460		vqmmc-supply = <&vdd_1v8_vio>;
461	};
462
463	battery: battery-cell {
464		compatible = "simple-battery";
465		device-chemistry = "lithium-ion";
466		charge-full-design-microamp-hours = <2150000>;
467		energy-full-design-microwatt-hours = <8200000>;
468		operating-range-celsius = <0 45>;
469	};
470
471	gpio-keys {
472		key-volume-up {
473			label = "Volume Up";
474			gpios = <&gpio TEGRA_GPIO(O, 7) GPIO_ACTIVE_LOW>;
475			linux,code = <KEY_VOLUMEUP>;
476			debounce-interval = <10>;
477			wakeup-event-action = <EV_ACT_ASSERTED>;
478			wakeup-source;
479		};
480	};
481
482	sound {
483		compatible = "lg,tegra-audio-max98089-p880",
484			     "nvidia,tegra-audio-max98089";
485		nvidia,model = "LG Optimus 4X HD MAX98089";
486
487		nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
488	};
489};
490