diff mbox series

[4/7] dt-bindings: clock: xilinx: add description of user monitor interrupt

Message ID 20240720120048.36758-5-hpausten@protonmail.com (mailing list archive)
State Changes Requested, archived
Headers show
Series clk: clocking-wizard: add user clock monitor support | expand

Commit Message

Harry Austen July 20, 2024, 12:01 p.m. UTC
This Xilinx clocking wizard IP core outputs this interrupt signal to
indicate when one of the four optional user clock inputs is either
stopped, overruns, underruns or glitches.

This functionality was only added from version 6.0 onwards, so restrict
it to particular compatible strings.

Signed-off-by: Harry Austen <hpausten@protonmail.com>
---
 .../bindings/clock/xlnx,clocking-wizard.yaml  | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Comments

Rob Herring July 20, 2024, 2:30 p.m. UTC | #1
On Sat, 20 Jul 2024 12:01:48 +0000, Harry Austen wrote:
> This Xilinx clocking wizard IP core outputs this interrupt signal to
> indicate when one of the four optional user clock inputs is either
> stopped, overruns, underruns or glitches.
> 
> This functionality was only added from version 6.0 onwards, so restrict
> it to particular compatible strings.
> 
> Signed-off-by: Harry Austen <hpausten@protonmail.com>
> ---
>  .../bindings/clock/xlnx,clocking-wizard.yaml  | 22 ++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.example.dtb: clock-controller@b0000000: 'interrupt-names', 'interrupts-extended' do not match any of the regexes: 'pinctrl-[0-9]+'
	from schema $id: http://devicetree.org/schemas/clock/xlnx,clocking-wizard.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240720120048.36758-5-hpausten@protonmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Rob Herring July 20, 2024, 2:37 p.m. UTC | #2
On Sat, Jul 20, 2024 at 12:01:48PM +0000, Harry Austen wrote:
> This Xilinx clocking wizard IP core outputs this interrupt signal to
> indicate when one of the four optional user clock inputs is either
> stopped, overruns, underruns or glitches.
> 
> This functionality was only added from version 6.0 onwards, so restrict
> it to particular compatible strings.
> 
> Signed-off-by: Harry Austen <hpausten@protonmail.com>
> ---
>  .../bindings/clock/xlnx,clocking-wizard.yaml  | 22 ++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> index 9d5324dc1027a..4609bb56b06b5 100644
> --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> @@ -62,17 +62,37 @@ required:
>    - xlnx,speed-grade
>    - xlnx,nr-outputs
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - xlnx,clocking-wizard-v6.0
> +            - xlnx,versal-clk-wizard
> +    then:
> +      properties:
> +        interrupts:
> +          items:
> +            - description: user clock monitor interrupt
> +
> +        interrupt-names:
> +          items:
> +            - const: monitor

Properties need to be defined at the top-level (outside the if/then 
schema), then restricted here.

> +
>  additionalProperties: false
>  
>  examples:
>    - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
>      clock-controller@b0000000  {
> -        compatible = "xlnx,clocking-wizard";
> +        compatible = "xlnx,clocking-wizard-v6.0";
>          reg = <0xb0000000 0x10000>;
>          #clock-cells = <1>;
>          xlnx,speed-grade = <1>;
>          xlnx,nr-outputs = <6>;
>          clock-names = "clk_in1", "s_axi_aclk";
>          clocks = <&clkc 15>, <&clkc 15>;
> +        interrupts-extended = <&intc 52 IRQ_TYPE_EDGE_RISING>;
> +        interrupt-names = "monitor";
>      };
>  ...
> -- 
> 2.45.2
> 
>
Harry Austen July 20, 2024, 8 p.m. UTC | #3
On Sat Jul 20, 2024 at 3:37 PM BST, Rob Herring wrote:
> On Sat, Jul 20, 2024 at 12:01:48PM +0000, Harry Austen wrote:
> > This Xilinx clocking wizard IP core outputs this interrupt signal to
> > indicate when one of the four optional user clock inputs is either
> > stopped, overruns, underruns or glitches.
> >
> > This functionality was only added from version 6.0 onwards, so restrict
> > it to particular compatible strings.
> >
> > Signed-off-by: Harry Austen <hpausten@protonmail.com>
> > ---
> >  .../bindings/clock/xlnx,clocking-wizard.yaml  | 22 ++++++++++++++++++-
> >  1 file changed, 21 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > index 9d5324dc1027a..4609bb56b06b5 100644
> > --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > @@ -62,17 +62,37 @@ required:
> >    - xlnx,speed-grade
> >    - xlnx,nr-outputs
> >
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          enum:
> > +            - xlnx,clocking-wizard-v6.0
> > +            - xlnx,versal-clk-wizard
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          items:
> > +            - description: user clock monitor interrupt
> > +
> > +        interrupt-names:
> > +          items:
> > +            - const: monitor
>
> Properties need to be defined at the top-level (outside the if/then
> schema), then restricted here.

Makes sense. Will do in v2.

Thanks for the review!

>
> > +
> >  additionalProperties: false
> >
> >  examples:
> >    - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> >      clock-controller@b0000000  {
> > -        compatible = "xlnx,clocking-wizard";
> > +        compatible = "xlnx,clocking-wizard-v6.0";
> >          reg = <0xb0000000 0x10000>;
> >          #clock-cells = <1>;
> >          xlnx,speed-grade = <1>;
> >          xlnx,nr-outputs = <6>;
> >          clock-names = "clk_in1", "s_axi_aclk";
> >          clocks = <&clkc 15>, <&clkc 15>;
> > +        interrupts-extended = <&intc 52 IRQ_TYPE_EDGE_RISING>;
> > +        interrupt-names = "monitor";
> >      };
> >  ...
> > --
> > 2.45.2
> >
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
index 9d5324dc1027a..4609bb56b06b5 100644
--- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
+++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
@@ -62,17 +62,37 @@  required:
   - xlnx,speed-grade
   - xlnx,nr-outputs
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - xlnx,clocking-wizard-v6.0
+            - xlnx,versal-clk-wizard
+    then:
+      properties:
+        interrupts:
+          items:
+            - description: user clock monitor interrupt
+
+        interrupt-names:
+          items:
+            - const: monitor
+
 additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/irq.h>
     clock-controller@b0000000  {
-        compatible = "xlnx,clocking-wizard";
+        compatible = "xlnx,clocking-wizard-v6.0";
         reg = <0xb0000000 0x10000>;
         #clock-cells = <1>;
         xlnx,speed-grade = <1>;
         xlnx,nr-outputs = <6>;
         clock-names = "clk_in1", "s_axi_aclk";
         clocks = <&clkc 15>, <&clkc 15>;
+        interrupts-extended = <&intc 52 IRQ_TYPE_EDGE_RISING>;
+        interrupt-names = "monitor";
     };
 ...