* [PATCH v6 0/4] dt-bindings: qcom-qce: Convert bindings to yaml & related changes
@ 2022-09-19 19:56 Bhupesh Sharma
2022-09-19 19:56 ` [PATCH v6 1/4] dt-bindings: qcom-qce: Convert bindings to yaml Bhupesh Sharma
` (3 more replies)
0 siblings, 4 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
Changes since v5:
=================
- v5 can be seen here: https://lore.kernel.org/lkml/20211110105922.217895-1-bhupesh.sharma@linaro.org/
- As per Bjorn's suggestion on irc, broke down the patchset into 4
separate patchsets, one each for the following areas to allow easier
review and handling from the respective maintainer(s):
'arm-msm', 'crypto', 'dma' and 'devicetree'
This patchset is directed for the 'devicetree' tree / area.
- Addressed Rob's, Vladimir's and Bjorn's review comments and Acks received on
v5.
- Added Tested-by from Jordan received on the v5.
- Dropped '[PATCH v5 09/22] dt-bindings: qcom-qce: Move 'clocks' to optional properties'
from this series as per Bjorn's suggestions.
Changes since v4:
=================
- v4 for sm8250 can be seen here: https://lore.kernel.org/linux-arm-msm/20211013105541.68045-1-bhupesh.sharma@linaro.org/
- v1 for sm8150 qce enablement can be seen here: https://lore.kernel.org/linux-arm-msm/20211013165823.88123-1-bhupesh.sharma@linaro.org/
- Merged the sm8150 and sm8250 enablement patches in the same patchset,
as per suggestions from Bjorn.
- Dropped a couple of patches from v4, as these have been picked by
Bjorn already via his tree.
- Addressed review comments from Vladimir, Thara and Rob.
- Collect Reviewed-by from Rob and Thara on some of the patches from the
v4 patchset.
Changes since v3:
=================
- v3 can be seen here: https://lore.kernel.org/linux-arm-msm/20210519143700.27392-1-bhupesh.sharma@linaro.org/
- Dropped a couple of patches from v3, on basis of the review comments:
~ [PATCH 13/17] crypto: qce: core: Make clocks optional
~ [PATCH 15/17] crypto: qce: Convert the device found dev_dbg() to dev_info()
- Addressed review comments from Thara, Rob and Stephan Gerhold.
- Collect Reviewed-by from Rob and Thara on some of the patches from the
v3 patchset.
Changes since v2:
=================
- v2 can be seen here: https://lore.kernel.org/dmaengine/20210505213731.538612-1-bhupesh.sharma@linaro.org/
- Drop a couple of patches from v1, which tried to address the defered
probing of qce driver in case bam dma driver is not yet probed.
Replace it instead with a single (simpler) patch [PATCH 16/17].
- Convert bam dma and qce crypto dt-bindings to YAML.
- Addressed review comments from Thara, Bjorn, Vinod and Rob.
Changes since v1:
=================
- v1 can be seen here: https://lore.kernel.org/linux-arm-msm/20210310052503.3618486-1-bhupesh.sharma@linaro.org/
- v1 did not work well as reported earlier by Dmitry, so v2 contains the following
changes/fixes:
~ Enable the interconnect path b/w BAM DMA and main memory first
before trying to access the BAM DMA registers.
~ Enable the interconnect path b/w qce crytpo and main memory first
before trying to access the qce crypto registers.
~ Make sure to document the required and optional properties for both
BAM DMA and qce crypto drivers.
~ Add a few debug related print messages in case the qce crypto driver
passes or fails to probe.
~ Convert the qce crypto driver probe to a defered one in case the BAM DMA
or the interconnect driver(s) (needed on specific Qualcomm parts) are not
yet probed.
Qualcomm crypto engine (qce) is available on several Snapdragon SoCs.
The qce block supports hardware accelerated algorithms for encryption
and authentication. It also provides support for aes, des, 3des
encryption algorithms and sha1, sha256, hmac(sha1), hmac(sha256)
authentication algorithms.
Cc: thara.gopinath@gmail.com
Cc: robh@kernel.org
Cc: andersson@kernel.org
Cc: krzysztof.kozlowski@linaro.org
Tested-by: Jordan Crouse <jorcrous@amazon.com>
Bhupesh Sharma (4):
dt-bindings: qcom-qce: Convert bindings to yaml
dt-bindings: qcom-qce: Add 'interconnects' and 'interconnect-names'
dt-bindings: qcom-qce: Add 'iommus' to optional properties
dt-bindings: qcom-qce: Add new SoC compatible strings in dt-binding
doc
.../devicetree/bindings/crypto/qcom-qce.txt | 25 -----
.../devicetree/bindings/crypto/qcom-qce.yaml | 93 +++++++++++++++++++
2 files changed, 93 insertions(+), 25 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.txt
create mode 100644 Documentation/devicetree/bindings/crypto/qcom-qce.yaml
--
2.37.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [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
end of thread, other threads:[~2022-09-20 7:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [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
2022-09-20 7:31 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).