blob: dc61bfc3d5abd411b51107bfa11597342fa902f6 [file] [log] [blame]
Patrice Chotard23661602019-02-12 16:50:38 +01001// 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/dts-v1/;
8
9#include "stm32mp157c.dtsi"
Patrick Delaunayfe915332019-07-30 19:16:12 +020010#include "stm32mp157xac-pinctrl.dtsi"
Patrice Chotard23661602019-02-12 16:50:38 +010011#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/mfd/st,stpmic1.h>
13
14/ {
15 model = "STMicroelectronics STM32MP157A-DK1 Discovery Board";
16 compatible = "st,stm32mp157a-dk1", "st,stm32mp157";
17
18 aliases {
19 ethernet0 = &ethernet0;
20 serial0 = &uart4;
21 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
27 memory@c0000000 {
28 reg = <0xc0000000 0x20000000>;
29 };
30
Patrick Delaunayfe915332019-07-30 19:16:12 +020031 reserved-memory {
32 #address-cells = <1>;
33 #size-cells = <1>;
34 ranges;
35
Patrick Delaunay62d620c2019-11-06 16:16:33 +010036 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
Patrick Delaunayfe915332019-07-30 19:16:12 +020072 gpu_reserved: gpu@d4000000 {
73 reg = <0xd4000000 0x4000000>;
74 no-map;
75 };
76 };
77
Patrice Chotard23661602019-02-12 16:50:38 +010078 led {
79 compatible = "gpio-leds";
80 blue {
81 label = "heartbeat";
82 gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
83 linux,default-trigger = "heartbeat";
84 default-state = "off";
85 };
86 };
Patrick Delaunay62d620c2019-11-06 16:16:33 +010087
88 sound {
89 compatible = "audio-graph-card";
90 label = "STM32MP1-DK";
91 routing =
92 "Playback" , "MCLK",
93 "Capture" , "MCLK",
94 "MICL" , "Mic Bias";
95 dais = <&sai2a_port &sai2b_port>;
96 status = "okay";
97 };
Patrice Chotard23661602019-02-12 16:50:38 +010098};
99
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200100&cec {
101 pinctrl-names = "default", "sleep";
102 pinctrl-0 = <&cec_pins_b>;
103 pinctrl-1 = <&cec_pins_sleep_b>;
104 status = "okay";
105};
106
Patrice Chotard23661602019-02-12 16:50:38 +0100107&ethernet0 {
108 status = "okay";
109 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
110 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
111 pinctrl-names = "default", "sleep";
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200112 phy-mode = "rgmii-id";
Patrice Chotard23661602019-02-12 16:50:38 +0100113 max-speed = <1000>;
114 phy-handle = <&phy0>;
115
116 mdio0 {
117 #address-cells = <1>;
118 #size-cells = <0>;
119 compatible = "snps,dwmac-mdio";
120 phy0: ethernet-phy@0 {
121 reg = <0>;
122 };
123 };
124};
125
Patrick Delaunayfe915332019-07-30 19:16:12 +0200126&gpu {
127 contiguous-area = <&gpu_reserved>;
128 status = "okay";
129};
130
131&i2c1 {
132 pinctrl-names = "default", "sleep";
133 pinctrl-0 = <&i2c1_pins_a>;
134 pinctrl-1 = <&i2c1_pins_sleep_a>;
135 i2c-scl-rising-time-ns = <100>;
136 i2c-scl-falling-time-ns = <7>;
137 status = "okay";
138 /delete-property/dmas;
139 /delete-property/dma-names;
140
141 hdmi-transmitter@39 {
142 compatible = "sil,sii9022";
143 reg = <0x39>;
144 iovcc-supply = <&v3v3_hdmi>;
145 cvcc12-supply = <&v1v2_hdmi>;
146 reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
147 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
148 interrupt-parent = <&gpiog>;
149 pinctrl-names = "default", "sleep";
150 pinctrl-0 = <&ltdc_pins_a>;
151 pinctrl-1 = <&ltdc_pins_sleep_a>;
152 status = "okay";
153
154 ports {
155 #address-cells = <1>;
156 #size-cells = <0>;
157
158 port@0 {
159 reg = <0>;
160 sii9022_in: endpoint {
161 remote-endpoint = <&ltdc_ep0_out>;
162 };
163 };
164 };
165 };
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100166
167 cs42l51: cs42l51@4a {
168 compatible = "cirrus,cs42l51";
169 reg = <0x4a>;
170 #sound-dai-cells = <0>;
171 VL-supply = <&v3v3>;
172 VD-supply = <&v1v8_audio>;
173 VA-supply = <&v1v8_audio>;
174 VAHP-supply = <&v1v8_audio>;
175 reset-gpios = <&gpiog 9 GPIO_ACTIVE_LOW>;
176 clocks = <&sai2a>;
177 clock-names = "MCLK";
178 status = "okay";
179
180 cs42l51_port: port {
181 #address-cells = <1>;
182 #size-cells = <0>;
183
184 cs42l51_tx_endpoint: endpoint@0 {
185 reg = <0>;
186 remote-endpoint = <&sai2a_endpoint>;
187 frame-master;
188 bitclock-master;
189 };
190
191 cs42l51_rx_endpoint: endpoint@1 {
192 reg = <1>;
193 remote-endpoint = <&sai2b_endpoint>;
194 frame-master;
195 bitclock-master;
196 };
197 };
198 };
Patrick Delaunayfe915332019-07-30 19:16:12 +0200199};
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200200
Patrice Chotard23661602019-02-12 16:50:38 +0100201&i2c4 {
202 pinctrl-names = "default";
203 pinctrl-0 = <&i2c4_pins_a>;
204 i2c-scl-rising-time-ns = <185>;
205 i2c-scl-falling-time-ns = <20>;
206 status = "okay";
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200207 /* spare dmas for other usage */
Patrice Chotard23661602019-02-12 16:50:38 +0100208 /delete-property/dmas;
209 /delete-property/dma-names;
210
Patrick Delaunay6fe7dd32019-03-29 15:42:24 +0100211 typec: stusb1600@28 {
212 compatible = "st,stusb1600";
213 reg = <0x28>;
214 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
215 interrupt-parent = <&gpioi>;
216 pinctrl-names = "default";
217 pinctrl-0 = <&stusb1600_pins_a>;
218
219 status = "okay";
220
221 typec_con: connector {
222 compatible = "usb-c-connector";
223 label = "USB-C";
224 power-role = "sink";
225 power-opmode = "default";
226 };
227 };
228
Patrice Chotard23661602019-02-12 16:50:38 +0100229 pmic: stpmic@33 {
230 compatible = "st,stpmic1";
231 reg = <0x33>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200232 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
Patrice Chotard23661602019-02-12 16:50:38 +0100233 interrupt-controller;
234 #interrupt-cells = <2>;
235 status = "okay";
236
Patrice Chotard23661602019-02-12 16:50:38 +0100237 regulators {
238 compatible = "st,stpmic1-regulators";
Patrice Chotard23661602019-02-12 16:50:38 +0100239 ldo1-supply = <&v3v3>;
240 ldo3-supply = <&vdd_ddr>;
241 ldo6-supply = <&v3v3>;
242 pwr_sw1-supply = <&bst_out>;
243 pwr_sw2-supply = <&bst_out>;
244
245 vddcore: buck1 {
246 regulator-name = "vddcore";
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200247 regulator-min-microvolt = <800000>;
Patrice Chotard23661602019-02-12 16:50:38 +0100248 regulator-max-microvolt = <1350000>;
249 regulator-always-on;
250 regulator-initial-mode = <0>;
251 regulator-over-current-protection;
252 };
253
254 vdd_ddr: buck2 {
255 regulator-name = "vdd_ddr";
256 regulator-min-microvolt = <1350000>;
257 regulator-max-microvolt = <1350000>;
258 regulator-always-on;
259 regulator-initial-mode = <0>;
260 regulator-over-current-protection;
261 };
262
263 vdd: buck3 {
264 regulator-name = "vdd";
265 regulator-min-microvolt = <3300000>;
266 regulator-max-microvolt = <3300000>;
267 regulator-always-on;
268 st,mask-reset;
269 regulator-initial-mode = <0>;
270 regulator-over-current-protection;
271 };
272
273 v3v3: buck4 {
274 regulator-name = "v3v3";
275 regulator-min-microvolt = <3300000>;
276 regulator-max-microvolt = <3300000>;
277 regulator-always-on;
278 regulator-over-current-protection;
279 regulator-initial-mode = <0>;
280 };
281
282 v1v8_audio: ldo1 {
283 regulator-name = "v1v8_audio";
284 regulator-min-microvolt = <1800000>;
285 regulator-max-microvolt = <1800000>;
286 regulator-always-on;
287 interrupts = <IT_CURLIM_LDO1 0>;
288 };
289
290 v3v3_hdmi: ldo2 {
291 regulator-name = "v3v3_hdmi";
292 regulator-min-microvolt = <3300000>;
293 regulator-max-microvolt = <3300000>;
294 regulator-always-on;
295 interrupts = <IT_CURLIM_LDO2 0>;
296 };
297
298 vtt_ddr: ldo3 {
299 regulator-name = "vtt_ddr";
300 regulator-min-microvolt = <500000>;
301 regulator-max-microvolt = <750000>;
302 regulator-always-on;
303 regulator-over-current-protection;
304 };
305
306 vdd_usb: ldo4 {
307 regulator-name = "vdd_usb";
308 regulator-min-microvolt = <3300000>;
309 regulator-max-microvolt = <3300000>;
310 interrupts = <IT_CURLIM_LDO4 0>;
311 };
312
313 vdda: ldo5 {
314 regulator-name = "vdda";
315 regulator-min-microvolt = <2900000>;
316 regulator-max-microvolt = <2900000>;
317 interrupts = <IT_CURLIM_LDO5 0>;
318 regulator-boot-on;
319 };
320
321 v1v2_hdmi: ldo6 {
322 regulator-name = "v1v2_hdmi";
323 regulator-min-microvolt = <1200000>;
324 regulator-max-microvolt = <1200000>;
325 regulator-always-on;
326 interrupts = <IT_CURLIM_LDO6 0>;
Patrice Chotard23661602019-02-12 16:50:38 +0100327 };
328
329 vref_ddr: vref_ddr {
330 regulator-name = "vref_ddr";
331 regulator-always-on;
332 regulator-over-current-protection;
333 };
334
335 bst_out: boost {
336 regulator-name = "bst_out";
337 interrupts = <IT_OCP_BOOST 0>;
338 };
339
340 vbus_otg: pwr_sw1 {
341 regulator-name = "vbus_otg";
342 interrupts = <IT_OCP_OTG 0>;
Patrice Chotard23661602019-02-12 16:50:38 +0100343 };
344
345 vbus_sw: pwr_sw2 {
346 regulator-name = "vbus_sw";
347 interrupts = <IT_OCP_SWOUT 0>;
348 regulator-active-discharge;
349 };
350 };
351
352 onkey {
353 compatible = "st,stpmic1-onkey";
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200354 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
Patrice Chotard23661602019-02-12 16:50:38 +0100355 interrupt-names = "onkey-falling", "onkey-rising";
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200356 power-off-time-sec = <10>;
Patrice Chotard23661602019-02-12 16:50:38 +0100357 status = "okay";
358 };
359
360 watchdog {
361 compatible = "st,stpmic1-wdt";
362 status = "disabled";
363 };
364 };
365};
366
Fabien Dessenne1958dae2019-05-14 11:20:37 +0200367&ipcc {
368 status = "okay";
369};
370
Patrice Chotard23661602019-02-12 16:50:38 +0100371&iwdg2 {
372 timeout-sec = <32>;
373 status = "okay";
374};
375
Patrick Delaunayfe915332019-07-30 19:16:12 +0200376&ltdc {
377 status = "okay";
378
379 port {
380 #address-cells = <1>;
381 #size-cells = <0>;
382
383 ltdc_ep0_out: endpoint@0 {
384 reg = <0>;
385 remote-endpoint = <&sii9022_in>;
386 };
387 };
388};
389
Patrick Delaunay5d2901a2019-08-02 15:07:18 +0200390&m4_rproc {
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100391 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
392 <&vdev0vring1>, <&vdev0buffer>;
Patrick Delaunay5d2901a2019-08-02 15:07:18 +0200393 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
394 mbox-names = "vq0", "vq1", "shutdown";
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100395 interrupt-parent = <&exti>;
396 interrupts = <68 1>;
Patrick Delaunay5d2901a2019-08-02 15:07:18 +0200397 status = "okay";
398};
399
Patrick Delaunay7915b992020-01-28 10:10:59 +0100400&pwr_regulators {
401 vdd-supply = <&vdd>;
402 vdd_3v3_usbfs-supply = <&vdd_usb>;
Patrice Chotard23661602019-02-12 16:50:38 +0100403};
404
405&rng1 {
406 status = "okay";
407};
408
409&rtc {
410 status = "okay";
411};
412
Patrick Delaunay62d620c2019-11-06 16:16:33 +0100413&sai2 {
414 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
415 clock-names = "pclk", "x8k", "x11k";
416 pinctrl-names = "default", "sleep";
417 pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
418 pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
419 status = "okay";
420
421 sai2a: audio-controller@4400b004 {
422 #clock-cells = <0>;
423 dma-names = "tx";
424 clocks = <&rcc SAI2_K>;
425 clock-names = "sai_ck";
426 status = "okay";
427
428 sai2a_port: port {
429 sai2a_endpoint: endpoint {
430 remote-endpoint = <&cs42l51_tx_endpoint>;
431 format = "i2s";
432 mclk-fs = <256>;
433 dai-tdm-slot-num = <2>;
434 dai-tdm-slot-width = <32>;
435 };
436 };
437 };
438
439 sai2b: audio-controller@4400b024 {
440 dma-names = "rx";
441 st,sync = <&sai2a 2>;
442 clocks = <&rcc SAI2_K>, <&sai2a>;
443 clock-names = "sai_ck", "MCLK";
444 status = "okay";
445
446 sai2b_port: port {
447 sai2b_endpoint: endpoint {
448 remote-endpoint = <&cs42l51_rx_endpoint>;
449 format = "i2s";
450 mclk-fs = <256>;
451 dai-tdm-slot-num = <2>;
452 dai-tdm-slot-width = <32>;
453 };
454 };
455 };
456};
457
Patrice Chotard23661602019-02-12 16:50:38 +0100458&sdmmc1 {
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200459 pinctrl-names = "default", "opendrain", "sleep";
Patrice Chotard23661602019-02-12 16:50:38 +0100460 pinctrl-0 = <&sdmmc1_b4_pins_a>;
Patrick Delaunay35a54d42019-07-11 11:15:28 +0200461 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
462 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
Patrice Chotard23661602019-02-12 16:50:38 +0100463 broken-cd;
464 st,neg-edge;
465 bus-width = <4>;
466 vmmc-supply = <&v3v3>;
467 status = "okay";
468};
469
470&uart4 {
471 pinctrl-names = "default";
472 pinctrl-0 = <&uart4_pins_a>;
473 status = "okay";
474};
475
476&usbh_ehci {
477 phys = <&usbphyc_port0>;
478 phy-names = "usb";
479 status = "okay";
480};
481
Patrick Delaunayc31000c2019-03-29 15:42:23 +0100482&usbotg_hs {
483 dr_mode = "peripheral";
484 phys = <&usbphyc_port1 0>;
485 phy-names = "usb2-phy";
Patrice Chotard23661602019-02-12 16:50:38 +0100486 status = "okay";
487};
488
Patrick Delaunayc31000c2019-03-29 15:42:23 +0100489&usbphyc {
490 status = "okay";
491};
492
493&usbphyc_port0 {
494 phy-supply = <&vdd_usb>;
495};
496
497&usbphyc_port1 {
498 phy-supply = <&vdd_usb>;
499};
500
Patrice Chotard23661602019-02-12 16:50:38 +0100501&vrefbuf {
502 regulator-min-microvolt = <2500000>;
503 regulator-max-microvolt = <2500000>;
504 vdda-supply = <&vdd>;
505 status = "okay";
506};