[PATCH 3/4] dt-bindings: rtc: abracon,abx80x: Add xt-frequency property
From: Kirill Kapranov
Date: Sun Mar 28 2021 - 17:32:52 EST
Add the string property "xt-frequency" to control xtal calibration of the
RTC. This allows to improve the RTC accuracy using a Distributed Digital
Calibration function. See: ch. 5.9.1 of
AB08XX Series Ultra Low Power RTC IC User's Guide
https://abracon.com/realtimeclock/AB08XX-Application-Manual.pdf
Signed-off-by: Kirill Kapranov <kirill.kapranov@xxxxxxxxxxxxxx>
---
Documentation/devicetree/bindings/rtc/abracon,abx80x.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
index 4c545ece33b5..fac36db7460e 100644
--- a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
+++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
@@ -41,3 +41,16 @@ property to enable the output:
"1_min", "16384_Hz", "100_Hz", "1_hour", "1_day", "TIRQ", "nTIRQ",
"1_year", "1_Hz_to_Counters", "1/32_Hz_from_Acal", "1/8_Hz_from_Acal",
"none"
+
+The RTCs support XT calibration that allows to improve the RTC accuracy.
+To perform the calibration follow the instruction:
+
+ Write the nominal XT frequency (in milliHerz) 32768000 to
+ /sys/class/rtc/your_rtc/xt-frequency
+ to ensure the calibration is not occurring.
+ Select the XT oscillator by writing by writing xtal to
+ /sys/class/rtc/your_rtc/oscillator
+ Configure the square wave SQW output by writing
+ 32768_Hz to /sys/class/rtc/your_rtc/sqw
+ Measure the square wave frequency on the output pin in milliHerz.
+ Assign the measured value to the property xt-frequency.
--
2.11.0