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