devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Introduce STM32MP157F-DK2 board
@ 2025-06-03  9:02 Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 1/7] ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs Amelie Delaunay
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani, Etienne Carriere,
	Pascal Paillet, Conor Dooley

The main hardware difference with STM32MP157C-DK2 board is the SoC: 'F'
variant embeds a STM32MP157F SoC, which has the same level of features
than a STM32MP157C SoC but A7 clock frequency can reach 800Mhz (instead
of fixed 650Mhz for 'C' variant).
stm32mp157f-dk2 device tree reuses the existing sketeton for STM32MP15
DKx boards, but it is SCMI-based with I2C4 & PMIC managed by OP-TEE,
like other STM32 MPU boards (STM32MP135F-DK, STM32MP257F-DK/EV1, ...).
Himanshu's bindings patch [1] has been rerolled to introduce
st,stm32mp157f-dk2 compatible.

Link: https://lore.kernel.org/linux-arm-kernel/20250524100319.22521-3-himanshu.bhavani@siliconsignals.io/ [1]
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>

Changes in v2:
- Drop empty stm32mp15xa.dtsi and stm32mp15xd.dtsi files.
- Fulfill SCMI regulator defines and add Pascal's SoB
- Add patch [4/7] to use SCMI regulator defines
- Add patch [5/7] for OP-TEE async notif
- Link to v1: https://lore.kernel.org/r/20250527-stm32mp157f-dk2-v1-0-8aef885a4928@foss.st.com

---
Alexandre Torgue (1):
      ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs

Amelie Delaunay (3):
      ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx
      ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants
      ARM: dts: stm32: add stm32mp157f-dk2 board support

Etienne Carriere (2):
      dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers
      ARM: dts: stm32: optee async notif interrupt for MP15 scmi variants

Himanshu Bhavani (1):
      dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible

 .../devicetree/bindings/arm/stm32/stm32.yaml       |   1 +
 arch/arm/boot/dts/st/Makefile                      |   3 +-
 arch/arm/boot/dts/st/stm32mp15-scmi.dtsi           |  10 +-
 arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi     | 196 +++++++++++++++++++++
 arch/arm/boot/dts/st/stm32mp157f-dk2.dts           | 179 +++++++++++++++++++
 arch/arm/boot/dts/st/stm32mp15xf.dtsi              |  17 ++
 arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi          |   2 +-
 .../dt-bindings/regulator/st,stm32mp15-regulator.h |  40 +++++
 8 files changed, 443 insertions(+), 5 deletions(-)
---
base-commit: dc392342b7bb14b12f2de96201937cb02be7802f
change-id: 20250527-stm32mp157f-dk2-2a484a01973a

Best regards,
-- 
Amelie Delaunay <amelie.delaunay@foss.st.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/7] ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 2/7] ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx Amelie Delaunay
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani

From: Alexandre Torgue <alexandre.torgue@foss.st.com>

This commit creates new file to manage security features and supported OPP
on STM32MP15xF SOCs. On STM32MP15xY, "Y" gives information:
 -Y = A means no cryp IP and no secure boot + A7-CPU@650MHz.
 -Y = C means cryp IP + optee + secure boot + A7-CPU@650MHz.
 -Y = D means no cryp IP and no secure boot + A7-CPU@800MHz.
 -Y = F means cryp IP + optee + secure boot + A7-CPU@800MHz.

It fullfills the initial STM32MP15x SoC diversity introduced by
commit 0eda69b6c5f9 ("ARM: dts: stm32: Manage security diversity
for STM32M15x SOCs").

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

---
Changes in v2:
- Remove empty files (stm32mp15xa.dtsi and stm32mp15xd.dtsi)
- Drop stm32mp15xc.dtsi updates (no stm32mp15xa.dtsi inclusion nor
  license update)
- Move cryp1 node under etzpc firewall bus
---
 arch/arm/boot/dts/st/stm32mp15xf.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp15xf.dtsi b/arch/arm/boot/dts/st/stm32mp15xf.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..ffa55d64bea30a67c32b9e378f3a082acdae593c
--- /dev/null
+++ b/arch/arm/boot/dts/st/stm32mp15xf.dtsi
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2025 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
+ */
+
+&etzpc {
+	cryp1: cryp@54001000 {
+		compatible = "st,stm32mp1-cryp";
+		reg = <0x54001000 0x400>;
+		interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&rcc CRYP1>;
+		resets = <&rcc CRYP1_R>;
+		access-controllers = <&etzpc 9>;
+		status = "disabled";
+	};
+};

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/7] ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 1/7] ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers Amelie Delaunay
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani

