* [PATCH v6 1/4] dt-bindings: qcom-qce: Convert bindings to yaml
2022-09-19 19:56 [PATCH v6 0/4] dt-bindings: qcom-qce: Convert bindings to yaml & related changes Bhupesh Sharma
@ 2022-09-19 19:56 ` Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 2/4] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Bhupesh Sharma
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-19 19:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: agross, robh+dt, linux-arm-msm, thara.gopinath, robh,
krzysztof.kozlowski, andersson, bhupesh.sharma, bhupesh.linux,
Jordan Crouse
Convert Qualcomm QCE crypto devicetree binding to YAML.
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Tested-by: Jordan Crouse <jorcrous@amazon.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
.../devicetree/bindings/crypto/qcom-qce.txt | 25 -------
.../devicetree/bindings/crypto/qcom-qce.yaml | 67 +++++++++++++++++++
2 files changed, 67 insertions(+), 25 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.txt
create mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.yaml
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.txt b/Documentation/devicetree/bindings/crypto/qcom-qce.txt
deleted file mode 100644
index fdd53b184ba8..000000000000
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Qualcomm crypto engine driver
-
-Required properties:
-
-- compatible : should be "qcom,crypto-v5.1"
-- reg : specifies base physical address and size of the registers map
-- clocks : phandle to clock-controller plus clock-specifier pair
-- clock-names : "iface" clocks register interface
- "bus" clocks data transfer interface
- "core" clocks rest of the crypto block
-- dmas : DMA specifiers for tx and rx dma channels. For more see
- Documentation/devicetree/bindings/dma/dma.txt
-- dma-names : DMA request names should be "rx" and "tx"
-
-Example:
- crypto@fd45a000 {
- compatible = "qcom,crypto-v5.1";
- reg = <0xfd45a000 0x6000>;
- clocks = <&gcc GCC_CE2_AHB_CLK>,
- <&gcc GCC_CE2_AXI_CLK>,
- <&gcc GCC_CE2_CLK>;
- clock-names = "iface", "bus", "core";
- dmas = <&cryptobam 2>, <&cryptobam 3>;
- dma-names = "rx", "tx";
- };
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
new file mode 100644
index 000000000000..8df47e8513b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/crypto/qcom-qce.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm crypto engine driver
+
+maintainers:
+ - Bhupesh Sharma <bhupesh.sharma@linaro.org>
+
+description:
+ This document defines the binding for the QCE crypto
+ controller found on Qualcomm parts.
+
+properties:
+ compatible:
+ const: qcom,crypto-v5.1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: iface clocks register interface.
+ - description: bus clocks data transfer interface.
+ - description: core clocks rest of the crypto block.
+
+ clock-names:
+ items:
+ - const: iface
+ - const: bus
+ - const: core
+
+ dmas:
+ items:
+ - description: DMA specifiers for rx dma channel.
+ - description: DMA specifiers for tx dma channel.
+
+ dma-names:
+ items:
+ - const: rx
+ - const: tx
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - dmas
+ - dma-names
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-apq8084.h>
+ crypto-engine@fd45a000 {
+ compatible = "qcom,crypto-v5.1";
+ reg = <0xfd45a000 0x6000>;
+ clocks = <&gcc GCC_CE2_AHB_CLK>,
+ <&gcc GCC_CE2_AXI_CLK>,
+ <&gcc GCC_CE2_CLK>;
+ clock-names = "iface", "bus", "core";
+ dmas = <&cryptobam 2>, <&cryptobam 3>;
+ dma-names = "rx", "tx";
+ };
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v6 2/4] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names'
2022-09-19 19:56 [PATCH v6 0/4] dt-bindings: qcom-qce: Convert bindings to yaml & related changes Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 1/4] dt-bindings: qcom-qce: Convert bindings to yaml Bhupesh Sharma
@ 2022-09-19 19:56 ` Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 3/4] dt-bindings: qcom-qce: Add 'iommus' to optional properties Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 4/4] dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding doc Bhupesh Sharma
3 siblings, 0 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-19 19:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: agross, robh+dt, linux-arm-msm, thara.gopinath, robh,
krzysztof.kozlowski, andersson, bhupesh.sharma, bhupesh.linux,
Jordan Crouse
Add 'interconnects' and 'interconnect-names' as optional properties
to the device-tree binding documentation for Qualcomm crypto IP.
These properties describe the interconnect path between crypto and main
memory and the interconnect type respectively.
Cc: Bjorn Andersson <andersson@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Jordan Crouse <jorcrous@amazon.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index 8df47e8513b8..94f96ebc5dac 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -32,6 +32,14 @@ properties:
- const: bus
- const: core
+ interconnects:
+ maxItems: 1
+ description:
+ Interconnect path between qce crypto and main memory.
+
+ interconnect-names:
+ const: memory
+
dmas:
items:
- description: DMA specifiers for rx dma channel.
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v6 3/4] dt-bindings: qcom-qce: Add 'iommus' to optional properties
2022-09-19 19:56 [PATCH v6 0/4] dt-bindings: qcom-qce: Convert bindings to yaml & related changes Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 1/4] dt-bindings: qcom-qce: Convert bindings to yaml Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 2/4] dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names' Bhupesh Sharma
@ 2022-09-19 19:56 ` Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 4/4] dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding doc Bhupesh Sharma
3 siblings, 0 replies; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-19 19:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: agross, robh+dt, linux-arm-msm, thara.gopinath, robh,
krzysztof.kozlowski, andersson, bhupesh.sharma, bhupesh.linux,
Jordan Crouse
Add the missing optional property - 'iommus' to the
device-tree binding documentation for qcom-qce crypto IP.
This property describes the iommu streams for crypto pipes.
Cc: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Jordan Crouse <jorcrous@amazon.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
Documentation/devicetree/bindings/crypto/qcom-qce.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index 94f96ebc5dac..4e00e7925fed 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -32,6 +32,12 @@ properties:
- const: bus
- const: core
+ iommus:
+ minItems: 1
+ maxItems: 8
+ description:
+ phandle to apps_smmu node with sid mask.
+
interconnects:
maxItems: 1
description:
@@ -72,4 +78,8 @@ examples:
clock-names = "iface", "bus", "core";
dmas = <&cryptobam 2>, <&cryptobam 3>;
dma-names = "rx", "tx";
+ iommus = <&apps_smmu 0x584 0x0011>,
+ <&apps_smmu 0x586 0x0011>,
+ <&apps_smmu 0x594 0x0011>,
+ <&apps_smmu 0x596 0x0011>;
};
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v6 4/4] dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding doc
2022-09-19 19:56 [PATCH v6 0/4] dt-bindings: qcom-qce: Convert bindings to yaml & related changes Bhupesh Sharma
` (2 preceding siblings ...)
2022-09-19 19:56 ` [PATCH v6 3/4] dt-bindings: qcom-qce: Add 'iommus' to optional properties Bhupesh Sharma
@ 2022-09-19 19:56 ` Bhupesh Sharma
2022-09-20 7:31 ` Krzysztof Kozlowski
3 siblings, 1 reply; 6+ messages in thread
From: Bhupesh Sharma @ 2022-09-19 19:56 UTC (permalink / raw)
To: linux-kernel, devicetree
Cc: agross, robh+dt, linux-arm-msm, thara.gopinath, robh,
krzysztof.kozlowski, andersson, bhupesh.sharma, bhupesh.linux,
Jordan Crouse
Newer Qualcomm chips support newer versions of the qce crypto IP, so add
soc specific compatible strings for qcom-qce instead of using crypto
IP version specific ones.
Keep the old strings for backward-compatibility, but mark them as
deprecated.
Cc: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Jordan Crouse <jorcrous@amazon.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
.../devicetree/bindings/crypto/qcom-qce.yaml | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
index 4e00e7925fed..aa2f676f5382 100644
--- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
@@ -15,7 +15,15 @@ description:
properties:
compatible:
- const: qcom,crypto-v5.1
+ enum:
+ - qcom,crypto-v5.1 # Deprecated. Kept only for backward compatibility
+ - qcom,ipq6018-qce
+ - qcom,ipq8074-qce
+ - qcom,msm8996-qce
+ - qcom,sdm845-qce
+ - qcom,sm8150-qce
+ - qcom,sm8250-qce
+ - qcom,sm8350-qce
reg:
maxItems: 1
@@ -70,7 +78,7 @@ examples:
- |
#include <dt-bindings/clock/qcom,gcc-apq8084.h>
crypto-engine@fd45a000 {
- compatible = "qcom,crypto-v5.1";
+ compatible = "qcom,ipq6018-qce";
reg = <0xfd45a000 0x6000>;
clocks = <&gcc GCC_CE2_AHB_CLK>,
<&gcc GCC_CE2_AXI_CLK>,
--
2.37.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v6 4/4] dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding doc
2022-09-19 19:56 ` [PATCH v6 4/4] dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding doc Bhupesh Sharma
@ 2022-09-20 7:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-20 7:31 UTC (permalink / raw)
To: Bhupesh Sharma, linux-kernel, devicetree
Cc: agross, robh+dt, linux-arm-msm, thara.gopinath, robh, andersson,
bhupesh.linux, Jordan Crouse
On 19/09/2022 21:56, Bhupesh Sharma wrote:
> Newer Qualcomm chips support newer versions of the qce crypto IP, so add
> soc specific compatible strings for qcom-qce instead of using crypto
> IP version specific ones.
>
> Keep the old strings for backward-compatibility, but mark them as
> deprecated.
>
> Cc: Bjorn Andersson <andersson@kernel.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Tested-by: Jordan Crouse <jorcrous@amazon.com>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
> .../devicetree/bindings/crypto/qcom-qce.yaml | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> index 4e00e7925fed..aa2f676f5382 100644
> --- a/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> +++ b/Documentation/devicetree/bindings/crypto/qcom-qce.yaml
> @@ -15,7 +15,15 @@ description:
>
> properties:
> compatible:
> - const: qcom,crypto-v5.1
> + enum:
> + - qcom,crypto-v5.1 # Deprecated. Kept only for backward compatibility
deprecated:true in its own oneOf entry (see other examples).
> + - qcom,ipq6018-qce
> + - qcom,ipq8074-qce
> + - qcom,msm8996-qce
> + - qcom,sdm845-qce
> + - qcom,sm8150-qce
> + - qcom,sm8250-qce
> + - qcom,sm8350-qce
Entire change is not backwards compatible thus not bisectable and not
ABI-safe.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread