blob: cd9c3ff5378bd6f83b9cad29f05b64e6ceeef577 [file] [log] [blame]
Patrick Delaunay5f16f652018-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 Delaunay35a54d42019-07-11 11:15:28 +02009#include <dt-bindings/gpio/gpio.h>
Patrick Delaunayfe915332019-07-30 19:16:12 +020010#include <dt-bindings/input/input.h>
Patrick Delaunay08002ff2023-04-24 16:21:10 +020011#include <dt-bindings/media/video-interfaces.h>
Patrick Delaunay5f16f652018-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 Chotard23661602019-02-12 16:50:38 +010017 aliases {
Patrick Delaunay62f95af2020-09-16 10:01:32 +020018 serial1 = &usart3;
Patrice Chotard23661602019-02-12 16:50:38 +010019 ethernet0 = &ethernet0;
20 };
21
Patrick Delaunay61ad1a52023-07-10 10:38:45 +020022 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
Patrick Delaunayfe915332019-07-30 19:16:12 +020026 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";
Patrick Delaunayfe915332019-07-30 19:16:12 +020036 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
Patrice Chotard23661602019-02-12 16:50:38 +010070 panel_backlight: panel-backlight {
71 compatible = "gpio-backlight";
72 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
73 default-on;
74 status = "okay";
75 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +020076};
77
78&cec {
79 pinctrl-names = "default";
80 pinctrl-0 = <&cec_pins_a>;
81 status = "okay";
82};
83
Patrick Delaunayfe915332019-07-30 19:16:12 +020084&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>;
Patrick Delaunay08002ff2023-04-24 16:21:10 +020093 bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
Patrick Delaunayfe915332019-07-30 19:16:12 +020094 bus-width = <8>;
95 hsync-active = <0>;
96 vsync-active = <0>;
97 pclk-sample = <1>;
98 };
99 };
100};
101
Patrice Chotard23661602019-02-12 16:50:38 +0100102&dsi {
Patrice Chotardf9591182023-09-26 17:09:18 +0200103 #address-cells = <1>;
104 #size-cells = <0>;
Patrice Chotard23661602019-02-12 16:50:38 +0100105 status = "okay";
106
Patrice Chotardf9591182023-09-26 17:09:18 +0200107 panel@0 {
Patrice Chotard23661602019-02-12 16:50:38 +0100108 compatible = "raydium,rm68200";
109 reg = <0>;
110 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
111 backlight = <&panel_backlight>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200112 power-supply = <&v3v3>;
Patrice Chotard23661602019-02-12 16:50:38 +0100113 status = "okay";
114
115 port {
116 dsi_panel_in: endpoint {
117 remote-endpoint = <&dsi_out>;
118 };
119 };
120 };
121};
122
Patrice Chotardf9591182023-09-26 17:09:18 +0200123&dsi_in {
124 remote-endpoint = <&ltdc_ep0_out>;
125};
126
127&dsi_out {
128 remote-endpoint = <&dsi_panel_in>;
129};
130
Patrice Chotard23661602019-02-12 16:50:38 +0100131&ethernet0 {
132 status = "okay";
133 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200134 pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100135 pinctrl-names = "default", "sleep";
Christophe Roullierc8ef9532019-05-17 15:08:45 +0200136 phy-mode = "rgmii-id";
Patrice Chotard23661602019-02-12 16:50:38 +0100137 max-speed = <1000>;
138 phy-handle = <&phy0>;
139
Patrick Delaunay08002ff2023-04-24 16:21:10 +0200140 mdio {
Patrice Chotard23661602019-02-12 16:50:38 +0100141 #address-cells = <1>;
142 #size-cells = <0>;
143 compatible = "snps,dwmac-mdio";
144 phy0: ethernet-phy@0 {
145 reg = <0>;
146 };
147 };
148};
149
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200150&fmc {
151 pinctrl-names = "default", "sleep";
152 pinctrl-0 = <&fmc_pins_a>;
153 pinctrl-1 = <&fmc_sleep_pins_a>;
154 status = "okay";
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200155
Christophe Kerelloacdaae62020-07-31 09:53:44 +0200156 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 };
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200165 };
166};
167
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200168&i2c2 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200169 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200170 pinctrl-0 = <&i2c2_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200171 pinctrl-1 = <&i2c2_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200172 i2c-scl-rising-time-ns = <185>;
173 i2c-scl-falling-time-ns = <20>;
174 status = "okay";
Patrick Delaunay1258e462019-04-12 14:38:28 +0200175
Patrick Delaunayfe915332019-07-30 19:16:12 +0200176 ov5640: camera@3c {
177 compatible = "ovti,ov5640";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200178 reg = <0x3c>;
179 clocks = <&clk_ext_camera>;
180 clock-names = "xclk";
Patrice Chotardf9591182023-09-26 17:09:18 +0200181 AVDD-supply = <&v2v8>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200182 DOVDD-supply = <&v2v8>;
Patrice Chotardf9591182023-09-26 17:09:18 +0200183 DVDD-supply = <&v2v8>;
Patrick Delaunay4f280922020-01-28 10:10:58 +0100184 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
185 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200186 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
Patrick Delaunay1258e462019-04-12 14:38:28 +0200201 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
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200208 stmfx_pinctrl: pinctrl {
Patrick Delaunay1258e462019-04-12 14:38:28 +0200209 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>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200215
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200216 joystick_pins: joystick-pins {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200217 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200218 bias-pull-down;
219 };
Patrick Delaunay1258e462019-04-12 14:38:28 +0200220 };
221 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200222};
223
224&i2c5 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200225 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200226 pinctrl-0 = <&i2c5_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200227 pinctrl-1 = <&i2c5_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200228 i2c-scl-rising-time-ns = <185>;
229 i2c-scl-falling-time-ns = <20>;
230 status = "okay";
231};
232
Patrice Chotard23661602019-02-12 16:50:38 +0100233&ltdc {
234 status = "okay";
235
236 port {
Patrice Chotardf9591182023-09-26 17:09:18 +0200237 ltdc_ep0_out: endpoint {
Patrice Chotard23661602019-02-12 16:50:38 +0100238 remote-endpoint = <&dsi_in>;
239 };
240 };
241};
242
243&m_can1 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200244 pinctrl-names = "default", "sleep";
Patrice Chotard23661602019-02-12 16:50:38 +0100245 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200246 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100247 status = "okay";
248};
249
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200250&qspi {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200251 pinctrl-names = "default", "sleep";
Patrick Delaunay08002ff2023-04-24 16:21:10 +0200252 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>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200262 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
263 #address-cells = <1>;
264 #size-cells = <0>;
265 status = "okay";
266
Patrick Delaunay69ef98b2022-07-05 16:55:54 +0200267 flash0: flash@0 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200268 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200269 reg = <0>;
270 spi-rx-bus-width = <4>;
271 spi-max-frequency = <108000000>;
272 #address-cells = <1>;
273 #size-cells = <1>;
274 };
275
Patrick Delaunay69ef98b2022-07-05 16:55:54 +0200276 flash1: flash@1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200277 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200278 reg = <1>;
279 spi-rx-bus-width = <4>;
280 spi-max-frequency = <108000000>;
281 #address-cells = <1>;
282 #size-cells = <1>;
283 };
284};
285
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100286&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
Patrice Chotard23661602019-02-12 16:50:38 +0100298&spi1 {
299 pinctrl-names = "default";
300 pinctrl-0 = <&spi1_pins_a>;
301 status = "disabled";
302};
303
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200304&timers2 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200305 /* spare dmas for other usage (un-delete to enable pwm capture) */
306 /delete-property/dmas;
307 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200308 status = "disabled";
309 pwm {
310 pinctrl-0 = <&pwm2_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100311 pinctrl-1 = <&pwm2_sleep_pins_a>;
312 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200313 status = "okay";
314 };
315 timer@1 {
316 status = "okay";
317 };
318};
319
320&timers8 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200321 /delete-property/dmas;
322 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200323 status = "disabled";
324 pwm {
325 pinctrl-0 = <&pwm8_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100326 pinctrl-1 = <&pwm8_sleep_pins_a>;
327 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200328 status = "okay";
329 };
330 timer@7 {
331 status = "okay";
332 };
333};
334
335&timers12 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200336 /delete-property/dmas;
337 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200338 status = "disabled";
339 pwm {
340 pinctrl-0 = <&pwm12_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100341 pinctrl-1 = <&pwm12_sleep_pins_a>;
342 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200343 status = "okay";
344 };
345 timer@11 {
346 status = "okay";
347 };
348};
349
Patrick Delaunay62f95af2020-09-16 10:01:32 +0200350&usart3 {
351 pinctrl-names = "default", "sleep", "idle";
352 pinctrl-0 = <&usart3_pins_b>;
353 pinctrl-1 = <&usart3_sleep_pins_b>;
354 pinctrl-2 = <&usart3_idle_pins_b>;
355 /*
356 * HW flow control USART3_RTS is optional, and isn't default wired to
357 * the connector. SB23 needs to be soldered in order to use it, and R77
358 * (ETH_CLK) should be removed.
359 */
360 uart-has-rtscts;
361 status = "disabled";
362};
363
Patrice Chotardbad48a42018-08-10 17:12:12 +0200364&usbh_ehci {
365 phys = <&usbphyc_port0>;
Patrice Chotardbad48a42018-08-10 17:12:12 +0200366 status = "okay";
Fabrice Gasnier214d6e72022-12-12 11:44:37 +0100367 #address-cells = <1>;
368 #size-cells = <0>;
369 /* onboard HUB */
370 hub@1 {
371 compatible = "usb424,2514";
372 reg = <1>;
373 vdd-supply = <&v3v3>;
374 };
Patrice Chotardbad48a42018-08-10 17:12:12 +0200375};
376
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200377&usbotg_hs {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200378 pinctrl-0 = <&usbotg_hs_pins_a>;
379 pinctrl-names = "default";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200380 phys = <&usbphyc_port1 0>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100381 phy-names = "usb2-phy";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200382 status = "okay";
383};
384
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200385&usbphyc {
386 status = "okay";
387};
Patrick Delaunay182738f2022-01-31 16:07:54 +0100388
389&usbphyc_port0 {
390 st,tune-hs-dc-level = <2>;
391 st,enable-fs-rftime-tuning;
392 st,enable-hs-rftime-reduction;
393 st,trim-hs-current = <15>;
394 st,trim-hs-impedance = <1>;
395 st,tune-squelch-level = <3>;
396 st,tune-hs-rx-offset = <2>;
397 st,no-lsfs-sc;
Patrick Delaunay08002ff2023-04-24 16:21:10 +0200398
Fabrice Gasnier79da4072022-12-12 11:32:42 +0100399 connector {
400 compatible = "usb-a-connector";
401 vbus-supply = <&vbus_sw>;
402 };
Patrick Delaunay182738f2022-01-31 16:07:54 +0100403};
404
405&usbphyc_port1 {
406 st,tune-hs-dc-level = <2>;
407 st,enable-fs-rftime-tuning;
408 st,enable-hs-rftime-reduction;
409 st,trim-hs-current = <15>;
410 st,trim-hs-impedance = <1>;
411 st,tune-squelch-level = <3>;
412 st,tune-hs-rx-offset = <2>;
413 st,no-lsfs-sc;
414};