Skip to content

Commit

Permalink
dts: add stm32mp15*-scmi.dts files for when RCC is secure
Browse files Browse the repository at this point in the history
For legacy reason and compatibility with existing platforms embedding
OP-TEE with RCC secure hardening being disabled, introduce -scmi.dts for
the 4 ST boards STM32MP15x: DK1, DK2, ED1 and EV1 where we enable RCC
security require non-secure world to use SCMI resources. Add platform
flavors 157x_XXX_SCMI to ease DTS selection.

stm32mp15*-<board>.dts applies an insecure RCC configuration.
stm32mp15*-<board>-scmi.dts applies the secure RCC configuration.
This better reflects the configurations supported in the Linux kernel
and U-Boot source trees.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
etienne-lms committed Dec 12, 2023
1 parent 79f8990 commit 1f0bc2c
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 6 deletions.
18 changes: 18 additions & 0 deletions core/arch/arm/dts/stm32mp157a-dk1-scmi.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2023 - All Rights Reserved
*/

/dts-v1/;

#include "stm32mp157a-dk1.dts"

/ {
model = "STMicroelectronics STM32MP157A-DK1 SCMI Discovery Board";
compatible = "st,stm32mp157a-dk1-scmi", "st,stm32mp157";
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
status = "okay";
};
19 changes: 19 additions & 0 deletions core/arch/arm/dts/stm32mp157c-dk2-scmi.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2019 - All Rights Reserved
* Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics.
*/

/dts-v1/;

#include "stm32mp157c-dk2.dts"

/ {
model = "STMicroelectronics STM32MP157C-DK2 SCMI Discovery Board";
compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157";
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
status = "okay";
};
28 changes: 28 additions & 0 deletions core/arch/arm/dts/stm32mp157c-ed1-scmi.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
*/
/dts-v1/;

#include "stm32mp157c-ed1.dts"

/ {
model = "STMicroelectronics STM32MP157C SCMI eval daughter";
compatible = "st,stm32mp157c-ed1-scmi", "st,stm32mp157";
};

&iwdg1 {
timeout-sec = <32>;
};

&iwdg2 {
timeout-sec = <32>;
status = "okay";
secure-status = "disabled";
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
status = "okay";
};
2 changes: 1 addition & 1 deletion core/arch/arm/dts/stm32mp157c-ed1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
compatible = "st,stm32mp1-rcc";
status = "okay";
};

Expand Down
18 changes: 18 additions & 0 deletions core/arch/arm/dts/stm32mp157c-ev1-scmi.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
* Copyright (C) STMicroelectronics 2017 - All Rights Reserved
* Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
*/
/dts-v1/;

#include "stm32mp157c-ev1.dts"

/ {
model = "STMicroelectronics STM32MP157C SCMI eval daughter on eval mother";
compatible = "st,stm32mp157c-ev1-scmi", "st,stm32mp157c-ed1-scmi", "st,stm32mp157";
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
status = "okay";
};
2 changes: 1 addition & 1 deletion core/arch/arm/dts/stm32mp15xx-dkx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@
};

&rcc {
compatible = "st,stm32mp1-rcc-secure";
compatible = "st,stm32mp1-rcc";
status = "okay";
};

Expand Down
24 changes: 20 additions & 4 deletions core/arch/arm/plat-stm32mp1/conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@ flavor_dts_file-157C_DHCOM_PDK2 = stm32mp157c-dhcom-pdk2.dts
flavor_dts_file-157C_DK2 = stm32mp157c-dk2.dts
flavor_dts_file-157C_ED1 = stm32mp157c-ed1.dts
flavor_dts_file-157C_EV1 = stm32mp157c-ev1.dts
flavor_dts_file-157A_DK1_SCMI = stm32mp157a-dk1-scmi.dts
flavor_dts_file-157C_DK2_SCMI = stm32mp157c-dk2-scmi.dts
flavor_dts_file-157C_ED1_SCMI = stm32mp157c-ed1-scmi.dts
flavor_dts_file-157F_EV1_SCMI = stm32mp157c-ev1-scmi.dts

flavor_dts_file-135F_DK = stm32mp135f-dk.dts

flavorlist-cryp-512M = $(flavor_dts_file-157C_DK2) \
$(flavor_dts_file-157C_DK2_SCMI) \
$(flavor_dts_file-135F_DK)

flavorlist-no_cryp-512M = $(flavor_dts_file-157A_DK1)
flavorlist-no_cryp-512M = $(flavor_dts_file-157A_DK1) \
$(flavor_dts_file-157A_DK1_SCMI)

flavorlist-cryp-1G = $(flavor_dts_file-157C_DHCOM_PDK2) \
$(flavor_dts_file-157C_ED1) \
$(flavor_dts_file-157C_EV1)
$(flavor_dts_file-157C_EV1) \
$(flavor_dts_file-157C_ED1_SCMI) \
$(flavor_dts_file-157C_EV1_SCMI)

flavorlist-no_cryp-1G = $(flavor_dts_file-157A_DHCOR_AVENGER96)

Expand All @@ -31,14 +39,22 @@ flavorlist-1G = $(flavorlist-cryp-1G) \
flavorlist-MP15-HUK-DT = $(flavor_dts_file-157A_DK1) \
$(flavor_dts_file-157C_DK2) \
$(flavor_dts_file-157C_ED1) \
$(flavor_dts_file-157C_EV1)
$(flavor_dts_file-157C_EV1) \
$(flavor_dts_file-157A_DK1_SCMI) \
$(flavor_dts_file-157C_DK2_SCMI) \
$(flavor_dts_file-157C_ED1_SCMI) \
$(flavor_dts_file-157C_EV1_SCMI)

flavorlist-MP15 = $(flavor_dts_file-157A_DHCOR_AVENGER96) \
$(flavor_dts_file-157A_DK1) \
$(flavor_dts_file-157C_DHCOM_PDK2) \
$(flavor_dts_file-157C_DK2) \
$(flavor_dts_file-157C_ED1) \
$(flavor_dts_file-157C_EV1)
$(flavor_dts_file-157C_EV1) \
$(flavor_dts_file-157A_DK1_SCMI) \
$(flavor_dts_file-157C_DK2_SCMI) \
$(flavor_dts_file-157C_ED1_SCMI) \
$(flavor_dts_file-157C_EV1_SCMI)

flavorlist-MP13 = $(flavor_dts_file-135F_DK)

Expand Down

0 comments on commit 1f0bc2c

Please sign in to comment.