xref: /optee_os/core/arch/arm/dts/stm32mp157c-ed1.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 "stm32mp157.dtsi"
9#include "stm32mp15xc.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
11#include "stm32mp15xxaa-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/mfd/st,stpmic1.h>
14
15/ {
16	model = "STMicroelectronics STM32MP157C eval daughter";
17	compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
18
19	chosen {
20		stdout-path = "serial0:115200n8";
21	};
22
23	memory@c0000000 {
24		device_type = "memory";
25		reg = <0xC0000000 0x40000000>;
26	};
27
28	reserved-memory {
29		#address-cells = <1>;
30		#size-cells = <1>;
31		ranges;
32
33		mcuram2: mcuram2@10000000 {
34			compatible = "shared-dma-pool";
35			reg = <0x10000000 0x40000>;
36			no-map;
37		};
38
39		vdev0vring0: vdev0vring0@10040000 {
40			compatible = "shared-dma-pool";
41			reg = <0x10040000 0x1000>;
42			no-map;
43		};
44
45		vdev0vring1: vdev0vring1@10041000 {
46			compatible = "shared-dma-pool";
47			reg = <0x10041000 0x1000>;
48			no-map;
49		};
50
51		vdev0buffer: vdev0buffer@10042000 {
52			compatible = "shared-dma-pool";
53			reg = <0x10042000 0x4000>;
54			no-map;
55		};
56
57		mcuram: mcuram@30000000 {
58			compatible = "shared-dma-pool";
59			reg = <0x30000000 0x40000>;
60			no-map;
61		};
62
63		retram: retram@38000000 {
64			compatible = "shared-dma-pool";
65			reg = <0x38000000 0x10000>;
66			no-map;
67		};
68
69		gpu_reserved: gpu@e8000000 {
70			reg = <0xe8000000 0x8000000>;
71			no-map;
72		};
73	};
74
75	aliases {
76		serial0 = &uart4;
77	};
78
79	sd_switch: regulator-sd_switch {
80		compatible = "regulator-gpio";
81		regulator-name = "sd_switch";
82		regulator-min-microvolt = <1800000>;
83		regulator-max-microvolt = <2900000>;
84		regulator-type = "voltage";
85		regulator-always-on;
86
87		gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
88		gpios-states = <0>;
89		states = <1800000 0x1>,
90			 <2900000 0x0>;
91	};
92};
93
94&adc {
95	/* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
96	pinctrl-0 = <&adc1_in6_pins_a>;
97	pinctrl-names = "default";
98	vdd-supply = <&vdd>;
99	vdda-supply = <&vdda>;
100	vref-supply = <&vdda>;
101	status = "disabled";
102	adc1: adc@0 {
103		st,adc-channels = <0 1 6>;
104		/* 16.5 ck_cycles sampling time */
105		st,min-sample-time-nsecs = <400>;
106		status = "okay";
107	};
108};
109
110&cryp1 {
111	status = "okay";
112};
113
114&dac {
115	pinctrl-names = "default";
116	pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
117	vref-supply = <&vdda>;
118	status = "disabled";
119	dac1: dac@1 {
120		status = "okay";
121	};
122	dac2: dac@2 {
123		status = "okay";
124	};
125};
126
127&dts {
128	status = "okay";
129};
130
131&gpu {
132	contiguous-area = <&gpu_reserved>;
133	status = "okay";
134};
135
136&i2c4 {
137	pinctrl-names = "default";
138	pinctrl-0 = <&i2c4_pins_a>;
139	i2c-scl-rising-time-ns = <185>;
140	i2c-scl-falling-time-ns = <20>;
141	status = "okay";
142	/* spare dmas for other usage */
143	/delete-property/dmas;
144	/delete-property/dma-names;
145
146	pmic: stpmic@33 {
147		compatible = "st,stpmic1";
148		reg = <0x33>;
149		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
150		interrupt-controller;
151		#interrupt-cells = <2>;
152		status = "okay";
153
154		regulators {
155			compatible = "st,stpmic1-regulators";
156			ldo1-supply = <&v3v3>;
157			ldo2-supply = <&v3v3>;
158			ldo3-supply = <&vdd_ddr>;
159			ldo5-supply = <&v3v3>;
160			ldo6-supply = <&v3v3>;
161			pwr_sw1-supply = <&bst_out>;
162			pwr_sw2-supply = <&bst_out>;
163
164			vddcore: buck1 {
165				regulator-name = "vddcore";
166				regulator-min-microvolt = <1200000>;
167				regulator-max-microvolt = <1350000>;
168				regulator-always-on;
169				regulator-initial-mode = <0>;
170				regulator-over-current-protection;
171			};
172
173			vdd_ddr: buck2 {
174				regulator-name = "vdd_ddr";
175				regulator-min-microvolt = <1350000>;
176				regulator-max-microvolt = <1350000>;
177				regulator-always-on;
178				regulator-initial-mode = <0>;
179				regulator-over-current-protection;
180			};
181
182			vdd: buck3 {
183				regulator-name = "vdd";
184				regulator-min-microvolt = <3300000>;
185				regulator-max-microvolt = <3300000>;
186				regulator-always-on;
187				st,mask-reset;
188				regulator-initial-mode = <0>;
189				regulator-over-current-protection;
190			};
191
192			v3v3: buck4 {
193				regulator-name = "v3v3";
194				regulator-min-microvolt = <3300000>;
195				regulator-max-microvolt = <3300000>;
196				regulator-always-on;
197				regulator-over-current-protection;
198				regulator-initial-mode = <0>;
199			};
200
201			vdda: ldo1 {
202				regulator-name = "vdda";
203				regulator-min-microvolt = <2900000>;
204				regulator-max-microvolt = <2900000>;
205				interrupts = <IT_CURLIM_LDO1 0>;
206			};
207
208			v2v8: ldo2 {
209				regulator-name = "v2v8";
210				regulator-min-microvolt = <2800000>;
211				regulator-max-microvolt = <2800000>;
212				interrupts = <IT_CURLIM_LDO2 0>;
213			};
214
215			vtt_ddr: ldo3 {
216				regulator-name = "vtt_ddr";
217				regulator-min-microvolt = <500000>;
218				regulator-max-microvolt = <750000>;
219				regulator-always-on;
220				regulator-over-current-protection;
221			};
222
223			vdd_usb: ldo4 {
224				regulator-name = "vdd_usb";
225				regulator-min-microvolt = <3300000>;
226				regulator-max-microvolt = <3300000>;
227				interrupts = <IT_CURLIM_LDO4 0>;
228			};
229
230			vdd_sd: ldo5 {
231				regulator-name = "vdd_sd";
232				regulator-min-microvolt = <2900000>;
233				regulator-max-microvolt = <2900000>;
234				interrupts = <IT_CURLIM_LDO5 0>;
235				regulator-boot-on;
236			};
237
238			v1v8: ldo6 {
239				regulator-name = "v1v8";
240				regulator-min-microvolt = <1800000>;
241				regulator-max-microvolt = <1800000>;
242				interrupts = <IT_CURLIM_LDO6 0>;
243			};
244
245			vref_ddr: vref_ddr {
246				regulator-name = "vref_ddr";
247				regulator-always-on;
248				regulator-over-current-protection;
249			};
250
251			bst_out: boost {
252				regulator-name = "bst_out";
253				interrupts = <IT_OCP_BOOST 0>;
254			};
255
256			vbus_otg: pwr_sw1 {
257				regulator-name = "vbus_otg";
258				interrupts = <IT_OCP_OTG 0>;
259			 };
260
261			 vbus_sw: pwr_sw2 {
262				regulator-name = "vbus_sw";
263				interrupts = <IT_OCP_SWOUT 0>;
264				regulator-active-discharge = <1>;
265			 };
266		};
267
268		onkey {
269			compatible = "st,stpmic1-onkey";
270			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
271			interrupt-names = "onkey-falling", "onkey-rising";
272			power-off-time-sec = <10>;
273			status = "okay";
274		};
275
276		watchdog {
277			compatible = "st,stpmic1-wdt";
278			status = "disabled";
279		};
280	};
281};
282
283&ipcc {
284	status = "okay";
285};
286
287&iwdg2 {
288	timeout-sec = <32>;
289	status = "okay";
290};
291
292&m4_rproc {
293	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
294			<&vdev0vring1>, <&vdev0buffer>;
295	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
296	mbox-names = "vq0", "vq1", "shutdown";
297	interrupt-parent = <&exti>;
298	interrupts = <68 1>;
299	status = "okay";
300};
301
302&pwr_regulators {
303	vdd-supply = <&vdd>;
304	vdd_3v3_usbfs-supply = <&vdd_usb>;
305};
306
307&rng1 {
308	status = "okay";
309};
310
311&rtc {
312	status = "okay";
313};
314
315&sdmmc1 {
316	pinctrl-names = "default", "opendrain", "sleep";
317	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
318	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
319	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
320	broken-cd;
321	st,sig-dir;
322	st,neg-edge;
323	st,use-ckin;
324	bus-width = <4>;
325	vmmc-supply = <&vdd_sd>;
326	vqmmc-supply = <&sd_switch>;
327	status = "okay";
328};
329
330&sdmmc2 {
331	pinctrl-names = "default", "opendrain", "sleep";
332	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
333	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
334	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
335	non-removable;
336	no-sd;
337	no-sdio;
338	st,neg-edge;
339	bus-width = <8>;
340	vmmc-supply = <&v3v3>;
341	vqmmc-supply = <&v3v3>;
342	mmc-ddr-3_3v;
343	status = "okay";
344};
345
346&timers6 {
347	status = "okay";
348	/* spare dmas for other usage */
349	/delete-property/dmas;
350	/delete-property/dma-names;
351	timer@5 {
352		status = "okay";
353	};
354};
355
356&uart4 {
357	pinctrl-names = "default";
358	pinctrl-0 = <&uart4_pins_a>;
359	status = "okay";
360};
361
362&usbphyc_port0 {
363	phy-supply = <&vdd_usb>;
364	vdda1v1-supply = <&reg11>;
365	vdda1v8-supply = <&reg18>;
366};
367
368&usbphyc_port1 {
369	phy-supply = <&vdd_usb>;
370	vdda1v1-supply = <&reg11>;
371	vdda1v8-supply = <&reg18>;
372};
373
374&rcc {
375	status = "okay";
376};
377
378&bsec {
379	board_id: board_id@ec {
380		reg = <0xec 0x4>;
381		st,non-secure-otp;
382	};
383};
384