openwrt/target/linux/bcm27xx/patches-5.4/950-0981-overlays-Add-sd3078-to-the-i2c-rtc-overlay.patch
Álvaro Fernández Rojas 62b7f5931c bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commit f07e572f64)
2021-02-19 07:17:21 +01:00

59 lines
1.6 KiB
Diff

From 8688b06ae53d6f60adcdcfe3d58ad7ef0ed7dba0 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 5 Oct 2020 16:10:26 +0100
Subject: [PATCH] overlays: Add sd3078 to the i2c-rtc overlay
Add support for the SD3078 RTC to the i2c-rtc overlay.
See: https://github.com/raspberrypi/linux/issues/3881
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
arch/arm/boot/dts/overlays/README | 2 ++
arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1232,6 +1232,8 @@ Params: abx80x Select o
rv3028 Select the Micro Crystal RV3028 device
+ sd3078 Select the ZXW Shenzhen whwave SD3078 device
+
addr Sets the address for the RTC. Note that the
device must be configured to use the specified
address.
--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
@@ -220,6 +220,21 @@
};
};
+ fragment@14 {
+ target = <&i2c_arm>;
+ __dormant__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ sd3078: sd3078@32 {
+ compatible = "whwave,sd3078";
+ reg = <0x32>;
+ status = "okay";
+ };
+ };
+ };
+
__overrides__ {
abx80x = <0>,"+0";
ds1307 = <0>,"+1";
@@ -235,6 +250,7 @@
pcf2129 = <0>,"+11";
pcf85363 = <0>,"+12";
rv1805 = <0>,"+13";
+ sd3078 = <0>,"+14";
addr = <&abx80x>, "reg:0",
<&ds1307>, "reg:0",