blob: bd8ffc185f966b9e7d04a7851f27c73a5c4256c1 [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 Delaunaye7f435d2018-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 Chotard00442d02019-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 Delaunay708cae72019-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 Delaunay708cae72019-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 Chotard00442d02019-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 Delaunaye7f435d2018-07-09 15:17:22 +020075};
76
77&cec {
78 pinctrl-names = "default";
79 pinctrl-0 = <&cec_pins_a>;
80 status = "okay";
Patrice Chotard00442d02019-02-12 16:50:38 +010081};
82
Patrick Delaunay708cae72019-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 Chotard00442d02019-02-12 16:50:38 +0100100&dsi {
101 #address-cells = <1>;
102 #size-cells = <0>;
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 {
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 Delaunay708cae72019-07-30 19:16:12 +0200130 power-supply = <&v3v3>;
Patrice Chotard00442d02019-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 Roullier32ac3052019-05-17 15:08:45 +0200146 phy-mode = "rgmii-id";
Patrice Chotard00442d02019-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 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200158};
159
Patrick Delaunaye0188ac2019-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 Delaunay8c6e6132019-11-06 16:16:33 +0100168 nand@0 {
Patrick Delaunaye0188ac2019-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 Delaunaye7f435d2018-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 Delaunay1b58b552019-04-12 14:38:28 +0200182
Patrick Delaunay708cae72019-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>;
Patrick Delaunay651aea32020-01-28 10:10:58 +0100191 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
192 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200193 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 Delaunay1b58b552019-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 Delaunay708cae72019-07-30 19:16:12 +0200222
223 joystick_pins: joystick {
224 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200225 bias-pull-down;
226 };
227
228 ov5640_pins: camera {
229 pins = "agpio2", "agpio3"; /* stmfx pins 18 & 19 */
230 drive-push-pull;
231 output-low;
232 };
Patrick Delaunay1b58b552019-04-12 14:38:28 +0200233 };
234 };
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200235};
236
237&i2c5 {
238 pinctrl-names = "default";
239 pinctrl-0 = <&i2c5_pins_a>;
240 i2c-scl-rising-time-ns = <185>;
241 i2c-scl-falling-time-ns = <20>;
242 status = "okay";
243};
244
Patrice Chotard00442d02019-02-12 16:50:38 +0100245&ltdc {
246 status = "okay";
247
248 port {
249 #address-cells = <1>;
250 #size-cells = <0>;
251
252 ltdc_ep0_out: endpoint@0 {
253 reg = <0>;
254 remote-endpoint = <&dsi_in>;
255 };
256 };
257};
258
259&m_can1 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200260 pinctrl-names = "default", "sleep";
Patrice Chotard00442d02019-02-12 16:50:38 +0100261 pinctrl-0 = <&m_can1_pins_a>;
Patrick Delaunaya3705302019-07-11 11:15:28 +0200262 pinctrl-1 = <&m_can1_sleep_pins_a>;
Patrice Chotard00442d02019-02-12 16:50:38 +0100263 status = "okay";
264};
265
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200266&qspi {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200267 pinctrl-names = "default", "sleep";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200268 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200269 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200270 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
271 #address-cells = <1>;
272 #size-cells = <0>;
273 status = "okay";
274
275 flash0: mx66l51235l@0 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200276 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200277 reg = <0>;
278 spi-rx-bus-width = <4>;
279 spi-max-frequency = <108000000>;
280 #address-cells = <1>;
281 #size-cells = <1>;
282 };
283
284 flash1: mx66l51235l@1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200285 compatible = "jedec,spi-nor";
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200286 reg = <1>;
287 spi-rx-bus-width = <4>;
288 spi-max-frequency = <108000000>;
289 #address-cells = <1>;
290 #size-cells = <1>;
291 };
292};
293
Patrice Chotard00442d02019-02-12 16:50:38 +0100294&spi1 {
295 pinctrl-names = "default";
296 pinctrl-0 = <&spi1_pins_a>;
297 status = "disabled";
298};
299
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200300&timers2 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200301 /* spare dmas for other usage (un-delete to enable pwm capture) */
302 /delete-property/dmas;
303 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200304 status = "disabled";
305 pwm {
306 pinctrl-0 = <&pwm2_pins_a>;
307 pinctrl-names = "default";
308 status = "okay";
309 };
310 timer@1 {
311 status = "okay";
312 };
313};
314
315&timers8 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200316 /delete-property/dmas;
317 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200318 status = "disabled";
319 pwm {
320 pinctrl-0 = <&pwm8_pins_a>;
321 pinctrl-names = "default";
322 status = "okay";
323 };
324 timer@7 {
325 status = "okay";
326 };
327};
328
329&timers12 {
Patrick Delaunaya3705302019-07-11 11:15:28 +0200330 /delete-property/dmas;
331 /delete-property/dma-names;
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200332 status = "disabled";
333 pwm {
334 pinctrl-0 = <&pwm12_pins_a>;
335 pinctrl-names = "default";
336 status = "okay";
337 };
338 timer@11 {
339 status = "okay";
340 };
341};
342
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200343&usbh_ehci {
344 phys = <&usbphyc_port0>;
Patrice Chotardf7a5edc2018-08-10 17:12:12 +0200345 status = "okay";
346};
347
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200348&usbotg_hs {
Patrice Chotard00442d02019-02-12 16:50:38 +0100349 dr_mode = "peripheral";
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200350 phys = <&usbphyc_port1 0>;
Patrice Chotard18cb6f52018-08-10 17:12:11 +0200351 status = "okay";
352};
353
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200354&usbphyc {
355 status = "okay";
356};