• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2019-2020 Marek Vasut <marex@denx.de>
4 */
5
6#include "stm32mp15-pinctrl.dtsi"
7#include "stm32mp15xxaa-pinctrl.dtsi"
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/mfd/st,stpmic1.h>
10
11/ {
12	aliases {
13		ethernet0 = &ethernet0;
14	};
15
16	memory@c0000000 {
17		device_type = "memory";
18		reg = <0xC0000000 0x40000000>;
19	};
20
21	reserved-memory {
22		#address-cells = <1>;
23		#size-cells = <1>;
24		ranges;
25
26		mcuram2: mcuram2@10000000 {
27			compatible = "shared-dma-pool";
28			reg = <0x10000000 0x40000>;
29			no-map;
30		};
31
32		vdev0vring0: vdev0vring0@10040000 {
33			compatible = "shared-dma-pool";
34			reg = <0x10040000 0x1000>;
35			no-map;
36		};
37
38		vdev0vring1: vdev0vring1@10041000 {
39			compatible = "shared-dma-pool";
40			reg = <0x10041000 0x1000>;
41			no-map;
42		};
43
44		vdev0buffer: vdev0buffer@10042000 {
45			compatible = "shared-dma-pool";
46			reg = <0x10042000 0x4000>;
47			no-map;
48		};
49
50		mcuram: mcuram@30000000 {
51			compatible = "shared-dma-pool";
52			reg = <0x30000000 0x40000>;
53			no-map;
54		};
55
56		retram: retram@38000000 {
57			compatible = "shared-dma-pool";
58			reg = <0x38000000 0x10000>;
59			no-map;
60		};
61	};
62
63	ethernet_vio: vioregulator {
64		compatible = "regulator-fixed";
65		regulator-name = "vio";
66		regulator-min-microvolt = <3300000>;
67		regulator-max-microvolt = <3300000>;
68		gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
69		regulator-always-on;
70		regulator-boot-on;
71		vin-supply = <&vdd>;
72	};
73};
74
75&adc {
76	vdd-supply = <&vdd>;
77	vdda-supply = <&vdda>;
78	vref-supply = <&vdda>;
79	status = "okay";
80
81	adc1: adc@0 {
82		st,min-sample-time-nsecs = <5000>;
83		st,adc-channels = <0>;
84		status = "okay";
85	};
86
87	adc2: adc@100 {
88		st,adc-channels = <1>;
89		st,min-sample-time-nsecs = <5000>;
90		status = "okay";
91	};
92};
93
94&dac {
95	pinctrl-names = "default";
96	pinctrl-0 = <&dac_ch1_pins_a &dac_ch2_pins_a>;
97	vref-supply = <&vdda>;
98	status = "okay";
99
100	dac1: dac@1 {
101		status = "okay";
102	};
103	dac2: dac@2 {
104		status = "okay";
105	};
106};
107
108&dts {
109	status = "okay";
110};
111
112&ethernet0 {
113	status = "okay";
114	pinctrl-0 = <&ethernet0_rmii_pins_a>;
115	pinctrl-1 = <&ethernet0_rmii_sleep_pins_a>;
116	pinctrl-names = "default", "sleep";
117	phy-mode = "rmii";
118	max-speed = <100>;
119	phy-handle = <&phy0>;
120	st,eth-ref-clk-sel;
121
122	mdio0 {
123		#address-cells = <1>;
124		#size-cells = <0>;
125		compatible = "snps,dwmac-mdio";
126
127		phy0: ethernet-phy@1 {
128			reg = <1>;
129			/* LAN8710Ai */
130			compatible = "ethernet-phy-id0007.c0f0",
131				     "ethernet-phy-ieee802.3-c22";
132			clocks = <&rcc ETHCK_K>;
133			reset-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>;
134			reset-assert-us = <500>;
135			reset-deassert-us = <500>;
136			smsc,disable-energy-detect;
137			interrupt-parent = <&gpioi>;
138			interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
139		};
140	};
141};
142
143&i2c4 {
144	pinctrl-names = "default";
145	pinctrl-0 = <&i2c4_pins_a>;
146	i2c-scl-rising-time-ns = <185>;
147	i2c-scl-falling-time-ns = <20>;
148	status = "okay";
149	/* spare dmas for other usage */
150	/delete-property/dmas;
151	/delete-property/dma-names;
152
153	rtc@32 {
154		compatible = "microcrystal,rv8803";
155		reg = <0x32>;
156	};
157
158	pmic: stpmic@33 {
159		compatible = "st,stpmic1";
160		reg = <0x33>;
161		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
162		interrupt-controller;
163		#interrupt-cells = <2>;
164		status = "okay";
165
166		regulators {
167			compatible = "st,stpmic1-regulators";
168			ldo1-supply = <&v3v3>;
169			ldo2-supply = <&v3v3>;
170			ldo3-supply = <&vdd_ddr>;
171			ldo5-supply = <&v3v3>;
172			ldo6-supply = <&v3v3>;
173			pwr_sw1-supply = <&bst_out>;
174			pwr_sw2-supply = <&bst_out>;
175
176			vddcore: buck1 {
177				regulator-name = "vddcore";
178				regulator-min-microvolt = <800000>;
179				regulator-max-microvolt = <1350000>;
180				regulator-always-on;
181				regulator-initial-mode = <0>;
182				regulator-over-current-protection;
183			};
184
185			vdd_ddr: buck2 {
186				regulator-name = "vdd_ddr";
187				regulator-min-microvolt = <1350000>;
188				regulator-max-microvolt = <1350000>;
189				regulator-always-on;
190				regulator-initial-mode = <0>;
191				regulator-over-current-protection;
192			};
193
194			vdd: buck3 {
195				regulator-name = "vdd";
196				regulator-min-microvolt = <3300000>;
197				regulator-max-microvolt = <3300000>;
198				regulator-always-on;
199				st,mask-reset;
200				regulator-initial-mode = <0>;
201				regulator-over-current-protection;
202			};
203
204			v3v3: buck4 {
205				regulator-name = "v3v3";
206				regulator-min-microvolt = <3300000>;
207				regulator-max-microvolt = <3300000>;
208				regulator-always-on;
209				regulator-over-current-protection;
210				regulator-initial-mode = <0>;
211			};
212
213			vdda: ldo1 {
214				regulator-name = "vdda";
215				regulator-always-on;
216				regulator-min-microvolt = <2900000>;
217				regulator-max-microvolt = <2900000>;
218				interrupts = <IT_CURLIM_LDO1 0>;
219			};
220
221			v2v8: ldo2 {
222				regulator-name = "v2v8";
223				regulator-min-microvolt = <2800000>;
224				regulator-max-microvolt = <2800000>;
225				interrupts = <IT_CURLIM_LDO2 0>;
226			};
227
228			vtt_ddr: ldo3 {
229				regulator-name = "vtt_ddr";
230				regulator-min-microvolt = <500000>;
231				regulator-max-microvolt = <750000>;
232				regulator-always-on;
233				regulator-over-current-protection;
234			};
235
236			vdd_usb: ldo4 {
237				regulator-name = "vdd_usb";
238				interrupts = <IT_CURLIM_LDO4 0>;
239			};
240
241			vdd_sd: ldo5 {
242				regulator-name = "vdd_sd";
243				regulator-min-microvolt = <2900000>;
244				regulator-max-microvolt = <2900000>;
245				interrupts = <IT_CURLIM_LDO5 0>;
246				regulator-boot-on;
247			};
248
249			v1v8: ldo6 {
250				regulator-name = "v1v8";
251				regulator-min-microvolt = <1800000>;
252				regulator-max-microvolt = <1800000>;
253				interrupts = <IT_CURLIM_LDO6 0>;
254			};
255
256			vref_ddr: vref_ddr {
257				regulator-name = "vref_ddr";
258				regulator-always-on;
259			};
260
261			bst_out: boost {
262				regulator-name = "bst_out";
263				interrupts = <IT_OCP_BOOST 0>;
264			};
265
266			vbus_otg: pwr_sw1 {
267				regulator-name = "vbus_otg";
268				interrupts = <IT_OCP_OTG 0>;
269			};
270
271			vbus_sw: pwr_sw2 {
272				regulator-name = "vbus_sw";
273				interrupts = <IT_OCP_SWOUT 0>;
274				regulator-active-discharge = <1>;
275			};
276		};
277
278		onkey {
279			compatible = "st,stpmic1-onkey";
280			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
281			interrupt-names = "onkey-falling", "onkey-rising";
282			power-off-time-sec = <10>;
283			status = "okay";
284		};
285
286		watchdog {
287			compatible = "st,stpmic1-wdt";
288			status = "disabled";
289		};
290	};
291
292	touchscreen@49 {
293		compatible = "ti,tsc2004";
294		reg = <0x49>;
295		vio-supply = <&v3v3>;
296		interrupts-extended = <&gpioh 15 IRQ_TYPE_EDGE_FALLING>;
297	};
298
299	eeprom@50 {
300		compatible = "atmel,24c02";
301		reg = <0x50>;
302		pagesize = <16>;
303	};
304};
305
306&ipcc {
307	status = "okay";
308};
309
310&iwdg2 {
311	timeout-sec = <32>;
312	status = "okay";
313};
314
315&m4_rproc {
316	memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>,
317			<&vdev0vring1>, <&vdev0buffer>;
318	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
319	mbox-names = "vq0", "vq1", "shutdown";
320	interrupt-parent = <&exti>;
321	interrupts = <68 1>;
322	status = "okay";
323};
324
325&pwr_regulators {
326	vdd-supply = <&vdd>;
327	vdd_3v3_usbfs-supply = <&vdd_usb>;
328};
329
330&qspi {
331	pinctrl-names = "default", "sleep";
332	pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
333	pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
334	reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
335	#address-cells = <1>;
336	#size-cells = <0>;
337	status = "okay";
338
339	flash0: flash@0 {
340		compatible = "jedec,spi-nor";
341		reg = <0>;
342		spi-rx-bus-width = <4>;
343		spi-max-frequency = <108000000>;
344		#address-cells = <1>;
345		#size-cells = <1>;
346	};
347};
348
349&rng1 {
350	status = "okay";
351};
352
353&rtc {
354	status = "okay";
355};
356
357&sdmmc1 {
358	pinctrl-names = "default", "opendrain", "sleep";
359	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
360	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
361	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
362	cd-gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
363	disable-wp;
364	st,sig-dir;
365	st,neg-edge;
366	st,use-ckin;
367	bus-width = <4>;
368	vmmc-supply = <&vdd_sd>;
369	status = "okay";
370};
371
372&sdmmc2 {
373	pinctrl-names = "default", "opendrain", "sleep";
374	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
375	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>;
376	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
377	non-removable;
378	no-sd;
379	no-sdio;
380	st,neg-edge;
381	bus-width = <8>;
382	vmmc-supply = <&v3v3>;
383	vqmmc-supply = <&v3v3>;
384	mmc-ddr-3_3v;
385	status = "okay";
386};
387
388&sdmmc3 {
389	pinctrl-names = "default", "opendrain", "sleep";
390	pinctrl-0 = <&sdmmc3_b4_pins_a>;
391	pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
392	pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
393	broken-cd;
394	st,neg-edge;
395	bus-width = <4>;
396	vmmc-supply = <&v3v3>;
397	vqmmc-supply = <&v3v3>;
398	mmc-ddr-3_3v;
399	status = "okay";
400};
401
402&uart4 {
403	pinctrl-names = "default";
404	pinctrl-0 = <&uart4_pins_a>;
405	status = "okay";
406};
407