Debian Codegraph @

arch/arm64/boot/dts/freescale/imx8mm-phyboard-polis-rdk.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2 /*
3 * Copyright (C) 2022 PHYTEC Messtechnik GmbH
4 */
5
6 /dts-v1/;
7
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/phy/phy-imx8-pcie.h>
11 #include "imx8mm-phycore-som.dtsi"
12
13 / {
14 model = "PHYTEC phyBOARD-Polis-i.MX8MM RDK";
15 compatible = "phytec,imx8mm-phyboard-polis-rdk",
16 "phytec,imx8mm-phycore-som", "fsl,imx8mm";
17
18 chosen {
19 stdout-path = &uart3;
20 };
21
22 bt_osc_32k: bt-lp-clock {
23 compatible = "fixed-clock";
24 clock-frequency = <32768>;
25 clock-output-names = "bt_osc_32k";
26 #clock-cells = <0>;
27 };
28
29 can_osc_40m: can-clock {
30 compatible = "fixed-clock";
31 clock-frequency = <40000000>;
32 clock-output-names = "can_osc_40m";
33 #clock-cells = <0>;
34 };
35
36 fan {
37 compatible = "gpio-fan";
38 gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;
39 gpio-fan,speed-map = <0 0
40 13000 1>;
41 pinctrl-names = "default";
42 pinctrl-0 = <&pinctrl_fan>;
43 #cooling-cells = <2>;
44 };
45
46 leds {
47 compatible = "gpio-leds";
48 pinctrl-names = "default";
49 pinctrl-0 = <&pinctrl_leds>;
50
51 led-0 {
52 color = <LED_COLOR_ID_RED>;
53 function = LED_FUNCTION_DISK;
54 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
55 linux,default-trigger = "mmc2";
56 };
57
58 led-1 {
59 color = <LED_COLOR_ID_BLUE>;
60 function = LED_FUNCTION_DISK;
61 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
62 linux,default-trigger = "mmc1";
63 };
64
65 led-2 {
66 color = <LED_COLOR_ID_GREEN>;
67 function = LED_FUNCTION_CPU;
68 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
69 linux,default-trigger = "heartbeat";
70 };
71 };
72
73 usdhc1_pwrseq: pwr-seq {
74 compatible = "mmc-pwrseq-simple";
75 post-power-on-delay-ms = <100>;
76 power-off-delay-us = <60>;
77 reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
78 };
79
80 reg_can_en: regulator-can-en {
81 compatible = "regulator-fixed";
82 gpio = <&gpio1 9 GPIO_ACTIVE_LOW>;
83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_can_en>;
85 regulator-max-microvolt = <3300000>;
86 regulator-min-microvolt = <3300000>;
87 regulator-name = "CAN_EN";
88 startup-delay-us = <20>;
89 };
90
91 reg_usb_otg1_vbus: regulator-usb-otg1 {
92 compatible = "regulator-fixed";
93 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
94 enable-active-high;
95 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_usbotg1pwrgrp>;
97 regulator-name = "usb_otg1_vbus";
98 regulator-max-microvolt = <5000000>;
99 regulator-min-microvolt = <5000000>;
100 };
101
102 reg_usdhc2_vmmc: regulator-usdhc2 {
103 compatible = "regulator-fixed";
104 gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 off-on-delay-us = <20000>;
107 pinctrl-names = "default";
108 pinctrl-0 = <&pinctrl_reg_usdhc2_vmmc>;
109 regulator-max-microvolt = <3300000>;
110 regulator-min-microvolt = <3300000>;
111 regulator-name = "VSD_3V3";
112 };
113
114 reg_vcc_3v3: regulator-vcc-3v3 {
115 compatible = "regulator-fixed";
116 regulator-max-microvolt = <3300000>;
117 regulator-min-microvolt = <3300000>;
118 regulator-name = "VCC_3V3";
119 };
120 };
121
122 /* SPI - CAN MCP251XFD */
123 &ecspi1 {
124 cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
125 pinctrl-names = "default";
126 pinctrl-0 = <&pinctrl_ecspi1>;
127 status = "okay";
128
129 can0: can@0 {
130 compatible = "microchip,mcp251xfd";
131 clocks = <&can_osc_40m>;
132 interrupt-parent = <&gpio1>;
133 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
134 pinctrl-names = "default";
135 pinctrl-0 = <&pinctrl_can_int>;
136 reg = <0>;
137 spi-max-frequency = <20000000>;
138 xceiver-supply = <&reg_can_en>;
139 };
140 };
141
142 /* TPM */
143 &ecspi2 {
144 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
145 pinctrl-names = "default";
146 pinctrl-0 = <&pinctrl_ecspi2>;
147 #address-cells = <1>;
148 #size-cells = <0>;
149 status = "okay";
150
151 tpm: tpm@0 {
152 compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
153 interrupt-parent = <&gpio2>;
154 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
155 pinctrl-names = "default";
156 pinctrl-0 = <&pinctrl_tpm>;
157 reg = <0>;
158 spi-max-frequency = <43000000>;
159 };
160 };
161
162 &gpio1 {
163 gpio-line-names = "", "LED_RED", "WDOG_INT", "X_RTC_INT",
164 "", "", "", "RESET_ETHPHY",
165 "CAN_nINT", "CAN_EN", "nENABLE_FLATLINK", "",
166 "USB_OTG_VBUS_EN", "", "LED_GREEN", "LED_BLUE";
167 };
168
169 &gpio2 {
170 gpio-line-names = "", "", "", "",
171 "", "", "BT_REG_ON", "WL_REG_ON",
172 "BT_DEV_WAKE", "BT_HOST_WAKE", "", "",
173 "X_SD2_CD_B", "", "", "",
174 "", "", "", "SD2_RESET_B";
175 };
176
177 &gpio4 {
178 gpio-line-names = "", "", "", "",
179 "", "", "", "",
180 "FAN", "miniPCIe_nPERST", "", "",
181 "COEX1", "COEX2";
182 };
183
184 &gpio5 {
185 gpio-line-names = "", "", "", "",
186 "", "", "", "",
187 "", "ECSPI1_SS0";
188 };
189
190 &i2c4 {
191 clock-frequency = <400000>;
192 pinctrl-names = "default", "gpio";
193 pinctrl-0 = <&pinctrl_i2c4>;
194 pinctrl-1 = <&pinctrl_i2c4_gpio>;
195 sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
196 scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
197 };
198
199 /* PCIe */
200 &pcie0 {
201 assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>,
202 <&clk IMX8MM_CLK_PCIE1_CTRL>;
203 assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>,
204 <&clk IMX8MM_SYS_PLL2_250M>;
205 assigned-clock-rates = <10000000>, <250000000>;
206 pinctrl-names = "default";
207 pinctrl-0 = <&pinctrl_pcie>;
208 reset-gpio = <&gpio4 9 GPIO_ACTIVE_LOW>;
209 status = "okay";
210 };
211
212 &pcie_phy {
213 clocks = <&clk IMX8MM_CLK_PCIE1_PHY>;
214 fsl,clkreq-unsupported;
215 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>;
216 fsl,tx-deemph-gen1 = <0x2d>;
217 fsl,tx-deemph-gen2 = <0xf>;
218 status = "okay";
219 };
220
221 /* RTC */
222 &rv3028 {
223 interrupt-parent = <&gpio1>;
224 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
225 pinctrl-0 = <&pinctrl_rtc>;
226 pinctrl-names = "default";
227 aux-voltage-chargeable = <1>;
228 trickle-resistor-ohms = <3000>;
229 wakeup-source;
230 };
231
232 &snvs_pwrkey {
233 status = "okay";
234 };
235
236 /* UART - RS232/RS485 */
237 &uart1 {
238 assigned-clocks = <&clk IMX8MM_CLK_UART1>;
239 assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
240 pinctrl-names = "default";
241 pinctrl-0 = <&pinctrl_uart1>;
242 uart-has-rtscts;
243 status = "okay";
244 };
245
246 /* UART - Sterling-LWB Bluetooth */
247 &uart2 {
248 assigned-clocks = <&clk IMX8MM_CLK_UART2>;
249 assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
250 fsl,dte-mode;
251 pinctrl-names = "default";
252 pinctrl-0 = <&pinctrl_uart2_bt>;
253 uart-has-rtscts;
254 status = "okay";
255
256 bluetooth {
257 compatible = "brcm,bcm43438-bt";
258 clocks = <&bt_osc_32k>;
259 clock-names = "lpo";
260 device-wakeup-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
261 interrupt-names = "host-wakeup";
262 interrupt-parent = <&gpio2>;
263 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
264 max-speed = <2000000>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&pinctrl_bt>;
267 shutdown-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
268 vbat-supply = <&reg_vcc_3v3>;
269 vddio-supply = <&reg_vcc_3v3>;
270 };
271 };
272
273 /* UART - console */
274 &uart3 {
275 pinctrl-names = "default";
276 pinctrl-0 = <&pinctrl_uart3>;
277 status = "okay";
278 };
279
280 /* USB */
281 &usbotg1 {
282 adp-disable;
283 dr_mode = "otg";
284 over-current-active-low;
285 samsung,picophy-pre-emp-curr-control = <3>;
286 samsung,picophy-dc-vol-level-adjust = <7>;
287 pinctrl-0 = <&pinctrl_usbotg1>;
288 pinctrl-names = "default";
289 srp-disable;
290 vbus-supply = <&reg_usb_otg1_vbus>;
291 status = "okay";
292 };
293
294 &usbotg2 {
295 disable-over-current;
296 dr_mode = "host";
297 samsung,picophy-pre-emp-curr-control = <3>;
298 samsung,picophy-dc-vol-level-adjust = <7>;
299 status = "okay";
300 };
301
302 /* SDIO - Sterling-LWB Wifi */
303 &usdhc1 {
304 assigned-clocks = <&clk IMX8MM_CLK_USDHC1>;
305 assigned-clock-rates = <200000000>;
306 bus-width = <4>;
307 mmc-pwrseq = <&usdhc1_pwrseq>;
308 non-removable;
309 no-1-8-v;
310 pinctrl-names = "default";
311 pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_wlan>;
312 #address-cells = <1>;
313 #size-cells = <0>;
314 status = "okay";
315
316 brcmf: wifi@1 {
317 compatible = "brcm,bcm4329-fmac";
318 reg = <1>;
319 };
320 };
321
322 /* SD-Card */
323 &usdhc2 {
324 assigned-clocks = <&clk IMX8MM_CLK_USDHC2>;
325 assigned-clock-rates = <200000000>;
326 bus-width = <4>;
327 cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
328 disable-wp;
329 pinctrl-names = "default", "state_100mhz", "state_200mhz";
330 pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
331 pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
332 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
333 vmmc-supply = <&reg_usdhc2_vmmc>;
334 vqmmc-supply = <&reg_nvcc_sd2>;
335 status = "okay";
336 };
337
338 &iomuxc {
339 pinctrl_bt: btgrp {
340 fsl,pins = <
341 MX8MM_IOMUXC_SD1_DATA4_GPIO2_IO6 0x00
342 MX8MM_IOMUXC_SD1_DATA6_GPIO2_IO8 0x00
343 MX8MM_IOMUXC_SD1_DATA7_GPIO2_IO9 0x140
344 >;
345 };
346
347 pinctrl_can_en: can-engrp {
348 fsl,pins = <
349 MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x00
350 >;
351 };
352
353 pinctrl_can_int: can-intgrp {
354 fsl,pins = <
355 MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x00
356 >;
357 };
358
359 pinctrl_ecspi1: ecspi1grp {
360 fsl,pins = <
361 MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x80
362 MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x80
363 MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x80
364 MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x00
365 >;
366 };
367
368 pinctrl_ecspi2: ecspi2grp {
369 fsl,pins = <
370 MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x80
371 MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x80
372 MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x80
373 MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x00
374 >;
375 };
376
377 pinctrl_fan: fan0grp {
378 fsl,pins = <
379 MX8MM_IOMUXC_SAI1_RXD6_GPIO4_IO8 0x16
380 >;
381 };
382
383 pinctrl_i2c4: i2c4grp {
384 fsl,pins = <
385 MX8MM_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c2
386 MX8MM_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c2
387 >;
388 };
389
390 pinctrl_i2c4_gpio: i2c4gpiogrp {
391 fsl,pins = <
392 MX8MM_IOMUXC_I2C4_SCL_GPIO5_IO20 0x1e2
393 MX8MM_IOMUXC_I2C4_SDA_GPIO5_IO21 0x1e2
394 >;
395 };
396
397 pinctrl_leds: leds1grp {
398 fsl,pins = <
399 MX8MM_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x16
400 MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x16
401 MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x16
402 >;
403 };
404
405 pinctrl_pcie: pciegrp {
406 fsl,pins = <
407 MX8MM_IOMUXC_SAI1_RXD7_GPIO4_IO9 0x00
408 MX8MM_IOMUXC_SAI1_TXD0_GPIO4_IO12 0x12
409 MX8MM_IOMUXC_SAI1_TXD7_GPIO4_IO19 0x12
410 >;
411 };
412
413 pinctrl_reg_usdhc2_vmmc: regusdhc2vmmcgrp {
414 fsl,pins = <
415 MX8MM_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x40
416 >;
417 };
418
419 pinctrl_rtc: rtcgrp {
420 fsl,pins = <
421 MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x1c0
422 >;
423 };
424
425 pinctrl_tpm: tpmgrp {
426 fsl,pins = <
427 MX8MM_IOMUXC_SD1_STROBE_GPIO2_IO11 0x140
428 >;
429 };
430
431 pinctrl_uart1: uart1grp {
432 fsl,pins = <
433 MX8MM_IOMUXC_SAI2_RXC_UART1_DCE_RX 0x00
434 MX8MM_IOMUXC_SAI2_RXD0_UART1_DCE_RTS_B 0x00
435 MX8MM_IOMUXC_SAI2_RXFS_UART1_DCE_TX 0x00
436 MX8MM_IOMUXC_SAI2_TXFS_UART1_DCE_CTS_B 0x00
437 >;
438 };
439
440 pinctrl_uart2_bt: uart2btgrp {
441 fsl,pins = <
442 MX8MM_IOMUXC_SAI3_RXC_UART2_DTE_RTS_B 0x00
443 MX8MM_IOMUXC_SAI3_RXD_UART2_DTE_CTS_B 0x00
444 MX8MM_IOMUXC_SAI3_TXC_UART2_DTE_RX 0x00
445 MX8MM_IOMUXC_SAI3_TXFS_UART2_DTE_TX 0x00
446 >;
447 };
448
449 pinctrl_uart3: uart3grp {
450 fsl,pins = <
451 MX8MM_IOMUXC_UART3_RXD_UART3_DCE_RX 0x140
452 MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140
453 >;
454 };
455
456 pinctrl_usbotg1pwrgrp: usbotg1pwrgrp {
457 fsl,pins = <
458 MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x00
459 >;
460 };
461
462 pinctrl_usbotg1: usbotg1grp {
463 fsl,pins = <
464 MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x00
465 >;
466 };
467
468 pinctrl_usdhc1: usdhc1grp {
469 fsl,pins = <
470 MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x182
471 MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0xc6
472 MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc6
473 MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc6
474 MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc6
475 MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc6
476 >;
477 };
478
479 pinctrl_usdhc2_gpio: usdhc2gpiogrp {
480 fsl,pins = <
481 MX8MM_IOMUXC_SD2_CD_B_GPIO2_IO12 0x40
482 >;
483 };
484
485 pinctrl_usdhc2: usdhc2grp {
486 fsl,pins = <
487 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
488 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x192
489 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d2
490 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d2
491 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d2
492 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d2
493 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d2
494 >;
495 };
496
497 pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
498 fsl,pins = <
499 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
500 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x194
501 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d4
502 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d4
503 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d4
504 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d4
505 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d4
506 >;
507 };
508
509 pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
510 fsl,pins = <
511 MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x1d0
512 MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x196
513 MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x1d6
514 MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x1d6
515 MX8MM_IOMUXC_SD2_DATA1_USDHC2_DATA1 0x1d6
516 MX8MM_IOMUXC_SD2_DATA2_USDHC2_DATA2 0x1d6
517 MX8MM_IOMUXC_SD2_DATA3_USDHC2_DATA3 0x1d6
518 >;
519 };
520
521 pinctrl_wlan: wlangrp {
522 fsl,pins = <
523 MX8MM_IOMUXC_SD1_DATA5_GPIO2_IO7 0x00
524 >;
525 };
526 };