]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/arm/stm32mp157c-ed1.dts
Import device-tree files from Linux 6.4
[FreeBSD/FreeBSD.git] / src / arm / 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 "stm32mp157.dtsi"
9 #include "stm32mp15xc.dtsi"
10 #include "stm32mp15-pinctrl.dtsi"
11 #include "stm32mp15xxaa-pinctrl.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/mfd/st,stpmic1.h>
14
15 / {
16         model = "STMicroelectronics STM32MP157C eval daughter";
17         compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
18
19         aliases {
20                 serial0 = &uart4;
21         };
22
23         chosen {
24                 stdout-path = "serial0:115200n8";
25         };
26
27         memory@c0000000 {
28                 device_type = "memory";
29                 reg = <0xC0000000 0x40000000>;
30         };
31
32         reserved-memory {
33                 #address-cells = <1>;
34                 #size-cells = <1>;
35                 ranges;
36
37                 mcuram2: mcuram2@10000000 {
38                         compatible = "shared-dma-pool";
39                         reg = <0x10000000 0x40000>;
40                         no-map;
41                 };
42
43                 vdev0vring0: vdev0vring0@10040000 {
44                         compatible = "shared-dma-pool";
45                         reg = <0x10040000 0x1000>;
46                         no-map;
47                 };
48
49                 vdev0vring1: vdev0vring1@10041000 {
50                         compatible = "shared-dma-pool";
51                         reg = <0x10041000 0x1000>;
52                         no-map;
53                 };
54
55                 vdev0buffer: vdev0buffer@10042000 {
56                         compatible = "shared-dma-pool";
57                         reg = <0x10042000 0x4000>;
58                         no-map;
59                 };
60
61                 mcuram: mcuram@30000000 {
62                         compatible = "shared-dma-pool";
63                         reg = <0x30000000 0x40000>;
64                         no-map;
65                 };
66
67                 retram: retram@38000000 {
68                         compatible = "shared-dma-pool";
69                         reg = <0x38000000 0x10000>;
70                         no-map;
71                 };
72         };
73
74         sd_switch: regulator-sd_switch {
75                 compatible = "regulator-gpio";
76                 regulator-name = "sd_switch";
77                 regulator-min-microvolt = <1800000>;
78                 regulator-max-microvolt = <2900000>;
79                 regulator-type = "voltage";
80                 regulator-always-on;
81
82                 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
83                 gpios-states = <0>;
84                 states = <1800000 0x1>,
85                          <2900000 0x0>;
86         };
87
88         vin: vin {
89                 compatible = "regulator-fixed";
90                 regulator-name = "vin";
91                 regulator-min-microvolt = <5000000>;
92                 regulator-max-microvolt = <5000000>;
93                 regulator-always-on;
94         };
95 };
96
97 &adc {
98         /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
99         pinctrl-0 = <&adc1_in6_pins_a>;
100         pinctrl-names = "default";
101         vdd-supply = <&vdd>;
102         vdda-supply = <&vdda>;
103         vref-supply = <&vdda>;
104         status = "disabled";
105         adc1: adc@0 {
106                 st,adc-channels = <0 1 6>;
107                 /* 16.5 ck_cycles sampling time */
108                 st,min-sample-time-nsecs = <400>;
109                 status = "okay";
110         };
111 };
112
113 &crc1 {
114         status = "okay";
115 };
116
117 &cryp1 {
118         status = "okay";
119 };
120
121 &dac {
122         pinctrl-names = "default";
123         pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
124         vref-supply = <&vdda>;
125         status = "disabled";
126         dac1: dac@1 {
127                 status = "okay";
128         };
129         dac2: dac@2 {
130                 status = "okay";
131         };
132 };
133
134 &dts {
135         status = "okay";
136 };
137
138 &hash1 {
139         status = "okay";
140 };
141
142 &i2c4 {
143         pinctrl-names = "default", "sleep";
144         pinctrl-0 = <&i2c4_pins_a>;
145         pinctrl-1 = <&i2c4_sleep_pins_a>;
146         i2c-scl-rising-time-ns = <185>;
147         i2c-scl-falling-time-ns = <20>;
148         clock-frequency = <400000>;
149         status = "okay";
150         /* spare dmas for other usage */
151         /delete-property/dmas;
152         /delete-property/dma-names;
153
154         pmic: stpmic@33 {
155                 compatible = "st,stpmic1";
156                 reg = <0x33>;
157                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
158                 interrupt-controller;
159                 #interrupt-cells = <2>;
160                 status = "okay";
161
162                 regulators {
163                         compatible = "st,stpmic1-regulators";
164                         buck1-supply = <&vin>;
165                         buck2-supply = <&vin>;
166                         buck3-supply = <&vin>;
167                         buck4-supply = <&vin>;
168                         ldo1-supply = <&v3v3>;
169                         ldo2-supply = <&v3v3>;
170                         ldo3-supply = <&vdd_ddr>;
171                         ldo4-supply = <&vin>;
172                         ldo5-supply = <&v3v3>;
173                         ldo6-supply = <&v3v3>;
174                         vref_ddr-supply = <&vin>;
175                         boost-supply = <&vin>;
176                         pwr_sw1-supply = <&bst_out>;
177                         pwr_sw2-supply = <&bst_out>;
178
179                         vddcore: buck1 {
180                                 regulator-name = "vddcore";
181                                 regulator-min-microvolt = <1200000>;
182                                 regulator-max-microvolt = <1350000>;
183                                 regulator-always-on;
184                                 regulator-initial-mode = <0>;
185                                 regulator-over-current-protection;
186                         };
187
188                         vdd_ddr: buck2 {
189                                 regulator-name = "vdd_ddr";
190                                 regulator-min-microvolt = <1350000>;
191                                 regulator-max-microvolt = <1350000>;
192                                 regulator-always-on;
193                                 regulator-initial-mode = <0>;
194                                 regulator-over-current-protection;
195                         };
196
197                         vdd: buck3 {
198                                 regulator-name = "vdd";
199                                 regulator-min-microvolt = <3300000>;
200                                 regulator-max-microvolt = <3300000>;
201                                 regulator-always-on;
202                                 st,mask-reset;
203                                 regulator-initial-mode = <0>;
204                                 regulator-over-current-protection;
205                         };
206
207                         v3v3: buck4 {
208                                 regulator-name = "v3v3";
209                                 regulator-min-microvolt = <3300000>;
210                                 regulator-max-microvolt = <3300000>;
211                                 regulator-always-on;
212                                 regulator-over-current-protection;
213                                 regulator-initial-mode = <0>;
214                         };
215
216                         vdda: ldo1 {
217                                 regulator-name = "vdda";
218                                 regulator-min-microvolt = <2900000>;
219                                 regulator-max-microvolt = <2900000>;
220                                 interrupts = <IT_CURLIM_LDO1 0>;
221                         };
222
223                         v2v8: ldo2 {
224                                 regulator-name = "v2v8";
225                                 regulator-min-microvolt = <2800000>;
226                                 regulator-max-microvolt = <2800000>;
227                                 interrupts = <IT_CURLIM_LDO2 0>;
228                         };
229
230                         vtt_ddr: ldo3 {
231                                 regulator-name = "vtt_ddr";
232                                 regulator-min-microvolt = <500000>;
233                                 regulator-max-microvolt = <750000>;
234                                 regulator-always-on;
235                                 regulator-over-current-protection;
236                         };
237
238                         vdd_usb: ldo4 {
239                                 regulator-name = "vdd_usb";
240                                 interrupts = <IT_CURLIM_LDO4 0>;
241                         };
242
243                         vdd_sd: ldo5 {
244                                 regulator-name = "vdd_sd";
245                                 regulator-min-microvolt = <2900000>;
246                                 regulator-max-microvolt = <2900000>;
247                                 interrupts = <IT_CURLIM_LDO5 0>;
248                                 regulator-boot-on;
249                         };
250
251                         v1v8: ldo6 {
252                                 regulator-name = "v1v8";
253                                 regulator-min-microvolt = <1800000>;
254                                 regulator-max-microvolt = <1800000>;
255                                 interrupts = <IT_CURLIM_LDO6 0>;
256                         };
257
258                         vref_ddr: vref_ddr {
259                                 regulator-name = "vref_ddr";
260                                 regulator-always-on;
261                         };
262
263                         bst_out: boost {
264                                 regulator-name = "bst_out";
265                                 interrupts = <IT_OCP_BOOST 0>;
266                         };
267
268                         vbus_otg: pwr_sw1 {
269                                 regulator-name = "vbus_otg";
270                                 interrupts = <IT_OCP_OTG 0>;
271                          };
272
273                          vbus_sw: pwr_sw2 {
274                                 regulator-name = "vbus_sw";
275                                 interrupts = <IT_OCP_SWOUT 0>;
276                                 regulator-active-discharge = <1>;
277                          };
278                 };
279
280                 onkey {
281                         compatible = "st,stpmic1-onkey";
282                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
283                         interrupt-names = "onkey-falling", "onkey-rising";
284                         power-off-time-sec = <10>;
285                         status = "okay";
286                 };
287
288                 watchdog {
289                         compatible = "st,stpmic1-wdt";
290                         status = "disabled";
291                 };
292         };
293 };
294
295 &ipcc {
296         status = "okay";
297 };
298
299 &iwdg2 {
300         timeout-sec = <32>;
301         status = "okay";
302 };
303
304 &m4_rproc {
305         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
306                         <&vdev0vring1>, <&vdev0buffer>;
307         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
308         mbox-names = "vq0", "vq1", "shutdown", "detach";
309         interrupt-parent = <&exti>;
310         interrupts = <68 1>;
311         status = "okay";
312 };
313
314 &pwr_regulators {
315         vdd-supply = <&vdd>;
316         vdd_3v3_usbfs-supply = <&vdd_usb>;
317 };
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>;
332         cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
333         disable-wp;
334         st,sig-dir;
335         st,neg-edge;
336         st,use-ckin;
337         bus-width = <4>;
338         vmmc-supply = <&vdd_sd>;
339         vqmmc-supply = <&sd_switch>;
340         sd-uhs-sdr12;
341         sd-uhs-sdr25;
342         sd-uhs-sdr50;
343         sd-uhs-ddr50;
344         status = "okay";
345 };
346
347 &sdmmc2 {
348         pinctrl-names = "default", "opendrain", "sleep";
349         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
350         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
351         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
352         non-removable;
353         no-sd;
354         no-sdio;
355         st,neg-edge;
356         bus-width = <8>;
357         vmmc-supply = <&v3v3>;
358         vqmmc-supply = <&vdd>;
359         mmc-ddr-3_3v;
360         status = "okay";
361 };
362
363 &timers6 {
364         status = "okay";
365         /* spare dmas for other usage */
366         /delete-property/dmas;
367         /delete-property/dma-names;
368         timer@5 {
369                 status = "okay";
370         };
371 };
372
373 &uart4 {
374         pinctrl-names = "default", "sleep", "idle";
375         pinctrl-0 = <&uart4_pins_a>;
376         pinctrl-1 = <&uart4_sleep_pins_a>;
377         pinctrl-2 = <&uart4_idle_pins_a>;
378         /delete-property/dmas;
379         /delete-property/dma-names;
380         status = "okay";
381 };
382
383 &usbotg_hs {
384         vbus-supply = <&vbus_otg>;
385 };
386
387 &usbphyc_port0 {
388         phy-supply = <&vdd_usb>;
389 };
390
391 &usbphyc_port1 {
392         phy-supply = <&vdd_usb>;
393 };