From 35d0ab2c63d0ce81e1f72e2367c795e3d18aaa7f Mon Sep 17 00:00:00 2001
From: Tobias Poganiuch <tobias.poganiuch@garz-fricke.com>
Date: Thu, 7 Jul 2022 15:38:05 +0200
Subject: [PATCH] tanaro:rtcs: Added overlays for the TANARO RTCs

The TANARO will be produced with one of two RTC variants.
One of them will be activated during the installation by
applying one of the overlays.

BCS 746-000877

(cherry picked from commit 9b1710b28582ce4b4280d753d32a2186a46d8b10)
---
 arch/arm64/boot/dts/seconorth/Makefile            |  4 +++-
 arch/arm64/boot/dts/seconorth/pcf8563-overlay.dts | 10 ++++++++++
 arch/arm64/boot/dts/seconorth/rx8803-overlay.dts  | 10 ++++++++++
 arch/arm64/boot/dts/seconorth/tanaro.dtsi         | 12 ++++++------
 4 files changed, 29 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm64/boot/dts/seconorth/pcf8563-overlay.dts
 create mode 100644 arch/arm64/boot/dts/seconorth/rx8803-overlay.dts

diff --git a/arch/arm64/boot/dts/seconorth/Makefile b/arch/arm64/boot/dts/seconorth/Makefile
index a5719e766ef53..b76b36a049f6a 100644
--- a/arch/arm64/boot/dts/seconorth/Makefile
+++ b/arch/arm64/boot/dts/seconorth/Makefile
@@ -8,6 +8,8 @@ dtb-y += 	\
 			seconorth-trizeps8plus-dual-espresso.dts \
 			seconorth-trizeps8plus-hdmi-gpu.dts \
 			seconorth-trizeps8plus-pconxs_v3-atm0700.dts \
+			pcf8563-overlay.dtbo \
+			rx8803-overlay.dtbo \
 
 always		:= $(dtb-y)
-clean-files	:= *.dtb
+clean-files	:= *.dtb *.dtbo
diff --git a/arch/arm64/boot/dts/seconorth/pcf8563-overlay.dts b/arch/arm64/boot/dts/seconorth/pcf8563-overlay.dts
new file mode 100644
index 0000000000000..6ae69ccc5bc8a
--- /dev/null
+++ b/arch/arm64/boot/dts/seconorth/pcf8563-overlay.dts
@@ -0,0 +1,10 @@
+/*
+ * Copyright 2022 SECO Northern Europe GmbH
+ */
+
+/dts-v1/;
+/plugin/;
+
+&rtc_pcf8563 {
+    status = "okay";
+};
diff --git a/arch/arm64/boot/dts/seconorth/rx8803-overlay.dts b/arch/arm64/boot/dts/seconorth/rx8803-overlay.dts
new file mode 100644
index 0000000000000..afe51683d9ce2
--- /dev/null
+++ b/arch/arm64/boot/dts/seconorth/rx8803-overlay.dts
@@ -0,0 +1,10 @@
+/*
+ * Copyright 2022 SECO Northern Europe GmbH
+ */
+
+/dts-v1/;
+/plugin/;
+
+&rtc_rx8803 {
+    status = "okay";
+};
diff --git a/arch/arm64/boot/dts/seconorth/tanaro.dtsi b/arch/arm64/boot/dts/seconorth/tanaro.dtsi
index 3f21a834bf914..f5ad3d252a451 100644
--- a/arch/arm64/boot/dts/seconorth/tanaro.dtsi
+++ b/arch/arm64/boot/dts/seconorth/tanaro.dtsi
@@ -12,8 +12,8 @@ Switches:
 
 / {
 	aliases {
-		rtc0 = &rtc;
-		rtc1 = &snvs_rtc;
+		rtc0 = &rtc_rx8803;
+		rtc1 = &rtc_pcf8563;
 	};
 
 	reserved-memory {
@@ -502,11 +502,11 @@ &i2c3 { /* Internal I2C */
 	pinctrl-0 = <&pinctrl_i2c3>;
 	status = "okay";
 
-	rtc: rtc@32 {
+	rtc_rx8803: rtc@32 {
 		compatible = "epson,rx8803";
 		reg = <0x32>;
+		status = "disabled";
 		trickle-diode-disable;
-		status = "okay";
 	};
 
 	tas2552: tas2552@40 {
@@ -655,11 +655,11 @@ eeprom@50 {
 		pagesize = <32>;
 	};
 
-	rtc@51 {
+	rtc_pcf8563: rtc@51 {
 		compatible = "nxp,pcf8563";
 		reg = <0x51>;
 		status = "disabled";
-	};   
+	};
 };
 
 
-- 
GitLab