blob: 49efabbfd92085a97e793880e86e34bd5d1526b3 [file] [log] [blame]
Svyatoslav Ryhel7a120092022-01-27 19:42:04 +02001// SPDX-License-Identifier: GPL-2.0
2
3#include <dt-bindings/input/input.h>
4#include "tegra20.dtsi"
5
6/ {
7 chosen {
8 stdout-path = &uartd;
9 };
10
11 aliases {
12 i2c0 = &pwr_i2c;
13
14 mmc0 = &sdmmc4; /* eMMC */
15 mmc1 = &sdmmc3; /* MicroSD */
16
17 rtc0 = &pmic;
18 rtc1 = "/rtc@7000e000";
19
20 usb0 = &usb1;
21 usb1 = &usb3; /* Dock USB */
22 };
23
24 memory {
25 device_type = "memory";
26 reg = <0x00000000 0x40000000>;
27 };
28
29 host1x@50000000 {
30 dc@54200000 {
31 rgb {
32 status = "okay";
33
34 nvidia,panel = <&panel>;
35 };
36 };
37 };
38
39 pinmux@70000014 {
40 pinctrl-names = "default";
41 pinctrl-0 = <&state_default>;
42
43 state_default: pinmux {
44 ata {
45 nvidia,pins = "ata";
46 nvidia,function = "ide";
47 };
48
49 atb {
50 nvidia,pins = "atb", "gma", "gme";
51 nvidia,function = "sdio4";
52 };
53
54 atc {
55 nvidia,pins = "atc";
56 nvidia,function = "nand";
57 };
58
59 atd {
60 nvidia,pins = "atd", "ate", "gmb", "spia",
61 "spib", "spic";
62 nvidia,function = "gmi";
63 };
64
65 cdev1 {
66 nvidia,pins = "cdev1";
67 nvidia,function = "plla_out";
68 };
69
70 cdev2 {
71 nvidia,pins = "cdev2";
72 nvidia,function = "pllp_out4";
73 };
74
75 crtp {
76 nvidia,pins = "crtp";
77 nvidia,function = "crt";
78 };
79
80 lm1 {
81 nvidia,pins = "lm1";
82 nvidia,function = "rsvd3";
83 };
84
85 csus {
86 nvidia,pins = "csus";
87 nvidia,function = "vi_sensor_clk";
88 };
89
90 dap1 {
91 nvidia,pins = "dap1";
92 nvidia,function = "dap1";
93 };
94
95 dap2 {
96 nvidia,pins = "dap2";
97 nvidia,function = "dap2";
98 };
99
100 dap3 {
101 nvidia,pins = "dap3";
102 nvidia,function = "dap3";
103 };
104
105 dap4 {
106 nvidia,pins = "dap4";
107 nvidia,function = "dap4";
108 };
109
110 dta {
111 nvidia,pins = "dta", "dtb", "dtc", "dtd", "dte";
112 nvidia,function = "vi";
113 };
114
115 dtf {
116 nvidia,pins = "dtf";
117 nvidia,function = "i2c3";
118 };
119
120 gmc {
121 nvidia,pins = "gmc";
122 nvidia,function = "uartd";
123 };
124
125 gmd {
126 nvidia,pins = "gmd";
127 nvidia,function = "sflash";
128 };
129
130 gpu {
131 nvidia,pins = "gpu";
132 nvidia,function = "pwm";
133 };
134
135 gpu7 {
136 nvidia,pins = "gpu7";
137 nvidia,function = "rtck";
138 };
139
140 gpv {
141 nvidia,pins = "gpv", "slxa";
142 nvidia,function = "pcie";
143 };
144
145 hdint {
146 nvidia,pins = "hdint";
147 nvidia,function = "hdmi";
148 };
149
150 i2cp {
151 nvidia,pins = "i2cp";
152 nvidia,function = "i2cp";
153 };
154
155 irrx {
156 nvidia,pins = "irrx", "irtx";
157 nvidia,function = "uartb";
158 };
159
160 kbca {
161 nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
162 "kbce", "kbcf";
163 nvidia,function = "kbc";
164 };
165
166 lcsn {
167 nvidia,pins = "lcsn", "ldc", "lm0", "lpw1",
168 "lsdi", "lvp0";
169 nvidia,function = "rsvd4";
170 };
171
172 ld0 {
173 nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4",
174 "ld5", "ld6", "ld7", "ld8", "ld9",
175 "ld10", "ld11", "ld12", "ld13", "ld14",
176 "ld15", "ld16", "ld17", "ldi", "lhp0",
177 "lhp1", "lhp2", "lhs", "lpp", "lpw0",
178 "lpw2", "lsc0", "lsc1", "lsck", "lsda",
179 "lspi", "lvp1", "lvs";
180 nvidia,function = "displaya";
181 };
182
183 owc {
184 nvidia,pins = "owc", "spdi", "spdo", "uac";
185 nvidia,function = "rsvd2";
186 };
187
188 pmc {
189 nvidia,pins = "pmc";
190 nvidia,function = "pwr_on";
191 };
192
193 rm {
194 nvidia,pins = "rm";
195 nvidia,function = "i2c1";
196 };
197
198 sdb {
199 nvidia,pins = "sdb", "sdc", "sdd", "slxc", "slxk";
200 nvidia,function = "sdio3";
201 };
202
203 sdio1 {
204 nvidia,pins = "sdio1";
205 nvidia,function = "sdio1";
206 };
207
208 slxd {
209 nvidia,pins = "slxd";
210 nvidia,function = "spdif";
211 };
212
213 spid {
214 nvidia,pins = "spid", "spie", "spif";
215 nvidia,function = "spi1";
216 };
217
218 spig {
219 nvidia,pins = "spig", "spih";
220 nvidia,function = "spi2_alt";
221 };
222
223 uaa {
224 nvidia,pins = "uaa", "uab", "uda";
225 nvidia,function = "ulpi";
226 };
227
228 uad {
229 nvidia,pins = "uad";
230 nvidia,function = "irda";
231 };
232
233 uca {
234 nvidia,pins = "uca", "ucb";
235 nvidia,function = "uartc";
236 };
237
238 conf_ata {
239 nvidia,pins = "ata", "atb", "atc", "atd",
240 "cdev1", "cdev2", "dap1", "dap4",
241 "dte", "ddc", "dtf", "gma", "gmc",
242 "gme", "gpu", "gpu7", "gpv", "i2cp",
243 "irrx", "irtx", "pta", "rm", "sdc",
244 "sdd", "slxc", "slxd", "slxk", "spdi",
245 "spdo", "uac", "uad",
246 "uda", "csus";
247 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
248 nvidia,tristate = <TEGRA_PIN_DISABLE>;
249 };
250
251 conf_ate {
252 nvidia,pins = "ate", "dap2", "dap3", "gmb", "gmd",
253 "owc", "spia", "spib", "spic",
254 "spid", "spie", "spig", "slxa";
255 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
256 nvidia,tristate = <TEGRA_PIN_ENABLE>;
257 };
258
259 conf_ck32 {
260 nvidia,pins = "ck32", "ddrc", "pmca", "pmcb",
261 "pmcc", "pmcd", "pmce", "xm2c", "xm2d";
262 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
263 };
264
265 conf_crtp {
266 nvidia,pins = "crtp", "spih";
267 nvidia,pull = <TEGRA_PIN_PULL_UP>;
268 nvidia,tristate = <TEGRA_PIN_ENABLE>;
269 };
270
271 conf_dta {
272 nvidia,pins = "dta", "dtb", "dtc", "dtd";
273 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
274 nvidia,tristate = <TEGRA_PIN_DISABLE>;
275 };
276
277 conf_spif {
278 nvidia,pins = "spif";
279 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
280 nvidia,tristate = <TEGRA_PIN_ENABLE>;
281 };
282
283 conf_hdint {
284 nvidia,pins = "hdint", "lcsn", "ldc", "lm1",
285 "lpw1", "lsck", "lsda", "lsdi", "lvp0";
286 nvidia,tristate = <TEGRA_PIN_ENABLE>;
287 };
288
289 conf_kbca {
290 nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
291 "kbce", "kbcf", "sdio1", "uaa", "uab",
292 "uca", "ucb";
293 nvidia,pull = <TEGRA_PIN_PULL_UP>;
294 nvidia,tristate = <TEGRA_PIN_DISABLE>;
295 };
296
297 conf_lc {
298 nvidia,pins = "lc", "ls";
299 nvidia,pull = <TEGRA_PIN_PULL_UP>;
300 };
301
302 conf_ld0 {
303 nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4",
304 "ld5", "ld6", "ld7", "ld8", "ld9",
305 "ld10", "ld11", "ld12", "ld13", "ld14",
306 "ld15", "ld16", "ld17", "ldi", "lhp0",
307 "lhp1", "lhp2", "lhs", "lm0", "lpp",
308 "lpw0", "lpw2", "lsc0", "lsc1", "lspi",
309 "lvp1", "lvs", "pmc", "sdb";
310 nvidia,tristate = <TEGRA_PIN_DISABLE>;
311 };
312
313 conf_ld17_0 {
314 nvidia,pins = "ld17_0", "ld19_18", "ld21_20",
315 "ld23_22";
316 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
317 };
318
319 drive_sdio1 {
320 nvidia,pins = "drive_sdio1", "drive_ddc", "drive_vi1";
321 nvidia,high-speed-mode = <TEGRA_PIN_DISABLE>;
322 nvidia,schmitt = <TEGRA_PIN_ENABLE>;
323 nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
324 nvidia,pull-down-strength = <31>;
325 nvidia,pull-up-strength = <31>;
326 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
327 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
328 };
329
330 drive_csus {
331 nvidia,pins = "drive_csus";
332 nvidia,high-speed-mode = <TEGRA_PIN_DISABLE>;
333 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
334 nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
335 nvidia,pull-down-strength = <31>;
336 nvidia,pull-up-strength = <31>;
337 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
338 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
339 };
340 };
341
342 state_i2cmux_ddc: pinmux-i2cmux-ddc {
343 ddc {
344 nvidia,pins = "ddc";
345 nvidia,function = "i2c2";
346 };
347
348 pta {
349 nvidia,pins = "pta";
350 nvidia,function = "rsvd4";
351 };
352 };
353
354 state_i2cmux_idle: pinmux-i2cmux-idle {
355 ddc {
356 nvidia,pins = "ddc";
357 nvidia,function = "rsvd4";
358 };
359
360 pta {
361 nvidia,pins = "pta";
362 nvidia,function = "rsvd4";
363 };
364 };
365
366 state_i2cmux_pta: pinmux-i2cmux-pta {
367 ddc {
368 nvidia,pins = "ddc";
369 nvidia,function = "rsvd4";
370 };
371
372 pta {
373 nvidia,pins = "pta";
374 nvidia,function = "i2c2";
375 };
376 };
377 };
378
379 uartd: serial@70006300 {
380 status = "okay";
381 clock-frequency = <216000000>;
382 };
383
384 pwm: pwm@7000a000 {
385 status = "okay";
386 };
387
388 pwr_i2c: i2c@7000d000 {
389 status = "okay";
390 clock-frequency = <400000>;
391
392 pmic: tps6586x@34 {
393 compatible = "ti,tps6586x";
394 reg = <0x34>;
395 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
396
397 ti,system-power-controller;
398
399 #gpio-cells = <2>;
400 gpio-controller;
401
402 regulators {
403 avdd_usb: ldo3 {
404 regulator-name = "vdd_ldo3,avdd_usb*";
405 regulator-min-microvolt = <3300000>;
406 regulator-max-microvolt = <3300000>;
407 regulator-always-on;
408 regulator-boot-on;
409 };
410
411 vcore_emmc: ldo5 {
412 regulator-name = "vdd_ldo5,vcore_mmc";
413 regulator-min-microvolt = <2850000>;
414 regulator-max-microvolt = <2850000>;
415 };
416 };
417 };
418 };
419
420 /* USB via ASUS connector */
421 usb1: usb@c5000000 {
422 status = "okay";
423 dr_mode = "otg";
424 };
425
426 usb-phy@c5000000 {
427 status = "okay";
428 nvidia,xcvr-setup-use-fuses;
429 };
430
431 /* Dock's USB port */
432 usb3: usb@c5008000 {
433 status = "okay";
434 };
435
436 sdmmc3: sdhci@c8000400 {
437 status = "okay";
438 bus-width = <4>;
439
440 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
441 wp-gpios = <&gpio TEGRA_GPIO(H, 1) GPIO_ACTIVE_HIGH>;
442 power-gpios = <&gpio TEGRA_GPIO(I, 6) GPIO_ACTIVE_HIGH>;
443
444 vmmc-supply = <&vdd_3v3_sys>;
445 vqmmc-supply = <&vdd_3v3_sys>;
446 };
447
448 sdmmc4: sdhci@c8000600 {
449 status = "okay";
450 bus-width = <8>;
451 non-removable;
452
453 vmmc-supply = <&vcore_emmc>;
454 vqmmc-supply = <&vdd_3v3_sys>;
455 };
456
457 backlight: backlight {
458 compatible = "pwm-backlight";
459
460 enable-gpios = <&gpio TEGRA_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
461 power-supply = <&vdd_3v3_sys>;
462 pwms = <&pwm 2 4000000>;
463
464 brightness-levels = <1 35 70 105 140 175 210 255>;
465 default-brightness-level = <5>;
466 };
467
468 /* PMIC has a built-in 32KHz oscillator which is used by PMC */
469 clk32k_in: clock-32k-in {
470 compatible = "fixed-clock";
471 #clock-cells = <0>;
472 clock-frequency = <32768>;
473 clock-output-names = "pmic-oscillator";
474 };
475
476 gpio-keys {
477 compatible = "gpio-keys";
478
479 key-power {
480 label = "Power";
481 gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
482 linux,code = <KEY_ENTER>;
483 };
484
485 key-volume-down {
486 label = "Volume Down";
487 gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
488 linux,code = <KEY_DOWN>;
489 };
490
491 key-volume-up {
492 label = "Volume Up";
493 gpios = <&gpio TEGRA_GPIO(Q, 5) GPIO_ACTIVE_LOW>;
494 linux,code = <KEY_UP>;
495 };
496
497 switch-dock-hall-sensor {
498 label = "Lid sensor";
499 gpios = <&gpio TEGRA_GPIO(S, 4) GPIO_ACTIVE_LOW>;
500 linux,code = <SW_LID>;
501 };
502 };
503
504 panel: panel {
505 compatible = "simple-panel";
506
507 power-supply = <&vdd_pnl_reg>;
508 enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
509
510 backlight = <&backlight>;
511
512 display-timings {
513 timing@0 {
514 clock-frequency = <71200000>;
515
516 hactive = <1280>;
517 hfront-porch = <8>;
518 hback-porch = <18>;
519 hsync-len = <184>;
520
521 vactive = <800>;
522 vfront-porch = <4>;
523 vback-porch = <8>;
524 vsync-len = <3>;
525 };
526 };
527 };
528
529 vdd_3v3_sys: regulator-3v3 {
530 compatible = "regulator-fixed";
531 regulator-name = "vdd_3v3_vs";
532 regulator-min-microvolt = <3300000>;
533 regulator-max-microvolt = <3300000>;
534 regulator-always-on;
535 };
536
537 vdd_pnl_reg: regulator-pnl {
538 compatible = "regulator-fixed";
539 regulator-name = "vdd_panel";
540 regulator-min-microvolt = <2800000>;
541 regulator-max-microvolt = <2800000>;
542 gpio = <&gpio TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>;
543 enable-active-high;
544 };
545};