blob: 23de232831c0405fb9c4814ddb5f18bbd73cc789 [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";
35 #size-cells = <0>;
36 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 {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 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
168 nand: nand@0 {
169 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 {
177 pinctrl-names = "default";
178 pinctrl-0 = <&i2c2_pins_a>;
179 i2c-scl-rising-time-ns = <185>;
180 i2c-scl-falling-time-ns = <20>;
181 status = "okay";
Patrick Delaunay1258e462019-04-12 14:38:28 +0200182
Patrick Delaunayfe915332019-07-30 19:16:12 +0200183 ov5640: camera@3c {
184 compatible = "ovti,ov5640";
185 pinctrl-names = "default";
186 pinctrl-0 = <&ov5640_pins>;
187 reg = <0x3c>;
188 clocks = <&clk_ext_camera>;
189 clock-names = "xclk";
190 DOVDD-supply = <&v2v8>;
191 powerdown-gpios = <&stmfx_pinctrl 18 GPIO_ACTIVE_HIGH>;
192 reset-gpios = <&stmfx_pinctrl 19 GPIO_ACTIVE_LOW>;
193 rotation = <180>;
194 status = "okay";
195
196 port {
197 ov5640_0: endpoint {
198 remote-endpoint = <&dcmi_0>;
199 bus-width = <8>;
200 data-shift = <2>; /* lines 9:2 are used */
201 hsync-active = <0>;
202 vsync-active = <0>;
203 pclk-sample = <1>;
204 };
205 };
206 };
207
Patrick Delaunay1258e462019-04-12 14:38:28 +0200208 stmfx: stmfx@42 {
209 compatible = "st,stmfx-0300";
210 reg = <0x42>;
211 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
212 interrupt-parent = <&gpioi>;
213 vdd-supply = <&v3v3>;
214
215 stmfx_pinctrl: stmfx-pin-controller {
216 compatible = "st,stmfx-0300-pinctrl";
217 gpio-controller;
218 #gpio-cells = <2>;
219 interrupt-controller;
220 #interrupt-cells = <2>;
221 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200222
223 joystick_pins: joystick {
224 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
225 drive-push-pull;
226 bias-pull-down;
227 };
228
229 ov5640_pins: camera {
230 pins = "agpio2", "agpio3"; /* stmfx pins 18 & 19 */
231 drive-push-pull;
232 output-low;
233 };
Patrick Delaunay1258e462019-04-12 14:38:28 +0200234 };
235 };
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200236};
237
238&i2c5 {
239 pinctrl-names = "default";
240 pinctrl-0 = <&i2c5_pins_a>;
241 i2c-scl-rising-time-ns = <185>;
242 i2c-scl-falling-time-ns = <20>;
243 status = "okay";
244};
245
Patrice Chotard23661602019-02-12 16:50:38 +0100246&ltdc {
247 status = "okay";
248
249 port {
250 #address-cells = <1>;
251 #size-cells = <0>;
252
253 ltdc_ep0_out: endpoint@0 {
254 reg = <0>;
255 remote-endpoint = <&dsi_in>;
256 };
257 };
258};
259
260&m_can1 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200261 pinctrl-names = "default", "sleep";
Patrice Chotard23661602019-02-12 16:50:38 +0100262 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200263 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100264 status = "okay";
265};
266
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200267&qspi {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200268 pinctrl-names = "default", "sleep";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200269 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200270 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200271 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
272 #address-cells = <1>;
273 #size-cells = <0>;
274 status = "okay";
275
276 flash0: mx66l51235l@0 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200277 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200278 reg = <0>;
279 spi-rx-bus-width = <4>;
280 spi-max-frequency = <108000000>;
281 #address-cells = <1>;
282 #size-cells = <1>;
283 };
284
285 flash1: mx66l51235l@1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200286 compatible = "jedec,spi-nor";
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200287 reg = <1>;
288 spi-rx-bus-width = <4>;
289 spi-max-frequency = <108000000>;
290 #address-cells = <1>;
291 #size-cells = <1>;
292 };
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>;
308 pinctrl-names = "default";
309 status = "okay";
310 };
311 timer@1 {
312 status = "okay";
313 };
314};
315
316&timers8 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200317 /delete-property/dmas;
318 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200319 status = "disabled";
320 pwm {
321 pinctrl-0 = <&pwm8_pins_a>;
322 pinctrl-names = "default";
323 status = "okay";
324 };
325 timer@7 {
326 status = "okay";
327 };
328};
329
330&timers12 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200331 /delete-property/dmas;
332 /delete-property/dma-names;
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200333 status = "disabled";
334 pwm {
335 pinctrl-0 = <&pwm12_pins_a>;
336 pinctrl-names = "default";
337 status = "okay";
338 };
339 timer@11 {
340 status = "okay";
341 };
342};
343
Patrice Chotardbad48a42018-08-10 17:12:12 +0200344&usbh_ehci {
345 phys = <&usbphyc_port0>;
346 phy-names = "usb";
Patrice Chotardbad48a42018-08-10 17:12:12 +0200347 status = "okay";
348};
349
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200350&usbotg_hs {
Patrice Chotard23661602019-02-12 16:50:38 +0100351 dr_mode = "peripheral";
Patrice Chotard8e9c94d2018-08-10 17:12:11 +0200352 phys = <&usbphyc_port1 0>;
353 phy-names = "usb2-phy";
354 status = "okay";
355};
356
Patrick Delaunay5f16f652018-07-09 15:17:22 +0200357&usbphyc {
358 status = "okay";
359};