brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0340-overlays-Add-rv3028-to-i2c-rtc.patch
1 From 67dd8e4c8ccf5d331960c7e936e5b03a9f92496d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 28 Mar 2019 13:26:59 +0000
4 Subject: [PATCH] overlays: Add rv3028 to i2c-rtc
5
6 See: https://github.com/raspberrypi/linux/issues/2912
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
9 ---
10 arch/arm/boot/dts/overlays/README | 4 +++-
11 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 19 ++++++++++++++++++-
12 2 files changed, 21 insertions(+), 2 deletions(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -939,6 +939,8 @@ Params: abx80x Select o
17
18 pcf8563 Select the PCF8563 device
19
20 + rv3028 Select the Micro Crystal RV3028 device
21 +
22 addr Sets the address for the RTC. Note that the
23 device must be configured to use the specified
24 address.
25 @@ -947,7 +949,7 @@ Params: abx80x Select o
26 "schottky" (ABx80x only)
27
28 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
29 - ABx80x)
30 + ABx80x, RV3028)
31
32 wakeup-source Specify that the RTC can be used as a wakeup
33 source
34 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
35 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
36 @@ -158,6 +158,21 @@
37 };
38 };
39
40 + fragment@10 {
41 + target = <&i2c_arm>;
42 + __dormant__ {
43 + #address-cells = <1>;
44 + #size-cells = <0>;
45 + status = "okay";
46 +
47 + rv3028: rv3028@52 {
48 + compatible = "microcrystal,rv3028";
49 + reg = <0x52>;
50 + status = "okay";
51 + };
52 + };
53 + };
54 +
55 __overrides__ {
56 abx80x = <0>,"+0";
57 ds1307 = <0>,"+1";
58 @@ -169,6 +184,7 @@
59 pcf8523 = <0>,"+7";
60 pcf8563 = <0>,"+8";
61 m41t62 = <0>,"+9";
62 + rv3028 = <0>,"+10";
63
64 addr = <&abx80x>, "reg:0",
65 <&ds1307>, "reg:0",
66 @@ -182,7 +198,8 @@
67 <&m41t62>, "reg:0";
68 trickle-diode-type = <&abx80x>,"abracon,tc-diode";
69 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
70 - <&abx80x>,"abracon,tc-resistor";
71 + <&abx80x>,"abracon,tc-resistor",
72 + <&rv3028>,"trickle-resistor-ohms:0";
73 wakeup-source = <&ds1339>,"wakeup-source?",
74 <&ds3231>,"wakeup-source?",
75 <&mcp7940x>,"wakeup-source?",