Skip to contentSkip to conversation

Shikra: Fix qce configuration

PATCH Superseded Kuldeep Singh 3 participants 5 messages Nov 12 – Nov 13

Subsystems (5)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover Shikra: Fix qce configuration

This patch series fixes QCE on Shikra and targetted for v7.4.

Shikra require explicit clock which is omitted with current binding description.
Also, one more reason to update shikra-QCE is, clk-smd-rpm was doing proxy voting and crypto was consuming it. With proxy vote removal, qce need to vote for it's own clocks explicitly which is already being done for agatti target. Adapt same mechanism to Shikra QCE too.

The current qce configuration will still work but this one is more appropriately describing the hardware.

Validations:
- Qce probe and kcapi_convenience.sh tests.
- Correct clk_summary output as prepare_count and enable_count are 0.

---
Changes in v2:
- Update commit message on Konrad and Krzysztof comments.
- Link to v1: https://patch.msgid.link/[email protected]

To: Bartosz Golaszewski <[email protected]>
To: Herbert Xu <[email protected]>
To: "David S. Miller" <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Kuldeep Singh <[email protected]>
To: Abel Vesa <[email protected]>
Cc: Bartosz Golaszewski <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Konrad Dybcio <[email protected]>

---
Kuldeep Singh (2):
dt-bindings: crypto: Correct Shikra QCE compatible hierarchy
arm64: dts: qcom: shikra: Correct QCE node configuration

 Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 3 ++-
 arch/arm64/boot/dts/qcom/shikra.dtsi                   | 7 +++----
 2 files changed, 5 insertions(+), 5 deletions(-)

---
base-commit: aaa2f954c21b205a0bcd0961e5b2be4e82e58455
change-id: 20261006-shikra_qce_fix-270b735479ad

Best regards,

Signature · 1 line
Kuldeep Singh <[email protected]>
#1 lore raw

PATCH v2 1/2 dt-bindings: crypto: Correct Shikra QCE compatible hierarchy

Shikra QCE requires an explicit core clock, while the existing "qcom,sm8150-qce" fallback allows the clock property to be omitted.

Shikra follows the same QCE clock requirements as QRB2210(agatti). Update the Shikra fallback to "qcom,ipq4019-qce", which requires the core clock to be specified.

Fixes 45834ff95a6f ("dt-bindings: crypto: qcom-qce: Document the Shikra crypto engine")
---
 Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/crypto/qcom-qce.yaml +2 -1
index 5a653757ee75..fcf725bfa36b 100644
@@ -39,6 +39,7 @@ properties:
               - qcom,msm8996-qce
               - qcom,qcm2290-qce
               - qcom,sdm845-qce
+              - qcom,shikra-qce
               - qcom,sm6115-qce
           - const: qcom,ipq4019-qce
           - const: qcom,qce
@@ -54,7 +55,6 @@ properties:
               - qcom,qcs8300-qce
               - qcom,sa8775p-qce
               - qcom,sc7280-qce
-              - qcom,shikra-qce
               - qcom,sm6350-qce
               - qcom,sm8250-qce
               - qcom,sm8350-qce
@@ -133,6 +133,7 @@ allOf:
           contains:
             enum:
               - qcom,qcm2290-qce
+              - qcom,shikra-qce
               - qcom,sm6115-qce
     then:
       properties:
Signature · 1 line
2.34.1
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: crypto: Correct Shikra QCE compatible hierarchy

Quoted 7 lines · Kuldeep Singh

Shikra QCE requires an explicit core clock, while the existing "qcom,sm8150-qce" fallback allows the clock property to be omitted.

Shikra follows the same QCE clock requirements as QRB2210(agatti). Update the Shikra fallback to "qcom,ipq4019-qce", which requires the core clock to be specified.

Quoted 6 lines
Fixes 45834ff95a6f ("dt-bindings: crypto: qcom-qce: Document the Shikra crypto engine")
---
 Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Best regards,
Krzysztof

#3 lore raw

PATCH v2 2/2 arm64: dts: qcom: shikra: Correct QCE node configuration

In reply to Kuldeep Singh

Shikra QCE requires an explicit core clock, which is missing from the current configuration. Add core clock and adjust fallback compatible to match updated binding description.

