From 8688b06ae53d6f60adcdcfe3d58ad7ef0ed7dba0 Mon Sep 17 00:00:00 2001 From: Phil Elwell 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 --- 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",