Loading...
Note: File does not exist in v6.13.7.
1// 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 "stm32mp135.dtsi"
13#include "stm32mp13xf.dtsi"
14#include "stm32mp13-pinctrl.dtsi"
15
16/ {
17 model = "STMicroelectronics STM32MP135F-DK Discovery Board";
18 compatible = "st,stm32mp135f-dk", "st,stm32mp135";
19
20 aliases {
21 serial0 = &uart4;
22 };
23
24 memory@c0000000 {
25 device_type = "memory";
26 reg = <0xc0000000 0x20000000>;
27 };
28
29 reserved-memory {
30 #address-cells = <1>;
31 #size-cells = <1>;
32 ranges;
33
34 optee@dd000000 {
35 reg = <0xdd000000 0x3000000>;
36 no-map;
37 };
38 };
39
40 gpio-keys {
41 compatible = "gpio-keys";
42
43 user-pa13 {
44 label = "User-PA13";
45 linux,code = <BTN_1>;
46 gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
47 };
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 led-blue {
54 function = LED_FUNCTION_HEARTBEAT;
55 color = <LED_COLOR_ID_BLUE>;
56 gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "heartbeat";
58 default-state = "off";
59 };
60 };
61
62 v3v3_sw: v3v3-sw {
63 compatible = "regulator-fixed";
64 regulator-name = "v3v3_sw";
65 regulator-min-microvolt = <3300000>;
66 regulator-max-microvolt = <3300000>;
67 regulator-always-on;
68 };
69
70 vdd_adc: vdd-adc {
71 compatible = "regulator-fixed";
72 regulator-name = "vdd_adc";
73 regulator-min-microvolt = <3300000>;
74 regulator-max-microvolt = <3300000>;
75 regulator-always-on;
76 };
77
78 vdd_sd: vdd-sd {
79 compatible = "regulator-fixed";
80 regulator-name = "vdd_sd";
81 regulator-min-microvolt = <2900000>;
82 regulator-max-microvolt = <2900000>;
83 regulator-always-on;
84 };
85
86 vdd_usb: vdd-usb {
87 compatible = "regulator-fixed";
88 regulator-name = "vdd_usb";
89 regulator-min-microvolt = <3300000>;
90 regulator-max-microvolt = <3300000>;
91 regulator-always-on;
92 };
93};
94
95&adc_1 {
96 pinctrl-names = "default";
97 pinctrl-0 = <&adc1_usb_cc_pins_a>;
98 vdda-supply = <&vdd_adc>;
99 vref-supply = <&vdd_adc>;
100 status = "okay";
101 adc1: adc@0 {
102 status = "okay";
103 /*
104 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12.
105 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
106 * 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
107 * Use arbitrary margin here (e.g. 5us).
108 */
109 channel@6 {
110 reg = <6>;
111 st,min-sample-time-ns = <5000>;
112 };
113 channel@12 {
114 reg = <12>;
115 st,min-sample-time-ns = <5000>;
116 };
117 };
118};
119
120&i2c1 {
121 pinctrl-names = "default", "sleep";
122 pinctrl-0 = <&i2c1_pins_a>;
123 pinctrl-1 = <&i2c1_sleep_pins_a>;
124 i2c-scl-rising-time-ns = <96>;
125 i2c-scl-falling-time-ns = <3>;
126 clock-frequency = <1000000>;
127 status = "okay";
128 /* spare dmas for other usage */
129 /delete-property/dmas;
130 /delete-property/dma-names;
131
132 mcp23017: pinctrl@21 {
133 compatible = "microchip,mcp23017";
134 reg = <0x21>;
135 gpio-controller;
136 #gpio-cells = <2>;
137 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
138 interrupt-parent = <&gpiog>;
139 pinctrl-names = "default";
140 pinctrl-0 = <&mcp23017_pins_a>;
141 interrupt-controller;
142 #interrupt-cells = <2>;
143 microchip,irq-mirror;
144 };
145
146 typec@53 {
147 compatible = "st,stm32g0-typec";
148 reg = <0x53>;
149 /* Alert pin on PI2 */
150 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
151 interrupt-parent = <&gpioi>;
152 /* Internal pull-up on PI2 */
153 pinctrl-names = "default";
154 pinctrl-0 = <&stm32g0_intn_pins_a>;
155 firmware-name = "stm32g0-ucsi.mp135f-dk.fw";
156 connector {
157 compatible = "usb-c-connector";
158 label = "USB-C";
159
160 port {
161 con_usb_c_g0_ep: endpoint {
162 remote-endpoint = <&usbotg_hs_ep>;
163 };
164 };
165 };
166 };
167};
168
169&i2c5 {
170 pinctrl-names = "default", "sleep";
171 pinctrl-0 = <&i2c5_pins_a>;
172 pinctrl-1 = <&i2c5_sleep_pins_a>;
173 i2c-scl-rising-time-ns = <170>;
174 i2c-scl-falling-time-ns = <5>;
175 clock-frequency = <400000>;
176 status = "okay";
177 /* spare dmas for other usage */
178 /delete-property/dmas;
179 /delete-property/dma-names;
180};
181
182&iwdg2 {
183 timeout-sec = <32>;
184 status = "okay";
185};
186
187&rtc {
188 status = "okay";
189};
190
191&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>;
196 cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
197 disable-wp;
198 st,neg-edge;
199 bus-width = <4>;
200 vmmc-supply = <&vdd_sd>;
201 status = "okay";
202};
203
204&spi5 {
205 pinctrl-names = "default", "sleep";
206 pinctrl-0 = <&spi5_pins_a>;
207 pinctrl-1 = <&spi5_sleep_pins_a>;
208 status = "disabled";
209};
210
211&uart4 {
212 pinctrl-names = "default";
213 pinctrl-0 = <&uart4_pins_a>;
214 status = "okay";
215};
216
217&usbh_ehci {
218 phys = <&usbphyc_port0>;
219 status = "okay";
220 #address-cells = <1>;
221 #size-cells = <0>;
222 /* onboard HUB */
223 hub@1 {
224 compatible = "usb424,2514";
225 reg = <1>;
226 vdd-supply = <&v3v3_sw>;
227 };
228};
229
230&usbotg_hs {
231 phys = <&usbphyc_port1 0>;
232 phy-names = "usb2-phy";
233 usb-role-switch;
234 status = "okay";
235 port {
236 usbotg_hs_ep: endpoint {
237 remote-endpoint = <&con_usb_c_g0_ep>;
238 };
239 };
240};
241
242&usbphyc {
243 status = "okay";
244};
245
246&usbphyc_port0 {
247 phy-supply = <&vdd_usb>;
248 st,current-boost-microamp = <1000>;
249 st,decrease-hs-slew-rate;
250 st,tune-hs-dc-level = <2>;
251 st,enable-hs-rftime-reduction;
252 st,trim-hs-current = <11>;
253 st,trim-hs-impedance = <2>;
254 st,tune-squelch-level = <1>;
255 st,enable-hs-rx-gain-eq;
256 st,no-hs-ftime-ctrl;
257 st,no-lsfs-sc;
258};
259
260&usbphyc_port1 {
261 phy-supply = <&vdd_usb>;
262 st,current-boost-microamp = <1000>;
263 st,decrease-hs-slew-rate;
264 st,tune-hs-dc-level = <2>;
265 st,enable-hs-rftime-reduction;
266 st,trim-hs-current = <11>;
267 st,trim-hs-impedance = <2>;
268 st,tune-squelch-level = <1>;
269 st,enable-hs-rx-gain-eq;
270 st,no-hs-ftime-ctrl;
271 st,no-lsfs-sc;
272};