On 20/07/2023 13:31, Shubhrajyoti Datta wrote: > Convert the xlnx,zynqmp-clk.txt to yaml. > versal-clk.yaml already exists that's why ZynqMP is converted and > merged. > > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxx> > > --- > > Changes in v2: > add enum in compatible > fix the description > add constraints for clocks No, you didn't. > name the clock-controller1 to clock-controller > > .../bindings/clock/xlnx,versal-clk.yaml | 80 ++++++++++++++++--- > .../bindings/clock/xlnx,zynqmp-clk.txt | 63 --------------- > 2 files changed, 70 insertions(+), 73 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/clock/xlnx,zynqmp-clk.txt > > diff --git a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml > index e9cf747bf89b..cfe3aa676504 100644 > --- a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml > +++ b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml > @@ -19,7 +19,9 @@ select: false > properties: > compatible: > oneOf: > - - const: xlnx,versal-clk > + - enum: > + - xlnx,versal-clk > + - xlnx,zynqmp-clk > - items: > - enum: > - xlnx,versal-net-clk > @@ -31,16 +33,8 @@ properties: > clocks: > description: List of clock specifiers which are external input > clocks to the given clock controller. > - items: > - - description: reference clock > - - description: alternate reference clock > - - description: alternate reference clock for programmable logic > > - clock-names: > - items: > - - const: ref > - - const: alt_ref > - - const: pl_alt_ref > + clock-names: true Nothing improved. Still constraints missing. You need min and maxItems for clocks and clock-names. HERE. > > required: > - compatible > @@ -50,6 +44,63 @@ required: > > additionalProperties: false > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - xlnx,versal-clk > + > + then: > + properties: > + clocks: > + minItems: 3 What happened here? Why? Drop. > + items: > + - description: reference clock > + - description: alternate reference clock > + - description: alternate reference clock for programmable logic > + > + clock-names: > + minItems: 3 Drop > + items: > + - const: ref > + - const: alt_ref > + - const: pl_alt_ref > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - xlnx,zynqmp-clk > + > + then: > + properties: > + clocks: > + minItems: 5 > + items: > + - description: PS reference clock > + - description: reference clock for video system > + - description: alternative PS reference clock > + - description: auxiliary reference clock > + - description: transceiver reference clock > + - description: (E)MIO clock source (Optional clock) > + - description: GEM emio clock (Optional clock) > + - description: Watchdog external clock (Optional clock) > + > + clock-names: > + minItems: 5 > + items: > + - const: pss_ref_clk > + - const: video_clk > + - const: pss_alt_ref_clk > + - const: aux_ref_clk > + - const: gt_crx_ref_clk > + - pattern: "^mio_clk[00-77]+.*$" > + - pattern: "gem[0-3]+_emio_clk.*$" > + - pattern: "swdt[0-1]+_ext_clk.*$" > + > examples: > - | > firmware { > @@ -64,4 +115,13 @@ examples: > }; > }; > }; > + > + clock-controller { > + #clock-cells = <1>; > + compatible = "xlnx,zynqmp-clk"; compatible is always the first property. Best regards, Krzysztof