Skip to contentSkip to conversation

dt-bindings: dma: add schema for altr,msgdma

PATCH Superseded Olivier Dautricourt 4 participants 5 messages Apr 29, 2021 – May 10, 2021

Subsystems (3)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 dt-bindings: dma: add schema for altr,msgdma

- add schema for Altera mSGDMA bindings in devicetree.
- add myself as 'Odd fixes' maintainer for this driver

---

Notes:
Changes in v2:
- fix reg size in dt example
- fix dt_binding check warning
- add list in MAINTAINERS entry

Changes from v2 to v3:
none

Changes from v3 to v4:
none

 .../devicetree/bindings/dma/altr,msgdma.yaml  | 62 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +62 -0
new file mode 100644
index 000000000000..295e46c84bf9
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera mSGDMA IP core
+
+maintainers:
+  - Olivier Dautricourt <[email protected]>
+
+description: |
+  Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA)
+  intellectual property (IP)
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: altr,msgdma
+
+  reg:
+    description:
+      csr, desc, resp resgisters
+    maxItems: 3
+    minItems: 3
+
+  reg-names:
+    items:
+      - const: csr
+      - const: desc
+      - const: resp
+
+  interrupts:
+    maxItems: 1
+
+  "#dma-cells":
+    description: |
+      The dma controller discards the argument but one must be specified
+      to keep compatibility with dma-controller schema.
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    msgdma_controller: dma-controller@ff200b00 {
+        compatible = "altr,msgdma";
+        reg = <0xff200b00 0x100>, <0xff200c00 0x100>, <0xff200d00 0x100>;
+        reg-names = "csr", "desc", "resp";
+        interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+    };
MAINTAINERS +7 -0
index 5c90148f0369..359ab4877024 100644
@@ -782,6 +782,13 @@ M:	Ley Foon Tan <[email protected]>
 S:	Maintained
 F:	drivers/mailbox/mailbox-altera.c
 
+ALTERA MSGDMA IP CORE DRIVER
+M:	Olivier Dautricourt <[email protected]>
+L:	[email protected]
+S:	Odd Fixes
+F:	Documentation/devicetree/bindings/dma/altr,msgdma.yaml
+F:	drivers/dma/altera-msgdma.c
+
 ALTERA PIO DRIVER
 M:	Joyce Ooi <[email protected]>
 L:	[email protected]

--
2.31.0.rc2

reviewer Reviewed-by on v4 1/2
#1 lore raw
Quoted 4 lines · Olivier Dautricourt

- add schema for Altera mSGDMA bindings in devicetree.
- add myself as 'Odd fixes' maintainer for this driver

Thanks,
Stefan

Quoted 106 lines

---

Notes:
Changes in v2:
- fix reg size in dt example
- fix dt_binding check warning
- add list in MAINTAINERS entry

Changes from v2 to v3:
none

Changes from v3 to v4:
none

  .../devicetree/bindings/dma/altr,msgdma.yaml  | 62 +++++++++++++++++++
  MAINTAINERS                                   |  7 +++
  2 files changed, 69 insertions(+)

create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml

Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +62 -0
new file mode 100644
index 000000000000..295e46c84bf9
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera mSGDMA IP core
+
+maintainers:
+  - Olivier Dautricourt <[email protected]>
+
+description: |
+  Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA)
+  intellectual property (IP)
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: altr,msgdma
+
+  reg:
+    description:
+      csr, desc, resp resgisters
+    maxItems: 3
+    minItems: 3
+
+  reg-names:
+    items:
+      - const: csr
+      - const: desc
+      - const: resp
+
+  interrupts:
+    maxItems: 1
+
+  "#dma-cells":
+    description: |
+      The dma controller discards the argument but one must be specified
+      to keep compatibility with dma-controller schema.
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    msgdma_controller: dma-controller@ff200b00 {
+        compatible = "altr,msgdma";
+        reg = <0xff200b00 0x100>, <0xff200c00 0x100>, <0xff200d00 0x100>;
+        reg-names = "csr", "desc", "resp";
+        interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+    };
MAINTAINERS +7 -1
index 5c90148f0369..359ab4877024 100644
@@ -782,6 +782,13 @@ M:	Ley Foon Tan <[email protected]>
  S:	Maintained
  F:	drivers/mailbox/mailbox-altera.c
 
