blob: e7a2bd8a646ddb5aaa4de6881a54ac1d14f5e774 [file] [log] [blame]
Peng Fan8d3e37c2020-12-27 14:18:13 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright 2020 NXP
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/usb/pd.h>
9#include "imx8mm.dtsi"
10
11/ {
12 chosen {
13 stdout-path = &uart2;
14 };
15
16 memory@40000000 {
17 device_type = "memory";
18 reg = <0x0 0x40000000 0 0x80000000>;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23 pinctrl-names = "default";
24 pinctrl-0 = <&pinctrl_gpio_led>;
25
26 status {
27 label = "status";
28 gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
29 default-state = "on";
30 };
31 };
32
33 reg_usdhc2_vmmc: regulator-usdhc2 {
34 compatible = "regulator-fixed";
35 pinctrl-names = "default";
36 pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
37 regulator-name = "VSD_3V3";
38 regulator-min-microvolt = <3300000>;
39 regulator-max-microvolt = <3300000>;
40 gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
41 enable-active-high;
42 };
43
Tommaso Merciai3c9d1942022-03-26 12:19:09 +010044 backlight: backlight {
45 status = "disabled";
46 compatible = "pwm-backlight";
47 pwms = <&pwm1 0 5000000>;
48 brightness-levels = <0 255>;
49 num-interpolated-steps = <255>;
50 default-brightness-level = <250>;
51 };
52
Peng Fan8d3e37c2020-12-27 14:18:13 +080053 ir-receiver {
54 compatible = "gpio-ir-receiver";
55 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
56 pinctrl-names = "default";
57 pinctrl-0 = <&pinctrl_ir>;
58 linux,autosuspend-period = <125>;
59 };
60
61 wm8524: audio-codec {
62 #sound-dai-cells = <0>;
63 compatible = "wlf,wm8524";
64 pinctrl-names = "default";
65 pinctrl-0 = <&pinctrl_gpio_wlf>;
66 wlf,mute-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
67 };
68
69 sound-wm8524 {
70 compatible = "simple-audio-card";
71 simple-audio-card,name = "wm8524-audio";
72 simple-audio-card,format = "i2s";
73 simple-audio-card,frame-master = <&cpudai>;
74 simple-audio-card,bitclock-master = <&cpudai>;
75 simple-audio-card,widgets =
76 "Line", "Left Line Out Jack",
77 "Line", "Right Line Out Jack";
78 simple-audio-card,routing =
79 "Left Line Out Jack", "LINEVOUTL",
80 "Right Line Out Jack", "LINEVOUTR";
81
82 cpudai: simple-audio-card,cpu {
83 sound-dai = <&sai3>;
84 dai-tdm-slot-num = <2>;
85 dai-tdm-slot-width = <32>;
86 };
87
88 simple-audio-card,codec {
89 sound-dai = <&wm8524>;
90 clocks = <&clk IMX8MM_CLK_SAI3_ROOT>;
91 };
92 };
93};
94
95&A53_0 {
96 cpu-supply = <&buck2_reg>;
97};
98
99&A53_1 {
100 cpu-supply = <&buck2_reg>;
101};
102
103&A53_2 {
104 cpu-supply = <&buck2_reg>;
105};
106
107&A53_3 {
108 cpu-supply = <&buck2_reg>;
109};
110
111&fec1 {
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_fec1>;
114 phy-mode = "rgmii-id";
115 phy-handle = <&ethphy0>;
116 fsl,magic-packet;
117 status = "okay";
118
119 mdio {
120 #address-cells = <1>;
121 #size-cells = <0>;
122
123 ethphy0: ethernet-phy@0 {
124 compatible = "ethernet-phy-ieee802.3-c22";
125 reg = <0>;
126 reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
127 reset-assert-us = <10000>;
128 };
129 };
130};
131
132&i2c1 {
133 clock-frequency = <400000>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&pinctrl_i2c1>;
136 status = "okay";
137
Ye Li48ddafd2021-03-19 15:56:55 +0800138 pmic: pca9450@25 {
139 reg = <0x25>;
140 compatible = "nxp,pca9450a";
141 /* PMIC PCA9450 PMIC_nINT GPIO1_IO3 */
Peng Fan8d3e37c2020-12-27 14:18:13 +0800142 pinctrl-0 = <&pinctrl_pmic>;
Ye Li48ddafd2021-03-19 15:56:55 +0800143 gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800144
145 regulators {
Ye Li48ddafd2021-03-19 15:56:55 +0800146 #address-cells = <1>;
147 #size-cells = <0>;
148
149 pca9450,pmic-buck2-uses-i2c-dvs;
150 /* Run/Standby voltage */
151 pca9450,pmic-buck2-dvs-voltage = <950000>, <850000>;
152
153 buck1_reg: regulator@0 {
154 reg = <0>;
155 regulator-compatible = "buck1";
156 regulator-min-microvolt = <600000>;
157 regulator-max-microvolt = <2187500>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800158 regulator-boot-on;
159 regulator-always-on;
Ye Li48ddafd2021-03-19 15:56:55 +0800160 regulator-ramp-delay = <3125>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800161 };
162
Ye Li48ddafd2021-03-19 15:56:55 +0800163 buck2_reg: regulator@1 {
164 reg = <1>;
165 regulator-compatible = "buck2";
166 regulator-min-microvolt = <600000>;
167 regulator-max-microvolt = <2187500>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800168 regulator-boot-on;
169 regulator-always-on;
Ye Li48ddafd2021-03-19 15:56:55 +0800170 regulator-ramp-delay = <3125>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800171 };
172
Ye Li48ddafd2021-03-19 15:56:55 +0800173 buck3_reg: regulator@2 {
174 reg = <2>;
175 regulator-compatible = "buck3";
176 regulator-min-microvolt = <600000>;
177 regulator-max-microvolt = <2187500>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800178 regulator-boot-on;
179 regulator-always-on;
180 };
181
Ye Li48ddafd2021-03-19 15:56:55 +0800182 buck4_reg: regulator@3 {
183 reg = <3>;
184 regulator-compatible = "buck4";
185 regulator-min-microvolt = <600000>;
186 regulator-max-microvolt = <3400000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800187 regulator-boot-on;
188 regulator-always-on;
189 };
190
Ye Li48ddafd2021-03-19 15:56:55 +0800191 buck5_reg: regulator@4 {
192 reg = <4>;
193 regulator-compatible = "buck5";
194 regulator-min-microvolt = <600000>;
195 regulator-max-microvolt = <3400000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800196 regulator-boot-on;
197 regulator-always-on;
198 };
199
Ye Li48ddafd2021-03-19 15:56:55 +0800200 buck6_reg: regulator@5 {
201 reg = <5>;
202 regulator-compatible = "buck6";
203 regulator-min-microvolt = <600000>;
204 regulator-max-microvolt = <3400000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800205 regulator-boot-on;
206 regulator-always-on;
207 };
208
Ye Li48ddafd2021-03-19 15:56:55 +0800209 ldo1_reg: regulator@6 {
210 reg = <6>;
211 regulator-compatible = "ldo1";
Peng Fan8d3e37c2020-12-27 14:18:13 +0800212 regulator-min-microvolt = <1600000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-boot-on;
215 regulator-always-on;
216 };
217
Ye Li48ddafd2021-03-19 15:56:55 +0800218 ldo2_reg: regulator@7 {
219 reg = <7>;
220 regulator-compatible = "ldo2";
Peng Fan8d3e37c2020-12-27 14:18:13 +0800221 regulator-min-microvolt = <800000>;
Ye Li48ddafd2021-03-19 15:56:55 +0800222 regulator-max-microvolt = <1150000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800223 regulator-boot-on;
224 regulator-always-on;
225 };
226
Ye Li48ddafd2021-03-19 15:56:55 +0800227 ldo3_reg: regulator@8 {
228 reg = <8>;
229 regulator-compatible = "ldo3";
230 regulator-min-microvolt = <800000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800231 regulator-max-microvolt = <3300000>;
232 regulator-boot-on;
233 regulator-always-on;
234 };
235
Ye Li48ddafd2021-03-19 15:56:55 +0800236 ldo4_reg: regulator@9 {
237 reg = <9>;
238 regulator-compatible = "ldo4";
239 regulator-min-microvolt = <800000>;
240 regulator-max-microvolt = <3300000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800241 regulator-boot-on;
242 regulator-always-on;
243 };
244
Ye Li48ddafd2021-03-19 15:56:55 +0800245 ldo5_reg: regulator@10 {
246 reg = <10>;
247 regulator-compatible = "ldo5";
248 regulator-min-microvolt = <1800000>;
249 regulator-max-microvolt = <3300000>;
Peng Fan8d3e37c2020-12-27 14:18:13 +0800250 };
Ye Li48ddafd2021-03-19 15:56:55 +0800251
Peng Fan8d3e37c2020-12-27 14:18:13 +0800252 };
253 };
254};
255
256&i2c2 {
257 clock-frequency = <400000>;
258 pinctrl-names = "default";
259 pinctrl-0 = <&pinctrl_i2c2>;
260 status = "okay";
261
262 ptn5110: tcpc@50 {
263 compatible = "nxp,ptn5110";
264 pinctrl-names = "default";
265 pinctrl-0 = <&pinctrl_typec1>;
266 reg = <0x50>;
267 interrupt-parent = <&gpio2>;
268 interrupts = <11 8>;
269 status = "okay";
270
271 port {
272 typec1_dr_sw: endpoint {
273 remote-endpoint = <&usb1_drd_sw>;
274 };
275 };
276
277 typec1_con: connector {
278 compatible = "usb-c-connector";
279 label = "USB-C";
280 power-role = "dual";
281 data-role = "dual";
282 try-power-role = "sink";
283 source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
284 sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
285 PDO_VAR(5000, 20000, 3000)>;
286 op-sink-microwatt = <15000000>;
287 self-powered;
288 };
289 };
290};
291
292&i2c3 {
293 clock-frequency = <400000>;
294 pinctrl-names = "default";
295 pinctrl-0 = <&pinctrl_i2c3>;
296 status = "okay";
297
298 pca6416: gpio@20 {
299 compatible = "ti,tca6416";
300 reg = <0x20>;
301 gpio-controller;
302 #gpio-cells = <2>;
303 };
304};
305
306&sai3 {
307 pinctrl-names = "default";
308 pinctrl-0 = <&pinctrl_sai3>;
309 assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
310 assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
311 assigned-clock-rates = <24576000>;
312 status = "okay";
313};
314
315&snvs_pwrkey {
316 status = "okay";
317};
318
319&uart2 { /* console */
320 pinctrl-names = "default";
321 pinctrl-0 = <&pinctrl_uart2>;
322 status = "okay";
323};
324
325&usbotg1 {
326 dr_mode = "otg";
327 hnp-disable;
328 srp-disable;
329 adp-disable;
330 usb-role-switch;
331 samsung,picophy-pre-emp-curr-control = <3>;
332 samsung,picophy-dc-vol-level-adjust = <7>;
333 status = "okay";
334
335 port {
336 usb1_drd_sw: endpoint {
337 remote-endpoint = <&typec1_dr_sw>;
338 };
339 };
340};
341
342&usdhc2 {
343 assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
344 assigned-clock-rates = <200000000>;
345 pinctrl-names = "default", "state_100mhz", "state_200mhz";
346 pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
347 pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
348 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
349 cd-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
350 bus-width = <4>;
351 vmmc-supply = <&reg_usdhc2_vmmc>;
352 status = "okay";
353};
354
355&wdog1 {
356 pinctrl-names = "default";
357 pinctrl-0 = <&pinctrl_wdog>;
358 fsl,ext-reset-output;
359 status = "okay";
360};
361
Tommaso Merciai3c9d1942022-03-26 12:19:09 +0100362&pwm1 {
363 pinctrl-names = "default";
364 pinctrl-0 = <&pinctrl_backlight>;
365 status = "disabled";
366};
367
Peng Fan8d3e37c2020-12-27 14:18:13 +0800368&iomuxc {
369 pinctrl_fec1: fec1grp {
370 fsl,pins = <
371 MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3
372 MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x3
373 MX8MM_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f
374 MX8MM_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f
375 MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f
376 MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f
377 MX8MM_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91
378 MX8MM_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91
379 MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91
380 MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91
381 MX8MM_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f
382 MX8MM_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91
383 MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91
384 MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f
385 MX8MM_IOMUXC_SAI2_RXC_GPIO4_IO22 0x19
386 >;
387 };
388
389 pinctrl_gpio_led: gpioledgrp {
390 fsl,pins = <
391 MX8MM_IOMUXC_NAND_READY_B_GPIO3_IO16 0x19
392 >;
393 };
394
395 pinctrl_ir: irgrp {
396 fsl,pins = <
397 MX8MM_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x4f
398 >;
399 };
400
401 pinctrl_gpio_wlf: gpiowlfgrp {
402 fsl,pins = <
403 MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0xd6
404 >;
405 };
406
407 pinctrl_i2c1: i2c1grp {
408 fsl,pins = <
409 MX8MM_IOMUXC_I2C1_SCL_I2C1_SCL 0x400001c3
410 MX8MM_IOMUXC_I2C1_SDA_I2C1_SDA 0x400001c3
411 >;
412 };
413
414 pinctrl_i2c2: i2c2grp {
415 fsl,pins = <
416 MX8MM_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3
417 MX8MM_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3
418 >;
419 };
420
421 pinctrl_i2c3: i2c3grp {
422 fsl,pins = <
423 MX8MM_IOMUXC_I2C3_SCL_I2C3_SCL 0x400001c3
424 MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3
425 >;
426 };
427
428 pinctrl_pmic: pmicirqgrp {
429 fsl,pins = <
430 MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x141
431 >;
432 };
433
434 pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
435 fsl,pins = <
436 MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
437 >;
438 };
439
440 pinctrl_sai3: sai3grp {
441 fsl,pins = <
442 MX8MM_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6
443 MX8MM_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6
444 MX8MM_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6
445 MX8MM_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6
446 >;
447 };
448
449 pinctrl_typec1: typec1grp {
450 fsl,pins = <
451 MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x159
452 >;
453 };
454
455 pinctrl_uart2: uart2grp {
456 fsl,pins = <
457 MX8MM_IOMUXC_UART2_RXD_UART2_DCE_RX 0x140
458 MX8MM_IOMUXC_UART2_TXD_UART2_DCE_TX 0x140
459 >;
460 };
461
462 pinctrl_usdhc2_gpio: usdhc2grpgpiogrp {
463 fsl,pins = <
464 MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x1c4
465 >;
466 };
467
468 pinctrl_usdhc2: usdhc2grp {
469 fsl,pins = <
470 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
471 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d0
472 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d0
473 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d0
474 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d0
475 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d0
476 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
477 >;
478 };
479
480 pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
481 fsl,pins = <
482 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
483 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
484 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
485 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
486 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
487 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
488 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
489 >;
490 };
491
492 pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
493 fsl,pins = <
494 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
495 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
496 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
497 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
498 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
499 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
500 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
501 >;
502 };
503
504 pinctrl_wdog: wdoggrp {
505 fsl,pins = <
506 MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
507 >;
508 };
Tommaso Merciai3c9d1942022-03-26 12:19:09 +0100509
510 pinctrl_backlight: backlightgrp {
511 fsl,pins = <
512 MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x06
513 >;
514 };
Peng Fan8d3e37c2020-12-27 14:18:13 +0800515};