1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
From 1afb520ffaf9667f18336aa4e983a2dd95462f20 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 16 Aug 2021 11:11:35 +0100
Subject: [PATCH] overlays: Add TI BQ32000 RTC support
See: https://github.com/raspberrypi/linux/issues/4531
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
arch/arm/boot/dts/overlays/README | 10 ++++++++++
.../arm/boot/dts/overlays/i2c-rtc-common.dtsi | 20 ++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1390,6 +1390,8 @@ Params: abx80x Select o
AB0801, AB0803, AB0804, AB0805,
AB1801, AB1803, AB1804, AB1805
+ bq32000 Select the TI BQ32000 device
+
ds1307 Select the DS1307 device
ds1339 Select the DS1339 device
@@ -1434,6 +1436,9 @@ Params: abx80x Select o
device must be configured to use the specified
address.
+ trickle-diode-disable Do not use the internal trickle charger diode
+ (BQ32000 only)
+
trickle-diode-type Diode type for trickle charge - "standard" or
"schottky" (ABx80x and RV1805 only)
@@ -1455,6 +1460,8 @@ Params: abx80x Select o
AB0801, AB0803, AB0804, AB0805,
AB1801, AB1803, AB1804, AB1805
+ bq32000 Select the TI BQ32000 device
+
ds1307 Select the DS1307 device
ds1339 Select the DS1339 device
@@ -1495,6 +1502,9 @@ Params: abx80x Select o
device must be configured to use the specified
address.
+ trickle-diode-disable Do not use the internal trickle charger diode
+ (BQ32000 only)
+
trickle-diode-type Diode type for trickle charge - "standard" or
"schottky" (ABx80x and RV1805 only)
--- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
@@ -256,6 +256,21 @@
};
};
+ fragment@19 {
+ target = <&i2cbus>;
+ __dormant__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ bq32000: bq32000@68 {
+ compatible = "ti,bq32000";
+ trickle-resistor-ohms = <0>;
+ reg = <0x68>;
+ };
+ };
+ };
+
+
__overrides__ {
abx80x = <0>,"+0";
ds1307 = <0>,"+1";
@@ -276,6 +291,7 @@
pcf85063 = <0>,"+15";
pcf85063a = <0>,"+16";
s35390a = <0>,"+18";
+ bq32000 = <0>,"+19";
addr = <&abx80x>, "reg:0",
<&ds1307>, "reg:0",
@@ -288,13 +304,15 @@
<&m41t62>, "reg:0",
<&rv1805>, "reg:0",
<&s35390a>, "reg:0";
+ trickle-diode-disable = <&bq32000>,"trickle-diode-disable?";
trickle-diode-type = <&abx80x>,"abracon,tc-diode",
<&rv1805>,"abracon,tc-diode";
trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
<&ds1340>,"trickle-resistor-ohms:0",
<&abx80x>,"abracon,tc-resistor:0",
<&rv3028>,"trickle-resistor-ohms:0",
- <&rv1805>,"abracon,tc-resistor:0";
+ <&rv1805>,"abracon,tc-resistor:0",
+ <&bq32000>,"abracon,tc-resistor:0";
backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
wakeup-source = <&ds1339>,"wakeup-source?",
<&ds3231>,"wakeup-source?",
|