1/*
2 * Copyright (c) 2022-2024 PHYTEC Messtechnik GmbH
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <nxp/nxp_imx8mm_m4.dtsi>
10#include "phyboard_polis-pinctrl.dtsi"
11
12/ {
13	model = "phyBOARD-Polis i.MX8M Mini";
14	compatible = "nxp,phyboard_polis";
15
16	aliases {
17		uart-4 = &uart4;
18		uart-3 = &uart3;
19		uart-2 = &uart2;
20		uart-1 = &uart1;
21		led0 = &led_blue;
22	};
23
24	chosen {
25		zephyr,flash = &tcml_code;
26		zephyr,sram = &tcmu_sys;
27		zephyr,console = &uart4;
28		zephyr,shell-uart = &uart4;
29		zephyr,canbus = &mcp2518;
30	};
31
32	leds {
33		compatible = "gpio-leds";
34
35		led_red: led_red {
36			gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
37		};
38
39		led_blue: led_blue {
40			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
41		};
42
43		led_green: led_green {
44			gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
45		};
46	};
47
48};
49
50&ecspi1 {
51	status = "disabled";
52	pinctrl-0 = <&ecspi1_default>;
53	pinctrl-names = "default";
54	/* first cs is for on board MCP2518, the second for SPI on expansion header */
55	cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>,
56				<&gpio2 20 GPIO_ACTIVE_LOW>;
57
58	/* CAN FD */
59	mcp2518: mcp2518@0 {
60		compatible = "microchip,mcp251xfd";
61		reg = <0>;
62		spi-max-frequency = <20000000>;
63		int-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
64		supply-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
65		osc-freq = <40000000>;
66		status = "disabled";
67	};
68};
69
70/*
71 * TPM Module TI SLB9670
72 * Currently there is no driver for the used module
73 */
74&ecspi2 {
75	status = "disabled";
76	pinctrl-0 = <&ecspi2_default>;
77	pinctrl-names = "default";
78	cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
79};
80
81/* RS232 / RS485 pinheader on the board */
82&uart1 {
83	status = "disabled";
84	pinctrl-0 = <&uart1_default>;
85	pinctrl-names = "default";
86	hw-flow-control;
87};
88
89/*
90 *  UART to bluetooth module / X18 header
91 *  Currently there is no driver for the used module
92 */
93&uart2 {
94	status = "disabled";
95	pinctrl-0 = <&uart2_default>;
96	pinctrl-names = "default";
97	hw-flow-control;
98};
99
100/* UART usually used from A53 Core (1st tty on Debug USB connector */
101&uart3 {
102	status = "disabled";
103	pinctrl-0 = <&uart3_default>;
104	pinctrl-names = "default";
105};
106
107/* UART of the M4 Core (2nd tty on Debug USB connector) */
108&uart4 {
109	status = "okay";
110	current-speed = <115200>;
111	pinctrl-0 = <&uart4_default>;
112	pinctrl-names = "default";
113};
114
115/*
116 * needs to be configured, so the leds don't generate an error,
117 * but does not interfer with the A53-Core
118 */
119&gpio1 {
120	status = "okay";
121};
122
123&mailbox0 {
124	status = "okay";
125};
126