diff mbox series

[V3,1/2] dt-bindings: clk: versaclock5: Add optional load capacitance property

Message ID 20210207185140.3653350-1-aford173@gmail.com
State Changes Requested, archived
Headers show
Series [V3,1/2] dt-bindings: clk: versaclock5: Add optional load capacitance property | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

Adam Ford Feb. 7, 2021, 6:51 p.m. UTC
There are two registers which can set the load capacitance for
XTAL1 and XTAL2. These are optional registers when using an
external crystal.  Since XTAL1 and XTAL2 will set to the same value,
update the binding to support a single property called
xtal-load-femtofarads.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V3:  No Change
V2:  No Change

A couple people suggested that I not use the $ref, but without it,
the bindings check failed with errors.

Comments

Luca Ceresoli Feb. 8, 2021, noon UTC | #1
Hi Adam,
On 07/02/21 19:51, Adam Ford wrote:
> There are two registers which can set the load capacitance for
> XTAL1 and XTAL2. These are optional registers when using an
> external crystal.  Parse the device tree and set the
> corresponding registers accordingly.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Rob Herring (Arm) Feb. 10, 2021, 8:18 p.m. UTC | #2
On Sun, Feb 07, 2021 at 12:51:38PM -0600, Adam Ford wrote:
> There are two registers which can set the load capacitance for
> XTAL1 and XTAL2. These are optional registers when using an
> external crystal.  Since XTAL1 and XTAL2 will set to the same value,
> update the binding to support a single property called
> xtal-load-femtofarads.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V3:  No Change
> V2:  No Change
> 
> A couple people suggested that I not use the $ref, but without it,
> the bindings check failed with errors.
> 
> diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> index 2ac1131fd922..c268debe5b8d 100644
> --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> @@ -59,6 +59,12 @@ properties:
>      minItems: 1
>      maxItems: 2
>  
> +  idt,xtal-load-femtofarads:
> +    $ref: /schemas/types.yaml#/definitions/uint32

Don't need a type with standard unit suffix.

> +    minimum: 9000
> +    maximum: 22760
> +    description: Optional load capacitor for XTAL1 and XTAL2
> +
>  patternProperties:
>    "^OUT[1-4]$":
>      type: object
> -- 
> 2.25.1
>
Adam Ford Feb. 10, 2021, 8:40 p.m. UTC | #3
On Wed, Feb 10, 2021 at 2:18 PM Rob Herring <robh@kernel.org> wrote:
>
> On Sun, Feb 07, 2021 at 12:51:38PM -0600, Adam Ford wrote:
> > There are two registers which can set the load capacitance for
> > XTAL1 and XTAL2. These are optional registers when using an
> > external crystal.  Since XTAL1 and XTAL2 will set to the same value,
> > update the binding to support a single property called
> > xtal-load-femtofarads.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V3:  No Change
> > V2:  No Change
> >
> > A couple people suggested that I not use the $ref, but without it,
> > the bindings check failed with errors.
> >
> > diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > index 2ac1131fd922..c268debe5b8d 100644
> > --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > @@ -59,6 +59,12 @@ properties:
> >      minItems: 1
> >      maxItems: 2
> >
> > +  idt,xtal-load-femtofarads:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
>
> Don't need a type with standard unit suffix.

If I remove that line, the binding check fails.

adam
>
> > +    minimum: 9000
> > +    maximum: 22760
> > +    description: Optional load capacitor for XTAL1 and XTAL2
> > +
> >  patternProperties:
> >    "^OUT[1-4]$":
> >      type: object
> > --
> > 2.25.1
> >
Stephen Boyd Feb. 11, 2021, 2:35 a.m. UTC | #4
Quoting Adam Ford (2021-02-10 12:40:38)
> On Wed, Feb 10, 2021 at 2:18 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Sun, Feb 07, 2021 at 12:51:38PM -0600, Adam Ford wrote:
> > > There are two registers which can set the load capacitance for
> > > XTAL1 and XTAL2. These are optional registers when using an
> > > external crystal.  Since XTAL1 and XTAL2 will set to the same value,
> > > update the binding to support a single property called
> > > xtal-load-femtofarads.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > ---
> > > V3:  No Change
> > > V2:  No Change
> > >
> > > A couple people suggested that I not use the $ref, but without it,
> > > the bindings check failed with errors.
> > >
> > > diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > index 2ac1131fd922..c268debe5b8d 100644
> > > --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > @@ -59,6 +59,12 @@ properties:
> > >      minItems: 1
> > >      maxItems: 2
> > >
> > > +  idt,xtal-load-femtofarads:
> > > +    $ref: /schemas/types.yaml#/definitions/uint32
> >
> > Don't need a type with standard unit suffix.
> 
> If I remove that line, the binding check fails.
> 

Is your dt-schema up to date?
Rob Herring (Arm) Feb. 11, 2021, 2:52 p.m. UTC | #5
On Wed, Feb 10, 2021 at 2:40 PM Adam Ford <aford173@gmail.com> wrote:
>
> On Wed, Feb 10, 2021 at 2:18 PM Rob Herring <robh@kernel.org> wrote:
> >
> > On Sun, Feb 07, 2021 at 12:51:38PM -0600, Adam Ford wrote:
> > > There are two registers which can set the load capacitance for
> > > XTAL1 and XTAL2. These are optional registers when using an
> > > external crystal.  Since XTAL1 and XTAL2 will set to the same value,
> > > update the binding to support a single property called
> > > xtal-load-femtofarads.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > ---
> > > V3:  No Change
> > > V2:  No Change
> > >
> > > A couple people suggested that I not use the $ref, but without it,
> > > the bindings check failed with errors.
> > >
> > > diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > index 2ac1131fd922..c268debe5b8d 100644
> > > --- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > +++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
> > > @@ -59,6 +59,12 @@ properties:
> > >      minItems: 1
> > >      maxItems: 2
> > >
> > > +  idt,xtal-load-femtofarads:
> > > +    $ref: /schemas/types.yaml#/definitions/uint32
> >
> > Don't need a type with standard unit suffix.
>
> If I remove that line, the binding check fails.

Ah, looks like femtofarads got added to property-units.txt but not the
schemas. I'll add it, but fine to leave this as-is for now.

Reviewed-by: Rob Herring <robh@kernel.org>

Rob
Stephen Boyd Feb. 11, 2021, 8:09 p.m. UTC | #6
Quoting Adam Ford (2021-02-07 10:51:38)
> There are two registers which can set the load capacitance for
> XTAL1 and XTAL2. These are optional registers when using an
> external crystal.  Since XTAL1 and XTAL2 will set to the same value,
> update the binding to support a single property called
> xtal-load-femtofarads.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---

Applied to clk-next
Stephen Boyd Feb. 11, 2021, 8:10 p.m. UTC | #7
Quoting Adam Ford (2021-02-07 10:51:39)
> There are two registers which can set the load capacitance for
> XTAL1 and XTAL2. These are optional registers when using an
> external crystal.  Parse the device tree and set the
> corresponding registers accordingly.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
index 2ac1131fd922..c268debe5b8d 100644
--- a/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
+++ b/Documentation/devicetree/bindings/clock/idt,versaclock5.yaml
@@ -59,6 +59,12 @@  properties:
     minItems: 1
     maxItems: 2
 
+  idt,xtal-load-femtofarads:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 9000
+    maximum: 22760
+    description: Optional load capacitor for XTAL1 and XTAL2
+
 patternProperties:
   "^OUT[1-4]$":
     type: object