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