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