[PATCH 3/3] dt-bindings: rtc: add binding for RV8063

Antoni Pokusinski posted 3 patches 10 months, 1 week ago
There is a newer version of this series
[PATCH 3/3] dt-bindings: rtc: add binding for RV8063
Posted by Antoni Pokusinski 10 months, 1 week ago
Microcrystal RV8063 is a real-time clock module with SPI interface.

Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
---
 .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 33 ++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
index 2f892f8640d1..cb31c7619d66 100644
--- a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
+++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
@@ -12,6 +12,7 @@ maintainers:
 properties:
   compatible:
     enum:
+      - microcrystal,rv8063
       - microcrystal,rv8263
       - nxp,pcf85063
       - nxp,pcf85063a
@@ -44,7 +45,12 @@ properties:
 
   wakeup-source: true
 
+  spi-cs-high: true
+
+  spi-3wire: true
+
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - $ref: rtc.yaml#
   - if:
       properties:
@@ -52,6 +58,7 @@ allOf:
           contains:
             enum:
               - microcrystal,rv8263
+              - microcrystal,rv8063
     then:
       properties:
         quartz-load-femtofarads: false
@@ -65,12 +72,23 @@ allOf:
       properties:
         quartz-load-femtofarads:
           const: 7000
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              enum:
+                - microcrystal,rv8063
+    then:
+      properties:
+        spi-cs-high: false
+        spi-3wire: false
 
 required:
   - compatible
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -90,3 +108,16 @@ examples:
           };
         };
       };
+
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        rtc@0 {
+          compatible = "microcrystal,rv8063";
+          reg = <0>;
+          spi-cs-high;
+          spi-3wire;
+        };
+    };
-- 
2.25.1
Re: [PATCH 3/3] dt-bindings: rtc: add binding for RV8063
Posted by Rob Herring 10 months ago
On Mon, Apr 07, 2025 at 09:35:21PM +0200, Antoni Pokusinski wrote:
> Microcrystal RV8063 is a real-time clock module with SPI interface.
> 
> Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
> ---
>  .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 33 ++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)

Bindings come before users (driver).

> 
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> index 2f892f8640d1..cb31c7619d66 100644
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> @@ -12,6 +12,7 @@ maintainers:
>  properties:
>    compatible:
>      enum:
> +      - microcrystal,rv8063
>        - microcrystal,rv8263
>        - nxp,pcf85063
>        - nxp,pcf85063a
> @@ -44,7 +45,12 @@ properties:
>  
>    wakeup-source: true
>  
> +  spi-cs-high: true
> +
> +  spi-3wire: true
> +
>  allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
>    - $ref: rtc.yaml#
>    - if:
>        properties:
> @@ -52,6 +58,7 @@ allOf:
>            contains:
>              enum:
>                - microcrystal,rv8263
> +              - microcrystal,rv8063
>      then:
>        properties:
>          quartz-load-femtofarads: false
> @@ -65,12 +72,23 @@ allOf:
>        properties:
>          quartz-load-femtofarads:
>            const: 7000
> +  - if:
> +      properties:
> +        compatible:
> +          not:
> +            contains:
> +              enum:
> +                - microcrystal,rv8063
> +    then:
> +      properties:
> +        spi-cs-high: false
> +        spi-3wire: false
>  
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> @@ -90,3 +108,16 @@ examples:
>            };
>          };
>        };
> +
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        rtc@0 {
> +          compatible = "microcrystal,rv8063";
> +          reg = <0>;
> +          spi-cs-high;
> +          spi-3wire;
> +        };
> +    };
> -- 
> 2.25.1
>
Re: [PATCH 3/3] dt-bindings: rtc: add binding for RV8063
Posted by Antoni Pokusinski 10 months ago
On Thu, Apr 10, 2025 at 04:13:51PM -0500, Rob Herring wrote:
> On Mon, Apr 07, 2025 at 09:35:21PM +0200, Antoni Pokusinski wrote:
> > Microcrystal RV8063 is a real-time clock module with SPI interface.
> > 
> > Signed-off-by: Antoni Pokusinski <apokusinski01@gmail.com>
> > ---
> >  .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 33 ++++++++++++++++++-
> >  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> Bindings come before users (driver).
> 
Fixed in v3 already.

Kind regards,
Antoni

> > 
> > diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> > index 2f892f8640d1..cb31c7619d66 100644
> > --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> > +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> > @@ -12,6 +12,7 @@ maintainers:
> >  properties:
> >    compatible:
> >      enum:
> > +      - microcrystal,rv8063
> >        - microcrystal,rv8263
> >        - nxp,pcf85063
> >        - nxp,pcf85063a
> > @@ -44,7 +45,12 @@ properties:
> >  
> >    wakeup-source: true
> >  
> > +  spi-cs-high: true
> > +
> > +  spi-3wire: true
> > +
> >  allOf:
> > +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> >    - $ref: rtc.yaml#
> >    - if:
> >        properties:
> > @@ -52,6 +58,7 @@ allOf:
> >            contains:
> >              enum:
> >                - microcrystal,rv8263
> > +              - microcrystal,rv8063
> >      then:
> >        properties:
> >          quartz-load-femtofarads: false
> > @@ -65,12 +72,23 @@ allOf:
> >        properties:
> >          quartz-load-femtofarads:
> >            const: 7000
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          not:
> > +            contains:
> > +              enum:
> > +                - microcrystal,rv8063
> > +    then:
> > +      properties:
> > +        spi-cs-high: false
> > +        spi-3wire: false
> >  
> >  required:
> >    - compatible
> >    - reg
> >  
> > -additionalProperties: false
> > +unevaluatedProperties: false
> >  
> >  examples:
> >    - |
> > @@ -90,3 +108,16 @@ examples:
> >            };
> >          };
> >        };
> > +
> > +  - |
> > +    spi {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        rtc@0 {
> > +          compatible = "microcrystal,rv8063";
> > +          reg = <0>;
> > +          spi-cs-high;
> > +          spi-3wire;
> > +        };
> > +    };
> > -- 
> > 2.25.1
> >