Adopt generic node name 'typec' for stusb1600, which is the USB Type-C
controller on stm32mp157x Discovery Kits.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
index a5511b1f0ce306feea5d8657721b078161d01a36..276ed2c9be71cc59891e9b06cb057ce4ff8a143e 100644
--- a/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi
@@ -254,7 +254,7 @@ &i2c4 {
 	/delete-property/dmas;
 	/delete-property/dma-names;
 
-	stusb1600@28 {
+	stusb1600: typec@28 {
 		compatible = "st,stusb1600";
 		reg = <0x28>;
 		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 1/7] ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 2/7] ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-25 18:39   ` Rob Herring (Arm)
  2025-06-03  9:02 ` [PATCH v2 4/7] ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants Amelie Delaunay
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani, Etienne Carriere,
	Pascal Paillet

From: Etienne Carriere <etienne.carriere@foss.st.com>

These bindings will be used for the SCMI voltage domain.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Pascal Paillet <p.paillet@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

---
Changes in v2:
- Add external regulators and Pascal's SoB
---
 .../dt-bindings/regulator/st,stm32mp15-regulator.h | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/include/dt-bindings/regulator/st,stm32mp15-regulator.h b/include/dt-bindings/regulator/st,stm32mp15-regulator.h
new file mode 100644
index 0000000000000000000000000000000000000000..7052507cb3e509c6802d74682d7f9700377fe7c7
--- /dev/null
+++ b/include/dt-bindings/regulator/st,stm32mp15-regulator.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
+ */
+
+#ifndef __DT_BINDINGS_REGULATOR_ST_STM32MP15_REGULATOR_H
+#define __DT_BINDINGS_REGULATOR_ST_STM32MP15_REGULATOR_H
+
+/* SCMI voltage domain identifiers */
+
+/* SOC Internal regulators */
+#define VOLTD_SCMI_REG11		0
+#define VOLTD_SCMI_REG18		1
+#define VOLTD_SCMI_USB33		2
+
+/* STPMIC1 regulators */
+#define VOLTD_SCMI_STPMIC1_BUCK1	3
+#define VOLTD_SCMI_STPMIC1_BUCK2	4
+#define VOLTD_SCMI_STPMIC1_BUCK3	5
+#define VOLTD_SCMI_STPMIC1_BUCK4	6
+#define VOLTD_SCMI_STPMIC1_LDO1		7
+#define VOLTD_SCMI_STPMIC1_LDO2		8
+#define VOLTD_SCMI_STPMIC1_LDO3		9
+#define VOLTD_SCMI_STPMIC1_LDO4		10
+#define VOLTD_SCMI_STPMIC1_LDO5		11
+#define VOLTD_SCMI_STPMIC1_LDO6		12
+#define VOLTD_SCMI_STPMIC1_VREFDDR	13
+#define VOLTD_SCMI_STPMIC1_BOOST	14
+#define VOLTD_SCMI_STPMIC1_PWR_SW1	15
+#define VOLTD_SCMI_STPMIC1_PWR_SW2	16
+#define VOLTD_SCMI_VREFBUF		17
+
+/* External regulators */
+#define VOLTD_SCMI_REGU0		18
+#define VOLTD_SCMI_REGU1		19
+#define VOLTD_SCMI_REGU2		20
+#define VOLTD_SCMI_REGU3		21
+#define VOLTD_SCMI_REGU4		22
+
+#endif /*__DT_BINDINGS_REGULATOR_ST_STM32MP15_REGULATOR_H */

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/7] ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
                   ` (2 preceding siblings ...)
  2025-06-03  9:02 ` [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 5/7] ARM: dts: stm32: optee async notif interrupt " Amelie Delaunay
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani

Use the SCMI voltage domain bindings for internal regulators on stm32mp15.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp15-scmi.dtsi | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
index dc3b09f2f2af21e991cac60dc8b5a09e7fc0d8be..2f3c42a11379655a97393d91cbf28c22c5bdf539 100644
--- a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
@@ -4,6 +4,8 @@
  * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics.
  */
 
