blob: 275823da3c63b263810c0cbd253075dfd995e351 [file] [log] [blame]
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +02001// 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
Patrick Delaunay53dfe692022-06-30 10:20:17 +02009#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
Cheick Traore1455c0c2025-03-11 15:30:37 +010012#include <dt-bindings/pwm/pwm.h>
Patrice Chotard02d88c02023-09-26 17:09:18 +020013#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +020014#include "stm32mp135.dtsi"
15#include "stm32mp13xf.dtsi"
16#include "stm32mp13-pinctrl.dtsi"
17
18/ {
19 model = "STMicroelectronics STM32MP135F-DK Discovery Board";
20 compatible = "st,stm32mp135f-dk", "st,stm32mp135";
21
22 aliases {
23 serial0 = &uart4;
Patrick Delaunay4597d262023-07-10 10:38:45 +020024 serial1 = &usart1;
25 serial2 = &uart8;
26 serial3 = &usart2;
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +020027 };
28
Patrick Delaunay4597d262023-07-10 10:38:45 +020029 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +020033 memory@c0000000 {
34 device_type = "memory";
35 reg = <0xc0000000 0x20000000>;
36 };
37
Patrick Delaunayabf20ae2022-07-06 18:20:24 +020038 reserved-memory {
39 #address-cells = <1>;
40 #size-cells = <1>;
41 ranges;
42
Patrick Delaunay75785d42022-09-07 13:42:23 +020043 optee@dd000000 {
44 reg = <0xdd000000 0x3000000>;
Patrick Delaunayabf20ae2022-07-06 18:20:24 +020045 no-map;
46 };
47 };
48
Patrick Delaunay53dfe692022-06-30 10:20:17 +020049 gpio-keys {
50 compatible = "gpio-keys";
51
Patrick Delaunay7f2cba42023-04-24 16:21:10 +020052 button-user {
Patrick Delaunay53dfe692022-06-30 10:20:17 +020053 label = "User-PA13";
54 linux,code = <BTN_1>;
55 gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
56 };
57 };
58
59 leds {
60 compatible = "gpio-leds";
61
62 led-blue {
63 function = LED_FUNCTION_HEARTBEAT;
64 color = <LED_COLOR_ID_BLUE>;
65 gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
66 linux,default-trigger = "heartbeat";
67 default-state = "off";
68 };
69 };
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +020070};
71
Patrick Delaunay7f2cba42023-04-24 16:21:10 +020072&adc_1 {
73 pinctrl-names = "default";
74 pinctrl-0 = <&adc1_usb_cc_pins_a>;
Patrice Chotard02d88c02023-09-26 17:09:18 +020075 vdda-supply = <&scmi_vdd_adc>;
76 vref-supply = <&scmi_vdd_adc>;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +020077 status = "okay";
78 adc1: adc@0 {
79 status = "okay";
80 /*
81 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
82 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
83 * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
84 * Use arbitrary margin here (e.g. 5us).
85 */
86 channel@6 {
87 reg = <6>;
88 st,min-sample-time-ns = <5000>;
89 };
90 channel@12 {
91 reg = <12>;
92 st,min-sample-time-ns = <5000>;
93 };
94 };
95};
96
97&i2c1 {
98 pinctrl-names = "default", "sleep";
99 pinctrl-0 = <&i2c1_pins_a>;
100 pinctrl-1 = <&i2c1_sleep_pins_a>;
101 i2c-scl-rising-time-ns = <96>;
102 i2c-scl-falling-time-ns = <3>;
103 clock-frequency = <1000000>;
104 status = "okay";
105 /* spare dmas for other usage */
106 /delete-property/dmas;
107 /delete-property/dma-names;
108
109 mcp23017: pinctrl@21 {
110 compatible = "microchip,mcp23017";
111 reg = <0x21>;
112 gpio-controller;
113 #gpio-cells = <2>;
114 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
115 interrupt-parent = <&gpiog>;
116 pinctrl-names = "default";
117 pinctrl-0 = <&mcp23017_pins_a>;
118 interrupt-controller;
119 #interrupt-cells = <2>;
120 microchip,irq-mirror;
121 };
122
123 typec@53 {
124 compatible = "st,stm32g0-typec";
125 reg = <0x53>;
126 /* Alert pin on PI2 */
127 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
128 interrupt-parent = <&gpioi>;
129 /* Internal pull-up on PI2 */
130 pinctrl-names = "default";
131 pinctrl-0 = <&stm32g0_intn_pins_a>;
132 firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
133 connector {
134 compatible = "usb-c-connector";
135 label = "USB-C";
136
137 port {
138 con_usb_c_g0_ep: endpoint {
139 remote-endpoint = <&usbotg_hs_ep>;
140 };
141 };
142 };
143 };
144};
145
146&i2c5 {
147 pinctrl-names = "default", "sleep";
148 pinctrl-0 = <&i2c5_pins_a>;
149 pinctrl-1 = <&i2c5_sleep_pins_a>;
150 i2c-scl-rising-time-ns = <170>;
151 i2c-scl-falling-time-ns = <5>;
152 clock-frequency = <400000>;
153 status = "okay";
154 /* spare dmas for other usage */
155 /delete-property/dmas;
156 /delete-property/dma-names;
157};
158
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200159&iwdg2 {
160 timeout-sec = <32>;
161 status = "okay";
162};
163
Patrick Delaunay53dfe692022-06-30 10:20:17 +0200164&rtc {
165 status = "okay";
166};
167
Patrice Chotard02d88c02023-09-26 17:09:18 +0200168&scmi_regu {
169 scmi_vdd_adc: regulator@10 {
170 reg = <VOLTD_SCMI_STPMIC1_LDO1>;
171 regulator-name = "vdd_adc";
172 };
173 scmi_vdd_usb: regulator@13 {
174 reg = <VOLTD_SCMI_STPMIC1_LDO4>;
175 regulator-name = "vdd_usb";
176 };
177 scmi_vdd_sd: regulator@14 {
178 reg = <VOLTD_SCMI_STPMIC1_LDO5>;
179 regulator-name = "vdd_sd";
180 };
181 scmi_v1v8_periph: regulator@15 {
182 reg = <VOLTD_SCMI_STPMIC1_LDO6>;
183 regulator-name = "v1v8_periph";
184 };
185 scmi_v3v3_sw: regulator@19 {
186 reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
187 regulator-name = "v3v3_sw";
188 };
189};
190
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200191&sdmmc1 {
192 pinctrl-names = "default", "opendrain", "sleep";
193 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
194 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
195 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
Yann Gautierc69095d2022-11-02 14:53:48 +0100196 cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200197 disable-wp;
198 st,neg-edge;
199 bus-width = <4>;
Patrice Chotard02d88c02023-09-26 17:09:18 +0200200 vmmc-supply = <&scmi_vdd_sd>;
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200201 status = "okay";
202};
203
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200204&spi5 {
205 pinctrl-names = "default", "sleep";
206 pinctrl-0 = <&spi5_pins_a>;
207 pinctrl-1 = <&spi5_sleep_pins_a>;
208 status = "disabled";
209};
210
Cheick Traore1455c0c2025-03-11 15:30:37 +0100211&timers1 {
212 /* spare dmas for other usage */
213 /delete-property/dmas;
214 /delete-property/dma-names;
215 status = "okay";
216 pwm1: pwm {
217 pinctrl-0 = <&pwm1_ch3n_pins_a>;
218 pinctrl-1 = <&pwm1_ch3n_sleep_pins_a>;
219 pinctrl-names = "default", "sleep";
220 status = "okay";
221 };
222};
223
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200224&timers3 {
225 /delete-property/dmas;
226 /delete-property/dma-names;
227 status = "disabled";
228 pwm {
229 pinctrl-0 = <&pwm3_pins_a>;
230 pinctrl-1 = <&pwm3_sleep_pins_a>;
231 pinctrl-names = "default", "sleep";
232 status = "okay";
233 };
234 timer@2 {
235 status = "okay";
236 };
237};
238
239&timers4 {
240 /delete-property/dmas;
241 /delete-property/dma-names;
242 status = "disabled";
243 pwm {
244 pinctrl-0 = <&pwm4_pins_a>;
245 pinctrl-1 = <&pwm4_sleep_pins_a>;
246 pinctrl-names = "default", "sleep";
247 status = "okay";
248 };
249 timer@3 {
250 status = "okay";
251 };
252};
253
254&timers8 {
255 /delete-property/dmas;
256 /delete-property/dma-names;
257 status = "disabled";
258 pwm {
259 pinctrl-0 = <&pwm8_pins_a>;
260 pinctrl-1 = <&pwm8_sleep_pins_a>;
261 pinctrl-names = "default", "sleep";
262 status = "okay";
263 };
264 timer@7 {
265 status = "okay";
266 };
267};
268
269&timers14 {
270 status = "disabled";
271 pwm {
272 pinctrl-0 = <&pwm14_pins_a>;
273 pinctrl-1 = <&pwm14_sleep_pins_a>;
274 pinctrl-names = "default", "sleep";
275 status = "okay";
276 };
277 timer@13 {
278 status = "okay";
279 };
280};
281
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200282&uart4 {
Patrick Delaunay4597d262023-07-10 10:38:45 +0200283 pinctrl-names = "default", "sleep", "idle";
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200284 pinctrl-0 = <&uart4_pins_a>;
Patrick Delaunay4597d262023-07-10 10:38:45 +0200285 pinctrl-1 = <&uart4_sleep_pins_a>;
286 pinctrl-2 = <&uart4_idle_pins_a>;
287 /delete-property/dmas;
288 /delete-property/dma-names;
289 status = "okay";
290};
291
292&uart8 {
293 pinctrl-names = "default", "sleep", "idle";
294 pinctrl-0 = <&uart8_pins_a>;
295 pinctrl-1 = <&uart8_sleep_pins_a>;
296 pinctrl-2 = <&uart8_idle_pins_a>;
297 /delete-property/dmas;
298 /delete-property/dma-names;
299 status = "disabled";
300};
301
302&usart1 {
303 pinctrl-names = "default", "sleep", "idle";
304 pinctrl-0 = <&usart1_pins_a>;
305 pinctrl-1 = <&usart1_sleep_pins_a>;
306 pinctrl-2 = <&usart1_idle_pins_a>;
307 uart-has-rtscts;
308 status = "disabled";
309};
310
311/* Bluetooth */
312&usart2 {
313 pinctrl-names = "default", "sleep", "idle";
314 pinctrl-0 = <&usart2_pins_a>;
315 pinctrl-1 = <&usart2_sleep_pins_a>;
316 pinctrl-2 = <&usart2_idle_pins_a>;
317 uart-has-rtscts;
Patrick Delaunay8e34fbb2022-05-20 18:24:39 +0200318 status = "okay";
319};
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200320
321&usbh_ehci {
322 phys = <&usbphyc_port0>;
323 status = "okay";
324 #address-cells = <1>;
325 #size-cells = <0>;
326 /* onboard HUB */
327 hub@1 {
328 compatible = "usb424,2514";
329 reg = <1>;
Patrice Chotard02d88c02023-09-26 17:09:18 +0200330 vdd-supply = <&scmi_v3v3_sw>;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200331 };
332};
333
334&usbotg_hs {
335 phys = <&usbphyc_port1 0>;
336 phy-names = "usb2-phy";
337 usb-role-switch;
338 status = "okay";
339 port {
340 usbotg_hs_ep: endpoint {
341 remote-endpoint = <&con_usb_c_g0_ep>;
342 };
343 };
344};
345
346&usbphyc {
347 status = "okay";
348};
349
350&usbphyc_port0 {
Patrice Chotard02d88c02023-09-26 17:09:18 +0200351 phy-supply = <&scmi_vdd_usb>;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200352 st,current-boost-microamp = <1000>;
353 st,decrease-hs-slew-rate;
354 st,tune-hs-dc-level = <2>;
355 st,enable-hs-rftime-reduction;
356 st,trim-hs-current = <11>;
357 st,trim-hs-impedance = <2>;
358 st,tune-squelch-level = <1>;
359 st,enable-hs-rx-gain-eq;
360 st,no-hs-ftime-ctrl;
361 st,no-lsfs-sc;
362};
363
364&usbphyc_port1 {
Patrice Chotard02d88c02023-09-26 17:09:18 +0200365 phy-supply = <&scmi_vdd_usb>;
Patrick Delaunay7f2cba42023-04-24 16:21:10 +0200366 st,current-boost-microamp = <1000>;
367 st,decrease-hs-slew-rate;
368 st,tune-hs-dc-level = <2>;
369 st,enable-hs-rftime-reduction;
370 st,trim-hs-current = <11>;
371 st,trim-hs-impedance = <2>;
372 st,tune-squelch-level = <1>;
373 st,enable-hs-rx-gain-eq;
374 st,no-hs-ftime-ctrl;
375 st,no-lsfs-sc;
376};