Merge tag 'core-urgent-2020-07-05' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp157c-ev1.dts
1 // 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"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13         model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
14         compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
15
16         chosen {
17                 stdout-path = "serial0:115200n8";
18         };
19
20         aliases {
21                 serial0 = &uart4;
22                 ethernet0 = &ethernet0;
23         };
24
25         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                 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
69         panel_backlight: panel-backlight {
70                 compatible = "gpio-backlight";
71                 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
72                 default-on;
73                 status = "okay";
74         };
75 };
76
77 &cec {
78         pinctrl-names = "default";
79         pinctrl-0 = <&cec_pins_a>;
80         status = "okay";
81 };
82
83 &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
100 &dsi {
101         phy-dsi-supply = <&reg18>;
102         status = "okay";
103
104         ports {
105                 port@0 {
106                         reg = <0>;
107                         dsi_in: endpoint {
108                                 remote-endpoint = <&ltdc_ep0_out>;
109                         };
110                 };
111
112                 port@1 {
113                         reg = <1>;
114                         dsi_out: endpoint {
115                                 remote-endpoint = <&dsi_panel_in>;
116                         };
117                 };
118         };
119
120         panel-dsi@0 {
121                 compatible = "raydium,rm68200";
122                 reg = <0>;
123                 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
124                 backlight = <&panel_backlight>;
125                 power-supply = <&v3v3>;
126                 status = "okay";
127
128                 port {
129                         dsi_panel_in: endpoint {
130                                 remote-endpoint = <&dsi_out>;
131                         };
132                 };
133         };
134 };
135
136 &ethernet0 {
137         status = "okay";
138         pinctrl-0 = <&ethernet0_rgmii_pins_a>;
139         pinctrl-1 = <&ethernet0_rgmii_sleep_pins_a>;
140         pinctrl-names = "default", "sleep";
141         phy-mode = "rgmii-id";
142         max-speed = <1000>;
143         phy-handle = <&phy0>;
144
145         mdio0 {
146                 #address-cells = <1>;
147                 #size-cells = <0>;
148                 compatible = "snps,dwmac-mdio";
149                 phy0: ethernet-phy@0 {
150                         reg = <0>;
151                 };
152         };
153 };
154
155 &fmc {
156         pinctrl-names = "default", "sleep";
157         pinctrl-0 = <&fmc_pins_a>;
158         pinctrl-1 = <&fmc_sleep_pins_a>;
159         status = "okay";
160         #address-cells = <1>;
161         #size-cells = <0>;
162
163         nand@0 {
164                 reg = <0>;
165                 nand-on-flash-bbt;
166                 #address-cells = <1>;
167                 #size-cells = <1>;
168         };
169 };
170
171 &i2c2 {
172         pinctrl-names = "default", "sleep";
173         pinctrl-0 = <&i2c2_pins_a>;
174         pinctrl-1 = <&i2c2_sleep_pins_a>;
175         i2c-scl-rising-time-ns = <185>;
176         i2c-scl-falling-time-ns = <20>;
177         status = "okay";
178
179         ov5640: camera@3c {
180                 compatible = "ovti,ov5640";
181                 reg = <0x3c>;
182                 clocks = <&clk_ext_camera>;
183                 clock-names = "xclk";
184                 DOVDD-supply = <&v2v8>;
185                 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
186                 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
187                 rotation = <180>;
188                 status = "okay";
189
190                 port {
191                         ov5640_0: endpoint {
192                                 remote-endpoint = <&dcmi_0>;
193                                 bus-width = <8>;
194                                 data-shift = <2>; /* lines 9:2 are used */
195                                 hsync-active = <0>;
196                                 vsync-active = <0>;
197                                 pclk-sample = <1>;
198                         };
199                 };
200         };
201
202         stmfx: stmfx@42 {
203                 compatible = "st,stmfx-0300";
204                 reg = <0x42>;
205                 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
206                 interrupt-parent = <&gpioi>;
207                 vdd-supply = <&v3v3>;
208
209                 stmfx_pinctrl: pinctrl {
210                         compatible = "st,stmfx-0300-pinctrl";
211                         gpio-controller;
212                         #gpio-cells = <2>;
213                         interrupt-controller;
214                         #interrupt-cells = <2>;
215                         gpio-ranges = <&stmfx_pinctrl 0 0 24>;
216
217                         joystick_pins: joystick-pins {
218                                 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
219                                 bias-pull-down;
220                         };
221                 };
222         };
223 };
224
225 &i2c5 {
226         pinctrl-names = "default", "sleep";
227         pinctrl-0 = <&i2c5_pins_a>;
228         pinctrl-1 = <&i2c5_sleep_pins_a>;
229         i2c-scl-rising-time-ns = <185>;
230         i2c-scl-falling-time-ns = <20>;
231         status = "okay";
232 };
233
234 &ltdc {
235         status = "okay";
236
237         port {
238                 ltdc_ep0_out: endpoint@0 {
239                         reg = <0>;
240                         remote-endpoint = <&dsi_in>;
241                 };
242         };
243 };
244
245 &m_can1 {
246         pinctrl-names = "default", "sleep";
247         pinctrl-0 = <&m_can1_pins_a>;
248         pinctrl-1 = <&m_can1_sleep_pins_a>;
249         status = "okay";
250 };
251
252 &qspi {
253         pinctrl-names = "default", "sleep";
254         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
255         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
256         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
257         #address-cells = <1>;
258         #size-cells = <0>;
259         status = "okay";
260
261         flash0: mx66l51235l@0 {
262                 compatible = "jedec,spi-nor";
263                 reg = <0>;
264                 spi-rx-bus-width = <4>;
265                 spi-max-frequency = <108000000>;
266                 #address-cells = <1>;
267                 #size-cells = <1>;
268         };
269
270         flash1: mx66l51235l@1 {
271                 compatible = "jedec,spi-nor";
272                 reg = <1>;
273                 spi-rx-bus-width = <4>;
274                 spi-max-frequency = <108000000>;
275                 #address-cells = <1>;
276                 #size-cells = <1>;
277         };
278 };
279
280 &sdmmc3 {
281         pinctrl-names = "default", "opendrain", "sleep";
282         pinctrl-0 = <&sdmmc3_b4_pins_a>;
283         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
284         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
285         broken-cd;
286         st,neg-edge;
287         bus-width = <4>;
288         vmmc-supply = <&v3v3>;
289         status = "disabled";
290 };
291
292 &spi1 {
293         pinctrl-names = "default";
294         pinctrl-0 = <&spi1_pins_a>;
295         status = "disabled";
296 };
297
298 &timers2 {
299         /* spare dmas for other usage (un-delete to enable pwm capture) */
300         /delete-property/dmas;
301         /delete-property/dma-names;
302         status = "disabled";
303         pwm {
304                 pinctrl-0 = <&pwm2_pins_a>;
305                 pinctrl-1 = <&pwm2_sleep_pins_a>;
306                 pinctrl-names = "default", "sleep";
307                 status = "okay";
308         };
309         timer@1 {
310                 status = "okay";
311         };
312 };
313
314 &timers8 {
315         /delete-property/dmas;
316         /delete-property/dma-names;
317         status = "disabled";
318         pwm {
319                 pinctrl-0 = <&pwm8_pins_a>;
320                 pinctrl-1 = <&pwm8_sleep_pins_a>;
321                 pinctrl-names = "default", "sleep";
322                 status = "okay";
323         };
324         timer@7 {
325                 status = "okay";
326         };
327 };
328
329 &timers12 {
330         /delete-property/dmas;
331         /delete-property/dma-names;
332         status = "disabled";
333         pwm {
334                 pinctrl-0 = <&pwm12_pins_a>;
335                 pinctrl-1 = <&pwm12_sleep_pins_a>;
336                 pinctrl-names = "default", "sleep";
337                 status = "okay";
338         };
339         timer@11 {
340                 status = "okay";
341         };
342 };
343
344 &usbh_ehci {
345         phys = <&usbphyc_port0>;
346         status = "okay";
347 };
348
349 &usbotg_hs {
350         pinctrl-0 = <&usbotg_hs_pins_a>;
351         pinctrl-names = "default";
352         phys = <&usbphyc_port1 0>;
353         phy-names = "usb2-phy";
354         status = "okay";
355 };
356
357 &usbphyc {
358         status = "okay";
359 };