1 From 8c16d549cd0b9e9cf890ac3ead5d58d92590140f Mon Sep 17 00:00:00 2001
2 From: "Kevin P. Fleming" <kevin+linux@km6g.us>
3 Date: Mon, 1 Jun 2020 07:02:00 -0400
4 Subject: [PATCH] Add Micro Crystal RV-1805 to i2c-rtc overlays
6 While the RV-1805 is supported by the rtc-abx80x driver via
7 auto-detection, in order for it to be initialized properly
8 it must be explcitly selected.
10 Signed-off-by: Kevin P. Fleming <kevin+linux@km6g.us>
12 arch/arm/boot/dts/overlays/README | 12 +++++---
13 .../dts/overlays/i2c-rtc-gpio-overlay.dts | 28 ++++++++++++++++---
14 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 27 ++++++++++++++++--
15 3 files changed, 56 insertions(+), 11 deletions(-)
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -1196,6 +1196,8 @@ Params: abx80x Select o
21 pcf8563 Select the PCF8563 device
23 + rv1805 Select the Micro Crystal RV1805 device
25 rv3028 Select the Micro Crystal RV3028 device
27 addr Sets the address for the RTC. Note that the
28 @@ -1203,10 +1205,10 @@ Params: abx80x Select o
31 trickle-diode-type Diode type for trickle charge - "standard" or
32 - "schottky" (ABx80x only)
33 + "schottky" (ABx80x and RV1805 only)
35 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
37 + ABx80x, RV1805, RV3028)
39 wakeup-source Specify that the RTC can be used as a wakeup
41 @@ -1243,6 +1245,8 @@ Params: abx80x Select o
43 pcf8563 Select the PCF8563 device
45 + rv1805 Select the Micro Crystal RV1805 device
47 rv3028 Select the Micro Crystal RV3028 device
49 addr Sets the address for the RTC. Note that the
50 @@ -1250,10 +1254,10 @@ Params: abx80x Select o
53 trickle-diode-type Diode type for trickle charge - "standard" or
54 - "schottky" (ABx80x only)
55 + "schottky" (ABx80x and RV1805 only)
57 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
59 + ABx80x, RV1805, RV3028)
61 wakeup-source Specify that the RTC can be used as a wakeup
63 --- a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
64 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
70 + target = <&i2c_gpio>;
72 + #address-cells = <1>;
77 + compatible = "microcrystal,rv1805";
79 + abracon,tc-diode = "standard";
80 + abracon,tc-resistor = <0>;
95 addr = <&abx80x>, "reg:0",
101 - <&m41t62>, "reg:0";
103 - trickle-diode-type = <&abx80x>,"abracon,tc-diode";
104 + <&m41t62>, "reg:0",
105 + <&rv1805>, "reg:0";
106 + trickle-diode-type = <&abx80x>,"abracon,tc-diode",
107 + <&rv1805>,"abracon,tc-diode";
108 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
109 <&abx80x>,"abracon,tc-resistor:0",
110 - <&rv3028>,"trickle-resistor-ohms:0";
111 + <&rv3028>,"trickle-resistor-ohms:0",
112 + <&rv1805>,"abracon,tc-resistor:0";
113 backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
114 wakeup-source = <&ds1339>,"wakeup-source?",
115 <&ds3231>,"wakeup-source?",
116 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
117 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
123 + target = <&i2c_arm>;
125 + #address-cells = <1>;
129 + rv1805: rv1805@69 {
130 + compatible = "microcrystal,rv1805";
132 + abracon,tc-diode = "standard";
133 + abracon,tc-resistor = <0>;
145 pcf85363 = <0>,"+12";
146 + rv1805 = <0>,"+13";
148 addr = <&abx80x>, "reg:0",
150 @@ -226,11 +244,14 @@
151 <&mcp7941x>, "reg:0",
154 - <&m41t62>, "reg:0";
155 - trickle-diode-type = <&abx80x>,"abracon,tc-diode";
156 + <&m41t62>, "reg:0",
157 + <&rv1805>, "reg:0";
158 + trickle-diode-type = <&abx80x>,"abracon,tc-diode",
159 + <&rv1805>,"abracon,tc-diode";
160 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
161 <&abx80x>,"abracon,tc-resistor:0",
162 - <&rv3028>,"trickle-resistor-ohms:0";
163 + <&rv3028>,"trickle-resistor-ohms:0",
164 + <&rv1805>,"abracon,tc-resistor:0";
165 backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
166 wakeup-source = <&ds1339>,"wakeup-source?",
167 <&ds3231>,"wakeup-source?",