]>
Commit | Line | Data |
---|---|---|
bcc4f4e1 LB |
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" | |
67330599 | 9 | #include <dt-bindings/gpio/gpio.h> |
2619646b | 10 | #include <dt-bindings/input/input.h> |
bcc4f4e1 LB |
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; | |
a7419ff8 CR |
22 | ethernet0 = ðernet0; |
23 | }; | |
67330599 | 24 | |
d0352ebd HF |
25 | clocks { |
26 | clk_ext_camera: clk-ext-camera { | |
27 | #clock-cells = <0>; | |
28 | compatible = "fixed-clock"; | |
29 | clock-frequency = <24000000>; | |
30 | }; | |
31 | }; | |
32 | ||
2619646b AD |
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 | ||
67330599 YF |
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 | ||
d0352ebd HF |
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 | ||
67330599 YF |
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 = <<dc_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>; | |
59713360 | 130 | power-supply = <&v3v3>; |
67330599 YF |
131 | status = "okay"; |
132 | ||
133 | port { | |
134 | dsi_panel_in: endpoint { | |
135 | remote-endpoint = <&dsi_out>; | |
136 | }; | |
137 | }; | |
138 | }; | |
a7419ff8 CR |
139 | }; |
140 | ||
141 | ðernet0 { | |
142 | status = "okay"; | |
143 | pinctrl-0 = <ðernet0_rgmii_pins_a>; | |
144 | pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; | |
145 | pinctrl-names = "default", "sleep"; | |
f65aaf8b | 146 | phy-mode = "rgmii-id"; |
a7419ff8 CR |
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 | }; | |
bcc4f4e1 LB |
157 | }; |
158 | }; | |
5c3d6781 | 159 | |
d4f41ef7 PYM |
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"; | |
98c2663b | 166 | |
d0352ebd HF |
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 | ||
98c2663b AD |
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>; | |
2619646b AD |
206 | |
207 | joystick_pins: joystick { | |
208 | pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; | |
2619646b AD |
209 | bias-pull-down; |
210 | }; | |
d0352ebd HF |
211 | |
212 | ov5640_pins: camera { | |
213 | pins = "agpio2", "agpio3"; /* stmfx pins 18 & 19 */ | |
214 | drive-push-pull; | |
215 | output-low; | |
216 | }; | |
98c2663b AD |
217 | }; |
218 | }; | |
d4f41ef7 PYM |
219 | }; |
220 | ||
221 | &i2c5 { | |
222 | pinctrl-names = "default"; | |
223 | pinctrl-0 = <&i2c5_pins_a>; | |
224 | i2c-scl-rising-time-ns = <185>; | |
225 | i2c-scl-falling-time-ns = <20>; | |
226 | status = "okay"; | |
227 | }; | |
228 | ||
67330599 YF |
229 | <dc { |
230 | status = "okay"; | |
231 | ||
232 | port { | |
233 | #address-cells = <1>; | |
234 | #size-cells = <0>; | |
235 | ||
236 | ltdc_ep0_out: endpoint@0 { | |
237 | reg = <0>; | |
238 | remote-endpoint = <&dsi_in>; | |
239 | }; | |
240 | }; | |
241 | }; | |
242 | ||
41cc73c5 | 243 | &m_can1 { |
e3b3d0b1 | 244 | pinctrl-names = "default", "sleep"; |
41cc73c5 | 245 | pinctrl-0 = <&m_can1_pins_a>; |
e3b3d0b1 | 246 | pinctrl-1 = <&m_can1_sleep_pins_a>; |
41cc73c5 ELR |
247 | status = "okay"; |
248 | }; | |
249 | ||
84403005 | 250 | &qspi { |
e79fe5fa | 251 | pinctrl-names = "default", "sleep"; |
84403005 | 252 | pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>; |
e79fe5fa | 253 | pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>; |
84403005 LB |
254 | reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; |
255 | #address-cells = <1>; | |
256 | #size-cells = <0>; | |
257 | status = "okay"; | |
258 | ||
259 | flash0: mx66l51235l@0 { | |
04645a12 | 260 | compatible = "jedec,spi-nor"; |
84403005 LB |
261 | reg = <0>; |
262 | spi-rx-bus-width = <4>; | |
263 | spi-max-frequency = <108000000>; | |
264 | #address-cells = <1>; | |
265 | #size-cells = <1>; | |
266 | }; | |
267 | ||
268 | flash1: mx66l51235l@1 { | |
04645a12 | 269 | compatible = "jedec,spi-nor"; |
84403005 LB |
270 | reg = <1>; |
271 | spi-rx-bus-width = <4>; | |
272 | spi-max-frequency = <108000000>; | |
273 | #address-cells = <1>; | |
274 | #size-cells = <1>; | |
275 | }; | |
276 | }; | |
277 | ||
7e29ed4a AD |
278 | &spi1 { |
279 | pinctrl-names = "default"; | |
280 | pinctrl-0 = <&spi1_pins_a>; | |
281 | status = "disabled"; | |
282 | }; | |
283 | ||
5c3d6781 | 284 | &timers2 { |
5ae71cea FG |
285 | /* spare dmas for other usage (un-delete to enable pwm capture) */ |
286 | /delete-property/dmas; | |
287 | /delete-property/dma-names; | |
5c3d6781 FG |
288 | status = "disabled"; |
289 | pwm { | |
290 | pinctrl-0 = <&pwm2_pins_a>; | |
291 | pinctrl-names = "default"; | |
292 | status = "okay"; | |
293 | }; | |
294 | timer@1 { | |
295 | status = "okay"; | |
296 | }; | |
297 | }; | |
298 | ||
299 | &timers8 { | |
5ae71cea FG |
300 | /delete-property/dmas; |
301 | /delete-property/dma-names; | |
5c3d6781 FG |
302 | status = "disabled"; |
303 | pwm { | |
304 | pinctrl-0 = <&pwm8_pins_a>; | |
305 | pinctrl-names = "default"; | |
306 | status = "okay"; | |
307 | }; | |
308 | timer@7 { | |
309 | status = "okay"; | |
310 | }; | |
311 | }; | |
312 | ||
313 | &timers12 { | |
5ae71cea FG |
314 | /delete-property/dmas; |
315 | /delete-property/dma-names; | |
5c3d6781 FG |
316 | status = "disabled"; |
317 | pwm { | |
318 | pinctrl-0 = <&pwm12_pins_a>; | |
319 | pinctrl-names = "default"; | |
320 | status = "okay"; | |
321 | }; | |
322 | timer@11 { | |
323 | status = "okay"; | |
324 | }; | |
325 | }; | |
9d26228d | 326 | |
359754ed AD |
327 | &usbh_ehci { |
328 | phys = <&usbphyc_port0>; | |
329 | phy-names = "usb"; | |
330 | status = "okay"; | |
331 | }; | |
332 | ||
0bfa7f78 AD |
333 | &usbotg_hs { |
334 | dr_mode = "peripheral"; | |
335 | phys = <&usbphyc_port1 0>; | |
336 | phy-names = "usb2-phy"; | |
337 | status = "okay"; | |
338 | }; | |
339 | ||
9d26228d AD |
340 | &usbphyc { |
341 | status = "okay"; | |
342 | }; |