mbox series

[0/2] ARM: dts: qcom: sdx65: support IPA

Message ID 20230324201528.2540564-1-elder@linaro.org
Headers show
Series ARM: dts: qcom: sdx65: support IPA | expand

Message

Alex Elder March 24, 2023, 8:15 p.m. UTC
The upstream IPA driver now supports IPA v5.0 for SDX65.  Add
IPA-related nodes and definitions to "sdx65.dtsi", and enable IPA
in "sdx65-mtp.dts".

Having touched these files, Konrad advised I should update them to
move the "status" property to the end of nodes where it is used.

					-Alex

Alex Elder (2):
  ARM: dts: qcom: sdx65: add IPA information
  ARM: dts: qcom-sdx65: move status properties to end of nodes

 arch/arm/boot/dts/qcom-sdx65-mtp.dts | 11 +++++--
 arch/arm/boot/dts/qcom-sdx65.dtsi    | 46 ++++++++++++++++++++++++++--
 2 files changed, 51 insertions(+), 6 deletions(-)

Comments

Krzysztof Kozlowski March 25, 2023, 11:14 a.m. UTC | #1
On 24/03/2023 21:15, Alex Elder wrote:
> Add IPA-related nodes and definitions to "sdx65.dtsi".  The SMP2P
> nodes (ipa_smp2p_out and ipa_smp2p_in) are already present.
> 
> Enable IPA in "sdx65-mtp.dts"; this GSI firmware is loaded by Trust
> Zone on this platform.
> 
> Tested-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> Signed-off-by: Alex Elder <elder@linaro.org>
> ---
>  arch/arm/boot/dts/qcom-sdx65-mtp.dts |  5 ++++
>  arch/arm/boot/dts/qcom-sdx65.dtsi    | 38 ++++++++++++++++++++++++++++
>  2 files changed, 43 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
> index ed98c83c141fc..72e25de0db5fc 100644
> --- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
> +++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
> @@ -245,6 +245,11 @@ &blsp1_uart3 {
>  	status = "okay";
>  };
>  
> +&ipa {
> +	qcom,gsi-loader = "skip";
> +	status = "okay";
> +};
> +
>  &qpic_bam {
>  	status = "okay";
>  };
> diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
> index 192f9f94bc8b4..360d6dc144811 100644
> --- a/arch/arm/boot/dts/qcom-sdx65.dtsi
> +++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
> @@ -11,6 +11,7 @@
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>  #include <dt-bindings/power/qcom-rpmpd.h>
>  #include <dt-bindings/soc/qcom,rpmh-rsc.h>
> +#include <dt-bindings/interconnect/qcom,sdx65.h>
>  
>  / {
>  	#address-cells = <1>;
> @@ -299,6 +300,43 @@ tcsr_mutex: hwlock@1f40000 {
>  			#hwlock-cells = <1>;
>  		};
>  
> +		ipa: ipa@3e04000 {
> +			compatible = "qcom,sdx65-ipa";
> +
> +			iommus = <&apps_smmu 0x5e0 0x0>,
> +				 <&apps_smmu 0x5e2 0x0>;
> +			reg = <0x3f40000 0x10000>,
> +			      <0x3f50000 0x5000>,
> +			      <0x3e04000 0xfc000>;
> +			reg-names = "ipa-reg",
> +				    "ipa-shared",
> +				    "gsi";
> +
> +			interrupts-extended = <&intc GIC_SPI 241 IRQ_TYPE_EDGE_RISING>,
> +					      <&intc GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
> +			interrupt-names = "ipa",
> +					   "gsi",
> +					   "ipa-clock-query",
> +					   "ipa-setup-ready";

These look misaligned.

With above:

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>


Best regards,
Krzysztof
Konrad Dybcio March 25, 2023, 12:12 p.m. UTC | #2
On 25.03.2023 12:14, Krzysztof Kozlowski wrote:
> On 24/03/2023 21:15, Alex Elder wrote:
>> Add IPA-related nodes and definitions to "sdx65.dtsi".  The SMP2P
>> nodes (ipa_smp2p_out and ipa_smp2p_in) are already present.
>>
>> Enable IPA in "sdx65-mtp.dts"; this GSI firmware is loaded by Trust
>> Zone on this platform.
>>
>> Tested-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>> Signed-off-by: Alex Elder <elder@linaro.org>
>> ---
>>  arch/arm/boot/dts/qcom-sdx65-mtp.dts |  5 ++++
>>  arch/arm/boot/dts/qcom-sdx65.dtsi    | 38 ++++++++++++++++++++++++++++
>>  2 files changed, 43 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> index ed98c83c141fc..72e25de0db5fc 100644
>> --- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> +++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> @@ -245,6 +245,11 @@ &blsp1_uart3 {
>>  	status = "okay";
>>  };
>>  
>> +&ipa {
>> +	qcom,gsi-loader = "skip";
>> +	status = "okay";
>> +};
>> +
>>  &qpic_bam {
>>  	status = "okay";
>>  };
>> diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
>> index 192f9f94bc8b4..360d6dc144811 100644
>> --- a/arch/arm/boot/dts/qcom-sdx65.dtsi
>> +++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
>> @@ -11,6 +11,7 @@
>>  #include <dt-bindings/interrupt-controller/arm-gic.h>
>>  #include <dt-bindings/power/qcom-rpmpd.h>
>>  #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>> +#include <dt-bindings/interconnect/qcom,sdx65.h>
>>  
>>  / {
>>  	#address-cells = <1>;
>> @@ -299,6 +300,43 @@ tcsr_mutex: hwlock@1f40000 {
>>  			#hwlock-cells = <1>;
>>  		};
>>  
>> +		ipa: ipa@3e04000 {
>> +			compatible = "qcom,sdx65-ipa";
>> +
>> +			iommus = <&apps_smmu 0x5e0 0x0>,
>> +				 <&apps_smmu 0x5e2 0x0>;
>> +			reg = <0x3f40000 0x10000>,
>> +			      <0x3f50000 0x5000>,
>> +			      <0x3e04000 0xfc000>;
>> +			reg-names = "ipa-reg",
>> +				    "ipa-shared",
>> +				    "gsi";
>> +
>> +			interrupts-extended = <&intc GIC_SPI 241 IRQ_TYPE_EDGE_RISING>,
>> +					      <&intc GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
>> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
>> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
>> +			interrupt-names = "ipa",
>> +					   "gsi",
>> +					   "ipa-clock-query",
>> +					   "ipa-setup-ready";
> 
> These look misaligned.
> 
> With above:
> 
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
With this and moving iommus below interconnect:

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
> 
> 
> Best regards,
> Krzysztof
>
Alex Elder March 26, 2023, 4:01 p.m. UTC | #3
On 3/25/23 6:14 AM, Krzysztof Kozlowski wrote:
> On 24/03/2023 21:15, Alex Elder wrote:
>> Add IPA-related nodes and definitions to "sdx65.dtsi".  The SMP2P
>> nodes (ipa_smp2p_out and ipa_smp2p_in) are already present.
>>
>> Enable IPA in "sdx65-mtp.dts"; this GSI firmware is loaded by Trust
>> Zone on this platform.
>>
>> Tested-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>> Signed-off-by: Alex Elder <elder@linaro.org>
>> ---
>>   arch/arm/boot/dts/qcom-sdx65-mtp.dts |  5 ++++
>>   arch/arm/boot/dts/qcom-sdx65.dtsi    | 38 ++++++++++++++++++++++++++++
>>   2 files changed, 43 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> index ed98c83c141fc..72e25de0db5fc 100644
>> --- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> +++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>> @@ -245,6 +245,11 @@ &blsp1_uart3 {
>>   	status = "okay";
>>   };
>>   
>> +&ipa {
>> +	qcom,gsi-loader = "skip";
>> +	status = "okay";
>> +};
>> +
>>   &qpic_bam {
>>   	status = "okay";
>>   };
>> diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
>> index 192f9f94bc8b4..360d6dc144811 100644
>> --- a/arch/arm/boot/dts/qcom-sdx65.dtsi
>> +++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
>> @@ -11,6 +11,7 @@
>>   #include <dt-bindings/interrupt-controller/arm-gic.h>
>>   #include <dt-bindings/power/qcom-rpmpd.h>
>>   #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>> +#include <dt-bindings/interconnect/qcom,sdx65.h>
>>   
>>   / {
>>   	#address-cells = <1>;
>> @@ -299,6 +300,43 @@ tcsr_mutex: hwlock@1f40000 {
>>   			#hwlock-cells = <1>;
>>   		};
>>   
>> +		ipa: ipa@3e04000 {
>> +			compatible = "qcom,sdx65-ipa";
>> +
>> +			iommus = <&apps_smmu 0x5e0 0x0>,
>> +				 <&apps_smmu 0x5e2 0x0>;
>> +			reg = <0x3f40000 0x10000>,
>> +			      <0x3f50000 0x5000>,
>> +			      <0x3e04000 0xfc000>;
>> +			reg-names = "ipa-reg",
>> +				    "ipa-shared",
>> +				    "gsi";
>> +
>> +			interrupts-extended = <&intc GIC_SPI 241 IRQ_TYPE_EDGE_RISING>,
>> +					      <&intc GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
>> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
>> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
>> +			interrupt-names = "ipa",
>> +					   "gsi",
>> +					   "ipa-clock-query",
>> +					   "ipa-setup-ready";
> 
> These look misaligned.

I believe this is the alignment convention used by all IPA nodes
in DTS files.  It's possible I'm not seeing something you are,
but...  what alignment should be used?  And if I change this,
should I change all others?

Thanks.

					-Alex

> 
> With above:
> 
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski March 26, 2023, 4:04 p.m. UTC | #4
On 26/03/2023 18:01, Alex Elder wrote:
> On 3/25/23 6:14 AM, Krzysztof Kozlowski wrote:
>> On 24/03/2023 21:15, Alex Elder wrote:
>>> Add IPA-related nodes and definitions to "sdx65.dtsi".  The SMP2P
>>> nodes (ipa_smp2p_out and ipa_smp2p_in) are already present.
>>>
>>> Enable IPA in "sdx65-mtp.dts"; this GSI firmware is loaded by Trust
>>> Zone on this platform.
>>>
>>> Tested-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>>> Signed-off-by: Alex Elder <elder@linaro.org>
>>> ---
>>>   arch/arm/boot/dts/qcom-sdx65-mtp.dts |  5 ++++
>>>   arch/arm/boot/dts/qcom-sdx65.dtsi    | 38 ++++++++++++++++++++++++++++
>>>   2 files changed, 43 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/qcom-sdx65-mtp.dts b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>>> index ed98c83c141fc..72e25de0db5fc 100644
>>> --- a/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>>> +++ b/arch/arm/boot/dts/qcom-sdx65-mtp.dts
>>> @@ -245,6 +245,11 @@ &blsp1_uart3 {
>>>   	status = "okay";
>>>   };
>>>   
>>> +&ipa {
>>> +	qcom,gsi-loader = "skip";
>>> +	status = "okay";
>>> +};
>>> +
>>>   &qpic_bam {
>>>   	status = "okay";
>>>   };
>>> diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom-sdx65.dtsi
>>> index 192f9f94bc8b4..360d6dc144811 100644
>>> --- a/arch/arm/boot/dts/qcom-sdx65.dtsi
>>> +++ b/arch/arm/boot/dts/qcom-sdx65.dtsi
>>> @@ -11,6 +11,7 @@
>>>   #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>   #include <dt-bindings/power/qcom-rpmpd.h>
>>>   #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>>> +#include <dt-bindings/interconnect/qcom,sdx65.h>
>>>   
>>>   / {
>>>   	#address-cells = <1>;
>>> @@ -299,6 +300,43 @@ tcsr_mutex: hwlock@1f40000 {
>>>   			#hwlock-cells = <1>;
>>>   		};
>>>   
>>> +		ipa: ipa@3e04000 {
>>> +			compatible = "qcom,sdx65-ipa";
>>> +
>>> +			iommus = <&apps_smmu 0x5e0 0x0>,
>>> +				 <&apps_smmu 0x5e2 0x0>;
>>> +			reg = <0x3f40000 0x10000>,
>>> +			      <0x3f50000 0x5000>,
>>> +			      <0x3e04000 0xfc000>;
>>> +			reg-names = "ipa-reg",
>>> +				    "ipa-shared",
>>> +				    "gsi";
>>> +
>>> +			interrupts-extended = <&intc GIC_SPI 241 IRQ_TYPE_EDGE_RISING>,
>>> +					      <&intc GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
>>> +					      <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
>>> +					      <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>;
>>> +			interrupt-names = "ipa",
>>> +					   "gsi",
>>> +					   "ipa-clock-query",
>>> +					   "ipa-setup-ready";
>>
>> These look misaligned.
> 
> I believe this is the alignment convention used by all IPA nodes
> in DTS files.  It's possible I'm not seeing something you are,
> but...  what alignment should be used?  And if I change this,
> should I change all others?

If this is aligned, then fine. The diff points it is not, but the diff
might be a bit tricky sometimes.

Alignment is till " in previous line. For example sdm845 looks fine.


Best regards,
Krzysztof