blob: a55e80ce260211a90c8e780e050645c2e5d10a6a [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 Delaunay5f16f652018-07-09 15:17:22 +020011
12/ {
13 model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
14 compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
15
Patrice Chotard23661602019-02-12 16:50:38 +010016 chosen {
17 stdout-path = "serial0:115200n8";
18 };
19
20 aliases {
21 serial0 = &uart4;
Patrick Delaunay62f95af2020-09-16 10:01:32 +020022 serial1 = &usart3;
Patrice Chotard23661602019-02-12 16:50:38 +010023 ethernet0 = &ethernet0;
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>;
93 bus-width = <8>;
94 hsync-active = <0>;
95 vsync-active = <0>;
96 pclk-sample = <1>;
97 };
98 };
99};
100
Patrice Chotard23661602019-02-12 16:50:38 +0100101&dsi {
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100102 phy-dsi-supply = <&reg18>;
Patrice Chotard23661602019-02-12 16:50:38 +0100103 status = "okay";
104
105 ports {
Patrice Chotard23661602019-02-12 16:50:38 +0100106 port@0 {
107 reg = <0>;
108 dsi_in: endpoint {
109 remote-endpoint = <&ltdc_ep0_out>;
110 };
111 };
112
113 port@1 {
114 reg = <1>;
115 dsi_out: endpoint {
116 remote-endpoint = <&dsi_panel_in>;
117 };
118 };
119 };
120
121 panel-dsi@0 {
122 compatible = "raydium,rm68200";
123 reg = <0>;
124 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
125 backlight = <&panel_backlight>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200126 power-supply = <&v3v3>;
Patrice Chotard23661602019-02-12 16:50:38 +0100127 status = "okay";
128
129 port {
130 dsi_panel_in: endpoint {
131 remote-endpoint = <&dsi_out>;
132 };
133 };
134 };
135};
136
137&ethernet0 {
138 status = "okay";
139 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200140 pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100141 pinctrl-names = "default", "sleep";
Christophe Roullierc8ef9532019-05-17 15:08:45 +0200142 phy-mode = "rgmii-id";
Patrice Chotard23661602019-02-12 16:50:38 +0100143 max-speed = <1000>;
144 phy-handle = <&phy0>;
145
146 mdio0 {
147 #address-cells = <1>;
148 #size-cells = <0>;
149 compatible = "snps,dwmac-mdio";
150 phy0: ethernet-phy@0 {
151 reg = <0>;
152 };
153 };
154};
155
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200156&fmc {
157 pinctrl-names = "default", "sleep";
158 pinctrl-0 = <&fmc_pins_a>;
159 pinctrl-1 = <&fmc_sleep_pins_a>;
160 status = "okay";
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200161
Christophe Kerelloacdaae62020-07-31 09:53:44 +0200162 nand-controller@4,0 {
163 status = "okay";
164
165 nand@0 {
166 reg = <0>;
167 nand-on-flash-bbt;
168 #address-cells = <1>;
169 #size-cells = <1>;
170 };
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200171 };
172};
173
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200174&i2c2 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200175 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200176 pinctrl-0 = <&i2c2_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200177 pinctrl-1 = <&i2c2_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200178 i2c-scl-rising-time-ns = <185>;
179 i2c-scl-falling-time-ns = <20>;
180 status = "okay";
Patrick Delaunay1258e462019-04-12 14:38:28 +0200181
Patrick Delaunayfe915332019-07-30 19:16:12 +0200182 ov5640: camera@3c {
183 compatible = "ovti,ov5640";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200184 reg = <0x3c>;
185 clocks = <&clk_ext_camera>;
186 clock-names = "xclk";
187 DOVDD-supply = <&v2v8>;
Patrick Delaunay4f280922020-01-28 10:10:58 +0100188 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
189 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200190 rotation = <180>;
191 status = "okay";
192
193 port {
194 ov5640_0: endpoint {
195 remote-endpoint = <&dcmi_0>;
196 bus-width = <8>;
197 data-shift = <2>; /* lines 9:2 are used */
198 hsync-active = <0>;
199 vsync-active = <0>;
200 pclk-sample = <1>;
201 };
202 };
203 };
204
Patrick Delaunay1258e462019-04-12 14:38:28 +0200205 stmfx: stmfx@42 {
206 compatible = "st,stmfx-0300";
207 reg = <0x42>;
208 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
209 interrupt-parent = <&gpioi>;
210 vdd-supply = <&v3v3>;
211
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200212 stmfx_pinctrl: pinctrl {
Patrick Delaunay1258e462019-04-12 14:38:28 +0200213 compatible = "st,stmfx-0300-pinctrl";
214 gpio-controller;
215 #gpio-cells = <2>;
216 interrupt-controller;
217 #interrupt-cells = <2>;
218 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200219
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200220 joystick_pins: joystick-pins {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200221 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200222 bias-pull-down;
223 };
Patrick Delaunay1258e462019-04-12 14:38:28 +0200224 };
225 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200226};
227
228&i2c5 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200229 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200230 pinctrl-0 = <&i2c5_pins_a>;
Patrick Delaunay500327e2020-07-06 13:26:53 +0200231 pinctrl-1 = <&i2c5_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200232 i2c-scl-rising-time-ns = <185>;
233 i2c-scl-falling-time-ns = <20>;
234 status = "okay";
235};
236
Patrice Chotard23661602019-02-12 16:50:38 +0100237&ltdc {
238 status = "okay";
239
240 port {
Patrice Chotard23661602019-02-12 16:50:38 +0100241 ltdc_ep0_out: endpoint@0 {
242 reg = <0>;
243 remote-endpoint = <&dsi_in>;
244 };
245 };
246};
247
248&m_can1 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200249 pinctrl-names = "default", "sleep";
Patrice Chotard23661602019-02-12 16:50:38 +0100250 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200251 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100252 status = "okay";
253};
254
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200255&qspi {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200256 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200257 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200258 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200259 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
260 #address-cells = <1>;
261 #size-cells = <0>;
262 status = "okay";
263
264 flash0: mx66l51235l@0 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200265 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200266 reg = <0>;
267 spi-rx-bus-width = <4>;
268 spi-max-frequency = <108000000>;
269 #address-cells = <1>;
270 #size-cells = <1>;
271 };
272
273 flash1: mx66l51235l@1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200274 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200275 reg = <1>;
276 spi-rx-bus-width = <4>;
277 spi-max-frequency = <108000000>;
278 #address-cells = <1>;
279 #size-cells = <1>;
280 };
281};
282
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100283&sdmmc3 {
284 pinctrl-names = "default", "opendrain", "sleep";
285 pinctrl-0 = <&sdmmc3_b4_pins_a>;
286 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
287 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
288 broken-cd;
289 st,neg-edge;
290 bus-width = <4>;
291 vmmc-supply = <&v3v3>;
292 status = "disabled";
293};
294
Patrice Chotard23661602019-02-12 16:50:38 +0100295&spi1 {
296 pinctrl-names = "default";
297 pinctrl-0 = <&spi1_pins_a>;
298 status = "disabled";
299};
300
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200301&timers2 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200302 /* spare dmas for other usage (un-delete to enable pwm capture) */
303 /delete-property/dmas;
304 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200305 status = "disabled";
306 pwm {
307 pinctrl-0 = <&pwm2_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100308 pinctrl-1 = <&pwm2_sleep_pins_a>;
309 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200310 status = "okay";
311 };
312 timer@1 {
313 status = "okay";
314 };
315};
316
317&timers8 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200318 /delete-property/dmas;
319 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200320 status = "disabled";
321 pwm {
322 pinctrl-0 = <&pwm8_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100323 pinctrl-1 = <&pwm8_sleep_pins_a>;
324 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200325 status = "okay";
326 };
327 timer@7 {
328 status = "okay";
329 };
330};
331
332&timers12 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200333 /delete-property/dmas;
334 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200335 status = "disabled";
336 pwm {
337 pinctrl-0 = <&pwm12_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100338 pinctrl-1 = <&pwm12_sleep_pins_a>;
339 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200340 status = "okay";
341 };
342 timer@11 {
343 status = "okay";
344 };
345};
346
Patrick Delaunay62f95af2020-09-16 10:01:32 +0200347&usart3 {
348 pinctrl-names = "default", "sleep", "idle";
349 pinctrl-0 = <&usart3_pins_b>;
350 pinctrl-1 = <&usart3_sleep_pins_b>;
351 pinctrl-2 = <&usart3_idle_pins_b>;
352 /*
353 * HW flow control USART3_RTS is optional, and isn't default wired to
354 * the connector. SB23 needs to be soldered in order to use it, and R77
355 * (ETH_CLK) should be removed.
356 */
357 uart-has-rtscts;
358 status = "disabled";
359};
360
Patrice Chotardbad48a42018-08-10 17:12:12 +0200361&usbh_ehci {
362 phys = <&usbphyc_port0>;
Patrice Chotardbad48a42018-08-10 17:12:12 +0200363 status = "okay";
364};
365
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200366&usbotg_hs {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200367 pinctrl-0 = <&usbotg_hs_pins_a>;
368 pinctrl-names = "default";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200369 phys = <&usbphyc_port1 0>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100370 phy-names = "usb2-phy";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200371 status = "okay";
372};
373
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200374&usbphyc {
375 status = "okay";
376};