Debian Codegraph @

arch/arm/boot/dts/st/stm32mp135f-dk.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2 /*
3 * Copyright (C) STMicroelectronics 2021 - All Rights Reserved
4 * Author: Alexandre Torgue <[email protected]> for STMicroelectronics.
5 */
6
7 /dts-v1/;
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/regulator/st,stm32mp13-regulator.h>
13 #include "stm32mp135.dtsi"
14 #include "stm32mp13xf.dtsi"
15 #include "stm32mp13-pinctrl.dtsi"
16
17 / {
18 model = "STMicroelectronics STM32MP135F-DK Discovery Board";
19 compatible = "st,stm32mp135f-dk", "st,stm32mp135";
20
21 aliases {
22 ethernet0 = &ethernet1;
23 serial0 = &uart4;
24 serial1 = &usart1;
25 serial2 = &uart8;
26 serial3 = &usart2;
27 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
33 clocks {
34 clk_ext_camera: clk-ext-camera {
35 #clock-cells = <0>;
36 compatible = "fixed-clock";
37 clock-frequency = <24000000>;
38 };
39
40 clk_mco1: clk-mco1 {
41 #clock-cells = <0>;
42 compatible = "fixed-clock";
43 clock-frequency = <24000000>;
44 };
45 };
46
47 memory@c0000000 {
48 device_type = "memory";
49 reg = <0xc0000000 0x20000000>;
50 };
51
52 reserved-memory {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 ranges;
56
57 optee@dd000000 {
58 reg = <0xdd000000 0x3000000>;
59 no-map;
60 };
61 };
62
63 gpio-keys {
64 compatible = "gpio-keys";
65
66 button-user {
67 label = "User-PA13";
68 linux,code = <BTN_1>;
69 gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
70 };
71 };
72
73 leds {
74 compatible = "gpio-leds";
75
76 led_blue: led-blue {
77 function = LED_FUNCTION_HEARTBEAT;
78 color = <LED_COLOR_ID_BLUE>;
79 gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
80 linux,default-trigger = "heartbeat";
81 default-state = "off";
82 };
83
84 led-red {
85 function = LED_FUNCTION_STATUS;
86 color = <LED_COLOR_ID_RED>;
87 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
88 };
89 };
90
91 options {
92 u-boot {
93 compatible = "u-boot,config";
94 boot-led = <&led_blue>;
95 };
96 };
97
98 panel_backlight: panel-backlight {
99 compatible = "gpio-backlight";
100 gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
101 default-on;
102 status = "okay";
103 };
104
105 panel_rgb: panel-rgb {
106 compatible = "rocktech,rk043fn48h";
107 enable-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
108 backlight = <&panel_backlight>;
109 power-supply = <&scmi_v3v3_sw>;
110 status = "okay";
111
112 width-mm = <105>;
113 height-mm = <67>;
114
115 panel-timing {
116 clock-frequency = <10000000>;
117 hactive = <480>;
118 hback-porch = <43>;
119 hfront-porch = <10>;
120 hsync-len = <1>;
121 hsync-active = <0>;
122 vactive = <272>;
123 vback-porch = <26>;
124 vfront-porch = <4>;
125 vsync-len = <10>;
126 vsync-active = <0>;
127 de-active = <1>;
128 pixelclk-active = <1>;
129 };
130
131 port {
132 panel_in_rgb: endpoint {
133 remote-endpoint = <&ltdc_out_rgb>;
134 };
135 };
136 };
137
138 v3v3_ao: v3v3-ao {
139 compatible = "regulator-fixed";
140 regulator-name = "v3v3_ao";
141 regulator-min-microvolt = <3300000>;
142 regulator-max-microvolt = <3300000>;
143 regulator-always-on;
144 };
145
146 wifi_pwrseq: wifi-pwrseq {
147 compatible = "mmc-pwrseq-simple";
148 reset-gpios = <&mcp23017 11 GPIO_ACTIVE_LOW>;
149 };
150 };
151
152 &adc_1 {
153 pinctrl-names = "default";
154 pinctrl-0 = <&adc1_usb_cc_pins_a>;
155 vdda-supply = <&scmi_vdd_adc>;
156 vref-supply = <&scmi_vdd_adc>;
157 status = "okay";
158 adc1: adc@0 {
159 status = "okay";
160 /*
161 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
162 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
163 * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
164 * Use arbitrary margin here (e.g. 5us).
165 */
166 channel@6 {
167 reg = <6>;
168 st,min-sample-time-ns = <5000>;
169 };
170 channel@12 {
171 reg = <12>;
172 st,min-sample-time-ns = <5000>;
173 };
174 };
175 };
176
177 &arm_wdt {
178 timeout-sec = <32>;
179 status = "okay";
180 };
181
182 &crc1 {
183 status = "okay";
184 };
185
186 &cryp {
187 status = "okay";
188 };
189
190 &dcmipp {
191 pinctrl-names = "default", "sleep";
192 pinctrl-0 = <&dcmipp_pins_a>;
193 pinctrl-1 = <&dcmipp_sleep_pins_a>;
194 status = "okay";
195
196 port {
197 dcmipp_0: endpoint {
198 remote-endpoint = <&mipid02_2>;
199 bus-width = <8>;
200 hsync-active = <0>;
201 vsync-active = <0>;
202 pclk-sample = <0>;
203 };
204 };
205 };
206
207 &ethernet1 {
208 status = "okay";
209 pinctrl-0 = <&eth1_rmii_pins_a>;
210 pinctrl-1 = <&eth1_rmii_sleep_pins_a>;
211 pinctrl-names = "default", "sleep";
212 phy-mode = "rmii";
213 phy-handle = <&phy0_eth1>;
214
215 mdio {
216 #address-cells = <1>;
217 #size-cells = <0>;
218 compatible = "snps,dwmac-mdio";
219
220 phy0_eth1: ethernet-phy@0 {
221 compatible = "ethernet-phy-id0007.c131";
222 reg = <0>;
223 reset-gpios = <&mcp23017 9 GPIO_ACTIVE_LOW>;
224 wakeup-source;
225 };
226 };
227 };
228
229 &i2c1 {
230 pinctrl-names = "default", "sleep";
231 pinctrl-0 = <&i2c1_pins_a>;
232 pinctrl-1 = <&i2c1_sleep_pins_a>;
233 i2c-scl-rising-time-ns = <96>;
234 i2c-scl-falling-time-ns = <3>;
235 clock-frequency = <1000000>;
236 status = "okay";
237 /* spare dmas for other usage */
238 /delete-property/dmas;
239 /delete-property/dma-names;
240
241 mcp23017: pinctrl@21 {
242 compatible = "microchip,mcp23017";
243 reg = <0x21>;
244 gpio-controller;
245 #gpio-cells = <2>;
246 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
247 interrupt-parent = <&gpiog>;
248 pinctrl-names = "default";
249 pinctrl-0 = <&mcp23017_pins_a>;
250 interrupt-controller;
251 #interrupt-cells = <2>;
252 microchip,irq-mirror;
253 };
254
255 typec@53 {
256 compatible = "st,stm32g0-typec";
257 reg = <0x53>;
258 /* Alert pin on PI2 */
259 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
260 interrupt-parent = <&gpioi>;
261 /* Internal pull-up on PI2 */
262 pinctrl-names = "default";
263 pinctrl-0 = <&stm32g0_intn_pins_a>;
264 firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
265 connector {
266 compatible = "usb-c-connector";
267 label = "USB-C";
268
269 port {
270 con_usb_c_g0_ep: endpoint {
271 remote-endpoint = <&usbotg_hs_ep>;
272 };
273 };
274 };
275 };
276 };
277
278 &i2c5 {
279 pinctrl-names = "default", "sleep";
280 pinctrl-0 = <&i2c5_pins_a>;
281 pinctrl-1 = <&i2c5_sleep_pins_a>;
282 i2c-scl-rising-time-ns = <170>;
283 i2c-scl-falling-time-ns = <5>;
284 clock-frequency = <400000>;
285 status = "okay";
286 /* spare dmas for other usage */
287 /delete-property/dmas;
288 /delete-property/dma-names;
289
290 stmipi: csi2rx@14 {
291 compatible = "st,st-mipid02";
292 reg = <0x14>;
293 clocks = <&clk_mco1>;
294 clock-names = "xclk";
295 VDDE-supply = <&scmi_v1v8_periph>;
296 VDDIN-supply = <&scmi_v1v8_periph>;
297 reset-gpios = <&mcp23017 2 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
298 status = "okay";
299
300 ports {
301 #address-cells = <1>;
302 #size-cells = <0>;
303 port@0 {
304 reg = <0>;
305
306 mipid02_0: endpoint {
307 data-lanes = <1 2>;
308 lane-polarities = <0 0 0>;
309 remote-endpoint = <&gc2145_ep>;
310 };
311 };
312 port@2 {
313 reg = <2>;
314
315 mipid02_2: endpoint {
316 bus-width = <8>;
317 hsync-active = <0>;
318 vsync-active = <0>;
319 pclk-sample = <0>;
320 remote-endpoint = <&dcmipp_0>;
321 };
322 };
323 };
324 };
325
326 gc2145: camera@3c {
327 compatible = "galaxycore,gc2145";
328 reg = <0x3c>;
329 clocks = <&clk_ext_camera>;
330 iovdd-supply = <&scmi_v3v3_sw>;
331 avdd-supply = <&scmi_v3v3_sw>;
332 dvdd-supply = <&scmi_v3v3_sw>;
333 powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
334 reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
335 status = "okay";
336
337 port {
338 gc2145_ep: endpoint {
339 remote-endpoint = <&mipid02_0>;
340 data-lanes = <1 2>;
341 link-frequencies = /bits/ 64 <120000000 192000000 240000000>;
342 };
343 };
344 };
345
346 goodix: goodix-ts@5d {
347 compatible = "goodix,gt911";
348 reg = <0x5d>;
349 pinctrl-names = "default";
350 pinctrl-0 = <&goodix_pins_a>;
351 interrupt-parent = <&gpiof>;
352 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
353 AVDD28-supply = <&scmi_v3v3_sw>;
354 VDDIO-supply = <&scmi_v3v3_sw>;
355 touchscreen-size-x = <480>;
356 touchscreen-size-y = <272>;
357 status = "okay" ;
358 };
359 };
360
361 &iwdg2 {
362 timeout-sec = <32>;
363 status = "okay";
364 };
365
366 &ltdc {
367 pinctrl-names = "default", "sleep";
368 pinctrl-0 = <&ltdc_pins_a>;
369 pinctrl-1 = <&ltdc_sleep_pins_a>;
370 status = "okay";
371
372 port {
373 ltdc_out_rgb: endpoint {
374 remote-endpoint = <&panel_in_rgb>;
375 };
376 };
377 };
378
379 &rtc {
380 pinctrl-names = "default";
381 pinctrl-0 = <&rtc_rsvd_pins_a>;
382 status = "okay";
383
384 rtc_lsco_pins_a: rtc-lsco-0 {
385 pins = "out2_rmp";
386 function = "lsco";
387 };
388 };
389
390 &scmi_regu {
391 scmi_vdd_adc: regulator@10 {
392 reg = <VOLTD_SCMI_STPMIC1_LDO1>;
393 regulator-name = "vdd_adc";
394 };
395 scmi_vdd_usb: regulator@13 {
396 reg = <VOLTD_SCMI_STPMIC1_LDO4>;
397 regulator-name = "vdd_usb";
398 };
399 scmi_vdd_sd: regulator@14 {
400 reg = <VOLTD_SCMI_STPMIC1_LDO5>;
401 regulator-name = "vdd_sd";
402 };
403 scmi_v1v8_periph: regulator@15 {
404 reg = <VOLTD_SCMI_STPMIC1_LDO6>;
405 regulator-name = "v1v8_periph";
406 };
407 scmi_v3v3_sw: regulator@19 {
408 reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
409 regulator-name = "v3v3_sw";
410 };
411 };
412
413 &sdmmc1 {
414 pinctrl-names = "default", "opendrain", "sleep";
415 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
416 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
417 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
418 cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
419 disable-wp;
420 st,neg-edge;
421 bus-width = <4>;
422 vmmc-supply = <&scmi_vdd_sd>;
423 status = "okay";
424 };
425
426 /* Wifi */
427 &sdmmc2 {
428 pinctrl-names = "default", "opendrain", "sleep";
429 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_clk_pins_a>;
430 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_clk_pins_a>;
431 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
432 non-removable;
433 cap-sdio-irq;
434 st,neg-edge;
435 bus-width = <4>;
436 vmmc-supply = <&v3v3_ao>;
437 mmc-pwrseq = <&wifi_pwrseq>;
438 #address-cells = <1>;
439 #size-cells = <0>;
440 status = "okay";
441
442 brcmf: wifi@1 {
443 reg = <1>;
444 compatible = "brcm,bcm4329-fmac";
445 pinctrl-names = "default";
446 pinctrl-0 = <&rtc_lsco_pins_a>;
447 };
448 };
449
450 &spi5 {
451 pinctrl-names = "default", "sleep";
452 pinctrl-0 = <&spi5_pins_a>;
453 pinctrl-1 = <&spi5_sleep_pins_a>;
454 status = "disabled";
455 };
456
457 &timers3 {
458 /delete-property/dmas;
459 /delete-property/dma-names;
460 status = "disabled";
461 counter {
462 status = "okay";
463 };
464 pwm {
465 /* PWM output on pin 7 of the expansion connector (CN8.7) using TIM3_CH4 func */
466 pinctrl-0 = <&pwm3_pins_a>;
467 pinctrl-1 = <&pwm3_sleep_pins_a>;
468 pinctrl-names = "default", "sleep";
469 status = "okay";
470 };
471 timer@2 {
472 status = "okay";
473 };
474 };
475
476 &timers4 {
477 /delete-property/dmas;
478 /delete-property/dma-names;
479 status = "disabled";
480 counter {
481 status = "okay";
482 };
483 pwm {
484 /* PWM output on pin 31 of the expansion connector (CN8.31) using TIM4_CH2 func */
485 pinctrl-0 = <&pwm4_pins_a>;
486 pinctrl-1 = <&pwm4_sleep_pins_a>;
487 pinctrl-names = "default", "sleep";
488 status = "okay";
489 };
490 timer@3 {
491 status = "okay";
492 };
493 };
494
495 &timers8 {
496 /delete-property/dmas;
497 /delete-property/dma-names;
498 status = "disabled";
499 counter {
500 status = "okay";
501 };
502 pwm {
503 /* PWM output on pin 32 of the expansion connector (CN8.32) using TIM8_CH3 func */
504 pinctrl-0 = <&pwm8_pins_a>;
505 pinctrl-1 = <&pwm8_sleep_pins_a>;
506 pinctrl-names = "default", "sleep";
507 status = "okay";
508 };
509 timer@7 {
510 status = "okay";
511 };
512 };
513
514 &timers14 {
515 status = "disabled";
516 counter {
517 status = "okay";
518 };
519 pwm {
520 /* PWM output on pin 33 of the expansion connector (CN8.33) using TIM14_CH1 func */
521 pinctrl-0 = <&pwm14_pins_a>;
522 pinctrl-1 = <&pwm14_sleep_pins_a>;
523 pinctrl-names = "default", "sleep";
524 status = "okay";
525 };
526 timer@13 {
527 status = "okay";
528 };
529 };
530
531 &uart4 {
532 pinctrl-names = "default", "sleep", "idle";
533 pinctrl-0 = <&uart4_pins_a>;
534 pinctrl-1 = <&uart4_sleep_pins_a>;
535 pinctrl-2 = <&uart4_idle_pins_a>;
536 /delete-property/dmas;
537 /delete-property/dma-names;
538 status = "okay";
539 };
540
541 &uart8 {
542 pinctrl-names = "default", "sleep", "idle";
543 pinctrl-0 = <&uart8_pins_a>;
544 pinctrl-1 = <&uart8_sleep_pins_a>;
545 pinctrl-2 = <&uart8_idle_pins_a>;
546 /delete-property/dmas;
547 /delete-property/dma-names;
548 status = "disabled";
549 };
550
551 &usart1 {
552 pinctrl-names = "default", "sleep", "idle";
553 pinctrl-0 = <&usart1_pins_a>;
554 pinctrl-1 = <&usart1_sleep_pins_a>;
555 pinctrl-2 = <&usart1_idle_pins_a>;
556 uart-has-rtscts;
557 status = "disabled";
558 };
559
560 /* Bluetooth */
561 &usart2 {
562 pinctrl-names = "default", "sleep", "idle";
563 pinctrl-0 = <&usart2_pins_a>;
564 pinctrl-1 = <&usart2_sleep_pins_a>;
565 pinctrl-2 = <&usart2_idle_pins_a>;
566 uart-has-rtscts;
567 status = "okay";
568
569 bluetooth {
570 shutdown-gpios = <&mcp23017 13 GPIO_ACTIVE_HIGH>;
571 compatible = "brcm,bcm43438-bt";
572 max-speed = <3000000>;
573 vbat-supply = <&v3v3_ao>;
574 vddio-supply = <&v3v3_ao>;
575 };
576 };
577
578 &usbh_ehci {
579 phys = <&usbphyc_port0>;
580 status = "okay";
581 #address-cells = <1>;
582 #size-cells = <0>;
583 /* onboard HUB */
584 hub@1 {
585 compatible = "usb424,2514";
586 reg = <1>;
587 vdd-supply = <&scmi_v3v3_sw>;
588 };
589 };
590
591 &usbotg_hs {
592 phys = <&usbphyc_port1 0>;
593 phy-names = "usb2-phy";
594 usb-role-switch;
595 status = "okay";
596 port {
597 usbotg_hs_ep: endpoint {
598 remote-endpoint = <&con_usb_c_g0_ep>;
599 };
600 };
601 };
602
603 &usbphyc {
604 status = "okay";
605 };
606
607 &usbphyc_port0 {
608 phy-supply = <&scmi_vdd_usb>;
609 st,current-boost-microamp = <1000>;
610 st,decrease-hs-slew-rate;
611 st,tune-hs-dc-level = <2>;
612 st,enable-hs-rftime-reduction;
613 st,trim-hs-current = <11>;
614 st,trim-hs-impedance = <2>;
615 st,tune-squelch-level = <1>;
616 st,enable-hs-rx-gain-eq;
617 st,no-hs-ftime-ctrl;
618 st,no-lsfs-sc;
619 };
620
621 &usbphyc_port1 {
622 phy-supply = <&scmi_vdd_usb>;
623 st,current-boost-microamp = <1000>;
624 st,decrease-hs-slew-rate;
625 st,tune-hs-dc-level = <2>;
626 st,enable-hs-rftime-reduction;
627 st,trim-hs-current = <11>;
628 st,trim-hs-impedance = <2>;
629 st,tune-squelch-level = <1>;
630 st,enable-hs-rx-gain-eq;
631 st,no-hs-ftime-ctrl;
632 st,no-lsfs-sc;
633 };