diff mbox series

[28/43] dt-bindings: rtc: Add DT binding m48t86 rtc

Message ID 20230424123522.18302-29-nikita.shubin@maquefel.me
State New
Headers show
Series ep93xx device tree conversion | expand

Commit Message

Nikita Shubin April 24, 2023, 12:34 p.m. UTC
Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 .../bindings/rtc/dallas,rtc-m48t86.yaml       | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml

Comments

Rob Herring (Arm) April 24, 2023, 4:25 p.m. UTC | #1
On Mon, Apr 24, 2023 at 03:34:44PM +0300, Nikita Shubin wrote:
> Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
> 
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>  .../bindings/rtc/dallas,rtc-m48t86.yaml       | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> 
> diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> new file mode 100644
> index 000000000000..51f98bdbc385
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST M48T86 / Dallas DS12887 RTC bindings
> +
> +maintainers:
> +  - Alessandro Zummo <a.zummo@towertech.it>
> +
> +properties:
> +  compatible:
> +    const: dallas,rtc-m48t86

'rtc-' is redundant. And haven't you mixed up the vendor and part 
number? It should be dallas,ds12887 and/or st,m48t86?

This can probably go in the trivial rtc binding.

> +
> +  reg:
> +    maxItems: 2
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    rtc1: rtc@10800000 {

Drop unused labels.

> +        compatible = "dallas,rtc-m48t86";
> +        reg = <0x10800000 0x1>, <0x11700000 0x1>;
> +    };
> +
> +...
> +
> -- 
> 2.39.2
>
Alexandre Belloni April 24, 2023, 4:40 p.m. UTC | #2
On 24/04/2023 11:25:48-0500, Rob Herring wrote:
> On Mon, Apr 24, 2023 at 03:34:44PM +0300, Nikita Shubin wrote:
> > Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >  .../bindings/rtc/dallas,rtc-m48t86.yaml       | 33 +++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> > new file mode 100644
> > index 000000000000..51f98bdbc385
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> > @@ -0,0 +1,33 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ST M48T86 / Dallas DS12887 RTC bindings
> > +
> > +maintainers:
> > +  - Alessandro Zummo <a.zummo@towertech.it>
> > +
> > +properties:
> > +  compatible:
> > +    const: dallas,rtc-m48t86
> 
> 'rtc-' is redundant. And haven't you mixed up the vendor and part 
> number? It should be dallas,ds12887 and/or st,m48t86?
> 
> This can probably go in the trivial rtc binding.
> 

I was wonderign, is this trivial, even with two regs?

> > +
> > +  reg:
> > +    maxItems: 2
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    rtc1: rtc@10800000 {
> 
> Drop unused labels.
> 
> > +        compatible = "dallas,rtc-m48t86";
> > +        reg = <0x10800000 0x1>, <0x11700000 0x1>;
> > +    };
> > +
> > +...
> > +
> > -- 
> > 2.39.2
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
new file mode 100644
index 000000000000..51f98bdbc385
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
@@ -0,0 +1,33 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST M48T86 / Dallas DS12887 RTC bindings
+
+maintainers:
+  - Alessandro Zummo <a.zummo@towertech.it>
+
+properties:
+  compatible:
+    const: dallas,rtc-m48t86
+
+  reg:
+    maxItems: 2
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc1: rtc@10800000 {
+        compatible = "dallas,rtc-m48t86";
+        reg = <0x10800000 0x1>, <0x11700000 0x1>;
+    };
+
+...
+