b4b52cf634afa8d51adff1976fe02cac6384635f
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / stm32mp15xx-dhcom-som.dtsi
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 = &ethernet0;
14         };
15
16         memory@c0000000 {
17                 device_type = "memory";
18                 reg = <0xC0000000 0x40000000>;
19         };
20
21         reserved-memory {
22                 #address-cells = <1>;
23                 #size-cells = <1>;
24                 ranges;
25
26                 mcuram2: mcuram2@10000000 {
27                         compatible = "shared-dma-pool";
28                         reg = <0x10000000 0x40000>;
29                         no-map;
30                 };
31
32                 vdev0vring0: vdev0vring0@10040000 {
33                         compatible = "shared-dma-pool";
34                         reg = <0x10040000 0x1000>;
35                         no-map;
36                 };
37
38                 vdev0vring1: vdev0vring1@10041000 {
39                         compatible = "shared-dma-pool";
40                         reg = <0x10041000 0x1000>;
41                         no-map;
42                 };
43
44                 vdev0buffer: vdev0buffer@10042000 {
45                         compatible = "shared-dma-pool";
46                         reg = <0x10042000 0x4000>;
47                         no-map;
48                 };
49
50                 mcuram: mcuram@30000000 {
51                         compatible = "shared-dma-pool";
52                         reg = <0x30000000 0x40000>;
53                         no-map;
54                 };
55
56                 retram: retram@38000000 {
57                         compatible = "shared-dma-pool";
58                         reg = <0x38000000 0x10000>;
59                         no-map;
60                 };
61         };
62
63         ethernet_vio: vioregulator {
64                 compatible = "regulator-fixed";
65                 regulator-name = "vio";
66                 regulator-min-microvolt = <3300000>;
67                 regulator-max-microvolt = <3300000>;
68                 gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
69                 regulator-always-on;
70                 regulator-boot-on;
71         };
72 };
73
74 &adc {
75         vdd-supply = <&vdd>;
76         vdda-supply = <&vdda>;
77         vref-supply = <&vdda>;
78         status = "okay";
79
80         adc1: adc@0 {
81                 st,min-sample-time-nsecs = <5000>;
82                 st,adc-channels = <0>;
83                 status = "okay";
84         };
85
86         adc2: adc@100 {
87                 st,adc-channels = <1>;
88                 st,min-sample-time-nsecs = <5000>;
89                 status = "okay";
90         };
91 };
92
93 &dac {
94         pinctrl-names = "default";
95         pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
96         vref-supply = <&vdda>;
97         status = "okay";
98
99         dac1: dac@1 {
100                 status = "okay";
101         };
102         dac2: dac@2 {
103                 status = "okay";
104         };
105 };
106
107 &dts {
108         status = "okay";
109 };
110
111 &ethernet0 {
112         status = "okay";
113         pinctrl-0 = <&ethernet0_rmii_pins_a>;
114         pinctrl-1 = <&ethernet0_rmii_sleep_pins_a>;
115         pinctrl-names = "default", "sleep";
116         phy-mode = "rmii";
117         max-speed = <100>;
118         phy-handle = <&phy0>;
119         st,eth-ref-clk-sel;
120         phy-reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
121
122         mdio0 {
123                 #address-cells = <1>;
124                 #size-cells = <0>;
125                 compatible = "snps,dwmac-mdio";
126
127                 phy0: ethernet-phy@1 {
128                         reg = <1>;
129                 };
130         };
131 };
132
133 &i2c4 {
134         pinctrl-names = "default";
135         pinctrl-0 = <&i2c4_pins_a>;
136         i2c-scl-rising-time-ns = <185>;
137         i2c-scl-falling-time-ns = <20>;
138         status = "okay";
139         /* spare dmas for other usage */
140         /delete-property/dmas;
141         /delete-property/dma-names;
142
143         rtc@32 {
144                 compatible = "microcrystal,rv8803";
145                 reg = <0x32>;
146         };
147
148         pmic: stpmic@33 {
149                 compatible = "st,stpmic1";
150                 reg = <0x33>;
151                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
152                 interrupt-controller;
153                 #interrupt-cells = <2>;
154                 status = "okay";
155
156                 regulators {
157                         compatible = "st,stpmic1-regulators";
158                         ldo1-supply = <&v3v3>;
159                         ldo2-supply = <&v3v3>;
160                         ldo3-supply = <&vdd_ddr>;
161                         ldo5-supply = <&v3v3>;
162                         ldo6-supply = <&v3v3>;
163                         pwr_sw1-supply = <&bst_out>;
164                         pwr_sw2-supply = <&bst_out>;
165
166                         vddcore: buck1 {
167                                 regulator-name = "vddcore";
168                                 regulator-min-microvolt = <800000>;
169                                 regulator-max-microvolt = <1350000>;
170                                 regulator-always-on;
171                                 regulator-initial-mode = <0>;
172                                 regulator-over-current-protection;
173                         };
174
175                         vdd_ddr: buck2 {
176                                 regulator-name = "vdd_ddr";
177                                 regulator-min-microvolt = <1350000>;
178                                 regulator-max-microvolt = <1350000>;
179                                 regulator-always-on;
180                                 regulator-initial-mode = <0>;
181                                 regulator-over-current-protection;
182                         };
183
184                         vdd: buck3 {
185                                 regulator-name = "vdd";
186                                 regulator-min-microvolt = <3300000>;
187                                 regulator-max-microvolt = <3300000>;
188                                 regulator-always-on;
189                                 st,mask-reset;
190                                 regulator-initial-mode = <0>;
191                                 regulator-over-current-protection;
192                         };
193
194                         v3v3: buck4 {
195                                 regulator-name = "v3v3";
196                                 regulator-min-microvolt = <3300000>;
197                                 regulator-max-microvolt = <3300000>;
198                                 regulator-always-on;
199                                 regulator-over-current-protection;
200                                 regulator-initial-mode = <0>;
201                         };
202
203                         vdda: ldo1 {
204                                 regulator-name = "vdda";
205                                 regulator-min-microvolt = <2900000>;
206                                 regulator-max-microvolt = <2900000>;
207                                 interrupts = <IT_CURLIM_LDO1 0>;
208                         };
209
210                         v2v8: ldo2 {
211                                 regulator-name = "v2v8";
212                                 regulator-min-microvolt = <2800000>;
213                                 regulator-max-microvolt = <2800000>;
214                                 interrupts = <IT_CURLIM_LDO2 0>;
215                         };
216
217                         vtt_ddr: ldo3 {
218                                 regulator-name = "vtt_ddr";
219                                 regulator-min-microvolt = <500000>;
220                                 regulator-max-microvolt = <750000>;
221                                 regulator-always-on;
222                                 regulator-over-current-protection;
223                         };
224
225                         vdd_usb: ldo4 {
226                                 regulator-name = "vdd_usb";
227                                 regulator-min-microvolt = <3300000>;
228                                 regulator-max-microvolt = <3300000>;
229                                 interrupts = <IT_CURLIM_LDO4 0>;
230                         };
231
232                         vdd_sd: ldo5 {
233                                 regulator-name = "vdd_sd";
234                                 regulator-min-microvolt = <2900000>;
235                                 regulator-max-microvolt = <2900000>;
236                                 interrupts = <IT_CURLIM_LDO5 0>;
237                                 regulator-boot-on;
238                         };
239
240                         v1v8: ldo6 {
241                                 regulator-name = "v1v8";
242                                 regulator-min-microvolt = <1800000>;
243                                 regulator-max-microvolt = <1800000>;
244                                 interrupts = <IT_CURLIM_LDO6 0>;
245                         };
246
247                         vref_ddr: vref_ddr {
248                                 regulator-name = "vref_ddr";
249                                 regulator-always-on;
250                                 regulator-over-current-protection;
251                         };
252
253                         bst_out: boost {
254                                 regulator-name = "bst_out";
255                                 interrupts = <IT_OCP_BOOST 0>;
256                         };
257
258                         vbus_otg: pwr_sw1 {
259                                 regulator-name = "vbus_otg";
260                                 interrupts = <IT_OCP_OTG 0>;
261                         };
262
263                         vbus_sw: pwr_sw2 {
264                                 regulator-name = "vbus_sw";
265                                 interrupts = <IT_OCP_SWOUT 0>;
266                                 regulator-active-discharge;
267                         };
268                 };
269
270                 onkey {
271                         compatible = "st,stpmic1-onkey";
272                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
273                         interrupt-names = "onkey-falling", "onkey-rising";
274                         power-off-time-sec = <10>;
275                         status = "okay";
276                 };
277
278                 watchdog {
279                         compatible = "st,stpmic1-wdt";
280                         status = "disabled";
281                 };
282         };
283
284         touchscreen@49 {
285                 compatible = "ti,tsc2004";
286                 reg = <0x49>;
287                 vio-supply = <&v3v3>;
288                 interrupts-extended = <&gpioh 15 IRQ_TYPE_EDGE_FALLING>;
289         };
290
291         eeprom@50 {
292                 compatible = "atmel,24c02";
293                 reg = <0x50>;
294                 pagesize = <16>;
295         };
296 };
297
298 &ipcc {
299         status = "okay";
300 };
301
302 &iwdg2 {
303         timeout-sec = <32>;
304         status = "okay";
305 };
306
307 &m4_rproc {
308         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
309                         <&vdev0vring1>, <&vdev0buffer>;
310         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
311         mbox-names = "vq0", "vq1", "shutdown";
312         interrupt-parent = <&exti>;
313         interrupts = <68 1>;
314         status = "okay";
315 };
316
317 &pwr_regulators {
318         vdd-supply = <&vdd>;
319         vdd_3v3_usbfs-supply = <&vdd_usb>;
320 };
321
322 &qspi {
323         pinctrl-names = "default", "sleep";
324         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
325         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
326         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
327         #address-cells = <1>;
328         #size-cells = <0>;
329         status = "okay";
330
331         flash0: mx66l51235l@0 {
332                 compatible = "jedec,spi-nor";
333                 reg = <0>;
334                 spi-rx-bus-width = <4>;
335                 spi-max-frequency = <108000000>;
336                 #address-cells = <1>;
337                 #size-cells = <1>;
338         };
339 };
340
341 &rng1 {
342         status = "okay";
343 };
344
345 &rtc {
346         status = "okay";
347 };
348
349 &sdmmc1 {
350         pinctrl-names = "default", "opendrain", "sleep";
351         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
352         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
353         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
354         broken-cd;
355         st,sig-dir;
356         st,neg-edge;
357         st,use-ckin;
358         bus-width = <4>;
359         vmmc-supply = <&vdd_sd>;
360         status = "okay";
361 };
362
363 &sdmmc2 {
364         pinctrl-names = "default", "opendrain", "sleep";
365         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
366         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
367         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
368         non-removable;
369         no-sd;
370         no-sdio;
371         st,neg-edge;
372         bus-width = <8>;
373         vmmc-supply = <&v3v3>;
374         vqmmc-supply = <&v3v3>;
375         mmc-ddr-3_3v;
376         status = "okay";
377 };
378
379 &sdmmc3 {
380         pinctrl-names = "default", "opendrain", "sleep";
381         pinctrl-0 = <&sdmmc3_b4_pins_a>;
382         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
383         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
384         broken-cd;
385         st,neg-edge;
386         bus-width = <4>;
387         vmmc-supply = <&v3v3>;
388         vqmmc-supply = <&v3v3>;
389         mmc-ddr-3_3v;
390         status = "okay";
391 };
392
393 &uart4 {
394         pinctrl-names = "default";
395         pinctrl-0 = <&uart4_pins_a>;
396         status = "okay";
397 };