]> Git Repo - linux.git/blob - arch/arm/boot/dts/st/stm32mp135f-dk.dts
Linux 6.14-rc3
[linux.git] / arch / arm / boot / dts / st / stm32mp135f-dk.dts
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 {
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
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         };
124
125         v3v3_ao: v3v3-ao {
126                 compatible = "regulator-fixed";
127                 regulator-name = "v3v3_ao";
128                 regulator-min-microvolt = <3300000>;
129                 regulator-max-microvolt = <3300000>;
130                 regulator-always-on;
131         };
132
133         wifi_pwrseq: wifi-pwrseq {
134                 compatible = "mmc-pwrseq-simple";
135                 reset-gpios = <&mcp23017 11 GPIO_ACTIVE_LOW>;
136         };
137 };
138
139 &adc_1 {
140         pinctrl-names = "default";
141         pinctrl-0 = <&adc1_usb_cc_pins_a>;
142         vdda-supply = <&scmi_vdd_adc>;
143         vref-supply = <&scmi_vdd_adc>;
144         status = "okay";
145         adc1: adc@0 {
146                 status = "okay";
147                 /*
148                  * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
149                  * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
150                  * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
151                  * Use arbitrary margin here (e.g. 5us).
152                  */
153                 channel@6 {
154                         reg = <6>;
155                         st,min-sample-time-ns = <5000>;
156                 };
157                 channel@12 {
158                         reg = <12>;
159                         st,min-sample-time-ns = <5000>;
160                 };
161         };
162 };
163
164 &crc1 {
165         status = "okay";
166 };
167
168 &cryp {
169         status = "okay";
170 };
171
172 &dcmipp {
173         pinctrl-names = "default", "sleep";
174         pinctrl-0 = <&dcmipp_pins_a>;
175         pinctrl-1 = <&dcmipp_sleep_pins_a>;
176         status = "okay";
177
178         port {
179                 dcmipp_0: endpoint {
180                         remote-endpoint = <&mipid02_2>;
181                         bus-width = <8>;
182                         hsync-active = <0>;
183                         vsync-active = <0>;
184                         pclk-sample = <0>;
185                 };
186         };
187 };
188
189 &ethernet1 {
190         status = "okay";
191         pinctrl-0 = <&eth1_rmii_pins_a>;
192         pinctrl-1 = <&eth1_rmii_sleep_pins_a>;
193         pinctrl-names = "default", "sleep";
194         phy-mode = "rmii";
195         phy-handle = <&phy0_eth1>;
196
197         mdio {
198                 #address-cells = <1>;
199                 #size-cells = <0>;
200                 compatible = "snps,dwmac-mdio";
201
202                 phy0_eth1: ethernet-phy@0 {
203                         compatible = "ethernet-phy-id0007.c131";
204                         reg = <0>;
205                         reset-gpios = <&mcp23017 9 GPIO_ACTIVE_LOW>;
206                         wakeup-source;
207                 };
208         };
209 };
210
211 &i2c1 {
212         pinctrl-names = "default", "sleep";
213         pinctrl-0 = <&i2c1_pins_a>;
214         pinctrl-1 = <&i2c1_sleep_pins_a>;
215         i2c-scl-rising-time-ns = <96>;
216         i2c-scl-falling-time-ns = <3>;
217         clock-frequency = <1000000>;
218         status = "okay";
219         /* spare dmas for other usage */
220         /delete-property/dmas;
221         /delete-property/dma-names;
222
223         mcp23017: pinctrl@21 {
224                 compatible = "microchip,mcp23017";
225                 reg = <0x21>;
226                 gpio-controller;
227                 #gpio-cells = <2>;
228                 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
229                 interrupt-parent = <&gpiog>;
230                 pinctrl-names = "default";
231                 pinctrl-0 = <&mcp23017_pins_a>;
232                 interrupt-controller;
233                 #interrupt-cells = <2>;
234                 microchip,irq-mirror;
235         };
236
237         typec@53 {
238                 compatible = "st,stm32g0-typec";
239                 reg = <0x53>;
240                 /* Alert pin on PI2 */
241                 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
242                 interrupt-parent = <&gpioi>;
243                 /* Internal pull-up on PI2 */
244                 pinctrl-names = "default";
245                 pinctrl-0 = <&stm32g0_intn_pins_a>;
246                 firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
247                 connector {
248                         compatible = "usb-c-connector";
249                         label = "USB-C";
250
251                         port {
252                                 con_usb_c_g0_ep: endpoint {
253                                         remote-endpoint = <&usbotg_hs_ep>;
254                                 };
255                         };
256                 };
257         };
258 };
259
260 &i2c5 {
261         pinctrl-names = "default", "sleep";
262         pinctrl-0 = <&i2c5_pins_a>;
263         pinctrl-1 = <&i2c5_sleep_pins_a>;
264         i2c-scl-rising-time-ns = <170>;
265         i2c-scl-falling-time-ns = <5>;
266         clock-frequency = <400000>;
267         status = "okay";
268         /* spare dmas for other usage */
269         /delete-property/dmas;
270         /delete-property/dma-names;
271
272         stmipi: csi2rx@14 {
273                 compatible = "st,st-mipid02";
274                 reg = <0x14>;
275                 clocks = <&clk_mco1>;
276                 clock-names = "xclk";
277                 VDDE-supply = <&scmi_v1v8_periph>;
278                 VDDIN-supply = <&scmi_v1v8_periph>;
279                 reset-gpios = <&mcp23017 2 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
280                 status = "okay";
281
282                 ports {
283                         #address-cells = <1>;
284                         #size-cells = <0>;
285                         port@0 {
286                                 reg = <0>;
287
288                                 mipid02_0: endpoint {
289                                         data-lanes = <1 2>;
290                                         lane-polarities = <0 0 0>;
291                                         remote-endpoint = <&gc2145_ep>;
292                                 };
293                         };
294                         port@2 {
295                                 reg = <2>;
296
297                                 mipid02_2: endpoint {
298                                         bus-width = <8>;
299                                         hsync-active = <0>;
300                                         vsync-active = <0>;
301                                         pclk-sample = <0>;
302                                         remote-endpoint = <&dcmipp_0>;
303                                 };
304                         };
305                 };
306         };
307
308         gc2145: camera@3c {
309                 compatible = "galaxycore,gc2145";
310                 reg = <0x3c>;
311                 clocks = <&clk_ext_camera>;
312                 iovdd-supply = <&scmi_v3v3_sw>;
313                 avdd-supply = <&scmi_v3v3_sw>;
314                 dvdd-supply = <&scmi_v3v3_sw>;
315                 powerdown-gpios = <&mcp23017 3 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
316                 reset-gpios = <&mcp23017 4 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;
317                 status = "okay";
318
319                 port {
320                         gc2145_ep: endpoint {
321                                 remote-endpoint = <&mipid02_0>;
322                                 data-lanes = <1 2>;
323                                 link-frequencies = /bits/ 64 <120000000 192000000 240000000>;
324                         };
325                 };
326         };
327
328         goodix: goodix-ts@5d {
329                 compatible = "goodix,gt911";
330                 reg = <0x5d>;
331                 pinctrl-names = "default";
332                 pinctrl-0 = <&goodix_pins_a>;
333                 interrupt-parent = <&gpiof>;
334                 interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
335                 AVDD28-supply = <&scmi_v3v3_sw>;
336                 VDDIO-supply = <&scmi_v3v3_sw>;
337                 touchscreen-size-x = <480>;
338                 touchscreen-size-y = <272>;
339                 status = "okay" ;
340         };
341 };
342
343 &iwdg2 {
344         timeout-sec = <32>;
345         status = "okay";
346 };
347
348 &ltdc {
349         pinctrl-names = "default", "sleep";
350         pinctrl-0 = <&ltdc_pins_a>;
351         pinctrl-1 = <&ltdc_sleep_pins_a>;
352         status = "okay";
353
354         port {
355                 ltdc_out_rgb: endpoint {
356                         remote-endpoint = <&panel_in_rgb>;
357                 };
358         };
359 };
360
361 &rtc {
362         pinctrl-names = "default";
363         pinctrl-0 = <&rtc_rsvd_pins_a>;
364         status = "okay";
365
366         rtc_lsco_pins_a: rtc-lsco-0 {
367                 pins = "out2_rmp";
368                 function = "lsco";
369         };
370 };
371
372 &scmi_regu {
373         scmi_vdd_adc: regulator@10 {
374                 reg = <VOLTD_SCMI_STPMIC1_LDO1>;
375                 regulator-name = "vdd_adc";
376         };
377         scmi_vdd_usb: regulator@13 {
378                 reg = <VOLTD_SCMI_STPMIC1_LDO4>;
379                 regulator-name = "vdd_usb";
380         };
381         scmi_vdd_sd: regulator@14 {
382                 reg = <VOLTD_SCMI_STPMIC1_LDO5>;
383                 regulator-name = "vdd_sd";
384         };
385         scmi_v1v8_periph: regulator@15 {
386                 reg = <VOLTD_SCMI_STPMIC1_LDO6>;
387                 regulator-name = "v1v8_periph";
388         };
389         scmi_v3v3_sw: regulator@19 {
390                 reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
391                 regulator-name = "v3v3_sw";
392         };
393 };
394
395 &sdmmc1 {
396         pinctrl-names = "default", "opendrain", "sleep";
397         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
398         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
399         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
400         cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
401         disable-wp;
402         st,neg-edge;
403         bus-width = <4>;
404         vmmc-supply = <&scmi_vdd_sd>;
405         status = "okay";
406 };
407
408 /* Wifi */
409 &sdmmc2 {
410         pinctrl-names = "default", "opendrain", "sleep";
411         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_clk_pins_a>;
412         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_clk_pins_a>;
413         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
414         non-removable;
415         cap-sdio-irq;
416         st,neg-edge;
417         bus-width = <4>;
418         vmmc-supply = <&v3v3_ao>;
419         mmc-pwrseq = <&wifi_pwrseq>;
420         #address-cells = <1>;
421         #size-cells = <0>;
422         status = "okay";
423
424         brcmf: bcrmf@1 {
425                 reg = <1>;
426                 compatible = "brcm,bcm4329-fmac";
427                 pinctrl-names = "default";
428                 pinctrl-0 = <&rtc_lsco_pins_a>;
429         };
430 };
431
432 &spi5 {
433         pinctrl-names = "default", "sleep";
434         pinctrl-0 = <&spi5_pins_a>;
435         pinctrl-1 = <&spi5_sleep_pins_a>;
436         status = "disabled";
437 };
438
439 &timers3 {
440         /delete-property/dmas;
441         /delete-property/dma-names;
442         status = "disabled";
443         counter {
444                 status = "okay";
445         };
446         pwm {
447                 /* PWM output on pin 7 of the expansion connector (CN8.7) using TIM3_CH4 func */
448                 pinctrl-0 = <&pwm3_pins_a>;
449                 pinctrl-1 = <&pwm3_sleep_pins_a>;
450                 pinctrl-names = "default", "sleep";
451                 status = "okay";
452         };
453         timer@2 {
454                 status = "okay";
455         };
456 };
457
458 &timers4 {
459         /delete-property/dmas;
460         /delete-property/dma-names;
461         status = "disabled";
462         counter {
463                 status = "okay";
464         };
465         pwm {
466                 /* PWM output on pin 31 of the expansion connector (CN8.31) using TIM4_CH2 func */
467                 pinctrl-0 = <&pwm4_pins_a>;
468                 pinctrl-1 = <&pwm4_sleep_pins_a>;
469                 pinctrl-names = "default", "sleep";
470                 status = "okay";
471         };
472         timer@3 {
473                 status = "okay";
474         };
475 };
476
477 &timers8 {
478         /delete-property/dmas;
479         /delete-property/dma-names;
480         status = "disabled";
481         counter {
482                 status = "okay";
483         };
484         pwm {
485                 /* PWM output on pin 32 of the expansion connector (CN8.32) using TIM8_CH3 func */
486                 pinctrl-0 = <&pwm8_pins_a>;
487                 pinctrl-1 = <&pwm8_sleep_pins_a>;
488                 pinctrl-names = "default", "sleep";
489                 status = "okay";
490         };
491         timer@7 {
492                 status = "okay";
493         };
494 };
495
496 &timers14 {
497         status = "disabled";
498         counter {
499                 status = "okay";
500         };
501         pwm {
502                 /* PWM output on pin 33 of the expansion connector (CN8.33) using TIM14_CH1 func */
503                 pinctrl-0 = <&pwm14_pins_a>;
504                 pinctrl-1 = <&pwm14_sleep_pins_a>;
505                 pinctrl-names = "default", "sleep";
506                 status = "okay";
507         };
508         timer@13 {
509                 status = "okay";
510         };
511 };
512
513 &uart4 {
514         pinctrl-names = "default", "sleep", "idle";
515         pinctrl-0 = <&uart4_pins_a>;
516         pinctrl-1 = <&uart4_sleep_pins_a>;
517         pinctrl-2 = <&uart4_idle_pins_a>;
518         /delete-property/dmas;
519         /delete-property/dma-names;
520         status = "okay";
521 };
522
523 &uart8 {
524         pinctrl-names = "default", "sleep", "idle";
525         pinctrl-0 = <&uart8_pins_a>;
526         pinctrl-1 = <&uart8_sleep_pins_a>;
527         pinctrl-2 = <&uart8_idle_pins_a>;
528         /delete-property/dmas;
529         /delete-property/dma-names;
530         status = "disabled";
531 };
532
533 &usart1 {
534         pinctrl-names = "default", "sleep", "idle";
535         pinctrl-0 = <&usart1_pins_a>;
536         pinctrl-1 = <&usart1_sleep_pins_a>;
537         pinctrl-2 = <&usart1_idle_pins_a>;
538         uart-has-rtscts;
539         status = "disabled";
540 };
541
542 /* Bluetooth */
543 &usart2 {
544         pinctrl-names = "default", "sleep", "idle";
545         pinctrl-0 = <&usart2_pins_a>;
546         pinctrl-1 = <&usart2_sleep_pins_a>;
547         pinctrl-2 = <&usart2_idle_pins_a>;
548         uart-has-rtscts;
549         status = "okay";
550
551         bluetooth {
552                 shutdown-gpios = <&mcp23017 13 GPIO_ACTIVE_HIGH>;
553                 compatible = "brcm,bcm43438-bt";
554                 max-speed = <3000000>;
555                 vbat-supply = <&v3v3_ao>;
556                 vddio-supply = <&v3v3_ao>;
557         };
558 };
559
560 &usbh_ehci {
561         phys = <&usbphyc_port0>;
562         status = "okay";
563         #address-cells = <1>;
564         #size-cells = <0>;
565         /* onboard HUB */
566         hub@1 {
567                 compatible = "usb424,2514";
568                 reg = <1>;
569                 vdd-supply = <&scmi_v3v3_sw>;
570         };
571 };
572
573 &usbotg_hs {
574         phys = <&usbphyc_port1 0>;
575         phy-names = "usb2-phy";
576         usb-role-switch;
577         status = "okay";
578         port {
579                 usbotg_hs_ep: endpoint {
580                         remote-endpoint = <&con_usb_c_g0_ep>;
581                 };
582         };
583 };
584
585 &usbphyc {
586         status = "okay";
587 };
588
589 &usbphyc_port0 {
590         phy-supply = <&scmi_vdd_usb>;
591         st,current-boost-microamp = <1000>;
592         st,decrease-hs-slew-rate;
593         st,tune-hs-dc-level = <2>;
594         st,enable-hs-rftime-reduction;
595         st,trim-hs-current = <11>;
596         st,trim-hs-impedance = <2>;
597         st,tune-squelch-level = <1>;
598         st,enable-hs-rx-gain-eq;
599         st,no-hs-ftime-ctrl;
600         st,no-lsfs-sc;
601 };
602
603 &usbphyc_port1 {
604         phy-supply = <&scmi_vdd_usb>;
605         st,current-boost-microamp = <1000>;
606         st,decrease-hs-slew-rate;
607         st,tune-hs-dc-level = <2>;
608         st,enable-hs-rftime-reduction;
609         st,trim-hs-current = <11>;
610         st,trim-hs-impedance = <2>;
611         st,tune-squelch-level = <1>;
612         st,enable-hs-rx-gain-eq;
613         st,no-hs-ftime-ctrl;
614         st,no-lsfs-sc;
615 };
This page took 0.067437 seconds and 4 git commands to generate.