Skip to contentSkip to conversation

dt-bindings: add bindings for polarfire soc system controller

PATCH Superseded [email protected] 2 participants 4 messages Dec 1, 2020 – Dec 15, 2020

Subsystems (4)

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH v2 4/5 dt-bindings: add bindings for polarfire soc system controller

From: Conor Dooley <[email protected]>

Add device tree bindings for the MSS system controller on the Microchip PolarFire SoC.

---
 .../microchip,mpfs_sys_controller.yaml        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +49 -0
new file mode 100644
index 000000000000..c22fc203b95c
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,mpfs_sys_controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip MPFS system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+properties:
+  compatible:
+    const: microchip,polarfire-soc-sys-controller
+
+  mbox-names:
+    maxItems: 1
+    description: name of the mailbox controller device node
+
+  mboxes:
+    maxItems: 1
+    description: |
+      phandle and index of the mailbox controller device node. It must be 0 (hardware supports only one channel).
+
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+required:
+  - compatible
+  - mbox-names
+  - "#address-cells"
+  - "#size-cells"
+  - "mboxes"
+
+additionalProperties: false
+
+examples:
+  - |
+    syscontroller: syscontroller {
+      compatible = "microchip,polarfire-soc-sys-controller";
+      #address-cells = <1>;
+      #size-cells = <1>;
+      mbox-names = "mbox-mpfs";
+      mboxes = <&mbox 0>;
+    };
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer
#1 lore raw
Quoted 11 lines · On Tue, 01 Dec 2020 11:03:11 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the MSS system controller on the Microchip PolarFire SoC.

---
 .../microchip,mpfs_sys_controller.yaml        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml:23:111: [warning] line too long (113 > 110 characters) (line-length)

dtschema/dtc warnings/errors:

See https://patchwork.ozlabs.org/patch/1408782

The base for the patch is generally the last rc1. Any dependencies should be noted.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer
#2 lore raw
In reply to [email protected]
Quoted 25 lines · On Tue, Dec 01, 2020 at 11:03:11AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the MSS system controller on the Microchip PolarFire SoC.

---
 .../microchip,mpfs_sys_controller.yaml        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +8 -0
new file mode 100644
index 000000000000..c22fc203b95c
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,mpfs_sys_controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip MPFS system controller
+

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +10 -0
+maintainers:
+  - Conor Dooley <[email protected]>
+
+properties:
+  compatible:
+    const: microchip,polarfire-soc-sys-controller
+
+  mbox-names:
+    maxItems: 1
+    description: name of the mailbox controller device node

Kind of pointless to have names when there is only one entry. I'd drop, but if you do, you need to define what the name is.

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 23

Quoted 5 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +5 -0
+
+  mboxes:
+    maxItems: 1
+    description: |
+      phandle and index of the mailbox controller device node. It must be 0 (hardware supports only one channel).

No need to redefine a common property. And the value 0 is outside the scope of this binding. That's dependent on the mbox h/w.

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 30

Quoted 7 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +7 -0
+
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1

These are not needed unless you have child nodes. If you do, then they also need to be defined here.

Quoted 22 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +19 -0
+
+required:
+  - compatible
+  - mbox-names
+  - "#address-cells"
+  - "#size-cells"
+  - "mboxes"
+
+additionalProperties: false
+
+examples:
+  - |
+    syscontroller: syscontroller {
+      compatible = "microchip,polarfire-soc-sys-controller";
+      #address-cells = <1>;
+      #size-cells = <1>;
+      mbox-names = "mbox-mpfs";
+      mboxes = <&mbox 0>;
+    };
Signature · 1 line
2.17.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#3 lore raw
Quoted 32 lines · Rob Herring

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 29 lines · On Tue, Dec 01, 2020 at 11:03:11AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

Add device tree bindings for the MSS system controller on the Microchip PolarFire SoC.

---
 .../microchip,mpfs_sys_controller.yaml        | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +12 -0
new file mode 100644
index 000000000000..c22fc203b95c
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,mpfs_sys_controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip MPFS system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+properties:
Quoted 8 lines

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 18

Quoted 6 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +6 -0
+  compatible:
+    const: microchip,polarfire-soc-sys-controller
+
+  mbox-names:
+    maxItems: 1
+    description: name of the mailbox controller device node

Kind of pointless to have names when there is only one entry. I'd drop, but if you do, you need to define what the name is.

sure, will drop

Quoted 8 lines

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 23

Quoted 6 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +5 -0
+
+  mboxes:
+    maxItems: 1
+    description: |
+      phandle and index of the mailbox controller device node. It must be 0 (hardware supports only one channel).

No need to redefine a common property. And the value 0 is outside the scope of this binding. That's dependent on the mbox h/w.

I was going off what the other drivers had done here with the redefinition. Should I be doing something like the bcm2835 instead?

  mboxes:
    $ref: '/schemas/types.yaml#/definitions/phandle-array'
    description: |
      phandle and index of the mailbox controller device node.
      See: ../mailbox/mailbox.txt for more information.
    maxItems: 1

Quoted 9 lines

Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml line 30

Quoted 7 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +7 -0
+
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1

These are not needed unless you have child nodes. If you do, then they also need to be defined here.

no child nodes, so ill drop these too

Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +14 -0
+
+required:
+  - compatible
+  - mbox-names
+  - "#address-cells"
+  - "#size-cells"
+  - "mboxes"
+
+additionalProperties: false
+
+examples:
+  - |
+    syscontroller: syscontroller {
+      compatible = "microchip,polarfire-soc-sys-controller";
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/soc/microchip/microchip,mpfs_sys_controller.yaml new file +5 -1
+      #address-cells = <1>;
+      #size-cells = <1>;
+      mbox-names = "mbox-mpfs";
+      mboxes = <&mbox 0>;
+    };
--

2.17.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv