Merge tag 'v5.7-rc7' into perf/core, to pick up fixes
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp15xx-dkx.dtsi
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                 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                 };
61         };
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 {
219         pinctrl-names = "default", "sleep";
220         pinctrl-0 = <&i2c4_pins_a>;
221         pinctrl-1 = <&i2c4_pins_sleep_a>;
222         i2c-scl-rising-time-ns = <185>;
223         i2c-scl-falling-time-ns = <20>;
224         clock-frequency = <400000>;
225         status = "okay";
226         /* spare dmas for other usage */
227         /delete-property/dmas;
228         /delete-property/dma-names;
229
230         pmic: stpmic@33 {
231                 compatible = "st,stpmic1";
232                 reg = <0x33>;
233                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
234                 interrupt-controller;
235                 #interrupt-cells = <2>;
236                 status = "okay";
237
238                 regulators {
239                         compatible = "st,stpmic1-regulators";
240                         ldo1-supply = <&v3v3>;
241                         ldo3-supply = <&vdd_ddr>;
242                         ldo6-supply = <&v3v3>;
243                         pwr_sw1-supply = <&bst_out>;
244                         pwr_sw2-supply = <&bst_out>;
245
246                         vddcore: buck1 {
247                                 regulator-name = "vddcore";
248                                 regulator-min-microvolt = <1200000>;
249                                 regulator-max-microvolt = <1350000>;
250                                 regulator-always-on;
251                                 regulator-initial-mode = <0>;
252                                 regulator-over-current-protection;
253                         };
254
255                         vdd_ddr: buck2 {
256                                 regulator-name = "vdd_ddr";
257                                 regulator-min-microvolt = <1350000>;
258                                 regulator-max-microvolt = <1350000>;
259                                 regulator-always-on;
260                                 regulator-initial-mode = <0>;
261                                 regulator-over-current-protection;
262                         };
263
264                         vdd: buck3 {
265                                 regulator-name = "vdd";
266                                 regulator-min-microvolt = <3300000>;
267                                 regulator-max-microvolt = <3300000>;
268                                 regulator-always-on;
269                                 st,mask-reset;
270                                 regulator-initial-mode = <0>;
271                                 regulator-over-current-protection;
272                         };
273
274                         v3v3: buck4 {
275                                 regulator-name = "v3v3";
276                                 regulator-min-microvolt = <3300000>;
277                                 regulator-max-microvolt = <3300000>;
278                                 regulator-always-on;
279                                 regulator-over-current-protection;
280                                 regulator-initial-mode = <0>;
281                         };
282
283                         v1v8_audio: ldo1 {
284                                 regulator-name = "v1v8_audio";
285                                 regulator-min-microvolt = <1800000>;
286                                 regulator-max-microvolt = <1800000>;
287                                 regulator-always-on;
288                                 interrupts = <IT_CURLIM_LDO1 0>;
289                         };
290
291                         v3v3_hdmi: ldo2 {
292                                 regulator-name = "v3v3_hdmi";
293                                 regulator-min-microvolt = <3300000>;
294                                 regulator-max-microvolt = <3300000>;
295                                 regulator-always-on;
296                                 interrupts = <IT_CURLIM_LDO2 0>;
297                         };
298
299                         vtt_ddr: ldo3 {
300                                 regulator-name = "vtt_ddr";
301                                 regulator-min-microvolt = <500000>;
302                                 regulator-max-microvolt = <750000>;
303                                 regulator-always-on;
304                                 regulator-over-current-protection;
305                         };
306
307                         vdd_usb: ldo4 {
308                                 regulator-name = "vdd_usb";
309                                 interrupts = <IT_CURLIM_LDO4 0>;
310                         };
311
312                         vdda: ldo5 {
313                                 regulator-name = "vdda";
314                                 regulator-min-microvolt = <2900000>;
315                                 regulator-max-microvolt = <2900000>;
316                                 interrupts = <IT_CURLIM_LDO5 0>;
317                                 regulator-boot-on;
318                         };
319
320                         v1v2_hdmi: ldo6 {
321                                 regulator-name = "v1v2_hdmi";
322                                 regulator-min-microvolt = <1200000>;
323                                 regulator-max-microvolt = <1200000>;
324                                 regulator-always-on;
325                                 interrupts = <IT_CURLIM_LDO6 0>;
326                         };
327
328                         vref_ddr: vref_ddr {
329                                 regulator-name = "vref_ddr";
330                                 regulator-always-on;
331                         };
332
333                          bst_out: boost {
334                                 regulator-name = "bst_out";
335                                 interrupts = <IT_OCP_BOOST 0>;
336                          };
337
338                         vbus_otg: pwr_sw1 {
339                                 regulator-name = "vbus_otg";
340                                 interrupts = <IT_OCP_OTG 0>;
341                          };
342
343                          vbus_sw: pwr_sw2 {
344                                 regulator-name = "vbus_sw";
345                                 interrupts = <IT_OCP_SWOUT 0>;
346                                 regulator-active-discharge = <1>;
347                          };
348                 };
349
350                 onkey {
351                         compatible = "st,stpmic1-onkey";
352                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
353                         interrupt-names = "onkey-falling", "onkey-rising";
354                         power-off-time-sec = <10>;
355                         status = "okay";
356                 };
357
358                 watchdog {
359                         compatible = "st,stpmic1-wdt";
360                         status = "disabled";
361                 };
362         };
363 };
364
365 &i2s2 {
366         clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
367         clock-names = "pclk", "i2sclk", "x8k", "x11k";
368         pinctrl-names = "default", "sleep";
369         pinctrl-0 = <&i2s2_pins_a>;
370         pinctrl-1 = <&i2s2_pins_sleep_a>;
371         status = "okay";
372
373         i2s2_port: port {
374                 i2s2_endpoint: endpoint {
375                         remote-endpoint = <&sii9022_tx_endpoint>;
376                         format = "i2s";
377                         mclk-fs = <256>;
378                 };
379         };
380 };
381
382 &ipcc {
383         status = "okay";
384 };
385
386 &iwdg2 {
387         timeout-sec = <32>;
388         status = "okay";
389 };
390
391 &ltdc {
392         pinctrl-names = "default", "sleep";
393         pinctrl-0 = <&ltdc_pins_a>;
394         pinctrl-1 = <&ltdc_pins_sleep_a>;
395         status = "okay";
396
397         port {
398                 #address-cells = <1>;
399                 #size-cells = <0>;
400
401                 ltdc_ep0_out: endpoint@0 {
402                         reg = <0>;
403                         remote-endpoint = <&sii9022_in>;
404                 };
405         };
406 };
407
408 &m4_rproc {
409         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
410                         <&vdev0vring1>, <&vdev0buffer>;
411         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
412         mbox-names = "vq0", "vq1", "shutdown";
413         interrupt-parent = <&exti>;
414         interrupts = <68 1>;
415         status = "okay";
416 };
417
418 &pwr_regulators {
419         vdd-supply = <&vdd>;
420         vdd_3v3_usbfs-supply = <&vdd_usb>;
421 };
422
423 &rng1 {
424         status = "okay";
425 };
426
427 &rtc {
428         status = "okay";
429 };
430
431 &sai2 {
432         clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
433         clock-names = "pclk", "x8k", "x11k";
434         pinctrl-names = "default", "sleep";
435         pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
436         pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
437         status = "okay";
438
439         sai2a: audio-controller@4400b004 {
440                 #clock-cells = <0>;
441                 dma-names = "tx";
442                 clocks = <&rcc SAI2_K>;
443                 clock-names = "sai_ck";
444                 status = "okay";
445
446                 sai2a_port: port {
447                         sai2a_endpoint: endpoint {
448                                 remote-endpoint = <&cs42l51_tx_endpoint>;
449                                 format = "i2s";
450                                 mclk-fs = <256>;
451                                 dai-tdm-slot-num = <2>;
452                                 dai-tdm-slot-width = <32>;
453                         };
454                 };
455         };
456
457         sai2b: audio-controller@4400b024 {
458                 dma-names = "rx";
459                 st,sync = <&sai2a 2>;
460                 clocks = <&rcc SAI2_K>, <&sai2a>;
461                 clock-names = "sai_ck", "MCLK";
462                 status = "okay";
463
464                 sai2b_port: port {
465                         sai2b_endpoint: endpoint {
466                                 remote-endpoint = <&cs42l51_rx_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
476 &sdmmc1 {
477         pinctrl-names = "default", "opendrain", "sleep";
478         pinctrl-0 = <&sdmmc1_b4_pins_a>;
479         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
480         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
481         cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
482         disable-wp;
483         st,neg-edge;
484         bus-width = <4>;
485         vmmc-supply = <&v3v3>;
486         status = "okay";
487 };
488
489 &sdmmc3 {
490         pinctrl-names = "default", "opendrain", "sleep";
491         pinctrl-0 = <&sdmmc3_b4_pins_a>;
492         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
493         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
494         broken-cd;
495         st,neg-edge;
496         bus-width = <4>;
497         vmmc-supply = <&v3v3>;
498         status = "disabled";
499 };
500
501 &timers1 {
502         /* spare dmas for other usage */
503         /delete-property/dmas;
504         /delete-property/dma-names;
505         status = "disabled";
506         pwm {
507                 pinctrl-0 = <&pwm1_pins_a>;
508                 pinctrl-1 = <&pwm1_sleep_pins_a>;
509                 pinctrl-names = "default", "sleep";
510                 status = "okay";
511         };
512         timer@0 {
513                 status = "okay";
514         };
515 };
516
517 &timers3 {
518         /delete-property/dmas;
519         /delete-property/dma-names;
520         status = "disabled";
521         pwm {
522                 pinctrl-0 = <&pwm3_pins_a>;
523                 pinctrl-1 = <&pwm3_sleep_pins_a>;
524                 pinctrl-names = "default", "sleep";
525                 status = "okay";
526         };
527         timer@2 {
528                 status = "okay";
529         };
530 };
531
532 &timers4 {
533         /delete-property/dmas;
534         /delete-property/dma-names;
535         status = "disabled";
536         pwm {
537                 pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>;
538                 pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>;
539                 pinctrl-names = "default", "sleep";
540                 status = "okay";
541         };
542         timer@3 {
543                 status = "okay";
544         };
545 };
546
547 &timers5 {
548         /delete-property/dmas;
549         /delete-property/dma-names;
550         status = "disabled";
551         pwm {
552                 pinctrl-0 = <&pwm5_pins_a>;
553                 pinctrl-1 = <&pwm5_sleep_pins_a>;
554                 pinctrl-names = "default", "sleep";
555                 status = "okay";
556         };
557         timer@4 {
558                 status = "okay";
559         };
560 };
561
562 &timers6 {
563         /delete-property/dmas;
564         /delete-property/dma-names;
565         status = "disabled";
566         timer@5 {
567                 status = "okay";
568         };
569 };
570
571 &timers12 {
572         /delete-property/dmas;
573         /delete-property/dma-names;
574         status = "disabled";
575         pwm {
576                 pinctrl-0 = <&pwm12_pins_a>;
577                 pinctrl-1 = <&pwm12_sleep_pins_a>;
578                 pinctrl-names = "default", "sleep";
579                 status = "okay";
580         };
581         timer@11 {
582                 status = "okay";
583         };
584 };
585
586 &uart4 {
587         pinctrl-names = "default";
588         pinctrl-0 = <&uart4_pins_a>;
589         status = "okay";
590 };
591
592 &usbh_ehci {
593         phys = <&usbphyc_port0>;
594         status = "okay";
595 };
596
597 &usbotg_hs {
598         dr_mode = "peripheral";
599         phys = <&usbphyc_port1 0>;
600         phy-names = "usb2-phy";
601         status = "okay";
602 };
603
604 &usbphyc {
605         status = "okay";
606 };
607
608 &usbphyc_port0 {
609         phy-supply = <&vdd_usb>;
610         vdda1v1-supply = <&reg11>;
611         vdda1v8-supply = <&reg18>;
612 };
613
614 &usbphyc_port1 {
615         phy-supply = <&vdd_usb>;
616         vdda1v1-supply = <&reg11>;
617         vdda1v8-supply = <&reg18>;
618 };
619
620 &vrefbuf {
621         regulator-min-microvolt = <2500000>;
622         regulator-max-microvolt = <2500000>;
623         vdda-supply = <&vdd>;
624         status = "okay";
625 };