]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/arm/stm32mp157c-emstamp-argon.dtsi
Import device-tree files from Linux 6.4
[FreeBSD/FreeBSD.git] / src / arm / stm32mp157c-emstamp-argon.dtsi
1 // SPDX-License-Identifier: (GPL-2.0 or MIT)
2 //
3 // Copyright (c) 2021 emtrion GmbH
4 // Author: Reinhold Müller <reinhold.mueller@emtrion.de>.
5 //
6
7 #include "stm32mp157.dtsi"
8 #include "stm32mp15xc.dtsi"
9 #include "stm32mp15-pinctrl.dtsi"
10 #include "stm32mp15xxac-pinctrl.dtsi"
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/mfd/st,stpmic1.h>
13
14 / {
15         aliases {
16                 ethernet0 = &ethernet0;
17                 serial0 = &uart4;
18                 serial1 = &usart2;
19                 serial2 = &usart3;
20         };
21
22         chosen {
23                 stdout-path = "serial0:115200n8";
24         };
25
26         memory@c0000000 {
27                 device_type = "memory";
28                 reg = <0xc0000000 0x20000000>;
29         };
30
31         reserved-memory {
32                 #address-cells = <1>;
33                 #size-cells = <1>;
34                 ranges;
35
36                 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 0x2000>;
45                         no-map;
46                 };
47
48                 vdev0vring1: vdev0vring1@10042000 {
49                         compatible = "shared-dma-pool";
50                         reg = <0x10042000 0x2000>;
51                         no-map;
52                 };
53
54                 vdev0buffer: vdev0buffer@10044000 {
55                         compatible = "shared-dma-pool";
56                         reg = <0x10044000 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         };
72
73         led: gpio_leds {
74                 compatible = "gpio-leds";
75                 led-0 {
76                         label = "panic";
77                         gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
78                         linux,default-trigger = "none";
79                         default-state = "off";
80                         panic-indicator;
81                 };
82                 led-1 {
83                         label = "heartbeat";
84                         gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
85                         linux,default-trigger = "heartbeat";
86                         default-state = "on";
87                 };
88         };
89 };
90
91 &adc {
92         vdd-supply = <&vdd>;
93         vdda-supply = <&vdd>;
94         vref-supply = <&vrefbuf>;
95         status = "okay";
96
97         adc1: adc@0 {
98                 pinctrl-names = "default";
99                 pinctrl-0 = <&adc1_in6_pins_a>;
100                 st,min-sample-time-nsecs = <5000>;
101                 st,adc-channels = <6>;
102                 status = "disabled";
103         };
104
105         adc2: adc@100 {
106                 #address-cells = <1>;
107                 #size-cells = <0>;
108                 status = "okay";
109                 channel@12 {
110                         reg = <12>;
111                         label = "sense_temp";
112                         st,min-sample-time-ns = <9000>;
113                 };
114                 channel@15 {
115                         reg = <15>;
116                         label = "vbat";
117                         st,min-sample-time-ns = <9000>;
118                 };
119                 channel@16 {
120                         reg = <16>;
121                         label = "dac_out1";
122                         st,min-sample-time-ns = <9000>;
123                 };
124                 channel@17 {
125                         reg = <17>;
126                         label = "dac_out1";
127                         st,min-sample-time-ns = <9000>;
128                 };
129         };
130 };
131
132 &crc1 {
133         status = "okay";
134 };
135
136 &cryp1 {
137         status = "okay";
138 };
139
140 &dac {
141         pinctrl-names = "default";
142         pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
143         vref-supply = <&vdda>;
144         status = "disabled";
145
146         dac1: dac@1 {
147                 status = "okay";
148         };
149         dac2: dac@2 {
150                 status = "okay";
151         };
152 };
153
154 &dts {
155         status = "okay";
156 };
157
158 &ethernet0 {
159         status = "okay";
160         snps,reset-gpio = <&gpioa 1 GPIO_ACTIVE_LOW>;
161         snps,reset-active-low;
162         snps,reset-delays-us = <0 30000 50000>;
163         pinctrl-0 = <&ethernet0_rmii_pins_b>;
164         pinctrl-1 = <&ethernet0_rmii_sleep_pins_b>;
165         pinctrl-names = "default", "sleep";
166         phy-mode = "rmii";
167         max-speed = <100>;
168         phy-handle = <&phy0>;
169         st,eth-ref-clk-sel;
170
171         mdio {
172                 #address-cells = <1>;
173                 #size-cells = <0>;
174                 compatible = "snps,dwmac-mdio";
175                 phy0: ethernet-phy@0 {
176                         reg = <0>;
177                 };
178         };
179 };
180
181 &hash1 {
182         status = "okay";
183 };
184
185 &i2c1 {
186         pinctrl-names = "default", "sleep";
187         pinctrl-0 = <&i2c1_pins_a>;
188         pinctrl-1 = <&i2c1_sleep_pins_a>;
189         i2c-scl-rising-time-ns = <100>;
190         i2c-scl-falling-time-ns = <7>;
191         status = "disabled";
192         /delete-property/dmas;
193         /delete-property/dma-names;
194 };
195
196 &i2c4 {
197         pinctrl-names = "default", "sleep";
198         pinctrl-0 = <&i2c4_pins_a>;
199         pinctrl-1 = <&i2c4_sleep_pins_a>;
200         i2c-scl-rising-time-ns = <185>;
201         i2c-scl-falling-time-ns = <20>;
202         status = "okay";
203         /delete-property/dmas;
204         /delete-property/dma-names;
205
206         pmic: stpmic@33 {
207                 compatible = "st,stpmic1";
208                 reg = <0x33>;
209                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
210                 interrupt-controller;
211                 #interrupt-cells = <2>;
212                 status = "okay";
213
214                 regulators {
215                         compatible = "st,stpmic1-regulators";
216
217                         ldo1-supply = <&v3v3>;
218                         ldo3-supply = <&vdd_ddr>;
219                         ldo6-supply = <&v3v3>;
220                         pwr_sw1-supply = <&bst_out>;
221                         pwr_sw2-supply = <&bst_out>;
222
223                         vddcore: buck1 {
224                                 regulator-name = "vddcore";
225                                 regulator-min-microvolt = <1200000>;
226                                 regulator-max-microvolt = <1350000>;
227                                 regulator-always-on;
228                                 regulator-initial-mode = <0>;
229                                 regulator-over-current-protection;
230                         };
231
232                         vdd_ddr: buck2 {
233                                 regulator-name = "vdd_ddr";
234                                 regulator-min-microvolt = <1350000>;
235                                 regulator-max-microvolt = <1350000>;
236                                 regulator-always-on;
237                                 regulator-initial-mode = <0>;
238                                 regulator-over-current-protection;
239                         };
240
241                         vdd: buck3 {
242                                 regulator-name = "vdd";
243                                 regulator-min-microvolt = <3300000>;
244                                 regulator-max-microvolt = <3300000>;
245                                 regulator-always-on;
246                                 st,mask-reset;
247                                 regulator-initial-mode = <0>;
248                                 regulator-over-current-protection;
249                         };
250
251                         v3v3: buck4 {
252                                 regulator-name = "v3v3";
253                                 regulator-min-microvolt = <3300000>;
254                                 regulator-max-microvolt = <3300000>;
255                                 regulator-always-on;
256                                 regulator-over-current-protection;
257                                 regulator-initial-mode = <0>;
258                         };
259
260                         v1v8_audio: ldo1 {
261                                 regulator-name = "v1v8_audio";
262                                 regulator-min-microvolt = <1800000>;
263                                 regulator-max-microvolt = <1800000>;
264                                 regulator-always-on;
265                                 interrupts = <IT_CURLIM_LDO1 0>;
266                         };
267
268                         v3v3_hdmi: ldo2 {
269                                 regulator-name = "v3v3_hdmi";
270                                 regulator-min-microvolt = <3300000>;
271                                 regulator-max-microvolt = <3300000>;
272                                 regulator-always-on;
273                                 interrupts = <IT_CURLIM_LDO2 0>;
274                         };
275
276                         vtt_ddr: ldo3 {
277                                 regulator-name = "vtt_ddr";
278                                 regulator-min-microvolt = <500000>;
279                                 regulator-max-microvolt = <750000>;
280                                 regulator-always-on;
281                                 regulator-over-current-protection;
282                         };
283
284                         vdd_usb: ldo4 {
285                                 regulator-name = "vdd_usb";
286                                 regulator-min-microvolt = <3300000>;
287                                 regulator-max-microvolt = <3300000>;
288                                 interrupts = <IT_CURLIM_LDO4 0>;
289                         };
290
291                         vdd_sd: ldo5 {
292                                 regulator-name = "vdd_sd";
293                                 regulator-min-microvolt = <3300000>;
294                                 regulator-max-microvolt = <3300000>;
295                                 interrupts = <IT_CURLIM_LDO5 0>;
296                                 regulator-always-on;
297                         };
298
299                         vdda: ldo6 {
300                                 regulator-name = "vdda";
301                                 regulator-min-microvolt = <2900000>;
302                                 regulator-max-microvolt = <2900000>;
303                                 regulator-always-on;
304                                 interrupts = <IT_CURLIM_LDO6 0>;
305                                 regulator-boot-on;
306                         };
307
308                         vref_ddr: vref_ddr {
309                                 regulator-name = "vref_ddr";
310                                 regulator-always-on;
311                                 regulator-over-current-protection;
312                         };
313
314                         bst_out: boost {
315                                 regulator-name = "bst_out";
316                                 interrupts = <IT_OCP_BOOST 0>;
317                         };
318
319                         vbus_otg: pwr_sw1 {
320                                 regulator-name = "vbus_otg";
321                                 interrupts = <IT_OCP_OTG 0>;
322                                 regulator-active-discharge;
323                         };
324
325                         vbus_usbh: pwr_sw2 {
326                                 regulator-name = "usbh_vbus";
327                                 interrupts = <IT_OCP_SWOUT 0>;
328                                 regulator-always-on;
329                                 regulator-boot-on;
330                         };
331                 };
332
333                 onkey {
334                         compatible = "st,stpmic1-onkey";
335                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
336                         interrupt-names = "onkey-falling", "onkey-rising";
337                         status = "okay";
338                 };
339
340                 watchdog {
341                         compatible = "st,stpmic1-wdt";
342                         status = "disabled";
343                 };
344         };
345 };
346
347 &i2c5 {
348         pinctrl-names = "default", "sleep";
349         pinctrl-0 = <&i2c5_pins_a>;
350         pinctrl-1 = <&i2c5_sleep_pins_a>;
351         i2c-scl-rising-time-ns = <185>;
352         i2c-scl-falling-time-ns = <20>;
353         /delete-property/dmas;
354         /delete-property/dma-names;
355 };
356
357 &ipcc {
358         status = "okay";
359 };
360
361 &iwdg2 {
362         timeout-sec = <32>;
363         status = "okay";
364 };
365
366 &m4_rproc {
367         memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
368                         <&vdev0vring1>, <&vdev0buffer>;
369         mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
370         mbox-names = "vq0", "vq1", "shutdown";
371         interrupt-parent = <&exti>;
372         interrupts = <68 1>;
373         interrupt-names = "wdg";
374         recovery;
375         status = "okay";
376 };
377
378 &pwr_regulators {
379         vdd-supply = <&vdd>;
380         vdd_3v3_usbfs-supply = <&vdd_usb>;
381 };
382
383 &qspi {
384         pinctrl-names = "default", "sleep";
385         pinctrl-0 = <&qspi_clk_pins_a
386                      &qspi_bk1_pins_a
387                      &qspi_cs1_pins_a>;
388         pinctrl-1 = <&qspi_clk_sleep_pins_a
389                      &qspi_bk1_sleep_pins_a
390                      &qspi_cs1_sleep_pins_a>;
391         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
392         #address-cells = <1>;
393         #size-cells = <0>;
394         status = "okay";
395
396         flash0: flash@0 {
397                 compatible = "jedec,spi-nor";
398                 reg = <0>;
399                 spi-max-frequency = <133000000>;
400                 spi-rx-bus-width = <1>;
401                 spi-tx-bus-width = <1>;
402                 #address-cells = <1>;
403                 #size-cells = <1>;
404         };
405 };
406
407 &rng1 {
408         status = "okay";
409 };
410
411 &rtc {
412         status = "okay";
413 };
414
415 &sdmmc2 {
416         arm,primecell-periphid = <0x10153180>;
417         pinctrl-names = "default", "opendrain", "sleep";
418         pinctrl-0 = <&sdmmc2_b4_pins_b>;
419         pinctrl-1 = <&sdmmc2_b4_od_pins_b>;
420         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
421         non-removable;
422         st,neg-edge;
423         bus-width = <4>;
424         vmmc-supply = <&v3v3>;
425         status = "okay";
426 };
427
428 &spi1 {
429         pinctrl-names = "default";
430         pinctrl-0 = <&spi1_pins_a>;
431         cs-gpios = <&gpioz 3 0>;
432         status = "disabled";
433 };
434
435 &timers1 {
436         /* spare dmas for other usage */
437         /delete-property/dmas;
438         /delete-property/dma-names;
439         pwm {
440                 pinctrl-0 = <&pwm1_pins_b>;
441                 pinctrl-1 = <&pwm1_sleep_pins_b>;
442                 pinctrl-names = "default", "sleep";
443                 status = "okay";
444         };
445         timer@0 {
446                 status = "okay";
447         };
448 };
449
450 &timers4 {
451         /delete-property/dmas;
452         /delete-property/dma-names;
453         pwm {
454                 pinctrl-0 = <&pwm4_pins_b>;
455                 pinctrl-1 = <&pwm4_sleep_pins_b>;
456                 pinctrl-names = "default", "sleep";
457                 status = "okay";
458         };
459         timer@3 {
460                 status = "okay";
461         };
462 };
463
464 &timers5 {
465         /delete-property/dmas;
466         /delete-property/dma-names;
467         pwm {
468                 pinctrl-0 = <&pwm5_pins_a>;
469                 pinctrl-1 = <&pwm5_sleep_pins_a>;
470                 pinctrl-names = "default", "sleep";
471                 status = "okay";
472         };
473         timer@4 {
474                 status = "okay";
475         };
476 };
477
478 &uart4 {
479         pinctrl-names = "default", "sleep", "idle";
480         pinctrl-0 = <&uart4_pins_a>;
481         pinctrl-1 = <&uart4_sleep_pins_a>;
482         pinctrl-2 = <&uart4_idle_pins_a>;
483         status = "okay";
484 };
485
486 &usart2 {
487         pinctrl-names = "default", "sleep";
488         pinctrl-0 = <&usart2_pins_a>;
489         pinctrl-1 = <&usart2_sleep_pins_a>;
490         status = "okay";
491 };
492
493 &usart3 {
494         pinctrl-names = "default", "sleep", "idle";
495         pinctrl-0 = <&usart3_pins_d>;
496         pinctrl-1 = <&usart3_sleep_pins_d>;
497         pinctrl-2 = <&usart3_idle_pins_d>;
498         status = "okay";
499 };
500
501 &usbh_ehci {
502         phys = <&usbphyc_port0>;
503         phy-names = "usb";
504         status = "okay";
505 };
506
507 &usbh_ohci {
508         phys = <&usbphyc_port0>;
509         phy-names = "usb";
510         status = "okay";
511 };
512
513 &usbotg_hs {
514         dr_mode = "peripheral";
515         pinctrl-names = "default";
516         pinctrl-0 = <&usbotg_hs_pins_a>;
517         phy-names = "usb2-phy";
518         phys = <&usbphyc_port1 0>;
519         vbus-supply = <&vbus_otg>;
520         status = "okay";
521 };
522
523 &usbphyc {
524         status = "okay";
525 };
526
527 &usbphyc_port0 {
528         phy-supply = <&vdd_usb>;
529 };
530
531 &usbphyc_port1 {
532         phy-supply = <&vdd_usb>;
533 };
534
535 &vrefbuf {
536         regulator-min-microvolt = <2500000>;
537         regulator-max-microvolt = <2500000>;
538         vdda-supply = <&vdd>;
539         status = "okay";
540 };
541