[PATCH v2 3/3] arm64: dts: qcom: sc7280: Add dma-coherent property for fastrpc nodes

Ling Xu posted 3 patches 7 months, 1 week ago
There is a newer version of this series
[PATCH v2 3/3] arm64: dts: qcom: sc7280: Add dma-coherent property for fastrpc nodes
Posted by Ling Xu 7 months, 1 week ago
Add dma-cherent property to fastrpc context bank nodes to ensure that
the DMA operations for these nodes are coherent.

Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 86b51cffcd54..b40e114d2ca8 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3881,12 +3881,14 @@ compute-cb@3 {
 						compatible = "qcom,fastrpc-compute-cb";
 						reg = <3>;
 						iommus = <&apps_smmu 0x1803 0x0>;
+						dma-coherent;
 					};
 
 					compute-cb@4 {
 						compatible = "qcom,fastrpc-compute-cb";
 						reg = <4>;
 						iommus = <&apps_smmu 0x1804 0x0>;
+						dma-coherent;
 					};
 
 					compute-cb@5 {
@@ -3894,6 +3896,7 @@ compute-cb@5 {
 						reg = <5>;
 						iommus = <&apps_smmu 0x1805 0x0>;
 						qcom,nsessions = <5>;
+						dma-coherent;
 					};
 				};
 			};
@@ -4121,6 +4124,7 @@ compute-cb@1 {
 						reg = <1>;
 						iommus = <&apps_smmu 0x11a1 0x0420>,
 							 <&apps_smmu 0x1181 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@2 {
@@ -4128,6 +4132,7 @@ compute-cb@2 {
 						reg = <2>;
 						iommus = <&apps_smmu 0x11a2 0x0420>,
 							 <&apps_smmu 0x1182 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@3 {
@@ -4135,6 +4140,7 @@ compute-cb@3 {
 						reg = <3>;
 						iommus = <&apps_smmu 0x11a3 0x0420>,
 							 <&apps_smmu 0x1183 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@4 {
@@ -4142,6 +4148,7 @@ compute-cb@4 {
 						reg = <4>;
 						iommus = <&apps_smmu 0x11a4 0x0420>,
 							 <&apps_smmu 0x1184 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@5 {
@@ -4149,6 +4156,7 @@ compute-cb@5 {
 						reg = <5>;
 						iommus = <&apps_smmu 0x11a5 0x0420>,
 							 <&apps_smmu 0x1185 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@6 {
@@ -4156,6 +4164,7 @@ compute-cb@6 {
 						reg = <6>;
 						iommus = <&apps_smmu 0x11a6 0x0420>,
 							 <&apps_smmu 0x1186 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@7 {
@@ -4163,6 +4172,7 @@ compute-cb@7 {
 						reg = <7>;
 						iommus = <&apps_smmu 0x11a7 0x0420>,
 							 <&apps_smmu 0x1187 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@8 {
@@ -4170,6 +4180,7 @@ compute-cb@8 {
 						reg = <8>;
 						iommus = <&apps_smmu 0x11a8 0x0420>,
 							 <&apps_smmu 0x1188 0x0420>;
+						dma-coherent;
 					};
 
 					/* note: secure cb9 in downstream */
@@ -4179,6 +4190,7 @@ compute-cb@11 {
 						reg = <11>;
 						iommus = <&apps_smmu 0x11ab 0x0420>,
 							 <&apps_smmu 0x118b 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@12 {
@@ -4186,6 +4198,7 @@ compute-cb@12 {
 						reg = <12>;
 						iommus = <&apps_smmu 0x11ac 0x0420>,
 							 <&apps_smmu 0x118c 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@13 {
@@ -4193,6 +4206,7 @@ compute-cb@13 {
 						reg = <13>;
 						iommus = <&apps_smmu 0x11ad 0x0420>,
 							 <&apps_smmu 0x118d 0x0420>;
+						dma-coherent;
 					};
 
 					compute-cb@14 {
@@ -4200,6 +4214,7 @@ compute-cb@14 {
 						reg = <14>;
 						iommus = <&apps_smmu 0x11ae 0x0420>,
 							 <&apps_smmu 0x118e 0x0420>;
+						dma-coherent;
 					};
 				};
 			};
-- 
2.34.1
Re: [PATCH v2 3/3] arm64: dts: qcom: sc7280: Add dma-coherent property for fastrpc nodes
Posted by Dmitry Baryshkov 7 months ago
On Fri, May 16, 2025 at 04:30:29PM +0530, Ling Xu wrote:
> Add dma-cherent property to fastrpc context bank nodes to ensure that
> the DMA operations for these nodes are coherent.

Does it apply to all firmware versions?

> 
> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 

-- 
With best wishes
Dmitry
Re: [PATCH v2 3/3] arm64: dts: qcom: sc7280: Add dma-coherent property for fastrpc nodes
Posted by Ling Xu 7 months ago
在 5/17/2025 5:48 AM, Dmitry Baryshkov 写道:
> On Fri, May 16, 2025 at 04:30:29PM +0530, Ling Xu wrote:
>> Add dma-cherent property to fastrpc context bank nodes to ensure that
>> the DMA operations for these nodes are coherent.
> 
> Does it apply to all firmware versions?

No, it's not applicable for all the firmwares, especifically for older one.
This is only applicable where IO coherency is enabled.
>>
>> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
> 

-- 
Thx and BRs,
Ling Xu

Re: [PATCH v2 3/3] arm64: dts: qcom: sc7280: Add dma-coherent property for fastrpc nodes
Posted by Dmitry Baryshkov 7 months ago
On Tue, May 20, 2025 at 02:47:45PM +0800, Ling Xu wrote:
> 在 5/17/2025 5:48 AM, Dmitry Baryshkov 写道:
> > On Fri, May 16, 2025 at 04:30:29PM +0530, Ling Xu wrote:
> >> Add dma-cherent property to fastrpc context bank nodes to ensure that
> >> the DMA operations for these nodes are coherent.
> > 
> > Does it apply to all firmware versions?
> 
> No, it's not applicable for all the firmwares, especifically for older one.
> This is only applicable where IO coherency is enabled.

There are enough platforms using sc7280.dtsi. Which of those have new
firmware? Will this break FP5 phone? Herobrine laptops? Nothing Phone?

> >>
> >> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
> >> ---
> >>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 15 +++++++++++++++
> >>  1 file changed, 15 insertions(+)
> >>
> > 
> 
> -- 
> Thx and BRs,
> Ling Xu
> 

-- 
With best wishes
Dmitry