Debian Codegraph @

arch/arm/boot/dts/st/stm32mp157c-ev1.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2 /*
3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
4 * Author: Ludovic Barre <[email protected]> for STMicroelectronics.
5 */
6 /dts-v1/;
7
8 #include "stm32mp157c-ed1.dts"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/media/video-interfaces.h>
12
13 / {
14 model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
15 compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
16
17 aliases {
18 serial1 = &usart3;
19 ethernet0 = &ethernet0;
20 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 clocks {
27 clk_ext_camera: clk-ext-camera {
28 #clock-cells = <0>;
29 compatible = "fixed-clock";
30 clock-frequency = <24000000>;
31 };
32 };
33
34 joystick {
35 compatible = "gpio-keys";
36 pinctrl-0 = <&joystick_pins>;
37 pinctrl-names = "default";
38 button-0 {
39 label = "JoySel";
40 linux,code = <KEY_ENTER>;
41 interrupt-parent = <&stmfx_pinctrl>;
42 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
43 };
44 button-1 {
45 label = "JoyDown";
46 linux,code = <KEY_DOWN>;
47 interrupt-parent = <&stmfx_pinctrl>;
48 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
49 };
50 button-2 {
51 label = "JoyLeft";
52 linux,code = <KEY_LEFT>;
53 interrupt-parent = <&stmfx_pinctrl>;
54 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
55 };
56 button-3 {
57 label = "JoyRight";
58 linux,code = <KEY_RIGHT>;
59 interrupt-parent = <&stmfx_pinctrl>;
60 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
61 };
62 button-4 {
63 label = "JoyUp";
64 linux,code = <KEY_UP>;
65 interrupt-parent = <&stmfx_pinctrl>;
66 interrupts = <4 IRQ_TYPE_EDGE_RISING>;
67 };
68 };
69
70 panel_backlight: panel-backlight {
71 compatible = "gpio-backlight";
72 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
73 default-on;
74 status = "okay";
75 };
76 };
77
78 &cec {
79 pinctrl-names = "default";
80 pinctrl-0 = <&cec_pins_a>;
81 status = "okay";
82 };
83
84 &dcmi {
85 status = "okay";
86 pinctrl-names = "default", "sleep";
87 pinctrl-0 = <&dcmi_pins_a>;
88 pinctrl-1 = <&dcmi_sleep_pins_a>;
89
90 port {
91 dcmi_0: endpoint {
92 remote-endpoint = <&ov5640_0>;
93 bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
94 bus-width = <8>;
95 hsync-active = <0>;
96 vsync-active = <0>;
97 pclk-sample = <1>;
98 };
99 };
100 };
101
102 &dsi {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 status = "okay";
106
107 panel@0 {
108 compatible = "raydium,rm68200";
109 reg = <0>;
110 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
111 backlight = <&panel_backlight>;
112 power-supply = <&v3v3>;
113 status = "okay";
114
115 port {
116 dsi_panel_in: endpoint {
117 remote-endpoint = <&dsi_out>;
118 };
119 };
120 };
121 };
122
123 &dsi_in {
124 remote-endpoint = <&ltdc_ep0_out>;
125 };
126
127 &dsi_out {
128 remote-endpoint = <&dsi_panel_in>;
129 };
130
131 &ethernet0 {
132 status = "okay";
133 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
134 pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
135 pinctrl-names = "default", "sleep";
136 phy-mode = "rgmii-id";
137 max-speed = <1000>;
138 phy-handle = <&phy0>;
139
140 mdio {
141 #address-cells = <1>;
142 #size-cells = <0>;
143 compatible = "snps,dwmac-mdio";
144 phy0: ethernet-phy@0 {
145 reg = <0>;
146 };
147 };
148 };
149
150 &fmc {
151 pinctrl-names = "default", "sleep";
152 pinctrl-0 = <&fmc_pins_a>;
153 pinctrl-1 = <&fmc_sleep_pins_a>;
154 status = "okay";
155
156 nand-controller@4,0 {
157 status = "okay";
158
159 nand@0 {
160 reg = <0>;
161 nand-on-flash-bbt;
162 #address-cells = <1>;
163 #size-cells = <1>;
164 };
165 };
166 };
167
168 &i2c2 {
169 pinctrl-names = "default", "sleep";
170 pinctrl-0 = <&i2c2_pins_a>;
171 pinctrl-1 = <&i2c2_sleep_pins_a>;
172 i2c-scl-rising-time-ns = <185>;
173 i2c-scl-falling-time-ns = <20>;
174 status = "okay";
175
176 ov5640: camera@3c {
177 compatible = "ovti,ov5640";
178 reg = <0x3c>;
179 clocks = <&clk_ext_camera>;
180 clock-names = "xclk";
181 AVDD-supply = <&v2v8>;
182 DOVDD-supply = <&v2v8>;
183 DVDD-supply = <&v2v8>;
184 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
185 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
186 rotation = <180>;
187 status = "okay";
188
189 port {
190 ov5640_0: endpoint {
191 remote-endpoint = <&dcmi_0>;
192 bus-width = <8>;
193 data-shift = <2>; /* lines 9:2 are used */
194 hsync-active = <0>;
195 vsync-active = <0>;
196 pclk-sample = <1>;
197 };
198 };
199 };
200
201 stmfx: stmfx@42 {
202 compatible = "st,stmfx-0300";
203 reg = <0x42>;
204 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
205 interrupt-parent = <&gpioi>;
206 vdd-supply = <&v3v3>;
207
208 stmfx_pinctrl: pinctrl {
209 compatible = "st,stmfx-0300-pinctrl";
210 gpio-controller;
211 #gpio-cells = <2>;
212 interrupt-controller;
213 #interrupt-cells = <2>;
214 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
215
216 joystick_pins: joystick-pins {
217 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
218 bias-pull-down;
219 };
220 };
221 };
222 };
223
224 &i2c5 {
225 pinctrl-names = "default", "sleep";
226 pinctrl-0 = <&i2c5_pins_a>;
227 pinctrl-1 = <&i2c5_sleep_pins_a>;
228 i2c-scl-rising-time-ns = <185>;
229 i2c-scl-falling-time-ns = <20>;
230 status = "okay";
231 };
232
233 &ltdc {
234 status = "okay";
235
236 port {
237 ltdc_ep0_out: endpoint {
238 remote-endpoint = <&dsi_in>;
239 };
240 };
241 };
242
243 &m_can1 {
244 pinctrl-names = "default", "sleep";
245 pinctrl-0 = <&m_can1_pins_a>;
246 pinctrl-1 = <&m_can1_sleep_pins_a>;
247 status = "okay";
248 };
249
250 &qspi {
251 pinctrl-names = "default", "sleep";
252 pinctrl-0 = <&qspi_clk_pins_a
253 &qspi_bk1_pins_a
254 &qspi_cs1_pins_a
255 &qspi_bk2_pins_a
256 &qspi_cs2_pins_a>;
257 pinctrl-1 = <&qspi_clk_sleep_pins_a
258 &qspi_bk1_sleep_pins_a
259 &qspi_cs1_sleep_pins_a
260 &qspi_bk2_sleep_pins_a
261 &qspi_cs2_sleep_pins_a>;
262 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
263 #address-cells = <1>;
264 #size-cells = <0>;
265 status = "okay";
266
267 flash0: flash@0 {
268 compatible = "jedec,spi-nor";
269 reg = <0>;
270 spi-rx-bus-width = <4>;
271 spi-max-frequency = <108000000>;
272 #address-cells = <1>;
273 #size-cells = <1>;
274 };
275
276 flash1: flash@1 {
277 compatible = "jedec,spi-nor";
278 reg = <1>;
279 spi-rx-bus-width = <4>;
280 spi-max-frequency = <108000000>;
281 #address-cells = <1>;
282 #size-cells = <1>;
283 };
284 };
285
286 &sdmmc3 {
287 pinctrl-names = "default", "opendrain", "sleep";
288 pinctrl-0 = <&sdmmc3_b4_pins_a>;
289 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
290 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
291 broken-cd;
292 st,neg-edge;
293 bus-width = <4>;
294 vmmc-supply = <&v3v3>;
295 status = "disabled";
296 };
297
298 &spi1 {
299 pinctrl-names = "default", "sleep";
300 pinctrl-0 = <&spi1_pins_a>;
301 pinctrl-1 = <&spi1_sleep_pins_a>;
302 status = "disabled";
303 };
304
305 &timers2 {
306 /* spare dmas for other usage (un-delete to enable pwm capture) */
307 /delete-property/dmas;
308 /delete-property/dma-names;
309 status = "disabled";
310 counter {
311 status = "okay";
312 };
313 pwm {
314 pinctrl-0 = <&pwm2_pins_a>;
315 pinctrl-1 = <&pwm2_sleep_pins_a>;
316 pinctrl-names = "default", "sleep";
317 status = "okay";
318 };
319 timer@1 {
320 status = "okay";
321 };
322 };
323
324 &timers8 {
325 /delete-property/dmas;
326 /delete-property/dma-names;
327 status = "disabled";
328 counter {
329 status = "okay";
330 };
331 pwm {
332 pinctrl-0 = <&pwm8_pins_a>;
333 pinctrl-1 = <&pwm8_sleep_pins_a>;
334 pinctrl-names = "default", "sleep";
335 status = "okay";
336 };
337 timer@7 {
338 status = "okay";
339 };
340 };
341
342 &timers12 {
343 /delete-property/dmas;
344 /delete-property/dma-names;
345 status = "disabled";
346 counter {
347 status = "okay";
348 };
349 pwm {
350 pinctrl-0 = <&pwm12_pins_a>;
351 pinctrl-1 = <&pwm12_sleep_pins_a>;
352 pinctrl-names = "default", "sleep";
353 status = "okay";
354 };
355 timer@11 {
356 status = "okay";
357 };
358 };
359
360 &usart3 {
361 pinctrl-names = "default", "sleep", "idle";
362 pinctrl-0 = <&usart3_pins_b>;
363 pinctrl-1 = <&usart3_sleep_pins_b>;
364 pinctrl-2 = <&usart3_idle_pins_b>;
365 /*
366 * HW flow control USART3_RTS is optional, and isn't default wired to
367 * the connector. SB23 needs to be soldered in order to use it, and R77
368 * (ETH_CLK) should be removed.
369 */
370 uart-has-rtscts;
371 status = "disabled";
372 };
373
374 &usbh_ehci {
375 status = "okay";
376 #address-cells = <1>;
377 #size-cells = <0>;
378 /* onboard HUB */
379 hub@1 {
380 compatible = "usb424,2514";
381 reg = <1>;
382 vdd-supply = <&v3v3>;
383 };
384 };
385
386 &usbotg_hs {
387 pinctrl-0 = <&usbotg_hs_pins_a>;
388 pinctrl-names = "default";
389 phys = <&usbphyc_port1 0>;
390 phy-names = "usb2-phy";
391 status = "okay";
392 };
393
394 &usbphyc {
395 status = "okay";
396 };
397
398 &usbphyc_port0 {
399 st,tune-hs-dc-level = <2>;
400 st,enable-fs-rftime-tuning;
401 st,enable-hs-rftime-reduction;
402 st,trim-hs-current = <15>;
403 st,trim-hs-impedance = <1>;
404 st,tune-squelch-level = <3>;
405 st,tune-hs-rx-offset = <2>;
406 st,no-lsfs-sc;
407
408 connector {
409 compatible = "usb-a-connector";
410 vbus-supply = <&vbus_sw>;
411 };
412 };
413
414 &usbphyc_port1 {
415 st,tune-hs-dc-level = <2>;
416 st,enable-fs-rftime-tuning;
417 st,enable-hs-rftime-reduction;
418 st,trim-hs-current = <15>;
419 st,trim-hs-impedance = <1>;
420 st,tune-squelch-level = <3>;
421 st,tune-hs-rx-offset = <2>;
422 st,no-lsfs-sc;
423 };