xref: /optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts (revision 23df205f97535ab6845296d1ede453d35c616d82)
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		ipc_shmem: ipc-shmem@1004f000 {
58			compatible = "shared-dma-pool";
59			reg = <0x10048000 0x8000>;
60			no-map;
61		};
62
63		mcuram: mcuram@30000000 {
64			compatible = "shared-dma-pool";
65			reg = <0x30000000 0x40000>;
66			no-map;
67		};
68
69		retram: retram@38000000 {
70			compatible = "shared-dma-pool";
71			reg = <0x38000000 0x10000>;
72			no-map;
73		};
74
75		gpu_reserved: gpu@e8000000 {
76			reg = <0xe8000000 0x8000000>;
77			no-map;
78		};
79	};
80
81	aliases {
82		serial0 = &uart4;
83	};
84
85	sd_switch: regulator-sd_switch {
86		compatible = "regulator-gpio";
87		regulator-name = "sd_switch";
88		regulator-min-microvolt = <1800000>;
89		regulator-max-microvolt = <2900000>;
90		regulator-type = "voltage";
91		regulator-always-on;
92
93		gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
94		gpios-states = <0>;
95		states = <1800000 0x1>,
96			 <2900000 0x0>;
97	};
98
99	vin: vin {
100		compatible = "regulator-fixed";
101		regulator-name = "vin";
102		regulator-min-microvolt = <5000000>;
103		regulator-max-microvolt = <5000000>;
104		regulator-always-on;
105	};
106};
107
108&adc {
109	/* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
110	pinctrl-0 = <&adc1_in6_pins_a>;
111	pinctrl-names = "default";
112	vdd-supply = <&vdd>;
113	vdda-supply = <&vdda>;
114	vref-supply = <&vdda>;
115	status = "disabled";
116	adc1: adc@0 {
117		st,adc-channels = <0 1 6>;
118		/* 16.5 ck_cycles sampling time */
119		st,min-sample-time-nsecs = <400>;
120		status = "okay";
121	};
122};
123
124&bsec {
125	board_id: board_id@ec {
126		reg = <0xec 0x4>;
127		st,non-secure-otp;
128	};
129	huk_otp: huk-otp@f0 {
130		reg = <0xf0 0x10>;
131	};
132};
133
134&crc1 {
135	status = "disabled";
136};
137
138&dac {
139	pinctrl-names = "default";
140	pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
141	vref-supply = <&vdda>;
142	status = "disabled";
143	dac1: dac@1 {
144		status = "okay";
145	};
146	dac2: dac@2 {
147		status = "okay";
148	};
149};
150
151&dts {
152	status = "disabled";
153};
154
155&gpu {
156	contiguous-area = <&gpu_reserved>;
157};
158
159&hash1 {
160	status = "disabled";
161};
162
163&i2c4 {
164	compatible = "st,stm32mp15-i2c-non-secure";
165	pinctrl-names = "default", "sleep";
166	pinctrl-0 = <&i2c4_pins_a>;
167	pinctrl-1 = <&i2c4_sleep_pins_a>;
168	i2c-scl-rising-time-ns = <185>;
169	i2c-scl-falling-time-ns = <20>;
170	clock-frequency = <400000>;
171	status = "okay";
172	/* spare dmas for other usage */
173	/delete-property/dmas;
174	/delete-property/dma-names;
175
176	pmic: stpmic@33 {
177		compatible = "st,stpmic1";
178		reg = <0x33>;
179		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
180		interrupt-controller;
181		#interrupt-cells = <2>;
182		status = "okay";
183
184		regulators {
185			compatible = "st,stpmic1-regulators";
186			buck1-supply = <&vin>;
187			buck2-supply = <&vin>;
188			buck3-supply = <&vin>;
189			buck4-supply = <&vin>;
190			ldo1-supply = <&v3v3>;
191			ldo2-supply = <&v3v3>;
192			ldo3-supply = <&vdd_ddr>;
193			ldo4-supply = <&vin>;
194			ldo5-supply = <&v3v3>;
195			ldo6-supply = <&v3v3>;
196			vref_ddr-supply = <&vin>;
197			boost-supply = <&vin>;
198			pwr_sw1-supply = <&bst_out>;
199			pwr_sw2-supply = <&bst_out>;
200
201			vddcore: buck1 {
202				regulator-name = "vddcore";
203				regulator-min-microvolt = <1200000>;
204				regulator-max-microvolt = <1350000>;
205				regulator-always-on;
206				regulator-initial-mode = <0>;
207				regulator-over-current-protection;
208			};
209
210			vdd_ddr: buck2 {
211				regulator-name = "vdd_ddr";
212				regulator-min-microvolt = <1350000>;
213				regulator-max-microvolt = <1350000>;
214				regulator-always-on;
215				regulator-initial-mode = <0>;
216				regulator-over-current-protection;
217			};
218
219			vdd: buck3 {
220				regulator-name = "vdd";
221				regulator-min-microvolt = <3300000>;
222				regulator-max-microvolt = <3300000>;
223				regulator-always-on;
224				st,mask-reset;
225				regulator-initial-mode = <0>;
226				regulator-over-current-protection;
227			};
228
229			v3v3: buck4 {
230				regulator-name = "v3v3";
231				regulator-min-microvolt = <3300000>;
232				regulator-max-microvolt = <3300000>;
233				regulator-always-on;
234				regulator-over-current-protection;
235				regulator-initial-mode = <0>;
236			};
237
238			vdda: ldo1 {
239				regulator-name = "vdda";
240				regulator-min-microvolt = <2900000>;
241				regulator-max-microvolt = <2900000>;
242				interrupts = <IT_CURLIM_LDO1 0>;
243			};
244
245			v2v8: ldo2 {
246				regulator-name = "v2v8";
247				regulator-min-microvolt = <2800000>;
248				regulator-max-microvolt = <2800000>;
249				interrupts = <IT_CURLIM_LDO2 0>;
250			};
251
252			vtt_ddr: ldo3 {
253				regulator-name = "vtt_ddr";
254				regulator-min-microvolt = <500000>;
255				regulator-max-microvolt = <750000>;
256				regulator-always-on;
257				regulator-over-current-protection;
258			};
259
260			vdd_usb: ldo4 {
261				regulator-name = "vdd_usb";
262				interrupts = <IT_CURLIM_LDO4 0>;
263				regulator-always-on;
264			};
265
266			vdd_sd: ldo5 {
267				regulator-name = "vdd_sd";
268				regulator-min-microvolt = <2900000>;
269				regulator-max-microvolt = <2900000>;
270				interrupts = <IT_CURLIM_LDO5 0>;
271				regulator-boot-on;
272			};
273
274			v1v8: ldo6 {
275				regulator-name = "v1v8";
276				regulator-min-microvolt = <1800000>;
277				regulator-max-microvolt = <1800000>;
278				interrupts = <IT_CURLIM_LDO6 0>;
279			};
280
281			vref_ddr: vref_ddr {
282				regulator-name = "vref_ddr";
283				regulator-always-on;
284			};
285
286			bst_out: boost {
287				regulator-name = "bst_out";
288				interrupts = <IT_OCP_BOOST 0>;
289			};
290
291			vbus_otg: pwr_sw1 {
292				regulator-name = "vbus_otg";
293				interrupts = <IT_OCP_OTG 0>;
294			 };
295
296			 vbus_sw: pwr_sw2 {
297				regulator-name = "vbus_sw";
298				interrupts = <IT_OCP_SWOUT 0>;
299				regulator-active-discharge = <1>;
300			 };
301		};
302
303		onkey {
304			compatible = "st,stpmic1-onkey";
305			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
306			interrupt-names = "onkey-falling", "onkey-rising";
307			power-off-time-sec = <10>;
308			status = "disabled";
309		};
310
311		watchdog {
312			compatible = "st,stpmic1-wdt";
313			status = "disabled";
314		};
315	};
316};
317
318&ipcc {
319	status = "disabled";
320};
321
322&iwdg1 {
323	timeout-sec = <32>;
324	status = "okay";
325};
326
327&iwdg2 {
328	timeout-sec = <32>;
329	status = "disabled";
330};
331
332&m4_rproc {
333	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
334			<&vdev0vring1>, <&vdev0buffer>, <&ipc_shmem>;
335	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
336	mbox-names = "vq0", "vq1", "shutdown", "detach";
337	interrupt-parent = <&exti>;
338	interrupts = <68 1>;
339	status = "disabled";
340};
341
342&pwr_regulators {
343	vdd-supply = <&vdd>;
344	vdd_3v3_usbfs-supply = <&vdd_usb>;
345};
346
347&rcc {
348	compatible = "st,stm32mp1-rcc";
349	status = "okay";
350};
351
352&rng1 {
353	status = "okay";
354};
355
356&rtc {
357	status = "disabled";
358};
359
360&sdmmc1 {
361	pinctrl-names = "default", "opendrain", "sleep";
362	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
363	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
364	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
365	cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
366	disable-wp;
367	st,sig-dir;
368	st,neg-edge;
369	st,use-ckin;
370	bus-width = <4>;
371	vmmc-supply = <&vdd_sd>;
372	vqmmc-supply = <&sd_switch>;
373	sd-uhs-sdr12;
374	sd-uhs-sdr25;
375	sd-uhs-sdr50;
376	sd-uhs-ddr50;
377	status = "disabled";
378};
379
380&sdmmc2 {
381	pinctrl-names = "default", "opendrain", "sleep";
382	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
383	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
384	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
385	non-removable;
386	no-sd;
387	no-sdio;
388	st,neg-edge;
389	bus-width = <8>;
390	vmmc-supply = <&v3v3>;
391	vqmmc-supply = <&vdd>;
392	mmc-ddr-3_3v;
393	status = "disabled";
394};
395
396&timers6 {
397	status = "disabled";
398	/* spare dmas for other usage */
399	/delete-property/dmas;
400	/delete-property/dma-names;
401	timer@5 {
402		status = "okay";
403	};
404};
405
406&uart4 {
407	pinctrl-names = "default", "sleep", "idle";
408	pinctrl-0 = <&uart4_pins_a>;
409	pinctrl-1 = <&uart4_sleep_pins_a>;
410	pinctrl-2 = <&uart4_idle_pins_a>;
411	/delete-property/dmas;
412	/delete-property/dma-names;
413	status = "okay";
414};
415
416&usbotg_hs {
417	vbus-supply = <&vbus_otg>;
418};
419
420&usbphyc_port0 {
421	phy-supply = <&vdd_usb>;
422};
423
424&usbphyc_port1 {
425	phy-supply = <&vdd_usb>;
426};
427