Skip to contentSkip to conversation

dt-bindings: add bindings for polarfire soc system controller

PATCH Superseded [email protected] 2 participants 5 messages Mar 11, 2021 – Mar 12, 2021

Subsystems (3)

v4 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 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.

---
 ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +36 -0
new file mode 100644
index 000000000000..222557f96a13
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,polarfire-soc-sys-controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+description: |
+  The PolarFire SoC system controller can be accessed as a mailbox device.
+  This document describes the bindings for that device.
+
+
+properties:
+
+  allOf:
+    - $ref: /schemas/mbox/mbox-consumer.yaml#properties
+
+  compatible:
+    const: microchip,polarfire-soc-sys-controller
+
+required:
+  - compatible
+  - mboxes
+
+additionalProperties: false
+
+examples:
+  - |
+    syscontroller: syscontroller {
+      compatible = "microchip,polarfire-soc-sys-controller";
+      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 Thu, 11 Mar 2021 11:34:56 +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

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

---
 ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml: properties:allOf: [{'$ref': '/schemas/mbox/mbox-consumer.yaml#properties'}] is not of type 'object', 'boolean'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml: properties: {'enum': ['$ref', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'default', 'dependencies', 'deprecated', 'description', 'else', 'enum', 'if', 'items', 'maxItems', 'maximum', 'minItems', 'minimum', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'propertyNames', 'required', 'then', 'unevaluatedProperties']} is not allowed for 'allOf' /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml: ignoring, error in schema: properties: allOf
warning: no schema found in file: ./Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

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

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

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 27 lines · On Thu, Mar 11, 2021 at 11:34:56AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

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

---
 ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +10 -0
new file mode 100644
index 000000000000..222557f96a13
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,polarfire-soc-sys-controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>

Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml line 20

Quoted 10 lines
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +10 -0
+
+description: |
+  The PolarFire SoC system controller can be accessed as a mailbox device.
+  This document describes the bindings for that device.
+
+
+properties:
+
+  allOf:
+    - $ref: /schemas/mbox/mbox-consumer.yaml#properties

This defines a DT property 'allOf'. This would need to be at the top level with 'properties' dropped. However, you generally don't want to include consumer schemas. You need to define 'mboxes' property here because you need to define how many and what they are if more than 1.

What does 'can be accessed as a mailbox device' mean? Is there another way? Is it a mailbox device (provider)?

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

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

#3 lore raw
Quoted 36 lines · Rob Herring

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

Quoted 33 lines · On Thu, Mar 11, 2021 at 11:34:56AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

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

---
 ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +16 -0
new file mode 100644
index 000000000000..222557f96a13
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,polarfire-soc-sys-controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+description: |
+  The PolarFire SoC system controller can be accessed as a mailbox device.
+  This document describes the bindings for that device.
+
+
Quoted 8 lines

Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml line 20

Quoted 4 lines
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +4 -0
+properties:
+
+  allOf:
+    - $ref: /schemas/mbox/mbox-consumer.yaml#properties

This defines a DT property 'allOf'. This would need to be at the top level with 'properties' dropped. However, you generally don't want to include consumer schemas. You need to define 'mboxes' property here because you need to define how many and what they are if more than 1.

In a previous version i was defining it like the below, but you didnt like the redefinition of the common property. Is there something in between the two that you are looking for?

  mboxes:
    maxItems: 1
    description: |
      phandle and index of the mailbox controller device node.

Quoted 3 lines

What does 'can be accessed as a mailbox device' mean? Is there another way? Is it a mailbox device (provider)?

this is the bindings for the mailbox client, ill rephrase the description and make it clearer.

Quoted 12 lines
Quoted 12 lines
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +11 -0
+
+  compatible:
+    const: microchip,polarfire-soc-sys-controller
+
+required:
+  - compatible
+  - mboxes
+
+additionalProperties: false
+
+examples:
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +5 -1
+  - |
+    syscontroller: syscontroller {
+      compatible = "microchip,polarfire-soc-sys-controller";
+      mboxes = <&mbox 0>;
+    };
--

2.17.1

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

maintainer
#4 lore raw
Quoted 47 lines · On Fri, Mar 12, 2021 at 7:42 AM <[email protected]> wrote:
Quoted 36 lines · Rob Herring

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

Quoted 33 lines · On Thu, Mar 11, 2021 at 11:34:56AM +0000, [email protected] wrote:

From: Conor Dooley <[email protected]>

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

---
 ...icrochip,polarfire-soc-sys-controller.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +16 -0
new file mode 100644
index 000000000000..222557f96a13
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/microchip/microchip,polarfire-soc-sys-controller.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip PolarFire SoC (MPFS) MSS (microprocessor subsystem) system controller
+
+maintainers:
+  - Conor Dooley <[email protected]>
+
+description: |
+  The PolarFire SoC system controller can be accessed as a mailbox device.
+  This document describes the bindings for that device.
+
+
Quoted 8 lines

Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml line 20

Quoted 4 lines
Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml new file +4 -0
+properties:
+
+  allOf:
+    - $ref: /schemas/mbox/mbox-consumer.yaml#properties

This defines a DT property 'allOf'. This would need to be at the top level with 'properties' dropped. However, you generally don't want to include consumer schemas. You need to define 'mboxes' property here because you need to define how many and what they are if more than 1.

Quoted 7 lines

In a previous version i was defining it like the below, but you didnt like the redefinition of the common property. Is there something in between the two that you are looking for?

mboxes:
maxItems: 1
description: |
phandle and index of the mailbox controller device node.

You don't need a description that applies to every 'mboxes' property. You need either for 1 entry:

mboxes:
maxItems: 1

Or for multiple entries:

mboxes:
items:
- description: What the 1st entry is for
- description: What the 2nd entry is for
...

Same thing applies to all common properties where the binding defines how many entries (reg, interrupts, clocks, power-domains, etc.).

Rob

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