[PATCH 2/2] dt-bindings: rtc: Add bindings for Ricoh rs5c372

From: Pavel Modilaynen
Date: Sat Oct 30 2021 - 18:52:36 EST


From: Pavel Modilaynen <pavelmn@xxxxxxxx>

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@xxxxxxxx>
---
.../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@xxxxxxxxxxx>
+
+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