bcm27xx: import latest patches from the RPi foundation
[openwrt/staging/ynezz.git] / target / linux / bcm27xx / patches-5.4 / 950-0981-overlays-Add-sd3078-to-the-i2c-rtc-overlay.patch
1 From 8688b06ae53d6f60adcdcfe3d58ad7ef0ed7dba0 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 5 Oct 2020 16:10:26 +0100
4 Subject: [PATCH] overlays: Add sd3078 to the i2c-rtc overlay
5
6 Add support for the SD3078 RTC to the i2c-rtc overlay.
7
8 See: https://github.com/raspberrypi/linux/issues/3881
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
11 ---
12 arch/arm/boot/dts/overlays/README | 2 ++
13 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 16 ++++++++++++++++
14 2 files changed, 18 insertions(+)
15
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1232,6 +1232,8 @@ Params: abx80x Select o
19
20 rv3028 Select the Micro Crystal RV3028 device
21
22 + sd3078 Select the ZXW Shenzhen whwave SD3078 device
23 +
24 addr Sets the address for the RTC. Note that the
25 device must be configured to use the specified
26 address.
27 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
28 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
29 @@ -220,6 +220,21 @@
30 };
31 };
32
33 + fragment@14 {
34 + target = <&i2c_arm>;
35 + __dormant__ {
36 + #address-cells = <1>;
37 + #size-cells = <0>;
38 + status = "okay";
39 +
40 + sd3078: sd3078@32 {
41 + compatible = "whwave,sd3078";
42 + reg = <0x32>;
43 + status = "okay";
44 + };
45 + };
46 + };
47 +
48 __overrides__ {
49 abx80x = <0>,"+0";
50 ds1307 = <0>,"+1";
51 @@ -235,6 +250,7 @@
52 pcf2129 = <0>,"+11";
53 pcf85363 = <0>,"+12";
54 rv1805 = <0>,"+13";
55 + sd3078 = <0>,"+14";
56
57 addr = <&abx80x>, "reg:0",
58 <&ds1307>, "reg:0",