Skip to contentSkip to conversation

arm64: dts: qcom: add IPA qcom,qmp property

PATCH Applied Alex Elder 4 participants 6 messages Feb 1, 2022 – Feb 4, 2022

Subsystems (6)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 arm64: dts: qcom: add IPA qcom,qmp property

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

---

Dave, Jakub, please let Bjorn take this through the Qualcomm tree.

 arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 ++
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 ++
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 ++
 3 files changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/sc7180.dtsi +2 -0
index 2151cd8c8c7ab..e1c46b80f14a0 100644
@@ -1459,6 +1459,8 @@ ipa: ipa@1e40000 {
 					     "imem",
 					     "config";
 
+			qcom,qmp = <&aoss_qmp>;
+
 			qcom,smem-states = <&ipa_smp2p_out 0>,
 					   <&ipa_smp2p_out 1>;
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -0
index 937c2e0e93eb9..fe5792e7e8d7a 100644
@@ -1714,6 +1714,8 @@ ipa: ipa@1e40000 {
 			interconnect-names = "memory",
 					     "config";
 
+			qcom,qmp = <&aoss_qmp>;
+
 			qcom,smem-states = <&ipa_smp2p_out 0>,
 					   <&ipa_smp2p_out 1>;
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
arch/arm64/boot/dts/qcom/sm8350.dtsi +2 -0
index 53b39e718fb66..5c2866355e352 100644
@@ -1425,6 +1425,8 @@ ipa: ipa@1e40000 {
 			interconnect-names = "memory",
 					     "config";
 
+			qcom,qmp = <&aoss_qmp>;
+
 			qcom,smem-states = <&ipa_smp2p_out 0>,
 					   <&ipa_smp2p_out 1>;
 			qcom,smem-state-names = "ipa-clock-enabled-valid",
Signature · 1 line
2.32.0
maintainer
#1 lore raw
Quoted 8 lines · On Tue, 1 Feb 2022 08:07:23 -0600 Alex Elder wrote:

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

---

Dave, Jakub, please let Bjorn take this through the Qualcomm tree.

I don't know much about DT but the patch defining the property is targeting net - will it not cause validation errors? Or Bjorn knows to wait for the fixes to propagate? Or it doesn't matter? :)

author
#2 lore raw
Quoted 5 lines · Jakub Kicinski
Quoted 4 lines · On Tue, 1 Feb 2022 08:07:23 -0600 Alex Elder wrote:

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

Quoted 8 lines
Quoted 4 lines

---

Dave, Jakub, please let Bjorn take this through the Qualcomm tree.

I don't know much about DT but the patch defining the property is targeting net - will it not cause validation errors? Or Bjorn knows to wait for the fixes to propagate? Or it doesn't matter? :)

It might matter sometimes, but in this case it does not.

If the DT property is present but never referenced by the code, it doesn't matter.

The code in this patch looks up the DT property, and its behavior is affected by whether the property is there or not. If it's not there, it's treated as an error that can be safely ignored.

In the case this fix is actually needed, we'll need both the code present and DT property defined. If the code is there but not the property, it's OK, but the bug won't be fixed quite yet.

-Alex

#3 lore raw
Quoted 26 lines · Alex Elder
Quoted 5 lines · Jakub Kicinski
Quoted 4 lines · On Tue, 1 Feb 2022 08:07:23 -0600 Alex Elder wrote:

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

Quoted 8 lines
Quoted 4 lines

---

Dave, Jakub, please let Bjorn take this through the Qualcomm tree.

I don't know much about DT but the patch defining the property is targeting net - will it not cause validation errors? Or Bjorn knows to wait for the fixes to propagate? Or it doesn't matter? :)

It might matter sometimes, but in this case it does not.

If the DT property is present but never referenced by the code, it doesn't matter.

The code in this patch looks up the DT property, and its behavior is affected by whether the property is there or not. If it's not there, it's treated as an error that can be safely ignored.

Quoted 4 lines

In the case this fix is actually needed, we'll need both the code present and DT property defined. If the code is there but not the property, it's OK, but the bug won't be fixed quite yet.

If there's only one possible node that qcom,qmp points to, you can just get the node by its compatible (of_find_compatible_node()). Then you don't need a DT update to make things work. Of course, this doesn't work too well if there are 10 possible compatibles without a common fallback compatible.

Rob

#4 lore raw
Quoted 32 lines · Rob Herring
Quoted 26 lines · Alex Elder
Quoted 5 lines · Jakub Kicinski
Quoted 4 lines · On Tue, 1 Feb 2022 08:07:23 -0600 Alex Elder wrote:

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

Quoted 8 lines
Quoted 4 lines

---

Dave, Jakub, please let Bjorn take this through the Qualcomm tree.

I don't know much about DT but the patch defining the property is targeting net - will it not cause validation errors? Or Bjorn knows to wait for the fixes to propagate? Or it doesn't matter? :)

It might matter sometimes, but in this case it does not.

If the DT property is present but never referenced by the code, it doesn't matter.

The code in this patch looks up the DT property, and its behavior is affected by whether the property is there or not. If it's not there, it's treated as an error that can be safely ignored.

Quoted 4 lines

In the case this fix is actually needed, we'll need both the code present and DT property defined. If the code is there but not the property, it's OK, but the bug won't be fixed quite yet.

Quoted 6 lines

If there's only one possible node that qcom,qmp points to, you can just get the node by its compatible (of_find_compatible_node()). Then you don't need a DT update to make things work. Of course, this doesn't work too well if there are 10 possible compatibles without a common fallback compatible.

In one of the latest platforms there's two QMP instances, so we decided to make the reference explicit to prepare for the introduction of that.

So I intend to pick this patch through the qcom tree.

And we don't need to synchronize it with the net-changes; the two changes can go independently and only when they are both in place will the change take effect and the issue resolved.

Regards,
Bjorn

#5 lore raw

Re: (subset) [PATCH] arm64: dts: qcom: add IPA qcom,qmp property

In reply to Alex Elder
Quoted 5 lines · Alex Elder

At least three platforms require the "qcom,qmp" property to be specified, so the IPA driver can request register retention across power collapse. Update DTS files accordingly.

Applied, thanks!

[1/1] arm64: dts: qcom: add IPA qcom,qmp property

      commit: 73419e4d2fd1b838fcb1df6a978d67b3ae1c5c01

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>