Skip to contentSkip to conversation

ARM: dts: sm32mp: remove shmem for scmi-optee

PATCH Applied Patrick Delaunay 2 participants 4 messages Jul 5, 2023 – Jul 10, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: sm32mp: remove shmem for scmi-optee

Remove the optional shared memory in SYSRAM and
use the OP-TEE native shared memory for SCMI-OPTEE to
- avoid boot issue with the latest OP-TEE version 3.22.0 for STM32MP15 SoC, when CFG_STM32MP1_SCMI_SHM_SYSRAM is disabled
- prepare migration with the same configuration for STM32MP13 SoC

Patrick Delaunay (2):
ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp15
ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp13

 arch/arm/boot/dts/st/stm32mp131.dtsi     | 14 --------------
 arch/arm/boot/dts/st/stm32mp15-scmi.dtsi | 16 ----------------
 2 files changed, 30 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp15

Since the OP-TEE commit "plat-stm32mp1: scmi_server: default use OP-TEE shared memory", integrated in OP-TEE 3.22.0-rc1, the default configuration for STM32MP15x SoCs changes and CFG_STM32MP1_SCMI_SHM_SYSRAM is disabled by default and the OP-TEE SMCI server uses OP-TEE native shared memory registered by clients.

To be compatible with this configuration and the next OP-TEE versions, this patch removes in the STM32MP15 SCMI device tree the SHMEM used by OP-TEE SCMI and the associated reserved memory in the last 4KByte page of SRAM.

Fixes ea3414e1249e ("ARM: dts: stm32: move SCMI related nodes in a dedicated file for stm32mp15")

---

 arch/arm/boot/dts/st/stm32mp15-scmi.dtsi | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/boot/dts/st/stm32mp15-scmi.dtsi +0 -16
index 543f24c2f4f6..ad2584213d99 100644
@@ -16,7 +16,6 @@ scmi: scmi {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			linaro,optee-channel-id = <0>;
-			shmem = <&scmi_shm>;
 
 			scmi_clk: protocol@14 {
 				reg = <0x14>;
@@ -60,21 +59,6 @@ scmi_usb33: usb33@2 {
 			};
 		};
 	};
-
-	soc {
-		scmi_sram: sram@2ffff000 {
-			compatible = "mmio-sram";
-			reg = <0x2ffff000 0x1000>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0 0x2ffff000 0x1000>;
-
-			scmi_shm: scmi-sram@0 {
-				compatible = "arm,scmi-shmem";
-				reg = <0 0x80>;
-			};
-		};
-	};
 };
 
 &reg11 {
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp13

In reply to Patrick Delaunay

CFG_STM32MP1_SCMI_SHM_SYSRAM will be disabled by default for STM32MP13x SoCs in future OP-TEE version and the OP-TEE SMCI server uses only the OP-TEE native shared memory registered by clients.

To be compatible by default with this configuration this patch removes the shared memory in the SCMI configuration and the associated reserved memory in SRAM.

Fixes 9005aeddd9fc ("ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP13")

---

 arch/arm/boot/dts/st/stm32mp131.dtsi | 14 --------------
 1 file changed, 14 deletions(-)
arch/arm/boot/dts/st/stm32mp131.dtsi +0 -14
index d163c267e34c..d23bbc3639df 100644
@@ -40,7 +40,6 @@ scmi: scmi {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			linaro,optee-channel-id = <0>;
-			shmem = <&scmi_shm>;
 
 			scmi_clk: protocol@14 {
 				reg = <0x14>;
@@ -106,19 +105,6 @@ soc {
 		interrupt-parent = <&intc>;
 		ranges;
 
-		scmi_sram: sram@2ffff000 {
-			compatible = "mmio-sram";
-			reg = <0x2ffff000 0x1000>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges = <0 0x2ffff000 0x1000>;
-
-			scmi_shm: scmi-sram@0 {
-				compatible = "arm,scmi-shmem";
-				reg = <0 0x80>;
-			};
-		};
-
 		timers2: timer@40000000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
Signature · 1 line
2.25.1
maintainer Applied
#3 lore raw
In reply to Patrick Delaunay
Quoted 9 lines · Patrick Delaunay

Remove the optional shared memory in SYSRAM and
use the OP-TEE native shared memory for SCMI-OPTEE to
- avoid boot issue with the latest OP-TEE version 3.22.0 for STM32MP15 SoC, when CFG_STM32MP1_SCMI_SHM_SYSRAM is disabled
- prepare migration with the same configuration for STM32MP13 SoC

Quoted 8 lines

Patrick Delaunay (2):
ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp15
ARM: dts: sm32mp: remove shmem for scmi-optee on stm32mp13

  arch/arm/boot/dts/st/stm32mp131.dtsi     | 14 --------------
  arch/arm/boot/dts/st/stm32mp15-scmi.dtsi | 16 ----------------
  2 files changed, 30 deletions(-)

Applied to stm32-next. Will be send for fixes in this v6.5 cycle.

Thanks
Alex