Some Qualcomm SoCs, such as Shikra, run the modem in a separate security domain with restricted access to system memory. BAM-DMUX DMA mappings must therefore be constrained to a designated region that can be shared with the modem. Add an optional memory-region property to reference a restricted DMA pool used for BAM-DMUX mappings, and a qcom,vmid property to identify the remote execution environment that is granted access to the pool through SCM. Require memory-region whenever qcom,vmid is specified. Add the qcom,shikra-bam-dmux compatible, with qcom,bam-dmux as fallback, and require both properties for it. Co-developed-by: Deepak Kumar Singh Signed-off-by: Deepak Kumar Singh Signed-off-by: Vishnu Santhosh Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/net/qcom,bam-dmux.yaml | 36 +++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml index 33746c238513d72366bc52359fb10f275475b331..f7388d24c8612b5a99d5d0e66cfbe2de3b1c9e0d 100644 --- a/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml +++ b/Documentation/devicetree/bindings/net/qcom,bam-dmux.yaml @@ -22,7 +22,11 @@ description: | properties: compatible: - const: qcom,bam-dmux + oneOf: + - const: qcom,bam-dmux + - items: + - const: qcom,shikra-bam-dmux + - const: qcom,bam-dmux interrupts: description: @@ -72,6 +76,22 @@ properties: - const: tx - const: rx + memory-region: + maxItems: 1 + description: + Phandle to a reserved-memory node compatible with restricted-dma-pool. + The BAM-DMUX device uses the pool for DMA mappings. + + qcom,vmid: + $ref: /schemas/types.yaml#/definitions/uint32-array + maxItems: 1 + items: + minimum: 1 + maximum: 63 + description: + VMID of the remote execution environment that is granted access to the + restricted DMA pool through SCM. + required: - compatible - interrupts @@ -81,6 +101,20 @@ required: - dmas - dma-names +dependencies: + qcom,vmid: [ memory-region ] + +allOf: + - if: + properties: + compatible: + contains: + const: qcom,shikra-bam-dmux + then: + required: + - memory-region + - qcom,vmid + additionalProperties: false examples: -- 2.34.1