blob: 8a4c7ff31a922e7717f78a36eac0b5f963a6d9c9 [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;
22 ethernet0 = &ethernet0;
23 };
24
Patrick Delaunayfe915332019-07-30 19:16:12 +020025 clocks {
26 clk_ext_camera: clk-ext-camera {
27 #clock-cells = <0>;
28 compatible = "fixed-clock";
29 clock-frequency = <24000000>;
30 };
31 };
32
33 joystick {
34 compatible = "gpio-keys";
Patrick Delaunayfe915332019-07-30 19:16:12 +020035 pinctrl-0 = <&joystick_pins>;
36 pinctrl-names = "default";
37 button-0 {
38 label = "JoySel";
39 linux,code = <KEY_ENTER>;
40 interrupt-parent = <&stmfx_pinctrl>;
41 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
42 };
43 button-1 {
44 label = "JoyDown";
45 linux,code = <KEY_DOWN>;
46 interrupt-parent = <&stmfx_pinctrl>;
47 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
48 };
49 button-2 {
50 label = "JoyLeft";
51 linux,code = <KEY_LEFT>;
52 interrupt-parent = <&stmfx_pinctrl>;
53 interrupts = <2 IRQ_TYPE_EDGE_RISING>;
54 };
55 button-3 {
56 label = "JoyRight";
57 linux,code = <KEY_RIGHT>;
58 interrupt-parent = <&stmfx_pinctrl>;
59 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
60 };
61 button-4 {
62 label = "JoyUp";
63 linux,code = <KEY_UP>;
64 interrupt-parent = <&stmfx_pinctrl>;
65 interrupts = <4 IRQ_TYPE_EDGE_RISING>;
66 };
67 };
68
Patrice Chotard23661602019-02-12 16:50:38 +010069 panel_backlight: panel-backlight {
70 compatible = "gpio-backlight";
71 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
72 default-on;
73 status = "okay";
74 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +020075};
76
77&cec {
78 pinctrl-names = "default";
79 pinctrl-0 = <&cec_pins_a>;
80 status = "okay";
81};
82
Patrick Delaunayfe915332019-07-30 19:16:12 +020083&dcmi {
84 status = "okay";
85 pinctrl-names = "default", "sleep";
86 pinctrl-0 = <&dcmi_pins_a>;
87 pinctrl-1 = <&dcmi_sleep_pins_a>;
88
89 port {
90 dcmi_0: endpoint {
91 remote-endpoint = <&ov5640_0>;
92 bus-width = <8>;
93 hsync-active = <0>;
94 vsync-active = <0>;
95 pclk-sample = <1>;
96 };
97 };
98};
99
Patrice Chotard23661602019-02-12 16:50:38 +0100100&dsi {
101 #address-cells = <1>;
102 #size-cells = <0>;
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100103 phy-dsi-supply = <&reg18>;
Patrice Chotard23661602019-02-12 16:50:38 +0100104 status = "okay";
105
106 ports {
107 #address-cells = <1>;
108 #size-cells = <0>;
109
110 port@0 {
111 reg = <0>;
112 dsi_in: endpoint {
113 remote-endpoint = <&ltdc_ep0_out>;
114 };
115 };
116
117 port@1 {
118 reg = <1>;
119 dsi_out: endpoint {
120 remote-endpoint = <&dsi_panel_in>;
121 };
122 };
123 };
124
125 panel-dsi@0 {
126 compatible = "raydium,rm68200";
127 reg = <0>;
128 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
129 backlight = <&panel_backlight>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200130 power-supply = <&v3v3>;
Patrice Chotard23661602019-02-12 16:50:38 +0100131 status = "okay";
132
133 port {
134 dsi_panel_in: endpoint {
135 remote-endpoint = <&dsi_out>;
136 };
137 };
138 };
139};
140
141&ethernet0 {
142 status = "okay";
143 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
144 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
145 pinctrl-names = "default", "sleep";
Christophe Roullierc8ef9532019-05-17 15:08:45 +0200146 phy-mode = "rgmii-id";
Patrice Chotard23661602019-02-12 16:50:38 +0100147 max-speed = <1000>;
148 phy-handle = <&phy0>;
149
150 mdio0 {
151 #address-cells = <1>;
152 #size-cells = <0>;
153 compatible = "snps,dwmac-mdio";
154 phy0: ethernet-phy@0 {
155 reg = <0>;
156 };
157 };
158};
159
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200160&fmc {
161 pinctrl-names = "default", "sleep";
162 pinctrl-0 = <&fmc_pins_a>;
163 pinctrl-1 = <&fmc_sleep_pins_a>;
164 status = "okay";
165 #address-cells = <1>;
166 #size-cells = <0>;
167
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100168 nand@0 {
Patrick Delaunayc4a739a2019-04-08 15:30:52 +0200169 reg = <0>;
170 nand-on-flash-bbt;
171 #address-cells = <1>;
172 #size-cells = <1>;
173 };
174};
175
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200176&i2c2 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200177 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200178 pinctrl-0 = <&i2c2_pins_a>;
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200179 pinctrl-1 = <&i2c2_pins_sleep_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200180 i2c-scl-rising-time-ns = <185>;
181 i2c-scl-falling-time-ns = <20>;
182 status = "okay";
Patrick Delaunay1258e462019-04-12 14:38:28 +0200183
Patrick Delaunayfe915332019-07-30 19:16:12 +0200184 ov5640: camera@3c {
185 compatible = "ovti,ov5640";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200186 reg = <0x3c>;
187 clocks = <&clk_ext_camera>;
188 clock-names = "xclk";
189 DOVDD-supply = <&v2v8>;
Patrick Delaunay4f280922020-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 Delaunayfe915332019-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 Delaunay1258e462019-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 Delaunay1b28a5e2020-04-30 15:52:46 +0200214 stmfx_pinctrl: pinctrl {
Patrick Delaunay1258e462019-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 Delaunayfe915332019-07-30 19:16:12 +0200221
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200222 joystick_pins: joystick-pins {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200223 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200224 bias-pull-down;
225 };
Patrick Delaunay1258e462019-04-12 14:38:28 +0200226 };
227 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200228};
229
230&i2c5 {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200231 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200232 pinctrl-0 = <&i2c5_pins_a>;
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200233 pinctrl-1 = <&i2c5_pins_sleep_a>;
Patrick Delaunay5f16f652018-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 Chotard23661602019-02-12 16:50:38 +0100239&ltdc {
240 status = "okay";
241
242 port {
243 #address-cells = <1>;
244 #size-cells = <0>;
245
246 ltdc_ep0_out: endpoint@0 {
247 reg = <0>;
248 remote-endpoint = <&dsi_in>;
249 };
250 };
251};
252
253&m_can1 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200254 pinctrl-names = "default", "sleep";
Patrice Chotard23661602019-02-12 16:50:38 +0100255 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200256 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100257 status = "okay";
258};
259
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200260&qspi {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200261 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200262 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200263 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200264 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
265 #address-cells = <1>;
266 #size-cells = <0>;
267 status = "okay";
268
269 flash0: mx66l51235l@0 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200270 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200271 reg = <0>;
272 spi-rx-bus-width = <4>;
273 spi-max-frequency = <108000000>;
274 #address-cells = <1>;
275 #size-cells = <1>;
276 };
277
278 flash1: mx66l51235l@1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200279 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200280 reg = <1>;
281 spi-rx-bus-width = <4>;
282 spi-max-frequency = <108000000>;
283 #address-cells = <1>;
284 #size-cells = <1>;
285 };
286};
287
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100288&sdmmc3 {
289 pinctrl-names = "default", "opendrain", "sleep";
290 pinctrl-0 = <&sdmmc3_b4_pins_a>;
291 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
292 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
293 broken-cd;
294 st,neg-edge;
295 bus-width = <4>;
296 vmmc-supply = <&v3v3>;
297 status = "disabled";
298};
299
Patrice Chotard23661602019-02-12 16:50:38 +0100300&spi1 {
301 pinctrl-names = "default";
302 pinctrl-0 = <&spi1_pins_a>;
303 status = "disabled";
304};
305
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200306&timers2 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200307 /* spare dmas for other usage (un-delete to enable pwm capture) */
308 /delete-property/dmas;
309 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200310 status = "disabled";
311 pwm {
312 pinctrl-0 = <&pwm2_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100313 pinctrl-1 = <&pwm2_sleep_pins_a>;
314 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200315 status = "okay";
316 };
317 timer@1 {
318 status = "okay";
319 };
320};
321
322&timers8 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200323 /delete-property/dmas;
324 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200325 status = "disabled";
326 pwm {
327 pinctrl-0 = <&pwm8_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100328 pinctrl-1 = <&pwm8_sleep_pins_a>;
329 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200330 status = "okay";
331 };
332 timer@7 {
333 status = "okay";
334 };
335};
336
337&timers12 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200338 /delete-property/dmas;
339 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200340 status = "disabled";
341 pwm {
342 pinctrl-0 = <&pwm12_pins_a>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100343 pinctrl-1 = <&pwm12_sleep_pins_a>;
344 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200345 status = "okay";
346 };
347 timer@11 {
348 status = "okay";
349 };
350};
351
Patrice Chotardbad48a42018-08-10 17:12:12 +0200352&usbh_ehci {
353 phys = <&usbphyc_port0>;
Patrice Chotardbad48a42018-08-10 17:12:12 +0200354 status = "okay";
355};
356
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200357&usbotg_hs {
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200358 pinctrl-0 = <&usbotg_hs_pins_a>;
359 pinctrl-names = "default";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200360 phys = <&usbphyc_port1 0>;
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +0100361 phy-names = "usb2-phy";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200362 status = "okay";
363};
364
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200365&usbphyc {
366 status = "okay";
367};