Merge tag 'drm-intel-next-2021-01-04' of git://anongit.freedesktop.org/drm/drm-intel...
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / qcom / sc7180-trogdor.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Google Trogdor device tree source (common between revisions)
4  *
5  * Copyright 2019 Google LLC.
6  */
7
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
11
12 /* PMICs depend on spmi_bus label and so must come after SoC */
13 #include "pm6150.dtsi"
14 #include "pm6150l.dtsi"
15
16 / {
17         thermal-zones {
18                 charger-thermal {
19                         polling-delay-passive = <0>;
20                         polling-delay = <0>;
21
22                         thermal-sensors = <&pm6150_adc_tm 1>;
23
24                         trips {
25                                 temperature = <125000>;
26                                 hysteresis = <1000>;
27                                 type = "critical";
28                         };
29                 };
30         };
31 };
32
33 /*
34  * Reserved memory changes
35  *
36  * Delete all unused memory nodes and define the peripheral memory regions
37  * required by the board dts.
38  */
39
40 /delete-node/ &hyp_mem;
41 /delete-node/ &xbl_mem;
42 /delete-node/ &aop_mem;
43 /delete-node/ &sec_apps_mem;
44 /delete-node/ &tz_mem;
45
46 /* Increase the size from 2MB to 8MB */
47 &rmtfs_mem {
48         reg = <0x0 0x84400000 0x0 0x800000>;
49 };
50
51 / {
52         reserved-memory {
53                 atf_mem: memory@80b00000 {
54                         reg = <0x0 0x80b00000 0x0 0x100000>;
55                         no-map;
56                 };
57
58                 mpss_mem: memory@86000000 {
59                         reg = <0x0 0x86000000 0x0 0x2000000>;
60                         no-map;
61                 };
62
63                 camera_mem: memory@8ec00000 {
64                         reg = <0x0 0x8ec00000 0x0 0x500000>;
65                         no-map;
66                 };
67
68                 venus_mem: memory@8f600000 {
69                         reg = <0 0x8f600000 0 0x500000>;
70                         no-map;
71                 };
72
73                 wlan_mem: memory@94100000 {
74                         reg = <0x0 0x94100000 0x0 0x200000>;
75                         no-map;
76                 };
77
78                 mba_mem: memory@94400000 {
79                         reg = <0x0 0x94400000 0x0 0x200000>;
80                         no-map;
81                 };
82         };
83
84         aliases {
85                 bluetooth0 = &bluetooth;
86                 hsuart0 = &uart3;
87                 serial0 = &uart8;
88                 wifi0 = &wifi;
89         };
90
91         chosen {
92                 stdout-path = "serial0:115200n8";
93         };
94
95         /* FIXED REGULATORS - parents above children */
96
97         /* This is the top level supply and variable voltage */
98         ppvar_sys: ppvar-sys-regulator {
99                 compatible = "regulator-fixed";
100                 regulator-name = "ppvar_sys";
101                 regulator-always-on;
102                 regulator-boot-on;
103         };
104
105         /* This divides ppvar_sys by 2, so voltage is variable */
106         src_vph_pwr: src-vph-pwr-regulator {
107                 compatible = "regulator-fixed";
108                 regulator-name = "src_vph_pwr";
109
110                 /* EC turns on with switchcap_on; always on for AP */
111                 regulator-always-on;
112                 regulator-boot-on;
113
114                 vin-supply = <&ppvar_sys>;
115         };
116
117         pp5000_a: pp5000-a-regulator {
118                 compatible = "regulator-fixed";
119                 regulator-name = "pp5000_a";
120
121                 /* EC turns on with en_pp5000_a; always on for AP */
122                 regulator-always-on;
123                 regulator-boot-on;
124                 regulator-min-microvolt = <5000000>;
125                 regulator-max-microvolt = <5000000>;
126
127                 vin-supply = <&ppvar_sys>;
128         };
129
130         pp3300_a: pp3300-a-regulator {
131                 compatible = "regulator-fixed";
132                 regulator-name = "pp3300_a";
133
134                 /* EC turns on with en_pp3300_a; always on for AP */
135                 regulator-always-on;
136                 regulator-boot-on;
137                 regulator-min-microvolt = <3300000>;
138                 regulator-max-microvolt = <3300000>;
139
140                 /*
141                  * Actually should be pp3300 but that's practically an alias for
142                  * pp3300_a so we use pp3300's vin-supply here to avoid one more
143                  * node.
144                  */
145                 vin-supply = <&ppvar_sys>;
146         };
147
148         pp3300_audio:
149         pp3300_codec: pp3300-codec-regulator {
150                 compatible = "regulator-fixed";
151                 regulator-name = "pp3300_codec";
152
153                 regulator-min-microvolt = <3300000>;
154                 regulator-max-microvolt = <3300000>;
155
156                 gpio = <&tlmm 83 GPIO_ACTIVE_HIGH>;
157                 enable-active-high;
158                 pinctrl-names = "default";
159                 pinctrl-0 = <&en_pp3300_codec>;
160
161                 vin-supply = <&pp3300_a>;
162         };
163
164         pp3300_dx_edp:
165         pp3300_ts: pp3300-dx-edp-regulator {
166                 compatible = "regulator-fixed";
167                 regulator-name = "pp3300_dx_edp";
168
169                 regulator-min-microvolt = <3300000>;
170                 regulator-max-microvolt = <3300000>;
171
172                 gpio = <&tlmm 30 GPIO_ACTIVE_HIGH>;
173                 enable-active-high;
174                 pinctrl-names = "default";
175                 pinctrl-0 = <&en_pp3300_dx_edp>;
176
177                 vin-supply = <&pp3300_a>;
178         };
179
180         pp3300_fp_tp: pp3300-fp-tp-regulator {
181                 compatible = "regulator-fixed";
182                 regulator-name = "pp3300_fp_tp";
183
184                 regulator-min-microvolt = <3300000>;
185                 regulator-max-microvolt = <3300000>;
186
187                 /* AP turns on with PP1800_VIO_OUT; always on for AP */
188                 regulator-always-on;
189                 regulator-boot-on;
190
191                 vin-supply = <&pp3300_a>;
192         };
193
194         pp3300_hub: pp3300-hub {
195                 compatible = "regulator-fixed";
196                 regulator-name = "pp3300_hub";
197
198                 regulator-min-microvolt = <3300000>;
199                 regulator-max-microvolt = <3300000>;
200
201                 gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>;
202                 enable-active-high;
203                 pinctrl-names = "default";
204                 pinctrl-0 = <&en_pp3300_hub>;
205
206                 regulator-always-on;
207                 regulator-boot-on;
208
209                 vin-supply = <&pp3300_a>;
210         };
211
212         /* BOARD-SPECIFIC TOP LEVEL NODES */
213
214         backlight: backlight {
215                 compatible = "pwm-backlight";
216
217                 /* The panels don't seem to like anything below ~ 5% */
218                 brightness-levels = <
219                         196 256 324 400 484 576 676 784 900 1024 1156 1296
220                         1444 1600 1764 1936 2116 2304 2500 2704 2916 3136
221                         3364 3600 3844 4096
222                 >;
223                 num-interpolated-steps = <64>;
224                 default-brightness-level = <951>;
225
226                 pwms = <&cros_ec_pwm 1>;
227                 enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
228                 power-supply = <&ppvar_sys>;
229                 pinctrl-names = "default";
230                 pinctrl-0 = <&ap_edp_bklten>;
231         };
232
233         gpio_keys: gpio-keys {
234                 compatible = "gpio-keys";
235                 status = "disabled";
236                 pinctrl-names = "default";
237                 pinctrl-0 = <&pen_pdct_l>;
238
239                 pen_insert: pen-insert {
240                         label = "Pen Insert";
241
242                         /* Insert = low, eject = high */
243                         gpios = <&tlmm 52 GPIO_ACTIVE_LOW>;
244                         linux,code = <SW_PEN_INSERTED>;
245                         linux,input-type = <EV_SW>;
246                         wakeup-source;
247                 };
248         };
249
250         max98357a: audio-codec-0 {
251                 compatible = "maxim,max98357a";
252                 pinctrl-names = "default";
253                 pinctrl-0 = <&amp_en>;
254                 sdmode-gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
255                 #sound-dai-cells = <0>;
256         };
257
258         pwmleds {
259                 compatible = "pwm-leds";
260                 keyboard_backlight: keyboard-backlight {
261                         status = "disabled";
262                         label = "cros_ec::kbd_backlight";
263                         pwms = <&cros_ec_pwm 0>;
264                         max-brightness = <1023>;
265                 };
266         };
267 };
268
269 &qfprom {
270         vcc-supply = <&pp1800_l11a>;
271 };
272
273 &qspi {
274         status = "okay";
275         pinctrl-names = "default";
276         pinctrl-0 = <&qspi_clk>, <&qspi_cs0>, <&qspi_data01>;
277
278         flash@0 {
279                 compatible = "jedec,spi-nor";
280                 reg = <0>;
281
282                 /* TODO: Increase frequency after testing */
283                 spi-max-frequency = <25000000>;
284                 spi-tx-bus-width = <2>;
285                 spi-rx-bus-width = <2>;
286         };
287 };
288
289 &apps_rsc {
290         pm6150-rpmh-regulators {
291                 compatible = "qcom,pm6150-rpmh-regulators";
292                 qcom,pmic-id = "a";
293
294                 vddpx_1:
295                 vdd2:
296                 pp1125_s1a: smps1 {
297                         regulator-min-microvolt = <1128000>;
298                         regulator-max-microvolt = <1128000>;
299                 };
300
301                 /*
302                  * pp2040_s5a (smps5) and pp1056_s4a (smps4) are just
303                  * inputs to other rails on AOP-managed PMICs on trogdor.
304                  * The system is already configured to manage these rails
305                  * automatically (enable when needed, adjust voltage for
306                  * headroom) so we won't specify anything here.
307                  *
308                  * NOTE: though the rails have a voltage implied by their
309                  * name, the automatic headroom calculation might not result
310                  * in them being that voltage.  ...and that's OK.
311                  * Specifically the only point of these rails is to provide
312                  * an input source for other rails and if we can satisify the
313                  * needs of those other rails with a lower source voltage then
314                  * we save power.
315                  */
316
317                 pp1200_l1a: ldo1 {
318                         regulator-min-microvolt = <1200000>;
319                         regulator-max-microvolt = <1200000>;
320                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
321                 };
322
323                 pp1000_l2a: ldo2 {
324                         regulator-min-microvolt = <944000>;
325                         regulator-max-microvolt = <1056000>;
326                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
327                 };
328
329                 pp1000_l3a: ldo3 {
330                         regulator-min-microvolt = <968000>;
331                         regulator-max-microvolt = <1064000>;
332                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
333                 };
334
335                 vdd_qlink_lv:
336                 vdd_qlink_lv_ck:
337                 vdd_qusb_hs0_core:
338                 vdd_ufs1_core:
339                 vdda_mipi_csi0_0p9:
340                 vdda_mipi_csi1_0p9:
341                 vdda_mipi_csi2_0p9:
342                 vdda_mipi_csi3_0p9:
343                 vdda_mipi_dsi0_pll:
344                 vdda_pll_cc_ebi01:
345                 vdda_qrefs_0p9:
346                 vdda_usb_ss_dp_core:
347                 pp900_l4a: ldo4 {
348                         regulator-min-microvolt = <824000>;
349                         regulator-max-microvolt = <928000>;
350                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
351                 };
352
353                 pp2700_l5a: ldo5 {
354                         regulator-min-microvolt = <2704000>;
355                         regulator-max-microvolt = <2704000>;
356                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
357                 };
358
359                 ebi0_cal:
360                 ebi1_cal:
361                 vddio_ck_ebi0:
362                 vddio_ck_ebi1:
363                 vddio_ebi0:
364                 vddq:
365                 pp600_l6a: ldo6 {
366                         regulator-min-microvolt = <568000>;
367                         regulator-max-microvolt = <648000>;
368                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
369                 };
370
371                 vdd_cx_wlan:
372                 pp800_l9a: ldo9 {
373                         regulator-min-microvolt = <488000>;
374                         regulator-max-microvolt = <800000>;
375                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
376                 };
377
378                 vdd1:
379                 vddpx_3:
380                 vddpx_7:
381                 vio_in:
382                 pp1800_l10a: ldo10 {
383                         regulator-min-microvolt = <1800000>;
384                         regulator-max-microvolt = <1800000>;
385                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
386                 };
387
388                 vdd_qfprom:
389                 vdda_apc1_cs_1p8:
390                 vdda_qrefs_1p8:
391                 vdda_qusb_hs0_1p8:
392                 vddpx_11:
393                 vreg_bb_clk:
394                 pp1800_l11a: ldo11 {
395                         regulator-min-microvolt = <1800000>;
396                         regulator-max-microvolt = <1800000>;
397                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
398                 };
399
400                 mcp_vccq:
401                 pp1800_l12a_r: ldo12 {
402                         regulator-min-microvolt = <1800000>;
403                         regulator-max-microvolt = <1800000>;
404                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
405                 };
406
407                 pp1800_l13a: ldo13 {
408                         regulator-min-microvolt = <1800000>;
409                         regulator-max-microvolt = <1800000>;
410                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
411                 };
412
413                 pp1800_prox:
414                 pp1800_l14a: ldo14 {
415                         regulator-min-microvolt = <1800000>;
416                         regulator-max-microvolt = <1800000>;
417                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
418                 };
419
420                 pp1800_alc5682:
421                 pp1800_l15a: ldo15 {
422                         regulator-min-microvolt = <1800000>;
423                         regulator-max-microvolt = <1800000>;
424                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
425                 };
426
427                 pp2700_l16a: ldo16 {
428                         regulator-min-microvolt = <2496000>;
429                         regulator-max-microvolt = <3304000>;
430                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
431                 };
432
433                 vdda_qusb_hs0_3p1:
434                 vdd_pdphy:
435                 pp3100_l17a: ldo17 {
436                         regulator-min-microvolt = <2920000>;
437                         regulator-max-microvolt = <3232000>;
438                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
439                 };
440
441                 pp1800_pen:
442                 pp1800_l18a: ldo18 {
443                         regulator-min-microvolt = <1800000>;
444                         regulator-max-microvolt = <1800000>;
445                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
446                 };
447
448                 mcp_vcc:
449                 pp2850_l19a: ldo19 {
450                         regulator-min-microvolt = <2960000>;
451                         regulator-max-microvolt = <2960000>;
452                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
453                 };
454         };
455
456         pm6150l-rpmh-regulators {
457                 compatible = "qcom,pm6150l-rpmh-regulators";
458                 qcom,pmic-id = "c";
459
460                 pp1300_s8c: smps8 {
461                         regulator-min-microvolt = <1120000>;
462                         regulator-max-microvolt = <1408000>;
463                 };
464
465                 pp1800_l1c: ldo1 {
466                         regulator-min-microvolt = <1800000>;
467                         regulator-max-microvolt = <1800000>;
468                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
469                 };
470
471                 vdd_wcss_adc_dac:
472                 pp1300_l2c: ldo2 {
473                         regulator-min-microvolt = <1168000>;
474                         regulator-max-microvolt = <1304000>;
475                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
476                 };
477
478                 pp1200_brij:
479                 vdd_ufs1_1p2:
480                 vdda_csi0_1p25:
481                 vdda_csi1_1p25:
482                 vdda_csi2_1p25:
483                 vdda_csi3_1p25:
484                 vdda_hv_ebi0:
485                 vdda_mipi_dsi0_1p2:
486                 vdda_usb_ss_dp_1p2:
487                 vddpx_10:
488                 pp1200_l3c: ldo3 {
489                         regulator-min-microvolt = <1200000>;
490                         regulator-max-microvolt = <1200000>;
491                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
492                 };
493
494                 ld_pp1800_esim_l4c:
495                 vddpx_5:
496                 pp1800_l4c: ldo4 {
497                         regulator-min-microvolt = <1648000>;
498                         regulator-max-microvolt = <3304000>;
499                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
500                 };
501
502                 vddpx_6:
503                 pp1800_l5c: ldo5 {
504                         regulator-min-microvolt = <1800000>;
505                         regulator-max-microvolt = <1800000>;
506                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
507                 };
508
509                 vddpx_2:
510                 ppvar_l6c: ldo6 {
511                         regulator-min-microvolt = <1800000>;
512                         regulator-max-microvolt = <3304000>;
513                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
514                 };
515
516                 pp3300_l7c: ldo7 {
517                         regulator-min-microvolt = <3304000>;
518                         regulator-max-microvolt = <3304000>;
519                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
520                 };
521
522                 pp1800_brij_vccio:
523                 pp1800_edp_vpll:
524                 pp1800_l8c: ldo8 {
525                         regulator-min-microvolt = <1800000>;
526                         regulator-max-microvolt = <1800000>;
527                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
528                 };
529
530                 pp2950_l9c: ldo9 {
531                         regulator-min-microvolt = <2952000>;
532                         regulator-max-microvolt = <2952000>;
533                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
534                 };
535
536                 pp3300_l10c: ldo10 {
537                         regulator-min-microvolt = <3000000>;
538                         regulator-max-microvolt = <3400000>;
539                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
540                 };
541
542                 pp3300_l11c: ldo11 {
543                         regulator-min-microvolt = <3000000>;
544                         regulator-max-microvolt = <3400000>;
545                         regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
546                 };
547
548                 src_vreg_bob: bob {
549                         regulator-min-microvolt = <3008000>;
550                         regulator-max-microvolt = <3960000>;
551                         regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
552                 };
553         };
554 };
555
556 &ap_ec_spi {
557         status = "okay";
558         cros_ec: ec@0 {
559                 compatible = "google,cros-ec-spi";
560                 reg = <0>;
561                 interrupt-parent = <&tlmm>;
562                 interrupts = <94 IRQ_TYPE_LEVEL_LOW>;
563                 pinctrl-names = "default";
564                 pinctrl-0 = <&ap_ec_int_l>;
565                 spi-max-frequency = <3000000>;
566
567                 cros_ec_pwm: ec-pwm {
568                         compatible = "google,cros-ec-pwm";
569                         #pwm-cells = <1>;
570                 };
571
572                 i2c_tunnel: i2c-tunnel {
573                         compatible = "google,cros-ec-i2c-tunnel";
574                         google,remote-bus = <0>;
575                         #address-cells = <1>;
576                         #size-cells = <0>;
577                 };
578
579                 pdupdate {
580                         compatible = "google,cros-ec-pd-update";
581                 };
582
583                 typec {
584                         compatible = "google,cros-ec-typec";
585                         #address-cells = <1>;
586                         #size-cells = <0>;
587
588                         usb_c0: connector@0 {
589                                 compatible = "usb-c-connector";
590                                 reg = <0>;
591                                 label = "left";
592                                 power-role = "dual";
593                                 data-role = "host";
594                                 try-power-role = "source";
595                         };
596
597                         usb_c1: connector@1 {
598                                 compatible = "usb-c-connector";
599                                 reg = <1>;
600                                 label = "right";
601                                 power-role = "dual";
602                                 data-role = "host";
603                                 try-power-role = "source";
604                         };
605                 };
606         };
607 };
608
609 &ap_h1_spi {
610         status = "okay";
611         cr50: tpm@0 {
612                 compatible = "google,cr50";
613                 reg = <0>;
614                 pinctrl-names = "default";
615                 pinctrl-0 = <&h1_ap_int_odl>;
616                 spi-max-frequency = <800000>;
617                 interrupt-parent = <&tlmm>;
618                 interrupts = <42 IRQ_TYPE_EDGE_RISING>;
619         };
620 };
621
622 &dsi0 {
623         status = "okay";
624         vdda-supply = <&vdda_mipi_dsi0_1p2>;
625
626         ports {
627                 port@1 {
628                         endpoint {
629                                 remote-endpoint = <&sn65dsi86_in>;
630                                 data-lanes = <0 1 2 3>;
631                         };
632                 };
633         };
634 };
635
636 &dsi_phy {
637         status = "okay";
638         vdds-supply = <&vdda_mipi_dsi0_pll>;
639 };
640
641 edp_brij_i2c: &i2c2 {
642         status = "okay";
643         clock-frequency = <400000>;
644
645         sn65dsi86_bridge: bridge@2d {
646                 compatible = "ti,sn65dsi86";
647                 reg = <0x2d>;
648                 pinctrl-names = "default";
649                 pinctrl-0 = <&edp_brij_en>, <&edp_brij_irq>;
650                 gpio-controller;
651                 #gpio-cells = <2>;
652
653                 interrupt-parent = <&tlmm>;
654                 interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
655
656                 enable-gpios = <&tlmm 104 GPIO_ACTIVE_HIGH>;
657
658                 vpll-supply = <&pp1800_edp_vpll>;
659                 vccio-supply = <&pp1800_brij_vccio>;
660                 vcca-supply = <&pp1200_brij>;
661                 vcc-supply = <&pp1200_brij>;
662
663                 clocks = <&rpmhcc RPMH_LN_BB_CLK3>;
664                 clock-names = "refclk";
665
666                 ports {
667                         #address-cells = <1>;
668                         #size-cells = <0>;
669
670                         port@0 {
671                                 reg = <0>;
672                                 sn65dsi86_in: endpoint {
673                                         remote-endpoint = <&dsi0_out>;
674                                 };
675                         };
676
677                         port@1 {
678                                 reg = <1>;
679                                 sn65dsi86_out: endpoint {
680                                         data-lanes = <0 1>;
681                                         remote-endpoint = <&panel_in_edp>;
682                                 };
683                         };
684                 };
685         };
686 };
687
688 ap_sar_sensor_i2c: &i2c5 {
689         clock-frequency = <400000>;
690
691         ap_sar_sensor: proximity@28 {
692                 compatible = "semtech,sx9310";
693                 reg = <0x28>;
694                 #io-channel-cells = <1>;
695                 pinctrl-names = "default";
696                 pinctrl-0 = <&p_sensor_int_l>;
697
698                 interrupt-parent = <&tlmm>;
699                 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
700
701                 vdd-supply = <&pp3300_a>;
702                 svdd-supply = <&pp1800_prox>;
703
704                 status = "disabled";
705                 label = "proximity-wifi";
706         };
707 };
708
709 ap_tp_i2c: &i2c7 {
710         status = "okay";
711         clock-frequency = <400000>;
712
713         trackpad@15 {
714                 compatible = "elan,ekth3000";
715                 reg = <0x15>;
716                 pinctrl-names = "default";
717                 pinctrl-0 = <&trackpad_int_1v8_odl>;
718
719                 interrupt-parent = <&tlmm>;
720                 interrupts = <58 IRQ_TYPE_EDGE_FALLING>;
721
722                 vcc-supply = <&pp3300_fp_tp>;
723
724                 wakeup-source;
725         };
726 };
727
728 hp_i2c: &i2c9 {
729         status = "okay";
730         clock-frequency = <400000>;
731
732         alc5682: codec@1a {
733                 compatible = "realtek,rt5682i";
734                 reg = <0x1a>;
735                 pinctrl-names = "default";
736                 pinctrl-0 = <&hp_irq>;
737
738                 #sound-dai-cells = <1>;
739
740                 interrupt-parent = <&tlmm>;
741                 /*
742                  * This will get ignored because the interrupt type
743                  * is set in rt5682.c.
744                  */
745                 interrupts = <28 IRQ_TYPE_EDGE_BOTH>;
746
747                 AVDD-supply = <&pp1800_alc5682>;
748                 MICVDD-supply = <&pp3300_codec>;
749                 VBAT-supply = <&pp3300_audio>;
750
751                 realtek,dmic1-data-pin = <1>;
752                 realtek,dmic1-clk-pin = <1>;
753                 realtek,jd-src = <1>;
754         };
755 };
756
757 &ipa {
758         status = "okay";
759
760         /*
761          * Trogdor doesn't have QHEE (Qualcomm's EL2 blob), so the
762          * modem needs to cover certain init steps (GSI init), and
763          * the AP needs to wait for it.
764          */
765         modem-init;
766 };
767
768 &mdp {
769         status = "okay";
770 };
771
772 &mdss {
773         status = "okay";
774 };
775
776 &pm6150_adc {
777         charger-thermistor@4f {
778                 reg = <ADC5_AMUX_THM3_100K_PU>;
779                 qcom,ratiometric;
780                 qcom,hw-settle-time = <200>;
781         };
782 };
783
784 &pm6150_adc_tm {
785         status = "okay";
786
787         charger-thermistor@1 {
788                 reg = <1>;
789                 io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>;
790                 qcom,ratiometric;
791                 qcom,hw-settle-time-us = <200>;
792         };
793 };
794
795 &pm6150_pwrkey {
796         status = "disabled";
797 };
798
799 &qupv3_id_0 {
800         status = "okay";
801 };
802
803 &qupv3_id_1 {
804         status = "okay";
805 };
806
807 &remoteproc_mpss {
808         status = "okay";
809         compatible = "qcom,sc7180-mss-pil";
810         iommus = <&apps_smmu 0x461 0x0>, <&apps_smmu 0x444 0x3>;
811         memory-region = <&mba_mem &mpss_mem>;
812
813         /* This gets overridden for SKUs with LTE support. */
814         firmware-name = "qcom/sc7180-trogdor/modem-nolte/mba.mbn",
815                         "qcom/sc7180-trogdor/modem-nolte/qdsp6sw.mbn";
816 };
817
818 &sdhc_1 {
819         status = "okay";
820
821         pinctrl-names = "default", "sleep";
822         pinctrl-0 = <&sdc1_on>;
823         pinctrl-1 = <&sdc1_off>;
824         vmmc-supply = <&mcp_vcc>;
825         vqmmc-supply = <&mcp_vccq>;
826 };
827
828 &sdhc_2 {
829         pinctrl-names = "default", "sleep";
830         pinctrl-0 = <&sdc2_on>;
831         pinctrl-1 = <&sdc2_off>;
832         vmmc-supply = <&pp2950_l9c>;
833         vqmmc-supply = <&ppvar_l6c>;
834
835         cd-gpios = <&tlmm 69 GPIO_ACTIVE_LOW>;
836 };
837
838 &spi0 {
839         pinctrl-0 = <&qup_spi0_cs_gpio>;
840         cs-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
841 };
842
843 &spi6 {
844         pinctrl-0 = <&qup_spi6_cs_gpio>;
845         cs-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
846 };
847
848 ap_spi_fp: &spi10 {
849         pinctrl-0 = <&qup_spi10_cs_gpio>;
850         cs-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
851
852         cros_ec_fp: ec@0 {
853                 compatible = "google,cros-ec-spi";
854                 reg = <0>;
855                 interrupt-parent = <&tlmm>;
856                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
857                 pinctrl-names = "default";
858                 pinctrl-0 = <&fp_to_ap_irq_l>, <&fp_rst_l>, <&fpmcu_boot0>, <&fpmcu_sel>;
859                 spi-max-frequency = <3000000>;
860         };
861 };
862
863 #include <arm/cros-ec-keyboard.dtsi>
864 #include <arm/cros-ec-sbs.dtsi>
865
866 &uart3 {
867         status = "okay";
868
869         /delete-property/interrupts;
870         interrupts-extended = <&intc GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
871                                 <&tlmm 41 IRQ_TYPE_EDGE_FALLING>;
872
873         pinctrl-names = "default", "sleep";
874         pinctrl-1 = <&qup_uart3_sleep>;
875
876         bluetooth: bluetooth {
877                 compatible = "qcom,wcn3991-bt";
878                 vddio-supply = <&pp1800_l10a>;
879                 vddxo-supply = <&pp1800_l1c>;
880                 vddrf-supply = <&pp1300_l2c>;
881                 vddch0-supply = <&pp3300_l10c>;
882                 max-speed = <3200000>;
883                 clocks = <&rpmhcc RPMH_RF_CLK2>;
884         };
885 };
886
887 &uart8 {
888         status = "okay";
889 };
890
891 &usb_1 {
892         status = "okay";
893 };
894
895 &usb_1_dwc3 {
896         dr_mode = "host";
897 };
898
899 &usb_1_hsphy {
900         status = "okay";
901         vdd-supply = <&vdd_qusb_hs0_core>;
902         vdda-pll-supply = <&vdda_qusb_hs0_1p8>;
903         vdda-phy-dpdm-supply = <&vdda_qusb_hs0_3p1>;
904         qcom,imp-res-offset-value = <8>;
905         qcom,preemphasis-level = <QUSB2_V2_PREEMPHASIS_15_PERCENT>;
906         qcom,preemphasis-width = <QUSB2_V2_PREEMPHASIS_WIDTH_HALF_BIT>;
907         qcom,bias-ctrl-value = <0x22>;
908         qcom,charge-ctrl-value = <3>;
909         qcom,hsdisc-trim-value = <0>;
910 };
911
912 &usb_1_qmpphy {
913         status = "okay";
914         vdda-phy-supply = <&vdda_usb_ss_dp_1p2>;
915         vdda-pll-supply = <&vdda_usb_ss_dp_core>;
916 };
917
918 &venus {
919         video-firmware {
920                 iommus = <&apps_smmu 0x0c42 0x0>;
921         };
922 };
923
924 &wifi {
925         status = "okay";
926         vdd-0.8-cx-mx-supply = <&vdd_cx_wlan>;
927         vdd-1.8-xo-supply = <&pp1800_l1c>;
928         vdd-1.3-rfa-supply = <&pp1300_l2c>;
929         vdd-3.3-ch0-supply = <&pp3300_l10c>;
930         vdd-3.3-ch1-supply = <&pp3300_l11c>;
931
932         wifi-firmware {
933                 iommus = <&apps_smmu 0xc2 0x1>;
934         };
935 };
936
937 /* PINCTRL - additions to nodes defined in sc7180.dtsi */
938
939 &qspi_cs0 {
940         pinconf {
941                 pins = "gpio68";
942                 bias-disable;
943         };
944 };
945
946 &qspi_clk {
947         pinconf {
948                 pins = "gpio63";
949                 bias-disable;
950         };
951 };
952
953 &qspi_data01 {
954         pinconf {
955                 pins = "gpio64", "gpio65";
956
957                 /* High-Z when no transfers; nice to park the lines */
958                 bias-pull-up;
959         };
960 };
961
962 &qup_i2c2_default {
963         pinconf {
964                 pins = "gpio15", "gpio16";
965                 drive-strength = <2>;
966
967                 /* Has external pullup */
968                 bias-disable;
969         };
970 };
971
972 &qup_i2c4_default {
973         pinconf {
974                 pins = "gpio115", "gpio116";
975                 drive-strength = <2>;
976
977                 /* Has external pullup */
978                 bias-disable;
979         };
980 };
981
982 &qup_i2c5_default {
983         pinconf {
984                 pins = "gpio25", "gpio26";
985                 drive-strength = <2>;
986
987                 /* Has external pullup */
988                 bias-disable;
989         };
990 };
991
992 &qup_i2c7_default {
993         pinconf {
994                 pins = "gpio6", "gpio7";
995                 drive-strength = <2>;
996
997                 /* Has external pullup */
998                 bias-disable;
999         };
1000 };
1001
1002 &qup_i2c9_default {
1003         pinconf {
1004                 pins = "gpio46", "gpio47";
1005                 drive-strength = <2>;
1006
1007                 /* Has external pullup */
1008                 bias-disable;
1009         };
1010 };
1011
1012 &qup_spi0_cs_gpio {
1013         pinconf {
1014                 pins = "gpio34", "gpio35", "gpio36", "gpio37";
1015                 drive-strength = <2>;
1016                 bias-disable;
1017         };
1018 };
1019
1020 &qup_spi6_cs_gpio {
1021         pinconf {
1022                 pins = "gpio59", "gpio60", "gpio61", "gpio62";
1023                 drive-strength = <2>;
1024                 bias-disable;
1025         };
1026 };
1027
1028 &qup_spi10_cs_gpio {
1029         pinconf {
1030                 pins = "gpio86", "gpio87", "gpio88", "gpio89";
1031                 drive-strength = <2>;
1032                 bias-disable;
1033         };
1034 };
1035
1036 &qup_uart3_default {
1037         pinconf-cts {
1038                 /*
1039                  * Configure a pull-down on CTS to match the pull of
1040                  * the Bluetooth module.
1041                  */
1042                 pins = "gpio38";
1043                 bias-pull-down;
1044         };
1045
1046         pinconf-rts-tx {
1047                 /* We'll drive RTS and TX, so no pull */
1048                 pins = "gpio39", "gpio40";
1049                 drive-strength = <2>;
1050                 bias-disable;
1051         };
1052
1053         pinconf-rx {
1054                 /*
1055                  * Configure a pull-up on RX. This is needed to avoid
1056                  * garbage data when the TX pin of the Bluetooth module is
1057                  * in tri-state (module powered off or not driving the
1058                  * signal yet).
1059                  */
1060                 pins = "gpio41";
1061                 bias-pull-up;
1062         };
1063 };
1064
1065 &qup_uart8_default {
1066         pinconf-tx {
1067                 pins = "gpio44";
1068                 drive-strength = <2>;
1069                 bias-disable;
1070         };
1071
1072         pinconf-rx {
1073                 pins = "gpio45";
1074                 drive-strength = <2>;
1075                 bias-pull-up;
1076         };
1077 };
1078
1079 /* PINCTRL - board-specific pinctrl */
1080
1081 &pm6150_gpio {
1082         status = "disabled"; /* No GPIOs are connected */
1083 };
1084
1085 &pm6150l_gpio {
1086         gpio-line-names = "AP_SUSPEND",
1087                           "",
1088                           "",
1089                           "",
1090                           "",
1091                           "",
1092                           "",
1093                           "",
1094                           "",
1095                           "",
1096                           "",
1097                           "";
1098 };
1099
1100 &tlmm {
1101         /*
1102          * pinctrl settings for pins that have no real owners.
1103          */
1104         pinctrl-names = "default";
1105         pinctrl-0 = <&bios_flash_wp_l>, <&ap_suspend_l_neuter>;
1106
1107         amp_en: amp-en {
1108                 pinmux {
1109                         pins = "gpio23";
1110                         function = "gpio";
1111                 };
1112
1113                 pinconf {
1114                         pins = "gpio23";
1115                         bias-pull-down;
1116                 };
1117         };
1118
1119         ap_ec_int_l: ap-ec-int-l {
1120                 pinmux {
1121                         pins = "gpio94";
1122                         function = "gpio";
1123                         input-enable;
1124                 };
1125
1126                 pinconf {
1127                         pins = "gpio94";
1128                         bias-pull-up;
1129                 };
1130         };
1131
1132         ap_edp_bklten: ap-edp-bklten {
1133                 pinmux {
1134                         pins = "gpio12";
1135                         function = "gpio";
1136                 };
1137
1138                 pinconf {
1139                         pins = "gpio12";
1140                         drive-strength = <2>;
1141                         bias-disable;
1142
1143                         /* Force backlight to be disabled to match state at boot. */
1144                         output-low;
1145                 };
1146         };
1147
1148         ap_suspend_l_neuter: ap-suspend-l-neuter {
1149                 pinmux  {
1150                         pins = "gpio27";
1151                         function = "gpio";
1152                 };
1153
1154                 pinconf {
1155                         pins = "gpio27";
1156                         bias-disable;
1157                 };
1158         };
1159
1160         bios_flash_wp_l: bios-flash-wp-l {
1161                 pinmux {
1162                         pins = "gpio66";
1163                         function = "gpio";
1164                         input-enable;
1165                 };
1166
1167                 pinconf {
1168                         pins = "gpio66";
1169                         bias-disable;
1170                 };
1171         };
1172
1173         dp_hot_plug_det: dp-hot-plug-det {
1174                  pinmux {
1175                          pins = "gpio117";
1176                          function = "dp_hot";
1177                  };
1178
1179                  config {
1180                          pins = "gpio117";
1181                          bias-disable;
1182                          input-enable;
1183                          drive-strength = <2>;
1184                  };
1185          };
1186
1187         edp_brij_en: edp-brij-en {
1188                 pinmux {
1189                         pins = "gpio104";
1190                         function = "gpio";
1191                 };
1192
1193                 pinconf {
1194                         pins = "gpio104";
1195                         drive-strength = <2>;
1196                         bias-disable;
1197                 };
1198         };
1199
1200         edp_brij_irq: edp-brij-irq {
1201                 pinmux {
1202                         pins = "gpio11";
1203                         function = "gpio";
1204                 };
1205
1206                 pinconf {
1207                         pins = "gpio11";
1208                         drive-strength = <2>;
1209                         bias-pull-down;
1210                 };
1211         };
1212
1213         en_pp3300_codec: en-pp3300-codec {
1214                 pinmux {
1215                         pins = "gpio83";
1216                         function = "gpio";
1217                 };
1218
1219                 pinconf {
1220                         pins = "gpio83";
1221                         drive-strength = <2>;
1222                         bias-disable;
1223                 };
1224         };
1225
1226         en_pp3300_dx_edp: en-pp3300-dx-edp {
1227                 pinmux {
1228                         pins = "gpio30";
1229                         function = "gpio";
1230                 };
1231
1232                 pinconf {
1233                         pins = "gpio30";
1234                         drive-strength = <2>;
1235                         bias-disable;
1236                 };
1237         };
1238
1239         en_pp3300_hub: en-pp3300-hub {
1240                 pinmux {
1241                         pins = "gpio84";
1242                         function = "gpio";
1243                 };
1244
1245                 pinconf {
1246                         pins = "gpio84";
1247                         drive-strength = <2>;
1248                         bias-disable;
1249                 };
1250         };
1251
1252         fpmcu_boot0: fpmcu-boot0 {
1253                 pinmux {
1254                         pins = "gpio10";
1255                         function = "gpio";
1256                 };
1257
1258                 pinconf {
1259                         pins = "gpio10";
1260                         bias-disable;
1261                         drive-strength = <2>;
1262                         output-low;
1263                 };
1264         };
1265
1266         fpmcu_sel: fpmcu-sel {
1267                 pinmux {
1268                         pins = "gpio22";
1269                         function = "gpio";
1270                 };
1271
1272                 pinconf {
1273                         pins = "gpio22";
1274                         bias-disable;
1275                         drive-strength = <2>;
1276                         output-high;
1277                 };
1278         };
1279
1280         fp_rst_l: fp-rst-l {
1281                 pinmux {
1282                         pins = "gpio5";
1283                         function = "gpio";
1284                 };
1285
1286                 pinconf {
1287                         pins = "gpio5";
1288                         bias-disable;
1289                         drive-strength = <2>;
1290                         output-high;
1291                 };
1292         };
1293
1294         fp_to_ap_irq_l: fp-to-ap-irq-l {
1295                 pinmux {
1296                         pins = "gpio4";
1297                         function = "gpio";
1298                         input-enable;
1299                 };
1300
1301                 pinconf {
1302                         pins = "gpio4";
1303
1304                         /* Has external pullup */
1305                         bias-disable;
1306                 };
1307         };
1308
1309
1310         h1_ap_int_odl: h1-ap-int-odl {
1311                 pinmux {
1312                         pins = "gpio42";
1313                         function = "gpio";
1314                         input-enable;
1315                 };
1316
1317                 pinconf {
1318                         pins = "gpio42";
1319                         bias-pull-up;
1320                 };
1321         };
1322
1323         hp_irq: hp-irq {
1324                 pinmux {
1325                         pins = "gpio28";
1326                         function = "gpio";
1327                 };
1328
1329                 pinconf {
1330                         pins = "gpio28";
1331                         bias-pull-up;
1332                 };
1333         };
1334
1335         pen_irq_l: pen-irq-l {
1336                 pinmux {
1337                         pins = "gpio21";
1338                         function = "gpio";
1339                 };
1340
1341                 pinconf {
1342                         pins = "gpio21";
1343
1344                         /* Has external pullup */
1345                         bias-disable;
1346                 };
1347         };
1348
1349         pen_pdct_l: pen-pdct-l {
1350                 pinmux {
1351                         pins = "gpio52";
1352                         function = "gpio";
1353                 };
1354
1355                 pinconf {
1356                         pins = "gpio52";
1357
1358                         /* Has external pullup */
1359                         bias-disable;
1360                 };
1361         };
1362
1363         pen_rst_odl: pen-rst-odl {
1364                 pinmux  {
1365                         pins = "gpio18";
1366                         function = "gpio";
1367                 };
1368
1369                 pinconf {
1370                         pins = "gpio18";
1371                         bias-disable;
1372                         drive-strength = <2>;
1373
1374                         /*
1375                          * The pen driver doesn't currently support
1376                          * driving this reset line.  By specifying
1377                          * output-high here we're relying on the fact
1378                          * that this pin has a default pulldown at boot
1379                          * (which makes sure the pen was in reset if it
1380                          * was powered) and then we set it high here to
1381                          * take it out of reset.  Better would be if the
1382                          * pen driver could control this and we could
1383                          * remove "output-high" here.
1384                          */
1385                         output-high; /* TODO: Remove this? */
1386                 };
1387         };
1388
1389         p_sensor_int_l: p-sensor-int-l {
1390                 pinmux {
1391                         pins = "gpio24";
1392                         function = "gpio";
1393                         input-enable;
1394                 };
1395
1396                 pinconf {
1397                         pins = "gpio24";
1398                         /* Has external pullup */
1399                         bias-disable;
1400                 };
1401         };
1402
1403         qup_uart3_sleep: qup-uart3-sleep {
1404                 pinmux {
1405                         pins = "gpio38", "gpio39",
1406                                "gpio40", "gpio41";
1407                         function = "gpio";
1408                 };
1409
1410                 pinconf-cts {
1411                         /*
1412                          * Configure a pull-down on CTS to match the pull of
1413                          * the Bluetooth module.
1414                          */
1415                         pins = "gpio38";
1416                         bias-pull-down;
1417                 };
1418
1419                 pinconf-rts {
1420                         /*
1421                          * Configure pull-down on RTS. As RTS is active low
1422                          * signal, pull it low to indicate the BT SoC that it
1423                          * can wakeup the system anytime from suspend state by
1424                          * pulling RX low (by sending wakeup bytes).
1425                          */
1426                          pins = "gpio39";
1427                          bias-pull-down;
1428                 };
1429
1430                 pinconf-tx {
1431                         /*
1432                          * Configure pull-up on TX when it isn't actively driven
1433                          * to prevent BT SoC from receiving garbage during sleep.
1434                          */
1435                         pins = "gpio40";
1436                         bias-pull-up;
1437                 };
1438
1439                 pinconf-rx {
1440                         /*
1441                          * Configure a pull-up on RX. This is needed to avoid
1442                          * garbage data when the TX pin of the Bluetooth module
1443                          * is floating which may cause spurious wakeups.
1444                          */
1445                         pins = "gpio41";
1446                         bias-pull-up;
1447                 };
1448         };
1449
1450         trackpad_int_1v8_odl: trackpad-int-1v8-odl {
1451                 pinmux {
1452                         pins = "gpio58";
1453                         function = "gpio";
1454                 };
1455
1456                 pinconf {
1457                         pins = "gpio58";
1458
1459                         /* Has external pullup */
1460                         bias-disable;
1461                 };
1462         };
1463
1464         ts_int_l: ts-int-l {
1465                 pinmux  {
1466                         pins = "gpio9";
1467                         function = "gpio";
1468                 };
1469
1470                 pinconf {
1471                         pins = "gpio9";
1472                         bias-pull-up;
1473                 };
1474         };
1475
1476         ts_reset_l: ts-reset-l {
1477                 pinmux  {
1478                         pins = "gpio8";
1479                         function = "gpio";
1480                 };
1481
1482                 pinconf {
1483                         pins = "gpio8";
1484                         bias-disable;
1485                         drive-strength = <2>;
1486                 };
1487         };
1488 };