Merge branch 'master' of git://git.denx.de/u-boot-sh
[oweals/u-boot.git] / arch / arm / dts / stm32mp157a-dk1.dts
1 // 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"
10 #include "stm32mp157xac-pinctrl.dtsi"
11 #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
31         reserved-memory {
32                 #address-cells = <1>;
33                 #size-cells = <1>;
34                 ranges;
35
36                 gpu_reserved: gpu@d4000000 {
37                         reg = <0xd4000000 0x4000000>;
38                         no-map;
39                 };
40         };
41
42         led {
43                 compatible = "gpio-leds";
44                 blue {
45                         label = "heartbeat";
46                         gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
47                         linux,default-trigger = "heartbeat";
48                         default-state = "off";
49                 };
50         };
51 };
52
53 &cec {
54         pinctrl-names = "default", "sleep";
55         pinctrl-0 = <&cec_pins_b>;
56         pinctrl-1 = <&cec_pins_sleep_b>;
57         status = "okay";
58 };
59
60 &ethernet0 {
61         status = "okay";
62         pinctrl-0 = <&ethernet0_rgmii_pins_a>;
63         pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
64         pinctrl-names = "default", "sleep";
65         phy-mode = "rgmii-id";
66         max-speed = <1000>;
67         phy-handle = <&phy0>;
68
69         mdio0 {
70                 #address-cells = <1>;
71                 #size-cells = <0>;
72                 compatible = "snps,dwmac-mdio";
73                 phy0: ethernet-phy@0 {
74                         reg = <0>;
75                 };
76         };
77 };
78
79 &gpu {
80         contiguous-area = <&gpu_reserved>;
81         status = "okay";
82 };
83
84 &i2c1 {
85         pinctrl-names = "default", "sleep";
86         pinctrl-0 = <&i2c1_pins_a>;
87         pinctrl-1 = <&i2c1_pins_sleep_a>;
88         i2c-scl-rising-time-ns = <100>;
89         i2c-scl-falling-time-ns = <7>;
90         status = "okay";
91         /delete-property/dmas;
92         /delete-property/dma-names;
93
94         hdmi-transmitter@39 {
95                 compatible = "sil,sii9022";
96                 reg = <0x39>;
97                 iovcc-supply = <&v3v3_hdmi>;
98                 cvcc12-supply = <&v1v2_hdmi>;
99                 reset-gpios = <&gpioa 10 GPIO_ACTIVE_LOW>;
100                 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
101                 interrupt-parent = <&gpiog>;
102                 pinctrl-names = "default", "sleep";
103                 pinctrl-0 = <&ltdc_pins_a>;
104                 pinctrl-1 = <&ltdc_pins_sleep_a>;
105                 status = "okay";
106
107                 ports {
108                         #address-cells = <1>;
109                         #size-cells = <0>;
110
111                         port@0 {
112                                 reg = <0>;
113                                 sii9022_in: endpoint {
114                                         remote-endpoint = <&ltdc_ep0_out>;
115                                 };
116                         };
117                 };
118         };
119 };
120
121 &i2c4 {
122         pinctrl-names = "default";
123         pinctrl-0 = <&i2c4_pins_a>;
124         i2c-scl-rising-time-ns = <185>;
125         i2c-scl-falling-time-ns = <20>;
126         status = "okay";
127         /* spare dmas for other usage */
128         /delete-property/dmas;
129         /delete-property/dma-names;
130
131         typec: stusb1600@28 {
132                 compatible = "st,stusb1600";
133                 reg = <0x28>;
134                 interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
135                 interrupt-parent = <&gpioi>;
136                 pinctrl-names = "default";
137                 pinctrl-0 = <&stusb1600_pins_a>;
138
139                 status = "okay";
140
141                 typec_con: connector {
142                         compatible = "usb-c-connector";
143                         label = "USB-C";
144                         power-role = "sink";
145                         power-opmode = "default";
146                 };
147         };
148
149         pmic: stpmic@33 {
150                 compatible = "st,stpmic1";
151                 reg = <0x33>;
152                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
153                 interrupt-controller;
154                 #interrupt-cells = <2>;
155                 status = "okay";
156
157                 regulators {
158                         compatible = "st,stpmic1-regulators";
159                         ldo1-supply = <&v3v3>;
160                         ldo3-supply = <&vdd_ddr>;
161                         ldo6-supply = <&v3v3>;
162                         pwr_sw1-supply = <&bst_out>;
163                         pwr_sw2-supply = <&bst_out>;
164
165                         vddcore: buck1 {
166                                 regulator-name = "vddcore";
167                                 regulator-min-microvolt = <800000>;
168                                 regulator-max-microvolt = <1350000>;
169                                 regulator-always-on;
170                                 regulator-initial-mode = <0>;
171                                 regulator-over-current-protection;
172                         };
173
174                         vdd_ddr: buck2 {
175                                 regulator-name = "vdd_ddr";
176                                 regulator-min-microvolt = <1350000>;
177                                 regulator-max-microvolt = <1350000>;
178                                 regulator-always-on;
179                                 regulator-initial-mode = <0>;
180                                 regulator-over-current-protection;
181                         };
182
183                         vdd: buck3 {
184                                 regulator-name = "vdd";
185                                 regulator-min-microvolt = <3300000>;
186                                 regulator-max-microvolt = <3300000>;
187                                 regulator-always-on;
188                                 st,mask-reset;
189                                 regulator-initial-mode = <0>;
190                                 regulator-over-current-protection;
191                         };
192
193                         v3v3: buck4 {
194                                 regulator-name = "v3v3";
195                                 regulator-min-microvolt = <3300000>;
196                                 regulator-max-microvolt = <3300000>;
197                                 regulator-always-on;
198                                 regulator-over-current-protection;
199                                 regulator-initial-mode = <0>;
200                         };
201
202                         v1v8_audio: ldo1 {
203                                 regulator-name = "v1v8_audio";
204                                 regulator-min-microvolt = <1800000>;
205                                 regulator-max-microvolt = <1800000>;
206                                 regulator-always-on;
207                                 interrupts = <IT_CURLIM_LDO1 0>;
208                         };
209
210                         v3v3_hdmi: ldo2 {
211                                 regulator-name = "v3v3_hdmi";
212                                 regulator-min-microvolt = <3300000>;
213                                 regulator-max-microvolt = <3300000>;
214                                 regulator-always-on;
215                                 interrupts = <IT_CURLIM_LDO2 0>;
216                         };
217
218                         vtt_ddr: ldo3 {
219                                 regulator-name = "vtt_ddr";
220                                 regulator-min-microvolt = <500000>;
221                                 regulator-max-microvolt = <750000>;
222                                 regulator-always-on;
223                                 regulator-over-current-protection;
224                         };
225
226                         vdd_usb: ldo4 {
227                                 regulator-name = "vdd_usb";
228                                 regulator-min-microvolt = <3300000>;
229                                 regulator-max-microvolt = <3300000>;
230                                 interrupts = <IT_CURLIM_LDO4 0>;
231                         };
232
233                         vdda: ldo5 {
234                                 regulator-name = "vdda";
235                                 regulator-min-microvolt = <2900000>;
236                                 regulator-max-microvolt = <2900000>;
237                                 interrupts = <IT_CURLIM_LDO5 0>;
238                                 regulator-boot-on;
239                         };
240
241                         v1v2_hdmi: ldo6 {
242                                 regulator-name = "v1v2_hdmi";
243                                 regulator-min-microvolt = <1200000>;
244                                 regulator-max-microvolt = <1200000>;
245                                 regulator-always-on;
246                                 interrupts = <IT_CURLIM_LDO6 0>;
247                         };
248
249                         vref_ddr: vref_ddr {
250                                 regulator-name = "vref_ddr";
251                                 regulator-always-on;
252                                 regulator-over-current-protection;
253                         };
254
255                          bst_out: boost {
256                                 regulator-name = "bst_out";
257                                 interrupts = <IT_OCP_BOOST 0>;
258                          };
259
260                         vbus_otg: pwr_sw1 {
261                                 regulator-name = "vbus_otg";
262                                 interrupts = <IT_OCP_OTG 0>;
263                          };
264
265                          vbus_sw: pwr_sw2 {
266                                 regulator-name = "vbus_sw";
267                                 interrupts = <IT_OCP_SWOUT 0>;
268                                 regulator-active-discharge;
269                          };
270                 };
271
272                 onkey {
273                         compatible = "st,stpmic1-onkey";
274                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
275                         interrupt-names = "onkey-falling", "onkey-rising";
276                         power-off-time-sec = <10>;
277                         status = "okay";
278                 };
279
280                 watchdog {
281                         compatible = "st,stpmic1-wdt";
282                         status = "disabled";
283                 };
284         };
285 };
286
287 &ipcc {
288         status = "okay";
289 };
290
291 &iwdg2 {
292         timeout-sec = <32>;
293         status = "okay";
294 };
295
296 &ltdc {
297         status = "okay";
298
299         port {
300                 #address-cells = <1>;
301                 #size-cells = <0>;
302
303                 ltdc_ep0_out: endpoint@0 {
304                         reg = <0>;
305                         remote-endpoint = <&sii9022_in>;
306                 };
307         };
308 };
309
310 &m4_rproc {
311         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
312         mbox-names = "vq0", "vq1", "shutdown";
313         status = "okay";
314 };
315
316 &pwr {
317         pwr-regulators {
318                 vdd-supply = <&vdd>;
319                 vdd_3v3_usbfs-supply = <&vdd_usb>;
320         };
321 };
322
323 &rng1 {
324         status = "okay";
325 };
326
327 &rtc {
328         status = "okay";
329 };
330
331 &sdmmc1 {
332         pinctrl-names = "default", "opendrain", "sleep";
333         pinctrl-0 = <&sdmmc1_b4_pins_a>;
334         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
335         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
336         broken-cd;
337         st,neg-edge;
338         bus-width = <4>;
339         vmmc-supply = <&v3v3>;
340         status = "okay";
341 };
342
343 &uart4 {
344         pinctrl-names = "default";
345         pinctrl-0 = <&uart4_pins_a>;
346         status = "okay";
347 };
348
349 &usbh_ehci {
350         phys = <&usbphyc_port0>;
351         phy-names = "usb";
352         status = "okay";
353 };
354
355 &usbotg_hs {
356         dr_mode = "peripheral";
357         phys = <&usbphyc_port1 0>;
358         phy-names = "usb2-phy";
359         status = "okay";
360 };
361
362 &usbphyc {
363         status = "okay";
364 };
365
366 &usbphyc_port0 {
367         phy-supply = <&vdd_usb>;
368 };
369
370 &usbphyc_port1 {
371         phy-supply = <&vdd_usb>;
372 };
373
374 &vrefbuf {
375         regulator-min-microvolt = <2500000>;
376         regulator-max-microvolt = <2500000>;
377         vdda-supply = <&vdd>;
378         status = "okay";
379 };