public inbox for linux-rtc@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Modilaynen <pavel.modilaynen@axis.com>
To: <a.zummo@towertech.it>, <alexandre.belloni@bootlin.com>,
	<robh+dt@kernel.org>
Cc: <linux-rtc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <lkml@axis.com>,
	<kernel@axis.com>, "Pavel Modilaynen" <pavelmn@axis.com>
Subject: [PATCH 2/2] dt-bindings: rtc: Add bindings for Ricoh rs5c372
Date: Sun, 31 Oct 2021 00:50:54 +0200	[thread overview]
Message-ID: <20211030225054.32114-3-pavel.modilaynen@axis.com> (raw)
In-Reply-To: <20211030225054.32114-1-pavel.modilaynen@axis.com>

From: Pavel Modilaynen <pavelmn@axis.com>

Create new DT bindings yaml file for Ricoh rs5c372 driver
since adding property support naturally deserves it.
Place a description of this property: ricoh,trim.

Signed-off-by: Pavel Modilaynen <pavelmn@axis.com>
---
 .../bindings/rtc/ricoh,rs5c372.yaml           | 58 +++++++++++++++++++
 .../devicetree/bindings/rtc/trivial-rtc.yaml  | 12 ----
 2 files changed, 58 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/ricoh,rs5c372.yaml

diff --git a/Documentation/devicetree/bindings/rtc/ricoh,rs5c372.yaml b/Documentation/devicetree/bindings/rtc/ricoh,rs5c372.yaml
new file mode 100644
index 000000000000..6cb6a97db5d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/ricoh,rs5c372.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/ricoh,rs5c372.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ricoh RS5C372, R2025S/D, RV5C38[67] and R222[13] Real Time Clock
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+allOf:
+  - $ref: rtc.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ricoh,r2025sd
+      - ricoh,r2221tl
+      - ricoh,rs5c372a
+      - ricoh,rs5c372b
+      - ricoh,rv5c386
+      - ricoh,rv5c387a
+
+  reg:
+    maxItems: 1
+
+  ricoh,trim:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    description: |
+      Raw value of Oscillation Adjustment Register (0x7) which changes
+      time counts of 1 second. Normally, the second counter is incremented
+      once per 32768 clock pulses. The value causes to increment
+      decrement time counts when second digits read 00, 20, 40 seconds
+      (R222[13] can operate on 00 seconds if MSB set).
+      See datasheets for details.
+
+  start-year: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        rtc@32 {
+            compatible = "ricoh,r2221tl";
+            reg = <0x32>;
+            ricoh,trim = /bits/ 8 <0x23>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index 13925bb78ec7..aeabede89654 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -55,18 +55,6 @@ properties:
       - nxp,pcf2129
       # Real-time Clock Module
       - pericom,pt7c4338
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,r2025sd
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,r2221tl
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,rs5c372a
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,rs5c372b
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,rv5c386
-      # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-      - ricoh,rv5c387a
       # 2-wire CMOS real-time clock
       - sii,s35390a
       # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-- 
2.20.1


      parent reply	other threads:[~2021-10-30 22:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30 22:50 [PATCH 0/2] *** Ricoh RS5C372: add support for Xtal trimming configuration *** Pavel Modilaynen
2021-10-30 22:50 ` [PATCH 1/2] rtc: rs5c372: Add support for trim configuration Pavel Modilaynen
2021-10-30 22:57   ` Alexandre Belloni
2021-10-31 10:29     ` Pavel Modilaynen
2021-11-01 18:23       ` Alexandre Belloni
2021-11-01 23:14         ` Pavel Modilaynen
2021-11-05 15:26           ` Alexandre Belloni
2021-10-30 22:50 ` Pavel Modilaynen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211030225054.32114-3-pavel.modilaynen@axis.com \
    --to=pavel.modilaynen@axis.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@axis.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=lkml@axis.com \
    --cc=pavelmn@axis.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox