diff mbox series

[2/2] dts: ARM: stm32mp15: add OP-TEE node in u-boot DTSI

Message ID 20200605092427.2.I0b49a502a439eb6530b486f5e3ab4923195bff8e@changeid
State Accepted
Commit 9e696965065c43b59901e49e75435b1549fa55c7
Headers show
Series [1/2] board: stm32mp1: fix handling of DT OP-TEE reserved memory nodes | expand

Commit Message

Patrick Delaunay June 5, 2020, 7:24 a.m. UTC
From: Etienne Carriere <etienne.carriere at linaro.org>

Add OP-TEE firmware node in stm32mp15 U-Boot DTSI. This node is
needed since commit [1] that changed U-Boot/stm32mp15 to detect
OP-TEE availability by probing the resource instead of relying on
U-Boot configuration. The software sequence implemented by [1] is
fine but U-Boot DTS/DTSI files were not updated accordingly since,
hence OP-TEE presence is never detected by U-Boot, preventing Linux
kernel from using OP-TEE resources.

For consistency and to synchronize stm32mp15 DTSI files (excluding
U-Boot specific DTSI files) with the Linux kernel ones, this change
also moves the OP-TEE reserved memory nodes from board generic DTSI
files to U-Boot specific board DTSI files.

Link: [1] commit 43df0a159df6 ("stm32mp1: dynamically detect op-tee presence")
Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 15 +++++++++++++++
 arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 14 ++++++++++++++
 arch/arm/dts/stm32mp157c-ed1.dts         |  5 -----
 arch/arm/dts/stm32mp15xx-dkx.dtsi        |  5 -----
 4 files changed, 29 insertions(+), 10 deletions(-)

Comments

Patrice CHOTARD June 16, 2020, 8:09 a.m. UTC | #1
Hi

