diff mbox series

[v2,12/13] ARM: dts: stm32: enable optee firmware and SCMI support on STM32MP13

Message ID 20220225133137.813919-13-gabriel.fernandez@foss.st.com (mailing list archive)
State New, archived
Headers show
Series Introduction of STM32MP13 RCC driver (Reset Clock Controller) | expand

Commit Message

Gabriel FERNANDEZ Feb. 25, 2022, 1:31 p.m. UTC
From: Gabriel Fernandez <gabriel.fernandez@foss.st.com>

Enable optee and SCMI clocks support.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
---
 arch/arm/boot/dts/stm32mp131.dtsi | 37 +++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Ahmad Fatoum Feb. 25, 2022, 3:13 p.m. UTC | #1
Hello Gabriel,

On 25.02.22 14:31, gabriel.fernandez@foss.st.com wrote:
> From: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> 
> Enable optee and SCMI clocks support.
> 
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
> ---
>  arch/arm/boot/dts/stm32mp131.dtsi | 37 +++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stm32mp131.dtsi b/arch/arm/boot/dts/stm32mp131.dtsi
> index 262de4eeb4ed..78eac53224d4 100644
> --- a/arch/arm/boot/dts/stm32mp131.dtsi
> +++ b/arch/arm/boot/dts/stm32mp131.dtsi
> @@ -27,6 +27,43 @@ arm-pmu {
>  		interrupt-parent = <&intc>;
>  	};
>  
> +	scmi_sram: sram@2ffff000 {
> +		compatible = "mmio-sram";
> +		reg = <0x2ffff000 0x1000>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0 0x2ffff000 0x1000>;
> +
> +		scmi_shm: scmi_shm@0 {
> +			compatible = "arm,scmi-shmem";
> +			reg = <0 0x80>;
> +		};
> +	};
> +
> +	firmware {
> +		optee {
> +			method = "smc";
> +			compatible = "linaro,optee-tz";
> +		};
> +
> +		scmi: scmi {
> +			compatible = "linaro,scmi-optee";

This compatible doesn't seem to be documented upstream. I am looking at v5.17-rc5.
Do you have a reference detailing the difference between this conduit and
plain arm,scmi-smc (as used with TF-A on the STM32MP151).

Cheers,
Ahmad

> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			linaro,optee-channel-id = <0>;
> +			shmem = <&scmi_shm>;
> +
> +			scmi_clk: protocol@14 {
> +				reg = <0x14>;
> +				#clock-cells = <1>;
> +			};
> +
> +			scmi_reset: protocol@16 {
> +				reg = <0x16>;
> +				#reset-cells = <1>;
> +			};
> +		};
> +	};
>  	clocks {
>  		clk_axi: clk-axi {
>  			#clock-cells = <0>;
Gabriel FERNANDEZ March 3, 2022, 1:09 p.m. UTC | #2
On 2/25/22 16:13, Ahmad Fatoum wrote:
> Hello Gabriel,
>
> On 25.02.22 14:31, gabriel.fernandez@foss.st.com wrote:
>> From: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>>
>> Enable optee and SCMI clocks support.
>>
>> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>> ---
>>   arch/arm/boot/dts/stm32mp131.dtsi | 37 +++++++++++++++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/stm32mp131.dtsi b/arch/arm/boot/dts/stm32mp131.dtsi
>> index 262de4eeb4ed..78eac53224d4 100644
>> --- a/arch/arm/boot/dts/stm32mp131.dtsi
>> +++ b/arch/arm/boot/dts/stm32mp131.dtsi
>> @@ -27,6 +27,43 @@ arm-pmu {
>>   		interrupt-parent = <&intc>;
>>   	};
>>   
>> +	scmi_sram: sram@2ffff000 {
>> +		compatible = "mmio-sram";
>> +		reg = <0x2ffff000 0x1000>;
>> +		#address-cells = <1>;
>> +		#size-cells = <1>;
>> +		ranges = <0 0x2ffff000 0x1000>;
>> +
>> +		scmi_shm: scmi_shm@0 {
>> +			compatible = "arm,scmi-shmem";
>> +			reg = <0 0x80>;
>> +		};
>> +	};
>> +
>> +	firmware {
>> +		optee {
>> +			method = "smc";
>> +			compatible = "linaro,optee-tz";
>> +		};
>> +
>> +		scmi: scmi {
>> +			compatible = "linaro,scmi-optee";
> This compatible doesn't seem to be documented upstream. I am looking at v5.17-rc5.
> Do you have a reference detailing the difference between this conduit and
> plain arm,scmi-smc (as used with TF-A on the STM32MP151).
>
> Cheers,
> Ahmad

Hi

Ahmad,

it's on going.

https://lore.kernel.org/linux-arm-kernel/20211029102118.GG6526@e120937-lin/T/#mf46c83f0aadce3061ee93fa22159405f38d881a0

>
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			linaro,optee-channel-id = <0>;
>> +			shmem = <&scmi_shm>;
>> +
>> +			scmi_clk: protocol@14 {
>> +				reg = <0x14>;
>> +				#clock-cells = <1>;
>> +			};
>> +
>> +			scmi_reset: protocol@16 {
>> +				reg = <0x16>;
>> +				#reset-cells = <1>;
>> +			};
>> +		};
>> +	};
>>   	clocks {
>>   		clk_axi: clk-axi {
>>   			#clock-cells = <0>;
>
Ahmad Fatoum March 8, 2022, 9:58 a.m. UTC | #3
Helo Gabriel,

On 03.03.22 14:09, Gabriel FERNANDEZ wrote:
> 
> On 2/25/22 16:13, Ahmad Fatoum wrote:
>> Hello Gabriel,
>>
>> On 25.02.22 14:31, gabriel.fernandez@foss.st.com wrote:
>>> From: Gabriel Fernandez <gabriel.fernandez@foss.st.com>
>>> +    firmware {
>>> +        optee {
>>> +            method = "smc";
>>> +            compatible = "linaro,optee-tz";
>>> +        };
>>> +
>>> +        scmi: scmi {
>>> +            compatible = "linaro,scmi-optee";
>> This compatible doesn't seem to be documented upstream. I am looking at v5.17-rc5.
>> Do you have a reference detailing the difference between this conduit and
>> plain arm,scmi-smc (as used with TF-A on the STM32MP151).
>>
>> Cheers,
>> Ahmad
> 
> Hi
> 
> Ahmad,
> 
> it's on going.
> 
> https://lore.kernel.org/linux-arm-kernel/20211029102118.GG6526@e120937-lin/T/#mf46c83f0aadce3061ee93fa22159405f38d881a0

I've found that thread in the meantime and got some clarification on why a new
transport for OP-TEE was added. One question I still have though is why make
this transport the default for STM32MP13x instead of using SCMI over SMC like
you do for STM32MP15x. OP-TEE could still be made to service SCMI over SMC
and it would allow people employing TF-A as SCMI provider an easier migration
to the newer SoC.

Cheers,
Ahmad

> 
>>
>>> +            #address-cells = <1>;
>>> +            #size-cells = <0>;
>>> +            linaro,optee-channel-id = <0>;
>>> +            shmem = <&scmi_shm>;
>>> +
>>> +            scmi_clk: protocol@14 {
>>> +                reg = <0x14>;
>>> +                #clock-cells = <1>;
>>> +            };
>>> +
>>> +            scmi_reset: protocol@16 {
>>> +                reg = <0x16>;
>>> +                #reset-cells = <1>;
>>> +            };
>>> +        };
>>> +    };
>>>       clocks {
>>>           clk_axi: clk-axi {
>>>               #clock-cells = <0>;
>>
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/stm32mp131.dtsi b/arch/arm/boot/dts/stm32mp131.dtsi
index 262de4eeb4ed..78eac53224d4 100644
--- a/arch/arm/boot/dts/stm32mp131.dtsi
+++ b/arch/arm/boot/dts/stm32mp131.dtsi
@@ -27,6 +27,43 @@  arm-pmu {
 		interrupt-parent = <&intc>;
 	};
 
+	scmi_sram: sram@2ffff000 {
+		compatible = "mmio-sram";
+		reg = <0x2ffff000 0x1000>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x2ffff000 0x1000>;
+
+		scmi_shm: scmi_shm@0 {
+			compatible = "arm,scmi-shmem";
+			reg = <0 0x80>;
+		};
+	};
+
+	firmware {
+		optee {
+			method = "smc";
+			compatible = "linaro,optee-tz";
+		};
+
+		scmi: scmi {
+			compatible = "linaro,scmi-optee";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			linaro,optee-channel-id = <0>;
+			shmem = <&scmi_shm>;
+
+			scmi_clk: protocol@14 {
+				reg = <0x14>;
+				#clock-cells = <1>;
+			};
+
+			scmi_reset: protocol@16 {
+				reg = <0x16>;
+				#reset-cells = <1>;
+			};
+		};
+	};
 	clocks {
 		clk_axi: clk-axi {
 			#clock-cells = <0>;