xref: /optee_os/core/arch/arm/dts/stm32mp157c-ev1.dts (revision 279bfce83bac403aa516516574af9ca403d31290)
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> Remove due to BSD license issue */
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>; BSD license issue */
40			interrupt-parent = <&stmfx_pinctrl>;
41			interrupts = <0 IRQ_TYPE_EDGE_RISING>;
42		};
43		button-1 {
44			label = "JoyDown";
45			/* linux,code = <KEY_DOWN>; BSD license issue */
46			interrupt-parent = <&stmfx_pinctrl>;
47			interrupts = <1 IRQ_TYPE_EDGE_RISING>;
48		};
49		button-2 {
50			label = "JoyLeft";
51			/* linux,code = <KEY_LEFT>; BSD license issue */
52			interrupt-parent = <&stmfx_pinctrl>;
53			interrupts = <2 IRQ_TYPE_EDGE_RISING>;
54		};
55		button-3 {
56			label = "JoyRight";
57			/* linux,code = <KEY_RIGHT>; BSD license issue */
58			interrupt-parent = <&stmfx_pinctrl>;
59			interrupts = <3 IRQ_TYPE_EDGE_RISING>;
60		};
61		button-4 {
62			label = "JoyUp";
63			/* linux,code = <KEY_UP>; BSD license issue */
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&cryp1 {
84	status = "okay";
85};
86
87&dcmi {
88	status = "okay";
89	pinctrl-names = "default", "sleep";
90	pinctrl-0 = <&dcmi_pins_a>;
91	pinctrl-1 = <&dcmi_sleep_pins_a>;
92
93	port {
94		dcmi_0: endpoint {
95			remote-endpoint = <&ov5640_0>;
96			bus-width = <8>;
97			hsync-active = <0>;
98			vsync-active = <0>;
99			pclk-sample = <1>;
100		};
101	};
102};
103
104&dsi {
105	#address-cells = <1>;
106	#size-cells = <0>;
107	phy-dsi-supply = <&reg18>;
108	status = "okay";
109
110	ports {
111		#address-cells = <1>;
112		#size-cells = <0>;
113
114		port@0 {
115			reg = <0>;
116			dsi_in: endpoint {
117				remote-endpoint = <&ltdc_ep0_out>;
118			};
119		};
120
121		port@1 {
122			reg = <1>;
123			dsi_out: endpoint {
124				remote-endpoint = <&dsi_panel_in>;
125			};
126		};
127	};
128
129	panel-dsi@0 {
130		compatible = "raydium,rm68200";
131		reg = <0>;
132		reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
133		backlight = <&panel_backlight>;
134		power-supply = <&v3v3>;
135		status = "okay";
136
137		port {
138			dsi_panel_in: endpoint {
139				remote-endpoint = <&dsi_out>;
140			};
141		};
142	};
143};
144
145&ethernet0 {
146	status = "okay";
147	pinctrl-0 = <&ethernet0_rgmii_pins_a>;
148	pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
149	pinctrl-names = "default", "sleep";
150	phy-mode = "rgmii-id";
151	max-speed = <1000>;
152	phy-handle = <&phy0>;
153
154	mdio0 {
155		#address-cells = <1>;
156		#size-cells = <0>;
157		compatible = "snps,dwmac-mdio";
158		phy0: ethernet-phy@0 {
159			reg = <0>;
160		};
161	};
162};
163
164&fmc {
165	pinctrl-names = "default", "sleep";
166	pinctrl-0 = <&fmc_pins_a>;
167	pinctrl-1 = <&fmc_sleep_pins_a>;
168	status = "okay";
169	#address-cells = <1>;
170	#size-cells = <0>;
171
172	nand@0 {
173		reg = <0>;
174		nand-on-flash-bbt;
175		#address-cells = <1>;
176		#size-cells = <1>;
177	};
178};
179
180&i2c2 {
181	pinctrl-names = "default";
182	pinctrl-0 = <&i2c2_pins_a>;
183	i2c-scl-rising-time-ns = <185>;
184	i2c-scl-falling-time-ns = <20>;
185	status = "okay";
186
187	ov5640: camera@3c {
188		compatible = "ovti,ov5640";
189		reg = <0x3c>;
190		clocks = <&clk_ext_camera>;
191		clock-names = "xclk";
192		DOVDD-supply = <&v2v8>;
193		powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>;
194		reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
195		rotation = <180>;
196		status = "okay";
197
198		port {
199			ov5640_0: endpoint {
200				remote-endpoint = <&dcmi_0>;
201				bus-width = <8>;
202				data-shift = <2>; /* lines 9:2 are used */
203				hsync-active = <0>;
204				vsync-active = <0>;
205				pclk-sample = <1>;
206			};
207		};
208	};
209
210	stmfx: stmfx@42 {
211		compatible = "st,stmfx-0300";
212		reg = <0x42>;
213		interrupts = <8 IRQ_TYPE_EDGE_RISING>;
214		interrupt-parent = <&gpioi>;
215		vdd-supply = <&v3v3>;
216
217		stmfx_pinctrl: stmfx-pin-controller {
218			compatible = "st,stmfx-0300-pinctrl";
219			gpio-controller;
220			#gpio-cells = <2>;
221			interrupt-controller;
222			#interrupt-cells = <2>;
223			gpio-ranges = <&stmfx_pinctrl 0 0 24>;
224
225			joystick_pins: joystick {
226				pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
227				bias-pull-down;
228			};
229		};
230	};
231};
232
233&i2c5 {
234	pinctrl-names = "default";
235	pinctrl-0 = <&i2c5_pins_a>;
236	i2c-scl-rising-time-ns = <185>;
237	i2c-scl-falling-time-ns = <20>;
238	status = "okay";
239};
240
241&ltdc {
242	status = "okay";
243
244	port {
245		#address-cells = <1>;
246		#size-cells = <0>;
247
248		ltdc_ep0_out: endpoint@0 {
249			reg = <0>;
250			remote-endpoint = <&dsi_in>;
251		};
252	};
253};
254
255&m_can1 {
256	pinctrl-names = "default", "sleep";
257	pinctrl-0 = <&m_can1_pins_a>;
258	pinctrl-1 = <&m_can1_sleep_pins_a>;
259	status = "okay";
260};
261
262&qspi {
263	pinctrl-names = "default", "sleep";
264	pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
265	pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
266	reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
267	#address-cells = <1>;
268	#size-cells = <0>;
269	status = "okay";
270
271	flash0: mx66l51235l@0 {
272		compatible = "jedec,spi-nor";
273		reg = <0>;
274		spi-rx-bus-width = <4>;
275		spi-max-frequency = <108000000>;
276		#address-cells = <1>;
277		#size-cells = <1>;
278	};
279
280	flash1: mx66l51235l@1 {
281		compatible = "jedec,spi-nor";
282		reg = <1>;
283		spi-rx-bus-width = <4>;
284		spi-max-frequency = <108000000>;
285		#address-cells = <1>;
286		#size-cells = <1>;
287	};
288};
289
290&sdmmc3 {
291	pinctrl-names = "default", "opendrain", "sleep";
292	pinctrl-0 = <&sdmmc3_b4_pins_a>;
293	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
294	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
295	broken-cd;
296	st,neg-edge;
297	bus-width = <4>;
298	vmmc-supply = <&v3v3>;
299	status = "disabled";
300};
301
302&spi1 {
303	pinctrl-names = "default";
304	pinctrl-0 = <&spi1_pins_a>;
305	status = "disabled";
306};
307
308&timers2 {
309	/* spare dmas for other usage (un-delete to enable pwm capture) */
310	/delete-property/dmas;
311	/delete-property/dma-names;
312	status = "disabled";
313	pwm {
314		pinctrl-0 = <&pwm2_pins_a>;
315		pinctrl-1 = <&pwm2_sleep_pins_a>;
316		pinctrl-names = "default", "sleep";
317		status = "okay";
318	};
319	timer@1 {
320		status = "okay";
321	};
322};
323
324&timers8 {
325	/delete-property/dmas;
326	/delete-property/dma-names;
327	status = "disabled";
328	pwm {
329		pinctrl-0 = <&pwm8_pins_a>;
330		pinctrl-1 = <&pwm8_sleep_pins_a>;
331		pinctrl-names = "default", "sleep";
332		status = "okay";
333	};
334	timer@7 {
335		status = "okay";
336	};
337};
338
339&timers12 {
340	/delete-property/dmas;
341	/delete-property/dma-names;
342	status = "disabled";
343	pwm {
344		pinctrl-0 = <&pwm12_pins_a>;
345		pinctrl-1 = <&pwm12_sleep_pins_a>;
346		pinctrl-names = "default", "sleep";
347		status = "okay";
348	};
349	timer@11 {
350		status = "okay";
351	};
352};
353
354&usbh_ehci {
355	phys = <&usbphyc_port0>;
356	status = "okay";
357};
358
359&usbotg_hs {
360	dr_mode = "peripheral";
361	phys = <&usbphyc_port1 0>;
362	phy-names = "usb2-phy";
363	status = "okay";
364};
365
366&usbphyc {
367	status = "okay";
368};
369