diff mbox series

[v4,4/5] dt-bindings: add bindings for polarfire soc system controller

Message ID 20210311113456.15686-1-conor.dooley@microchip.com
State Superseded
Headers show
Series [v4,1/5] mbox: add polarfire soc system controller mailbox | expand

Commit Message

Conor Dooley March 11, 2021, 11:34 a.m. UTC
From: Conor Dooley <conor.dooley@microchip.com>

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

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 ...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

Comments

Rob Herring (Arm) March 11, 2021, 4:41 p.m. UTC | #1
On Thu, 11 Mar 2021 11:34:56 +0000, conor.dooley@microchip.com wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> Add device tree bindings for the MSS system controller on
> the Microchip PolarFire SoC.
> 
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>  ...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.
Conor Dooley March 12, 2021, 2:42 p.m. UTC | #2
On 11/03/2021 17:43, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

>

> On Thu, Mar 11, 2021 at 11:34:56AM +0000, conor.dooley@microchip.com wrote:

>> From: Conor Dooley <conor.dooley@microchip.com>

>>

>> Add device tree bindings for the MSS system controller on

>> the Microchip PolarFire SoC.

>>

>> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

>> ---

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

>>

>> diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

>> new file mode 100644

>> index 000000000000..222557f96a13

>> --- /dev/null

>> +++ b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

>> @@ -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 <conor.dooley@microchip.com>

>> +

>> +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.


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.

>

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

>> +

>> +  compatible:

>> +    const: microchip,polarfire-soc-sys-controller

>> +

>> +required:

>> +  - compatible

>> +  - mboxes

>> +

>> +additionalProperties: false

>> +

>> +examples:

>> +  - |

>> +    syscontroller: syscontroller {

>> +      compatible = "microchip,polarfire-soc-sys-controller";

>> +      mboxes = <&mbox 0>;

>> +    };

>> --

>> 2.17.1

>>
Rob Herring (Arm) March 12, 2021, 3:49 p.m. UTC | #3
On Fri, Mar 12, 2021 at 7:42 AM <Conor.Dooley@microchip.com> wrote:
>

> On 11/03/2021 17:43, Rob Herring wrote:

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

> >

> > On Thu, Mar 11, 2021 at 11:34:56AM +0000, conor.dooley@microchip.com wrote:

> >> From: Conor Dooley <conor.dooley@microchip.com>

> >>

> >> Add device tree bindings for the MSS system controller on

> >> the Microchip PolarFire SoC.

> >>

> >> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

> >> ---

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

> >>

> >> diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

> >> new file mode 100644

> >> index 000000000000..222557f96a13

> >> --- /dev/null

> >> +++ b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml

> >> @@ -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 <conor.dooley@microchip.com>

> >> +

> >> +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.

>

> 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
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
new file mode 100644
index 000000000000..222557f96a13
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/microchip/microchip,polarfire-soc-sys-controller.yaml
@@ -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 <conor.dooley@microchip.com>
+
+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>;
+    };