Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[sfrench/cifs-2.6.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                 #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
70         panel_backlight: panel-backlight {
71                 compatible = "gpio-backlight";
72                 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
73                 default-on;
74                 status = "okay";
75         };
76 };
77
78 &cec {
79         pinctrl-names = "default";
80         pinctrl-0 = <&cec_pins_a>;
81         status = "okay";
82 };
83
84 &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
101 &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>;
130                 power-supply = <&v3v3>;
131                 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";
146         phy-mode = "rgmii-id";
147         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
160 &i2c2 {
161         pinctrl-names = "default";
162         pinctrl-0 = <&i2c2_pins_a>;
163         i2c-scl-rising-time-ns = <185>;
164         i2c-scl-falling-time-ns = <20>;
165         status = "okay";
166
167         ov5640: camera@3c {
168                 compatible = "ovti,ov5640";
169                 pinctrl-names = "default";
170                 pinctrl-0 = <&ov5640_pins>;
171                 reg = <0x3c>;
172                 clocks = <&clk_ext_camera>;
173                 clock-names = "xclk";
174                 DOVDD-supply = <&v2v8>;
175                 powerdown-gpios = <&stmfx_pinctrl 18 GPIO_ACTIVE_HIGH>;
176                 reset-gpios = <&stmfx_pinctrl 19 GPIO_ACTIVE_LOW>;
177                 rotation = <180>;
178                 status = "okay";
179
180                 port {
181                         ov5640_0: endpoint {
182                                 remote-endpoint = <&dcmi_0>;
183                                 bus-width = <8>;
184                                 data-shift = <2>; /* lines 9:2 are used */
185                                 hsync-active = <0>;
186                                 vsync-active = <0>;
187                                 pclk-sample = <1>;
188                         };
189                 };
190         };
191
192         stmfx: stmfx@42 {
193                 compatible = "st,stmfx-0300";
194                 reg = <0x42>;
195                 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
196                 interrupt-parent = <&gpioi>;
197                 vdd-supply = <&v3v3>;
198
199                 stmfx_pinctrl: stmfx-pin-controller {
200                         compatible = "st,stmfx-0300-pinctrl";
201                         gpio-controller;
202                         #gpio-cells = <2>;
203                         interrupt-controller;
204                         #interrupt-cells = <2>;
205                         gpio-ranges = <&stmfx_pinctrl 0 0 24>;
206
207                         joystick_pins: joystick {
208                                 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
209                                 drive-push-pull;
210                                 bias-pull-down;
211                         };
212
213                         ov5640_pins: camera {
214                                 pins = "agpio2", "agpio3"; /* stmfx pins 18 & 19 */
215                                 drive-push-pull;
216                                 output-low;
217                         };
218                 };
219         };
220 };
221
222 &i2c5 {
223         pinctrl-names = "default";
224         pinctrl-0 = <&i2c5_pins_a>;
225         i2c-scl-rising-time-ns = <185>;
226         i2c-scl-falling-time-ns = <20>;
227         status = "okay";
228 };
229
230 &ltdc {
231         status = "okay";
232
233         port {
234                 #address-cells = <1>;
235                 #size-cells = <0>;
236
237                 ltdc_ep0_out: endpoint@0 {
238                         reg = <0>;
239                         remote-endpoint = <&dsi_in>;
240                 };
241         };
242 };
243
244 &m_can1 {
245         pinctrl-names = "default", "sleep";
246         pinctrl-0 = <&m_can1_pins_a>;
247         pinctrl-1 = <&m_can1_sleep_pins_a>;
248         status = "okay";
249 };
250
251 &qspi {
252         pinctrl-names = "default", "sleep";
253         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
254         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
255         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
256         #address-cells = <1>;
257         #size-cells = <0>;
258         status = "okay";
259
260         flash0: mx66l51235l@0 {
261                 compatible = "jedec,spi-nor";
262                 reg = <0>;
263                 spi-rx-bus-width = <4>;
264                 spi-max-frequency = <108000000>;
265                 #address-cells = <1>;
266                 #size-cells = <1>;
267         };
268
269         flash1: mx66l51235l@1 {
270                 compatible = "jedec,spi-nor";
271                 reg = <1>;
272                 spi-rx-bus-width = <4>;
273                 spi-max-frequency = <108000000>;
274                 #address-cells = <1>;
275                 #size-cells = <1>;
276         };
277 };
278
279 &spi1 {
280         pinctrl-names = "default";
281         pinctrl-0 = <&spi1_pins_a>;
282         status = "disabled";
283 };
284
285 &timers2 {
286         /* spare dmas for other usage (un-delete to enable pwm capture) */
287         /delete-property/dmas;
288         /delete-property/dma-names;
289         status = "disabled";
290         pwm {
291                 pinctrl-0 = <&pwm2_pins_a>;
292                 pinctrl-names = "default";
293                 status = "okay";
294         };
295         timer@1 {
296                 status = "okay";
297         };
298 };
299
300 &timers8 {
301         /delete-property/dmas;
302         /delete-property/dma-names;
303         status = "disabled";
304         pwm {
305                 pinctrl-0 = <&pwm8_pins_a>;
306                 pinctrl-names = "default";
307                 status = "okay";
308         };
309         timer@7 {
310                 status = "okay";
311         };
312 };
313
314 &timers12 {
315         /delete-property/dmas;
316         /delete-property/dma-names;
317         status = "disabled";
318         pwm {
319                 pinctrl-0 = <&pwm12_pins_a>;
320                 pinctrl-names = "default";
321                 status = "okay";
322         };
323         timer@11 {
324                 status = "okay";
325         };
326 };
327
328 &usbh_ehci {
329         phys = <&usbphyc_port0>;
330         phy-names = "usb";
331         status = "okay";
332 };
333
334 &usbotg_hs {
335         dr_mode = "peripheral";
336         phys = <&usbphyc_port1 0>;
337         phy-names = "usb2-phy";
338         status = "okay";
339 };
340
341 &usbphyc {
342         status = "okay";
343 };