Debian Codegraph @

arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi

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