blob: dafcce4323910985b5682df7b97317b2ff54b348 [file] [log] [blame]
Marek Vasut19953732020-01-24 18:39:16 +01001// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2019 Marek Vasut <marex@denx.de>
4 */
5/dts-v1/;
6
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +01007#include "stm32mp157.dtsi"
8#include "stm32mp15xc.dtsi"
9#include "stm32mp15-pinctrl.dtsi"
10#include "stm32mp15xxaa-pinctrl.dtsi"
Marek Vasut19953732020-01-24 18:39:16 +010011#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/mfd/st,stpmic1.h>
13
14/ {
Marek Vasutf19312e2020-03-31 19:51:29 +020015 aliases {
16 eeprom0 = &eeprom0;
Marek Vasut8791cf02020-07-25 16:50:55 +020017 ethernet0 = &ethernet0;
Marek Vasutf19312e2020-03-31 19:51:29 +020018 };
19
Marek Vasut19953732020-01-24 18:39:16 +010020 memory@c0000000 {
21 device_type = "memory";
22 reg = <0xC0000000 0x40000000>;
23 };
Marek Vasut8791cf02020-07-25 16:50:55 +020024
25 ethernet_vio: vioregulator {
26 compatible = "regulator-fixed";
27 regulator-name = "vio";
28 regulator-min-microvolt = <3300000>;
29 regulator-max-microvolt = <3300000>;
30 gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
31 regulator-always-on;
32 regulator-boot-on;
33 };
Marek Vasut19953732020-01-24 18:39:16 +010034};
35
36&cec {
37 pinctrl-names = "default";
38 pinctrl-0 = <&cec_pins_a>;
39 status = "okay";
40};
41
42&dcmi {
43 status = "okay";
44 pinctrl-names = "default", "sleep";
45 pinctrl-0 = <&dcmi_pins_a>;
46 pinctrl-1 = <&dcmi_sleep_pins_a>;
47};
48
49&dts {
50 status = "okay";
51};
52
Marek Vasut8791cf02020-07-25 16:50:55 +020053&ethernet0 {
54 status = "okay";
55 pinctrl-0 = <&ethernet0_rmii_pins_a>;
56 pinctrl-1 = <&ethernet0_rmii_pins_sleep_a>;
57 pinctrl-names = "default", "sleep";
58 phy-mode = "rmii";
59 max-speed = <100>;
60 phy-handle = <&phy0>;
61 st,eth_ref_clk_sel;
62 phy-reset-gpios = <&gpioh 15 GPIO_ACTIVE_LOW>;
63
64 mdio0 {
65 #address-cells = <1>;
66 #size-cells = <0>;
67 compatible = "snps,dwmac-mdio";
68
69 phy0: ethernet-phy@1 {
70 reg = <1>;
71 };
72 };
73};
74
Marek Vasut19953732020-01-24 18:39:16 +010075&i2c2 {
76 pinctrl-names = "default";
77 pinctrl-0 = <&i2c2_pins_a>;
78 i2c-scl-rising-time-ns = <185>;
79 i2c-scl-falling-time-ns = <20>;
80 status = "okay";
81};
82
83&i2c4 {
84 pinctrl-names = "default";
85 pinctrl-0 = <&i2c4_pins_a>;
86 i2c-scl-rising-time-ns = <185>;
87 i2c-scl-falling-time-ns = <20>;
88 status = "okay";
89 /* spare dmas for other usage */
90 /delete-property/dmas;
91 /delete-property/dma-names;
92
93 pmic: stpmic@33 {
94 compatible = "st,stpmic1";
95 reg = <0x33>;
96 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
97 interrupt-controller;
98 #interrupt-cells = <2>;
99 status = "okay";
100
101 regulators {
102 compatible = "st,stpmic1-regulators";
103 ldo1-supply = <&v3v3>;
104 ldo2-supply = <&v3v3>;
105 ldo3-supply = <&vdd_ddr>;
106 ldo5-supply = <&v3v3>;
107 ldo6-supply = <&v3v3>;
108 pwr_sw1-supply = <&bst_out>;
109 pwr_sw2-supply = <&bst_out>;
110
111 vddcore: buck1 {
112 regulator-name = "vddcore";
113 regulator-min-microvolt = <800000>;
114 regulator-max-microvolt = <1350000>;
115 regulator-always-on;
116 regulator-initial-mode = <0>;
117 regulator-over-current-protection;
118 };
119
120 vdd_ddr: buck2 {
121 regulator-name = "vdd_ddr";
122 regulator-min-microvolt = <1350000>;
123 regulator-max-microvolt = <1350000>;
124 regulator-always-on;
125 regulator-initial-mode = <0>;
126 regulator-over-current-protection;
127 };
128
129 vdd: buck3 {
130 regulator-name = "vdd";
131 regulator-min-microvolt = <3300000>;
132 regulator-max-microvolt = <3300000>;
133 regulator-always-on;
134 st,mask-reset;
135 regulator-initial-mode = <0>;
136 regulator-over-current-protection;
137 };
138
139 v3v3: buck4 {
140 regulator-name = "v3v3";
141 regulator-min-microvolt = <3300000>;
142 regulator-max-microvolt = <3300000>;
143 regulator-always-on;
144 regulator-over-current-protection;
145 regulator-initial-mode = <0>;
146 };
147
148 vdda: ldo1 {
149 regulator-name = "vdda";
150 regulator-min-microvolt = <2900000>;
151 regulator-max-microvolt = <2900000>;
152 interrupts = <IT_CURLIM_LDO1 0>;
153 };
154
155 v2v8: ldo2 {
156 regulator-name = "v2v8";
157 regulator-min-microvolt = <2800000>;
158 regulator-max-microvolt = <2800000>;
159 interrupts = <IT_CURLIM_LDO2 0>;
160 };
161
162 vtt_ddr: ldo3 {
163 regulator-name = "vtt_ddr";
164 regulator-min-microvolt = <500000>;
165 regulator-max-microvolt = <750000>;
166 regulator-always-on;
167 regulator-over-current-protection;
168 };
169
170 vdd_usb: ldo4 {
171 regulator-name = "vdd_usb";
172 regulator-min-microvolt = <3300000>;
173 regulator-max-microvolt = <3300000>;
174 interrupts = <IT_CURLIM_LDO4 0>;
175 };
176
177 vdd_sd: ldo5 {
178 regulator-name = "vdd_sd";
179 regulator-min-microvolt = <2900000>;
180 regulator-max-microvolt = <2900000>;
181 interrupts = <IT_CURLIM_LDO5 0>;
182 regulator-boot-on;
183 };
184
185 v1v8: ldo6 {
186 regulator-name = "v1v8";
187 regulator-min-microvolt = <1800000>;
188 regulator-max-microvolt = <1800000>;
189 interrupts = <IT_CURLIM_LDO6 0>;
190 };
191
192 vref_ddr: vref_ddr {
193 regulator-name = "vref_ddr";
194 regulator-always-on;
195 regulator-over-current-protection;
196 };
197
198 bst_out: boost {
199 regulator-name = "bst_out";
200 interrupts = <IT_OCP_BOOST 0>;
201 };
202
203 vbus_otg: pwr_sw1 {
204 regulator-name = "vbus_otg";
205 interrupts = <IT_OCP_OTG 0>;
206 };
207
208 vbus_sw: pwr_sw2 {
209 regulator-name = "vbus_sw";
210 interrupts = <IT_OCP_SWOUT 0>;
211 regulator-active-discharge;
212 };
213 };
214
215 onkey {
216 compatible = "st,stpmic1-onkey";
217 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
218 interrupt-names = "onkey-falling", "onkey-rising";
219 power-off-time-sec = <10>;
220 status = "okay";
221 };
222
223 watchdog {
224 compatible = "st,stpmic1-wdt";
225 status = "disabled";
226 };
227 };
228
Marek Vasutf19312e2020-03-31 19:51:29 +0200229 eeprom0: eeprom@50 {
Marek Vasut19953732020-01-24 18:39:16 +0100230 compatible = "atmel,24c02";
231 reg = <0x50>;
232 pagesize = <16>;
233 };
234};
235
236&i2c5 {
237 pinctrl-names = "default";
238 pinctrl-0 = <&i2c5_pins_a>;
239 i2c-scl-rising-time-ns = <185>;
240 i2c-scl-falling-time-ns = <20>;
241 status = "okay";
242};
243
244&ipcc {
245 status = "okay";
246};
247
248&iwdg2 {
249 timeout-sec = <32>;
250 status = "okay";
251};
252
253&m4_rproc {
254 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
255 mbox-names = "vq0", "vq1", "shutdown";
256 status = "okay";
257};
258
Patrick Delaunay7915b992020-01-28 10:10:59 +0100259&pwr_regulators {
260 vdd-supply = <&vdd>;
261 vdd_3v3_usbfs-supply = <&vdd_usb>;
Marek Vasut19953732020-01-24 18:39:16 +0100262};
263
Marek Vasut8791cf02020-07-25 16:50:55 +0200264&pinctrl {
265 ethernet0_rmii_pins_a: rmii-0 {
266 pins1 {
267 pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */
268 <STM32_PINMUX('G', 14, AF11)>, /* ETH1_RMII_TXD1 */
269 <STM32_PINMUX('B', 11, AF11)>, /* ETH1_RMII_TX_EN */
270 <STM32_PINMUX('A', 1, AF0)>, /* ETH1_RMII_REF_CLK */
271 <STM32_PINMUX('A', 2, AF11)>, /* ETH1_MDIO */
272 <STM32_PINMUX('C', 1, AF11)>; /* ETH1_MDC */
273 bias-disable;
274 drive-push-pull;
275 slew-rate = <2>;
276 };
277 pins2 {
278 pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH1_RMII_RXD0 */
279 <STM32_PINMUX('C', 5, AF11)>, /* ETH1_RMII_RXD1 */
280 <STM32_PINMUX('A', 7, AF11)>; /* ETH1_RMII_CRS_DV */
281 bias-disable;
282 };
283 };
284
285 ethernet0_rmii_pins_sleep_a: rmii-sleep-0 {
286 pins1 {
287 pinmux = <STM32_PINMUX('G', 13, ANALOG)>, /* ETH1_RMII_TXD0 */
288 <STM32_PINMUX('G', 14, ANALOG)>, /* ETH1_RMII_TXD1 */
289 <STM32_PINMUX('B', 11, ANALOG)>, /* ETH1_RMII_TX_EN */
290 <STM32_PINMUX('A', 2, ANALOG)>, /* ETH1_MDIO */
291 <STM32_PINMUX('C', 1, ANALOG)>, /* ETH1_MDC */
292 <STM32_PINMUX('C', 4, ANALOG)>, /* ETH1_RMII_RXD0 */
293 <STM32_PINMUX('C', 5, ANALOG)>, /* ETH1_RMII_RXD1 */
294 <STM32_PINMUX('A', 1, ANALOG)>, /* ETH1_RMII_REF_CLK */
295 <STM32_PINMUX('A', 7, ANALOG)>; /* ETH1_RMII_CRS_DV */
296 };
297 };
298};
299
Marek Vasut19953732020-01-24 18:39:16 +0100300&qspi {
301 pinctrl-names = "default", "sleep";
Marek Vasut34d573f2020-10-28 21:37:59 +0100302 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
303 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
Marek Vasut19953732020-01-24 18:39:16 +0100304 reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
305 #address-cells = <1>;
306 #size-cells = <0>;
307 status = "okay";
308
309 flash0: mx66l51235l@0 {
310 compatible = "jedec,spi-nor";
311 reg = <0>;
312 spi-rx-bus-width = <4>;
313 spi-max-frequency = <108000000>;
314 #address-cells = <1>;
315 #size-cells = <1>;
316 };
Marek Vasut19953732020-01-24 18:39:16 +0100317};
318
319&rng1 {
320 status = "okay";
321};
322
323&rtc {
324 status = "okay";
325};
326
327&sdmmc1 {
328 pinctrl-names = "default", "opendrain", "sleep";
329 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
330 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
331 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
Marek Vasut64af7c32020-10-28 21:38:21 +0100332 cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Patrick Delaunay1b28a5e2020-04-30 15:52:46 +0200333 disable-wp;
Marek Vasut19953732020-01-24 18:39:16 +0100334 st,sig-dir;
335 st,neg-edge;
Marek Vasut19953732020-01-24 18:39:16 +0100336 bus-width = <4>;
337 vmmc-supply = <&vdd_sd>;
338 status = "okay";
339};
340
Marek Vasut845c6722020-12-01 11:29:17 +0100341&sdmmc1_b4_pins_a {
342 /*
343 * SD bus pull-up resistors:
344 * - optional on SoMs with SD voltage translator
345 * - mandatory on SoMs without SD voltage translator
346 */
347 pins1 {
348 bias-pull-up;
349 };
350 pins2 {
351 bias-pull-up;
352 };
353};
354
Marek Vasut19953732020-01-24 18:39:16 +0100355&sdmmc2 {
356 pinctrl-names = "default";
357 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
358 non-removable;
359 no-sd;
360 no-sdio;
361 st,sig-dir;
362 st,neg-edge;
363 bus-width = <8>;
364 vmmc-supply = <&v3v3>;
365 status = "okay";
366};
367
368&spi1 {
369 pinctrl-names = "default";
370 pinctrl-0 = <&spi1_pins_a>;
371 status = "disabled";
372};
373
374&timers2 {
375 /* spare dmas for other usage (un-delete to enable pwm capture) */
376 /delete-property/dmas;
377 /delete-property/dma-names;
378 status = "disabled";
379 pwm {
380 pinctrl-0 = <&pwm2_pins_a>;
381 pinctrl-names = "default";
382 status = "okay";
383 };
384 timer@1 {
385 status = "okay";
386 };
387};
388
389&timers6 {
390 status = "okay";
391 /* spare dmas for other usage */
392 /delete-property/dmas;
393 /delete-property/dma-names;
394 timer@5 {
395 status = "okay";
396 };
397};
398
399&timers8 {
400 /delete-property/dmas;
401 /delete-property/dma-names;
402 status = "disabled";
403 pwm {
404 pinctrl-0 = <&pwm8_pins_a>;
405 pinctrl-names = "default";
406 status = "okay";
407 };
408 timer@7 {
409 status = "okay";
410 };
411};
412
413&timers12 {
414 /delete-property/dmas;
415 /delete-property/dma-names;
416 status = "disabled";
417 pwm {
418 pinctrl-0 = <&pwm12_pins_a>;
419 pinctrl-names = "default";
420 status = "okay";
421 };
422 timer@11 {
423 status = "okay";
424 };
425};
426
427&uart4 {
428 pinctrl-names = "default";
429 pinctrl-0 = <&uart4_pins_a>;
430 status = "okay";
431};
432
433&usbh_ehci {
434 phys = <&usbphyc_port0>;
435 phy-names = "usb";
436 status = "okay";
437};
438
439&usbotg_hs {
440 dr_mode = "peripheral";
441 phys = <&usbphyc_port1 0>;
442 phy-names = "usb2-phy";
443 vbus-supply = <&vbus_otg>;
444 status = "okay";
445};
446
447&usbphyc {
448 status = "okay";
449};
450
451&usbphyc_port0 {
452 phy-supply = <&vdd_usb>;
453};
454
455&usbphyc_port1 {
456 phy-supply = <&vdd_usb>;
457};