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