dt-bindings: dma: Convert hisilicon,k3-dma-1.0 to DT schema
Subsystems (2)
Rob Herring (Arm)
maintainerPATCH v2 1/1 dt-bindings: dma: Convert hisilicon,k3-dma-1.0 to DT schema
Convert the hisilicon,k3-dma-1.0 binding to DT schema format.
Add dma-channel-mask, dma-no-cci, dma-type and interrupt-names properties which were not documented.
The "hisilicon,hisi-pcm-asp-dma-1.0" doesn't have clocks, so make it optional.
---
v2:
- Fix example node name to 'dma-controller'
--- .../bindings/dma/hisilicon,k3-dma-1.0.yaml | 87 +++++++++++++++++++ .../devicetree/bindings/dma/k3dma.txt | 47 ---------- 2 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml delete mode 100644 Documentation/devicetree/bindings/dma/k3dma.txt
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +87 -0
@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/hisilicon,k3-dma-1.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon K3 DMA controller + +maintainers: + - Wei Xu <[email protected]> + +properties: + compatible: + items: + - enum: + - hisilicon,k3-dma-1.0 + - hisilicon,hisi-pcm-asp-dma-1.0 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#dma-cells': + const: 1 + + dma-channels: + description: Number of physical DMA channels supported. + maximum: 32 + + dma-requests: + description: Number of virtual DMA request lines supported. + maximum: 32 + + dma-channel-mask: + description: Bitmask of usable DMA channels. + + dma-no-cci: + type: boolean + description: DMA is not coherent with the CCI. + + dma-type: + $ref: /schemas/types.yaml#/definitions/string + description: SoC-specific DMA type name. + enum: + - hi3660_dma + - hi6220_dma + + interrupt-names: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - '#dma-cells' + - dma-channels + - dma-requests + +allOf: + - $ref: dma-controller.yaml# + - if: + properties: + compatible: + contains: + const: hisilicon,k3-dma-1.0 + then: + required: + - clocks + +additionalProperties: false + +examples: + - | + dma-controller@fcd02000 { + compatible = "hisilicon,k3-dma-1.0"; + reg = <0xfcd02000 0x1000>; + #dma-cells = <1>; + dma-channels = <16>; + dma-requests = <27>; + interrupts = <0 12 4>; + clocks = <&pclk>; + };
Documentation/devicetree/bindings/dma/k3dma.txt deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
2.53.0
Hi Rob,
Quoted 10 lines · Rob Herring (Arm)
Convert the hisilicon,k3-dma-1.0 binding to DT schema format.
Add dma-channel-mask, dma-no-cci, dma-type and interrupt-names properties which were not documented.
The "hisilicon,hisi-pcm-asp-dma-1.0" doesn't have clocks, so make it optional.
Assisted-by LLMSigned-off-by Rob Herring (Arm) <[email protected]>
Thanks!
Best Regards,
Wei
Quoted 70 lines · Rob Herring (Arm)
Convert the hisilicon,k3-dma-1.0 binding to DT schema format.
Add dma-channel-mask, dma-no-cci, dma-type and interrupt-names properties which were not documented.
The "hisilicon,hisi-pcm-asp-dma-1.0" doesn't have clocks, so make it optional.
Assisted-by LLMSigned-off-by Rob Herring (Arm) <[email protected]>---
v2:
- Fix example node name to 'dma-controller'--- .../bindings/dma/hisilicon,k3-dma-1.0.yaml | 87 +++++++++++++++++++ .../devicetree/bindings/dma/k3dma.txt | 47 ---------- 2 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml delete mode 100644 Documentation/devicetree/bindings/dma/k3dma.txtDocumentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +44
-0@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/hisilicon,k3-dma-1.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon K3 DMA controller + +maintainers: + - Wei Xu <[email protected]> + +properties: + compatible: + items: + - enum: + - hisilicon,k3-dma-1.0 + - hisilicon,hisi-pcm-asp-dma-1.0 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#dma-cells': + const: 1 + + dma-channels: + description: Number of physical DMA channels supported. + maximum: 32 + + dma-requests: + description: Number of virtual DMA request lines supported. + maximum: 32 + + dma-channel-mask: + description: Bitmask of usable DMA channels. + + dma-no-cci: + type: boolean + description: DMA is not coherent with the CCI.
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml line 54
Quoted 10 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +10
-0+ + dma-type: + $ref: /schemas/types.yaml#/definitions/string + description: SoC-specific DMA type name. + enum: + - hi3660_dma + - hi6220_dma + + interrupt-names: + maxItems: 1
It'd better move interrupt-names after interrupts property.
Quoted 11 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +11
-0+ +required: + - compatible + - reg + - interrupts + - '#dma-cells' + - dma-channels + - dma-requests + +allOf: + - $ref: dma-controller.yaml#
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml line 75
Quoted 10 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +10
-0+ - if: + properties: + compatible: + contains: + const: hisilicon,k3-dma-1.0 + then: + required: + - clocks + +additionalProperties: false
there are $ref, should be unevaluatedProperties?
Frank
Quoted 68 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +12
-0+ +examples: + - | + dma-controller@fcd02000 { + compatible = "hisilicon,k3-dma-1.0"; + reg = <0xfcd02000 0x1000>; + #dma-cells = <1>; + dma-channels = <16>; + dma-requests = <27>; + interrupts = <0 12 4>; + clocks = <&pclk>; + };Documentation/devicetree/bindings/dma/k3dma.txt deleted +0
-48@@ -1,47 +0,0 @@ -* Hisilicon K3 DMA controller - -See dma.txt first - -Required properties: -- compatible: Must be one of -- "hisilicon,k3-dma-1.0" -- "hisilicon,hisi-pcm-asp-dma-1.0" -- reg: Should contain DMA registers location and length. -- interrupts: Should contain one interrupt shared by all channel -- #dma-cells: see dma.txt, should be 1, para number -- dma-channels: physical channels supported -- dma-requests: virtual channels supported, each virtual channel - have specific request line -- clocks: clock required - -Example: - -Controller: - dma0: dma@fcd02000 { - compatible = "hisilicon,k3-dma-1.0"; - reg = <0xfcd02000 0x1000>; - #dma-cells = <1>; - dma-channels = <16>; - dma-requests = <27>; - interrupts = <0 12 4>; - clocks = <&pclk>; - }; - -Client: -Use specific request line passing from dmax -For example, i2c0 read channel request line is 18, while write channel use 19 - - i2c0: i2c@fcb08000 { - compatible = "snps,designware-i2c"; - dmas = <&dma0 18 /* read channel */ - &dma0 19>; /* write channel */ - dma-names = "rx", "tx"; - }; - - i2c1: i2c@fcb09000 { - compatible = "snps,designware-i2c"; - dmas = <&dma0 20 /* read channel */ - &dma0 21>; /* write channel */ - dma-names = "rx", "tx"; - }; - --2.53.0
Rob Herring
maintainerQuoted 75 lines · Frank Li
Quoted 74 lines · Rob Herring (Arm)
Convert the hisilicon,k3-dma-1.0 binding to DT schema format.
Add dma-channel-mask, dma-no-cci, dma-type and interrupt-names properties which were not documented.
The "hisilicon,hisi-pcm-asp-dma-1.0" doesn't have clocks, so make it optional.
Assisted-by LLMSigned-off-by Rob Herring (Arm) <[email protected]>---
v2:
- Fix example node name to 'dma-controller'--- .../bindings/dma/hisilicon,k3-dma-1.0.yaml | 87 +++++++++++++++++++ .../devicetree/bindings/dma/k3dma.txt | 47 ---------- 2 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml delete mode 100644 Documentation/devicetree/bindings/dma/k3dma.txtDocumentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +48
-0@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/hisilicon,k3-dma-1.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon K3 DMA controller + +maintainers: + - Wei Xu <[email protected]> + +properties: + compatible: + items: + - enum: + - hisilicon,k3-dma-1.0 + - hisilicon,hisi-pcm-asp-dma-1.0 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 1 + + '#dma-cells': + const: 1 + + dma-channels: + description: Number of physical DMA channels supported. + maximum: 32 + + dma-requests: + description: Number of virtual DMA request lines supported. + maximum: 32 + + dma-channel-mask: + description: Bitmask of usable DMA channels. + + dma-no-cci: + type: boolean + description: DMA is not coherent with the CCI. + + dma-type: + $ref: /schemas/types.yaml#/definitions/string + description: SoC-specific DMA type name.
Quoted 8 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml line 54
Quoted 6 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +6
-0+ enum: + - hi3660_dma + - hi6220_dma + + interrupt-names: + maxItems: 1It'd better move interrupt-names after interrupts property.
Yes, but more importantly the name needs to be defined.
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +15
-0+ +required: + - compatible + - reg + - interrupts + - '#dma-cells' + - dma-channels + - dma-requests + +allOf: + - $ref: dma-controller.yaml# + - if: + properties: + compatible: + contains:
Quoted 8 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml line 75
Quoted 6 lines
Documentation/devicetree/bindings/dma/hisilicon,k3-dma-1.0.yaml new file +6
-0+ const: hisilicon,k3-dma-1.0 + then: + required: + - clocks + +additionalProperties: falsethere are $ref, should be unevaluatedProperties?
No, because every property used has constraints here.
Rob
Quoted 9 lines · Rob Herring (Arm)
Convert the hisilicon,k3-dma-1.0 binding to DT schema format.
Add dma-channel-mask, dma-no-cci, dma-type and interrupt-names properties which were not documented.
The "hisilicon,hisi-pcm-asp-dma-1.0" doesn't have clocks, so make it optional.
[...]
Applied, thanks!
[1/1] dt-bindings: dma: Convert hisilicon,k3-dma-1.0 to DT schema
commit: 6b0089d88669c87d69df6fa118c198024494a033
Best regards,
Signature · 1 line
~Vinod