xref: /freebsd/sys/contrib/device-tree/src/arm/st/stm32mp157f-dk2.dts (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2*833e5d42SEmmanuel Vadot/*
3*833e5d42SEmmanuel Vadot * Copyright (C) STMicroelectronics 2025 - All Rights Reserved
4*833e5d42SEmmanuel Vadot * Author: Amelie Delaunay <amelie.delaunay@foss.st.com> for STMicroelectronics.
5*833e5d42SEmmanuel Vadot */
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadot/dts-v1/;
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadot#include "stm32mp157.dtsi"
10*833e5d42SEmmanuel Vadot#include "stm32mp15xf.dtsi"
11*833e5d42SEmmanuel Vadot#include "stm32mp15-pinctrl.dtsi"
12*833e5d42SEmmanuel Vadot#include "stm32mp15xxac-pinctrl.dtsi"
13*833e5d42SEmmanuel Vadot#include "stm32mp15xx-dkx.dtsi"
14*833e5d42SEmmanuel Vadot#include "stm32mp157f-dk2-scmi.dtsi"
15*833e5d42SEmmanuel Vadot
16*833e5d42SEmmanuel Vadot/ {
17*833e5d42SEmmanuel Vadot	model = "STMicroelectronics STM32MP157F-DK2 Discovery Board";
18*833e5d42SEmmanuel Vadot	compatible = "st,stm32mp157f-dk2", "st,stm32mp157";
19*833e5d42SEmmanuel Vadot
20*833e5d42SEmmanuel Vadot	aliases {
21*833e5d42SEmmanuel Vadot		ethernet0 = &ethernet0;
22*833e5d42SEmmanuel Vadot		serial3 = &usart2;
23*833e5d42SEmmanuel Vadot	};
24*833e5d42SEmmanuel Vadot
25*833e5d42SEmmanuel Vadot	chosen {
26*833e5d42SEmmanuel Vadot		stdout-path = "serial0:115200n8";
27*833e5d42SEmmanuel Vadot	};
28*833e5d42SEmmanuel Vadot
29*833e5d42SEmmanuel Vadot	wifi_pwrseq: wifi-pwrseq {
30*833e5d42SEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
31*833e5d42SEmmanuel Vadot		reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
32*833e5d42SEmmanuel Vadot	};
33*833e5d42SEmmanuel Vadot};
34*833e5d42SEmmanuel Vadot
35*833e5d42SEmmanuel Vadot&arm_wdt {
36*833e5d42SEmmanuel Vadot	timeout-sec = <32>;
37*833e5d42SEmmanuel Vadot	status = "okay";
38*833e5d42SEmmanuel Vadot};
39*833e5d42SEmmanuel Vadot
40*833e5d42SEmmanuel Vadot&cryp1 {
41*833e5d42SEmmanuel Vadot	status = "okay";
42*833e5d42SEmmanuel Vadot};
43*833e5d42SEmmanuel Vadot
44*833e5d42SEmmanuel Vadot&dsi {
45*833e5d42SEmmanuel Vadot	#address-cells = <1>;
46*833e5d42SEmmanuel Vadot	#size-cells = <0>;
47*833e5d42SEmmanuel Vadot	status = "okay";
48*833e5d42SEmmanuel Vadot
49*833e5d42SEmmanuel Vadot	panel@0 {
50*833e5d42SEmmanuel Vadot		compatible = "orisetech,otm8009a";
51*833e5d42SEmmanuel Vadot		reg = <0>;
52*833e5d42SEmmanuel Vadot		reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
53*833e5d42SEmmanuel Vadot		power-supply = <&scmi_v3v3>;
54*833e5d42SEmmanuel Vadot		status = "okay";
55*833e5d42SEmmanuel Vadot
56*833e5d42SEmmanuel Vadot		port {
57*833e5d42SEmmanuel Vadot			panel_in: endpoint {
58*833e5d42SEmmanuel Vadot				remote-endpoint = <&dsi_out>;
59*833e5d42SEmmanuel Vadot			};
60*833e5d42SEmmanuel Vadot		};
61*833e5d42SEmmanuel Vadot	};
62*833e5d42SEmmanuel Vadot};
63*833e5d42SEmmanuel Vadot
64*833e5d42SEmmanuel Vadot&dsi_in {
65*833e5d42SEmmanuel Vadot	remote-endpoint = <&ltdc_ep1_out>;
66*833e5d42SEmmanuel Vadot};
67*833e5d42SEmmanuel Vadot
68*833e5d42SEmmanuel Vadot&dsi_out {
69*833e5d42SEmmanuel Vadot	remote-endpoint = <&panel_in>;
70*833e5d42SEmmanuel Vadot};
71*833e5d42SEmmanuel Vadot
72*833e5d42SEmmanuel Vadot&i2c1 {
73*833e5d42SEmmanuel Vadot	touchscreen@38 {
74*833e5d42SEmmanuel Vadot		compatible = "focaltech,ft6236";
75*833e5d42SEmmanuel Vadot		reg = <0x38>;
76*833e5d42SEmmanuel Vadot		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
77*833e5d42SEmmanuel Vadot		interrupt-parent = <&gpiof>;
78*833e5d42SEmmanuel Vadot		touchscreen-size-x = <480>;
79*833e5d42SEmmanuel Vadot		touchscreen-size-y = <800>;
80*833e5d42SEmmanuel Vadot		status = "okay";
81*833e5d42SEmmanuel Vadot	};
82*833e5d42SEmmanuel Vadot};
83*833e5d42SEmmanuel Vadot
84*833e5d42SEmmanuel Vadot/* I2C4 is managed by OP-TEE */
85*833e5d42SEmmanuel Vadot&i2c4 {
86*833e5d42SEmmanuel Vadot	status = "disabled";
87*833e5d42SEmmanuel Vadot
88*833e5d42SEmmanuel Vadot	/* i2c4 subnodes, which won't be managed by Linux */
89*833e5d42SEmmanuel Vadot	typec@28 {
90*833e5d42SEmmanuel Vadot		status = "disabled";
91*833e5d42SEmmanuel Vadot		connector {
92*833e5d42SEmmanuel Vadot			status = "disabled";
93*833e5d42SEmmanuel Vadot		};
94*833e5d42SEmmanuel Vadot	};
95*833e5d42SEmmanuel Vadot
96*833e5d42SEmmanuel Vadot	stpmic@33 {
97*833e5d42SEmmanuel Vadot		status = "disabled";
98*833e5d42SEmmanuel Vadot	};
99*833e5d42SEmmanuel Vadot};
100*833e5d42SEmmanuel Vadot
101*833e5d42SEmmanuel Vadot&ltdc {
102*833e5d42SEmmanuel Vadot	status = "okay";
103*833e5d42SEmmanuel Vadot
104*833e5d42SEmmanuel Vadot	port {
105*833e5d42SEmmanuel Vadot		#address-cells = <1>;
106*833e5d42SEmmanuel Vadot		#size-cells = <0>;
107*833e5d42SEmmanuel Vadot
108*833e5d42SEmmanuel Vadot		ltdc_ep1_out: endpoint@1 {
109*833e5d42SEmmanuel Vadot			reg = <1>;
110*833e5d42SEmmanuel Vadot			remote-endpoint = <&dsi_in>;
111*833e5d42SEmmanuel Vadot		};
112*833e5d42SEmmanuel Vadot	};
113*833e5d42SEmmanuel Vadot};
114*833e5d42SEmmanuel Vadot
115*833e5d42SEmmanuel Vadot&rtc {
116*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
117*833e5d42SEmmanuel Vadot	pinctrl-0 = <&rtc_rsvd_pins_a>;
118*833e5d42SEmmanuel Vadot
119*833e5d42SEmmanuel Vadot	rtc_lsco_pins_a: rtc-lsco-0 {
120*833e5d42SEmmanuel Vadot		pins = "out2_rmp";
121*833e5d42SEmmanuel Vadot		function = "lsco";
122*833e5d42SEmmanuel Vadot	};
123*833e5d42SEmmanuel Vadot};
124*833e5d42SEmmanuel Vadot
125*833e5d42SEmmanuel Vadot/* Wifi */
126*833e5d42SEmmanuel Vadot&sdmmc2 {
127*833e5d42SEmmanuel Vadot	pinctrl-names = "default", "opendrain", "sleep";
128*833e5d42SEmmanuel Vadot	pinctrl-0 = <&sdmmc2_b4_pins_a>;
129*833e5d42SEmmanuel Vadot	pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
130*833e5d42SEmmanuel Vadot	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
131*833e5d42SEmmanuel Vadot	non-removable;
132*833e5d42SEmmanuel Vadot	cap-sdio-irq;
133*833e5d42SEmmanuel Vadot	st,neg-edge;
134*833e5d42SEmmanuel Vadot	bus-width = <4>;
135*833e5d42SEmmanuel Vadot	vmmc-supply = <&scmi_v3v3>;
136*833e5d42SEmmanuel Vadot	mmc-pwrseq = <&wifi_pwrseq>;
137*833e5d42SEmmanuel Vadot	#address-cells = <1>;
138*833e5d42SEmmanuel Vadot	#size-cells = <0>;
139*833e5d42SEmmanuel Vadot	status = "okay";
140*833e5d42SEmmanuel Vadot
141*833e5d42SEmmanuel Vadot	brcmf: wifi@1 {
142*833e5d42SEmmanuel Vadot		reg = <1>;
143*833e5d42SEmmanuel Vadot		compatible = "brcm,bcm4329-fmac";
144*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
145*833e5d42SEmmanuel Vadot		pinctrl-0 = <&rtc_lsco_pins_a>;
146*833e5d42SEmmanuel Vadot	};
147*833e5d42SEmmanuel Vadot};
148*833e5d42SEmmanuel Vadot
149*833e5d42SEmmanuel Vadot/* Bluetooth */
150*833e5d42SEmmanuel Vadot&usart2 {
151*833e5d42SEmmanuel Vadot	pinctrl-names = "default", "sleep", "idle";
152*833e5d42SEmmanuel Vadot	pinctrl-0 = <&usart2_pins_c>;
153*833e5d42SEmmanuel Vadot	pinctrl-1 = <&usart2_sleep_pins_c>;
154*833e5d42SEmmanuel Vadot	pinctrl-2 = <&usart2_idle_pins_c>;
155*833e5d42SEmmanuel Vadot	uart-has-rtscts;
156*833e5d42SEmmanuel Vadot	status = "okay";
157*833e5d42SEmmanuel Vadot
158*833e5d42SEmmanuel Vadot	bluetooth {
159*833e5d42SEmmanuel Vadot		shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
160*833e5d42SEmmanuel Vadot		compatible = "brcm,bcm43438-bt";
161*833e5d42SEmmanuel Vadot		max-speed = <3000000>;
162*833e5d42SEmmanuel Vadot		vbat-supply = <&scmi_v3v3>;
163*833e5d42SEmmanuel Vadot		vddio-supply = <&scmi_v3v3>;
164*833e5d42SEmmanuel Vadot	};
165*833e5d42SEmmanuel Vadot};
166*833e5d42SEmmanuel Vadot
167*833e5d42SEmmanuel Vadot/* Since I2C4 is disabled, STUSB1600 is also disabled so there is no Type-C support */
168*833e5d42SEmmanuel Vadot&usbotg_hs {
169*833e5d42SEmmanuel Vadot	dr_mode = "peripheral";
170*833e5d42SEmmanuel Vadot	role-switch-default-mode = "peripheral";
171*833e5d42SEmmanuel Vadot	/*
172*833e5d42SEmmanuel Vadot	 * Forcing dr_mode = "peripheral"/"role-switch-default-mode = "peripheral";
173*833e5d42SEmmanuel Vadot	 * will cause the pull-up on D+/D- to be raised as soon as the OTG is configured at runtime,
174*833e5d42SEmmanuel Vadot	 * regardless of the presence of VBUS. Notice that on self-powered devices like
175*833e5d42SEmmanuel Vadot	 * stm32mp157f-dk2, this isn't compliant with the USB standard. That's why usbotg_hs is kept
176*833e5d42SEmmanuel Vadot	 * disabled here.
177*833e5d42SEmmanuel Vadot	 */
178*833e5d42SEmmanuel Vadot	status = "disabled";
179*833e5d42SEmmanuel Vadot};
180