Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
4 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
5 */
6/dts-v1/;
7
8#include "stm32mp157.dtsi"
9#include "stm32mp15xc.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
11#include "stm32mp15xxaa-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/leds/common.h>
14#include <dt-bindings/mfd/st,stpmic1.h>
15
16/ {
17 model = "STMicroelectronics STM32MP157C eval daughter";
18 compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
19
20 aliases {
21 serial0 = &uart4;
22 };
23
24 chosen {
25 stdout-path = "serial0:115200n8";
26 };
27
28 memory@c0000000 {
29 device_type = "memory";
30 reg = <0xC0000000 0x40000000>;
31 };
32
33 reserved-memory {
34 #address-cells = <1>;
35 #size-cells = <1>;
36 ranges;
37
38 mcuram2: mcuram2@10000000 {
39 compatible = "shared-dma-pool";
40 reg = <0x10000000 0x40000>;
41 no-map;
42 };
43
44 vdev0vring0: vdev0vring0@10040000 {
45 compatible = "shared-dma-pool";
46 reg = <0x10040000 0x1000>;
47 no-map;
48 };
49
50 vdev0vring1: vdev0vring1@10041000 {
51 compatible = "shared-dma-pool";
52 reg = <0x10041000 0x1000>;
53 no-map;
54 };
55
56 vdev0buffer: vdev0buffer@10042000 {
57 compatible = "shared-dma-pool";
58 reg = <0x10042000 0x4000>;
59 no-map;
60 };
61
62 mcuram: mcuram@30000000 {
63 compatible = "shared-dma-pool";
64 reg = <0x30000000 0x40000>;
65 no-map;
66 };
67
68 retram: retram@38000000 {
69 compatible = "shared-dma-pool";
70 reg = <0x38000000 0x10000>;
71 no-map;
72 };
73 };
74
75 led {
76 compatible = "gpio-leds";
77 led_blue: led-blue {
78 gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
79 linux,default-trigger = "heartbeat";
80 default-state = "off";
81 function = LED_FUNCTION_HEARTBEAT;
82 color = <LED_COLOR_ID_BLUE>;
83 };
84
85 led-red {
86 function = LED_FUNCTION_STATUS;
87 color = <LED_COLOR_ID_RED>;
88 gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92 options {
93 u-boot {
94 compatible = "u-boot,config";
95 boot-led = <&led_blue>;
96 };
97 };
98
99 sd_switch: regulator-sd_switch {
100 compatible = "regulator-gpio";
101 regulator-name = "sd_switch";
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <2900000>;
104 regulator-type = "voltage";
105 regulator-always-on;
106
107 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
108 gpios-states = <0>;
109 states = <1800000 0x1>,
110 <2900000 0x0>;
111 };
112
113 vin: vin {
114 compatible = "regulator-fixed";
115 regulator-name = "vin";
116 regulator-min-microvolt = <5000000>;
117 regulator-max-microvolt = <5000000>;
118 regulator-always-on;
119 };
120};
121
122&adc {
123 /* ANA0, ANA1 are dedicated pins and don't need pinctrl: only in6. */
124 pinctrl-0 = <&adc1_in6_pins_a>;
125 pinctrl-names = "default";
126 vdd-supply = <&vdd>;
127 vdda-supply = <&vdda>;
128 vref-supply = <&vdda>;
129 status = "disabled";
130 adc1: adc@0 {
131 status = "okay";
132 channel@0 {
133 reg = <0>;
134 /* 16.5 ck_cycles sampling time */
135 st,min-sample-time-ns = <400>;
136 };
137 channel@1 {
138 reg = <1>;
139 st,min-sample-time-ns = <400>;
140 };
141 channel@6 {
142 reg = <6>;
143 st,min-sample-time-ns = <400>;
144 };
145 };
146};
147
148&crc1 {
149 status = "okay";
150};
151
152&cryp1 {
153 status = "okay";
154};
155
156&dac {
157 pinctrl-names = "default";
158 pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
159 vref-supply = <&vdda>;
160 status = "disabled";
161 dac1: dac@1 {
162 status = "okay";
163 };
164 dac2: dac@2 {
165 status = "okay";
166 };
167};
168
169&dts {
170 status = "okay";
171};
172
173&hash1 {
174 status = "okay";
175};
176
177&i2c4 {
178 pinctrl-names = "default", "sleep";
179 pinctrl-0 = <&i2c4_pins_a>;
180 pinctrl-1 = <&i2c4_sleep_pins_a>;
181 i2c-scl-rising-time-ns = <185>;
182 i2c-scl-falling-time-ns = <20>;
183 clock-frequency = <400000>;
184 status = "okay";
185 /* spare dmas for other usage */
186 /delete-property/dmas;
187 /delete-property/dma-names;
188
189 pmic: stpmic@33 {
190 compatible = "st,stpmic1";
191 reg = <0x33>;
192 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
193 interrupt-controller;
194 #interrupt-cells = <2>;
195 status = "okay";
196
197 regulators {
198 compatible = "st,stpmic1-regulators";
199 buck1-supply = <&vin>;
200 buck2-supply = <&vin>;
201 buck3-supply = <&vin>;
202 buck4-supply = <&vin>;
203 ldo1-supply = <&v3v3>;
204 ldo2-supply = <&v3v3>;
205 ldo3-supply = <&vdd_ddr>;
206 ldo4-supply = <&vin>;
207 ldo5-supply = <&v3v3>;
208 ldo6-supply = <&v3v3>;
209 vref_ddr-supply = <&vin>;
210 boost-supply = <&vin>;
211 pwr_sw1-supply = <&bst_out>;
212 pwr_sw2-supply = <&bst_out>;
213
214 vddcore: buck1 {
215 regulator-name = "vddcore";
216 regulator-min-microvolt = <1200000>;
217 regulator-max-microvolt = <1350000>;
218 regulator-always-on;
219 regulator-initial-mode = <0>;
220 regulator-over-current-protection;
221 };
222
223 vdd_ddr: buck2 {
224 regulator-name = "vdd_ddr";
225 regulator-min-microvolt = <1350000>;
226 regulator-max-microvolt = <1350000>;
227 regulator-always-on;
228 regulator-initial-mode = <0>;
229 regulator-over-current-protection;
230 };
231
232 vdd: buck3 {
233 regulator-name = "vdd";
234 regulator-min-microvolt = <3300000>;
235 regulator-max-microvolt = <3300000>;
236 regulator-always-on;
237 st,mask-reset;
238 regulator-initial-mode = <0>;
239 regulator-over-current-protection;
240 };
241
242 v3v3: buck4 {
243 regulator-name = "v3v3";
244 regulator-min-microvolt = <3300000>;
245 regulator-max-microvolt = <3300000>;
246 regulator-always-on;
247 regulator-over-current-protection;
248 regulator-initial-mode = <0>;
249 };
250
251 vdda: ldo1 {
252 regulator-name = "vdda";
253 regulator-min-microvolt = <2900000>;
254 regulator-max-microvolt = <2900000>;
255 interrupts = <IT_CURLIM_LDO1 0>;
256 };
257
258 v2v8: ldo2 {
259 regulator-name = "v2v8";
260 regulator-min-microvolt = <2800000>;
261 regulator-max-microvolt = <2800000>;
262 interrupts = <IT_CURLIM_LDO2 0>;
263 };
264
265 vtt_ddr: ldo3 {
266 regulator-name = "vtt_ddr";
267 regulator-min-microvolt = <500000>;
268 regulator-max-microvolt = <750000>;
269 regulator-always-on;
270 regulator-over-current-protection;
271 };
272
273 vdd_usb: ldo4 {
274 regulator-name = "vdd_usb";
275 interrupts = <IT_CURLIM_LDO4 0>;
276 };
277
278 vdd_sd: ldo5 {
279 regulator-name = "vdd_sd";
280 regulator-min-microvolt = <2900000>;
281 regulator-max-microvolt = <2900000>;
282 interrupts = <IT_CURLIM_LDO5 0>;
283 regulator-boot-on;
284 };
285
286 v1v8: ldo6 {
287 regulator-name = "v1v8";
288 regulator-min-microvolt = <1800000>;
289 regulator-max-microvolt = <1800000>;
290 interrupts = <IT_CURLIM_LDO6 0>;
291 };
292
293 vref_ddr: vref_ddr {
294 regulator-name = "vref_ddr";
295 regulator-always-on;
296 };
297
298 bst_out: boost {
299 regulator-name = "bst_out";
300 interrupts = <IT_OCP_BOOST 0>;
301 };
302
303 vbus_otg: pwr_sw1 {
304 regulator-name = "vbus_otg";
305 interrupts = <IT_OCP_OTG 0>;
306 };
307
308 vbus_sw: pwr_sw2 {
309 regulator-name = "vbus_sw";
310 interrupts = <IT_OCP_SWOUT 0>;
311 regulator-active-discharge = <1>;
312 };
313 };
314
315 onkey {
316 compatible = "st,stpmic1-onkey";
317 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
318 interrupt-names = "onkey-falling", "onkey-rising";
319 power-off-time-sec = <10>;
320 status = "okay";
321 };
322
323 watchdog {
324 compatible = "st,stpmic1-wdt";
325 status = "disabled";
326 };
327 };
328};
329
330&ipcc {
331 status = "okay";
332};
333
334&iwdg2 {
335 timeout-sec = <32>;
336 status = "okay";
337};
338
339&m4_rproc {
340 memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
341 <&vdev0vring1>, <&vdev0buffer>;
342 mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>, <&ipcc 3>;
343 mbox-names = "vq0", "vq1", "shutdown", "detach";
344 pinctrl-names = "default";
345 pinctrl-0 = <&m4_leds_orange_pins_b>;
346 interrupt-parent = <&exti>;
347 interrupts = <68 1>;
348 status = "okay";
349};
350
351&pwr_regulators {
352 vdd-supply = <&vdd>;
353 vdd_3v3_usbfs-supply = <&vdd_usb>;
354};
355
356&rng1 {
357 status = "okay";
358};
359
360&rtc {
361 status = "okay";
362};
363
364&sdmmc1 {
365 pinctrl-names = "default", "opendrain", "sleep";
366 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
367 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
368 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
369 cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
370 disable-wp;
371 st,sig-dir;
372 st,neg-edge;
373 st,use-ckin;
374 bus-width = <4>;
375 vmmc-supply = <&vdd_sd>;
376 vqmmc-supply = <&sd_switch>;
377 sd-uhs-sdr12;
378 sd-uhs-sdr25;
379 sd-uhs-sdr50;
380 sd-uhs-ddr50;
381 status = "okay";
382};
383
384&sdmmc2 {
385 pinctrl-names = "default", "opendrain", "sleep";
386 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
387 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
388 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
389 non-removable;
390 no-sd;
391 no-sdio;
392 st,neg-edge;
393 bus-width = <8>;
394 vmmc-supply = <&v3v3>;
395 vqmmc-supply = <&vdd>;
396 mmc-ddr-3_3v;
397 status = "okay";
398};
399
400&timers6 {
401 status = "okay";
402 /* spare dmas for other usage */
403 /delete-property/dmas;
404 /delete-property/dma-names;
405 timer@5 {
406 status = "okay";
407 };
408};
409
410&uart4 {
411 pinctrl-names = "default", "sleep", "idle";
412 pinctrl-0 = <&uart4_pins_a>;
413 pinctrl-1 = <&uart4_sleep_pins_a>;
414 pinctrl-2 = <&uart4_idle_pins_a>;
415 /delete-property/dmas;
416 /delete-property/dma-names;
417 status = "okay";
418};
419
420&usbotg_hs {
421 vbus-supply = <&vbus_otg>;
422};
423
424&usbphyc_port0 {
425 phy-supply = <&vdd_usb>;
426};
427
428&usbphyc_port1 {
429 phy-supply = <&vdd_usb>;
430};