Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / stm32mp157c-ed1.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2 /*
3  * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
4  * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
5  */
6 /dts-v1/;
7
8 #include "stm32mp157c.dtsi"
9 #include "stm32mp157xaa-pinctrl.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/mfd/st,stpmic1.h>
12
13 / {
14         model = "STMicroelectronics STM32MP157C eval daughter";
15         compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         memory@c0000000 {
22                 device_type = "memory";
23                 reg = <0xC0000000 0x40000000>;
24         };
25
26         reserved-memory {
27                 #address-cells = <1>;
28                 #size-cells = <1>;
29                 ranges;
30
31                 mcuram2: mcuram2@10000000 {
32                         compatible = "shared-dma-pool";
33                         reg = <0x10000000 0x40000>;
34                         no-map;
35                 };
36
37                 vdev0vring0: vdev0vring0@10040000 {
38                         compatible = "shared-dma-pool";
39                         reg = <0x10040000 0x1000>;
40                         no-map;
41                 };
42
43                 vdev0vring1: vdev0vring1@10041000 {
44                         compatible = "shared-dma-pool";
45                         reg = <0x10041000 0x1000>;
46                         no-map;
47                 };
48
49                 vdev0buffer: vdev0buffer@10042000 {
50                         compatible = "shared-dma-pool";
51                         reg = <0x10042000 0x4000>;
52                         no-map;
53                 };
54
55                 mcuram: mcuram@30000000 {
56                         compatible = "shared-dma-pool";
57                         reg = <0x30000000 0x40000>;
58                         no-map;
59                 };
60
61                 retram: retram@38000000 {
62                         compatible = "shared-dma-pool";
63                         reg = <0x38000000 0x10000>;
64                         no-map;
65                 };
66
67                 gpu_reserved: gpu@e8000000 {
68                         reg = <0xe8000000 0x8000000>;
69                         no-map;
70                 };
71         };
72
73         aliases {
74                 serial0 = &uart4;
75         };
76
77         reg11: reg11 {
78                 compatible = "regulator-fixed";
79                 regulator-name = "reg11";
80                 regulator-min-microvolt = <1100000>;
81                 regulator-max-microvolt = <1100000>;
82                 regulator-always-on;
83         };
84
85         reg18: reg18 {
86                 compatible = "regulator-fixed";
87                 regulator-name = "reg18";
88                 regulator-min-microvolt = <1800000>;
89                 regulator-max-microvolt = <1800000>;
90                 regulator-always-on;
91         };
92
93         sd_switch: regulator-sd_switch {
94                 compatible = "regulator-gpio";
95                 regulator-name = "sd_switch";
96                 regulator-min-microvolt = <1800000>;
97                 regulator-max-microvolt = <2900000>;
98                 regulator-type = "voltage";
99                 regulator-always-on;
100
101                 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
102                 gpios-states = <0>;
103                 states = <1800000 0x1 2900000 0x0>;
104         };
105 };
106
107 &dts {
108         status = "okay";
109 };
110
111 &gpu {
112         contiguous-area = <&gpu_reserved>;
113         status = "okay";
114 };
115
116 &i2c4 {
117         pinctrl-names = "default";
118         pinctrl-0 = <&i2c4_pins_a>;
119         i2c-scl-rising-time-ns = <185>;
120         i2c-scl-falling-time-ns = <20>;
121         status = "okay";
122         /* spare dmas for other usage */
123         /delete-property/dmas;
124         /delete-property/dma-names;
125
126         pmic: stpmic@33 {
127                 compatible = "st,stpmic1";
128                 reg = <0x33>;
129                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
130                 interrupt-controller;
131                 #interrupt-cells = <2>;
132                 status = "okay";
133
134                 regulators {
135                         compatible = "st,stpmic1-regulators";
136                         ldo1-supply = <&v3v3>;
137                         ldo2-supply = <&v3v3>;
138                         ldo3-supply = <&vdd_ddr>;
139                         ldo5-supply = <&v3v3>;
140                         ldo6-supply = <&v3v3>;
141                         pwr_sw1-supply = <&bst_out>;
142                         pwr_sw2-supply = <&bst_out>;
143
144                         vddcore: buck1 {
145                                 regulator-name = "vddcore";
146                                 regulator-min-microvolt = <800000>;
147                                 regulator-max-microvolt = <1350000>;
148                                 regulator-always-on;
149                                 regulator-initial-mode = <0>;
150                                 regulator-over-current-protection;
151                         };
152
153                         vdd_ddr: buck2 {
154                                 regulator-name = "vdd_ddr";
155                                 regulator-min-microvolt = <1350000>;
156                                 regulator-max-microvolt = <1350000>;
157                                 regulator-always-on;
158                                 regulator-initial-mode = <0>;
159                                 regulator-over-current-protection;
160                         };
161
162                         vdd: buck3 {
163                                 regulator-name = "vdd";
164                                 regulator-min-microvolt = <3300000>;
165                                 regulator-max-microvolt = <3300000>;
166                                 regulator-always-on;
167                                 st,mask-reset;
168                                 regulator-initial-mode = <0>;
169                                 regulator-over-current-protection;
170                         };
171
172                         v3v3: buck4 {
173                                 regulator-name = "v3v3";
174                                 regulator-min-microvolt = <3300000>;
175                                 regulator-max-microvolt = <3300000>;
176                                 regulator-always-on;
177                                 regulator-over-current-protection;
178                                 regulator-initial-mode = <0>;
179                         };
180
181                         vdda: ldo1 {
182                                 regulator-name = "vdda";
183                                 regulator-min-microvolt = <2900000>;
184                                 regulator-max-microvolt = <2900000>;
185                                 interrupts = <IT_CURLIM_LDO1 0>;
186                         };
187
188                         v2v8: ldo2 {
189                                 regulator-name = "v2v8";
190                                 regulator-min-microvolt = <2800000>;
191                                 regulator-max-microvolt = <2800000>;
192                                 interrupts = <IT_CURLIM_LDO2 0>;
193                         };
194
195                         vtt_ddr: ldo3 {
196                                 regulator-name = "vtt_ddr";
197                                 regulator-min-microvolt = <500000>;
198                                 regulator-max-microvolt = <750000>;
199                                 regulator-always-on;
200                                 regulator-over-current-protection;
201                         };
202
203                         vdd_usb: ldo4 {
204                                 regulator-name = "vdd_usb";
205                                 regulator-min-microvolt = <3300000>;
206                                 regulator-max-microvolt = <3300000>;
207                                 interrupts = <IT_CURLIM_LDO4 0>;
208                         };
209
210                         vdd_sd: ldo5 {
211                                 regulator-name = "vdd_sd";
212                                 regulator-min-microvolt = <2900000>;
213                                 regulator-max-microvolt = <2900000>;
214                                 interrupts = <IT_CURLIM_LDO5 0>;
215                                 regulator-boot-on;
216                         };
217
218                         v1v8: ldo6 {
219                                 regulator-name = "v1v8";
220                                 regulator-min-microvolt = <1800000>;
221                                 regulator-max-microvolt = <1800000>;
222                                 interrupts = <IT_CURLIM_LDO6 0>;
223                         };
224
225                         vref_ddr: vref_ddr {
226                                 regulator-name = "vref_ddr";
227                                 regulator-always-on;
228                                 regulator-over-current-protection;
229                         };
230
231                         bst_out: boost {
232                                 regulator-name = "bst_out";
233                                 interrupts = <IT_OCP_BOOST 0>;
234                         };
235
236                         vbus_otg: pwr_sw1 {
237                                 regulator-name = "vbus_otg";
238                                 interrupts = <IT_OCP_OTG 0>;
239                          };
240
241                          vbus_sw: pwr_sw2 {
242                                 regulator-name = "vbus_sw";
243                                 interrupts = <IT_OCP_SWOUT 0>;
244                                 regulator-active-discharge;
245                          };
246                 };
247
248                 onkey {
249                         compatible = "st,stpmic1-onkey";
250                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
251                         interrupt-names = "onkey-falling", "onkey-rising";
252                         power-off-time-sec = <10>;
253                         status = "okay";
254                 };
255
256                 watchdog {
257                         compatible = "st,stpmic1-wdt";
258                         status = "disabled";
259                 };
260         };
261 };
262
263 &ipcc {
264         status = "okay";
265 };
266
267 &iwdg2 {
268         timeout-sec = <32>;
269         status = "okay";
270 };
271
272 &m4_rproc {
273         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
274                         <&vdev0vring1>, <&vdev0buffer>;
275         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
276         mbox-names = "vq0", "vq1", "shutdown";
277         interrupt-parent = <&exti>;
278         interrupts = <68 1>;
279         status = "okay";
280 };
281
282 &rng1 {
283         status = "okay";
284 };
285
286 &rtc {
287         status = "okay";
288 };
289
290 &sdmmc1 {
291         pinctrl-names = "default", "opendrain", "sleep";
292         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
293         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
294         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
295         broken-cd;
296         st,sig-dir;
297         st,neg-edge;
298         st,use-ckin;
299         bus-width = <4>;
300         vmmc-supply = <&vdd_sd>;
301         vqmmc-supply = <&sd_switch>;
302         status = "okay";
303 };
304
305 &timers6 {
306         status = "okay";
307         /* spare dmas for other usage */
308         /delete-property/dmas;
309         /delete-property/dma-names;
310         timer@5 {
311                 status = "okay";
312         };
313 };
314
315 &uart4 {
316         pinctrl-names = "default";
317         pinctrl-0 = <&uart4_pins_a>;
318         status = "okay";
319 };
320
321 &usbphyc_port0 {
322         phy-supply = <&vdd_usb>;
323         vdda1v1-supply = <&reg11>;
324         vdda1v8-supply = <&reg18>;
325 };
326
327 &usbphyc_port1 {
328         phy-supply = <&vdd_usb>;
329         vdda1v1-supply = <&reg11>;
330         vdda1v8-supply = <&reg18>;
331 };