WIP FPC-III support
[linux/fpc-iii.git] / arch / arm64 / boot / dts / freescale / imx8mq-librem5.dtsi
blob64fc546b110f4d0ab470729d299f5d9e143281c7
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright 2018-2020 Purism SPC
4  */
6 /dts-v1/;
8 #include "dt-bindings/input/input.h"
9 #include <dt-bindings/interrupt-controller/irq.h>
10 #include "dt-bindings/pwm/pwm.h"
11 #include "dt-bindings/usb/pd.h"
12 #include "imx8mq.dtsi"
14 / {
15         model = "Purism Librem 5";
16         compatible = "purism,librem5", "fsl,imx8mq";
18         backlight_dsi: backlight-dsi {
19                 compatible = "led-backlight";
20                 leds = <&led_backlight>;
21         };
23         pmic_osc: clock-pmic {
24                 compatible = "fixed-clock";
25                 #clock-cells = <0>;
26                 clock-frequency = <32768>;
27                 clock-output-names = "pmic_osc";
28         };
30         chosen {
31                 stdout-path = &uart1;
32         };
34         gpio-keys {
35                 compatible = "gpio-keys";
36                 pinctrl-names = "default";
37                 pinctrl-0 = <&pinctrl_keys>;
39                 vol-down {
40                         label = "VOL_DOWN";
41                         gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
42                         linux,code = <KEY_VOLUMEDOWN>;
43                 };
45                 vol-up {
46                         label = "VOL_UP";
47                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_VOLUMEUP>;
49                 };
50         };
52         reg_aud_1v8: regulator-audio-1v8 {
53                 compatible = "regulator-fixed";
54                 pinctrl-names = "default";
55                 pinctrl-0 = <&pinctrl_audiopwr>;
56                 regulator-name = "AUDIO_PWR_EN";
57                 regulator-min-microvolt = <1800000>;
58                 regulator-max-microvolt = <1800000>;
59                 gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
60                 enable-active-high;
61         };
63         reg_gnss: regulator-gnss {
64                 compatible = "regulator-fixed";
65                 pinctrl-names = "default";
66                 pinctrl-0 = <&pinctrl_gnsspwr>;
67                 regulator-name = "GNSS";
68                 regulator-min-microvolt = <3300000>;
69                 regulator-max-microvolt = <3300000>;
70                 gpio = <&gpio3 12 GPIO_ACTIVE_HIGH>;
71                 enable-active-high;
72         };
74         reg_hub: regulator-hub {
75                 compatible = "regulator-fixed";
76                 pinctrl-names = "default";
77                 pinctrl-0 = <&pinctrl_hub_pwr>;
78                 regulator-name = "HUB";
79                 regulator-min-microvolt = <3300000>;
80                 regulator-max-microvolt = <3300000>;
81                 gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
82                 enable-active-high;
83         };
85         reg_lcd_3v4: regulator-lcd-3v4 {
86                 compatible = "regulator-fixed";
87                 regulator-name = "LCD_3V4";
88                 pinctrl-names = "default";
89                 pinctrl-0 = <&pinctrl_dsibiasen>;
90                 vin-supply = <&reg_vsys_3v4>;
91                 gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
92                 enable-active-high;
93         };
95         reg_vdd_sen: regulator-vdd-sen {
96                 compatible = "regulator-fixed";
97                 regulator-name = "VDD_SEN";
98                 regulator-min-microvolt = <3300000>;
99                 regulator-max-microvolt = <3300000>;
100         };
102         reg_vdd_3v3: regulator-vdd-3v3 {
103                 compatible = "regulator-fixed";
104                 regulator-name = "VDD_3V3";
105                 regulator-min-microvolt = <3300000>;
106                 regulator-max-microvolt = <3300000>;
107         };
109         reg_vdd_1v8: regulator-vdd-1v8 {
110                 compatible = "regulator-fixed";
111                 regulator-name = "VCC_1V8";
112                 regulator-min-microvolt = <1800000>;
113                 regulator-max-microvolt = <1800000>;
114         };
116         reg_vsys_3v4: regulator-vsys-3v4 {
117                 compatible = "regulator-fixed";
118                 regulator-name = "VSYS_3V4";
119                 regulator-min-microvolt = <3400000>;
120                 regulator-max-microvolt = <3400000>;
121                 regulator-always-on;
122         };
124         reg_wifi_3v3: regulator-wifi-3v3 {
125                 compatible = "regulator-fixed";
126                 regulator-name = "3V3_WIFI";
127                 regulator-min-microvolt = <3300000>;
128                 regulator-max-microvolt = <3300000>;
129         };
131         sound {
132                 compatible = "simple-audio-card";
133                 pinctrl-names = "default";
134                 pinctrl-0 = <&pinctrl_hp>;
135                 simple-audio-card,name = "Librem 5";
136                 simple-audio-card,format = "i2s";
137                 simple-audio-card,widgets =
138                         "Headphone", "Headphones",
139                         "Microphone", "Headset Mic",
140                         "Microphone", "Digital Mic",
141                         "Speaker", "Speaker";
142                 simple-audio-card,routing =
143                         "Headphones", "HPOUTL",
144                         "Headphones", "HPOUTR",
145                         "Speaker", "SPKOUTL",
146                         "Speaker", "SPKOUTR",
147                         "Headset Mic", "MICBIAS",
148                         "IN3R", "Headset Mic",
149                         "DMICDAT", "Digital Mic";
150                 simple-audio-card,hp-det-gpio = <&gpio3 9 GPIO_ACTIVE_HIGH>;
152                 simple-audio-card,cpu {
153                         sound-dai = <&sai2>;
154                 };
156                 simple-audio-card,codec {
157                         sound-dai = <&codec>;
158                         clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
159                         frame-master;
160                         bitclock-master;
161                 };
162         };
164         sound-wwan {
165                 compatible = "simple-audio-card";
166                 simple-audio-card,name = "Modem";
167                 simple-audio-card,format = "i2s";
169                 simple-audio-card,cpu {
170                         sound-dai = <&sai6>;
171                         frame-inversion;
172                 };
174                 simple-audio-card,codec {
175                         sound-dai = <&bm818_codec>;
176                         frame-master;
177                         bitclock-master;
178                 };
179         };
181         bm818_codec: sound-wwan-codec {
182                 compatible = "broadmobi,bm818", "option,gtm601";
183                 #sound-dai-cells = <0>;
184         };
186         vibrator {
187                 compatible = "pwm-vibrator";
188                 pwms = <&pwm1 0 1000000000 0>;
189                 pwm-names = "enable";
190                 vcc-supply = <&reg_vdd_3v3>;
191         };
194 &A53_0 {
195         cpu-supply = <&buck2_reg>;
198 &A53_1 {
199         cpu-supply = <&buck2_reg>;
202 &A53_2 {
203         cpu-supply = <&buck2_reg>;
206 &A53_3 {
207         cpu-supply = <&buck2_reg>;
210 &ddrc {
211         operating-points-v2 = <&ddrc_opp_table>;
213         ddrc_opp_table: ddrc-opp-table {
214                 compatible = "operating-points-v2";
216                 opp-25M {
217                         opp-hz = /bits/ 64 <25000000>;
218                 };
220                 opp-100M {
221                         opp-hz = /bits/ 64 <100000000>;
222                 };
224                 opp-800M {
225                         opp-hz = /bits/ 64 <800000000>;
226                 };
227         };
230 &dphy {
231         status = "okay";
234 &ecspi1 {
235         pinctrl-names = "default";
236         pinctrl-0 = <&pinctrl_ecspi1>;
237         cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
238         #address-cells = <1>;
239         #size-cells = <0>;
240         status = "okay";
242         nor_flash: flash@0 {
243                 compatible = "jedec,spi-nor";
244                 reg = <0>;
245                 spi-max-frequency = <1000000>;
246         };
249 &gpio1 {
250         pinctrl-names = "default";
251         pinctrl-0 = <&pinctrl_pmic_5v>;
253         pmic-5v-hog {
254                 gpio-hog;
255                 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
256                 input;
257         };
260 &iomuxc {
261         pinctrl_audiopwr: audiopwrgrp {
262                 fsl,pins = <
263                         /* AUDIO_POWER_EN_3V3 */
264                         MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4       0x83
265                 >;
266         };
268         pinctrl_bl: blgrp {
269                 fsl,pins = <
270                         /* BACKLINGE_EN */
271                         MX8MQ_IOMUXC_NAND_DQS_GPIO3_IO14        0x83
272                 >;
273         };
275         pinctrl_charger_in: chargeringrp {
276                 fsl,pins = <
277                         /* CHRG_INT */
278                         MX8MQ_IOMUXC_NAND_CE2_B_GPIO3_IO3       0x00
279                         /* CHG_STATUS_B */
280                         MX8MQ_IOMUXC_NAND_ALE_GPIO3_IO0         0x80
281                 >;
282         };
284         pinctrl_dsibiasen: dsibiasengrp {
285                 fsl,pins = <
286                         /* DSI_BIAS_EN */
287                         MX8MQ_IOMUXC_ENET_TD1_GPIO1_IO20        0x83
288                 >;
289         };
291         pinctrl_dsien: dsiengrp {
292                 fsl,pins = <
293                         /* DSI_EN_3V3 */
294                         MX8MQ_IOMUXC_GPIO1_IO05_GPIO1_IO5       0x83
295                 >;
296         };
298         pinctrl_ecspi1: ecspigrp {
299                 fsl,pins = <
300                         MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI    0x83
301                         MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO    0x83
302                         MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9       0x19
303                         MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK    0x83
304                 >;
305         };
307         pinctrl_gauge: gaugegrp {
308                 fsl,pins = <
309                         /* BAT_LOW */
310                         MX8MQ_IOMUXC_SAI5_RXC_GPIO3_IO20        0x80
311                 >;
312         };
314         pinctrl_gnsspwr: gnsspwrgrp {
315                 fsl,pins = <
316                         /* GPS3V3_EN */
317                         MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12     0x83
318                 >;
319         };
321         pinctrl_haptic: hapticgrp {
322                 fsl,pins = <
323                         /* MOTO */
324                         MX8MQ_IOMUXC_SPDIF_EXT_CLK_PWM1_OUT     0x83
325                 >;
326         };
328         pinctrl_hp: hpgrp {
329                 fsl,pins = <
330                         /* HEADPHONE_DET_1V8 */
331                         MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9      0x180
332                 >;
333         };
335         pinctrl_hub_pwr: hubpwrgrp {
336                 fsl,pins = <
337                         /* HUB_PWR_3V3_EN */
338                         MX8MQ_IOMUXC_GPIO1_IO14_GPIO1_IO14      0x83
339                 >;
340         };
342         pinctrl_i2c1: i2c1grp {
343                 fsl,pins = <
344                         MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL          0x40000026
345                         MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA          0x40000026
346                 >;
347         };
349         pinctrl_i2c2: i2c2grp {
350                 fsl,pins = <
351                         MX8MQ_IOMUXC_I2C2_SCL_I2C2_SCL          0x40000026
352                         MX8MQ_IOMUXC_I2C2_SDA_I2C2_SDA          0x40000026
353                 >;
354         };
356         pinctrl_i2c3: i2c3grp {
357                 fsl,pins = <
358                         MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL          0x40000026
359                         MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA          0x40000026
360                 >;
361         };
363         pinctrl_i2c4: i2c4grp {
364                 fsl,pins = <
365                         MX8MQ_IOMUXC_I2C4_SCL_I2C4_SCL          0x40000026
366                         MX8MQ_IOMUXC_I2C4_SDA_I2C4_SDA          0x40000026
367                 >;
368         };
370         pinctrl_keys: keysgrp {
371                 fsl,pins = <
372                         /* VOL- */
373                         MX8MQ_IOMUXC_ENET_MDIO_GPIO1_IO17       0x01C0
374                         /* VOL+ */
375                         MX8MQ_IOMUXC_ENET_MDC_GPIO1_IO16        0x01C0
376                 >;
377         };
379         pinctrl_led_b: ledbgrp {
380                 fsl,pins = <
381                         /* LED_B */
382                         MX8MQ_IOMUXC_GPIO1_IO13_PWM2_OUT        0x06
383                 >;
384         };
386         pinctrl_led_g: ledggrp {
387                 fsl,pins = <
388                         /* LED_G */
389                         MX8MQ_IOMUXC_SAI3_MCLK_PWM4_OUT         0x06
390                 >;
391         };
393         pinctrl_led_r: ledrgrp {
394                 fsl,pins = <
395                         /* LED_R */
396                         MX8MQ_IOMUXC_SPDIF_TX_PWM3_OUT          0x06
397                 >;
398         };
400         pinctrl_mag: maggrp {
401                 fsl,pins = <
402                         /* INT_MAG */
403                         MX8MQ_IOMUXC_SAI5_RXD1_GPIO3_IO22       0x80
404                 >;
405         };
407         pinctrl_pmic: pmicgrp {
408                 fsl,pins = <
409                         /* PMIC_NINT */
410                         MX8MQ_IOMUXC_GPIO1_IO07_GPIO1_IO7       0x80
411                 >;
412         };
414         pinctrl_pmic_5v: pmic5vgrp {
415                 fsl,pins = <
416                         /* PMIC_5V */
417                         MX8MQ_IOMUXC_GPIO1_IO01_GPIO1_IO1       0x80
418                 >;
419         };
421         pinctrl_prox: proxgrp {
422                 fsl,pins = <
423                         /* INT_LIGHT */
424                         MX8MQ_IOMUXC_NAND_DATA01_GPIO3_IO7      0x80
425                 >;
426         };
428         pinctrl_rtc: rtcgrp {
429                 fsl,pins = <
430                         /* RTC_INT */
431                         MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9       0x80
432                 >;
433         };
435         pinctrl_sai2: sai2grp {
436                 fsl,pins = <
437                         MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0    0xd6
438                         MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC     0xd6
439                         MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK        0xd6
440                         MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0    0xd6
441                         MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK      0xd6
442                 >;
443         };
445         pinctrl_sai6: sai6grp {
446                 fsl,pins = <
447                         MX8MQ_IOMUXC_SAI1_RXD5_SAI6_RX_DATA0    0xd6
448                         MX8MQ_IOMUXC_SAI1_RXD6_SAI6_RX_SYNC     0xd6
449                         MX8MQ_IOMUXC_SAI1_TXD4_SAI6_RX_BCLK     0xd6
450                         MX8MQ_IOMUXC_SAI1_TXD5_SAI6_TX_DATA0    0xd6
451                 >;
452         };
454         pinctrl_tcpc: tcpcgrp {
455                 fsl,pins = <
456                         /* TCPC_INT */
457                         MX8MQ_IOMUXC_GPIO1_IO10_GPIO1_IO10      0x01C0
458                 >;
459         };
461         pinctrl_typec: typecgrp {
462                 fsl,pins = <
463                         /* TYPEC_MUX_EN */
464                         MX8MQ_IOMUXC_GPIO1_IO11_GPIO1_IO11      0x83
465                 >;
466         };
468         pinctrl_uart1: uart1grp {
469                 fsl,pins = <
470                         MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX     0x49
471                         MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX     0x49
472                 >;
473         };
475         pinctrl_uart2: uart2grp {
476                 fsl,pins = <
477                         MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX     0x49
478                         MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX     0x49
479                 >;
480         };
482         pinctrl_uart3: uart3grp {
483                 fsl,pins = <
484                         MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX     0x49
485                         MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX     0x49
486                 >;
487         };
489         pinctrl_uart4: uart4grp {
490                 fsl,pins = <
491                         MX8MQ_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX           0x49
492                         MX8MQ_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX           0x49
493                         MX8MQ_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B        0x49
494                         MX8MQ_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B         0x49
495                 >;
496         };
498         pinctrl_usdhc1: usdhc1grp {
499                 fsl,pins = <
500                         MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK                 0x83
501                         MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD                 0xc3
502                         MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0             0xc3
503                         MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1             0xc3
504                         MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2             0xc3
505                         MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3             0xc3
506                         MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4             0xc3
507                         MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5             0xc3
508                         MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6             0xc3
509                         MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7             0xc3
510                         MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x83
511                         MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B         0xc1
512                 >;
513         };
515         pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
516                 fsl,pins = <
517                         MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK                 0x8d
518                         MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD                 0xcd
519                         MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0             0xcd
520                         MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1             0xcd
521                         MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2             0xcd
522                         MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3             0xcd
523                         MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4             0xcd
524                         MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5             0xcd
525                         MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6             0xcd
526                         MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7             0xcd
527                         MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x8d
528                         MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B         0xc1
529                 >;
530         };
532         pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
533                 fsl,pins = <
534                         MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK                 0x9f
535                         MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD                 0xdf
536                         MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0             0xdf
537                         MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1             0xdf
538                         MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2             0xdf
539                         MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3             0xdf
540                         MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4             0xdf
541                         MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5             0xdf
542                         MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6             0xdf
543                         MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7             0xdf
544                         MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE           0x9f
545                         MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B         0xc1
546                 >;
547         };
549         pinctrl_usdhc2: usdhc2grp {
550                 fsl,pins = <
551                         MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12        0x80
552                         MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK         0x83
553                         MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD         0xc3
554                         MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0     0xc3
555                         MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1     0xc3
556                         MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2     0xc3
557                         MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3     0xc3
558                         MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
559                 >;
560         };
562         pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
563                 fsl,pins = <
564                         MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12        0x80
565                         MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK         0x8d
566                         MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD         0xcd
567                         MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0     0xcd
568                         MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1     0xcd
569                         MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2     0xcd
570                         MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3     0xcd
571                         MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
572                 >;
573         };
575         pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
576                 fsl,pins = <
577                         MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12        0x80
578                         MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK         0x9f
579                         MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD         0xcf
580                         MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0     0xcf
581                         MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1     0xcf
582                         MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2     0xcf
583                         MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3     0xcf
584                         MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
585                 >;
586         };
588         pinctrl_wdog: wdoggrp {
589                 fsl,pins = <
590                         /* nWDOG */
591                         MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B    0x1f
592                 >;
593         };
596 &i2c1 {
597         clock-frequency = <387000>;
598         pinctrl-names = "default";
599         pinctrl-0 = <&pinctrl_i2c1>;
600         status = "okay";
602         typec_pd: usb-pd@3f {
603                 compatible = "ti,tps6598x";
604                 reg = <0x3f>;
605                 pinctrl-names = "default";
606                 pinctrl-0 = <&pinctrl_typec>, <&pinctrl_tcpc>;
607                 interrupt-parent = <&gpio1>;
608                 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
609                 interrupt-names = "irq";
611                 connector {
612                         ports {
613                                 #address-cells = <1>;
614                                 #size-cells = <0>;
616                                 port@0 {
617                                         reg = <0>;
619                                         usb_con_hs: endpoint {
620                                                 remote-endpoint = <&typec_hs>;
621                                         };
622                                 };
624                                 port@1 {
625                                         reg = <1>;
627                                         usb_con_ss: endpoint {
628                                                 remote-endpoint = <&typec_ss>;
629                                         };
630                                 };
631                         };
632                 };
633         };
635         pmic: pmic@4b {
636                 compatible = "rohm,bd71837";
637                 reg = <0x4b>;
638                 pinctrl-names = "default";
639                 pinctrl-0 = <&pinctrl_pmic>;
640                 clocks = <&pmic_osc>;
641                 clock-names = "osc";
642                 clock-output-names = "pmic_clk";
643                 interrupt-parent = <&gpio1>;
644                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
645                 rohm,reset-snvs-powered;
647                 regulators {
648                         buck1_reg: BUCK1 {
649                                 regulator-name = "buck1";
650                                 regulator-min-microvolt = <700000>;
651                                 regulator-max-microvolt = <1300000>;
652                                 regulator-ramp-delay = <1250>;
653                                 rohm,dvs-run-voltage = <900000>;
654                                 rohm,dvs-idle-voltage = <850000>;
655                                 rohm,dvs-suspend-voltage = <800000>;
656                                 regulator-always-on;
657                         };
659                         buck2_reg: BUCK2 {
660                                 regulator-name = "buck2";
661                                 regulator-min-microvolt = <700000>;
662                                 regulator-max-microvolt = <1300000>;
663                                 regulator-ramp-delay = <1250>;
664                                 rohm,dvs-run-voltage = <1000000>;
665                                 rohm,dvs-idle-voltage = <900000>;
666                                 regulator-always-on;
667                         };
669                         buck3_reg: BUCK3 {
670                                 regulator-name = "buck3";
671                                 regulator-min-microvolt = <700000>;
672                                 regulator-max-microvolt = <1300000>;
673                                 rohm,dvs-run-voltage = <900000>;
674                                 regulator-always-on;
675                         };
677                         buck4_reg: BUCK4 {
678                                 regulator-name = "buck4";
679                                 regulator-min-microvolt = <700000>;
680                                 regulator-max-microvolt = <1300000>;
681                                 rohm,dvs-run-voltage = <1000000>;
682                         };
684                         buck5_reg: BUCK5 {
685                                 regulator-name = "buck5";
686                                 regulator-min-microvolt = <700000>;
687                                 regulator-max-microvolt = <1350000>;
688                                 regulator-always-on;
689                         };
691                         buck6_reg: BUCK6 {
692                                 regulator-name = "buck6";
693                                 regulator-min-microvolt = <3000000>;
694                                 regulator-max-microvolt = <3300000>;
695                                 regulator-always-on;
696                         };
698                         buck7_reg: BUCK7 {
699                                 regulator-name = "buck7";
700                                 regulator-min-microvolt = <1605000>;
701                                 regulator-max-microvolt = <1995000>;
702                                 regulator-always-on;
703                         };
705                         buck8_reg: BUCK8 {
706                                 regulator-name = "buck8";
707                                 regulator-min-microvolt = <800000>;
708                                 regulator-max-microvolt = <1400000>;
709                                 regulator-always-on;
710                         };
712                         ldo1_reg: LDO1 {
713                                 regulator-name = "ldo1";
714                                 regulator-min-microvolt = <3000000>;
715                                 regulator-max-microvolt = <3300000>;
716                                 /* leave on for snvs power button */
717                                 regulator-always-on;
718                         };
720                         ldo2_reg: LDO2 {
721                                 regulator-name = "ldo2";
722                                 regulator-min-microvolt = <900000>;
723                                 regulator-max-microvolt = <900000>;
724                                 /* leave on for snvs power button */
725                                 regulator-always-on;
726                         };
728                         ldo3_reg: LDO3 {
729                                 regulator-name = "ldo3";
730                                 regulator-min-microvolt = <1800000>;
731                                 regulator-max-microvolt = <3300000>;
732                                 regulator-always-on;
733                         };
735                         ldo4_reg: LDO4 {
736                                 regulator-name = "ldo4";
737                                 regulator-min-microvolt = <900000>;
738                                 regulator-max-microvolt = <1800000>;
739                                 regulator-always-on;
740                         };
742                         ldo5_reg: LDO5 {
743                                 /* VDD_PHY_0V9 - MIPI and HDMI domains */
744                                 regulator-name = "ldo5";
745                                 regulator-min-microvolt = <1800000>;
746                                 regulator-max-microvolt = <3300000>;
747                                 regulator-always-on;
748                         };
750                         ldo6_reg: LDO6 {
751                                 /* VDD_PHY_0V9 - MIPI, HDMI and USB domains */
752                                 regulator-name = "ldo6";
753                                 regulator-min-microvolt = <900000>;
754                                 regulator-max-microvolt = <1800000>;
755                                 regulator-always-on;
756                         };
758                         ldo7_reg: LDO7 {
759                                 /* VDD_PHY_3V3 - USB domain */
760                                 regulator-name = "ldo7";
761                                 regulator-min-microvolt = <1800000>;
762                                 regulator-max-microvolt = <3300000>;
763                                 regulator-always-on;
764                         };
765                 };
766         };
768         rtc@68 {
769                 compatible = "microcrystal,rv4162";
770                 reg = <0x68>;
771                 pinctrl-names = "default";
772                 pinctrl-0 = <&pinctrl_rtc>;
773                 interrupt-parent = <&gpio1>;
774                 interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
775         };
778 &i2c2 {
779         clock-frequency = <387000>;
780         pinctrl-names = "default";
781         pinctrl-0 = <&pinctrl_i2c2>;
782         status = "okay";
784         magnetometer@1e {
785                 compatible = "st,lsm9ds1-magn";
786                 reg = <0x1e>;
787                 pinctrl-names = "default";
788                 pinctrl-0 = <&pinctrl_mag>;
789                 interrupt-parent = <&gpio3>;
790                 interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
791                 vdd-supply = <&reg_vdd_sen>;
792                 vddio-supply = <&reg_vdd_1v8>;
793         };
795         regulator@3e {
796                 compatible = "tps65132";
797                 reg = <0x3e>;
799                 outp {
800                         regulator-name = "LCD_AVDD";
801                         vin-supply = <&reg_lcd_3v4>;
802                 };
804                 outn {
805                         regulator-name = "LCD_AVEE";
806                         vin-supply = <&reg_lcd_3v4>;
807                 };
808         };
810         proximity: prox@60 {
811                 compatible = "vishay,vcnl4040";
812                 reg = <0x60>;
813                 pinctrl-names = "default";
814                 pinctrl-0 = <&pinctrl_prox>;
815                 interrupt-parent = <&gpio3>;
816                 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
817         };
819         accel_gyro: accel-gyro@6a       {
820                 compatible = "st,lsm9ds1-imu";
821                 reg = <0x6a>;
822                 vdd-supply = <&reg_vdd_sen>;
823                 vddio-supply = <&reg_vdd_1v8>;
824         };
827 &i2c3 {
828         clock-frequency = <387000>;
829         pinctrl-names = "default";
830         pinctrl-0 = <&pinctrl_i2c3>;
831         status = "okay";
833         codec: audio-codec@1a {
834                 compatible = "wlf,wm8962";
835                 reg = <0x1a>;
836                 clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
837                 assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
838                 assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
839                 assigned-clock-rates = <24576000>;
840                 #sound-dai-cells = <0>;
841                 mic-cfg = <0x200>;
842                 DCVDD-supply = <&reg_aud_1v8>;
843                 DBVDD-supply = <&reg_aud_1v8>;
844                 AVDD-supply = <&reg_aud_1v8>;
845                 CPVDD-supply = <&reg_aud_1v8>;
846                 MICVDD-supply = <&reg_aud_1v8>;
847                 PLLVDD-supply = <&reg_aud_1v8>;
848                 SPKVDD1-supply = <&reg_vsys_3v4>;
849                 SPKVDD2-supply = <&reg_vsys_3v4>;
850                 gpio-cfg = <
851                         0x0000 /* n/c */
852                         0x0001 /* gpio2, 1: default */
853                         0x0013 /* gpio3, 2: dmicclk */
854                         0x0000 /* n/c, 3: default */
855                         0x8014 /* gpio5, 4: dmic_dat */
856                         0x0000 /* gpio6, 5: default */
857                 >;
858         };
860         backlight@36 {
861                 compatible = "ti,lm36922";
862                 reg = <0x36>;
863                 pinctrl-names = "default";
864                 pinctrl-0 = <&pinctrl_bl>;
865                 #address-cells = <1>;
866                 #size-cells = <0>;
867                 enable-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
868                 vled-supply = <&reg_vsys_3v4>;
869                 ti,ovp-microvolt = <25000000>;
871                 led_backlight: led@0 {
872                         reg = <0>;
873                         label = ":backlight";
874                         linux,default-trigger = "backlight";
875                         led-max-microamp = <20000>;
876                 };
877         };
879         touchscreen@38 {
880                 compatible = "edt,edt-ft5506";
881                 reg = <0x38>;
882                 interrupt-parent = <&gpio1>;
883                 interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
884                 touchscreen-size-x = <720>;
885                 touchscreen-size-y = <1440>;
886         };
889 &i2c4 {
890         clock-frequency = <387000>;
891         pinctrl-names = "default";
892         pinctrl-0 = <&pinctrl_i2c4>;
893         status = "okay";
895         bat: fuel-gauge@36 {
896                 compatible = "maxim,max17055";
897                 reg = <0x36>;
898                 interrupt-parent = <&gpio3>;
899                 interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
900                 pinctrl-names = "default";
901                 pinctrl-0 = <&pinctrl_gauge>;
902                 maxim,over-heat-temp = <700>;
903                 maxim,over-volt = <4500>;
904                 maxim,rsns-microohm = <5000>;
905         };
907         bq25895: charger@6a {
908                 compatible = "ti,bq25895", "ti,bq25890";
909                 reg = <0x6a>;
910                 pinctrl-names = "default";
911                 pinctrl-0 = <&pinctrl_charger_in>;
912                 interrupt-parent = <&gpio3>;
913                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
914                 phys = <&usb3_phy0>;
915                 ti,precharge-current = <130000>; /* uA */
916                 ti,minimum-sys-voltage = <3700000>; /* uV */
917                 ti,boost-voltage = <5000000>; /* uV */
918                 ti,boost-max-current = <500000>; /* uA */
919                 ti,use-vinmin-threshold = <1>; /* enable VINDPM */
920                 ti,vinmin-threshold = <3900000>; /* uV */
921                 monitored-battery = <&bat>;
922         };
925 &pgc_gpu {
926         power-supply = <&buck3_reg>;
929 &pgc_mipi {
930         power-supply = <&ldo5_reg>;
933 &pgc_vpu {
934         power-supply = <&buck4_reg>;
937 &pwm1 {
938         pinctrl-names = "default";
939         pinctrl-0 = <&pinctrl_haptic>;
940         status = "okay";
943 &pwm2 {
944         pinctrl-names = "default";
945         pinctrl-0 = <&pinctrl_led_b>;
946         status = "okay";
949 &pwm3 {
950         pinctrl-names = "default";
951         pinctrl-0 = <&pinctrl_led_g>;
952         status = "okay";
955 &pwm4 {
956         pinctrl-names = "default";
957         pinctrl-0 = <&pinctrl_led_r>;
958         status = "okay";
961 &sai2 {
962         pinctrl-names = "default";
963         pinctrl-0 = <&pinctrl_sai2>;
964         assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
965         assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
966         assigned-clock-rates = <24576000>;
967         assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL2>;
968         assigned-clock-rates = <786432000>, <722534400>;
969         status = "okay";
972 &sai6 {
973         pinctrl-names = "default";
974         pinctrl-0 = <&pinctrl_sai6>;
975         assigned-clocks = <&clk IMX8MQ_CLK_SAI6>;
976         assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
977         assigned-clock-rates = <24576000>;
978         fsl,sai-synchronous-rx;
979         status = "okay";
982 &snvs_pwrkey {
983         status = "okay";
986 &snvs_rtc {
987         status = "disabled";
990 &uart1 { /* console */
991         pinctrl-names = "default";
992         pinctrl-0 = <&pinctrl_uart1>;
993         status = "okay";
996 &uart2 { /* TPS - GPS - DEBUG */
997         pinctrl-names = "default";
998         pinctrl-0 = <&pinctrl_uart2>;
999         status = "okay";
1001         gnss {
1002                 compatible = "globaltop,pa6h";
1003                 vcc-supply = <&reg_gnss>;
1004                 current-speed = <9600>;
1005         };
1008 &uart3 { /* SMC */
1009         pinctrl-names = "default";
1010         pinctrl-0 = <&pinctrl_uart3>;
1011         status = "okay";
1014 &uart4 { /* BT */
1015         pinctrl-names = "default";
1016         pinctrl-0 = <&pinctrl_uart4>;
1017         uart-has-rtscts;
1018         status = "okay";
1021 &usb3_phy0 {
1022         status = "okay";
1025 &usb3_phy1 {
1026         vbus-supply = <&reg_hub>;
1027         status = "okay";
1030 &usb_dwc3_0 {
1031         #address-cells = <1>;
1032         #size-cells = <0>;
1033         dr_mode = "otg";
1034         snps,dis_u3_susphy_quirk;
1035         status = "okay";
1037         port@0 {
1038                 reg = <0>;
1040                 typec_hs: endpoint {
1041                         remote-endpoint = <&usb_con_hs>;
1042                 };
1043         };
1045         port@1 {
1046                 reg = <1>;
1048                 typec_ss: endpoint {
1049                         remote-endpoint = <&usb_con_ss>;
1050                 };
1051         };
1054 &usb_dwc3_1 {
1055         dr_mode = "host";
1056         status = "okay";
1057         #address-cells = <1>;
1058         #size-cells = <0>;
1060         /* Microchip USB2642 */
1061         hub@1 {
1062                 compatible = "usb424,2640";
1063                 reg = <1>;
1064                 #address-cells = <1>;
1065                 #size-cells = <0>;
1067                 mass-storage@1 {
1068                         compatible = "usb424,4041";
1069                         reg = <1>;
1070                 };
1071         };
1074 &usdhc1 {
1075         pinctrl-names = "default", "state_100mhz", "state_200mhz";
1076         pinctrl-0 = <&pinctrl_usdhc1>;
1077         pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
1078         pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
1079         bus-width = <8>;
1080         vmmc-supply = <&reg_vdd_3v3>;
1081         power-supply = <&reg_vdd_1v8>;
1082         non-removable;
1083         status = "okay";
1086 &usdhc2 {
1087         pinctrl-names = "default", "state_100mhz", "state_200mhz";
1088         pinctrl-0 = <&pinctrl_usdhc2>;
1089         pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
1090         pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
1091         bus-width = <4>;
1092         vmmc-supply = <&reg_wifi_3v3>;
1093         cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
1094         disable-wp;
1095         cap-sdio-irq;
1096         keep-power-in-suspend;
1097         wakeup-source;
1098         status = "okay";
1101 &wdog1 {
1102         pinctrl-names = "default";
1103         pinctrl-0 = <&pinctrl_wdog>;
1104         fsl,ext-reset-output;
1105         status = "okay";