Re: [PATCH v3 2/2] dt-bindings: dma: hisi: Add bindings for Hisi Ascend sdma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2023/8/25 3:43, Rob Herring 写道:
On Thu, Aug 24, 2023 at 12:00:07PM +0800, Guo Mengqi wrote:
Add device-tree binding documentation for the Hisi Ascend sdma
controller.

Signed-off-by: Guo Mengqi <guomengqi3@xxxxxxxxxx>
---
  .../bindings/dma/hisi,ascend-sdma.yaml        | 75 +++++++++++++++++++
  1 file changed, 75 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/dma/hisi,ascend-sdma.yaml

diff --git a/Documentation/devicetree/bindings/dma/hisi,ascend-sdma.yaml b/Documentation/devicetree/bindings/dma/hisi,ascend-sdma.yaml
new file mode 100644
index 000000000000..87b6132c1b4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/hisi,ascend-sdma.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/hisi,ascend-sdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HISI Ascend System DMA (SDMA) controller
+
+description: |
+  The Ascend SDMA controller is used for transferring data
+  in system memory. It utilizes IOMMU SVA feature and accepts
+  virtual address from user process.
+
+maintainers:
+  - Guo Mengqi <guomengqi3@xxxxxxxxxx>
+
+allOf:
+  - $ref: dma-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - hisilicon,ascend310-sdma
+      - hisilicon,ascend910-sdma
+
+  reg:
+    maxItems: 1
+
+  '#dma-cells':
+    const: 1
+    description:
+      Clients specify a single cell with channel number.
+
+  hisilicon,ascend-sdma-channel-map:
+    description: |
+      bitmap, each bit stands for a channel that is allowed to
+      use by this system. Maximum 64 bits.
+    $ref: /schemas/types.yaml#/definitions/uint64
Sounds like the common property dma-channel-mask. Use that.
It does seem to be the one I'm looking for. Will use it in next patch.
+
+  iommus:
+    maxItems: 1
+
+  pasid-num-bits:
Needs a vendor prefix.
This can be found in iommu optional properties. Although nobody use it for now.
+    description: |
+      sdma utilizes iommu sva feature to transfer user space data.
Isn't shared VA mostly a s/w concept?

Well, sdma controller has built-in mechanism to support shared VA translation.

I add this to explain purpose of property.

+      It acts as a basic dma controller if not bound to user space.
I don't understand what this means.

By "basic" I mean iommu bypass mode, which is supported in hardware design.

So if the transfer is all in physical address, it seems quite... basic?


However, shared VA is main usage scenario. Driver only implements shared VA. So I guess I can remove this line.

+    const: 0x10
If only 1 value is allowed, what is the point of this property.

It seems that the property should be declared here, to tell iommu it supports PASID (see 2e981b9468e670b76bd1048fa939ad1f9653bd79 mainline).

I think it could be adjust to other values. I will check out if there is a specific range.

Rob
.

Best regards,

Guo Mengqi




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux