xref: /linux/arch/arm/boot/dts/st/stm32mp13xx-dhcor-som.dtsi (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (C) 2024 Marek Vasut <marex@denx.de>
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/input/input.h>
8#include <dt-bindings/leds/common.h>
9#include <dt-bindings/mfd/st,stpmic1.h>
10#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
11#include "stm32mp13-pinctrl.dtsi"
12
13/ {
14	model = "DH electronics STM32MP13xx DHCOR SoM";
15	compatible = "dh,stm32mp131a-dhcor-som",
16		     "st,stm32mp131";
17
18	aliases {
19		mmc0 = &sdmmc2;
20		mmc1 = &sdmmc1;
21		serial0 = &uart4;
22		serial1 = &uart7;
23		rtc0 = &rv3032;
24		spi0 = &qspi;
25	};
26
27	memory@c0000000 {
28		device_type = "memory";
29		reg = <0xc0000000 0x20000000>;
30	};
31
32	reserved-memory {
33		#address-cells = <1>;
34		#size-cells = <1>;
35		ranges;
36
37		optee@dd000000 {
38			reg = <0xdd000000 0x3000000>;
39			no-map;
40		};
41	};
42
43	sdio_pwrseq: sdio-pwrseq {
44		compatible = "mmc-pwrseq-simple";
45		reset-gpios = <&gpiof 12 GPIO_ACTIVE_LOW>;
46	};
47
48	vin: vin {
49		compatible = "regulator-fixed";
50		regulator-name = "vin";
51		regulator-min-microvolt = <5000000>;
52		regulator-max-microvolt = <5000000>;
53		regulator-always-on;
54	};
55};
56
57&i2c3 {
58	i2c-scl-rising-time-ns = <96>;
59	i2c-scl-falling-time-ns = <3>;
60	clock-frequency = <400000>;
61	status = "okay";
62	/* spare dmas for other usage */
63	/delete-property/dmas;
64	/delete-property/dma-names;
65
66	pmic: stpmic@33 {
67		compatible = "st,stpmic1";
68		reg = <0x33>;
69		interrupts-extended = <&gpioi 3 IRQ_TYPE_EDGE_FALLING>;
70		interrupt-controller;
71		#interrupt-cells = <2>;
72		status = "okay";
73
74		regulators {
75			compatible = "st,stpmic1-regulators";
76
77			ldo1-supply = <&vin>;
78			ldo2-supply = <&vin>;
79			ldo3-supply = <&vin>;
80			ldo4-supply = <&vin>;
81			ldo5-supply = <&vin>;
82			ldo6-supply = <&vin>;
83			pwr_sw1-supply = <&bst_out>;
84			pwr_sw2-supply = <&bst_out>;
85
86			vddcpu: buck1 { /* VDD_CPU_1V2 */
87				regulator-name = "vddcpu";
88				regulator-min-microvolt = <1250000>;
89				regulator-max-microvolt = <1250000>;
90				regulator-always-on;
91				regulator-initial-mode = <0>;
92				regulator-over-current-protection;
93			};
94
95			vdd_ddr: buck2 { /* VDD_DDR_1V35 */
96				regulator-name = "vdd_ddr";
97				regulator-min-microvolt = <1350000>;
98				regulator-max-microvolt = <1350000>;
99				regulator-always-on;
100				regulator-initial-mode = <0>;
101				regulator-over-current-protection;
102			};
103
104			vdd: buck3 { /* VDD_3V3_1V8 */
105				regulator-name = "vdd";
106				regulator-min-microvolt = <1800000>;
107				regulator-max-microvolt = <3300000>;
108				regulator-always-on;
109				regulator-initial-mode = <0>;
110				regulator-over-current-protection;
111			};
112
113			vddcore: buck4 { /* VDD_CORE_1V2 */
114				regulator-name = "vddcore";
115				regulator-min-microvolt = <1250000>;
116				regulator-max-microvolt = <1250000>;
117				regulator-always-on;
118				regulator-initial-mode = <0>;
119				regulator-over-current-protection;
120			};
121
122			vdd_adc: ldo1 { /* VDD_ADC_1V8 */
123				regulator-name = "vdd_adc";
124				regulator-min-microvolt = <1800000>;
125				regulator-max-microvolt = <1800000>;
126				interrupts = <IT_CURLIM_LDO1 0>;
127			};
128
129			vdd_ldo2: ldo2 { /* LDO2_OUT_1V8 */
130				regulator-name = "vdd_ldo2";
131				regulator-min-microvolt = <1800000>;
132				regulator-max-microvolt = <1800000>;
133				interrupts = <IT_CURLIM_LDO2 0>;
134			};
135
136			vdd_ldo3: ldo3 { /* LDO3_OUT */
137				regulator-name = "vdd_ldo3";
138				regulator-min-microvolt = <1800000>;
139				regulator-max-microvolt = <1800000>;
140				interrupts = <IT_CURLIM_LDO3 0>;
141			};
142
143			vdd_usb: ldo4 { /* VDD_USB_3V3 */
144				regulator-name = "vdd_usb";
145				regulator-min-microvolt = <3300000>;
146				regulator-max-microvolt = <3300000>;
147				interrupts = <IT_CURLIM_LDO4 0>;
148			};
149
150			vdd_sd: ldo5 { /* VDD_SD_3V3_1V8 */
151				regulator-name = "vdd_sd";
152				regulator-min-microvolt = <1800000>;
153				regulator-max-microvolt = <3300000>;
154				interrupts = <IT_CURLIM_LDO5 0>;
155			};
156
157			vdd_sd2: ldo6 { /* VDD_SD2_3V3_1V8 */
158				regulator-name = "vdd_sd2";
159				regulator-min-microvolt = <1800000>;
160				regulator-max-microvolt = <3300000>;
161				interrupts = <IT_CURLIM_LDO6 0>;
162			};
163
164			vref_ddr: vref_ddr { /* VREF_DDR_0V675 */
165				regulator-name = "vref_ddr";
166				regulator-always-on;
167			};
168
169			bst_out: boost { /* BST_OUT_5V2 */
170				regulator-name = "bst_out";
171			};
172
173			vbus_otg: pwr_sw1 {
174				regulator-name = "vbus_otg";
175				interrupts = <IT_OCP_OTG 0>;
176			};
177
178			vbus_sw: pwr_sw2 {
179				regulator-name = "vbus_sw";
180				interrupts = <IT_OCP_SWOUT 0>;
181				regulator-active-discharge = <1>;
182			};
183		};
184
185		onkey {
186			compatible = "st,stpmic1-onkey";
187			interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
188			interrupt-names = "onkey-falling", "onkey-rising";
189			status = "okay";
190		};
191
192		watchdog {
193			compatible = "st,stpmic1-wdt";
194			status = "disabled";
195		};
196	};
197
198	eeprom0: eeprom@50 {
199		compatible = "atmel,24c256";	/* ST M24256 */
200		reg = <0x50>;
201		pagesize = <64>;
202	};
203
204	eeprom0wl: eeprom@58 {
205		compatible = "st,24256e-wl";	/* ST M24256E WL page of 0x50 */
206		pagesize = <64>;
207		reg = <0x58>;
208	};
209
210	rv3032: rtc@51 {
211		compatible = "microcrystal,rv3032";
212		reg = <0x51>;
213		interrupts-extended = <&gpioi 0 IRQ_TYPE_EDGE_FALLING>;
214	};
215};
216
217&iwdg2 {
218	timeout-sec = <32>;
219	status = "okay";
220};
221
222&qspi {
223	pinctrl-names = "default", "sleep";
224	pinctrl-0 = <&qspi_clk_pins_a
225		     &qspi_bk1_pins_a
226		     &qspi_cs1_pins_a>;
227	pinctrl-1 = <&qspi_clk_sleep_pins_a
228		     &qspi_bk1_sleep_pins_a
229		     &qspi_cs1_sleep_pins_a>;
230	#address-cells = <1>;
231	#size-cells = <0>;
232	status = "okay";
233
234	flash0: flash@0 {
235		compatible = "jedec,spi-nor";
236		reg = <0>;
237		spi-rx-bus-width = <4>;
238		spi-max-frequency = <108000000>;
239		#address-cells = <1>;
240		#size-cells = <1>;
241	};
242};
243
244/* Console UART */
245&uart4 {
246	pinctrl-names = "default", "sleep", "idle";
247	pinctrl-0 = <&uart4_pins_b>;
248	pinctrl-1 = <&uart4_sleep_pins_b>;
249	pinctrl-2 = <&uart4_idle_pins_b>;
250	/delete-property/dmas;
251	/delete-property/dma-names;
252	status = "okay";
253};
254
255/* Bluetooth */
256&uart7 {
257	pinctrl-names = "default", "sleep", "idle";
258	pinctrl-0 = <&uart7_pins_a>;
259	pinctrl-1 = <&uart7_sleep_pins_a>;
260	pinctrl-2 = <&uart7_idle_pins_a>;
261	uart-has-rtscts;
262	status = "okay";
263
264	bluetooth {
265		compatible = "infineon,cyw43439-bt", "brcm,bcm4329-bt";
266		max-speed = <3000000>;
267		device-wakeup-gpios = <&gpiog 9 GPIO_ACTIVE_HIGH>;
268		shutdown-gpios = <&gpioi 2 GPIO_ACTIVE_HIGH>;
269	};
270};
271
272/* SDIO WiFi */
273&sdmmc1 {
274	pinctrl-names = "default", "opendrain", "sleep";
275	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>;
276	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>;
277	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
278	bus-width = <4>;
279	cap-power-off-card;
280	keep-power-in-suspend;
281	non-removable;
282	st,neg-edge;
283	vmmc-supply = <&vdd>;
284	mmc-pwrseq = <&sdio_pwrseq>;
285	status = "okay";
286
287	#address-cells = <1>;
288	#size-cells = <0>;
289
290	brcmf: bcrmf@1 {	/* muRata 1YN */
291		reg = <1>;
292		compatible = "infineon,cyw43439-fmac", "brcm,bcm4329-fmac";
293		interrupt-parent = <&gpioe>;
294		interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
295		interrupt-names = "host-wake";
296	};
297};
298
299/* eMMC */
300&sdmmc2 {
301	pinctrl-names = "default", "opendrain", "sleep";
302	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a &sdmmc2_clk_pins_a>;
303	pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a &sdmmc2_clk_pins_a>;
304	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>;
305	bus-width = <8>;
306	mmc-ddr-3_3v;
307	no-sd;
308	no-sdio;
309	non-removable;
310	st,neg-edge;
311	vmmc-supply = <&vdd>;
312	vqmmc-supply = <&vdd>;
313	status = "okay";
314};
315