blob: 1af335a39993b176e570e6fdd01ee8d4886a4e7f [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) STMicroelectronics 2021 - All Rights Reserved
4 * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> 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 {
Tom Rini6b642ac2024-10-01 12:20:28 -060022 ethernet0 = &ethernet1;
Tom Rini53633a82024-02-29 12:33:36 -050023 serial0 = &uart4;
24 serial1 = &usart1;
25 serial2 = &uart8;
26 serial3 = &usart2;
27 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
Tom Rini6b642ac2024-10-01 12:20:28 -060033 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
Tom Rini53633a82024-02-29 12:33:36 -050047 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 {
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 };
Tom Rini762f85b2024-07-20 11:15:10 -060084
85 panel_backlight: panel-backlight {
86 compatible = "gpio-backlight";
87 gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>;
88 default-on;
89 status = "okay";
90 };
91
92 panel_rgb: panel-rgb {
93 compatible = "rocktech,rk043fn48h";
94 enable-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
95 backlight = <&panel_backlight>;
96 power-supply = <&scmi_v3v3_sw>;
97 status = "okay";
98
99 width-mm = <105>;
100 height-mm = <67>;
101
102 panel-timing {
103 clock-frequency = <10000000>;
104 hactive = <480>;
105 hback-porch = <43>;
106 hfront-porch = <10>;
107 hsync-len = <1>;
108 hsync-active = <0>;
109 vactive = <272>;
110 vback-porch = <26>;
111 vfront-porch = <4>;
112 vsync-len = <10>;
113 vsync-active = <0>;
114 de-active = <1>;
115 pixelclk-active = <1>;
116 };
117
118 port {
119 panel_in_rgb: endpoint {
120 remote-endpoint = <&ltdc_out_rgb>;
121 };
122 };
123 };
Tom Rini53633a82024-02-29 12:33:36 -0500124};
125
126&adc_1 {
127 pinctrl-names = "default";
128 pinctrl-0 = <&adc1_usb_cc_pins_a>;
129 vdda-supply = <&scmi_vdd_adc>;
130 vref-supply = <&scmi_vdd_adc>;
131 status = "okay";
132 adc1: adc@0 {
133 status = "okay";
134 /*
135 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
136 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
137 * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
138 * Use arbitrary margin here (e.g. 5us).
139 */
140 channel@6 {
141 reg = <6>;
142 st,min-sample-time-ns = <5000>;
143 };
144 channel@12 {
145 reg = <12>;
146 st,min-sample-time-ns = <5000>;
147 };
148 };
149};
150
Tom Rini6bb92fc2024-05-20 09:54:58 -0600151&crc1 {
152 status = "okay";
153};
154
155&cryp {
156 status = "okay";
157};
158
Tom Rini6b642ac2024-10-01 12:20:28 -0600159&dcmipp {
160 pinctrl-names = "default", "sleep";
161 pinctrl-0 = <&dcmipp_pins_a>;
162 pinctrl-1 = <&dcmipp_sleep_pins_a>;
163 status = "okay";
164
165 port {
166 dcmipp_0: endpoint {
167 remote-endpoint = <&mipid02_2>;
168 bus-width = <8>;
169 hsync-active = <0>;
170 vsync-active = <0>;
171 pclk-sample = <0>;
172 };
173 };
174};
175
176&ethernet1 {
177 status = "okay";
178 pinctrl-0 = <&eth1_rmii_pins_a>;
179 pinctrl-1 = <&eth1_rmii_sleep_pins_a>;
180 pinctrl-names = "default", "sleep";
181 phy-mode = "rmii";
182 phy-handle = <&phy0_eth1>;
183
184 mdio {
185 #address-cells = <1>;
186 #size-cells = <0>;
187 compatible = "snps,dwmac-mdio";
188
189 phy0_eth1: ethernet-phy@0 {
190 compatible = "ethernet-phy-id0007.c131";
191 reg = <0>;
192 reset-gpios = <&mcp23017 9 GPIO_ACTIVE_LOW>;
193 wakeup-source;
194 };
195 };
196};
197
Tom Rini53633a82024-02-29 12:33:36 -0500198&i2c1 {
199 pinctrl-names = "default", "sleep";
200 pinctrl-0 = <&i2c1_pins_a>;
201 pinctrl-1 = <&i2c1_sleep_pins_a>;
202 i2c-scl-rising-time-ns = <96>;
203 i2c-scl-falling-time-ns = <3>;
204 clock-frequency = <1000000>;
205 status = "okay";
206 /* spare dmas for other usage */
207 /delete-property/dmas;
208 /delete-property/dma-names;
209
210 mcp23017: pinctrl@21 {
211 compatible = "microchip,mcp23017";
212 reg = <0x21>;
213 gpio-controller;
214 #gpio-cells = <2>;
215 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
216 interrupt-parent = <&gpiog>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&mcp23017_pins_a>;
219 interrupt-controller;
220 #interrupt-cells = <2>;
221 microchip,irq-mirror;
222 };
223
224 typec@53 {
225 compatible = "st,stm32g0-typec";
226 reg = <0x53>;
227 /* Alert pin on PI2 */
228 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
229 interrupt-parent = <&gpioi>;
230 /* Internal pull-up on PI2 */
231 pinctrl-names = "default";
232 pinctrl-0 = <&stm32g0_intn_pins_a>;
233 firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
234 connector {
235 compatible = "usb-c-connector";
236 label = "USB-C";
237
238 port {
239 con_usb_c_g0_ep: endpoint {
240 remote-endpoint = <&usbotg_hs_ep>;
241 };
242 };
243 };
244 };
245};
246
247&i2c5 {
248 pinctrl-names = "default", "sleep";
249 pinctrl-0 = <&i2c5_pins_a>;
250 pinctrl-1 = <&i2c5_sleep_pins_a>;
251 i2c-scl-rising-time-ns = <170>;
252 i2c-scl-falling-time-ns = <5>;
253 clock-frequency = <400000>;
254 status = "okay";
255 /* spare dmas for other usage */
256 /delete-property/dmas;
257 /delete-property/dma-names;
Tom Rini6b642ac2024-10-01 12:20:28 -0600258
259 stmipi: csi2rx@14 {
260 compatible = "st,st-mipid02";
261 reg = <0x14>;
262 clocks = <&clk_mco1>;
263 clock-names = "xclk";
264 VDDE-supply = <&scmi_v1v8_periph>;
265 VDDIN-supply = <&scmi_v1v8_periph>;
266 reset-gpios = <&mcp23017 2 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
267 status = "okay";
268
269 ports {
270 #address-cells = <1>;
271 #size-cells = <0>;
272 port@0 {
273 reg = <0>;
274
275 mipid02_0: endpoint {
276 data-lanes = <1 2>;
277 lane-polarities = <0 0 0>;
278 remote-endpoint = <&gc2145_ep>;
279 };
280 };
281 port@2 {
282 reg = <2>;
283
284 mipid02_2: endpoint {
285 bus-width = <8>;
286 hsync-active = <0>;
287 vsync-active = <0>;
288 pclk-sample = <0>;
289 remote-endpoint = <&dcmipp_0>;
290 };
291 };
292 };
293 };
294
295 gc2145: camera@3c {
296 compatible = "galaxycore,gc2145";
297 reg = <0x3c>;
298 clocks = <&clk_ext_camera>;
299 iovdd-supply = <&scmi_v3v3_sw>;
300 avdd-supply = <&scmi_v3v3_sw>;
301 dvdd-supply = <&scmi_v3v3_sw>;
302 powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
303 reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
304 status = "okay";
305
306 port {
307 gc2145_ep: endpoint {
308 remote-endpoint = <&mipid02_0>;
309 data-lanes = <1 2>;
310 link-frequencies = /bits/ 64 <120000000 192000000 240000000>;
311 };
312 };
313 };
314
315 goodix: goodix-ts@5d {
316 compatible = "goodix,gt911";
317 reg = <0x5d>;
318 pinctrl-names = "default";
319 pinctrl-0 = <&goodix_pins_a>;
320 interrupt-parent = <&gpiof>;
321 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
322 AVDD28-supply = <&scmi_v3v3_sw>;
323 VDDIO-supply = <&scmi_v3v3_sw>;
324 touchscreen-size-x = <480>;
325 touchscreen-size-y = <272>;
326 status = "okay" ;
327 };
Tom Rini53633a82024-02-29 12:33:36 -0500328};
329
330&iwdg2 {
331 timeout-sec = <32>;
332 status = "okay";
333};
334
Tom Rini762f85b2024-07-20 11:15:10 -0600335&ltdc {
336 pinctrl-names = "default", "sleep";
337 pinctrl-0 = <&ltdc_pins_a>;
338 pinctrl-1 = <&ltdc_sleep_pins_a>;
339 status = "okay";
340
341 port {
342 ltdc_out_rgb: endpoint {
343 remote-endpoint = <&panel_in_rgb>;
344 };
345 };
346};
347
Tom Rini53633a82024-02-29 12:33:36 -0500348&rtc {
349 status = "okay";
350};
351
352&scmi_regu {
353 scmi_vdd_adc: regulator@10 {
354 reg = <VOLTD_SCMI_STPMIC1_LDO1>;
355 regulator-name = "vdd_adc";
356 };
357 scmi_vdd_usb: regulator@13 {
358 reg = <VOLTD_SCMI_STPMIC1_LDO4>;
359 regulator-name = "vdd_usb";
360 };
361 scmi_vdd_sd: regulator@14 {
362 reg = <VOLTD_SCMI_STPMIC1_LDO5>;
363 regulator-name = "vdd_sd";
364 };
365 scmi_v1v8_periph: regulator@15 {
366 reg = <VOLTD_SCMI_STPMIC1_LDO6>;
367 regulator-name = "v1v8_periph";
368 };
369 scmi_v3v3_sw: regulator@19 {
370 reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
371 regulator-name = "v3v3_sw";
372 };
373};
374
375&sdmmc1 {
376 pinctrl-names = "default", "opendrain", "sleep";
377 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
378 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
379 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
380 cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
381 disable-wp;
382 st,neg-edge;
383 bus-width = <4>;
384 vmmc-supply = <&scmi_vdd_sd>;
385 status = "okay";
386};
387
388&spi5 {
389 pinctrl-names = "default", "sleep";
390 pinctrl-0 = <&spi5_pins_a>;
391 pinctrl-1 = <&spi5_sleep_pins_a>;
392 status = "disabled";
393};
394
395&timers3 {
396 /delete-property/dmas;
397 /delete-property/dma-names;
398 status = "disabled";
399 pwm {
Tom Rini6b642ac2024-10-01 12:20:28 -0600400 /* PWM output on pin 7 of the expansion connector (CN8.7) using TIM3_CH4 func */
Tom Rini53633a82024-02-29 12:33:36 -0500401 pinctrl-0 = <&pwm3_pins_a>;
402 pinctrl-1 = <&pwm3_sleep_pins_a>;
403 pinctrl-names = "default", "sleep";
404 status = "okay";
405 };
406 timer@2 {
407 status = "okay";
408 };
409};
410
411&timers4 {
412 /delete-property/dmas;
413 /delete-property/dma-names;
414 status = "disabled";
415 pwm {
Tom Rini6b642ac2024-10-01 12:20:28 -0600416 /* PWM output on pin 31 of the expansion connector (CN8.31) using TIM4_CH2 func */
Tom Rini53633a82024-02-29 12:33:36 -0500417 pinctrl-0 = <&pwm4_pins_a>;
418 pinctrl-1 = <&pwm4_sleep_pins_a>;
419 pinctrl-names = "default", "sleep";
420 status = "okay";
421 };
422 timer@3 {
423 status = "okay";
424 };
425};
426
427&timers8 {
428 /delete-property/dmas;
429 /delete-property/dma-names;
430 status = "disabled";
431 pwm {
Tom Rini6b642ac2024-10-01 12:20:28 -0600432 /* PWM output on pin 32 of the expansion connector (CN8.32) using TIM8_CH3 func */
Tom Rini53633a82024-02-29 12:33:36 -0500433 pinctrl-0 = <&pwm8_pins_a>;
434 pinctrl-1 = <&pwm8_sleep_pins_a>;
435 pinctrl-names = "default", "sleep";
436 status = "okay";
437 };
438 timer@7 {
439 status = "okay";
440 };
441};
442
443&timers14 {
444 status = "disabled";
445 pwm {
Tom Rini6b642ac2024-10-01 12:20:28 -0600446 /* PWM output on pin 33 of the expansion connector (CN8.33) using TIM14_CH1 func */
Tom Rini53633a82024-02-29 12:33:36 -0500447 pinctrl-0 = <&pwm14_pins_a>;
448 pinctrl-1 = <&pwm14_sleep_pins_a>;
449 pinctrl-names = "default", "sleep";
450 status = "okay";
451 };
452 timer@13 {
453 status = "okay";
454 };
455};
456
457&uart4 {
458 pinctrl-names = "default", "sleep", "idle";
459 pinctrl-0 = <&uart4_pins_a>;
460 pinctrl-1 = <&uart4_sleep_pins_a>;
461 pinctrl-2 = <&uart4_idle_pins_a>;
462 /delete-property/dmas;
463 /delete-property/dma-names;
464 status = "okay";
465};
466
467&uart8 {
468 pinctrl-names = "default", "sleep", "idle";
469 pinctrl-0 = <&uart8_pins_a>;
470 pinctrl-1 = <&uart8_sleep_pins_a>;
471 pinctrl-2 = <&uart8_idle_pins_a>;
472 /delete-property/dmas;
473 /delete-property/dma-names;
474 status = "disabled";
475};
476
477&usart1 {
478 pinctrl-names = "default", "sleep", "idle";
479 pinctrl-0 = <&usart1_pins_a>;
480 pinctrl-1 = <&usart1_sleep_pins_a>;
481 pinctrl-2 = <&usart1_idle_pins_a>;
482 uart-has-rtscts;
483 status = "disabled";
484};
485
486/* Bluetooth */
487&usart2 {
488 pinctrl-names = "default", "sleep", "idle";
489 pinctrl-0 = <&usart2_pins_a>;
490 pinctrl-1 = <&usart2_sleep_pins_a>;
491 pinctrl-2 = <&usart2_idle_pins_a>;
492 uart-has-rtscts;
493 status = "okay";
494};
495
496&usbh_ehci {
497 phys = <&usbphyc_port0>;
498 status = "okay";
499 #address-cells = <1>;
500 #size-cells = <0>;
501 /* onboard HUB */
502 hub@1 {
503 compatible = "usb424,2514";
504 reg = <1>;
505 vdd-supply = <&scmi_v3v3_sw>;
506 };
507};
508
509&usbotg_hs {
510 phys = <&usbphyc_port1 0>;
511 phy-names = "usb2-phy";
512 usb-role-switch;
513 status = "okay";
514 port {
515 usbotg_hs_ep: endpoint {
516 remote-endpoint = <&con_usb_c_g0_ep>;
517 };
518 };
519};
520
521&usbphyc {
522 status = "okay";
523};
524
525&usbphyc_port0 {
526 phy-supply = <&scmi_vdd_usb>;
527 st,current-boost-microamp = <1000>;
528 st,decrease-hs-slew-rate;
529 st,tune-hs-dc-level = <2>;
530 st,enable-hs-rftime-reduction;
531 st,trim-hs-current = <11>;
532 st,trim-hs-impedance = <2>;
533 st,tune-squelch-level = <1>;
534 st,enable-hs-rx-gain-eq;
535 st,no-hs-ftime-ctrl;
536 st,no-lsfs-sc;
537};
538
539&usbphyc_port1 {
540 phy-supply = <&scmi_vdd_usb>;
541 st,current-boost-microamp = <1000>;
542 st,decrease-hs-slew-rate;
543 st,tune-hs-dc-level = <2>;
544 st,enable-hs-rftime-reduction;
545 st,trim-hs-current = <11>;
546 st,trim-hs-impedance = <2>;
547 st,tune-squelch-level = <1>;
548 st,enable-hs-rx-gain-eq;
549 st,no-hs-ftime-ctrl;
550 st,no-lsfs-sc;
551};