Loading...
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 = ðernet0;
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 phy-dsi-supply = <®18>;
105 status = "okay";
106
107 ports {
108 #address-cells = <1>;
109 #size-cells = <0>;
110
111 port@0 {
112 reg = <0>;
113 dsi_in: endpoint {
114 remote-endpoint = <<dc_ep0_out>;
115 };
116 };
117
118 port@1 {
119 reg = <1>;
120 dsi_out: endpoint {
121 remote-endpoint = <&dsi_panel_in>;
122 };
123 };
124 };
125
126 panel-dsi@0 {
127 compatible = "raydium,rm68200";
128 reg = <0>;
129 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
130 backlight = <&panel_backlight>;
131 power-supply = <&v3v3>;
132 status = "okay";
133
134 port {
135 dsi_panel_in: endpoint {
136 remote-endpoint = <&dsi_out>;
137 };
138 };
139 };
140};
141
142ðernet0 {
143 status = "okay";
144 pinctrl-0 = <ðernet0_rgmii_pins_a>;
145 pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>;
146 pinctrl-names = "default", "sleep";
147 phy-mode = "rgmii-id";
148 max-speed = <1000>;
149 phy-handle = <&phy0>;
150
151 mdio0 {
152 #address-cells = <1>;
153 #size-cells = <0>;
154 compatible = "snps,dwmac-mdio";
155 phy0: ethernet-phy@0 {
156 reg = <0>;
157 };
158 };
159};
160
161&fmc {
162 pinctrl-names = "default", "sleep";
163 pinctrl-0 = <&fmc_pins_a>;
164 pinctrl-1 = <&fmc_sleep_pins_a>;
165 status = "okay";
166 #address-cells = <1>;
167 #size-cells = <0>;
168
169 nand@0 {
170 reg = <0>;
171 nand-on-flash-bbt;
172 #address-cells = <1>;
173 #size-cells = <1>;
174 };
175};
176
177&i2c2 {
178 pinctrl-names = "default";
179 pinctrl-0 = <&i2c2_pins_a>;
180 i2c-scl-rising-time-ns = <185>;
181 i2c-scl-falling-time-ns = <20>;
182 status = "okay";
183
184 ov5640: camera@3c {
185 compatible = "ovti,ov5640";
186 reg = <0x3c>;
187 clocks = <&clk_ext_camera>;
188 clock-names = "xclk";
189 DOVDD-supply = <&v2v8>;
190 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
191 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
192 rotation = <180>;
193 status = "okay";
194
195 port {
196 ov5640_0: endpoint {
197 remote-endpoint = <&dcmi_0>;
198 bus-width = <8>;
199 data-shift = <2>; /* lines 9:2 are used */
200 hsync-active = <0>;
201 vsync-active = <0>;
202 pclk-sample = <1>;
203 };
204 };
205 };
206
207 stmfx: stmfx@42 {
208 compatible = "st,stmfx-0300";
209 reg = <0x42>;
210 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
211 interrupt-parent = <&gpioi>;
212 vdd-supply = <&v3v3>;
213
214 stmfx_pinctrl: stmfx-pin-controller {
215 compatible = "st,stmfx-0300-pinctrl";
216 gpio-controller;
217 #gpio-cells = <2>;
218 interrupt-controller;
219 #interrupt-cells = <2>;
220 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
221
222 joystick_pins: joystick {
223 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
224 bias-pull-down;
225 };
226 };
227 };
228};
229
230&i2c5 {
231 pinctrl-names = "default";
232 pinctrl-0 = <&i2c5_pins_a>;
233 i2c-scl-rising-time-ns = <185>;
234 i2c-scl-falling-time-ns = <20>;
235 status = "okay";
236};
237
238<dc {
239 status = "okay";
240
241 port {
242 #address-cells = <1>;
243 #size-cells = <0>;
244
245 ltdc_ep0_out: endpoint@0 {
246 reg = <0>;
247 remote-endpoint = <&dsi_in>;
248 };
249 };
250};
251
252&m_can1 {
253 pinctrl-names = "default", "sleep";
254 pinctrl-0 = <&m_can1_pins_a>;
255 pinctrl-1 = <&m_can1_sleep_pins_a>;
256 status = "okay";
257};
258
259&qspi {
260 pinctrl-names = "default", "sleep";
261 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
262 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
263 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
264 #address-cells = <1>;
265 #size-cells = <0>;
266 status = "okay";
267
268 flash0: mx66l51235l@0 {
269 compatible = "jedec,spi-nor";
270 reg = <0>;
271 spi-rx-bus-width = <4>;
272 spi-max-frequency = <108000000>;
273 #address-cells = <1>;
274 #size-cells = <1>;
275 };
276
277 flash1: mx66l51235l@1 {
278 compatible = "jedec,spi-nor";
279 reg = <1>;
280 spi-rx-bus-width = <4>;
281 spi-max-frequency = <108000000>;
282 #address-cells = <1>;
283 #size-cells = <1>;
284 };
285};
286
287&spi1 {
288 pinctrl-names = "default";
289 pinctrl-0 = <&spi1_pins_a>;
290 status = "disabled";
291};
292
293&timers2 {
294 /* spare dmas for other usage (un-delete to enable pwm capture) */
295 /delete-property/dmas;
296 /delete-property/dma-names;
297 status = "disabled";
298 pwm {
299 pinctrl-0 = <&pwm2_pins_a>;
300 pinctrl-names = "default";
301 status = "okay";
302 };
303 timer@1 {
304 status = "okay";
305 };
306};
307
308&timers8 {
309 /delete-property/dmas;
310 /delete-property/dma-names;
311 status = "disabled";
312 pwm {
313 pinctrl-0 = <&pwm8_pins_a>;
314 pinctrl-names = "default";
315 status = "okay";
316 };
317 timer@7 {
318 status = "okay";
319 };
320};
321
322&timers12 {
323 /delete-property/dmas;
324 /delete-property/dma-names;
325 status = "disabled";
326 pwm {
327 pinctrl-0 = <&pwm12_pins_a>;
328 pinctrl-names = "default";
329 status = "okay";
330 };
331 timer@11 {
332 status = "okay";
333 };
334};
335
336&usbh_ehci {
337 phys = <&usbphyc_port0>;
338 phy-names = "usb";
339 status = "okay";
340};
341
342&usbotg_hs {
343 dr_mode = "peripheral";
344 phys = <&usbphyc_port1 0>;
345 phy-names = "usb2-phy";
346 status = "okay";
347};
348
349&usbphyc {
350 status = "okay";
351};
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 serial1 = &usart3;
23 ethernet0 = ðernet0;
24 };
25
26 clocks {
27 clk_ext_camera: clk-ext-camera {
28 #clock-cells = <0>;
29 compatible = "fixed-clock";
30 clock-frequency = <24000000>;
31 };
32 };
33
34 joystick {
35 compatible = "gpio-keys";
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 phy-dsi-supply = <®18>;
103 status = "okay";
104
105 ports {
106 port@0 {
107 reg = <0>;
108 dsi_in: endpoint {
109 remote-endpoint = <<dc_ep0_out>;
110 };
111 };
112
113 port@1 {
114 reg = <1>;
115 dsi_out: endpoint {
116 remote-endpoint = <&dsi_panel_in>;
117 };
118 };
119 };
120
121 panel-dsi@0 {
122 compatible = "raydium,rm68200";
123 reg = <0>;
124 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
125 backlight = <&panel_backlight>;
126 power-supply = <&v3v3>;
127 status = "okay";
128
129 port {
130 dsi_panel_in: endpoint {
131 remote-endpoint = <&dsi_out>;
132 };
133 };
134 };
135};
136
137ðernet0 {
138 status = "okay";
139 pinctrl-0 = <ðernet0_rgmii_pins_a>;
140 pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>;
141 pinctrl-names = "default", "sleep";
142 phy-mode = "rgmii-id";
143 max-speed = <1000>;
144 phy-handle = <&phy0>;
145
146 mdio0 {
147 #address-cells = <1>;
148 #size-cells = <0>;
149 compatible = "snps,dwmac-mdio";
150 phy0: ethernet-phy@0 {
151 reg = <0>;
152 };
153 };
154};
155
156&fmc {
157 pinctrl-names = "default", "sleep";
158 pinctrl-0 = <&fmc_pins_a>;
159 pinctrl-1 = <&fmc_sleep_pins_a>;
160 status = "okay";
161 #address-cells = <1>;
162 #size-cells = <0>;
163
164 nand@0 {
165 reg = <0>;
166 nand-on-flash-bbt;
167 #address-cells = <1>;
168 #size-cells = <1>;
169 };
170};
171
172&i2c2 {
173 pinctrl-names = "default", "sleep";
174 pinctrl-0 = <&i2c2_pins_a>;
175 pinctrl-1 = <&i2c2_sleep_pins_a>;
176 i2c-scl-rising-time-ns = <185>;
177 i2c-scl-falling-time-ns = <20>;
178 status = "okay";
179
180 ov5640: camera@3c {
181 compatible = "ovti,ov5640";
182 reg = <0x3c>;
183 clocks = <&clk_ext_camera>;
184 clock-names = "xclk";
185 DOVDD-supply = <&v2v8>;
186 powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
187 reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
188 rotation = <180>;
189 status = "okay";
190
191 port {
192 ov5640_0: endpoint {
193 remote-endpoint = <&dcmi_0>;
194 bus-width = <8>;
195 data-shift = <2>; /* lines 9:2 are used */
196 hsync-active = <0>;
197 vsync-active = <0>;
198 pclk-sample = <1>;
199 };
200 };
201 };
202
203 stmfx: stmfx@42 {
204 compatible = "st,stmfx-0300";
205 reg = <0x42>;
206 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
207 interrupt-parent = <&gpioi>;
208 vdd-supply = <&v3v3>;
209
210 stmfx_pinctrl: pinctrl {
211 compatible = "st,stmfx-0300-pinctrl";
212 gpio-controller;
213 #gpio-cells = <2>;
214 interrupt-controller;
215 #interrupt-cells = <2>;
216 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
217
218 joystick_pins: joystick-pins {
219 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
220 bias-pull-down;
221 };
222 };
223 };
224};
225
226&i2c5 {
227 pinctrl-names = "default", "sleep";
228 pinctrl-0 = <&i2c5_pins_a>;
229 pinctrl-1 = <&i2c5_sleep_pins_a>;
230 i2c-scl-rising-time-ns = <185>;
231 i2c-scl-falling-time-ns = <20>;
232 status = "okay";
233};
234
235<dc {
236 status = "okay";
237
238 port {
239 ltdc_ep0_out: endpoint@0 {
240 reg = <0>;
241 remote-endpoint = <&dsi_in>;
242 };
243 };
244};
245
246&m_can1 {
247 pinctrl-names = "default", "sleep";
248 pinctrl-0 = <&m_can1_pins_a>;
249 pinctrl-1 = <&m_can1_sleep_pins_a>;
250 status = "okay";
251};
252
253&qspi {
254 pinctrl-names = "default", "sleep";
255 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
256 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
257 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
258 #address-cells = <1>;
259 #size-cells = <0>;
260 status = "okay";
261
262 flash0: mx66l51235l@0 {
263 compatible = "jedec,spi-nor";
264 reg = <0>;
265 spi-rx-bus-width = <4>;
266 spi-max-frequency = <108000000>;
267 #address-cells = <1>;
268 #size-cells = <1>;
269 };
270
271 flash1: mx66l51235l@1 {
272 compatible = "jedec,spi-nor";
273 reg = <1>;
274 spi-rx-bus-width = <4>;
275 spi-max-frequency = <108000000>;
276 #address-cells = <1>;
277 #size-cells = <1>;
278 };
279};
280
281&sdmmc3 {
282 pinctrl-names = "default", "opendrain", "sleep";
283 pinctrl-0 = <&sdmmc3_b4_pins_a>;
284 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
285 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
286 broken-cd;
287 st,neg-edge;
288 bus-width = <4>;
289 vmmc-supply = <&v3v3>;
290 status = "disabled";
291};
292
293&spi1 {
294 pinctrl-names = "default";
295 pinctrl-0 = <&spi1_pins_a>;
296 status = "disabled";
297};
298
299&timers2 {
300 /* spare dmas for other usage (un-delete to enable pwm capture) */
301 /delete-property/dmas;
302 /delete-property/dma-names;
303 status = "disabled";
304 pwm {
305 pinctrl-0 = <&pwm2_pins_a>;
306 pinctrl-1 = <&pwm2_sleep_pins_a>;
307 pinctrl-names = "default", "sleep";
308 status = "okay";
309 };
310 timer@1 {
311 status = "okay";
312 };
313};
314
315&timers8 {
316 /delete-property/dmas;
317 /delete-property/dma-names;
318 status = "disabled";
319 pwm {
320 pinctrl-0 = <&pwm8_pins_a>;
321 pinctrl-1 = <&pwm8_sleep_pins_a>;
322 pinctrl-names = "default", "sleep";
323 status = "okay";
324 };
325 timer@7 {
326 status = "okay";
327 };
328};
329
330&timers12 {
331 /delete-property/dmas;
332 /delete-property/dma-names;
333 status = "disabled";
334 pwm {
335 pinctrl-0 = <&pwm12_pins_a>;
336 pinctrl-1 = <&pwm12_sleep_pins_a>;
337 pinctrl-names = "default", "sleep";
338 status = "okay";
339 };
340 timer@11 {
341 status = "okay";
342 };
343};
344
345&usart3 {
346 pinctrl-names = "default", "sleep", "idle";
347 pinctrl-0 = <&usart3_pins_b>;
348 pinctrl-1 = <&usart3_sleep_pins_b>;
349 pinctrl-2 = <&usart3_idle_pins_b>;
350 /*
351 * HW flow control USART3_RTS is optional, and isn't default wired to
352 * the connector. SB23 needs to be soldered in order to use it, and R77
353 * (ETH_CLK) should be removed.
354 */
355 uart-has-rtscts;
356 status = "disabled";
357};
358
359&usbh_ehci {
360 phys = <&usbphyc_port0>;
361 status = "okay";
362};
363
364&usbotg_hs {
365 pinctrl-0 = <&usbotg_hs_pins_a>;
366 pinctrl-names = "default";
367 phys = <&usbphyc_port1 0>;
368 phy-names = "usb2-phy";
369 status = "okay";
370};
371
372&usbphyc {
373 status = "okay";
374};