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