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