blob: 542226cfcfdfb6ec60ec280c7ff46efe5cf79b07 [file] [log] [blame]
Patrick Delaunaye7f435d2018-07-09 15:17:22 +02001// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
4 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
5 */
6/dts-v1/;
7
8#include "stm32mp157c-ed1.dts"
Patrick Delaunaya3705302019-07-11 11:15:28 +02009#include <dt-bindings/gpio/gpio.h>
Patrick Delaunay708cae72019-07-30 19:16:12 +020010#include <dt-bindings/input/input.h>
Patrick Delaunay7f2cba42023-04-24 16:21:10 +020011#include <dt-bindings/media/video-interfaces.h>
Patrick Delaunaye7f435d2018-07-09 15:17:22 +020012
13/ {
14 model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
15 compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
16
Patrice Chotard00442d02019-02-12 16:50:38 +010017 chosen {
18 stdout-path = "serial0:115200n8";
19 };
20
21 aliases {
22 serial0 = &uart4;
Patrick Delaunay551efca2020-09-16 10:01:32 +020023 serial1 = &usart3;
Patrice Chotard00442d02019-02-12 16:50:38 +010024 ethernet0 = &ethernet0;
25 };
26
Patrick Delaunay708cae72019-07-30 19:16:12 +020027 clocks {
28 clk_ext_camera: clk-ext-camera {
29 #clock-cells = <0>;
30 compatible = "fixed-clock";
31 clock-frequency = <24000000>;
32 };
33 };
34
35 joystick {
36 compatible = "gpio-keys";
Patrick Delaunay708cae72019-07-30 19:16:12 +020037 pinctrl-0 = <&joystick_pins>;
38 pinctrl-names = "default";
39 button-0 {
40 label = "JoySel";
41 linux,code = <KEY_ENTER>;
42 interrupt-parent = <&stmfx_pinctrl>;
43 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
44 };
45 button-1 {
46 label = "JoyDown";
47 linux,code = <KEY_DOWN>;
48 interrupt-parent = <&stmfx_pinctrl>;
49 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
50 };
51 button-2 {
52 label = "JoyLeft";
53 linux,code = <KEY_LEFT>;
54 interrupt-parent = <&stmfx_pinctrl>;
55 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
56 };
57 button-3 {
58 label = "JoyRight";
59 linux,code = <KEY_RIGHT>;
60 interrupt-parent = <&stmfx_pinctrl>;
61 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
62 };
63 button-4 {
64 label = "JoyUp";
65 linux,code = <KEY_UP>;
66 interrupt-parent = <&stmfx_pinctrl>;
67 interrupts = <4 IRQ_TYPE_EDGE_RISING>;
68 };
69 };
70
Patrice Chotard00442d02019-02-12 16:50:38 +010071 panel_backlight: panel-backlight {
72 compatible = "gpio-backlight";
73 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
74 default-on;
75 status = "okay";
76 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +020077};
78
79&cec {
80 pinctrl-names = "default";
81 pinctrl-0 = <&cec_pins_a>;
82 status = "okay";
Patrice Chotard00442d02019-02-12 16:50:38 +010083};
84
Patrick Delaunay708cae72019-07-30 19:16:12 +020085&dcmi {
86 status = "okay";
87 pinctrl-names = "default", "sleep";
88 pinctrl-0 = <&dcmi_pins_a>;
89 pinctrl-1 = <&dcmi_sleep_pins_a>;
90
91 port {
92 dcmi_0: endpoint {
93 remote-endpoint = <&ov5640_0>;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +020094 bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
Patrick Delaunay708cae72019-07-30 19:16:12 +020095 bus-width = <8>;
96 hsync-active = <0>;
97 vsync-active = <0>;
98 pclk-sample = <1>;
99 };
100 };
101};
102
Patrice Chotard00442d02019-02-12 16:50:38 +0100103&dsi {
Patrick Delaunay8c6e6132019-11-06 16:16:33 +0100104 phy-dsi-supply = <&reg18>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100105 status = "okay";
106
107 ports {
Patrice Chotard00442d02019-02-12 16:50:38 +0100108 port@0 {
109 reg = <0>;
110 dsi_in: endpoint {
111 remote-endpoint = <&ltdc_ep0_out>;
112 };
113 };
114
115 port@1 {
116 reg = <1>;
117 dsi_out: endpoint {
118 remote-endpoint = <&dsi_panel_in>;
119 };
120 };
121 };
122
123 panel-dsi@0 {
124 compatible = "raydium,rm68200";
125 reg = <0>;
126 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
127 backlight = <&panel_backlight>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200128 power-supply = <&v3v3>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100129 status = "okay";
130
131 port {
132 dsi_panel_in: endpoint {
133 remote-endpoint = <&dsi_out>;
134 };
135 };
136 };
137};
138
139&ethernet0 {
140 status = "okay";
141 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200142 pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100143 pinctrl-names = "default", "sleep";
Christophe Roullier32ac3052019-05-17 15:08:45 +0200144 phy-mode = "rgmii-id";
Patrice Chotard00442d02019-02-12 16:50:38 +0100145 max-speed = <1000>;
146 phy-handle = <&phy0>;
147
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200148 mdio {
Patrice Chotard00442d02019-02-12 16:50:38 +0100149 #address-cells = <1>;
150 #size-cells = <0>;
151 compatible = "snps,dwmac-mdio";
152 phy0: ethernet-phy@0 {
153 reg = <0>;
154 };
155 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200156};
157
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200158&fmc {
159 pinctrl-names = "default", "sleep";
160 pinctrl-0 = <&fmc_pins_a>;
161 pinctrl-1 = <&fmc_sleep_pins_a>;
162 status = "okay";
Christophe Kerello45326d82020-07-31 09:53:44 +0200163
164 nand-controller@4,0 {
165 status = "okay";
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200166
Christophe Kerello45326d82020-07-31 09:53:44 +0200167 nand@0 {
168 reg = <0>;
169 nand-on-flash-bbt;
170 #address-cells = <1>;
171 #size-cells = <1>;
172 };
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200173 };
174};
175
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200176&i2c2 {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200177 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200178 pinctrl-0 = <&i2c2_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200179 pinctrl-1 = <&i2c2_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200180 i2c-scl-rising-time-ns = <185>;
181 i2c-scl-falling-time-ns = <20>;
182 status = "okay";
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200183
Patrick Delaunay708cae72019-07-30 19:16:12 +0200184 ov5640: camera@3c {
185 compatible = "ovti,ov5640";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200186 reg = <0x3c>;
187 clocks = <&clk_ext_camera>;
188 clock-names = "xclk";
189 DOVDD-supply = <&v2v8>;
Patrick Delaunay651aea32020-01-28 10:10:58 +0100190 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
191 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200192 rotation = <180>;
193 status = "okay";
194
195 port {
196 ov5640_0: endpoint {
197 remote-endpoint = <&dcmi_0>;
198 bus-width = <8>;
199 data-shift = <2>; /* lines 9:2 are used */
200 hsync-active = <0>;
201 vsync-active = <0>;
202 pclk-sample = <1>;
203 };
204 };
205 };
206
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200207 stmfx: stmfx@42 {
208 compatible = "st,stmfx-0300";
209 reg = <0x42>;
210 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
211 interrupt-parent = <&gpioi>;
212 vdd-supply = <&v3v3>;
213
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200214 stmfx_pinctrl: pinctrl {
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200215 compatible = "st,stmfx-0300-pinctrl";
216 gpio-controller;
217 #gpio-cells = <2>;
218 interrupt-controller;
219 #interrupt-cells = <2>;
220 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200221
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200222 joystick_pins: joystick-pins {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200223 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200224 bias-pull-down;
225 };
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200226 };
227 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200228};
229
230&i2c5 {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200231 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200232 pinctrl-0 = <&i2c5_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200233 pinctrl-1 = <&i2c5_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200234 i2c-scl-rising-time-ns = <185>;
235 i2c-scl-falling-time-ns = <20>;
236 status = "okay";
237};
238
Patrice Chotard00442d02019-02-12 16:50:38 +0100239&ltdc {
240 status = "okay";
241
242 port {
Patrice Chotard00442d02019-02-12 16:50:38 +0100243 ltdc_ep0_out: endpoint@0 {
244 reg = <0>;
245 remote-endpoint = <&dsi_in>;
246 };
247 };
248};
249
250&m_can1 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200251 pinctrl-names = "default", "sleep";
Patrice Chotard00442d02019-02-12 16:50:38 +0100252 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200253 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100254 status = "okay";
255};
256
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200257&qspi {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200258 pinctrl-names = "default", "sleep";
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200259 pinctrl-0 = <&qspi_clk_pins_a
260 &qspi_bk1_pins_a
261 &qspi_cs1_pins_a
262 &qspi_bk2_pins_a
263 &qspi_cs2_pins_a>;
264 pinctrl-1 = <&qspi_clk_sleep_pins_a
265 &qspi_bk1_sleep_pins_a
266 &qspi_cs1_sleep_pins_a
267 &qspi_bk2_sleep_pins_a
268 &qspi_cs2_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200269 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
270 #address-cells = <1>;
271 #size-cells = <0>;
272 status = "okay";
273
Patrick Delaunaye25cbd42022-07-05 16:55:54 +0200274 flash0: flash@0 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200275 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200276 reg = <0>;
277 spi-rx-bus-width = <4>;
278 spi-max-frequency = <108000000>;
279 #address-cells = <1>;
280 #size-cells = <1>;
281 };
282
Patrick Delaunaye25cbd42022-07-05 16:55:54 +0200283 flash1: flash@1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200284 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200285 reg = <1>;
286 spi-rx-bus-width = <4>;
287 spi-max-frequency = <108000000>;
288 #address-cells = <1>;
289 #size-cells = <1>;
290 };
291};
292
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100293&sdmmc3 {
294 pinctrl-names = "default", "opendrain", "sleep";
295 pinctrl-0 = <&sdmmc3_b4_pins_a>;
296 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
297 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
298 broken-cd;
299 st,neg-edge;
300 bus-width = <4>;
301 vmmc-supply = <&v3v3>;
302 status = "disabled";
303};
304
Patrice Chotard00442d02019-02-12 16:50:38 +0100305&spi1 {
306 pinctrl-names = "default";
307 pinctrl-0 = <&spi1_pins_a>;
308 status = "disabled";
309};
310
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200311&timers2 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200312 /* spare dmas for other usage (un-delete to enable pwm capture) */
313 /delete-property/dmas;
314 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200315 status = "disabled";
316 pwm {
317 pinctrl-0 = <&pwm2_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100318 pinctrl-1 = <&pwm2_sleep_pins_a>;
319 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200320 status = "okay";
321 };
322 timer@1 {
323 status = "okay";
324 };
325};
326
327&timers8 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200328 /delete-property/dmas;
329 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200330 status = "disabled";
331 pwm {
332 pinctrl-0 = <&pwm8_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100333 pinctrl-1 = <&pwm8_sleep_pins_a>;
334 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200335 status = "okay";
336 };
337 timer@7 {
338 status = "okay";
339 };
340};
341
342&timers12 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200343 /delete-property/dmas;
344 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200345 status = "disabled";
346 pwm {
347 pinctrl-0 = <&pwm12_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100348 pinctrl-1 = <&pwm12_sleep_pins_a>;
349 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200350 status = "okay";
351 };
352 timer@11 {
353 status = "okay";
354 };
355};
356
Patrick Delaunay551efca2020-09-16 10:01:32 +0200357&usart3 {
358 pinctrl-names = "default", "sleep", "idle";
359 pinctrl-0 = <&usart3_pins_b>;
360 pinctrl-1 = <&usart3_sleep_pins_b>;
361 pinctrl-2 = <&usart3_idle_pins_b>;
362 /*
363 * HW flow control USART3_RTS is optional, and isn't default wired to
364 * the connector. SB23 needs to be soldered in order to use it, and R77
365 * (ETH_CLK) should be removed.
366 */
367 uart-has-rtscts;
368 status = "disabled";
369};
370
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200371&usbh_ehci {
372 phys = <&usbphyc_port0>;
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200373 status = "okay";
Fabrice Gasnier4ab96cc2022-12-12 11:44:37 +0100374 #address-cells = <1>;
375 #size-cells = <0>;
376 /* onboard HUB */
377 hub@1 {
378 compatible = "usb424,2514";
379 reg = <1>;
380 vdd-supply = <&v3v3>;
381 };
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200382};
383
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200384&usbotg_hs {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200385 pinctrl-0 = <&usbotg_hs_pins_a>;
386 pinctrl-names = "default";
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200387 phys = <&usbphyc_port1 0>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100388 phy-names = "usb2-phy";
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200389 status = "okay";
390};
391
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200392&usbphyc {
393 status = "okay";
394};
Patrick Delaunayb3f8d832022-01-31 16:07:54 +0100395
396&usbphyc_port0 {
397 st,tune-hs-dc-level = <2>;
398 st,enable-fs-rftime-tuning;
399 st,enable-hs-rftime-reduction;
400 st,trim-hs-current = <15>;
401 st,trim-hs-impedance = <1>;
402 st,tune-squelch-level = <3>;
403 st,tune-hs-rx-offset = <2>;
404 st,no-lsfs-sc;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200405
Fabrice Gasnier4ec55182022-12-12 11:32:42 +0100406 connector {
407 compatible = "usb-a-connector";
408 vbus-supply = <&vbus_sw>;
409 };
Patrick Delaunayb3f8d832022-01-31 16:07:54 +0100410};
411
412&usbphyc_port1 {
413 st,tune-hs-dc-level = <2>;
414 st,enable-fs-rftime-tuning;
415 st,enable-hs-rftime-reduction;
416 st,trim-hs-current = <15>;
417 st,trim-hs-impedance = <1>;
418 st,tune-squelch-level = <3>;
419 st,tune-hs-rx-offset = <2>;
420 st,no-lsfs-sc;
421};