[PATCH v1 04/11] dt-bindings: soc: qcom: add binding for qcom,crypto-virt

From: Linlin Zhang

Date: Thu Aug 27 2026 - 12:12:09 EST


From: linlzhan <linlin.zhang@xxxxxxxxxxxxxxxx>

Document the device tree binding for the Qualcomm GVM crypto-virt node,
which provides the wrapped-key buffer size needed by the QCOM_CRYPTO_VIRT
driver to perform hardware-wrapped-key SCM operations backing virtio_blk's
inline crypto layer.

The host does not report this size over virtio, so it is supplied via DT
through the optional qcom,wrapped-key-size property.

Signed-off-by: linlzhan <linlin.zhang@xxxxxxxxxxxxxxxx>
---
.../bindings/soc/qcom/qcom,crypto-virt.yaml | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,crypto-virt.yaml

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,crypto-virt.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,crypto-virt.yaml
new file mode 100644
index 000000000000..5eb204f29762
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,crypto-virt.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/qcom/qcom,crypto-virt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: QCOM GVM Crypto Virt driver
+
+description: |
+ GVM-side hardware-wrapped-key SCM operations backing virtio_blk's inline
+ crypto layer. The host does not report a wrapped key size over virtio, so
+ it is provided here instead.
+
+maintainers:
+ - Linlin Zhang <linlin.zhang@xxxxxxxxxxxxxxxx>
+
+properties:
+ compatible:
+ const: qcom,crypto-virt
+
+ qcom,wrapped-key-size:
+ description: |
+ Size, in bytes, of the hardware-wrapped key generated/prepared/imported
+ via SCM calls.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 64
+ maximum: 128
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ crypto_virt {
+ compatible = "qcom,crypto-virt";
+ qcom,wrapped-key-size = <100>;
+ };
--
2.34.1