xref: /optee_os/core/arch/arm/dts/stm32mp15xx-dkx.dtsi (revision 0960b6765c51598643bdb226a3bfaeab1b0e608f)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
4 * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
5 */
6
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/mfd/st,stpmic1.h>
9
10/ {
11	memory@c0000000 {
12		device_type = "memory";
13		reg = <0xc0000000 0x20000000>;
14	};
15
16	reserved-memory {
17		#address-cells = <1>;
18		#size-cells = <1>;
19		ranges;
20
21		mcuram2: mcuram2@10000000 {
22			compatible = "shared-dma-pool";
23			reg = <0x10000000 0x40000>;
24			no-map;
25		};
26
27		vdev0vring0: vdev0vring0@10040000 {
28			compatible = "shared-dma-pool";
29			reg = <0x10040000 0x1000>;
30			no-map;
31		};
32
33		vdev0vring1: vdev0vring1@10041000 {
34			compatible = "shared-dma-pool";
35			reg = <0x10041000 0x1000>;
36			no-map;
37		};
38
39		vdev0buffer: vdev0buffer@10042000 {
40			compatible = "shared-dma-pool";
41			reg = <0x10042000 0x4000>;
42			no-map;
43		};
44
45		ipc_shmem: ipc-shmem@1004f000 {
46			compatible = "shared-dma-pool";
47			reg = <0x10048000 0x8000>;
48			no-map;
49		};
50
51		mcuram: mcuram@30000000 {
52			compatible = "shared-dma-pool";
53			reg = <0x30000000 0x40000>;
54			no-map;
55		};
56
57		retram: retram@38000000 {
58			compatible = "shared-dma-pool";
59			reg = <0x38000000 0x10000>;
60			no-map;
61		};
62
63		gpu_reserved: gpu@d4000000 {
64			reg = <0xd4000000 0x4000000>;
65			no-map;
66		};
67	};
68
69	led {
70		compatible = "gpio-leds";
71		led-blue {
72			label = "heartbeat";
73			gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
74			linux,default-trigger = "heartbeat";
75			default-state = "off";
76			status = "disabled";
77		};
78	};
79
80	sound {
81		compatible = "audio-graph-card";
82		label = "STM32MP1-DK";
83		routing =
84			"Playback" , "MCLK",
85			"Capture" , "MCLK",
86			"MICL" , "Mic Bias";
87		dais = <&sai2a_port &sai2b_port &i2s2_port>;
88		status = "disabled";
89	};
90
91	vin: vin {
92		compatible = "regulator-fixed";
93		regulator-name = "vin";
94		regulator-min-microvolt = <5000000>;
95		regulator-max-microvolt = <5000000>;
96		regulator-always-on;
97	};
98};
99
100&adc {
101	pinctrl-names = "default";
102	pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>;
103	vdd-supply = <&vdd>;
104	vdda-supply = <&vdd>;
105	vref-supply = <&vrefbuf>;
106	status = "disabled";
107	adc1: adc@0 {
108		/*
109		 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
110		 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
111		 * 5 * (56 + 47kOhms) * 5pF => 2.5us.
112		 * Use arbitrary margin here (e.g. 5us).
113		 */
114		st,min-sample-time-nsecs = <5000>;
115		/* AIN connector, USB Type-C CC1 & CC2 */
116		st,adc-channels = <0 1 6 13 18 19>;
117		status = "okay";
118	};
119	adc2: adc@100 {
120		/* AIN connector, USB Type-C CC1 & CC2 */
121		st,adc-channels = <0 1 2 6 18 19>;
122		st,min-sample-time-nsecs = <5000>;
123		status = "okay";
124	};
125};
126
127&cec {
128	pinctrl-names = "default", "sleep";
129	pinctrl-0 = <&cec_pins_b>;
130	pinctrl-1 = <&cec_sleep_pins_b>;
131	status = "disabled";
132};
133
134&crc1 {
135	status = "disabled";
136};
137
138&dts {
139	status = "disabled";
140};
141
142&ethernet0 {
143	status = "disabled";
144	pinctrl-0 = <&ethernet0_rgmii_pins_a>;
145	pinctrl-1 = <&ethernet0_rgmii_sleep_pins_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&gpu {
162	contiguous-area = <&gpu_reserved>;
163};
164
165&hash1 {
166	status = "disabled";
167};
168
169&i2c1 {
170	pinctrl-names = "default", "sleep";
171	pinctrl-0 = <&i2c1_pins_a>;
172	pinctrl-1 = <&i2c1_sleep_pins_a>;
173	i2c-scl-rising-time-ns = <100>;
174	i2c-scl-falling-time-ns = <7>;
175	status = "disabled";
176	/delete-property/dmas;
177	/delete-property/dma-names;
178
179	hdmi-transmitter@39 {
180		compatible = "sil,sii9022";
181		reg = <0x39>;
182		iovcc-supply = <&v3v3_hdmi>;
183		cvcc12-supply = <&v1v2_hdmi>;
184		reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
185		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
186		interrupt-parent = <&gpiog>;
187		#sound-dai-cells = <0>;
188		status = "okay";
189
190		ports {
191			#address-cells = <1>;
192			#size-cells = <0>;
193
194			port@0 {
195				reg = <0>;
196				sii9022_in: endpoint {
197					remote-endpoint = <&ltdc_ep0_out>;
198				};
199			};
200
201			port@3 {
202				reg = <3>;
203				sii9022_tx_endpoint: endpoint {
204					remote-endpoint = <&i2s2_endpoint>;
205				};
206			};
207		};
208	};
209
210	cs42l51: cs42l51@4a {
211		compatible = "cirrus,cs42l51";
212		reg = <0x4a>;
213		#sound-dai-cells = <0>;
214		VL-supply = <&v3v3>;
215		VD-supply = <&v1v8_audio>;
216		VA-supply = <&v1v8_audio>;
217		VAHP-supply = <&v1v8_audio>;
218		reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
219		clocks = <&sai2a>;
220		clock-names = "MCLK";
221		status = "okay";
222
223		cs42l51_port: port {
224			#address-cells = <1>;
225			#size-cells = <0>;
226
227			cs42l51_tx_endpoint: endpoint@0 {
228				reg = <0>;
229				remote-endpoint = <&sai2a_endpoint>;
230				frame-master = <&cs42l51_tx_endpoint>;
231				bitclock-master = <&cs42l51_tx_endpoint>;
232			};
233
234			cs42l51_rx_endpoint: endpoint@1 {
235				reg = <1>;
236				remote-endpoint = <&sai2b_endpoint>;
237				frame-master = <&cs42l51_rx_endpoint>;
238				bitclock-master = <&cs42l51_rx_endpoint>;
239			};
240		};
241	};
242};
243
244&i2c4 {
245	compatible = "st,stm32mp15-i2c-non-secure";
246	pinctrl-names = "default", "sleep";
247	pinctrl-0 = <&i2c4_pins_a>;
248	pinctrl-1 = <&i2c4_sleep_pins_a>;
249	i2c-scl-rising-time-ns = <185>;
250	i2c-scl-falling-time-ns = <20>;
251	clock-frequency = <400000>;
252	status = "okay";
253	/* spare dmas for other usage */
254	/delete-property/dmas;
255	/delete-property/dma-names;
256
257	stusb1600@28 {
258		compatible = "st,stusb1600";
259		reg = <0x28>;
260		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
261		interrupt-parent = <&gpioi>;
262		pinctrl-names = "default";
263		pinctrl-0 = <&stusb1600_pins_a>;
264		status = "okay";
265		vdd-supply = <&vin>;
266
267		connector {
268			compatible = "usb-c-connector";
269			label = "USB-C";
270			power-role = "dual";
271			typec-power-opmode = "default";
272
273			port {
274				con_usbotg_hs_ep: endpoint {
275					remote-endpoint = <&usbotg_hs_ep>;
276				};
277			};
278		};
279	};
280
281	pmic: stpmic@33 {
282		compatible = "st,stpmic1";
283		reg = <0x33>;
284		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
285		interrupt-controller;
286		#interrupt-cells = <2>;
287		status = "okay";
288
289		regulators {
290			compatible = "st,stpmic1-regulators";
291			buck1-supply = <&vin>;
292			buck2-supply = <&vin>;
293			buck3-supply = <&vin>;
294			buck4-supply = <&vin>;
295			ldo1-supply = <&v3v3>;
296			ldo2-supply = <&vin>;
297			ldo3-supply = <&vdd_ddr>;
298			ldo4-supply = <&vin>;
299			ldo5-supply = <&vin>;
300			ldo6-supply = <&v3v3>;
301			vref_ddr-supply = <&vin>;
302			boost-supply = <&vin>;
303			pwr_sw1-supply = <&bst_out>;
304			pwr_sw2-supply = <&bst_out>;
305
306			vddcore: buck1 {
307				regulator-name = "vddcore";
308				regulator-min-microvolt = <1200000>;
309				regulator-max-microvolt = <1350000>;
310				regulator-always-on;
311				regulator-initial-mode = <0>;
312				regulator-over-current-protection;
313			};
314
315			vdd_ddr: buck2 {
316				regulator-name = "vdd_ddr";
317				regulator-min-microvolt = <1350000>;
318				regulator-max-microvolt = <1350000>;
319				regulator-always-on;
320				regulator-initial-mode = <0>;
321				regulator-over-current-protection;
322			};
323
324			vdd: buck3 {
325				regulator-name = "vdd";
326				regulator-min-microvolt = <3300000>;
327				regulator-max-microvolt = <3300000>;
328				regulator-always-on;
329				st,mask-reset;
330				regulator-initial-mode = <0>;
331				regulator-over-current-protection;
332			};
333
334			v3v3: buck4 {
335				regulator-name = "v3v3";
336				regulator-min-microvolt = <3300000>;
337				regulator-max-microvolt = <3300000>;
338				regulator-always-on;
339				regulator-over-current-protection;
340				regulator-initial-mode = <0>;
341			};
342
343			v1v8_audio: ldo1 {
344				regulator-name = "v1v8_audio";
345				regulator-min-microvolt = <1800000>;
346				regulator-max-microvolt = <1800000>;
347				regulator-always-on;
348				interrupts = <IT_CURLIM_LDO1 0>;
349			};
350
351			v3v3_hdmi: ldo2 {
352				regulator-name = "v3v3_hdmi";
353				regulator-min-microvolt = <3300000>;
354				regulator-max-microvolt = <3300000>;
355				regulator-always-on;
356				interrupts = <IT_CURLIM_LDO2 0>;
357			};
358
359			vtt_ddr: ldo3 {
360				regulator-name = "vtt_ddr";
361				regulator-min-microvolt = <500000>;
362				regulator-max-microvolt = <750000>;
363				regulator-always-on;
364				regulator-over-current-protection;
365			};
366
367			vdd_usb: ldo4 {
368				regulator-name = "vdd_usb";
369				interrupts = <IT_CURLIM_LDO4 0>;
370				regulator-always-on;
371			};
372
373			vdda: ldo5 {
374				regulator-name = "vdda";
375				regulator-min-microvolt = <2900000>;
376				regulator-max-microvolt = <2900000>;
377				interrupts = <IT_CURLIM_LDO5 0>;
378				regulator-boot-on;
379			};
380
381			v1v2_hdmi: ldo6 {
382				regulator-name = "v1v2_hdmi";
383				regulator-min-microvolt = <1200000>;
384				regulator-max-microvolt = <1200000>;
385				regulator-always-on;
386				interrupts = <IT_CURLIM_LDO6 0>;
387			};
388
389			vref_ddr: vref_ddr {
390				regulator-name = "vref_ddr";
391				regulator-always-on;
392			};
393
394			 bst_out: boost {
395				regulator-name = "bst_out";
396				interrupts = <IT_OCP_BOOST 0>;
397			 };
398
399			vbus_otg: pwr_sw1 {
400				regulator-name = "vbus_otg";
401				interrupts = <IT_OCP_OTG 0>;
402			 };
403
404			 vbus_sw: pwr_sw2 {
405				regulator-name = "vbus_sw";
406				interrupts = <IT_OCP_SWOUT 0>;
407				regulator-active-discharge = <1>;
408			 };
409		};
410
411		onkey {
412			compatible = "st,stpmic1-onkey";
413			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
414			interrupt-names = "onkey-falling", "onkey-rising";
415			power-off-time-sec = <10>;
416			status = "okay";
417		};
418
419		watchdog {
420			compatible = "st,stpmic1-wdt";
421			status = "disabled";
422		};
423	};
424};
425
426&i2c5 {
427	pinctrl-names = "default", "sleep";
428	pinctrl-0 = <&i2c5_pins_a>;
429	pinctrl-1 = <&i2c5_sleep_pins_a>;
430	i2c-scl-rising-time-ns = <185>;
431	i2c-scl-falling-time-ns = <20>;
432	clock-frequency = <400000>;
433	/* spare dmas for other usage */
434	/delete-property/dmas;
435	/delete-property/dma-names;
436	status = "disabled";
437};
438
439&i2s2 {
440	clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
441	clock-names = "pclk", "i2sclk", "x8k", "x11k";
442	pinctrl-names = "default", "sleep";
443	pinctrl-0 = <&i2s2_pins_a>;
444	pinctrl-1 = <&i2s2_sleep_pins_a>;
445	status = "disabled";
446
447	i2s2_port: port {
448		i2s2_endpoint: endpoint {
449			remote-endpoint = <&sii9022_tx_endpoint>;
450			format = "i2s";
451			mclk-fs = <256>;
452		};
453	};
454};
455
456&ipcc {
457	status = "disabled";
458};
459
460&iwdg1 {
461	timeout-sec = <32>;
462	status = "okay";
463};
464
465&iwdg2 {
466	timeout-sec = <32>;
467	status = "disabled";
468};
469
470&ltdc {
471	pinctrl-names = "default", "sleep";
472	pinctrl-0 = <&ltdc_pins_a>;
473	pinctrl-1 = <&ltdc_sleep_pins_a>;
474	status = "disabled";
475
476	port {
477		ltdc_ep0_out: endpoint@0 {
478			reg = <0>;
479			remote-endpoint = <&sii9022_in>;
480		};
481	};
482};
483
484&m4_rproc {
485	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
486			<&vdev0vring1>, <&vdev0buffer>, <&ipc_shmem>;
487	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
488	mbox-names = "vq0", "vq1", "shutdown", "detach";
489	interrupt-parent = <&exti>;
490	interrupts = <68 1>;
491	status = "okay";
492};
493
494&pwr_regulators {
495	vdd-supply = <&vdd>;
496	vdd_3v3_usbfs-supply = <&vdd_usb>;
497};
498
499&rcc {
500	compatible = "st,stm32mp1-rcc";
501	status = "okay";
502};
503
504&rng1 {
505	status = "okay";
506};
507
508&sai2 {
509	clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
510	clock-names = "pclk", "x8k", "x11k";
511	pinctrl-names = "default", "sleep";
512	pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
513	pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
514	status = "disabled";
515
516	sai2a: audio-controller@4400b004 {
517		#clock-cells = <0>;
518		dma-names = "tx";
519		clocks = <&rcc SAI2_K>;
520		clock-names = "sai_ck";
521		status = "okay";
522
523		sai2a_port: port {
524			sai2a_endpoint: endpoint {
525				remote-endpoint = <&cs42l51_tx_endpoint>;
526				format = "i2s";
527				mclk-fs = <256>;
528				dai-tdm-slot-num = <2>;
529				dai-tdm-slot-width = <32>;
530			};
531		};
532	};
533
534	sai2b: audio-controller@4400b024 {
535		dma-names = "rx";
536		st,sync = <&sai2a 2>;
537		clocks = <&rcc SAI2_K>, <&sai2a>;
538		clock-names = "sai_ck", "MCLK";
539		status = "okay";
540
541		sai2b_port: port {
542			sai2b_endpoint: endpoint {
543				remote-endpoint = <&cs42l51_rx_endpoint>;
544				format = "i2s";
545				mclk-fs = <256>;
546				dai-tdm-slot-num = <2>;
547				dai-tdm-slot-width = <32>;
548			};
549		};
550	};
551};
552
553&sdmmc1 {
554	pinctrl-names = "default", "opendrain", "sleep";
555	pinctrl-0 = <&sdmmc1_b4_pins_a>;
556	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
557	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
558	cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
559	disable-wp;
560	st,neg-edge;
561	bus-width = <4>;
562	vmmc-supply = <&v3v3>;
563	status = "disabled";
564};
565
566&sdmmc3 {
567	pinctrl-names = "default", "opendrain", "sleep";
568	pinctrl-0 = <&sdmmc3_b4_pins_a>;
569	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
570	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
571	broken-cd;
572	st,neg-edge;
573	bus-width = <4>;
574	vmmc-supply = <&v3v3>;
575	status = "disabled";
576};
577
578&tamp {
579	st,tamp-passive-nb-sample = <4>;
580	st,tamp-passive-sample-clk-div = <16384>;
581};
582
583&timers1 {
584	/* spare dmas for other usage */
585	/delete-property/dmas;
586	/delete-property/dma-names;
587	status = "disabled";
588	pwm {
589		pinctrl-0 = <&pwm1_pins_a>;
590		pinctrl-1 = <&pwm1_sleep_pins_a>;
591		pinctrl-names = "default", "sleep";
592		status = "okay";
593	};
594	timer@0 {
595		status = "okay";
596	};
597};
598
599&timers3 {
600	/delete-property/dmas;
601	/delete-property/dma-names;
602	status = "disabled";
603	pwm {
604		pinctrl-0 = <&pwm3_pins_a>;
605		pinctrl-1 = <&pwm3_sleep_pins_a>;
606		pinctrl-names = "default", "sleep";
607		status = "okay";
608	};
609	timer@2 {
610		status = "okay";
611	};
612};
613
614&timers4 {
615	/delete-property/dmas;
616	/delete-property/dma-names;
617	status = "disabled";
618	pwm {
619		pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
620		pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
621		pinctrl-names = "default", "sleep";
622		status = "okay";
623	};
624	timer@3 {
625		status = "okay";
626	};
627};
628
629&timers5 {
630	/delete-property/dmas;
631	/delete-property/dma-names;
632	status = "disabled";
633	pwm {
634		pinctrl-0 = <&pwm5_pins_a>;
635		pinctrl-1 = <&pwm5_sleep_pins_a>;
636		pinctrl-names = "default", "sleep";
637		status = "okay";
638	};
639	timer@4 {
640		status = "okay";
641	};
642};
643
644&timers6 {
645	/delete-property/dmas;
646	/delete-property/dma-names;
647	status = "disabled";
648	timer@5 {
649		status = "okay";
650	};
651};
652
653&timers12 {
654	/delete-property/dmas;
655	/delete-property/dma-names;
656	status = "disabled";
657	pwm {
658		pinctrl-0 = <&pwm12_pins_a>;
659		pinctrl-1 = <&pwm12_sleep_pins_a>;
660		pinctrl-names = "default", "sleep";
661		status = "okay";
662	};
663	timer@11 {
664		status = "okay";
665	};
666};
667
668&uart4 {
669	pinctrl-names = "default", "sleep", "idle";
670	pinctrl-0 = <&uart4_pins_a>;
671	pinctrl-1 = <&uart4_sleep_pins_a>;
672	pinctrl-2 = <&uart4_idle_pins_a>;
673	/delete-property/dmas;
674	/delete-property/dma-names;
675	status = "okay";
676};
677
678&uart7 {
679	pinctrl-names = "default", "sleep", "idle";
680	pinctrl-0 = <&uart7_pins_c>;
681	pinctrl-1 = <&uart7_sleep_pins_c>;
682	pinctrl-2 = <&uart7_idle_pins_c>;
683	/delete-property/dmas;
684	/delete-property/dma-names;
685	status = "disabled";
686};
687
688&usart3 {
689	pinctrl-names = "default", "sleep", "idle";
690	pinctrl-0 = <&usart3_pins_c>;
691	pinctrl-1 = <&usart3_sleep_pins_c>;
692	pinctrl-2 = <&usart3_idle_pins_c>;
693	uart-has-rtscts;
694	status = "disabled";
695};
696
697&usbh_ehci {
698	phys = <&usbphyc_port0>;
699	status = "disabled";
700};
701
702&usbotg_hs {
703	phys = <&usbphyc_port1 0>;
704	phy-names = "usb2-phy";
705	usb-role-switch;
706	status = "disabled";
707
708	port {
709		usbotg_hs_ep: endpoint {
710			remote-endpoint = <&con_usbotg_hs_ep>;
711		};
712	};
713};
714
715&usbphyc {
716	status = "disabled";
717};
718
719&usbphyc_port0 {
720	phy-supply = <&vdd_usb>;
721	st,tune-hs-dc-level = <2>;
722	st,enable-fs-rftime-tuning;
723	st,enable-hs-rftime-reduction;
724	st,trim-hs-current = <15>;
725	st,trim-hs-impedance = <1>;
726	st,tune-squelch-level = <3>;
727	st,tune-hs-rx-offset = <2>;
728	st,no-lsfs-sc;
729};
730
731&usbphyc_port1 {
732	phy-supply = <&vdd_usb>;
733	st,tune-hs-dc-level = <2>;
734	st,enable-fs-rftime-tuning;
735	st,enable-hs-rftime-reduction;
736	st,trim-hs-current = <15>;
737	st,trim-hs-impedance = <1>;
738	st,tune-squelch-level = <3>;
739	st,tune-hs-rx-offset = <2>;
740	st,no-lsfs-sc;
741};
742
743&vrefbuf {
744	regulator-min-microvolt = <2500000>;
745	regulator-max-microvolt = <2500000>;
746	vdda-supply = <&vdd>;
747	status = "disabled";
748};
749