Debian Codegraph @

arch/arm64/boot/dts/freescale/imx8mp-venice-gw71xx.dtsi

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright 2023 Gateworks Corporation
4 */
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/phy/phy-imx8-pcie.h>
9
10 / {
11 connector {
12 compatible = "gpio-usb-b-connector", "usb-b-connector";
13 pinctrl-names = "default";
14 pinctrl-0 = <&pinctrl_usbcon1>;
15 type = "micro";
16 label = "Type-C";
17 id-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
18
19 port {
20 usb_dr_connector: endpoint {
21 remote-endpoint = <&usb3_dwc>;
22 };
23 };
24 };
25
26 led-controller {
27 compatible = "gpio-leds";
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_gpio_leds>;
30
31 led-0 {
32 function = LED_FUNCTION_STATUS;
33 color = <LED_COLOR_ID_GREEN>;
34 gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
35 default-state = "on";
36 linux,default-trigger = "heartbeat";
37 };
38
39 led-1 {
40 function = LED_FUNCTION_STATUS;
41 color = <LED_COLOR_ID_RED>;
42 gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
43 default-state = "off";
44 };
45 };
46
47 pcie0_refclk: clock-pcie0 {
48 compatible = "fixed-clock";
49 #clock-cells = <0>;
50 clock-frequency = <100000000>;
51 };
52
53 pps {
54 compatible = "pps-gpio";
55 pinctrl-names = "default";
56 pinctrl-0 = <&pinctrl_pps>;
57 gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
58 status = "okay";
59 };
60 };
61
62 /* off-board header */
63 &ecspi2 {
64 pinctrl-names = "default";
65 pinctrl-0 = <&pinctrl_spi2>;
66 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
67 <&gpio1 10 GPIO_ACTIVE_LOW>;
68 status = "okay";
69
70 tpm@1 {
71 compatible = "atmel,attpm20p", "tcg,tpm_tis-spi";
72 reg = <0x1>;
73 spi-max-frequency = <25000000>;
74 };
75 };
76
77 &gpio4 {
78 gpio-line-names =
79 "", "", "", "",
80 "", "", "", "",
81 "dio1", "", "", "dio0",
82 "", "", "pci_usb_sel", "",
83 "", "", "", "",
84 "", "", "", "",
85 "dio3", "", "dio2", "",
86 "pci_wdis#", "", "", "";
87 };
88
89 &i2c2 {
90 clock-frequency = <400000>;
91 pinctrl-names = "default";
92 pinctrl-0 = <&pinctrl_i2c2>;
93 status = "okay";
94
95 accelerometer@19 {
96 compatible = "st,lis2de12";
97 reg = <0x19>;
98 pinctrl-names = "default";
99 pinctrl-0 = <&pinctrl_accel>;
100 st,drdy-int-pin = <1>;
101 interrupt-parent = <&gpio4>;
102 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
103 };
104
105 magnetometer@1e {
106 compatible = "st,lis2mdl";
107 reg = <0x1e>;
108 pinctrl-names = "default";
109 pinctrl-0 = <&pinctrl_mag>;
110 interrupt-parent = <&gpio4>;
111 interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
112 };
113 };
114
115 &pcie_phy {
116 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
117 fsl,clkreq-unsupported;
118 clocks = <&pcie0_refclk>;
119 clock-names = "ref";
120 status = "okay";
121 };
122
123 &pcie {
124 pinctrl-names = "default";
125 pinctrl-0 = <&pinctrl_pcie0>;
126 reset-gpio = <&gpio4 29 GPIO_ACTIVE_LOW>;
127 status = "okay";
128 };
129
130 /* GPS */
131 &uart1 {
132 pinctrl-names = "default";
133 pinctrl-0 = <&pinctrl_uart1>;
134 status = "okay";
135 };
136
137 /* off-board header */
138 &uart3 {
139 pinctrl-names = "default";
140 pinctrl-0 = <&pinctrl_uart3>;
141 status = "okay";
142 };
143
144 /* USB1 Type-C front panel */
145 &usb3_0 {
146 pinctrl-names = "default";
147 pinctrl-0 = <&pinctrl_usb1>;
148 fsl,over-current-active-low;
149 status = "okay";
150 };
151
152 &usb3_phy0 {
153 status = "okay";
154 };
155
156 &usb_dwc3_0 {
157 /* dual role is implemented but not a full featured OTG */
158 adp-disable;
159 hnp-disable;
160 srp-disable;
161 dr_mode = "otg";
162 usb-role-switch;
163 role-switch-default-mode = "peripheral";
164 status = "okay";
165
166 port {
167 usb3_dwc: endpoint {
168 remote-endpoint = <&usb_dr_connector>;
169 };
170 };
171 };
172
173 /* USB2 - MiniPCIe socket */
174 &usb3_1 {
175 fsl,permanently-attached;
176 fsl,disable-port-power-control;
177 status = "okay";
178 };
179
180 &usb3_phy1 {
181 status = "okay";
182 };
183
184 &usb_dwc3_1 {
185 dr_mode = "host";
186 status = "okay";
187 };
188
189 &iomuxc {
190 pinctrl-names = "default";
191 pinctrl-0 = <&pinctrl_hog>;
192
193 pinctrl_hog: hoggrp {
194 fsl,pins = <
195 MX8MP_IOMUXC_SAI1_RXD6__GPIO4_IO08 0x40000146 /* DIO1 */
196 MX8MP_IOMUXC_SAI1_TXC__GPIO4_IO11 0x40000146 /* DIO0 */
197 MX8MP_IOMUXC_SAI1_TXD2__GPIO4_IO14 0x40000106 /* PCIE_USBSEL */
198 MX8MP_IOMUXC_SAI2_TXD0__GPIO4_IO26 0x40000146 /* DIO2 */
199 MX8MP_IOMUXC_SAI2_TXFS__GPIO4_IO24 0x40000146 /* DIO3 */
200 MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x40000106 /* PCIE_WDIS# */
201 >;
202 };
203
204 pinctrl_accel: accelgrp {
205 fsl,pins = <
206 MX8MP_IOMUXC_SAI2_RXFS__GPIO4_IO21 0x150 /* IRQ */
207 >;
208 };
209
210 pinctrl_mag: maggrp {
211 fsl,pins = <
212 MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x150 /* IRQ */
213 >;
214 };
215
216 pinctrl_gpio_leds: gpioledgrp {
217 fsl,pins = <
218 MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01 0x6 /* LEDG */
219 MX8MP_IOMUXC_SAI1_RXD3__GPIO4_IO05 0x6 /* LEDR */
220 >;
221 };
222
223 pinctrl_pcie0: pcie0grp {
224 fsl,pins = <
225 MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x106
226 >;
227 };
228
229 pinctrl_pps: ppsgrp {
230 fsl,pins = <
231 MX8MP_IOMUXC_SAI1_RXD1__GPIO4_IO03 0x146
232 >;
233 };
234
235 pinctrl_usb1: usb1grp {
236 fsl,pins = <
237 MX8MP_IOMUXC_GPIO1_IO13__USB1_OTG_OC 0x140 /* USB1_FLT# */
238 >;
239 };
240
241 pinctrl_usbcon1: usbcon1grp {
242 fsl,pins = <
243 MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21 0x140 /* USB1_ID */
244 >;
245 };
246
247 pinctrl_spi2: spi2grp {
248 fsl,pins = <
249 MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x140
250 MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x140
251 MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x140
252 MX8MP_IOMUXC_ECSPI2_SS0__GPIO5_IO13 0x140
253 MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x140
254 >;
255 };
256
257 pinctrl_uart1: uart1grp {
258 fsl,pins = <
259 MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140
260 MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140
261 >;
262 };
263
264 pinctrl_uart3: uart3grp {
265 fsl,pins = <
266 MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140
267 MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140
268 >;
269 };
270 };