blob: 9ce10a52f06cc9eb645ad479af690721b51a070f [file] [log] [blame]
Patrick Delaunay48c5e902020-03-06 17:54:41 +01001// 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 mcuram: mcuram@30000000 {
46 compatible = "shared-dma-pool";
47 reg = <0x30000000 0x40000>;
48 no-map;
49 };
50
51 retram: retram@38000000 {
52 compatible = "shared-dma-pool";
53 reg = <0x38000000 0x10000>;
54 no-map;
55 };
56
57 gpu_reserved: gpu@d4000000 {
58 reg = <0xd4000000 0x4000000>;
59 no-map;
60 };
Patrick Delaunayd1633b32020-03-18 09:22:48 +010061
62 optee@de000000 {
63 reg = <0xde000000 0x02000000>;
64 no-map;
65 };
Patrick Delaunay48c5e902020-03-06 17:54:41 +010066 };
67
68 led {
69 compatible = "gpio-leds";
70 blue {
71 label = "heartbeat";
72 gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
73 linux,default-trigger = "heartbeat";
74 default-state = "off";
75 };
76 };
77
78 sound {
79 compatible = "audio-graph-card";
80 label = "STM32MP1-DK";
81 routing =
82 "Playback" , "MCLK",
83 "Capture" , "MCLK",
84 "MICL" , "Mic Bias";
85 dais = <&sai2a_port &sai2b_port &i2s2_port>;
86 status = "okay";
87 };
88};
89
90&adc {
91 pinctrl-names = "default";
92 pinctrl-0 = <&adc12_ain_pins_a>, <&adc12_usb_cc_pins_a>;
93 vdd-supply = <&vdd>;
94 vdda-supply = <&vdd>;
95 vref-supply = <&vrefbuf>;
96 status = "disabled";
97 adc1: adc@0 {
98 /*
99 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in18 & in19.
100 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
101 * 5 * (56 + 47kOhms) * 5pF => 2.5us.
102 * Use arbitrary margin here (e.g. 5us).
103 */
104 st,min-sample-time-nsecs = <5000>;
105 /* AIN connector, USB Type-C CC1 & CC2 */
106 st,adc-channels = <0 1 6 13 18 19>;
107 status = "okay";
108 };
109 adc2: adc@100 {
110 /* AIN connector, USB Type-C CC1 & CC2 */
111 st,adc-channels = <0 1 2 6 18 19>;
112 st,min-sample-time-nsecs = <5000>;
113 status = "okay";
114 };
115};
116
117&cec {
118 pinctrl-names = "default", "sleep";
119 pinctrl-0 = <&cec_pins_b>;
120 pinctrl-1 = <&cec_pins_sleep_b>;
121 status = "okay";
122};
123
124&ethernet0 {
125 status = "okay";
126 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
127 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
128 pinctrl-names = "default", "sleep";
129 phy-mode = "rgmii-id";
130 max-speed = <1000>;
131 phy-handle = <&phy0>;
132
133 mdio0 {
134 #address-cells = <1>;
135 #size-cells = <0>;
136 compatible = "snps,dwmac-mdio";
137 phy0: ethernet-phy@0 {
138 reg = <0>;
139 };
140 };
141};
142
143&gpu {
144 contiguous-area = <&gpu_reserved>;
145 status = "okay";
146};
147
148&i2c1 {
149 pinctrl-names = "default", "sleep";
150 pinctrl-0 = <&i2c1_pins_a>;
151 pinctrl-1 = <&i2c1_pins_sleep_a>;
152 i2c-scl-rising-time-ns = <100>;
153 i2c-scl-falling-time-ns = <7>;
154 status = "okay";
155 /delete-property/dmas;
156 /delete-property/dma-names;
157
158 hdmi-transmitter@39 {
159 compatible = "sil,sii9022";
160 reg = <0x39>;
161 iovcc-supply = <&v3v3_hdmi>;
162 cvcc12-supply = <&v1v2_hdmi>;
163 reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
164 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
165 interrupt-parent = <&gpiog>;
166 #sound-dai-cells = <0>;
167 status = "okay";
168
169 ports {
170 #address-cells = <1>;
171 #size-cells = <0>;
172
173 port@0 {
174 reg = <0>;
175 sii9022_in: endpoint {
176 remote-endpoint = <&ltdc_ep0_out>;
177 };
178 };
179
180 port@3 {
181 reg = <3>;
182 sii9022_tx_endpoint: endpoint {
183 remote-endpoint = <&i2s2_endpoint>;
184 };
185 };
186 };
187 };
188
189 cs42l51: cs42l51@4a {
190 compatible = "cirrus,cs42l51";
191 reg = <0x4a>;
192 #sound-dai-cells = <0>;
193 VL-supply = <&v3v3>;
194 VD-supply = <&v1v8_audio>;
195 VA-supply = <&v1v8_audio>;
196 VAHP-supply = <&v1v8_audio>;
197 reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
198 clocks = <&sai2a>;
199 clock-names = "MCLK";
200 status = "okay";
201
202 cs42l51_port: port {
203 #address-cells = <1>;
204 #size-cells = <0>;
205
206 cs42l51_tx_endpoint: endpoint@0 {
207 reg = <0>;
208 remote-endpoint = <&sai2a_endpoint>;
209 frame-master;
210 bitclock-master;
211 };
212
213 cs42l51_rx_endpoint: endpoint@1 {
214 reg = <1>;
215 remote-endpoint = <&sai2b_endpoint>;
216 frame-master;
217 bitclock-master;
218 };
219 };
220 };
221};
222
223&i2c4 {
224 pinctrl-names = "default";
225 pinctrl-0 = <&i2c4_pins_a>;
226 i2c-scl-rising-time-ns = <185>;
227 i2c-scl-falling-time-ns = <20>;
228 status = "okay";
229 /* spare dmas for other usage */
230 /delete-property/dmas;
231 /delete-property/dma-names;
232
233 typec: stusb1600@28 {
234 compatible = "st,stusb1600";
235 reg = <0x28>;
236 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
237 interrupt-parent = <&gpioi>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&stusb1600_pins_a>;
240
241 status = "okay";
242
243 typec_con: connector {
244 compatible = "usb-c-connector";
245 label = "USB-C";
246 power-role = "sink";
247 power-opmode = "default";
248 };
249 };
250
251 pmic: stpmic@33 {
252 compatible = "st,stpmic1";
253 reg = <0x33>;
254 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
255 interrupt-controller;
256 #interrupt-cells = <2>;
257 status = "okay";
258
259 regulators {
260 compatible = "st,stpmic1-regulators";
261 ldo1-supply = <&v3v3>;
262 ldo3-supply = <&vdd_ddr>;
263 ldo6-supply = <&v3v3>;
264 pwr_sw1-supply = <&bst_out>;
265 pwr_sw2-supply = <&bst_out>;
266
267 vddcore: buck1 {
268 regulator-name = "vddcore";
269 regulator-min-microvolt = <1200000>;
270 regulator-max-microvolt = <1350000>;
271 regulator-always-on;
272 regulator-initial-mode = <0>;
273 regulator-over-current-protection;
274 };
275
276 vdd_ddr: buck2 {
277 regulator-name = "vdd_ddr";
278 regulator-min-microvolt = <1350000>;
279 regulator-max-microvolt = <1350000>;
280 regulator-always-on;
281 regulator-initial-mode = <0>;
282 regulator-over-current-protection;
283 };
284
285 vdd: buck3 {
286 regulator-name = "vdd";
287 regulator-min-microvolt = <3300000>;
288 regulator-max-microvolt = <3300000>;
289 regulator-always-on;
290 st,mask-reset;
291 regulator-initial-mode = <0>;
292 regulator-over-current-protection;
293 };
294
295 v3v3: buck4 {
296 regulator-name = "v3v3";
297 regulator-min-microvolt = <3300000>;
298 regulator-max-microvolt = <3300000>;
299 regulator-always-on;
300 regulator-over-current-protection;
301 regulator-initial-mode = <0>;
302 };
303
304 v1v8_audio: ldo1 {
305 regulator-name = "v1v8_audio";
306 regulator-min-microvolt = <1800000>;
307 regulator-max-microvolt = <1800000>;
308 regulator-always-on;
309 interrupts = <IT_CURLIM_LDO1 0>;
310 };
311
312 v3v3_hdmi: ldo2 {
313 regulator-name = "v3v3_hdmi";
314 regulator-min-microvolt = <3300000>;
315 regulator-max-microvolt = <3300000>;
316 regulator-always-on;
317 interrupts = <IT_CURLIM_LDO2 0>;
318 };
319
320 vtt_ddr: ldo3 {
321 regulator-name = "vtt_ddr";
322 regulator-min-microvolt = <500000>;
323 regulator-max-microvolt = <750000>;
324 regulator-always-on;
325 regulator-over-current-protection;
326 };
327
328 vdd_usb: ldo4 {
329 regulator-name = "vdd_usb";
330 regulator-min-microvolt = <3300000>;
331 regulator-max-microvolt = <3300000>;
332 interrupts = <IT_CURLIM_LDO4 0>;
333 };
334
335 vdda: ldo5 {
336 regulator-name = "vdda";
337 regulator-min-microvolt = <2900000>;
338 regulator-max-microvolt = <2900000>;
339 interrupts = <IT_CURLIM_LDO5 0>;
340 regulator-boot-on;
341 };
342
343 v1v2_hdmi: ldo6 {
344 regulator-name = "v1v2_hdmi";
345 regulator-min-microvolt = <1200000>;
346 regulator-max-microvolt = <1200000>;
347 regulator-always-on;
348 interrupts = <IT_CURLIM_LDO6 0>;
349 };
350
351 vref_ddr: vref_ddr {
352 regulator-name = "vref_ddr";
353 regulator-always-on;
354 regulator-over-current-protection;
355 };
356
357 bst_out: boost {
358 regulator-name = "bst_out";
359 interrupts = <IT_OCP_BOOST 0>;
360 };
361
362 vbus_otg: pwr_sw1 {
363 regulator-name = "vbus_otg";
364 interrupts = <IT_OCP_OTG 0>;
365 };
366
367 vbus_sw: pwr_sw2 {
368 regulator-name = "vbus_sw";
369 interrupts = <IT_OCP_SWOUT 0>;
370 regulator-active-discharge = <1>;
371 };
372 };
373
374 onkey {
375 compatible = "st,stpmic1-onkey";
376 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
377 interrupt-names = "onkey-falling", "onkey-rising";
378 power-off-time-sec = <10>;
379 status = "okay";
380 };
381
382 watchdog {
383 compatible = "st,stpmic1-wdt";
384 status = "disabled";
385 };
386 };
387};
388
389&i2s2 {
390 clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
391 clock-names = "pclk", "i2sclk", "x8k", "x11k";
392 pinctrl-names = "default", "sleep";
393 pinctrl-0 = <&i2s2_pins_a>;
394 pinctrl-1 = <&i2s2_pins_sleep_a>;
395 status = "okay";
396
397 i2s2_port: port {
398 i2s2_endpoint: endpoint {
399 remote-endpoint = <&sii9022_tx_endpoint>;
400 format = "i2s";
401 mclk-fs = <256>;
402 };
403 };
404};
405
406&ipcc {
407 status = "okay";
408};
409
410&iwdg2 {
411 timeout-sec = <32>;
412 status = "okay";
413};
414
415&ltdc {
416 pinctrl-names = "default", "sleep";
417 pinctrl-0 = <&ltdc_pins_a>;
418 pinctrl-1 = <&ltdc_pins_sleep_a>;
419 status = "okay";
420
421 port {
422 #address-cells = <1>;
423 #size-cells = <0>;
424
425 ltdc_ep0_out: endpoint@0 {
426 reg = <0>;
427 remote-endpoint = <&sii9022_in>;
428 };
429 };
430};
431
432&m4_rproc {
433 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
434 <&vdev0vring1>, <&vdev0buffer>;
435 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
436 mbox-names = "vq0", "vq1", "shutdown";
437 interrupt-parent = <&exti>;
438 interrupts = <68 1>;
439 status = "okay";
440};
441
442&pwr_regulators {
443 vdd-supply = <&vdd>;
444 vdd_3v3_usbfs-supply = <&vdd_usb>;
445};
446
447&rng1 {
448 status = "okay";
449};
450
451&rtc {
452 status = "okay";
453};
454
455&sai2 {
456 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
457 clock-names = "pclk", "x8k", "x11k";
458 pinctrl-names = "default", "sleep";
459 pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
460 pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
461 status = "okay";
462
463 sai2a: audio-controller@4400b004 {
464 #clock-cells = <0>;
465 dma-names = "tx";
466 clocks = <&rcc SAI2_K>;
467 clock-names = "sai_ck";
468 status = "okay";
469
470 sai2a_port: port {
471 sai2a_endpoint: endpoint {
472 remote-endpoint = <&cs42l51_tx_endpoint>;
473 format = "i2s";
474 mclk-fs = <256>;
475 dai-tdm-slot-num = <2>;
476 dai-tdm-slot-width = <32>;
477 };
478 };
479 };
480
481 sai2b: audio-controller@4400b024 {
482 dma-names = "rx";
483 st,sync = <&sai2a 2>;
484 clocks = <&rcc SAI2_K>, <&sai2a>;
485 clock-names = "sai_ck", "MCLK";
486 status = "okay";
487
488 sai2b_port: port {
489 sai2b_endpoint: endpoint {
490 remote-endpoint = <&cs42l51_rx_endpoint>;
491 format = "i2s";
492 mclk-fs = <256>;
493 dai-tdm-slot-num = <2>;
494 dai-tdm-slot-width = <32>;
495 };
496 };
497 };
498};
499
500&sdmmc1 {
501 pinctrl-names = "default", "opendrain", "sleep";
502 pinctrl-0 = <&sdmmc1_b4_pins_a>;
503 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
504 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
505 broken-cd;
506 st,neg-edge;
507 bus-width = <4>;
508 vmmc-supply = <&v3v3>;
509 status = "okay";
510};
511
512&sdmmc3 {
513 pinctrl-names = "default", "opendrain", "sleep";
514 pinctrl-0 = <&sdmmc3_b4_pins_a>;
515 pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
516 pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
517 broken-cd;
518 st,neg-edge;
519 bus-width = <4>;
520 vmmc-supply = <&v3v3>;
521 status = "disabled";
522};
523
524&timers1 {
525 /* spare dmas for other usage */
526 /delete-property/dmas;
527 /delete-property/dma-names;
528 status = "disabled";
529 pwm {
530 pinctrl-0 = <&pwm1_pins_a>;
531 pinctrl-1 = <&pwm1_sleep_pins_a>;
532 pinctrl-names = "default", "sleep";
533 status = "okay";
534 };
535 timer@0 {
536 status = "okay";
537 };
538};
539
540&timers3 {
541 /delete-property/dmas;
542 /delete-property/dma-names;
543 status = "disabled";
544 pwm {
545 pinctrl-0 = <&pwm3_pins_a>;
546 pinctrl-1 = <&pwm3_sleep_pins_a>;
547 pinctrl-names = "default", "sleep";
548 status = "okay";
549 };
550 timer@2 {
551 status = "okay";
552 };
553};
554
555&timers4 {
556 /delete-property/dmas;
557 /delete-property/dma-names;
558 status = "disabled";
559 pwm {
560 pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
561 pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
562 pinctrl-names = "default", "sleep";
563 status = "okay";
564 };
565 timer@3 {
566 status = "okay";
567 };
568};
569
570&timers5 {
571 /delete-property/dmas;
572 /delete-property/dma-names;
573 status = "disabled";
574 pwm {
575 pinctrl-0 = <&pwm5_pins_a>;
576 pinctrl-1 = <&pwm5_sleep_pins_a>;
577 pinctrl-names = "default", "sleep";
578 status = "okay";
579 };
580 timer@4 {
581 status = "okay";
582 };
583};
584
585&timers6 {
586 /delete-property/dmas;
587 /delete-property/dma-names;
588 status = "disabled";
589 timer@5 {
590 status = "okay";
591 };
592};
593
594&timers12 {
595 /delete-property/dmas;
596 /delete-property/dma-names;
597 status = "disabled";
598 pwm {
599 pinctrl-0 = <&pwm12_pins_a>;
600 pinctrl-1 = <&pwm12_sleep_pins_a>;
601 pinctrl-names = "default", "sleep";
602 status = "okay";
603 };
604 timer@11 {
605 status = "okay";
606 };
607};
608
609&uart4 {
610 pinctrl-names = "default";
611 pinctrl-0 = <&uart4_pins_a>;
612 status = "okay";
613};
614
615&usbh_ehci {
616 phys = <&usbphyc_port0>;
617 status = "okay";
618};
619
620&usbotg_hs {
621 dr_mode = "peripheral";
622 phys = <&usbphyc_port1 0>;
623 phy-names = "usb2-phy";
624 status = "okay";
625};
626
627&usbphyc {
628 status = "okay";
629};
630
631&usbphyc_port0 {
632 phy-supply = <&vdd_usb>;
633};
634
635&usbphyc_port1 {
636 phy-supply = <&vdd_usb>;
637};
638
639&vrefbuf {
640 regulator-min-microvolt = <2500000>;
641 regulator-max-microvolt = <2500000>;
642 vdda-supply = <&vdd>;
643 status = "okay";
644};