Skip to contentSkip to conversation

add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

PATCH New Ying-Chun Liu 2 participants 5 messages Jan 15, 2021 – Jan 28, 2021 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

v2 cover add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger.

Ying-Chun Liu (PaulLiu) (2):
rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc
doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtc

v2: porting to latest master

 .../rtc/abracon,abx80x.txt                    |  31 +
 drivers/rtc/Kconfig                           |   9 +
 drivers/rtc/Makefile                          |   1 +
 drivers/rtc/abx80x.c                          | 553 ++++++++++++++++++
 4 files changed, 594 insertions(+)
 create mode 100644 doc/device-tree-bindings/rtc/abracon,abx80x.txt
 create mode 100644 drivers/rtc/abx80x.c
Signature · 1 line
2.29.2
#1 lore raw

PATCH v2 1/2 rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger.

---
v2: ported to latest master

---
 drivers/rtc/Kconfig  |   9 +
 drivers/rtc/Makefile |   1 +
 drivers/rtc/abx80x.c | 553 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 563 insertions(+)
 create mode 100644 drivers/rtc/abx80x.c
drivers/rtc/Kconfig +9 -0
index cad667a404..aa6d90158c 100644
@@ -166,4 +166,13 @@ config RTC_STM32
 	help
 	  Enable STM32 RTC driver. This driver supports the rtc that is present
 	  on some STM32 SoCs.
+
+config RTC_ABX80X
+	bool "Enable Abracon ABx80x RTC driver"
+	depends on DM_RTC
+	help
+	  If you say yes here you get support for Abracon AB080X and AB180X
+	  families of ultra-low-power  battery- and capacitor-backed real-time
+	  clock chips.
+
 endmenu
drivers/rtc/Makefile +1 -0
index ef66dc4bf0..6a45a9c874 100644
@@ -55,3 +55,4 @@ obj-$(CONFIG_RTC_S35392A) += s35392a.o
 obj-$(CONFIG_RTC_STM32) += stm32_rtc.o
 obj-$(CONFIG_SANDBOX) += sandbox_rtc.o
 obj-$(CONFIG_RTC_X1205) += x1205.o
+obj-$(CONFIG_RTC_ABX80X) += abx80x.o
drivers/rtc/abx80x.c new file +553 -0

553 lines not on this page · raw message

Signature · 1 line
2.29.2
#2 lore raw

PATCH v2 1/2 rtc: add rtc-abx80x, a driver for the Abracon AB x80x i2c rtc

Quoted 8 lines · Ying-Chun Liu

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

This is a basic driver for the ultra-low-power Abracon AB x80x series of RTC chips. It supports in particular, the supersets AB0805 and AB1805. It allows reading and writing the time, and enables the supercapacitor or battery charger.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210128/480758f0/attachment.sig>
#3 lore raw

PATCH v2 2/2 doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtc

In reply to Ying-Chun Liu

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

Document the bindings for abracon,abx80x and related compatibles.

---
v2: nothing changed

---
 .../rtc/abracon,abx80x.txt                    | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 doc/device-tree-bindings/rtc/abracon,abx80x.txt
doc/device-tree-bindings/rtc/abracon,abx80x.txt new file +31 -0
new file mode 100644
index 0000000000..2405e35a1b
@@ -0,0 +1,31 @@
+Abracon ABX80X I2C ultra low power RTC/Alarm chip
+
+The Abracon ABX80X family consist of the ab0801, ab0803, ab0804, ab0805, ab1801,
+ab1803, ab1804 and ab1805. The ab0805 is the superset of ab080x and the ab1805
+is the superset of ab180x.
+
+Required properties:
+
+ - "compatible": should one of:
+        "abracon,abx80x"
+        "abracon,ab0801"
+        "abracon,ab0803"
+        "abracon,ab0804"
+        "abracon,ab0805"
+        "abracon,ab1801"
+        "abracon,ab1803"
+        "abracon,ab1804"
+        "abracon,ab1805"
+        "microcrystal,rv1805"
+	Using "abracon,abx80x" will enable chip autodetection.
+ - "reg": I2C bus address of the device
+
+Optional properties:
+
+The abx804 and abx805 have a trickle charger that is able to charge the
+connected battery or supercap. Both the following properties have to be defined
+and valid to enable charging:
+
+ - "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
+ - "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
+                          resistor, the other values are in kOhm.
Signature · 1 line
2.29.2
#4 lore raw

PATCH v2 2/2 doc: device-tree-bindings: rtc: Abracon AB x80x i2c rtc

Quoted 5 lines · Ying-Chun Liu

From: "Ying-Chun Liu (PaulLiu)" <[email protected]>

Document the bindings for abracon,abx80x and related compatibles.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210128/eecca887/attachment.sig>