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