arm64: dts: qcom: sm8750: Introduce crypto support for SM8750
Subsystems (6)
cover arm64: dts: qcom: sm8750: Introduce crypto support for SM8750
Document and describe the crypto engines and random number generators on the SM8750 SoC.
---
Gaurav Kashyap (6):
dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine
arm64: dts: qcom: sm8750: Add QCrypto nodes
dt-bindings: crypto: qcom,prng: Document SM8750 RNG
arm64: dts: qcom: sm8750: Add TRNG nodes
dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE
arm64: dts: qcom: sm8750: Add ICE nodes
.../bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + .../devicetree/bindings/crypto/qcom,prng.yaml | 1 + .../devicetree/bindings/crypto/qcom-qce.yaml | 1 + arch/arm64/boot/dts/qcom/sm8750.dtsi | 43 ++++++++++++++++++++++ 4 files changed, 46 insertions(+)
---
base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc
change-id: 20250107-sm8750_crypto_master-12e2fc2fcf32
Best regards,
Signature · 1 line
Melody Olvera <[email protected]>
PATCH 1/6 dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine
From: Gaurav Kashyap <[email protected]>
Document the crypto engine on the SM8750 Platform.
--- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/crypto/qcom-qce.yaml +1 -0
@@ -54,6 +54,7 @@ properties: - qcom,sm8450-qce - qcom,sm8550-qce - qcom,sm8650-qce + - qcom,sm8750-qce - const: qcom,sm8150-qce - const: qcom,qce
Signature · 1 line
2.46.1
Re: [PATCH 1/6] dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine
Quoted 10 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Document the crypto engine on the SM8750 Platform.
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>--- Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 2/6 arm64: dts: qcom: sm8750: Add QCrypto nodes
In reply to Melody OlveraFrom: Gaurav Kashyap <[email protected]>
Add the QCE and Crypto BAM DMA nodes.
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/qcom/sm8750.dtsi +30 -0
@@ -1939,6 +1939,36 @@ mmss_noc: interconnect@1780000 { #interconnect-cells = <2>; }; + cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0"; + reg = <0x0 0x01dc4000 0x0 0x28000>; + + interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; + + #dma-cells = <1>; + + iommus = <&apps_smmu 0x480 0>, + <&apps_smmu 0x481 0>; + + qcom,ee = <0>; + qcom,controlled-remotely; + }; + + crypto: crypto@1dfa000 { + compatible = "qcom,sm8750-qce", "qcom,sm8150-qce", "qcom,qce"; + reg = <0x0 0x01dfa000 0x0 0x6000>; + + interconnects = <&aggre2_noc MASTER_CRYPTO QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "memory"; + + dmas = <&cryptobam 4>, <&cryptobam 5>; + dma-names = "rx", "tx"; + + iommus = <&apps_smmu 0x480 0>, + <&apps_smmu 0x481 0>; + }; + tcsr_mutex: hwlock@1f40000 { compatible = "qcom,tcsr-mutex"; reg = <0x0 0x01f40000 0x0 0x20000>;
Signature · 1 line
2.46.1
Re: [PATCH 2/6] arm64: dts: qcom: sm8750: Add QCrypto nodes
Quoted 18 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Add the QCE and Crypto BAM DMA nodes.
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm64/boot/dts/qcom/sm8750.dtsi +0
-0@@ -1939,6 +1939,36 @@ mmss_noc: interconnect@1780000 { #interconnect-cells = <2>; };
arch/arm64/boot/dts/qcom/sm8750.dtsi mmss_noc: interconnect@1780000 { · line 1951
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +10
-0+ cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0"; + reg = <0x0 0x01dc4000 0x0 0x28000>; + + interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; + + #dma-cells = <1>; + + iommus = <&apps_smmu 0x480 0>, + <&apps_smmu 0x481 0>;
Should be equivalent to iommus = <&apps_smmu 0x480 0x1>?
arch/arm64/boot/dts/qcom/sm8750.dtsi mmss_noc: interconnect@1780000 { · line 1954
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +3
-0+ + qcom,ee = <0>; + qcom,controlled-remotely;
If you don't have clocks here, you need to provide num-channels and qcom,num-ees. Otherwise, there is a risk this will crash if the BAM is not up while being probed.
Thanks,
Stephan
RE: [PATCH 2/6] arm64: dts: qcom: sm8750: Add QCrypto nodes
Quoted 25 lines · Stephan Gerhold
Quoted 13 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Add the QCE and Crypto BAM DMA nodes.
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm64/boot/dts/qcom/sm8750.dtsi +0
-0Quoted 2 lines
index
3bbd7d18598ee0a3a0d5130c03a3166e1fc14d82..1ddb33ea83885e73bf15244c9cbdQuoted 7 lines
7067ae28cded100644arch/arm64/boot/dts/qcom/sm8750.dtsi +0
-0@@ -1939,6 +1939,36 @@ mmss_noc: interconnect@1780000 { #interconnect-cells = <2>; };
Quoted 13 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi mmss_noc: interconnect@1780000 { · line 1951
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +10
-0+ cryptobam: dma-controller@1dc4000 { + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0"; + reg = <0x0 0x01dc4000 0x0 0x28000>; + + interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>; + + #dma-cells = <1>; + + iommus = <&apps_smmu 0x480 0>, + <&apps_smmu 0x481 0>;Should be equivalent to iommus = <
&apps_smmu0x4800x1>?
Hello Stephan, we tried this out internally, and the use case was not functional. The masks are explicitly mentioned in our hardware documents and we are just following that.
So, we are looking to keep it the same.
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi mmss_noc: interconnect@1780000 { · line 1954
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8750.dtsi +3
-0+ + qcom,ee = <0>; + qcom,controlled-remotely;If you don't have clocks here, you need to provide num-channels and qcom,num-ees. Otherwise, there is a risk this will crash if the BAM is not up while being probed.
Ack.
Quoted 2 lines
Thanks,
Stephan
Regards,
Gaurav
PATCH 3/6 dt-bindings: crypto: qcom,prng: Document SM8750 RNG
In reply to Melody OlveraFrom: Gaurav Kashyap <[email protected]>
Document SM8750 compatible for the True Random Number Generator.
--- Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/crypto/qcom,prng.yaml +1 -0
@@ -27,6 +27,7 @@ properties: - qcom,sm8450-trng - qcom,sm8550-trng - qcom,sm8650-trng + - qcom,sm8750-trng - const: qcom,trng reg:
Signature · 1 line
2.46.1
Re: [PATCH 3/6] dt-bindings: crypto: qcom,prng: Document SM8750 RNG
Quoted 10 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Document SM8750 compatible for the True Random Number Generator.
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>--- Documentation/devicetree/bindings/crypto/qcom,prng.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 4/6 arm64: dts: qcom: sm8750: Add TRNG nodes
In reply to Melody OlveraFrom: Gaurav Kashyap <[email protected]>
Add the SM8750 nodes for the True Random Number Generator (TRNG).
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sm8750.dtsi +5 -0
@@ -1883,6 +1883,11 @@ &clk_virt SLAVE_QUP_CORE_1 QCOM_ICC_TAG_ALWAYS>, }; }; + rng: rng@10c3000 { + compatible = "qcom,sm8750-trng", "qcom,trng"; + reg = <0x0 0x010c3000 0x0 0x1000>; + }; + cnoc_main: interconnect@1500000 { compatible = "qcom,sm8750-cnoc-main"; reg = <0x0 0x01500000 0x0 0x16080>;
Signature · 1 line
2.46.1
PATCH 5/6 dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE
In reply to Melody OlveraFrom: Gaurav Kashyap <[email protected]>
Document the Inline Crypto Engine (ICE) on the SM8750 Platform.
--- Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml +1 -0
@@ -20,6 +20,7 @@ properties: - qcom,sm8450-inline-crypto-engine - qcom,sm8550-inline-crypto-engine - qcom,sm8650-inline-crypto-engine + - qcom,sm8750-inline-crypto-engine - const: qcom,inline-crypto-engine reg:
Signature · 1 line
2.46.1
Re: [PATCH 5/6] dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE
Quoted 10 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Document the Inline Crypto Engine (ICE) on the SM8750 Platform.
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>--- Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 6/6 arm64: dts: qcom: sm8750: Add ICE nodes
In reply to Melody OlveraFrom: Gaurav Kashyap <[email protected]>
Add the SM8750 nodes for the UFS Inline Crypto Engine (ICE).
--- arch/arm64/boot/dts/qcom/sm8750.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/qcom/sm8750.dtsi +8 -0
@@ -1944,6 +1944,14 @@ mmss_noc: interconnect@1780000 { #interconnect-cells = <2>; }; + ice: crypto@1d88000 { + compatible = "qcom,sm8750-inline-crypto-engine", + "qcom,inline-crypto-engine"; + reg = <0x0 0x01d88000 0x0 0x18000>; + + clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; + }; + cryptobam: dma-controller@1dc4000 { compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0"; reg = <0x0 0x01dc4000 0x0 0x28000>;
Signature · 1 line
2.46.1
Re: [PATCH 6/6] arm64: dts: qcom: sm8750: Add ICE nodes
Quoted 7 lines · Melody Olvera
From: Gaurav Kashyap <[email protected]>
Add the SM8750 nodes for the UFS Inline Crypto Engine (ICE).
Signed-off-by Gaurav Kashyap <[email protected]>Signed-off-by Melody Olvera <[email protected]>---
Konrad
Herbert Xu
maintainerQuoted 18 lines · Melody Olvera
Document and describe the crypto engines and random number generators on the SM8750 SoC.
Signed-off-by Melody Olvera <[email protected]>---
Gaurav Kashyap (6):
dt-bindings: crypto: qcom-qce: Document the SM8750 crypto engine
arm64: dts: qcom: sm8750: Add QCrypto nodes
dt-bindings: crypto: qcom,prng: Document SM8750 RNG
arm64: dts: qcom: sm8750: Add TRNG nodes
dt-bindings: crypto: qcom,inline-crypto-engine: Document the SM8750 ICE
arm64: dts: qcom: sm8750: Add ICE nodes.../bindings/crypto/qcom,inline-crypto-engine.yaml | 1 + .../devicetree/bindings/crypto/qcom,prng.yaml | 1 + .../devicetree/bindings/crypto/qcom-qce.yaml | 1 + arch/arm64/boot/dts/qcom/sm8750.dtsi | 43 ++++++++++++++++++++++ 4 files changed, 46 insertions(+)
Quoted 7 lines
---
base-commit:37136bf5c3a6f6b686d74f41837a6406bec6b7bc
change-id: 20250107-sm8750_crypto_master-12e2fc2fcf32Best regards,
Signature · 1 line
Melody Olvera <[email protected]>
Patches 1/3/5 applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: (subset) [PATCH 0/6] arm64: dts: qcom: sm8750: Introduce crypto support for SM8750
In reply to Melody OlveraQuoted 4 lines · Melody Olvera
Document and describe the crypto engines and random number generators on the SM8750 SoC.
Applied, thanks!
[2/6] arm64: dts: qcom: sm8750: Add QCrypto nodes
commit: eeb0f3e4ea67cb1c2dd7cacfef218bfa0ae56970
[4/6] arm64: dts: qcom: sm8750: Add TRNG nodes
commit: 9f9dcac2f85e6a0641a4a4f7f3b2c35a984ed4cc
[6/6] arm64: dts: qcom: sm8750: Add ICE nodes
commit: b1dac789c650a20a54d5089b23fbb800fb289b8bBest regards,
Signature · 1 line
Bjorn Andersson <[email protected]>