1 From 2308f60bb68de69306c542de3983be0007cad37b Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 15 Jul 2019 10:39:05 +0100
4 Subject: [PATCH] overlays: Add PCF2129 RTC
6 Add support for the PCF2129 RTC to i2c-rtc and i2c-rtc-gpio overlays.
7 Also add rv3028 to i2c-rtc-gpio (it was missed previously), and don't
8 attempt to set an alternate address for the PCF2127.
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
12 arch/arm/boot/dts/overlays/README | 11 ++++-
13 .../dts/overlays/i2c-rtc-gpio-overlay.dts | 41 +++++++++++++++++--
14 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 19 ++++++++-
15 3 files changed, 64 insertions(+), 7 deletions(-)
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -1022,6 +1022,8 @@ Params: abx80x Select o
21 pcf2127 Select the PCF2127 device
23 + pcf2129 Select the PCF2129 device
25 pcf8523 Select the PCF8523 device
27 pcf8563 Select the PCF8563 device
28 @@ -1067,10 +1069,14 @@ Params: abx80x Select o
30 pcf2127 Select the PCF2127 device
32 + pcf2129 Select the PCF2129 device
34 pcf8523 Select the PCF8523 device
36 pcf8563 Select the PCF8563 device
38 + rv3028 Select the Micro Crystal RV3028 device
40 addr Sets the address for the RTC. Note that the
41 device must be configured to use the specified
43 @@ -1079,11 +1085,14 @@ Params: abx80x Select o
44 "schottky" (ABx80x only)
46 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
50 wakeup-source Specify that the RTC can be used as a wakeup
53 + backup-switchover-mode Backup power supply switch mode. Must be 0 for
54 + off or 1 for Vdd < VBackup (RV3028 only)
56 i2c_gpio_sda GPIO used for I2C data (default "23")
58 i2c_gpio_scl GPIO used for I2C clock (default "24")
59 --- a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
60 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
65 - pcf2127: pcf2127@51 {
67 compatible = "nxp,pcf2127";
75 + target = <&i2c_gpio>;
77 + #address-cells = <1>;
82 + compatible = "microcrystal,rv3028";
90 + target = <&i2c_gpio>;
92 + #address-cells = <1>;
97 + compatible = "nxp,pcf2129";
111 + rv3028 = <0>,"+11";
112 + pcf2129 = <0>,"+12";
114 addr = <&abx80x>, "reg:0",
116 @@ -192,18 +224,19 @@
118 <&mcp7940x>, "reg:0",
119 <&mcp7941x>, "reg:0",
120 - <&pcf2127>, "reg:0",
125 trickle-diode-type = <&abx80x>,"abracon,tc-diode";
126 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
127 - <&abx80x>,"abracon,tc-resistor";
128 + <&abx80x>,"abracon,tc-resistor",
129 + <&rv3028>,"trickle-resistor-ohms:0";
130 + backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
131 wakeup-source = <&ds1339>,"wakeup-source?",
132 <&ds3231>,"wakeup-source?",
133 <&mcp7940x>,"wakeup-source?",
134 - <&mcp7941x>,"wakeup-source?";
135 + <&mcp7941x>,"wakeup-source?";
136 i2c_gpio_sda = <&i2c_gpio>,"gpios:4";
137 i2c_gpio_scl = <&i2c_gpio>,"gpios:16";
138 i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0";
139 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
140 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
145 - pcf2127: pcf2127@51 {
147 compatible = "nxp,pcf2127";
155 + target = <&i2c_arm>;
157 + #address-cells = <1>;
162 + compatible = "nxp,pcf2129";
176 + pcf2129 = <0>,"+11";
178 addr = <&abx80x>, "reg:0",
182 <&mcp7940x>, "reg:0",
183 <&mcp7941x>, "reg:0",
184 - <&pcf2127>, "reg:0",