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