+#include <dt-bindings/regulator/st,stm32mp15-regulator.h>
+
 / {
 	firmware {
 		optee: optee {
@@ -35,21 +37,21 @@ scmi_reguls: regulators {
 					#size-cells = <0>;
 
 					scmi_reg11: regulator@0 {
-						reg = <0>;
+						reg = <VOLTD_SCMI_REG11>;
 						regulator-name = "reg11";
 						regulator-min-microvolt = <1100000>;
 						regulator-max-microvolt = <1100000>;
 					};
 
 					scmi_reg18: regulator@1 {
-						reg = <1>;
+						reg = <VOLTD_SCMI_REG18>;
 						regulator-name = "reg18";
 						regulator-min-microvolt = <1800000>;
 						regulator-max-microvolt = <1800000>;
 					};
 
 					scmi_usb33: regulator@2 {
-						reg = <2>;
+						reg = <VOLTD_SCMI_USB33>;
 						regulator-name = "usb33";
 						regulator-min-microvolt = <3300000>;
 						regulator-max-microvolt = <3300000>;

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/7] ARM: dts: stm32: optee async notif interrupt for MP15 scmi variants
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
                   ` (3 preceding siblings ...)
  2025-06-03  9:02 ` [PATCH v2 4/7] ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 6/7] dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible Amelie Delaunay
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani, Etienne Carriere

From: Etienne Carriere <etienne.carriere@foss.st.com>

Define the interrupt used by OP-TEE async notif on stm32mp15 scmi based
platforms.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
---
 arch/arm/boot/dts/st/stm32mp15-scmi.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
index 2f3c42a11379655a97393d91cbf28c22c5bdf539..98552fe45d4e088f749275cf35278de7b45b6c86 100644
--- a/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
+++ b/arch/arm/boot/dts/st/stm32mp15-scmi.dtsi
@@ -11,6 +11,8 @@ firmware {
 		optee: optee {
 			compatible = "linaro,optee-tz";
 			method = "smc";
+			interrupt-parent = <&intc>;
+			interrupts = <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>;
 		};
 
 		scmi: scmi {

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 6/7] dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
                   ` (4 preceding siblings ...)
  2025-06-03  9:02 ` [PATCH v2 5/7] ARM: dts: stm32: optee async notif interrupt " Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-06-03  9:02 ` [PATCH v2 7/7] ARM: dts: stm32: add stm32mp157f-dk2 board support Amelie Delaunay
  2025-07-04  9:29 ` [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Alexandre TORGUE
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani, Conor Dooley

From: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>

Add the "st,stm32mp157f-dk2" compatible string to the STM32 SoC
bindings. The MP157F is functionally similar to the MP157C.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
 Documentation/devicetree/bindings/arm/stm32/stm32.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
index 408532504a24d5e570c738b16de30dcf8deead6a..ad144c02eb7edf4fc2191ab0af244342dcaa59d5 100644
--- a/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/stm32.yaml
@@ -121,6 +121,7 @@ properties:
               - st,stm32mp157a-dk1-scmi
               - st,stm32mp157c-dk2
               - st,stm32mp157c-dk2-scmi
+              - st,stm32mp157f-dk2
           - const: st,stm32mp157
 
       - items:

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 7/7] ARM: dts: stm32: add stm32mp157f-dk2 board support
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
                   ` (5 preceding siblings ...)
  2025-06-03  9:02 ` [PATCH v2 6/7] dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible Amelie Delaunay
@ 2025-06-03  9:02 ` Amelie Delaunay
  2025-07-04  9:29 ` [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Alexandre TORGUE
  7 siblings, 0 replies; 10+ messages in thread
From: Amelie Delaunay @ 2025-06-03  9:02 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Amelie Delaunay, Himanshu Bhavani

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>

---
Changes in v2:
- rename stm32mp157x-dk2-scmi.dtsi into stm32mp157f-dk2-scmi.dtsi
- cleanup stm32mp157f-dk2-scmi.dtsi (remove comments and useless properties)
- disable iwdg2 and add arm,smc-wdt watchdog in stm32mp157f-dk2-scmi.dtsi
- set 32s timeout and enable arm_wdt
- move (sort) stm32mp157f-dk2.dtb in Makefile
---
 arch/arm/boot/dts/st/Makefile                  |   3 +-
 arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi | 196 +++++++++++++++++++++++++
 arch/arm/boot/dts/st/stm32mp157f-dk2.dts       | 179 ++++++++++++++++++++++
 3 files changed, 377 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/st/Makefile b/arch/arm/boot/dts/st/Makefile
index cc9948b9870f7f73629573149bfd342af75b07da..66d4f96da5ddbba337c2f290512a74b85e5c568e 100644
--- a/arch/arm/boot/dts/st/Makefile
+++ b/arch/arm/boot/dts/st/Makefile
@@ -72,7 +72,8 @@ dtb-$(CONFIG_ARCH_STM32) += \
 	stm32mp157c-odyssey.dtb \
 	stm32mp157c-osd32mp1-red.dtb \
 	stm32mp157c-phycore-stm32mp1-3.dtb \
-	stm32mp157c-ultra-fly-sbc.dtb
+	stm32mp157c-ultra-fly-sbc.dtb \
+	stm32mp157f-dk2.dtb
 dtb-$(CONFIG_ARCH_U8500) += \
 	ste-snowball.dtb \
 	ste-hrefprev60-stuib.dtb \
diff --git a/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi b/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..89de85a2eff327f20336552692c833f5627cb6f7
--- /dev/null
+++ b/arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2025 - All Rights Reserved
+ * Author: Amelie Delaunay <amelie.delaunay@foss.st.com> for STMicroelectronics.
+ */
+
+#include "stm32mp15-scmi.dtsi"
+
+/ {
+	reserved-memory {
+		optee@de000000 {
+			reg = <0xde000000 0x2000000>;
+			no-map;
+		};
+	};
+
+	arm_wdt: watchdog {
+		compatible = "arm,smc-wdt";
+		arm,smc-id = <0xbc000000>;
+		status = "disabled";
+	};
+
+};
+
+&adc {
+	vdd-supply = <&scmi_vdd>;
+	vdda-supply = <&scmi_vdd>;
+};
+
+&cpu0 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cpu1 {
+	clocks = <&scmi_clk CK_SCMI_MPU>;
+};
+
+&cryp1 {
+	clocks = <&scmi_clk CK_SCMI_CRYP1>;
+	resets = <&scmi_reset RST_SCMI_CRYP1>;
+};
+
+&cs42l51 {
+	VL-supply = <&scmi_v3v3>;
+	VD-supply = <&scmi_v1v8_audio>;
+	VA-supply = <&scmi_v1v8_audio>;
+	VAHP-supply = <&scmi_v1v8_audio>;
+};
+
+&dsi {
+	phy-dsi-supply = <&scmi_reg18>;
+	clocks = <&rcc DSI>, <&scmi_clk CK_SCMI_HSE>, <&rcc DSI_PX>;
+};
+
+&gpioz {
+	clocks = <&scmi_clk CK_SCMI_GPIOZ>;
+};
+
+&hash1 {
+	clocks = <&scmi_clk CK_SCMI_HASH1>;
+	resets = <&scmi_reset RST_SCMI_HASH1>;
+};
+
+&i2c1 {
+	hdmi-transmitter@39 {
+		iovcc-supply = <&scmi_v3v3_hdmi>;
+		cvcc12-supply = <&scmi_v1v2_hdmi>;
+	};
+};
+
+&iwdg2 {
+	clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>;
+	status = "disabled";
+};
+
+&m4_rproc {
+	/delete-property/ st,syscfg-holdboot;
+	resets = <&scmi_reset RST_SCMI_MCU>,
+		 <&scmi_reset RST_SCMI_MCU_HOLD_BOOT>;
+	reset-names = "mcu_rst", "hold_boot";
+};
+
+&mdma1 {
+	resets = <&scmi_reset RST_SCMI_MDMA>;
+};
+
+&optee {
+	interrupt-parent = <&intc>;
+	interrupts = <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+};
+
+&pwr_regulators {
+	vdd-supply = <&scmi_vdd>;
+	vdd_3v3_usbfs-supply = <&scmi_vdd_usb>;
+	status = "disabled";
+};
+
+&rcc {
+	compatible = "st,stm32mp1-rcc-secure", "syscon";
+	clock-names = "hse", "hsi", "csi", "lse", "lsi";
+	clocks = <&scmi_clk CK_SCMI_HSE>,
+		 <&scmi_clk CK_SCMI_HSI>,
+		 <&scmi_clk CK_SCMI_CSI>,
+		 <&scmi_clk CK_SCMI_LSE>,
+		 <&scmi_clk CK_SCMI_LSI>;
+};
+
+&rng1 {
+	clocks = <&scmi_clk CK_SCMI_RNG1>;
+	resets = <&scmi_reset RST_SCMI_RNG1>;
+};
+
+&rtc {
+	clocks = <&scmi_clk CK_SCMI_RTCAPB>, <&scmi_clk CK_SCMI_RTC>;
+};
+
+&scmi_reguls {
+	scmi_vddcore: regulator@3 {
+		reg = <VOLTD_SCMI_STPMIC1_BUCK1>;
+		regulator-name = "vddcore";
+	};
+
+	scmi_vdd: regulator@5 {
+		reg = <VOLTD_SCMI_STPMIC1_BUCK3>;
+		regulator-name = "vdd";
+	};
+
+	scmi_v3v3: regulator@6 {
+		reg = <VOLTD_SCMI_STPMIC1_BUCK4>;
+		regulator-name = "v3v3";
+	};
+
+	scmi_v1v8_audio: regulator@7 {
+		reg = <VOLTD_SCMI_STPMIC1_LDO1>;
+		regulator-name = "v1v8_audio";
+	};
+
+	scmi_v3v3_hdmi: regulator@8 {
+		reg = <VOLTD_SCMI_STPMIC1_LDO2>;
+		regulator-name = "v3v3_hdmi";
+	};
+
+	scmi_vdd_usb: regulator@a {
+		reg = <VOLTD_SCMI_STPMIC1_LDO4>;
+		regulator-name = "vdd_usb";
+	};
+
+	scmi_vdda: regulator@b {
+		reg = <VOLTD_SCMI_STPMIC1_LDO5>;
+		regulator-name = "vdda";
+	};
+
+	scmi_v1v2_hdmi: regulator@c {
+		reg = <VOLTD_SCMI_STPMIC1_LDO6>;
+		regulator-name = "v1v2_hdmi";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+	};
+
+	scmi_vbus_otg: regulator@f {
+		reg = <VOLTD_SCMI_STPMIC1_PWR_SW1>;
+		regulator-name = "vbus_otg";
+	 };
+
+	 scmi_vbus_sw: regulator@10 {
+		reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>;
+		regulator-name = "vbus_sw";
+	 };
+};
+
+&sdmmc1 {
+	vmmc-supply = <&scmi_v3v3>;
+};
+
+&sdmmc3 {
+	vmmc-supply = <&scmi_v3v3>;
+};
+
+&usbh_ehci {
+	hub@1 {
+		vdd-supply = <&scmi_v3v3>;
+	};
+};
+
+&usbphyc_port0 {
+	phy-supply = <&scmi_vdd_usb>;
+};
+
+&usbphyc_port1 {
+	phy-supply = <&scmi_vdd_usb>;
+};
+
+&vrefbuf {
+	vdda-supply = <&scmi_vdd>;
+};
diff --git a/arch/arm/boot/dts/st/stm32mp157f-dk2.dts b/arch/arm/boot/dts/st/stm32mp157f-dk2.dts
new file mode 100644
index 0000000000000000000000000000000000000000..43375c4d62a3cd07609a99b91be42f87f3f4ed96
--- /dev/null
+++ b/arch/arm/boot/dts/st/stm32mp157f-dk2.dts
@@ -0,0 +1,179 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2025 - All Rights Reserved
+ * Author: Amelie Delaunay <amelie.delaunay@foss.st.com> for STMicroelectronics.
+ */
+
+/dts-v1/;
+
+#include "stm32mp157.dtsi"
+#include "stm32mp15xf.dtsi"
+#include "stm32mp15-pinctrl.dtsi"
+#include "stm32mp15xxac-pinctrl.dtsi"
+#include "stm32mp15xx-dkx.dtsi"
+#include "stm32mp157f-dk2-scmi.dtsi"
+
+/ {
+	model = "STMicroelectronics STM32MP157F-DK2 Discovery Board";
+	compatible = "st,stm32mp157f-dk2", "st,stm32mp157";
+
+	aliases {
+		ethernet0 = &ethernet0;
+		serial3 = &usart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpioh 4 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&arm_wdt {
+	timeout-sec = <32>;
+	status = "okay";
+};
+
+&cryp1 {
+	status = "okay";
+};
+
+&dsi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	panel@0 {
+		compatible = "orisetech,otm8009a";
+		reg = <0>;
+		reset-gpios = <&gpioe 4 GPIO_ACTIVE_LOW>;
+		power-supply = <&scmi_v3v3>;
+		status = "okay";
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&dsi_out>;
+			};
+		};
+	};
+};
+
+&dsi_in {
+	remote-endpoint = <&ltdc_ep1_out>;
+};
+
+&dsi_out {
+	remote-endpoint = <&panel_in>;
+};
+
+&i2c1 {
+	touchscreen@38 {
+		compatible = "focaltech,ft6236";
+		reg = <0x38>;
+		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-parent = <&gpiof>;
+		touchscreen-size-x = <480>;
+		touchscreen-size-y = <800>;
+		status = "okay";
+	};
+};
+
+/* I2C4 is managed by OP-TEE */
+&i2c4 {
+	status = "disabled";
+
+	/* i2c4 subnodes, which won't be managed by Linux */
+	typec@28 {
+		status = "disabled";
+		connector {
+			status = "disabled";
+		};
+	};
+
+	stpmic@33 {
+		status = "disabled";
+	};
+};
+
+&ltdc {
+	status = "okay";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ltdc_ep1_out: endpoint@1 {
+			reg = <1>;
+			remote-endpoint = <&dsi_in>;
+		};
+	};
+};
+
+&rtc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rtc_rsvd_pins_a>;
+
+	rtc_lsco_pins_a: rtc-lsco-0 {
+		pins = "out2_rmp";
+		function = "lsco";
+	};
+};
+
+/* Wifi */
+&sdmmc2 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc2_b4_pins_a>;
+	pinctrl-1 = <&sdmmc2_b4_od_pins_a>;
+	pinctrl-2 = <&sdmmc2_b4_sleep_pins_a>;
+	non-removable;
+	cap-sdio-irq;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&scmi_v3v3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	brcmf: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rtc_lsco_pins_a>;
+	};
+};
+
+/* Bluetooth */
+&usart2 {
+	pinctrl-names = "default", "sleep", "idle";
+	pinctrl-0 = <&usart2_pins_c>;
+	pinctrl-1 = <&usart2_sleep_pins_c>;
+	pinctrl-2 = <&usart2_idle_pins_c>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <3000000>;
+		vbat-supply = <&scmi_v3v3>;
+		vddio-supply = <&scmi_v3v3>;
+	};
+};
+
+/* Since I2C4 is disabled, STUSB1600 is also disabled so there is no Type-C support */
+&usbotg_hs {
+	dr_mode = "peripheral";
+	role-switch-default-mode = "peripheral";
+	/*
+	 * Forcing dr_mode = "peripheral"/"role-switch-default-mode = "peripheral";
+	 * will cause the pull-up on D+/D- to be raised as soon as the OTG is configured at runtime,
+	 * regardless of the presence of VBUS. Notice that on self-powered devices like
+	 * stm32mp157f-dk2, this isn't compliant with the USB standard. That's why usbotg_hs is kept
+	 * disabled here.
+	 */
+	status = "disabled";
+};

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers
  2025-06-03  9:02 ` [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers Amelie Delaunay
@ 2025-06-25 18:39   ` Rob Herring (Arm)
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2025-06-25 18:39 UTC (permalink / raw)
  To: Amelie Delaunay
  Cc: linux-stm32, Liam Girdwood, Maxime Coquelin, linux-kernel,
	Pascal Paillet, Mark Brown, Alexandre Torgue, Conor Dooley,
	Etienne Carriere, devicetree, Krzysztof Kozlowski,
	Himanshu Bhavani, linux-arm-kernel


On Tue, 03 Jun 2025 11:02:09 +0200, Amelie Delaunay wrote:
> From: Etienne Carriere <etienne.carriere@foss.st.com>
> 
> These bindings will be used for the SCMI voltage domain.
> 
> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
> Signed-off-by: Pascal Paillet <p.paillet@foss.st.com>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
> 
> ---
> Changes in v2:
> - Add external regulators and Pascal's SoB
> ---
>  .../dt-bindings/regulator/st,stm32mp15-regulator.h | 40 ++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/7] Introduce STM32MP157F-DK2 board
  2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
                   ` (6 preceding siblings ...)
  2025-06-03  9:02 ` [PATCH v2 7/7] ARM: dts: stm32: add stm32mp157f-dk2 board support Amelie Delaunay
@ 2025-07-04  9:29 ` Alexandre TORGUE
  7 siblings, 0 replies; 10+ messages in thread
From: Alexandre TORGUE @ 2025-07-04  9:29 UTC (permalink / raw)
  To: Amelie Delaunay, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Maxime Coquelin, Liam Girdwood, Mark Brown
  Cc: devicetree, linux-stm32, linux-arm-kernel, linux-kernel,
	Himanshu Bhavani, Etienne Carriere, Pascal Paillet, Conor Dooley

Hi Amélie

On 6/3/25 11:02, Amelie Delaunay wrote:
> The main hardware difference with STM32MP157C-DK2 board is the SoC: 'F'
> variant embeds a STM32MP157F SoC, which has the same level of features
> than a STM32MP157C SoC but A7 clock frequency can reach 800Mhz (instead
> of fixed 650Mhz for 'C' variant).
> stm32mp157f-dk2 device tree reuses the existing sketeton for STM32MP15
> DKx boards, but it is SCMI-based with I2C4 & PMIC managed by OP-TEE,
> like other STM32 MPU boards (STM32MP135F-DK, STM32MP257F-DK/EV1, ...).
> Himanshu's bindings patch [1] has been rerolled to introduce
> st,stm32mp157f-dk2 compatible.
> 
> Link: https://lore.kernel.org/linux-arm-kernel/20250524100319.22521-3-himanshu.bhavani@siliconsignals.io/ [1]
> Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
> Cc: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
> 
> Changes in v2:
> - Drop empty stm32mp15xa.dtsi and stm32mp15xd.dtsi files.
> - Fulfill SCMI regulator defines and add Pascal's SoB
> - Add patch [4/7] to use SCMI regulator defines
> - Add patch [5/7] for OP-TEE async notif
> - Link to v1: https://lore.kernel.org/r/20250527-stm32mp157f-dk2-v1-0-8aef885a4928@foss.st.com
> 
> ---
> Alexandre Torgue (1):
>        ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs
> 
> Amelie Delaunay (3):
>        ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx
>        ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants
>        ARM: dts: stm32: add stm32mp157f-dk2 board support
> 
> Etienne Carriere (2):
>        dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers
>        ARM: dts: stm32: optee async notif interrupt for MP15 scmi variants
> 
> Himanshu Bhavani (1):
>        dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible
> 
>   .../devicetree/bindings/arm/stm32/stm32.yaml       |   1 +
>   arch/arm/boot/dts/st/Makefile                      |   3 +-
>   arch/arm/boot/dts/st/stm32mp15-scmi.dtsi           |  10 +-
>   arch/arm/boot/dts/st/stm32mp157f-dk2-scmi.dtsi     | 196 +++++++++++++++++++++
>   arch/arm/boot/dts/st/stm32mp157f-dk2.dts           | 179 +++++++++++++++++++
>   arch/arm/boot/dts/st/stm32mp15xf.dtsi              |  17 ++
>   arch/arm/boot/dts/st/stm32mp15xx-dkx.dtsi          |   2 +-
>   .../dt-bindings/regulator/st,stm32mp15-regulator.h |  40 +++++
>   8 files changed, 443 insertions(+), 5 deletions(-)
> ---
> base-commit: dc392342b7bb14b12f2de96201937cb02be7802f
> change-id: 20250527-stm32mp157f-dk2-2a484a01973a
> 
> Best regards,

Series applied on stm32-next.

Cheers.

Alex

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-07-04  9:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03  9:02 [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 1/7] ARM: dts: stm32: fullfill diversity with OPP for STM32M15xF SOCs Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 2/7] ARM: dts: stm32: use 'typec' generic name for stusb1600 on stm32mp15xx-dkx Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 3/7] dt-bindings: regulator: Add STM32MP15 SCMI regulator identifiers Amelie Delaunay
2025-06-25 18:39   ` Rob Herring (Arm)
2025-06-03  9:02 ` [PATCH v2 4/7] ARM: dts: stm32: use internal regulators bindings for MP15 scmi variants Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 5/7] ARM: dts: stm32: optee async notif interrupt " Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 6/7] dt-bindings: arm: stm32: add STM32MP157F-DK2 board compatible Amelie Delaunay
2025-06-03  9:02 ` [PATCH v2 7/7] ARM: dts: stm32: add stm32mp157f-dk2 board support Amelie Delaunay
2025-07-04  9:29 ` [PATCH v2 0/7] Introduce STM32MP157F-DK2 board Alexandre TORGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).