Cryptobam is controlled remotely and its clocks are therefore managed by remote crypto subsystem.

Fixes 099cd05d200b ("arm64: dts: qcom: shikra: Add ICE, TRNG and QCE nodes")
---
 arch/arm64/boot/dts/qcom/shikra.dtsi | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/shikra.dtsi +3 -4
index 0a95ad5a5582..d5f0ef863173 100644
@@ -1208,7 +1208,7 @@ cryptobam: dma-controller@1b04000 {
 		};
 
 		crypto: crypto@1b3a000 {
-			compatible = "qcom,shikra-qce", "qcom,sm8150-qce", "qcom,qce";
+			compatible = "qcom,shikra-qce", "qcom,ipq4019-qce", "qcom,qce";
 			reg = <0x0 0x01b3a000 0x0 0x6000>;
 			dmas = <&cryptobam 4>, <&cryptobam 5>;
 			dma-names = "rx", "tx";
@@ -1219,9 +1219,8 @@ crypto: crypto@1b3a000 {
 				 <&apps_smmu 0x96 0x0011>,
 				 <&apps_smmu 0x98 0x0001>,
 				 <&apps_smmu 0x9f 0x0>;
-			interconnects = <&system_noc MASTER_CRYPTO_CORE0 0
-					 &mc_virt SLAVE_EBI_CH0 0>;
-			interconnect-names = "memory";
+			clocks = <&rpmcc RPM_SMD_CE1_CLK>;
+			clock-names = "core";
 		};
 
 		qfprom: efuse@1b44000 {
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH v2 2/2] arm64: dts: qcom: shikra: Correct QCE node configuration

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] arm64: dts: qcom: shikra: unexplained removal of QCE memory interconnect --

Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [Medium] arm64: dts: qcom: shikra: unexplained removal of QCE memory interconnect
--

commit accab4d6610b99099fcb37c8fbe0de4933119ef7
Author: Kuldeep Singh <[email protected]>

arm64: dts: qcom: shikra: Correct QCE node configuration

This commit updates the fallback compatible string and replaces the memory interconnect properties with the core clock in the Shikra QCE device tree node.

Quoted 14 lines
arch/arm64/boot/dts/qcom/shikra.dtsi +1 -1
index 0a95ad5a5582c..d5f0ef863173e 100644
@@ -1208,7 +1208,7 @@ cryptobam: dma-controller@1b04000 {
 		};
 
 		crypto: crypto@1b3a000 {
-			compatible = "qcom,shikra-qce", "qcom,sm8150-qce", "qcom,qce";
+			compatible = "qcom,shikra-qce", "qcom,ipq4019-qce", "qcom,qce";
 			reg = <0x0 0x01b3a000 0x0 0x6000>;
 			dmas = <&cryptobam 4>, <&cryptobam 5>;
 			dma-names = "rx", "tx";

arch/arm64/boot/dts/qcom/shikra.dtsi crypto: crypto@1b3a000 { · line 1224

Quoted 9 lines
arch/arm64/boot/dts/qcom/shikra.dtsi +2 -3
@@ -1219,9 +1219,8 @@ crypto: crypto@1b3a000 {
 				 <&apps_smmu 0x96 0x0011>,
 				 <&apps_smmu 0x98 0x0001>,
 				 <&apps_smmu 0x9f 0x0>;
-			interconnects = <&system_noc MASTER_CRYPTO_CORE0 0
-					 &mc_virt SLAVE_EBI_CH0 0>;
-			interconnect-names = "memory";
+			clocks = <&rpmcc RPM_SMD_CE1_CLK>;
+			clock-names = "core";
 		};

[Severity: Medium]
Was the removal of interconnects and interconnect-names intentional here?

qce_crypto_probe() acquires both the core clock (qce->core) and the "memory" interconnect path (qce->mem_path), and qce_runtime_resume() votes for QCE_DEFAULT_MEM_BANDWIDTH on qce->mem_path alongside enabling qce->core. Without the interconnect properties, the QCE driver no longer scales the MASTER_CRYPTO_CORE0 to SLAVE_EBI_CH0 path during crypto transfers, and the commit message does not mention removing it.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2