xref: /optee_os/core/arch/arm/dts/stm32mp157c-ed1.dts (revision 9f34db38245c9b3a4e6e7e63eb78a75e23ab2da3)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) STMicroelectronics 2017-2024 - 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&etzpc {
156	st,decprot =
157		<DECPROT(STM32MP1_ETZPC_USART1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
158		<DECPROT(STM32MP1_ETZPC_SPI6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
159		<DECPROT(STM32MP1_ETZPC_I2C4_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
160		<DECPROT(STM32MP1_ETZPC_I2C6_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
161		<DECPROT(STM32MP1_ETZPC_RNG1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
162		<DECPROT(STM32MP1_ETZPC_HASH1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
163		<DECPROT(STM32MP1_ETZPC_CRYP1_ID, DECPROT_NS_RW, DECPROT_UNLOCK)>,
164		<DECPROT(STM32MP1_ETZPC_DDRCTRL_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)>,
165		<DECPROT(STM32MP1_ETZPC_DDRPHYC_ID, DECPROT_NS_R_S_W, DECPROT_LOCK)>,
166		<DECPROT(STM32MP1_ETZPC_STGENC_ID, DECPROT_S_RW, DECPROT_LOCK)>,
167		<DECPROT(STM32MP1_ETZPC_BKPSRAM_ID, DECPROT_S_RW, DECPROT_LOCK)>,
168		<DECPROT(STM32MP1_ETZPC_IWDG1_ID, DECPROT_S_RW, DECPROT_LOCK)>;
169};
170
171&gpu {
172	contiguous-area = <&gpu_reserved>;
173};
174
175&hash1 {
176	status = "disabled";
177};
178
179&i2c4 {
180	compatible = "st,stm32mp15-i2c-non-secure";
181	pinctrl-names = "default", "sleep";
182	pinctrl-0 = <&i2c4_pins_a>;
183	pinctrl-1 = <&i2c4_sleep_pins_a>;
184	i2c-scl-rising-time-ns = <185>;
185	i2c-scl-falling-time-ns = <20>;
186	clock-frequency = <400000>;
187	status = "okay";
188	/* spare dmas for other usage */
189	/delete-property/dmas;
190	/delete-property/dma-names;
191
192	pmic: stpmic@33 {
193		compatible = "st,stpmic1";
194		reg = <0x33>;
195		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
196		interrupt-controller;
197		#interrupt-cells = <2>;
198		status = "okay";
199
200		regulators {
201			compatible = "st,stpmic1-regulators";
202			buck1-supply = <&vin>;
203			buck2-supply = <&vin>;
204			buck3-supply = <&vin>;
205			buck4-supply = <&vin>;
206			ldo1-supply = <&v3v3>;
207			ldo2-supply = <&v3v3>;
208			ldo3-supply = <&vdd_ddr>;
209			ldo4-supply = <&vin>;
210			ldo5-supply = <&v3v3>;
211			ldo6-supply = <&v3v3>;
212			vref_ddr-supply = <&vin>;
213			boost-supply = <&vin>;
214			pwr_sw1-supply = <&bst_out>;
215			pwr_sw2-supply = <&bst_out>;
216
217			vddcore: buck1 {
218				regulator-name = "vddcore";
219				regulator-min-microvolt = <1200000>;
220				regulator-max-microvolt = <1350000>;
221				regulator-always-on;
222				regulator-initial-mode = <0>;
223				regulator-over-current-protection;
224			};
225
226			vdd_ddr: buck2 {
227				regulator-name = "vdd_ddr";
228				regulator-min-microvolt = <1350000>;
229				regulator-max-microvolt = <1350000>;
230				regulator-always-on;
231				regulator-initial-mode = <0>;
232				regulator-over-current-protection;
233			};
234
235			vdd: buck3 {
236				regulator-name = "vdd";
237				regulator-min-microvolt = <3300000>;
238				regulator-max-microvolt = <3300000>;
239				regulator-always-on;
240				st,mask-reset;
241				regulator-initial-mode = <0>;
242				regulator-over-current-protection;
243			};
244
245			v3v3: buck4 {
246				regulator-name = "v3v3";
247				regulator-min-microvolt = <3300000>;
248				regulator-max-microvolt = <3300000>;
249				regulator-always-on;
250				regulator-over-current-protection;
251				regulator-initial-mode = <0>;
252			};
253
254			vdda: ldo1 {
255				regulator-name = "vdda";
256				regulator-min-microvolt = <2900000>;
257				regulator-max-microvolt = <2900000>;
258				interrupts = <IT_CURLIM_LDO1 0>;
259			};
260
261			v2v8: ldo2 {
262				regulator-name = "v2v8";
263				regulator-min-microvolt = <2800000>;
264				regulator-max-microvolt = <2800000>;
265				interrupts = <IT_CURLIM_LDO2 0>;
266			};
267
268			vtt_ddr: ldo3 {
269				regulator-name = "vtt_ddr";
270				regulator-min-microvolt = <500000>;
271				regulator-max-microvolt = <750000>;
272				regulator-always-on;
273				regulator-over-current-protection;
274			};
275
276			vdd_usb: ldo4 {
277				regulator-name = "vdd_usb";
278				interrupts = <IT_CURLIM_LDO4 0>;
279				regulator-always-on;
280			};
281
282			vdd_sd: ldo5 {
283				regulator-name = "vdd_sd";
284				regulator-min-microvolt = <2900000>;
285				regulator-max-microvolt = <2900000>;
286				interrupts = <IT_CURLIM_LDO5 0>;
287				regulator-boot-on;
288			};
289
290			v1v8: ldo6 {
291				regulator-name = "v1v8";
292				regulator-min-microvolt = <1800000>;
293				regulator-max-microvolt = <1800000>;
294				interrupts = <IT_CURLIM_LDO6 0>;
295			};
296
297			vref_ddr: vref_ddr {
298				regulator-name = "vref_ddr";
299				regulator-always-on;
300			};
301
302			bst_out: boost {
303				regulator-name = "bst_out";
304				interrupts = <IT_OCP_BOOST 0>;
305			};
306
307			vbus_otg: pwr_sw1 {
308				regulator-name = "vbus_otg";
309				interrupts = <IT_OCP_OTG 0>;
310			 };
311
312			 vbus_sw: pwr_sw2 {
313				regulator-name = "vbus_sw";
314				interrupts = <IT_OCP_SWOUT 0>;
315				regulator-active-discharge = <1>;
316			 };
317		};
318
319		onkey {
320			compatible = "st,stpmic1-onkey";
321			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
322			interrupt-names = "onkey-falling", "onkey-rising";
323			power-off-time-sec = <10>;
324			status = "disabled";
325		};
326
327		watchdog {
328			compatible = "st,stpmic1-wdt";
329			status = "disabled";
330		};
331	};
332};
333
334&ipcc {
335	status = "disabled";
336};
337
338&iwdg1 {
339	timeout-sec = <32>;
340	status = "okay";
341};
342
343&iwdg2 {
344	timeout-sec = <32>;
345	status = "disabled";
346};
347
348&m4_rproc {
349	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
350			<&vdev0vring1>, <&vdev0buffer>, <&ipc_shmem>;
351	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
352	mbox-names = "vq0", "vq1", "shutdown", "detach";
353	interrupt-parent = <&exti>;
354	interrupts = <68 1>;
355	status = "disabled";
356};
357
358&pwr_regulators {
359	vdd-supply = <&vdd>;
360	vdd_3v3_usbfs-supply = <&vdd_usb>;
361};
362
363&rcc {
364	compatible = "st,stm32mp1-rcc";
365	status = "okay";
366};
367
368&rng1 {
369	status = "okay";
370};
371
372&rtc {
373	status = "disabled";
374};
375
376&sdmmc1 {
377	pinctrl-names = "default", "opendrain", "sleep";
378	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
379	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
380	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
381	cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
382	disable-wp;
383	st,sig-dir;
384	st,neg-edge;
385	st,use-ckin;
386	bus-width = <4>;
387	vmmc-supply = <&vdd_sd>;
388	vqmmc-supply = <&sd_switch>;
389	sd-uhs-sdr12;
390	sd-uhs-sdr25;
391	sd-uhs-sdr50;
392	sd-uhs-ddr50;
393	status = "disabled";
394};
395
396&sdmmc2 {
397	pinctrl-names = "default", "opendrain", "sleep";
398	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
399	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
400	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
401	non-removable;
402	no-sd;
403	no-sdio;
404	st,neg-edge;
405	bus-width = <8>;
406	vmmc-supply = <&v3v3>;
407	vqmmc-supply = <&vdd>;
408	mmc-ddr-3_3v;
409	status = "disabled";
410};
411
412&timers6 {
413	status = "disabled";
414	/* spare dmas for other usage */
415	/delete-property/dmas;
416	/delete-property/dma-names;
417	timer@5 {
418		status = "okay";
419	};
420};
421
422&uart4 {
423	pinctrl-names = "default", "sleep", "idle";
424	pinctrl-0 = <&uart4_pins_a>;
425	pinctrl-1 = <&uart4_sleep_pins_a>;
426	pinctrl-2 = <&uart4_idle_pins_a>;
427	/delete-property/dmas;
428	/delete-property/dma-names;
429	status = "okay";
430};
431
432&usbotg_hs {
433	vbus-supply = <&vbus_otg>;
434};
435
436&usbphyc_port0 {
437	phy-supply = <&vdd_usb>;
438};
439
440&usbphyc_port1 {
441	phy-supply = <&vdd_usb>;
442};
443