Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / arm / 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                 optee@de000000 {
63                         reg = <0xde000000 0x02000000>;
64                         no-map;
65                 };
66         };
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", "sleep";
225         pinctrl-0 = <&i2c4_pins_a>;
226         pinctrl-1 = <&i2c4_pins_sleep_a>;
227         i2c-scl-rising-time-ns = <185>;
228         i2c-scl-falling-time-ns = <20>;
229         clock-frequency = <400000>;
230         status = "okay";
231         /* spare dmas for other usage */
232         /delete-property/dmas;
233         /delete-property/dma-names;
234
235         typec: stusb1600@28 {
236                 compatible = "st,stusb1600";
237                 reg = <0x28>;
238                 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
239                 interrupt-parent = <&gpioi>;
240                 pinctrl-names = "default";
241                 pinctrl-0 = <&stusb1600_pins_a>;
242
243                 status = "okay";
244
245                 typec_con: connector {
246                         compatible = "usb-c-connector";
247                         label = "USB-C";
248                         power-role = "sink";
249                         power-opmode = "default";
250                 };
251         };
252
253         pmic: stpmic@33 {
254                 compatible = "st,stpmic1";
255                 reg = <0x33>;
256                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
257                 interrupt-controller;
258                 #interrupt-cells = <2>;
259                 status = "okay";
260
261                 regulators {
262                         compatible = "st,stpmic1-regulators";
263                         ldo1-supply = <&v3v3>;
264                         ldo3-supply = <&vdd_ddr>;
265                         ldo6-supply = <&v3v3>;
266                         pwr_sw1-supply = <&bst_out>;
267                         pwr_sw2-supply = <&bst_out>;
268
269                         vddcore: buck1 {
270                                 regulator-name = "vddcore";
271                                 regulator-min-microvolt = <1200000>;
272                                 regulator-max-microvolt = <1350000>;
273                                 regulator-always-on;
274                                 regulator-initial-mode = <0>;
275                                 regulator-over-current-protection;
276                         };
277
278                         vdd_ddr: buck2 {
279                                 regulator-name = "vdd_ddr";
280                                 regulator-min-microvolt = <1350000>;
281                                 regulator-max-microvolt = <1350000>;
282                                 regulator-always-on;
283                                 regulator-initial-mode = <0>;
284                                 regulator-over-current-protection;
285                         };
286
287                         vdd: buck3 {
288                                 regulator-name = "vdd";
289                                 regulator-min-microvolt = <3300000>;
290                                 regulator-max-microvolt = <3300000>;
291                                 regulator-always-on;
292                                 st,mask-reset;
293                                 regulator-initial-mode = <0>;
294                                 regulator-over-current-protection;
295                         };
296
297                         v3v3: buck4 {
298                                 regulator-name = "v3v3";
299                                 regulator-min-microvolt = <3300000>;
300                                 regulator-max-microvolt = <3300000>;
301                                 regulator-always-on;
302                                 regulator-over-current-protection;
303                                 regulator-initial-mode = <0>;
304                         };
305
306                         v1v8_audio: ldo1 {
307                                 regulator-name = "v1v8_audio";
308                                 regulator-min-microvolt = <1800000>;
309                                 regulator-max-microvolt = <1800000>;
310                                 regulator-always-on;
311                                 interrupts = <IT_CURLIM_LDO1 0>;
312                         };
313
314                         v3v3_hdmi: ldo2 {
315                                 regulator-name = "v3v3_hdmi";
316                                 regulator-min-microvolt = <3300000>;
317                                 regulator-max-microvolt = <3300000>;
318                                 regulator-always-on;
319                                 interrupts = <IT_CURLIM_LDO2 0>;
320                         };
321
322                         vtt_ddr: ldo3 {
323                                 regulator-name = "vtt_ddr";
324                                 regulator-min-microvolt = <500000>;
325                                 regulator-max-microvolt = <750000>;
326                                 regulator-always-on;
327                                 regulator-over-current-protection;
328                         };
329
330                         vdd_usb: ldo4 {
331                                 regulator-name = "vdd_usb";
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                         };
355
356                          bst_out: boost {
357                                 regulator-name = "bst_out";
358                                 interrupts = <IT_OCP_BOOST 0>;
359                          };
360
361                         vbus_otg: pwr_sw1 {
362                                 regulator-name = "vbus_otg";
363                                 interrupts = <IT_OCP_OTG 0>;
364                          };
365
366                          vbus_sw: pwr_sw2 {
367                                 regulator-name = "vbus_sw";
368                                 interrupts = <IT_OCP_SWOUT 0>;
369                                 regulator-active-discharge = <1>;
370                          };
371                 };
372
373                 onkey {
374                         compatible = "st,stpmic1-onkey";
375                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
376                         interrupt-names = "onkey-falling", "onkey-rising";
377                         power-off-time-sec = <10>;
378                         status = "okay";
379                 };
380
381                 watchdog {
382                         compatible = "st,stpmic1-wdt";
383                         status = "disabled";
384                 };
385         };
386 };
387
388 &i2s2 {
389         clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
390         clock-names = "pclk", "i2sclk", "x8k", "x11k";
391         pinctrl-names = "default", "sleep";
392         pinctrl-0 = <&i2s2_pins_a>;
393         pinctrl-1 = <&i2s2_pins_sleep_a>;
394         status = "okay";
395
396         i2s2_port: port {
397                 i2s2_endpoint: endpoint {
398                         remote-endpoint = <&sii9022_tx_endpoint>;
399                         format = "i2s";
400                         mclk-fs = <256>;
401                 };
402         };
403 };
404
405 &ipcc {
406         status = "okay";
407 };
408
409 &iwdg2 {
410         timeout-sec = <32>;
411         status = "okay";
412 };
413
414 &ltdc {
415         pinctrl-names = "default", "sleep";
416         pinctrl-0 = <&ltdc_pins_a>;
417         pinctrl-1 = <&ltdc_pins_sleep_a>;
418         status = "okay";
419
420         port {
421                 #address-cells = <1>;
422                 #size-cells = <0>;
423
424                 ltdc_ep0_out: endpoint@0 {
425                         reg = <0>;
426                         remote-endpoint = <&sii9022_in>;
427                 };
428         };
429 };
430
431 &m4_rproc {
432         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
433                         <&vdev0vring1>, <&vdev0buffer>;
434         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
435         mbox-names = "vq0", "vq1", "shutdown";
436         interrupt-parent = <&exti>;
437         interrupts = <68 1>;
438         status = "okay";
439 };
440
441 &pwr_regulators {
442         vdd-supply = <&vdd>;
443         vdd_3v3_usbfs-supply = <&vdd_usb>;
444 };
445
446 &rng1 {
447         status = "okay";
448 };
449
450 &rtc {
451         status = "okay";
452 };
453
454 &sai2 {
455         clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
456         clock-names = "pclk", "x8k", "x11k";
457         pinctrl-names = "default", "sleep";
458         pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
459         pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
460         status = "okay";
461
462         sai2a: audio-controller@4400b004 {
463                 #clock-cells = <0>;
464                 dma-names = "tx";
465                 clocks = <&rcc SAI2_K>;
466                 clock-names = "sai_ck";
467                 status = "okay";
468
469                 sai2a_port: port {
470                         sai2a_endpoint: endpoint {
471                                 remote-endpoint = <&cs42l51_tx_endpoint>;
472                                 format = "i2s";
473                                 mclk-fs = <256>;
474                                 dai-tdm-slot-num = <2>;
475                                 dai-tdm-slot-width = <32>;
476                         };
477                 };
478         };
479
480         sai2b: audio-controller@4400b024 {
481                 dma-names = "rx";
482                 st,sync = <&sai2a 2>;
483                 clocks = <&rcc SAI2_K>, <&sai2a>;
484                 clock-names = "sai_ck", "MCLK";
485                 status = "okay";
486
487                 sai2b_port: port {
488                         sai2b_endpoint: endpoint {
489                                 remote-endpoint = <&cs42l51_rx_endpoint>;
490                                 format = "i2s";
491                                 mclk-fs = <256>;
492                                 dai-tdm-slot-num = <2>;
493                                 dai-tdm-slot-width = <32>;
494                         };
495                 };
496         };
497 };
498
499 &sdmmc1 {
500         pinctrl-names = "default", "opendrain", "sleep";
501         pinctrl-0 = <&sdmmc1_b4_pins_a>;
502         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
503         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
504         cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
505         disable-wp;
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 };