+ALTERA MSGDMA IP CORE DRIVER
+M:	Olivier Dautricourt <[email protected]>
+L:	[email protected]
+S:	Odd Fixes
+F:	Documentation/devicetree/bindings/dma/altr,msgdma.yaml
+F:	drivers/dma/altera-msgdma.c
+
  ALTERA PIO DRIVER
  M:	Joyce Ooi <[email protected]>
  L:	[email protected]
--
Quoted 2 lines

2.31.0.rc2

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#2 lore raw
In reply to Olivier Dautricourt
Quoted 3 lines · Olivier Dautricourt

- add schema for Altera mSGDMA bindings in devicetree.
- add myself as 'Odd fixes' maintainer for this driver

While I guess valid, the tools (b4) don't like the '/' in your message-id. Lore will escape it fine, but then you have to escape the url. Would be nice to avoid all that, but maybe this is Exchange's doing?

Quoted 37 lines

---

Notes:
Changes in v2:
- fix reg size in dt example
- fix dt_binding check warning
- add list in MAINTAINERS entry

Changes from v2 to v3:
none

Changes from v3 to v4:
none

 .../devicetree/bindings/dma/altr,msgdma.yaml  | 62 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +11 -0
new file mode 100644
index 000000000000..295e46c84bf9
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera mSGDMA IP core
+
+maintainers:
+  - Olivier Dautricourt <[email protected]>
+

Documentation/devicetree/bindings/dma/altr,msgdma.yaml line 21

Quoted 10 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +10 -0
+description: |
+  Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA)
+  intellectual property (IP)
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: altr,msgdma

Needs an SoC specific compatible.

Documentation/devicetree/bindings/dma/altr,msgdma.yaml line 25

Quoted 4 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +4 -0
+
+  reg:
+    description:
+      csr, desc, resp resgisters

Expand what each region is:

reg:
items:
- description: ...
- description: ...
- description: ...

Documentation/devicetree/bindings/dma/altr,msgdma.yaml line 27

Quoted 2 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +2 -0
+    maxItems: 3
+    minItems: 3

And then drop this.

Quoted 56 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +35 -0
+
+  reg-names:
+    items:
+      - const: csr
+      - const: desc
+      - const: resp
+
+  interrupts:
+    maxItems: 1
+
+  "#dma-cells":
+    description: |
+      The dma controller discards the argument but one must be specified
+      to keep compatibility with dma-controller schema.
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    msgdma_controller: dma-controller@ff200b00 {
+        compatible = "altr,msgdma";
+        reg = <0xff200b00 0x100>, <0xff200c00 0x100>, <0xff200d00 0x100>;
+        reg-names = "csr", "desc", "resp";
+        interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+    };
MAINTAINERS +7 -1
index 5c90148f0369..359ab4877024 100644
@@ -782,6 +782,13 @@ M: Ley Foon Tan <[email protected]>
 S:     Maintained
 F:     drivers/mailbox/mailbox-altera.c
 
+ALTERA MSGDMA IP CORE DRIVER
+M:     Olivier Dautricourt <[email protected]>
+L:     [email protected]
+S:     Odd Fixes
+F:     Documentation/devicetree/bindings/dma/altr,msgdma.yaml
+F:     drivers/dma/altera-msgdma.c
+
 ALTERA PIO DRIVER
 M:     Joyce Ooi <[email protected]>
 L:     [email protected]
--

2.31.0.rc2

#3 lore raw

Hello Rob,

Quoted 10 lines · Rob Herring
Quoted 3 lines · Olivier Dautricourt

- add schema for Altera mSGDMA bindings in devicetree.
- add myself as 'Odd fixes' maintainer for this driver

While I guess valid, the tools (b4) don't like the '/' in your message-id. Lore will escape it fine, but then you have to escape the url. Would be nice to avoid all that, but maybe this is Exchange's doing?