On 6/5/20 9:24 AM, Patrick Delaunay wrote:
> From: Etienne Carriere <etienne.carriere at linaro.org>
>
> Add OP-TEE firmware node in stm32mp15 U-Boot DTSI. This node is
> needed since commit [1] that changed U-Boot/stm32mp15 to detect
> OP-TEE availability by probing the resource instead of relying on
> U-Boot configuration. The software sequence implemented by [1] is
> fine but U-Boot DTS/DTSI files were not updated accordingly since,
> hence OP-TEE presence is never detected by U-Boot, preventing Linux
> kernel from using OP-TEE resources.
>
> For consistency and to synchronize stm32mp15 DTSI files (excluding
> U-Boot specific DTSI files) with the Linux kernel ones, this change
> also moves the OP-TEE reserved memory nodes from board generic DTSI
> files to U-Boot specific board DTSI files.
>
> Link: [1] commit 43df0a159df6 ("stm32mp1: dynamically detect op-tee presence")
> Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
>  arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 15 +++++++++++++++
>  arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 14 ++++++++++++++
>  arch/arm/dts/stm32mp157c-ed1.dts         |  5 -----
>  arch/arm/dts/stm32mp15xx-dkx.dtsi        |  5 -----
>  4 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
> index c52abeb1e7..3fedb6f1e1 100644
> --- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
> +++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
> @@ -20,6 +20,21 @@
>  		st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
>  		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
>  	};
> +
> +	firmware {
> +		optee {
> +			compatible = "linaro,optee-tz";
> +			method = "smc";
> +		};
> +	};
> +
> +	reserved-memory {
> +		optee at de000000 {
> +			reg = <0xde000000 0x02000000>;
> +			no-map;
> +		};
> +	};
> +
>  	led {
>  		red {
>  			label = "error";
> diff --git a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
> index 84af7fa47b..a07c585415 100644
> --- a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
> +++ b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
> @@ -21,6 +21,20 @@
>  		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
>  	};
>  
> +	firmware {
> +		optee {
> +			compatible = "linaro,optee-tz";
> +			method = "smc";
> +		};
> +	};
> +
> +	reserved-memory {
> +		optee at fe000000 {
> +			reg = <0xfe000000 0x02000000>;
> +			no-map;
> +		};
> +	};
> +
>  	led {
>  		red {
>  			label = "error";
> diff --git a/arch/arm/dts/stm32mp157c-ed1.dts b/arch/arm/dts/stm32mp157c-ed1.dts
> index 4fb71100f5..186dc46754 100644
> --- a/arch/arm/dts/stm32mp157c-ed1.dts
> +++ b/arch/arm/dts/stm32mp157c-ed1.dts
> @@ -70,11 +70,6 @@
>  			reg = <0xe8000000 0x8000000>;
>  			no-map;
>  		};
> -
> -		optee at fe000000 {
> -			reg = <0xfe000000 0x02000000>;
> -			no-map;
> -		};
>  	};
>  
>  	aliases {
> diff --git a/arch/arm/dts/stm32mp15xx-dkx.dtsi b/arch/arm/dts/stm32mp15xx-dkx.dtsi
> index 812e370ee4..7589c6f9dc 100644
> --- a/arch/arm/dts/stm32mp15xx-dkx.dtsi
> +++ b/arch/arm/dts/stm32mp15xx-dkx.dtsi
> @@ -58,11 +58,6 @@
>  			reg = <0xd4000000 0x4000000>;
>  			no-map;
>  		};
> -
> -		optee at de000000 {
> -			reg = <0xde000000 0x02000000>;
> -			no-map;
> -		};
>  	};
>  
>  	led {

Reviewed-by: Patrice Chotard <patrice.chotard at st.com>

Thanks
Patrick Delaunay June 16, 2020, 9:18 a.m. UTC | #2
Hi, 

> From: Patrick DELAUNAY <patrick.delaunay at st.com>
> Sent: vendredi 5 juin 2020 09:25
> 
> From: Etienne Carriere <etienne.carriere at linaro.org>
> 
> Add OP-TEE firmware node in stm32mp15 U-Boot DTSI. This node is needed
> since commit [1] that changed U-Boot/stm32mp15 to detect OP-TEE availability
> by probing the resource instead of relying on U-Boot configuration. The software
> sequence implemented by [1] is fine but U-Boot DTS/DTSI files were not updated
> accordingly since, hence OP-TEE presence is never detected by U-Boot,
> preventing Linux kernel from using OP-TEE resources.
> 
> For consistency and to synchronize stm32mp15 DTSI files (excluding U-Boot
> specific DTSI files) with the Linux kernel ones, this change also moves the OP-
> TEE reserved memory nodes from board generic DTSI files to U-Boot specific
> board DTSI files.
> 
> Link: [1] commit 43df0a159df6 ("stm32mp1: dynamically detect op-tee presence")
> Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
> 
>  arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 15 +++++++++++++++
> arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 14 ++++++++++++++
>  arch/arm/dts/stm32mp157c-ed1.dts         |  5 -----
>  arch/arm/dts/stm32mp15xx-dkx.dtsi        |  5 -----
>  4 files changed, 29 insertions(+), 10 deletions(-)
> 

Applied to u-boot-stm/master, thanks!

Regards

Patrick
diff mbox series

Patch

diff --git a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
index c52abeb1e7..3fedb6f1e1 100644
--- a/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi
@@ -20,6 +20,21 @@ 
 		st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
 		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
 	};
+
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+
+	reserved-memory {
+		optee at de000000 {
+			reg = <0xde000000 0x02000000>;
+			no-map;
+		};
+	};
+
 	led {
 		red {
 			label = "error";
diff --git a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
index 84af7fa47b..a07c585415 100644
--- a/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi
@@ -21,6 +21,20 @@ 
 		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
 	};
 
+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+
+	reserved-memory {
+		optee at fe000000 {
+			reg = <0xfe000000 0x02000000>;
+			no-map;
+		};
+	};
+
 	led {
 		red {
 			label = "error";
diff --git a/arch/arm/dts/stm32mp157c-ed1.dts b/arch/arm/dts/stm32mp157c-ed1.dts
index 4fb71100f5..186dc46754 100644
--- a/arch/arm/dts/stm32mp157c-ed1.dts
+++ b/arch/arm/dts/stm32mp157c-ed1.dts
@@ -70,11 +70,6 @@ 
 			reg = <0xe8000000 0x8000000>;
 			no-map;
 		};
-
-		optee at fe000000 {
-			reg = <0xfe000000 0x02000000>;
-			no-map;
-		};
 	};
 
 	aliases {
diff --git a/arch/arm/dts/stm32mp15xx-dkx.dtsi b/arch/arm/dts/stm32mp15xx-dkx.dtsi
index 812e370ee4..7589c6f9dc 100644
--- a/arch/arm/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/dts/stm32mp15xx-dkx.dtsi
@@ -58,11 +58,6 @@ 
 			reg = <0xd4000000 0x4000000>;
 			no-map;
 		};
-
-		optee at de000000 {
-			reg = <0xde000000 0x02000000>;
-			no-map;
-		};
 	};
 
 	led {