1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2018-2019 Purism SPC
4 */
5
6/dts-v1/;
7
8#include "dt-bindings/input/input.h"
9#include "dt-bindings/pwm/pwm.h"
10#include "dt-bindings/usb/pd.h"
11#include "imx8mq.dtsi"
12
13/ {
14	model = "Purism Librem 5 devkit";
15	compatible = "purism,librem5-devkit", "fsl,imx8mq";
16
17	backlight_dsi: backlight-dsi {
18		compatible = "pwm-backlight";
19		/* 200 Hz for the PAM2841 */
20		pwms = <&pwm1 0 5000000>;
21		brightness-levels = <0 100>;
22		num-interpolated-steps = <100>;
23		/* Default brightness level (index into the array defined by */
24		/* the "brightness-levels" property) */
25		default-brightness-level = <0>;
26		power-supply = <&reg_22v4_p>;
27	};
28
29	chosen {
30		stdout-path = &uart1;
31	};
32
33	gpio-keys {
34		compatible = "gpio-keys";
35		pinctrl-names = "default";
36		pinctrl-0 = <&pinctrl_gpio_keys>;
37
38		btn1 {
39			label = "VOL_UP";
40			gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
41			wakeup-source;
42			linux,code = <KEY_VOLUMEUP>;
43		};
44
45		btn2 {
46			label = "VOL_DOWN";
47			gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
48			wakeup-source;
49			linux,code = <KEY_VOLUMEDOWN>;
50		};
51
52		hp-det {
53			label = "HP_DET";
54			gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
55			wakeup-source;
56			linux,code = <KEY_HP>;
57		};
58	};
59
60	leds {
61		compatible = "gpio-leds";
62		pinctrl-names = "default";
63		pinctrl-0 = <&pinctrl_gpio_leds>;
64
65		led1 {
66			label = "LED 1";
67			gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
68			default-state = "off";
69		};
70	};
71
72	pmic_osc: clock-pmic {
73		compatible = "fixed-clock";
74		#clock-cells = <0>;
75		clock-frequency = <32768>;
76		clock-output-names = "pmic_osc";
77	};
78
79	reg_1v8_p: regulator-1v8-p {
80		compatible = "regulator-fixed";
81		regulator-name = "1v8_p";
82		regulator-min-microvolt = <1800000>;
83		regulator-max-microvolt = <1800000>;
84		vin-supply = <&reg_pwr_en>;
85	};
86
87	reg_2v8_p: regulator-2v8-p {
88		compatible = "regulator-fixed";
89		regulator-name = "2v8_p";
90		regulator-min-microvolt = <2800000>;
91		regulator-max-microvolt = <2800000>;
92		vin-supply = <&reg_pwr_en>;
93	};
94
95	reg_3v3_p: regulator-3v3-p {
96		compatible = "regulator-fixed";
97		regulator-name = "3v3_p";
98		regulator-min-microvolt = <3300000>;
99		regulator-max-microvolt = <3300000>;
100		vin-supply = <&reg_pwr_en>;
101
102		regulator-state-mem {
103			regulator-on-in-suspend;
104		};
105	};
106
107	reg_5v_p: regulator-5v-p {
108		compatible = "regulator-fixed";
109		regulator-name = "5v_p";
110		regulator-min-microvolt = <5000000>;
111		regulator-max-microvolt = <5000000>;
112		vin-supply = <&reg_pwr_en>;
113
114		regulator-state-mem {
115			regulator-on-in-suspend;
116		};
117	};
118
119	reg_22v4_p: regulator-22v4-p  {
120		compatible = "regulator-fixed";
121		regulator-name = "22v4_P";
122		regulator-min-microvolt = <22400000>;
123		regulator-max-microvolt = <22400000>;
124		vin-supply = <&reg_pwr_en>;
125	};
126
127	reg_pwr_en: regulator-pwr-en {
128		compatible = "regulator-fixed";
129		pinctrl-names = "default";
130		pinctrl-0 = <&pinctrl_pwr_en>;
131		regulator-name = "PWR_EN";
132		regulator-min-microvolt = <3300000>;
133		regulator-max-microvolt = <3300000>;
134		gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
135		enable-active-high;
136		regulator-always-on;
137	};
138
139	reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
140		compatible = "regulator-fixed";
141		pinctrl-names = "default";
142		pinctrl-0 = <&pinctrl_usdhc2_pwr>;
143		regulator-name = "VSD_3V3";
144		regulator-min-microvolt = <3300000>;
145		regulator-max-microvolt = <3300000>;
146		gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
147		enable-active-high;
148		regulator-always-on;
149	};
150
151	vibrator {
152		compatible = "gpio-vibrator";
153		pinctrl-names = "default";
154		pinctrl-0 = <&pinctrl_haptic>;
155	        enable-gpios = <&gpio5 4 GPIO_ACTIVE_LOW>;
156		vcc-supply = <&reg_3v3_p>;
157	};
158
159	wifi_pwr_en: regulator-wifi-en {
160		compatible = "regulator-fixed";
161		pinctrl-names = "default";
162		pinctrl-0 = <&pinctrl_wifi_pwr_en>;
163		regulator-name = "WIFI_EN";
164		regulator-min-microvolt = <3300000>;
165		regulator-max-microvolt = <3300000>;
166		gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
167		enable-active-high;
168		regulator-always-on;
169	};
170};
171
172&clk {
173	assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL2>;
174	assigned-clock-rates = <786432000>, <722534400>;
175};
176
177&fec1 {
178	pinctrl-names = "default";
179	pinctrl-0 = <&pinctrl_fec1>;
180	phy-mode = "rgmii-id";
181	phy-handle = <&ethphy0>;
182	fsl,magic-packet;
183	phy-supply = <&reg_3v3_p>;
184	status = "okay";
185
186	mdio {
187		#address-cells = <1>;
188		#size-cells = <0>;
189
190		ethphy0: ethernet-phy@1 {
191			compatible = "ethernet-phy-ieee802.3-c22";
192			reg = <1>;
193		};
194	};
195};
196
197&i2c1 {
198	clock-frequency = <100000>;
199	pinctrl-names = "default";
200	pinctrl-0 = <&pinctrl_i2c1>;
201	status = "okay";
202
203	pmic: pmic@4b {
204		compatible = "rohm,bd71837";
205		reg = <0x4b>;
206		pinctrl-names = "default";
207		pinctrl-0 = <&pinctrl_pmic>;
208		clocks = <&pmic_osc>;
209		clock-names = "osc";
210		clock-output-names = "pmic_clk";
211		interrupt-parent = <&gpio1>;
212		interrupts = <3 GPIO_ACTIVE_LOW>;
213		interrupt-names = "irq";
214		rohm,reset-snvs-powered;
215
216		regulators {
217			buck1_reg: BUCK1 {
218				regulator-name = "buck1";
219				regulator-min-microvolt = <700000>;
220				regulator-max-microvolt = <1300000>;
221				regulator-boot-on;
222				regulator-ramp-delay = <1250>;
223				rohm,dvs-run-voltage = <900000>;
224				rohm,dvs-idle-voltage = <850000>;
225				rohm,dvs-suspend-voltage = <800000>;
226			};
227
228			buck2_reg: BUCK2 {
229				regulator-name = "buck2";
230				regulator-min-microvolt = <700000>;
231				regulator-max-microvolt = <1300000>;
232				regulator-boot-on;
233				regulator-ramp-delay = <1250>;
234				rohm,dvs-run-voltage = <1000000>;
235				rohm,dvs-idle-voltage = <900000>;
236			};
237
238			buck3_reg: BUCK3 {
239				regulator-name = "buck3";
240				regulator-min-microvolt = <700000>;
241				regulator-max-microvolt = <1300000>;
242				regulator-boot-on;
243				rohm,dvs-run-voltage = <1000000>;
244			};
245
246			buck4_reg: BUCK4 {
247				regulator-name = "buck4";
248				regulator-min-microvolt = <700000>;
249				regulator-max-microvolt = <1300000>;
250				rohm,dvs-run-voltage = <1000000>;
251			};
252
253			buck5_reg: BUCK5 {
254				regulator-name = "buck5";
255				regulator-min-microvolt = <700000>;
256				regulator-max-microvolt = <1350000>;
257				regulator-boot-on;
258			};
259
260			buck6_reg: BUCK6 {
261				regulator-name = "buck6";
262				regulator-min-microvolt = <3000000>;
263				regulator-max-microvolt = <3300000>;
264				regulator-boot-on;
265			};
266
267			buck7_reg: BUCK7 {
268				regulator-name = "buck7";
269				regulator-min-microvolt = <1605000>;
270				regulator-max-microvolt = <1995000>;
271				regulator-boot-on;
272			};
273
274			buck8_reg: BUCK8 {
275				regulator-name = "buck8";
276				regulator-min-microvolt = <800000>;
277				regulator-max-microvolt = <1400000>;
278				regulator-boot-on;
279			};
280
281			ldo1_reg: LDO1 {
282				regulator-name = "ldo1";
283				regulator-min-microvolt = <3000000>;
284				regulator-max-microvolt = <3300000>;
285				regulator-boot-on;
286				/* leave on for snvs power button */
287				regulator-always-on;
288			};
289
290			ldo2_reg: LDO2 {
291				regulator-name = "ldo2";
292				regulator-min-microvolt = <900000>;
293				regulator-max-microvolt = <900000>;
294				regulator-boot-on;
295				/* leave on for snvs power button */
296				regulator-always-on;
297			};
298
299			ldo3_reg: LDO3 {
300				regulator-name = "ldo3";
301				regulator-min-microvolt = <1800000>;
302				regulator-max-microvolt = <3300000>;
303				regulator-boot-on;
304			};
305
306			ldo4_reg: LDO4 {
307				regulator-name = "ldo4";
308				regulator-min-microvolt = <900000>;
309				regulator-max-microvolt = <1800000>;
310				regulator-boot-on;
311			};
312
313			ldo5_reg: LDO5 {
314				regulator-name = "ldo5";
315				regulator-min-microvolt = <1800000>;
316				regulator-max-microvolt = <3300000>;
317			};
318
319			ldo6_reg: LDO6 {
320				regulator-name = "ldo6";
321				regulator-min-microvolt = <900000>;
322				regulator-max-microvolt = <1800000>;
323				regulator-boot-on;
324			};
325
326			ldo7_reg: LDO7 {
327				regulator-name = "ldo7";
328				regulator-min-microvolt = <1800000>;
329				regulator-max-microvolt = <3300000>;
330				regulator-boot-on;
331			};
332		};
333	};
334
335	typec_ptn5100: usb_typec@52 {
336		compatible = "nxp,ptn5110";
337		reg = <0x52>;
338		pinctrl-names = "default";
339		pinctrl-0 = <&pinctrl_typec>;
340		interrupt-parent = <&gpio3>;
341		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
342
343		connector {
344			compatible = "usb-c-connector";
345			label = "USB-C";
346			data-role = "dual";
347			power-role = "dual";
348			try-power-role = "sink";
349			source-pdos = <PDO_FIXED(5000, 2000,
350				PDO_FIXED_USB_COMM |
351				PDO_FIXED_DUAL_ROLE |
352				PDO_FIXED_DATA_SWAP )>;
353			sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM |
354				PDO_FIXED_DUAL_ROLE |
355				PDO_FIXED_DATA_SWAP )
356			     PDO_VAR(5000, 12000, 2000)>;
357			op-sink-microwatt = <10000000>;
358
359			ports {
360				#address-cells = <1>;
361				#size-cells = <0>;
362
363				port@0 {
364					reg = <0>;
365
366					usb_con_hs: endpoint {
367						remote-endpoint = <&typec_hs>;
368					};
369				};
370
371				port@1 {
372					reg = <1>;
373
374					usb_con_ss: endpoint {
375						remote-endpoint = <&typec_ss>;
376					};
377				};
378			};
379		};
380	};
381
382	rtc@68 {
383		compatible = "microcrystal,rv4162";
384		reg = <0x68>;
385		pinctrl-names = "default";
386		pinctrl-0 = <&pinctrl_rtc>;
387		interrupt-parent = <&gpio4>;
388		interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
389	};
390
391	charger@6b { /* bq25896 */
392		compatible = "ti,bq25890";
393		reg = <0x6b>;
394		pinctrl-names = "default";
395		pinctrl-0 = <&pinctrl_charger>;
396		interrupt-parent = <&gpio3>;
397		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
398		ti,battery-regulation-voltage = <4192000>; /* 4.192V */
399		ti,charge-current = <1600000>; /* 1.6A */
400		ti,termination-current = <66000>;  /* 66mA */
401		ti,precharge-current = <130000>; /* 130mA */
402		ti,minimum-sys-voltage = <3000000>; /* 3V */
403		ti,boost-voltage = <5000000>; /* 5V */
404		ti,boost-max-current = <50000>; /* 50mA */
405	};
406};
407
408&i2c3 {
409	clock-frequency = <100000>;
410	pinctrl-names = "default";
411	pinctrl-0 = <&pinctrl_i2c3>;
412	status = "okay";
413
414	magnetometer@1e	{
415		compatible = "st,lsm9ds1-magn";
416		reg = <0x1e>;
417		pinctrl-names = "default";
418		pinctrl-0 = <&pinctrl_imu>;
419		interrupt-parent = <&gpio3>;
420		interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
421		vdd-supply = <&reg_3v3_p>;
422		vddio-supply = <&reg_3v3_p>;
423	};
424
425	touchscreen@5d {
426		compatible = "goodix,gt5688";
427		reg = <0x5d>;
428		pinctrl-names = "default";
429		pinctrl-0 = <&pinctrl_ts>;
430		interrupt-parent = <&gpio3>;
431		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
432		reset-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
433		irq-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
434		touchscreen-size-x = <720>;
435		touchscreen-size-y = <1440>;
436		AVDD28-supply = <&reg_2v8_p>;
437		VDDIO-supply = <&reg_1v8_p>;
438	};
439};
440
441&iomuxc {
442	pinctrl_bl: blgrp {
443		fsl,pins = <
444			MX8MQ_IOMUXC_GPIO1_IO01_PWM1_OUT	0x6 /* DSI_BL_PWM */
445		>;
446	};
447
448	pinctrl_bt: btgrp {
449		fsl,pins = <
450			MX8MQ_IOMUXC_NAND_DATA05_GPIO3_IO11	0x16 /* nBT_DISABLE */
451			MX8MQ_IOMUXC_NAND_DATA01_GPIO3_IO7	0x10 /* BT_HOST_WAKE */
452		>;
453	};
454
455	pinctrl_charger: chargergrp {
456		fsl,pins = <
457			MX8MQ_IOMUXC_SAI5_MCLK_GPIO3_IO25	0x80 /* CHRG_nINT */
458		>;
459	};
460
461	pinctrl_fec1: fec1grp {
462		fsl,pins = <
463			MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC			0x3
464			MX8MQ_IOMUXC_ENET_MDIO_ENET1_MDIO		0x3
465			MX8MQ_IOMUXC_ENET_TD3_ENET1_RGMII_TD3		0x1f
466			MX8MQ_IOMUXC_ENET_TD2_ENET1_RGMII_TD2		0x1f
467			MX8MQ_IOMUXC_ENET_TD1_ENET1_RGMII_TD1		0x1f
468			MX8MQ_IOMUXC_ENET_TD0_ENET1_RGMII_TD0		0x1f
469			MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3		0x91
470			MX8MQ_IOMUXC_ENET_RD2_ENET1_RGMII_RD2		0x91
471			MX8MQ_IOMUXC_ENET_RD1_ENET1_RGMII_RD1		0x91
472			MX8MQ_IOMUXC_ENET_RD0_ENET1_RGMII_RD0		0x91
473			MX8MQ_IOMUXC_ENET_TXC_ENET1_RGMII_TXC		0x1f
474			MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC		0x91
475			MX8MQ_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL	0x91
476			MX8MQ_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL	0x1f
477			MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9		0x19
478			MX8MQ_IOMUXC_GPIO1_IO15_CCMSRCGPCMIX_CLKO2      0x1f
479		>;
480	};
481
482	pinctrl_ts: tsgrp {
483		fsl,pins = <
484			MX8MQ_IOMUXC_NAND_ALE_GPIO3_IO0		0x16  /* TOUCH INT */
485			MX8MQ_IOMUXC_GPIO1_IO05_GPIO1_IO5	0x19  /* TOUCH RST */
486		>;
487	};
488
489	pinctrl_gpio_leds: gpioledgrp {
490		fsl,pins = <
491			MX8MQ_IOMUXC_GPIO1_IO13_GPIO1_IO13	0x16
492		>;
493	};
494
495	pinctrl_gpio_keys: gpiokeygrp {
496		fsl,pins = <
497			MX8MQ_IOMUXC_SAI2_RXFS_GPIO4_IO21	0x16
498			MX8MQ_IOMUXC_SAI2_RXC_GPIO4_IO22	0x16
499			MX8MQ_IOMUXC_SAI5_RXC_GPIO3_IO20	0x180  /* HP_DET */
500		>;
501	};
502
503	pinctrl_haptic: hapticgrp {
504		fsl,pins = <
505			MX8MQ_IOMUXC_SPDIF_RX_GPIO5_IO4		0xc6   /* nHAPTIC */
506		>;
507	};
508
509	pinctrl_i2c1: i2c1grp {
510		fsl,pins = <
511			MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL		0x4000001f
512			MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA		0x4000001f
513		>;
514	};
515
516	pinctrl_i2c3: i2c3grp {
517		fsl,pins = <
518			MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL		0x4000001f
519			MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA		0x4000001f
520		>;
521	};
522
523	pinctrl_imu: imugrp {
524		fsl,pins = <
525			MX8MQ_IOMUXC_SAI5_RXFS_GPIO3_IO19	0x8  /* IMU_INT */
526		>;
527	};
528
529	pinctrl_pmic: pmicgrp {
530		fsl,pins = <
531			MX8MQ_IOMUXC_GPIO1_IO03_GPIO1_IO3	0x80  /* PMIC intr */
532		>;
533	};
534
535	pinctrl_pwr_en: pwrengrp {
536		fsl,pins = <
537			MX8MQ_IOMUXC_GPIO1_IO08_GPIO1_IO8	0x06
538		>;
539	};
540
541	pinctrl_rtc: rtcgrp {
542		fsl,pins = <
543			MX8MQ_IOMUXC_SAI3_RXC_GPIO4_IO29	0x80  /* RTC intr */
544		>;
545	};
546
547	pinctrl_typec: typecgrp {
548		fsl,pins = <
549			MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12		0x16
550			MX8MQ_IOMUXC_NAND_CE0_B_GPIO3_IO1		0x80
551		>;
552	};
553
554	pinctrl_uart1: uart1grp {
555		fsl,pins = <
556			MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX		0x49
557			MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX		0x49
558		>;
559	};
560
561	pinctrl_uart2: uart2grp {
562		fsl,pins = <
563			MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX		0x49
564			MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX		0x49
565			MX8MQ_IOMUXC_UART4_RXD_UART2_DCE_CTS_B		0x49
566			MX8MQ_IOMUXC_UART4_TXD_UART2_DCE_RTS_B		0x49
567		>;
568	};
569
570	pinctrl_uart3: uart3grp {
571		fsl,pins = <
572			MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX		0x49
573			MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX		0x49
574		>;
575	};
576
577	pinctrl_uart4: uart4grp {
578		fsl,pins = <
579			MX8MQ_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX		0x49
580			MX8MQ_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX		0x49
581			MX8MQ_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B	0x49
582			MX8MQ_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B		0x49
583			MX8MQ_IOMUXC_GPIO1_IO00_ANAMIX_REF_CLK_32K	0x49
584		>;
585	};
586
587	pinctrl_usdhc1: usdhc1grp {
588		fsl,pins = <
589			MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK			0x83
590			MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD			0xc3
591			MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0		0xc3
592			MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1		0xc3
593			MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2		0xc3
594			MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3		0xc3
595			MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4		0xc3
596			MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5		0xc3
597			MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6		0xc3
598			MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7		0xc3
599			MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE		0x83
600			MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B		0xc1
601		>;
602	};
603
604	pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
605		fsl,pins = <
606			MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK			0x8d
607			MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD			0xcd
608			MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0		0xcd
609			MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1		0xcd
610			MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2		0xcd
611			MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3		0xcd
612			MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4		0xcd
613			MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5		0xcd
614			MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6		0xcd
615			MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7		0xcd
616			MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE		0x8d
617			MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B		0xc1
618		>;
619	};
620
621	pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
622		fsl,pins = <
623			MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK			0x9f
624			MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD			0xdf
625			MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0		0xdf
626			MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1		0xdf
627			MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2		0xdf
628			MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3		0xdf
629			MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4		0xdf
630			MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5		0xdf
631			MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6		0xdf
632			MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7		0xdf
633			MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE		0x9f
634			MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B		0xc1
635		>;
636	};
637
638	pinctrl_usdhc2_pwr: usdhc2grppwr {
639		fsl,pins = <
640			MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19	0x41
641		>;
642	};
643
644	pinctrl_usdhc2_gpio: usdhc2grpgpio {
645		fsl,pins = <
646			MX8MQ_IOMUXC_SD2_WP_GPIO2_IO20		0x80 /* WIFI_WAKE */
647		>;
648	};
649
650	pinctrl_usdhc2: usdhc2grp {
651		fsl,pins = <
652			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK		0x83
653			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD		0xc3
654			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0	0xc3
655			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xc3
656			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xc3
657			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xc3
658		>;
659	};
660
661	pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
662		fsl,pins = <
663			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK		0x8d
664			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD		0xcd
665			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0	0xcd
666			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcd
667			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcd
668			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcd
669		>;
670	};
671
672	pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
673		fsl,pins = <
674			MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK		0x9f
675			MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD		0xcf
676			MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0	0xcf
677			MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1	0xcf
678			MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2	0xcf
679			MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3	0xcf
680		>;
681	};
682
683	pinctrl_wdog: wdoggrp {
684		fsl,pins = <
685			MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0xc6
686		>;
687	};
688
689	pinctrl_wifi_pwr_en: wifipwrengrp {
690		fsl,pins = <
691			MX8MQ_IOMUXC_NAND_CLE_GPIO3_IO5         0x06
692		>;
693	};
694
695	pinctrl_wwan: wwangrp {
696		fsl,pins = <
697			MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4	0x09 /* nWWAN_DISABLE */
698			MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8	0x80 /* nWoWWAN */
699			MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9	0x19 /* WWAN_RESET */
700		>;
701	};
702};
703
704&pgc_gpu {
705	power-supply = <&buck3_reg>;
706};
707
708&pgc_vpu {
709	power-supply = <&buck4_reg>;
710};
711
712&pwm1 {
713	pinctrl-names = "default";
714	pinctrl-0 = <&pinctrl_bl>;
715	status = "okay";
716};
717
718
719&uart1 { /* console */
720	pinctrl-names = "default";
721	pinctrl-0 = <&pinctrl_uart1>;
722	status = "okay";
723};
724
725&uart3 { /* GNSS */
726	pinctrl-names = "default";
727	pinctrl-0 = <&pinctrl_uart3>;
728	status = "okay";
729};
730
731&uart4 { /* BT */
732	pinctrl-names = "default";
733	pinctrl-0 = <&pinctrl_uart4>, <&pinctrl_bt>;
734	uart-has-rtscts;
735	status = "okay";
736};
737
738&usb3_phy0 {
739	status = "okay";
740};
741
742&usb3_phy1 {
743	vbus-supply = <&reg_5v_p>;
744	status = "okay";
745};
746
747&usb_dwc3_0 {
748	#address-cells = <1>;
749	#size-cells = <0>;
750	dr_mode = "otg";
751	status = "okay";
752
753	port@0 {
754		reg = <0>;
755
756		typec_hs: endpoint {
757			remote-endpoint = <&usb_con_hs>;
758		};
759	};
760
761	port@1 {
762		reg = <1>;
763
764		typec_ss: endpoint {
765			remote-endpoint = <&usb_con_ss>;
766		};
767	};
768};
769
770&usb_dwc3_1 {
771	dr_mode = "host";
772	status = "okay";
773};
774
775&usdhc1 {
776	pinctrl-names = "default", "state_100mhz", "state_200mhz";
777	pinctrl-0 = <&pinctrl_usdhc1>;
778	pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
779	pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
780	bus-width = <8>;
781	non-removable;
782	status = "okay";
783};
784
785&usdhc2 {
786	pinctrl-names = "default", "state_100mhz", "state_200mhz";
787	pinctrl-0 = <&pinctrl_usdhc2>;
788	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
789	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
790	bus-width = <4>;
791	vmmc-supply = <&reg_usdhc2_vmmc>;
792	power-supply = <&wifi_pwr_en>;
793	non-removable;
794	disable-wp;
795	cap-sdio-irq;
796	keep-power-in-suspend;
797	wakeup-source;
798	status = "okay";
799};
800
801&wdog1 {
802	pinctrl-names = "default";
803	pinctrl-0 = <&pinctrl_wdog>;
804	fsl,ext-reset-output;
805	status = "okay";
806};
807