Yes it must be Exchange's doing, i'm not sure if i can configure this but i'll check.. Thanks for noticing.

Quoted 41 lines
Quoted 41 lines

---

Notes:
Changes in v2:
- fix reg size in dt example
- fix dt_binding check warning
- add list in MAINTAINERS entry

Changes from v2 to v3:
none

Changes from v3 to v4:
none

 .../devicetree/bindings/dma/altr,msgdma.yaml  | 62 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +15 -0
new file mode 100644
index 000000000000..295e46c84bf9
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera mSGDMA IP core
+
+maintainers:
+  - Olivier Dautricourt <[email protected]>
+
+description: |
+  Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA)
+  intellectual property (IP)
+
Quoted 9 lines

Documentation/devicetree/bindings/dma/altr,msgdma.yaml line 21

Quoted 6 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +6 -0
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: altr,msgdma

Needs an SoC specific compatible.

It should be compatible with altera's socfpga family. Should i leave a general compatible field such as "altr,msgdma" ?

example:
compatible:
enum:
- altr,socfpga-msgdma
- altr,msgdma

Thanks,

Olivier

maintainer
#4 lore raw
In reply to Olivier Dautricourt
Quoted 2 lines · Olivier Dautricourt

- add schema for Altera mSGDMA bindings in devicetree.
- add myself as 'Odd fixes' maintainer for this driver

These should be two separate patches... Also threading in your patches in broken and the 2/2 patch doesnt appear along with this in thread, pls fix that as well

Quoted 58 lines

---

Notes:
Changes in v2:
- fix reg size in dt example
- fix dt_binding check warning
- add list in MAINTAINERS entry

Changes from v2 to v3:
none

Changes from v3 to v4:
none

 .../devicetree/bindings/dma/altr,msgdma.yaml  | 62 +++++++++++++++++++
 MAINTAINERS                                   |  7 +++
 2 files changed, 69 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/altr,msgdma.yaml
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +31 -0
new file mode 100644
index 000000000000..295e46c84bf9
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/altr,msgdma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Altera mSGDMA IP core
+
+maintainers:
+  - Olivier Dautricourt <[email protected]>
+
+description: |
+  Altera / Intel modular Scatter-Gather Direct Memory Access (mSGDMA)
+  intellectual property (IP)
+
+allOf:
+  - $ref: "dma-controller.yaml#"
+
+properties:
+  compatible:
+    const: altr,msgdma
+
+  reg:
+    description:
+      csr, desc, resp resgisters
+    maxItems: 3
+    minItems: 3
+
+  reg-names:
+    items:
+      - const: csr

Documentation/devicetree/bindings/dma/altr,msgdma.yaml line 41

Quoted 10 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +10 -0
+      - const: desc
+      - const: resp
+
+  interrupts:
+    maxItems: 1
+
+  "#dma-cells":
+    description: |
+      The dma controller discards the argument but one must be specified
+      to keep compatibility with dma-controller schema.

we can skip this

Quoted 41 lines
Documentation/devicetree/bindings/dma/altr,msgdma.yaml new file +21 -0
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    msgdma_controller: dma-controller@ff200b00 {
+        compatible = "altr,msgdma";
+        reg = <0xff200b00 0x100>, <0xff200c00 0x100>, <0xff200d00 0x100>;
+        reg-names = "csr", "desc", "resp";
+        interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
+        #dma-cells = <1>;
+    };
MAINTAINERS +7 -1
index 5c90148f0369..359ab4877024 100644
@@ -782,6 +782,13 @@ M:	Ley Foon Tan <[email protected]>
 S:	Maintained
 F:	drivers/mailbox/mailbox-altera.c
 
+ALTERA MSGDMA IP CORE DRIVER
+M:	Olivier Dautricourt <[email protected]>
+L:	[email protected]
+S:	Odd Fixes
+F:	Documentation/devicetree/bindings/dma/altr,msgdma.yaml
+F:	drivers/dma/altera-msgdma.c
+
 ALTERA PIO DRIVER
 M:	Joyce Ooi <[email protected]>
 L:	[email protected]
--

2.31.0.rc2

Signature · 1 line
~Vinod