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