[PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt

Harry Austen posted 2 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Harry Austen 1 month, 2 weeks ago
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>
---
v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
v2 -> v3: Add Krzysztof's R-b tag
v1 -> v2: Fix binding errors by moving interrupts up front, restrict later

 .../bindings/clock/xlnx,clocking-wizard.yaml  | 24 ++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
index b497c28e8094f..7688601f1f31b 100644
--- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
+++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
@@ -38,6 +38,14 @@ properties:
       - const: clk_in1
       - const: s_axi_aclk
 
+  interrupts:
+    items:
+      - description: user clock monitor interrupt
+
+  interrupt-names:
+    items:
+      - const: monitor
+
   xlnx,static-config:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
@@ -66,12 +74,24 @@ required:
   - xlnx,speed-grade
   - xlnx,nr-outputs
 
+if:
+  properties:
+    compatible:
+      enum:
+        - xlnx,clocking-wizard
+        - xlnx,clocking-wizard-v5.2
+then:
+  properties:
+    interrupts: false
+    interrupt-names: false
+
 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,static-config;
@@ -79,5 +99,7 @@ examples:
         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.53.0
Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/02/2026 19:10, 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>
> ---
> v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
> v2 -> v3: Add Krzysztof's R-b tag
> v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
> 


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof
Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On Sat, Feb 14, 2026 at 06:10:16PM +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>
> ---
> v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag

What exactly changed that you removed the tag? Rebase is not a reason.
You MUST be here specific about the reason, otherwise why would I like
to review if next time any rebase and slight rework will drop my tag?


> v2 -> v3: Add Krzysztof's R-b tag
> v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
> 
>  .../bindings/clock/xlnx,clocking-wizard.yaml  | 24 ++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> index b497c28e8094f..7688601f1f31b 100644
> --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> @@ -38,6 +38,14 @@ properties:
>        - const: clk_in1
>        - const: s_axi_aclk
>  
> +  interrupts:
> +    items:
> +      - description: user clock monitor interrupt
> +
> +  interrupt-names:
> +    items:
> +      - const: monitor
> +
>    xlnx,static-config:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> @@ -66,12 +74,24 @@ required:
>    - xlnx,speed-grade
>    - xlnx,nr-outputs
>  
> +if:

Why isn't this in allOf? Code is fine, but why changing it?

Best regards,
Krzysztof
Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Harry Austen 1 month, 2 weeks ago
On Saturday, 14 February 2026 at 20:40, Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On Sat, Feb 14, 2026 at 06:10:16PM +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>
> > ---
> > v3 -> v4: Slight rework and rebase, removing Krzysztof's R-b tag
> 
> What exactly changed that you removed the tag? Rebase is not a reason.
> You MUST be here specific about the reason, otherwise why would I like
> to review if next time any rebase and slight rework will drop my tag?

Sorry, good point. By _rework_ I mean that I have removed the allOf. I will
be more specific next time.

> 
> 
> > v2 -> v3: Add Krzysztof's R-b tag
> > v1 -> v2: Fix binding errors by moving interrupts up front, restrict later
> >
> >  .../bindings/clock/xlnx,clocking-wizard.yaml  | 24 ++++++++++++++++++-
> >  1 file changed, 23 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > index b497c28e8094f..7688601f1f31b 100644
> > --- a/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > +++ b/Documentation/devicetree/bindings/clock/xlnx,clocking-wizard.yaml
> > @@ -38,6 +38,14 @@ properties:
> >        - const: clk_in1
> >        - const: s_axi_aclk
> >
> > +  interrupts:
> > +    items:
> > +      - description: user clock monitor interrupt
> > +
> > +  interrupt-names:
> > +    items:
> > +      - const: monitor
> > +
> >    xlnx,static-config:
> >      $ref: /schemas/types.yaml#/definitions/flag
> >      description:
> > @@ -66,12 +74,24 @@ required:
> >    - xlnx,speed-grade
> >    - xlnx,nr-outputs
> >
> > +if:
> 
> Why isn't this in allOf? Code is fine, but why changing it?

There is only a single if condition, so the allOf is not required. Removed
for simplicity and reduced indentation.

> 
> Best regards,
> Krzysztof
> 
> 

Thanks for the review!
Harry
Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 14/02/2026 21:57, Harry Austen wrote:
>>>
>>> +  interrupts:
>>> +    items:
>>> +      - description: user clock monitor interrupt
>>> +
>>> +  interrupt-names:
>>> +    items:
>>> +      - const: monitor
>>> +
>>>    xlnx,static-config:
>>>      $ref: /schemas/types.yaml#/definitions/flag
>>>      description:
>>> @@ -66,12 +74,24 @@ required:
>>>    - xlnx,speed-grade
>>>    - xlnx,nr-outputs
>>>
>>> +if:
>>
>> Why isn't this in allOf? Code is fine, but why changing it?
> 
> There is only a single if condition, so the allOf is not required. Removed
> for simplicity and reduced indentation.
> 

Heh, you might need to add it soon re-indenting everything on adding
just one more if, so for me that was wrong choice. And you got a review :/

Best regards,
Krzysztof
Re: [PATCH v4 1/2] dt-bindings: clock: xilinx: add description of user monitor interrupt
Posted by Harry Austen 1 month, 2 weeks ago
On Saturday, 14 February 2026 at 20:59, Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 14/02/2026 21:57, Harry Austen wrote:
> >>>
> >>> +  interrupts:
> >>> +    items:
> >>> +      - description: user clock monitor interrupt
> >>> +
> >>> +  interrupt-names:
> >>> +    items:
> >>> +      - const: monitor
> >>> +
> >>>    xlnx,static-config:
> >>>      $ref: /schemas/types.yaml#/definitions/flag
> >>>      description:
> >>> @@ -66,12 +74,24 @@ required:
> >>>    - xlnx,speed-grade
> >>>    - xlnx,nr-outputs
> >>>
> >>> +if:
> >>
> >> Why isn't this in allOf? Code is fine, but why changing it?
> >
> > There is only a single if condition, so the allOf is not required. Removed
> > for simplicity and reduced indentation.
> >
> 
> Heh, you might need to add it soon re-indenting everything on adding
> just one more if, so for me that was wrong choice. And you got a review :/

Very fair points. Agreed, it was definitely the wrong thing to do. Not sure
what I was thinking. Do you think it is okay as is, or would you like me to
add the allOf back again?

> 
> Best regards,
> Krzysztof
> 

Thanks again,
Harry