Merge tag 'spi-fix-v5.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp15xx-dhcom-som.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2 /*
3  * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
4  */
5
6 #include "stm32mp15-pinctrl.dtsi"
7 #include "stm32mp15xxaa-pinctrl.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/mfd/st,stpmic1.h>
10
11 / {
12         aliases {
13                 ethernet0 = &ethernet0;
14                 ethernet1 = &ksz8851;
15         };
16
17         memory@c0000000 {
18                 device_type = "memory";
19                 reg = <0xC0000000 0x40000000>;
20         };
21
22         reserved-memory {
23                 #address-cells = <1>;
24                 #size-cells = <1>;
25                 ranges;
26
27                 mcuram2: mcuram2@10000000 {
28                         compatible = "shared-dma-pool";
29                         reg = <0x10000000 0x40000>;
30                         no-map;
31                 };
32
33                 vdev0vring0: vdev0vring0@10040000 {
34                         compatible = "shared-dma-pool";
35                         reg = <0x10040000 0x1000>;
36                         no-map;
37                 };
38
39                 vdev0vring1: vdev0vring1@10041000 {
40                         compatible = "shared-dma-pool";
41                         reg = <0x10041000 0x1000>;
42                         no-map;
43                 };
44
45                 vdev0buffer: vdev0buffer@10042000 {
46                         compatible = "shared-dma-pool";
47                         reg = <0x10042000 0x4000>;
48                         no-map;
49                 };
50
51                 mcuram: mcuram@30000000 {
52                         compatible = "shared-dma-pool";
53                         reg = <0x30000000 0x40000>;
54                         no-map;
55                 };
56
57                 retram: retram@38000000 {
58                         compatible = "shared-dma-pool";
59                         reg = <0x38000000 0x10000>;
60                         no-map;
61                 };
62         };
63
64         ethernet_vio: vioregulator {
65                 compatible = "regulator-fixed";
66                 regulator-name = "vio";
67                 regulator-min-microvolt = <3300000>;
68                 regulator-max-microvolt = <3300000>;
69                 gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
70                 regulator-always-on;
71                 regulator-boot-on;
72                 vin-supply = <&vdd>;
73         };
74 };
75
76 &adc {
77         vdd-supply = <&vdd>;
78         vdda-supply = <&vdda>;
79         vref-supply = <&vdda>;
80         status = "okay";
81
82         adc1: adc@0 {
83                 st,min-sample-time-nsecs = <5000>;
84                 st,adc-channels = <0>;
85                 status = "okay";
86         };
87
88         adc2: adc@100 {
89                 st,adc-channels = <1>;
90                 st,min-sample-time-nsecs = <5000>;
91                 status = "okay";
92         };
93 };
94
95 &crc1 {
96         status = "okay";
97 };
98
99 &dac {
100         pinctrl-names = "default";
101         pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
102         vref-supply = <&vdda>;
103         status = "okay";
104
105         dac1: dac@1 {
106                 status = "okay";
107         };
108         dac2: dac@2 {
109                 status = "okay";
110         };
111 };
112
113 &dts {
114         status = "okay";
115 };
116
117 &ethernet0 {
118         status = "okay";
119         pinctrl-0 = <&ethernet0_rmii_pins_a>;
120         pinctrl-1 = <&ethernet0_rmii_sleep_pins_a>;
121         pinctrl-names = "default", "sleep";
122         phy-mode = "rmii";
123         max-speed = <100>;
124         phy-handle = <&phy0>;
125         st,eth-ref-clk-sel;
126
127         mdio0 {
128                 #address-cells = <1>;
129                 #size-cells = <0>;
130                 compatible = "snps,dwmac-mdio";
131
132                 phy0: ethernet-phy@1 {
133                         reg = <1>;
134                         /* LAN8710Ai */
135                         compatible = "ethernet-phy-id0007.c0f0",
136                                      "ethernet-phy-ieee802.3-c22";
137                         clocks = <&rcc ETHCK_K>;
138                         reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
139                         reset-assert-us = <500>;
140                         reset-deassert-us = <500>;
141                         interrupt-parent = <&gpioi>;
142                         interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
143                 };
144         };
145 };
146
147 &fmc {
148         pinctrl-names = "default", "sleep";
149         pinctrl-0 = <&fmc_pins_b>;
150         pinctrl-1 = <&fmc_sleep_pins_b>;
151         status = "okay";
152
153         ksz8851: ethernet@1,0 {
154                 compatible = "micrel,ks8851-mll";
155                 reg = <1 0x0 0x2>, <1 0x2 0x20000>;
156                 interrupt-parent = <&gpioc>;
157                 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
158                 bank-width = <2>;
159
160                 /* Timing values are in nS */
161                 st,fmc2-ebi-cs-mux-enable;
162                 st,fmc2-ebi-cs-transaction-type = <4>;
163                 st,fmc2-ebi-cs-buswidth = <16>;
164                 st,fmc2-ebi-cs-address-setup-ns = <5>;
165                 st,fmc2-ebi-cs-address-hold-ns = <5>;
166                 st,fmc2-ebi-cs-bus-turnaround-ns = <5>;
167                 st,fmc2-ebi-cs-data-setup-ns = <45>;
168                 st,fmc2-ebi-cs-data-hold-ns = <1>;
169                 st,fmc2-ebi-cs-write-address-setup-ns = <5>;
170                 st,fmc2-ebi-cs-write-address-hold-ns = <5>;
171                 st,fmc2-ebi-cs-write-bus-turnaround-ns = <5>;
172                 st,fmc2-ebi-cs-write-data-setup-ns = <45>;
173                 st,fmc2-ebi-cs-write-data-hold-ns = <1>;
174         };
175 };
176
177 &gpioa {
178         gpio-line-names = "", "", "", "",
179                           "", "", "DHCOM-K", "",
180                           "", "", "", "",
181                           "", "", "", "";
182 };
183
184 &gpiob {
185         gpio-line-names = "", "", "", "",
186                           "", "", "", "",
187                           "DHCOM-Q", "", "", "",
188                           "", "", "", "";
189 };
190
191 &gpioc {
192         gpio-line-names = "", "", "", "",
193                           "", "", "DHCOM-E", "",
194                           "", "", "", "",
195                           "", "", "", "";
196         status = "okay";
197 };
198
199 &gpiod {
200         gpio-line-names = "", "", "", "",
201                           "", "", "DHCOM-B", "",
202                           "", "", "", "DHCOM-F",
203                           "DHCOM-D", "", "", "";
204 };
205
206 &gpioe {
207         gpio-line-names = "", "", "", "",
208                           "", "", "DHCOM-P", "",
209                           "", "", "", "",
210                           "", "", "", "";
211 };
212
213 &gpiof {
214         gpio-line-names = "", "", "", "DHCOM-A",
215                           "", "", "", "",
216                           "", "", "", "",
217                           "", "", "", "";
218 };
219
220 &gpiog {
221         gpio-line-names = "DHCOM-C", "", "", "",
222                           "", "", "", "",
223                           "DHCOM-L", "", "", "",
224                           "", "", "", "";
225 };
226
227 &gpioh {
228         gpio-line-names = "", "", "", "",
229                           "", "", "", "DHCOM-N",
230                           "DHCOM-J", "DHCOM-W", "DHCOM-V", "DHCOM-U",
231                           "DHCOM-T", "", "DHCOM-S", "";
232 };
233
234 &gpioi {
235         gpio-line-names = "DHCOM-G", "DHCOM-O", "DHCOM-H", "DHCOM-I",
236                           "DHCOM-R", "DHCOM-M", "", "",
237                           "", "", "", "",
238                           "", "", "", "";
239 };
240
241 &i2c4 {
242         pinctrl-names = "default";
243         pinctrl-0 = <&i2c4_pins_a>;
244         i2c-scl-rising-time-ns = <185>;
245         i2c-scl-falling-time-ns = <20>;
246         status = "okay";
247         /* spare dmas for other usage */
248         /delete-property/dmas;
249         /delete-property/dma-names;
250
251         rtc@32 {
252                 compatible = "microcrystal,rv8803";
253                 reg = <0x32>;
254         };
255
256         pmic: stpmic@33 {
257                 compatible = "st,stpmic1";
258                 reg = <0x33>;
259                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
260                 interrupt-controller;
261                 #interrupt-cells = <2>;
262                 status = "okay";
263
264                 regulators {
265                         compatible = "st,stpmic1-regulators";
266                         ldo1-supply = <&v3v3>;
267                         ldo2-supply = <&v3v3>;
268                         ldo3-supply = <&vdd_ddr>;
269                         ldo5-supply = <&v3v3>;
270                         ldo6-supply = <&v3v3>;
271                         pwr_sw1-supply = <&bst_out>;
272                         pwr_sw2-supply = <&bst_out>;
273
274                         vddcore: buck1 {
275                                 regulator-name = "vddcore";
276                                 regulator-min-microvolt = <800000>;
277                                 regulator-max-microvolt = <1350000>;
278                                 regulator-always-on;
279                                 regulator-initial-mode = <0>;
280                                 regulator-over-current-protection;
281                         };
282
283                         vdd_ddr: buck2 {
284                                 regulator-name = "vdd_ddr";
285                                 regulator-min-microvolt = <1350000>;
286                                 regulator-max-microvolt = <1350000>;
287                                 regulator-always-on;
288                                 regulator-initial-mode = <0>;
289                                 regulator-over-current-protection;
290                         };
291
292                         vdd: buck3 {
293                                 regulator-name = "vdd";
294                                 regulator-min-microvolt = <3300000>;
295                                 regulator-max-microvolt = <3300000>;
296                                 regulator-always-on;
297                                 st,mask-reset;
298                                 regulator-initial-mode = <0>;
299                                 regulator-over-current-protection;
300                         };
301
302                         v3v3: buck4 {
303                                 regulator-name = "v3v3";
304                                 regulator-min-microvolt = <3300000>;
305                                 regulator-max-microvolt = <3300000>;
306                                 regulator-always-on;
307                                 regulator-over-current-protection;
308                                 regulator-initial-mode = <0>;
309                         };
310
311                         vdda: ldo1 {
312                                 regulator-name = "vdda";
313                                 regulator-always-on;
314                                 regulator-min-microvolt = <2900000>;
315                                 regulator-max-microvolt = <2900000>;
316                                 interrupts = <IT_CURLIM_LDO1 0>;
317                         };
318
319                         v2v8: ldo2 {
320                                 regulator-name = "v2v8";
321                                 regulator-min-microvolt = <2800000>;
322                                 regulator-max-microvolt = <2800000>;
323                                 interrupts = <IT_CURLIM_LDO2 0>;
324                         };
325
326                         vtt_ddr: ldo3 {
327                                 regulator-name = "vtt_ddr";
328                                 regulator-min-microvolt = <500000>;
329                                 regulator-max-microvolt = <750000>;
330                                 regulator-always-on;
331                                 regulator-over-current-protection;
332                         };
333
334                         vdd_usb: ldo4 {
335                                 regulator-name = "vdd_usb";
336                                 interrupts = <IT_CURLIM_LDO4 0>;
337                         };
338
339                         vdd_sd: ldo5 {
340                                 regulator-name = "vdd_sd";
341                                 regulator-min-microvolt = <2900000>;
342                                 regulator-max-microvolt = <2900000>;
343                                 interrupts = <IT_CURLIM_LDO5 0>;
344                                 regulator-boot-on;
345                         };
346
347                         v1v8: ldo6 {
348                                 regulator-name = "v1v8";
349                                 regulator-min-microvolt = <1800000>;
350                                 regulator-max-microvolt = <1800000>;
351                                 interrupts = <IT_CURLIM_LDO6 0>;
352                         };
353
354                         vref_ddr: vref_ddr {
355                                 regulator-name = "vref_ddr";
356                                 regulator-always-on;
357                         };
358
359                         bst_out: boost {
360                                 regulator-name = "bst_out";
361                                 interrupts = <IT_OCP_BOOST 0>;
362                         };
363
364                         vbus_otg: pwr_sw1 {
365                                 regulator-name = "vbus_otg";
366                                 interrupts = <IT_OCP_OTG 0>;
367                         };
368
369                         vbus_sw: pwr_sw2 {
370                                 regulator-name = "vbus_sw";
371                                 interrupts = <IT_OCP_SWOUT 0>;
372                                 regulator-active-discharge = <1>;
373                         };
374                 };
375
376                 onkey {
377                         compatible = "st,stpmic1-onkey";
378                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
379                         interrupt-names = "onkey-falling", "onkey-rising";
380                         power-off-time-sec = <10>;
381                         status = "okay";
382                 };
383
384                 watchdog {
385                         compatible = "st,stpmic1-wdt";
386                         status = "disabled";
387                 };
388         };
389
390         touchscreen@49 {
391                 compatible = "ti,tsc2004";
392                 reg = <0x49>;
393                 vio-supply = <&v3v3>;
394                 interrupts-extended = <&gpioh 15 IRQ_TYPE_EDGE_FALLING>;
395         };
396
397         eeprom@50 {
398                 compatible = "atmel,24c02";
399                 reg = <0x50>;
400                 pagesize = <16>;
401         };
402 };
403
404 &ipcc {
405         status = "okay";
406 };
407
408 &iwdg2 {
409         timeout-sec = <32>;
410         status = "okay";
411 };
412
413 &m4_rproc {
414         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
415                         <&vdev0vring1>, <&vdev0buffer>;
416         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
417         mbox-names = "vq0", "vq1", "shutdown";
418         interrupt-parent = <&exti>;
419         interrupts = <68 1>;
420         status = "okay";
421 };
422
423 &pwr_regulators {
424         vdd-supply = <&vdd>;
425         vdd_3v3_usbfs-supply = <&vdd_usb>;
426 };
427
428 &qspi {
429         pinctrl-names = "default", "sleep";
430         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
431         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
432         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
433         #address-cells = <1>;
434         #size-cells = <0>;
435         status = "okay";
436
437         flash0: flash@0 {
438                 compatible = "jedec,spi-nor";
439                 reg = <0>;
440                 spi-rx-bus-width = <4>;
441                 spi-max-frequency = <108000000>;
442                 #address-cells = <1>;
443                 #size-cells = <1>;
444         };
445 };
446
447 &rng1 {
448         status = "okay";
449 };
450
451 &rtc {
452         status = "okay";
453 };
454
455 &sdmmc1 {
456         pinctrl-names = "default", "opendrain", "sleep", "init";
457         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
458         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
459         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
460         pinctrl-3 = <&sdmmc1_b4_init_pins_a &sdmmc1_dir_init_pins_a>;
461         cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
462         disable-wp;
463         st,sig-dir;
464         st,neg-edge;
465         st,use-ckin;
466         st,cmd-gpios = <&gpiod 2 0>;
467         st,ck-gpios = <&gpioc 12 0>;
468         st,ckin-gpios = <&gpioe 4 0>;
469         bus-width = <4>;
470         vmmc-supply = <&vdd_sd>;
471         status = "okay";
472 };
473
474 &sdmmc1_b4_pins_a {
475         /*
476          * SD bus pull-up resistors:
477          * - optional on SoMs with SD voltage translator
478          * - mandatory on SoMs without SD voltage translator
479          */
480         pins1 {
481                 bias-pull-up;
482         };
483         pins2 {
484                 bias-pull-up;
485         };
486 };
487
488 &sdmmc2 {
489         pinctrl-names = "default", "opendrain", "sleep";
490         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
491         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
492         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
493         non-removable;
494         no-sd;
495         no-sdio;
496         st,neg-edge;
497         bus-width = <8>;
498         vmmc-supply = <&v3v3>;
499         vqmmc-supply = <&v3v3>;
500         mmc-ddr-3_3v;
501         status = "okay";
502 };
503
504 &sdmmc3 {
505         pinctrl-names = "default", "opendrain", "sleep";
506         pinctrl-0 = <&sdmmc3_b4_pins_a>;
507         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
508         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
509         broken-cd;
510         st,neg-edge;
511         bus-width = <4>;
512         vmmc-supply = <&v3v3>;
513         vqmmc-supply = <&v3v3>;
514         mmc-ddr-3_3v;
515         status = "okay";
516 };
517
518 &uart4 {
519         pinctrl-names = "default";
520         pinctrl-0 = <&uart4_pins_a>;
521         status = "okay";
522 };