Skip to content

Commit fadfd41

Browse files
ADESTMAlexandre Torgue
authored andcommitted
ARM: dts: stm32: add stm32mp157f-dk2 board support
STM32MP157F-DK2 board embeds a STM32MP157F SoC. This SoC contains the same level of feature than a STM32MP157C SOC but A7 clock frequency can reach 800MHz, hence the inclusion of the newly introduced stm32mp15xf.dtsi. As for other latest STM32 MPU families, STM32MP157F-DK2 relies on OP-TEE SCMI services for SoC clock and reset controllers resources, and for PMIC, now under OP-TEE control. That's why stm32mp157f-dk2-scmi.dtsi is introduced, to move all clocks, resets and regulators to SCMI-based ones. To "disable" SCMI, just need to comment stm32mp157f-dk2-scmi.dtsi inclusion and to replace &scmi_v3v3 with &v3v3, then to disable arm_wdt and to enable i2c4 and its subnodes for PMIC support by Linux. Reconfigure usbotg for dual role with type-C support if needed. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20250603-stm32mp157f-dk2-v2-7-5be0854a9299@foss.st.com Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
1 parent ef21a06 commit fadfd41

3 files changed

Lines changed: 377 additions & 1 deletion

File tree

arch/arm/boot/dts/st/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ dtb-$(CONFIG_ARCH_STM32) += \
7272
stm32mp157c-odyssey.dtb \
7373
stm32mp157c-osd32mp1-red.dtb \
7474
stm32mp157c-phycore-stm32mp1-3.dtb \
75-
stm32mp157c-ultra-fly-sbc.dtb
75+
stm32mp157c-ultra-fly-sbc.dtb \
76+
stm32mp157f-dk2.dtb
7677
dtb-$(CONFIG_ARCH_U8500) += \
7778
ste-snowball.dtb \
7879
ste-hrefprev60-stuib.dtb \
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2+
/*
3+
* Copyright (C) STMicroelectronics 2025 - All Rights Reserved
4+
* Author: Amelie Delaunay <amelie.delaunay@foss.st.com> for STMicroelectronics.
5+
*/
6+
7+
#include "stm32mp15-scmi.dtsi"
8+
9+
/ {
10+
reserved-memory {
11+
optee@de000000 {
12+
reg = <0xde000000 0x2000000>;
13+
no-map;
14+
};
15+
};
16+
17+
arm_wdt: watchdog {
18+
compatible = "arm,smc-wdt";
19+
arm,smc-id = <0xbc000000>;
20+
status = "disabled";
21+
};
22+
23+
};
24+
25+
&adc {
26+
vdd-supply = <&scmi_vdd>;
27+
vdda-supply = <&scmi_vdd>;
28+
};
29+
30+
&cpu0 {
31+
clocks = <&scmi_clk CK_SCMI_MPU>;
32+
};
33+
34+
&cpu1 {
35+
clocks = <&scmi_clk CK_SCMI_MPU>;
36+
};
37+
38+
&cryp1 {
39+
clocks = <&scmi_clk CK_SCMI_CRYP1>;
40+
resets = <&scmi_reset RST_SCMI_CRYP1>;
41+
};
42+
43+
&cs42l51 {
44+
VL-supply = <&scmi_v3v3>;
45+
VD-supply = <&scmi_v1v8_audio>;
46+
VA-supply = <&scmi_v1v8_audio>;
47+
VAHP-supply = <&scmi_v1v8_audio>;
48+
};
49+
50+
&dsi {
51+
phy-dsi-supply = <&scmi_reg18>;
52+
clocks = <&rcc DSI>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
53+
};
54+
55+
&gpioz {
56+
clocks = <&scmi_clk CK_SCMI_GPIOZ>;
57+
};
58+
59+
&hash1 {
60+
clocks = <&scmi_clk CK_SCMI_HASH1>;
61+
resets = <&scmi_reset RST_SCMI_HASH1>;
62+
};
63+
64+
&i2c1 {
65+
hdmi-transmitter@39 {
66+
iovcc-supply = <&scmi_v3v3_hdmi>;
67+
cvcc12-supply = <&scmi_v1v2_hdmi>;
68+
};
69+
};
70+
71+
&iwdg2 {
72+
clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
73+
status = "disabled";
74+
};
75+
76+
&m4_rproc {
77+
/delete-property/ st,syscfg-holdboot;
78+
resets = <&scmi_reset RST_SCMI_MCU>,
79+
<&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
80+
reset-names = "mcu_rst", "hold_boot";
81+
};
82+
83+
&mdma1 {
84+
resets = <&scmi_reset RST_SCMI_MDMA>;
85+
};
86+
87+
&optee {
88+
interrupt-parent = <&intc>;
89+
interrupts = <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
90+
};
91+
92+
&pwr_regulators {
93+
vdd-supply = <&scmi_vdd>;
94+
vdd_3v3_usbfs-supply = <&scmi_vdd_usb>;
95+
status = "disabled";
96+
};
97+
98+
&rcc {
99+
compatible = "st,stm32mp1-rcc-secure", "syscon";
100+
clock-names = "hse", "hsi", "csi", "lse", "lsi";
101+
clocks = <&scmi_clk CK_SCMI_HSE>,
102+
<&scmi_clk CK_SCMI_HSI>,
103+
<&scmi_clk CK_SCMI_CSI>,
104+
<&scmi_clk CK_SCMI_LSE>,
105+
<&scmi_clk CK_SCMI_LSI>;
106+
};
107+
108+
&rng1 {
109+
clocks = <&scmi_clk CK_SCMI_RNG1>;
110+
resets = <&scmi_reset RST_SCMI_RNG1>;
111+
};
112+
113+
&rtc {
114+
clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
115+
};
116+
117+
&scmi_reguls {
118+
scmi_vddcore: regulator@3 {
119+
reg = <VOLTD_SCMI_STPMIC1_BUCK1>;
120+
regulator-name = "vddcore";
121+
};
122+
123+
scmi_vdd: regulator@5 {
124+
reg = <VOLTD_SCMI_STPMIC1_BUCK3>;
125+
regulator-name = "vdd";
126+
};
127+
128+
scmi_v3v3: regulator@6 {
129+
reg = <VOLTD_SCMI_STPMIC1_BUCK4>;
130+
regulator-name = "v3v3";
131+
};
132+
133+
scmi_v1v8_audio: regulator@7 {
134+
reg = <VOLTD_SCMI_STPMIC1_LDO1>;
135+
regulator-name = "v1v8_audio";
136+
};
137+
138+
scmi_v3v3_hdmi: regulator@8 {
139+
reg = <VOLTD_SCMI_STPMIC1_LDO2>;
140+
regulator-name = "v3v3_hdmi";
141+
};
142+
143+
scmi_vdd_usb: regulator@a {
144+
reg = <VOLTD_SCMI_STPMIC1_LDO4>;
145+
regulator-name = "vdd_usb";
146+
};
147+
148+
scmi_vdda: regulator@b {
149+
reg = <VOLTD_SCMI_STPMIC1_LDO5>;
150+
regulator-name = "vdda";
151+
};
152+
153+
scmi_v1v2_hdmi: regulator@c {
154+
reg = <VOLTD_SCMI_STPMIC1_LDO6>;
155+
regulator-name = "v1v2_hdmi";
156+
regulator-min-microvolt = <1200000>;
157+
regulator-max-microvolt = <1200000>;
158+
regulator-always-on;
159+
};
160+
161+
scmi_vbus_otg: regulator@f {
162+
reg = <VOLTD_SCMI_STPMIC1_PWR_SW1>;
163+
regulator-name = "vbus_otg";
164+
};
165+
166+
scmi_vbus_sw: regulator@10 {
167+
reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
168+
regulator-name = "vbus_sw";
169+
};
170+
};
171+
172+
&sdmmc1 {
173+
vmmc-supply = <&scmi_v3v3>;
174+
};
175+
176+
&sdmmc3 {
177+
vmmc-supply = <&scmi_v3v3>;
178+
};
179+
180+
&usbh_ehci {
181+
hub@1 {
182+
vdd-supply = <&scmi_v3v3>;
183+
};
184+
};
185+
186+
&usbphyc_port0 {
187+
phy-supply = <&scmi_vdd_usb>;
188+
};
189+
190+
&usbphyc_port1 {
191+
phy-supply = <&scmi_vdd_usb>;
192+
};
193+
194+
&vrefbuf {
195+
vdda-supply = <&scmi_vdd>;
196+
};
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2+
/*
3+
* Copyright (C) STMicroelectronics 2025 - All Rights Reserved
4+
* Author: Amelie Delaunay <amelie.delaunay@foss.st.com> for STMicroelectronics.
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "stm32mp157.dtsi"
10+
#include "stm32mp15xf.dtsi"
11+
#include "stm32mp15-pinctrl.dtsi"
12+
#include "stm32mp15xxac-pinctrl.dtsi"
13+
#include "stm32mp15xx-dkx.dtsi"
14+
#include "stm32mp157f-dk2-scmi.dtsi"
15+
16+
/ {
17+
model = "STMicroelectronics STM32MP157F-DK2 Discovery Board";
18+
compatible = "st,stm32mp157f-dk2", "st,stm32mp157";
19+
20+
aliases {
21+
ethernet0 = &ethernet0;
22+
serial3 = &usart2;
23+
};
24+
25+
chosen {
26+
stdout-path = "serial0:115200n8";
27+
};
28+
29+
wifi_pwrseq: wifi-pwrseq {
30+
compatible = "mmc-pwrseq-simple";
31+
reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
32+
};
33+
};
34+
35+
&arm_wdt {
36+
timeout-sec = <32>;
37+
status = "okay";
38+
};
39+
40+
&cryp1 {
41+
status = "okay";
42+
};
43+
44+
&dsi {
45+
#address-cells = <1>;
46+
#size-cells = <0>;
47+
status = "okay";
48+
49+
panel@0 {
50+
compatible = "orisetech,otm8009a";
51+
reg = <0>;
52+
reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
53+
power-supply = <&scmi_v3v3>;
54+
status = "okay";
55+
56+
port {
57+
panel_in: endpoint {
58+
remote-endpoint = <&dsi_out>;
59+
};
60+
};
61+
};
62+
};
63+
64+
&dsi_in {
65+
remote-endpoint = <&ltdc_ep1_out>;
66+
};
67+
68+
&dsi_out {
69+
remote-endpoint = <&panel_in>;
70+
};
71+
72+
&i2c1 {
73+
touchscreen@38 {
74+
compatible = "focaltech,ft6236";
75+
reg = <0x38>;
76+
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
77+
interrupt-parent = <&gpiof>;
78+
touchscreen-size-x = <480>;
79+
touchscreen-size-y = <800>;
80+
status = "okay";
81+
};
82+
};
83+
84+
/* I2C4 is managed by OP-TEE */
85+
&i2c4 {
86+
status = "disabled";
87+
88+
/* i2c4 subnodes, which won't be managed by Linux */
89+
typec@28 {
90+
status = "disabled";
91+
connector {
92+
status = "disabled";
93+
};
94+
};
95+
96+
stpmic@33 {
97+
status = "disabled";
98+
};
99+
};
100+
101+
&ltdc {
102+
status = "okay";
103+
104+
port {
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
108+
ltdc_ep1_out: endpoint@1 {
109+
reg = <1>;
110+
remote-endpoint = <&dsi_in>;
111+
};
112+
};
113+
};
114+
115+
&rtc {
116+
pinctrl-names = "default";
117+
pinctrl-0 = <&rtc_rsvd_pins_a>;
118+
119+
rtc_lsco_pins_a: rtc-lsco-0 {
120+
pins = "out2_rmp";
121+
function = "lsco";
122+
};
123+
};
124+
125+
/* Wifi */
126+
&sdmmc2 {
127+
pinctrl-names = "default", "opendrain", "sleep";
128+
pinctrl-0 = <&sdmmc2_b4_pins_a>;
129+
pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
130+
pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
131+
non-removable;
132+
cap-sdio-irq;
133+
st,neg-edge;
134+
bus-width = <4>;
135+
vmmc-supply = <&scmi_v3v3>;
136+
mmc-pwrseq = <&wifi_pwrseq>;
137+
#address-cells = <1>;
138+
#size-cells = <0>;
139+
status = "okay";
140+
141+
brcmf: wifi@1 {
142+
reg = <1>;
143+
compatible = "brcm,bcm4329-fmac";
144+
pinctrl-names = "default";
145+
pinctrl-0 = <&rtc_lsco_pins_a>;
146+
};
147+
};
148+
149+
/* Bluetooth */
150+
&usart2 {
151+
pinctrl-names = "default", "sleep", "idle";
152+
pinctrl-0 = <&usart2_pins_c>;
153+
pinctrl-1 = <&usart2_sleep_pins_c>;
154+
pinctrl-2 = <&usart2_idle_pins_c>;
155+
uart-has-rtscts;
156+
status = "okay";
157+
158+
bluetooth {
159+
shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
160+
compatible = "brcm,bcm43438-bt";
161+
max-speed = <3000000>;
162+
vbat-supply = <&scmi_v3v3>;
163+
vddio-supply = <&scmi_v3v3>;
164+
};
165+
};
166+
167+
/* Since I2C4 is disabled, STUSB1600 is also disabled so there is no Type-C support */
168+
&usbotg_hs {
169+
dr_mode = "peripheral";
170+
role-switch-default-mode = "peripheral";
171+
/*
172+
* Forcing dr_mode = "peripheral"/"role-switch-default-mode = "peripheral";
173+
* will cause the pull-up on D+/D- to be raised as soon as the OTG is configured at runtime,
174+
* regardless of the presence of VBUS. Notice that on self-powered devices like
175+
* stm32mp157f-dk2, this isn't compliant with the USB standard. That's why usbotg_hs is kept
176+
* disabled here.
177+
*/
178+
status = "disabled";
179+
};

0 commit comments

Comments
 (0)