1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) 2024 Marek Vasut <marex@denx.de>
*
* DHCOR STM32MP13 variant:
* DHCR-STM32MP135F-C100-R051-EE-F0409-SPI4-RTC-WBT-I-01LG
* DHCOR PCB number: 718-100 or newer
* DHSBC PCB number: 719-100 or newer
*/
/dts-v1/;
#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
#include "stm32mp135.dtsi"
#include "stm32mp13xf.dtsi"
#include "stm32mp13xx-dhcor-som.dtsi"
/ {
model = "DH electronics STM32MP135F DHCOR DHSBC";
compatible = "dh,stm32mp135f-dhcor-dhsbc",
"dh,stm32mp135f-dhcor-som",
"st,stm32mp135";
aliases {
ethernet0 = ðernet1;
ethernet1 = ðernet2;
serial2 = &usart1;
serial3 = &usart2;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&adc_1 {
pinctrl-names = "default";
pinctrl-0 = <&adc1_pins_a &adc1_usb_cc_pins_b>;
vdda-supply = <&vdd_adc>;
vref-supply = <&vdd_adc>;
status = "okay";
adc1: adc@0 {
status = "okay";
/*
* Type-C USB_PWR_CC1 & USB_PWR_CC2 on in2 & in11.
* Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C:
* 5 * (5.1 + 47kOhms) * 5pF => 1.3us.
* Use arbitrary margin here (e.g. 5us).
*
* The pinmux pins must be set as ANALOG, use datasheet
* DS13483 Table 7. STM32MP135C/F ball definitions to
* find out which 'pin name' maps to which 'additional
* functions', which lists the mapping between pin and
* ADC channel. In this case, PA5 maps to ADC1_INP2 and
* PF13 maps to ADC1_INP11 .
*/
channel@2 {
reg = <2>;
st,min-sample-time-ns = <5000>;
};
channel@11 {
reg = <11>;
st,min-sample-time-ns = <5000>;
};
/* Expansion connector: INP12:pin29 */
channel@12 {
reg = <12>;
st,min-sample-time-ns = <5000>;
};
};
};
ðernet1 {
phy-handle = <ðphy1>;
phy-mode = "rgmii-id";
pinctrl-0 = <ð1_rgmii_pins_a>;
pinctrl-1 = <ð1_rgmii_sleep_pins_a>;
pinctrl-names = "default", "sleep";
st,ext-phyclk;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
ethphy1: ethernet-phy@1 {
/* RTL8211F */
compatible = "ethernet-phy-id001c.c916";
interrupt-parent = <&gpiog>;
interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
reg = <1>;
reset-assert-us = <15000>;
reset-deassert-us = <55000>;
reset-gpios = <&gpioa 11 GPIO_ACTIVE_LOW>;
};
};
};
ðernet2 {
phy-handle = <ðphy2>;
phy-mode = "rgmii-id";
pinctrl-0 = <ð2_rgmii_pins_a>;
pinctrl-1 = <ð2_rgmii_sleep_pins_a>;
pinctrl-names = "default", "sleep";
st,ext-phyclk;
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
ethphy2: ethernet-phy@1 {
/* RTL8211F */
compatible = "ethernet-phy-id001c.c916";
interrupt-parent = <&gpiog>;
interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
reg = <1>;
reset-assert-us = <15000>;
reset-deassert-us = <55000>;
reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>;
};
};
};
&gpioa {
gpio-line-names = "", "", "", "",
"", "DHSBC_USB_PWR_CC1", "", "",
"", "", "", "DHSBC_nETH1_RST",
"", "DHCOR_HW-CODING_0", "", "";
};
&gpiob {
gpio-line-names = "", "", "", "",
"", "", "", "DHCOR_BT_HOST_WAKE",
"", "", "", "",
"", "DHSBC_nTPM_CS", "", "";
};
&gpioc {
gpio-line-names = "", "", "", "DHSBC_USB_5V_MEAS",
"", "", "", "",
"", "", "", "",
"", "", "", "";
};
&gpiod {
gpio-line-names = "", "", "", "",
"", "DHCOR_RAM-CODING_0", "", "",
"", "DHCOR_RAM-CODING_1", "", "",
"", "", "", "";
};
&gpioe {
gpio-line-names = "", "", "", "",
"", "", "", "",
"", "DHSBC_nTPM_RST", "", "",
"DHSBC_nTPM_PIRQ", "", "DHCOR_WL_HOST_WAKE", "";
};
&gpiof {
gpio-line-names = "", "", "DHSBC_USB_PWR_nFLT", "",
"", "", "", "",
"", "", "", "",
"DHCOR_WL_REG_ON", "DHSBC_USB_PWR_CC2", "", "";
};
&gpiog {
gpio-line-names = "", "", "", "",
"", "", "", "",
"DHSBC_nETH2_RST", "DHCOR_BT_DEV_WAKE", "", "",
"DHSBC_ETH1_INTB", "", "", "DHSBC_ETH2_INTB";
};
&gpioi {
gpio-line-names = "DHCOR_RTC_nINT", "DHCOR_HW-CODING_1",
"DHCOR_BT_REG_ON", "DHCOR_PMIC_nINT",
"DHSBC_BOOT0", "DHSBC_BOOT1",
"DHSBC_BOOT2", "DHSBC_USB-C_DATA_VBUS";
};
&i2c1 { /* Expansion connector: SDA:pin27 SCL:pin28 */
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_a>;
pinctrl-1 = <&i2c1_sleep_pins_a>;
i2c-scl-rising-time-ns = <96>;
i2c-scl-falling-time-ns = <3>;
clock-frequency = <400000>;
status = "okay";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
};
&i2c5 { /* Expansion connector: SDA:pin3 SCL:pin5 */
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c5_pins_b>;
pinctrl-1 = <&i2c5_sleep_pins_b>;
i2c-scl-rising-time-ns = <96>;
i2c-scl-falling-time-ns = <3>;
clock-frequency = <400000>;
status = "okay";
/* spare dmas for other usage */
/delete-property/dmas;
/delete-property/dma-names;
};
&m_can1 { /* Expansion connector: TX:pin16 RX:pin18 */
pinctrl-names = "default", "sleep";
pinctrl-0 = <&m_can1_pins_a>;
pinctrl-1 = <&m_can1_sleep_pins_a>;
status = "okay";
};
&m_can2 { /* Expansion connector: TX:pin22 RX:pin26 */
pinctrl-names = "default", "sleep";
pinctrl-0 = <&m_can2_pins_a>;
pinctrl-1 = <&m_can2_sleep_pins_a>;
status = "okay";
};
&pwr_regulators {
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
status = "okay";
};
&sai1 { /* Expansion connector: SCK-A:pin12 FS-A:pin35 SD-A:pin38 SD-B:pin40 */
clocks = <&rcc SAI1>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "x8k", "x11k";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sai1a_pins_a &sai1b_pins_a>;
pinctrl-1 = <&sai1a_sleep_pins_a &sai1b_sleep_pins_a>;
};
&scmi_voltd {
status = "disabled";
};
&spi2 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi2_pins_a>;
pinctrl-1 = <&spi2_sleep_pins_a>;
cs-gpios = <&gpiob 13 0>;
status = "okay";
st33htph: tpm@0 {
compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
reg = <0>;
spi-max-frequency = <24000000>;
};
};
&spi3 { /* Expansion connector: MOSI:pin19 MISO:pin21 SCK:pin22 nCS:pin24 */
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi3_pins_a>;
pinctrl-1 = <&spi3_sleep_pins_a>;
cs-gpios = <&gpiof 3 0>;
status = "disabled";
};
&timers5 { /* Expansion connector: CH3:pin31 */
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
pwm {
pinctrl-0 = <&pwm5_pins_a>;
pinctrl-1 = <&pwm5_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@4 {
status = "okay";
};
};
&timers13 { /* Expansion connector: CH1:pin32 */
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
pwm {
pinctrl-0 = <&pwm13_pins_a>;
pinctrl-1 = <&pwm13_sleep_pins_a>;
pinctrl-names = "default", "sleep";
status = "okay";
};
timer@12 {
status = "okay";
};
};
&usart1 { /* Expansion connector: RX:pin33 TX:pin37 */
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&usart1_pins_b>;
pinctrl-1 = <&usart1_sleep_pins_b>;
pinctrl-2 = <&usart1_idle_pins_b>;
status = "okay";
};
&usart2 { /* Expansion connector: RX:pin10 TX:pin8 RTS:pin11 CTS:pin36 */
pinctrl-names = "default", "sleep", "idle";
pinctrl-0 = <&usart2_pins_b>;
pinctrl-1 = <&usart2_sleep_pins_b>;
pinctrl-2 = <&usart2_idle_pins_b>;
uart-has-rtscts;
status = "okay";
};
&usbh_ehci {
phys = <&usbphyc_port0>;
status = "okay";
};
&usbh_ohci {
phys = <&usbphyc_port0>;
status = "okay";
};
&usbotg_hs {
dr_mode = "peripheral";
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
usb33d-supply = <&usb33>;
status = "okay";
};
&usbphyc {
status = "okay";
vdda1v1-supply = <®11>;
vdda1v8-supply = <®18>;
};
&usbphyc_port0 {
phy-supply = <&vdd_usb>;
st,current-boost-microamp = <1000>;
st,decrease-hs-slew-rate;
st,tune-hs-dc-level = <2>;
st,enable-hs-rftime-reduction;
st,trim-hs-current = <11>;
st,trim-hs-impedance = <2>;
st,tune-squelch-level = <1>;
st,enable-hs-rx-gain-eq;
st,no-hs-ftime-ctrl;
st,no-lsfs-sc;
connector {
compatible = "usb-a-connector";
vbus-supply = <&vbus_sw>;
};
};
&usbphyc_port1 {
phy-supply = <&vdd_usb>;
st,current-boost-microamp = <1000>;
st,decrease-hs-slew-rate;
st,tune-hs-dc-level = <2>;
st,enable-hs-rftime-reduction;
st,trim-hs-current = <11>;
st,trim-hs-impedance = <2>;
st,tune-squelch-level = <1>;
st,enable-hs-rx-gain-eq;
st,no-hs-ftime-ctrl;
st,no-lsfs-sc;
connector {
compatible = "gpio-usb-b-connector", "usb-b-connector";
vbus-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>;
label = "Type-C";
self-powered;
type = "micro";
};
};
|