* [PATCH v7 01/11] dt-bindings: dma: Add support for SM6115 and QCM2290 SoCs
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 02/11] dt-bindings: dma: Increase iommu maxItems for BAM DMA Bhupesh Sharma
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Rob Herring, Anders Roxell, Linux Kernel Functional Testing
Add new compatible for BAM DMA engine version v1.7.4 which is
found on Qualcomm SM6115 and QCM2290 SoCs. Since its very similar
to v1.7.0 used on SM8150 like SoCs, mark the comptible scheme
accordingly.
While at it, also update qcom,bam-dma bindings to add comments
which describe the BAM DMA versions used in SM8150 and SM8250 SoCs.
This provides an easy reference for identifying the actual BAM DMA
version available on Qualcomm SoCs.
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
.../devicetree/bindings/dma/qcom,bam-dma.yaml | 20 ++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
index f1ddcf672261..c663b6102f50 100644
--- a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
@@ -15,13 +15,19 @@ allOf:
properties:
compatible:
- enum:
- # APQ8064, IPQ8064 and MSM8960
- - qcom,bam-v1.3.0
- # MSM8974, APQ8074 and APQ8084
- - qcom,bam-v1.4.0
- # MSM8916 and SDM845
- - qcom,bam-v1.7.0
+ oneOf:
+ - enum:
+ # APQ8064, IPQ8064 and MSM8960
+ - qcom,bam-v1.3.0
+ # MSM8974, APQ8074 and APQ8084
+ - qcom,bam-v1.4.0
+ # MSM8916, SDM630
+ - qcom,bam-v1.7.0
+ - items:
+ - enum:
+ # SDM845, SM6115, SM8150, SM8250 and QCM2290
+ - qcom,bam-v1.7.4
+ - const: qcom,bam-v1.7.0
clocks:
maxItems: 1
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 02/11] dt-bindings: dma: Increase iommu maxItems for BAM DMA
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 01/11] dt-bindings: dma: Add support for SM6115 and QCM2290 SoCs Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 03/11] arm64: dts: qcom: sdm8550: Fix the BAM DMA engine compatible string Bhupesh Sharma
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
Since SM8450 BAM DMA engine supports five iommu entries,
increase the maxItems in the iommu property section, without
which 'dtbs_check' reports the following error:
arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx224.dtb:
dma-controller@1dc4000: iommus: is too long
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
index c663b6102f50..5636d38f712a 100644
--- a/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,bam-dma.yaml
@@ -44,7 +44,7 @@ properties:
iommus:
minItems: 1
- maxItems: 4
+ maxItems: 5
num-channels:
$ref: /schemas/types.yaml#/definitions/uint32
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 03/11] arm64: dts: qcom: sdm8550: Fix the BAM DMA engine compatible string
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 01/11] dt-bindings: dma: Add support for SM6115 and QCM2290 SoCs Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 02/11] dt-bindings: dma: Increase iommu maxItems for BAM DMA Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 04/11] arm64: dts: qcom: sdm845: Fix the slimbam " Bhupesh Sharma
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
As per documentation, Qualcomm SM8550 SoC supports BAM DMA
engine v1.7.4, so use the correct compatible strings.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 6e9bad8f6f33..e477ea391e93 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -1839,7 +1839,7 @@ pcie1_phy: phy@1c0e000 {
};
cryptobam: dma-controller@1dc4000 {
- compatible = "qcom,bam-v1.7.0";
+ 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>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 04/11] arm64: dts: qcom: sdm845: Fix the slimbam DMA engine compatible string
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (2 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 03/11] arm64: dts: qcom: sdm8550: Fix the BAM DMA engine compatible string Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 05/11] dt-bindings: qcom-qce: Fix compatible combinations for SM8150 and IPQ4019 SoCs Bhupesh Sharma
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
As per documentation, Qualcomm SDM845 SoC supports SLIMBAM DMA
engine v1.7.4, so use the correct compatible strings.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 90424442bb4a..4d768e09d62d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -5212,7 +5212,7 @@ msi-controller@17a40000 {
};
slimbam: dma-controller@17184000 {
- compatible = "qcom,bam-v1.7.0";
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
qcom,controlled-remotely;
reg = <0 0x17184000 0 0x2a000>;
num-channels = <31>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 05/11] dt-bindings: qcom-qce: Fix compatible combinations for SM8150 and IPQ4019 SoCs
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (3 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 04/11] arm64: dts: qcom: sdm845: Fix the slimbam " Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 06/11] dt-bindings: qcom-qce: Add compatibles for SM6115 and QCM2290 Bhupesh Sharma
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Rob Herring, Anders Roxell, Linux Kernel Functional Testing
Currently the compatible list available in 'qce' dt-bindings does not
support SM8150 and IPQ4019 SoCs directly which may lead to potential
'dtbs_check' error(s).
Fix the same.
Fixes: 00f3bc2db351 ("dt-bindings: qcom-qce: Add new SoC compatible strings for Qualcomm QCE IP")
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index e375bd981300..90ddf98a6df9 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -24,6 +24,12 @@ properties:
deprecated: true
description: Kept only for ABI backward compatibility
+ - items:
+ - enum:
+ - qcom,ipq4019-qce
+ - qcom,sm8150-qce
+ - const: qcom,qce
+
- items:
- enum:
- qcom,ipq6018-qce
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 06/11] dt-bindings: qcom-qce: Add compatibles for SM6115 and QCM2290
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (4 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 05/11] dt-bindings: qcom-qce: Fix compatible combinations for SM8150 and IPQ4019 SoCs Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support Bhupesh Sharma
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
The core clock for the Crypto Engine block on Qualcomm SoCs SM6115 and
QCM2290 are provided via the RPM block.
So mark the compatibles for these SoCs to indicate that only 'core'
clock is required for such SoCs.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
.../devicetree/bindings/crypto/qcom-qce.yaml | 44 +++++++++++++++----
1 file changed, 35 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index 90ddf98a6df9..bb828068c3b8 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -35,7 +35,9 @@ properties:
- qcom,ipq6018-qce
- qcom,ipq8074-qce
- qcom,msm8996-qce
+ - qcom,qcm2290-qce
- qcom,sdm845-qce
+ - qcom,sm6115-qce
- const: qcom,ipq4019-qce
- const: qcom,qce
@@ -52,16 +54,12 @@ properties:
maxItems: 1
clocks:
- items:
- - description: iface clocks register interface.
- - description: bus clocks data transfer interface.
- - description: core clocks rest of the crypto block.
+ minItems: 1
+ maxItems: 3
clock-names:
- items:
- - const: iface
- - const: bus
- - const: core
+ minItems: 1
+ maxItems: 3
iommus:
minItems: 1
@@ -95,9 +93,37 @@ allOf:
enum:
- qcom,crypto-v5.1
- qcom,crypto-v5.4
- - qcom,ipq4019-qce
+ - qcom,ipq6018-qce
+ - qcom,ipq8074-qce
+ - qcom,msm8996-qce
+ - qcom,sdm845-qce
+ then:
+ properties:
+ clocks:
+ maxItems: 3
+ clock-names:
+ items:
+ - const: iface
+ - const: bus
+ - const: core
+ required:
+ - clocks
+ - clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,qcm2290-qce
+ - qcom,sm6115-qce
then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ items:
+ - const: core
required:
- clocks
- clock-names
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (5 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 06/11] dt-bindings: qcom-qce: Add compatibles for SM6115 and QCM2290 Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-24 18:23 ` Stephan Gerhold
2023-05-19 21:48 ` [PATCH v7 08/11] arm64: dts: qcom: sm8150: " Bhupesh Sharma
` (3 subsequent siblings)
10 siblings, 1 reply; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
Add crypto engine (CE) and CE BAM related nodes and definitions to
'sm6115.dtsi'.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6115.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
index 631ca327e064..27ff42cf6066 100644
--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
@@ -661,6 +661,31 @@ usb_hsphy: phy@1613000 {
status = "disabled";
};
+ cryptobam: dma-controller@1b04000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0x0 0x01b04000 0x0 0x24000>;
+ interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ num-channels = <8>;
+ qcom,num-ees = <2>;
+ iommus = <&apps_smmu 0x94 0x11>,
+ <&apps_smmu 0x96 0x11>;
+ };
+
+ crypto: crypto@1b3a000 {
+ compatible = "qcom,sm6115-qce", "qcom,ipq4019-qce", "qcom,qce";
+ reg = <0x0 0x01b3a000 0x0 0x6000>;
+ clocks = <&rpmcc RPM_SMD_CE1_CLK>;
+ clock-names = "core";
+
+ dmas = <&cryptobam 6>, <&cryptobam 7>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x94 0x11>,
+ <&apps_smmu 0x96 0x11>;
+ };
+
qfprom@1b40000 {
compatible = "qcom,sm6115-qfprom", "qcom,qfprom";
reg = <0x0 0x01b40000 0x0 0x7000>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support
2023-05-19 21:48 ` [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support Bhupesh Sharma
@ 2023-05-24 18:23 ` Stephan Gerhold
2023-05-26 18:05 ` Bhupesh Sharma
0 siblings, 1 reply; 14+ messages in thread
From: Stephan Gerhold @ 2023-05-24 18:23 UTC (permalink / raw)
To: Bhupesh Sharma
Cc: linux-arm-msm, devicetree, agross, linux-kernel, linux-crypto,
andersson, bhupesh.linux, krzysztof.kozlowski, robh+dt,
konrad.dybcio, vladimir.zapolskiy, rfoss, neil.armstrong, djakov,
Anders Roxell, Linux Kernel Functional Testing
On Sat, May 20, 2023 at 03:18:09AM +0530, Bhupesh Sharma wrote:
> Add crypto engine (CE) and CE BAM related nodes and definitions to
> 'sm6115.dtsi'.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Tested-by: Anders Roxell <anders.roxell@linaro.org>
> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sm6115.dtsi | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> index 631ca327e064..27ff42cf6066 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> @@ -661,6 +661,31 @@ usb_hsphy: phy@1613000 {
> status = "disabled";
> };
>
> + cryptobam: dma-controller@1b04000 {
> + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
> + reg = <0x0 0x01b04000 0x0 0x24000>;
> + interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
> + #dma-cells = <1>;
> + qcom,ee = <0>;
> + qcom,controlled-remotely;
> + num-channels = <8>;
> + qcom,num-ees = <2>;
I would also add the RPM_SMD_CE1_CLK clock here and then omit
"num-channels" and "qcom,num-ees" (with [1]). It's not strictly
necessary but will guarantee that the clock is running whenever the BAM
is accessed (potentially avoiding crashes). And it seems to be the
typical approach so far, see e.g. sdm845. RPMH_CE_CLK is used on both
&cryptobam and &crypto there.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/commit/?id=8975dd41a9dbca3b47f7b8dac5bc4dfb23011000
Thanks,
Stephan
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support
2023-05-24 18:23 ` Stephan Gerhold
@ 2023-05-26 18:05 ` Bhupesh Sharma
0 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-26 18:05 UTC (permalink / raw)
To: Stephan Gerhold
Cc: linux-arm-msm, devicetree, agross, linux-kernel, linux-crypto,
andersson, bhupesh.linux, krzysztof.kozlowski, robh+dt,
konrad.dybcio, vladimir.zapolskiy, rfoss, neil.armstrong, djakov,
Anders Roxell, Linux Kernel Functional Testing
On Wed, 24 May 2023 at 23:53, Stephan Gerhold <stephan@gerhold.net> wrote:
>
> On Sat, May 20, 2023 at 03:18:09AM +0530, Bhupesh Sharma wrote:
> > Add crypto engine (CE) and CE BAM related nodes and definitions to
> > 'sm6115.dtsi'.
> >
> > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > Tested-by: Anders Roxell <anders.roxell@linaro.org>
> > Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> > arch/arm64/boot/dts/qcom/sm6115.dtsi | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> > index 631ca327e064..27ff42cf6066 100644
> > --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi
> > @@ -661,6 +661,31 @@ usb_hsphy: phy@1613000 {
> > status = "disabled";
> > };
> >
> > + cryptobam: dma-controller@1b04000 {
> > + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
> > + reg = <0x0 0x01b04000 0x0 0x24000>;
> > + interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
> > + #dma-cells = <1>;
> > + qcom,ee = <0>;
> > + qcom,controlled-remotely;
> > + num-channels = <8>;
> > + qcom,num-ees = <2>;
>
> I would also add the RPM_SMD_CE1_CLK clock here and then omit
> "num-channels" and "qcom,num-ees" (with [1]). It's not strictly
> necessary but will guarantee that the clock is running whenever the BAM
> is accessed (potentially avoiding crashes). And it seems to be the
> typical approach so far, see e.g. sdm845. RPMH_CE_CLK is used on both
> &cryptobam and &crypto there.
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/commit/?id=8975dd41a9dbca3b47f7b8dac5bc4dfb23011000
Sure, I have fixed this in v8 which I will post shortly.
Thanks,
Bhupesh
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v7 08/11] arm64: dts: qcom: sm8150: Add Crypto Engine support
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (6 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 07/11] arm64: dts: qcom: sm6115: Add Crypto Engine support Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 09/11] arm64: dts: qcom: sm8250: " Bhupesh Sharma
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
Add crypto engine (CE) and CE BAM related nodes and definitions to
'sm8150.dtsi'.
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8150.dtsi | 30 ++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 2c377d7bb3a2..2a5b2b99968a 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -2085,6 +2085,36 @@ ufs_mem_phy_lanes: phy@1d87400 {
};
};
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0 0x01dc4000 0 0x24000>;
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ num-channels = <8>;
+ qcom,num-ees = <2>;
+ iommus = <&apps_smmu 0x502 0x0641>,
+ <&apps_smmu 0x504 0x0011>,
+ <&apps_smmu 0x506 0x0011>,
+ <&apps_smmu 0x508 0x0011>,
+ <&apps_smmu 0x512 0x0000>;
+ };
+
+ crypto: crypto@1dfa000 {
+ compatible = "qcom,sm8150-qce", "qcom,qce";
+ reg = <0 0x01dfa000 0 0x6000>;
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x502 0x0641>,
+ <&apps_smmu 0x504 0x0011>,
+ <&apps_smmu 0x506 0x0011>,
+ <&apps_smmu 0x508 0x0011>,
+ <&apps_smmu 0x512 0x0000>;
+ interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>;
+ interconnect-names = "memory";
+ };
+
tcsr_mutex: hwlock@1f40000 {
compatible = "qcom,tcsr-mutex";
reg = <0x0 0x01f40000 0x0 0x20000>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 09/11] arm64: dts: qcom: sm8250: Add Crypto Engine support
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (7 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 08/11] arm64: dts: qcom: sm8150: " Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 10/11] arm64: dts: qcom: sm8350: " Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 11/11] arm64: dts: qcom: sm8450: add crypto nodes Bhupesh Sharma
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
Add crypto engine (CE) and CE BAM related nodes and definitions to
'sm8250.dtsi'.
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Co-developed-by and Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8250.dtsi | 32 ++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 7bea916900e2..79fad917d142 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -2232,6 +2232,38 @@ ufs_mem_phy_lanes: phy@1d87400 {
};
};
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0 0x01dc4000 0 0x24000>;
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ num-channels = <8>;
+ qcom,num-ees = <2>;
+ iommus = <&apps_smmu 0x592 0x0000>,
+ <&apps_smmu 0x598 0x0000>,
+ <&apps_smmu 0x599 0x0000>,
+ <&apps_smmu 0x59f 0x0000>,
+ <&apps_smmu 0x586 0x0011>,
+ <&apps_smmu 0x596 0x0011>;
+ };
+
+ crypto: crypto@1dfa000 {
+ compatible = "qcom,sm8250-qce", "qcom,sm8150-qce", "qcom,qce";
+ reg = <0 0x01dfa000 0 0x6000>;
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x592 0x0000>,
+ <&apps_smmu 0x598 0x0000>,
+ <&apps_smmu 0x599 0x0000>,
+ <&apps_smmu 0x59f 0x0000>,
+ <&apps_smmu 0x586 0x0011>,
+ <&apps_smmu 0x596 0x0011>;
+ interconnects = <&aggre2_noc MASTER_CRYPTO_CORE_0 &mc_virt SLAVE_EBI_CH0>;
+ interconnect-names = "memory";
+ };
+
tcsr_mutex: hwlock@1f40000 {
compatible = "qcom,tcsr-mutex";
reg = <0x0 0x01f40000 0x0 0x40000>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 10/11] arm64: dts: qcom: sm8350: Add Crypto Engine support
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (8 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 09/11] arm64: dts: qcom: sm8250: " Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
2023-05-19 21:48 ` [PATCH v7 11/11] arm64: dts: qcom: sm8450: add crypto nodes Bhupesh Sharma
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
Add crypto engine (CE) and CE BAM related nodes and definitions to
'sm8350.dtsi'.
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Co-developed-by and Signed-off-by: Robert Foss <rfoss@kernel.org>
[Bhupesh: Switch to '#interconnect-cells = <2>', available since commit 4f287e31ff5f]
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8350.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index ebcb481571c2..d00542f29dc8 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -1726,6 +1726,28 @@ ufs_mem_phy_lanes: phy@1d87400 {
};
};
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0 0x01dc4000 0 0x24000>;
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ iommus = <&apps_smmu 0x594 0x0011>,
+ <&apps_smmu 0x596 0x0011>;
+ };
+
+ crypto: crypto@1dfa000 {
+ compatible = "qcom,sm8350-qce", "qcom,sm8150-qce", "qcom,qce";
+ reg = <0 0x01dfa000 0 0x6000>;
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x594 0x0011>,
+ <&apps_smmu 0x596 0x0011>;
+ interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
+ interconnect-names = "memory";
+ };
+
ipa: ipa@1e40000 {
compatible = "qcom,sm8350-ipa";
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCH v7 11/11] arm64: dts: qcom: sm8450: add crypto nodes
2023-05-19 21:48 [PATCH v7 00/11] arm64: qcom: Enable Crypto Engine for a few Qualcomm SoCs Bhupesh Sharma
` (9 preceding siblings ...)
2023-05-19 21:48 ` [PATCH v7 10/11] arm64: dts: qcom: sm8350: " Bhupesh Sharma
@ 2023-05-19 21:48 ` Bhupesh Sharma
10 siblings, 0 replies; 14+ messages in thread
From: Bhupesh Sharma @ 2023-05-19 21:48 UTC (permalink / raw)
To: linux-arm-msm, devicetree
Cc: agross, linux-kernel, linux-crypto, andersson, bhupesh.sharma,
bhupesh.linux, krzysztof.kozlowski, robh+dt, konrad.dybcio,
vladimir.zapolskiy, rfoss, neil.armstrong, djakov, stephan,
Anders Roxell, Linux Kernel Functional Testing
From: Neil Armstrong <neil.armstrong@linaro.org>
Add crypto engine (CE) and CE BAM related nodes and definitions
for the SM8450 SoC.
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
[Bhupesh: Corrected the compatible list]
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 595533aeafc4..1c65f7dc67f2 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -4138,6 +4138,34 @@ ufs_mem_phy_lanes: phy@1d87400 {
};
};
+ cryptobam: dma-controller@1dc4000 {
+ compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0";
+ reg = <0 0x01dc4000 0 0x28000>;
+ interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ qcom,ee = <0>;
+ qcom,controlled-remotely;
+ iommus = <&apps_smmu 0x584 0x11>,
+ <&apps_smmu 0x588 0x0>,
+ <&apps_smmu 0x598 0x5>,
+ <&apps_smmu 0x59a 0x0>,
+ <&apps_smmu 0x59f 0x0>;
+ };
+
+ crypto: crypto@1de0000 {
+ compatible = "qcom,sm8450-qce", "qcom,sm8150-qce", "qcom,qce";
+ reg = <0 0x01dfa000 0 0x6000>;
+ dmas = <&cryptobam 4>, <&cryptobam 5>;
+ dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x584 0x11>,
+ <&apps_smmu 0x588 0x0>,
+ <&apps_smmu 0x598 0x5>,
+ <&apps_smmu 0x59a 0x0>,
+ <&apps_smmu 0x59f 0x0>;
+ interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
+ interconnect-names = "memory";
+ };
+
sdhc_2: mmc@8804000 {
compatible = "qcom,sm8450-sdhci", "qcom,sdhci-msm-v5";
reg = <0 0x08804000 0 0x1000>;
--
2.38.1
^ permalink raw reply related [flat|nested] 14+ messages in thread