blob: ba8e9d9a42fafd7a4957bc99c2d868087518fc3d [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 aliases {
Patrick Delaunay551efca2020-09-16 10:01:32 +020018 serial1 = &usart3;
Patrice Chotard00442d02019-02-12 16:50:38 +010019 ethernet0 = &ethernet0;
20 };
21
Patrick Delaunay4597d262023-07-10 10:38:45 +020022 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
Patrick Delaunay708cae72019-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 Delaunay708cae72019-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 Chotard00442d02019-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 Delaunaye7f435d2018-07-09 15:17:22 +020076};
77
78&cec {
79 pinctrl-names = "default";
80 pinctrl-0 = <&cec_pins_a>;
81 status = "okay";
Patrice Chotard00442d02019-02-12 16:50:38 +010082};
83
Patrick Delaunay708cae72019-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 Delaunay7f2cba42023-04-24 16:21:10 +020093 bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
Patrick Delaunay708cae72019-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 Chotard00442d02019-02-12 16:50:38 +0100102&dsi {
Patrick Delaunay8c6e6132019-11-06 16:16:33 +0100103 phy-dsi-supply = <&reg18>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100104 status = "okay";
105
106 ports {
Patrice Chotard00442d02019-02-12 16:50:38 +0100107 port@0 {
108 reg = <0>;
109 dsi_in: endpoint {
110 remote-endpoint = <&ltdc_ep0_out>;
111 };
112 };
113
114 port@1 {
115 reg = <1>;
116 dsi_out: endpoint {
117 remote-endpoint = <&dsi_panel_in>;
118 };
119 };
120 };
121
122 panel-dsi@0 {
123 compatible = "raydium,rm68200";
124 reg = <0>;
125 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
126 backlight = <&panel_backlight>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200127 power-supply = <&v3v3>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100128 status = "okay";
129
130 port {
131 dsi_panel_in: endpoint {
132 remote-endpoint = <&dsi_out>;
133 };
134 };
135 };
136};
137
138&ethernet0 {
139 status = "okay";
140 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200141 pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100142 pinctrl-names = "default", "sleep";
Christophe Roullier32ac3052019-05-17 15:08:45 +0200143 phy-mode = "rgmii-id";
Patrice Chotard00442d02019-02-12 16:50:38 +0100144 max-speed = <1000>;
145 phy-handle = <&phy0>;
146
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200147 mdio {
Patrice Chotard00442d02019-02-12 16:50:38 +0100148 #address-cells = <1>;
149 #size-cells = <0>;
150 compatible = "snps,dwmac-mdio";
151 phy0: ethernet-phy@0 {
152 reg = <0>;
153 };
154 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200155};
156
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200157&fmc {
158 pinctrl-names = "default", "sleep";
159 pinctrl-0 = <&fmc_pins_a>;
160 pinctrl-1 = <&fmc_sleep_pins_a>;
161 status = "okay";
Christophe Kerello45326d82020-07-31 09:53:44 +0200162
163 nand-controller@4,0 {
164 status = "okay";
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200165
Christophe Kerello45326d82020-07-31 09:53:44 +0200166 nand@0 {
167 reg = <0>;
168 nand-on-flash-bbt;
169 #address-cells = <1>;
170 #size-cells = <1>;
171 };
Patrick Delaunaye0188ac2019-04-08 15:30:52 +0200172 };
173};
174
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200175&i2c2 {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200176 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200177 pinctrl-0 = <&i2c2_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200178 pinctrl-1 = <&i2c2_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200179 i2c-scl-rising-time-ns = <185>;
180 i2c-scl-falling-time-ns = <20>;
181 status = "okay";
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200182
Patrick Delaunay708cae72019-07-30 19:16:12 +0200183 ov5640: camera@3c {
184 compatible = "ovti,ov5640";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200185 reg = <0x3c>;
186 clocks = <&clk_ext_camera>;
187 clock-names = "xclk";
188 DOVDD-supply = <&v2v8>;
Patrick Delaunay651aea32020-01-28 10:10:58 +0100189 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
190 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200191 rotation = <180>;
192 status = "okay";
193
194 port {
195 ov5640_0: endpoint {
196 remote-endpoint = <&dcmi_0>;
197 bus-width = <8>;
198 data-shift = <2>; /* lines 9:2 are used */
199 hsync-active = <0>;
200 vsync-active = <0>;
201 pclk-sample = <1>;
202 };
203 };
204 };
205
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200206 stmfx: stmfx@42 {
207 compatible = "st,stmfx-0300";
208 reg = <0x42>;
209 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
210 interrupt-parent = <&gpioi>;
211 vdd-supply = <&v3v3>;
212
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200213 stmfx_pinctrl: pinctrl {
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200214 compatible = "st,stmfx-0300-pinctrl";
215 gpio-controller;
216 #gpio-cells = <2>;
217 interrupt-controller;
218 #interrupt-cells = <2>;
219 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200220
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200221 joystick_pins: joystick-pins {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200222 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200223 bias-pull-down;
224 };
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200225 };
226 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200227};
228
229&i2c5 {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200230 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200231 pinctrl-0 = <&i2c5_pins_a>;
Patrick Delaunaycdc2ca12020-07-06 13:26:53 +0200232 pinctrl-1 = <&i2c5_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200233 i2c-scl-rising-time-ns = <185>;
234 i2c-scl-falling-time-ns = <20>;
235 status = "okay";
236};
237
Patrice Chotard00442d02019-02-12 16:50:38 +0100238&ltdc {
239 status = "okay";
240
241 port {
Patrice Chotard00442d02019-02-12 16:50:38 +0100242 ltdc_ep0_out: endpoint@0 {
243 reg = <0>;
244 remote-endpoint = <&dsi_in>;
245 };
246 };
247};
248
249&m_can1 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200250 pinctrl-names = "default", "sleep";
Patrice Chotard00442d02019-02-12 16:50:38 +0100251 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200252 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100253 status = "okay";
254};
255
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200256&qspi {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200257 pinctrl-names = "default", "sleep";
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200258 pinctrl-0 = <&qspi_clk_pins_a
259 &qspi_bk1_pins_a
260 &qspi_cs1_pins_a
261 &qspi_bk2_pins_a
262 &qspi_cs2_pins_a>;
263 pinctrl-1 = <&qspi_clk_sleep_pins_a
264 &qspi_bk1_sleep_pins_a
265 &qspi_cs1_sleep_pins_a
266 &qspi_bk2_sleep_pins_a
267 &qspi_cs2_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200268 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
269 #address-cells = <1>;
270 #size-cells = <0>;
271 status = "okay";
272
Patrick Delaunaye25cbd42022-07-05 16:55:54 +0200273 flash0: flash@0 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200274 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200275 reg = <0>;
276 spi-rx-bus-width = <4>;
277 spi-max-frequency = <108000000>;
278 #address-cells = <1>;
279 #size-cells = <1>;
280 };
281
Patrick Delaunaye25cbd42022-07-05 16:55:54 +0200282 flash1: flash@1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200283 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200284 reg = <1>;
285 spi-rx-bus-width = <4>;
286 spi-max-frequency = <108000000>;
287 #address-cells = <1>;
288 #size-cells = <1>;
289 };
290};
291
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100292&sdmmc3 {
293 pinctrl-names = "default", "opendrain", "sleep";
294 pinctrl-0 = <&sdmmc3_b4_pins_a>;
295 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
296 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
297 broken-cd;
298 st,neg-edge;
299 bus-width = <4>;
300 vmmc-supply = <&v3v3>;
301 status = "disabled";
302};
303
Patrice Chotard00442d02019-02-12 16:50:38 +0100304&spi1 {
305 pinctrl-names = "default";
306 pinctrl-0 = <&spi1_pins_a>;
307 status = "disabled";
308};
309
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200310&timers2 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200311 /* spare dmas for other usage (un-delete to enable pwm capture) */
312 /delete-property/dmas;
313 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200314 status = "disabled";
315 pwm {
316 pinctrl-0 = <&pwm2_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100317 pinctrl-1 = <&pwm2_sleep_pins_a>;
318 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200319 status = "okay";
320 };
321 timer@1 {
322 status = "okay";
323 };
324};
325
326&timers8 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200327 /delete-property/dmas;
328 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200329 status = "disabled";
330 pwm {
331 pinctrl-0 = <&pwm8_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100332 pinctrl-1 = <&pwm8_sleep_pins_a>;
333 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200334 status = "okay";
335 };
336 timer@7 {
337 status = "okay";
338 };
339};
340
341&timers12 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200342 /delete-property/dmas;
343 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200344 status = "disabled";
345 pwm {
346 pinctrl-0 = <&pwm12_pins_a>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100347 pinctrl-1 = <&pwm12_sleep_pins_a>;
348 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200349 status = "okay";
350 };
351 timer@11 {
352 status = "okay";
353 };
354};
355
Patrick Delaunay551efca2020-09-16 10:01:32 +0200356&usart3 {
357 pinctrl-names = "default", "sleep", "idle";
358 pinctrl-0 = <&usart3_pins_b>;
359 pinctrl-1 = <&usart3_sleep_pins_b>;
360 pinctrl-2 = <&usart3_idle_pins_b>;
361 /*
362 * HW flow control USART3_RTS is optional, and isn't default wired to
363 * the connector. SB23 needs to be soldered in order to use it, and R77
364 * (ETH_CLK) should be removed.
365 */
366 uart-has-rtscts;
367 status = "disabled";
368};
369
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200370&usbh_ehci {
371 phys = <&usbphyc_port0>;
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200372 status = "okay";
Fabrice Gasnier4ab96cc2022-12-12 11:44:37 +0100373 #address-cells = <1>;
374 #size-cells = <0>;
375 /* onboard HUB */
376 hub@1 {
377 compatible = "usb424,2514";
378 reg = <1>;
379 vdd-supply = <&v3v3>;
380 };
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200381};
382
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200383&usbotg_hs {
Patrick Delaunaydf0d20a2020-04-30 15:52:46 +0200384 pinctrl-0 = <&usbotg_hs_pins_a>;
385 pinctrl-names = "default";
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200386 phys = <&usbphyc_port1 0>;
Patrick Delaunay48c5e902020-03-06 17:54:41 +0100387 phy-names = "usb2-phy";
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200388 status = "okay";
389};
390
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200391&usbphyc {
392 status = "okay";
393};
Patrick Delaunayb3f8d832022-01-31 16:07:54 +0100394
395&usbphyc_port0 {
396 st,tune-hs-dc-level = <2>;
397 st,enable-fs-rftime-tuning;
398 st,enable-hs-rftime-reduction;
399 st,trim-hs-current = <15>;
400 st,trim-hs-impedance = <1>;
401 st,tune-squelch-level = <3>;
402 st,tune-hs-rx-offset = <2>;
403 st,no-lsfs-sc;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200404
Fabrice Gasnier4ec55182022-12-12 11:32:42 +0100405 connector {
406 compatible = "usb-a-connector";
407 vbus-supply = <&vbus_sw>;
408 };
Patrick Delaunayb3f8d832022-01-31 16:07:54 +0100409};
410
411&usbphyc_port1 {
412 st,tune-hs-dc-level = <2>;
413 st,enable-fs-rftime-tuning;
414 st,enable-hs-rftime-reduction;
415 st,trim-hs-current = <15>;
416 st,trim-hs-impedance = <1>;
417 st,tune-squelch-level = <3>;
418 st,tune-hs-rx-offset = <2>;
419 st,no-lsfs-sc;
420};