Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
		
			
				
	
	
		
			919 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			919 lines
		
	
	
		
			18 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 299e9ffda004d3f5f722ebbd04be0250a618203a Mon Sep 17 00:00:00 2001
 | 
						|
From: Phil Elwell <phil@raspberrypi.com>
 | 
						|
Date: Wed, 30 Jun 2021 17:03:00 +0100
 | 
						|
Subject: [PATCH] overlays: Make i2c-rtc and i2c-rtc-gpio share RTCs
 | 
						|
 | 
						|
Lift the set of RTCs out of i2c-rtc and i2c-rtc-gpio to update
 | 
						|
i2c-rtc-gpio and to reduce duplication.
 | 
						|
 | 
						|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
 | 
						|
---
 | 
						|
 arch/arm/boot/dts/overlays/README             |  10 +
 | 
						|
 .../arm/boot/dts/overlays/i2c-rtc-common.dtsi | 290 ++++++++++++++++++
 | 
						|
 .../dts/overlays/i2c-rtc-gpio-overlay.dts     | 249 +--------------
 | 
						|
 .../arm/boot/dts/overlays/i2c-rtc-overlay.dts | 287 +----------------
 | 
						|
 4 files changed, 309 insertions(+), 527 deletions(-)
 | 
						|
 create mode 100644 arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
 | 
						|
 | 
						|
--- a/arch/arm/boot/dts/overlays/README
 | 
						|
+++ b/arch/arm/boot/dts/overlays/README
 | 
						|
@@ -1445,6 +1445,8 @@ Params: abx80x                  Select o
 | 
						|
 
 | 
						|
         ds1339                  Select the DS1339 device
 | 
						|
 
 | 
						|
+        ds1340                  Select the DS1340 device
 | 
						|
+
 | 
						|
         ds3231                  Select the DS3231 device
 | 
						|
 
 | 
						|
         m41t62                  Select the M41T62 device
 | 
						|
@@ -1457,14 +1459,22 @@ Params: abx80x                  Select o
 | 
						|
 
 | 
						|
         pcf2129                 Select the PCF2129 device
 | 
						|
 
 | 
						|
+        pcf85063                Select the PCF85063 device
 | 
						|
+
 | 
						|
+        pcf85063a               Select the PCF85063A device
 | 
						|
+
 | 
						|
         pcf8523                 Select the PCF8523 device
 | 
						|
 
 | 
						|
+        pcf85363                Select the PCF85363 device
 | 
						|
+
 | 
						|
         pcf8563                 Select the PCF8563 device
 | 
						|
 
 | 
						|
         rv1805                  Select the Micro Crystal RV1805 device
 | 
						|
 
 | 
						|
         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.
 | 
						|
--- /dev/null
 | 
						|
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
 | 
						|
@@ -0,0 +1,290 @@
 | 
						|
+// Definitions for several I2C based Real Time Clocks
 | 
						|
+
 | 
						|
+/ {
 | 
						|
+	compatible = "brcm,bcm2835";
 | 
						|
+
 | 
						|
+	fragment@0 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			abx80x: abx80x@69 {
 | 
						|
+				compatible = "abracon,abx80x";
 | 
						|
+				reg = <0x69>;
 | 
						|
+				abracon,tc-diode = "standard";
 | 
						|
+				abracon,tc-resistor = <0>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@1 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			ds1307: ds1307@68 {
 | 
						|
+				compatible = "dallas,ds1307";
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@2 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			ds1339: ds1339@68 {
 | 
						|
+				compatible = "dallas,ds1339";
 | 
						|
+				trickle-resistor-ohms = <0>;
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@3 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			ds3231: ds3231@68 {
 | 
						|
+				compatible = "maxim,ds3231";
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@4 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			mcp7940x: mcp7940x@6f {
 | 
						|
+				compatible = "microchip,mcp7940x";
 | 
						|
+				reg = <0x6f>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@5 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			mcp7941x: mcp7941x@6f {
 | 
						|
+				compatible = "microchip,mcp7941x";
 | 
						|
+				reg = <0x6f>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@6 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf2127@51 {
 | 
						|
+				compatible = "nxp,pcf2127";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@7 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf8523: pcf8523@68 {
 | 
						|
+				compatible = "nxp,pcf8523";
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@8 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf8563: pcf8563@51 {
 | 
						|
+				compatible = "nxp,pcf8563";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@9 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			m41t62: m41t62@68 {
 | 
						|
+				compatible = "st,m41t62";
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@10 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			rv3028: rv3028@52 {
 | 
						|
+				compatible = "microcrystal,rv3028";
 | 
						|
+				reg = <0x52>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@11 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf2129@51 {
 | 
						|
+				compatible = "nxp,pcf2129";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@12 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+	       __dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf85363@51 {
 | 
						|
+				compatible = "nxp,pcf85363";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@13 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			rv1805: rv1805@69 {
 | 
						|
+				compatible = "microcrystal,rv1805";
 | 
						|
+				reg = <0x69>;
 | 
						|
+				abracon,tc-diode = "standard";
 | 
						|
+				abracon,tc-resistor = <0>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@14 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			sd3078: sd3078@32 {
 | 
						|
+				compatible = "whwave,sd3078";
 | 
						|
+				reg = <0x32>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@15 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+	       __dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf85063@51 {
 | 
						|
+				compatible = "nxp,pcf85063";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@16 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+	       __dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			pcf85063a@51 {
 | 
						|
+				compatible = "nxp,pcf85063a";
 | 
						|
+				reg = <0x51>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	fragment@17 {
 | 
						|
+		target = <&i2cbus>;
 | 
						|
+		__dormant__ {
 | 
						|
+			#address-cells = <1>;
 | 
						|
+			#size-cells = <0>;
 | 
						|
+
 | 
						|
+			ds1340: ds1340@68 {
 | 
						|
+				compatible = "dallas,ds1340";
 | 
						|
+				trickle-resistor-ohms = <0>;
 | 
						|
+				reg = <0x68>;
 | 
						|
+			};
 | 
						|
+		};
 | 
						|
+	};
 | 
						|
+
 | 
						|
+	__overrides__ {
 | 
						|
+		abx80x = <0>,"+0";
 | 
						|
+		ds1307 = <0>,"+1";
 | 
						|
+		ds1339 = <0>,"+2";
 | 
						|
+		ds1340 = <0>,"+17";
 | 
						|
+		ds3231 = <0>,"+3";
 | 
						|
+		mcp7940x = <0>,"+4";
 | 
						|
+		mcp7941x = <0>,"+5";
 | 
						|
+		pcf2127 = <0>,"+6";
 | 
						|
+		pcf8523 = <0>,"+7";
 | 
						|
+		pcf8563 = <0>,"+8";
 | 
						|
+		m41t62 = <0>,"+9";
 | 
						|
+		rv3028 = <0>,"+10";
 | 
						|
+		pcf2129 = <0>,"+11";
 | 
						|
+		pcf85363 = <0>,"+12";
 | 
						|
+		rv1805 = <0>,"+13";
 | 
						|
+		sd3078 = <0>,"+14";
 | 
						|
+		pcf85063 = <0>,"+15";
 | 
						|
+		pcf85063a = <0>,"+16";
 | 
						|
+
 | 
						|
+		addr = <&abx80x>, "reg:0",
 | 
						|
+		       <&ds1307>, "reg:0",
 | 
						|
+		       <&ds1339>, "reg:0",
 | 
						|
+		       <&ds3231>, "reg:0",
 | 
						|
+		       <&mcp7940x>, "reg:0",
 | 
						|
+		       <&mcp7941x>, "reg:0",
 | 
						|
+		       <&pcf8523>, "reg:0",
 | 
						|
+		       <&pcf8563>, "reg:0",
 | 
						|
+		       <&m41t62>, "reg:0",
 | 
						|
+		       <&rv1805>, "reg:0";
 | 
						|
+		trickle-diode-type = <&abx80x>,"abracon,tc-diode",
 | 
						|
+				     <&rv1805>,"abracon,tc-diode";
 | 
						|
+		trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
 | 
						|
+					<&ds1340>,"trickle-resistor-ohms:0",
 | 
						|
+					<&abx80x>,"abracon,tc-resistor:0",
 | 
						|
+					<&rv3028>,"trickle-resistor-ohms:0",
 | 
						|
+					<&rv1805>,"abracon,tc-resistor:0";
 | 
						|
+		backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
 | 
						|
+		wakeup-source = <&ds1339>,"wakeup-source?",
 | 
						|
+				<&ds3231>,"wakeup-source?",
 | 
						|
+				<&mcp7940x>,"wakeup-source?",
 | 
						|
+				<&mcp7941x>,"wakeup-source?",
 | 
						|
+				<&m41t62>,"wakeup-source?";
 | 
						|
+	};
 | 
						|
+};
 | 
						|
--- a/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
 | 
						|
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-gpio-overlay.dts
 | 
						|
@@ -5,13 +5,13 @@
 | 
						|
 
 | 
						|
 #include <dt-bindings/gpio/gpio.h>
 | 
						|
 
 | 
						|
-/ {
 | 
						|
-	compatible = "brcm,bcm2835";
 | 
						|
+#include "i2c-rtc-common.dtsi"
 | 
						|
 
 | 
						|
-	fragment@0 {
 | 
						|
+/ {
 | 
						|
+	fragment@100 {
 | 
						|
 		target-path = "/";
 | 
						|
 		__overlay__ {
 | 
						|
-			i2c_gpio: i2c-gpio-rtc@0 {
 | 
						|
+			i2cbus: i2c-gpio-rtc@0 {
 | 
						|
 				compatible = "i2c-gpio";
 | 
						|
 				gpios = <&gpio 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* sda */
 | 
						|
 					 &gpio 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) /* scl */
 | 
						|
@@ -23,244 +23,9 @@
 | 
						|
 		};
 | 
						|
 	};
 | 
						|
 
 | 
						|
-	fragment@1 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			abx80x: abx80x@69 {
 | 
						|
-				compatible = "abracon,abx80x";
 | 
						|
-				reg = <0x69>;
 | 
						|
-				abracon,tc-diode = "standard";
 | 
						|
-				abracon,tc-resistor = <0>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@2 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			ds1307: ds1307@68 {
 | 
						|
-				compatible = "dallas,ds1307";
 | 
						|
-				reg = <0x68>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@3 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			ds1339: ds1339@68 {
 | 
						|
-				compatible = "dallas,ds1339";
 | 
						|
-				trickle-resistor-ohms = <0>;
 | 
						|
-				reg = <0x68>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@4 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			ds3231: ds3231@68 {
 | 
						|
-				compatible = "maxim,ds3231";
 | 
						|
-				reg = <0x68>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@5 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			mcp7940x: mcp7940x@6f {
 | 
						|
-				compatible = "microchip,mcp7940x";
 | 
						|
-				reg = <0x6f>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@6 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			mcp7941x: mcp7941x@6f {
 | 
						|
-				compatible = "microchip,mcp7941x";
 | 
						|
-				reg = <0x6f>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@7 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			pcf2127@51 {
 | 
						|
-				compatible = "nxp,pcf2127";
 | 
						|
-				reg = <0x51>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@8 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			pcf8523: pcf8523@68 {
 | 
						|
-				compatible = "nxp,pcf8523";
 | 
						|
-				reg = <0x68>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@9 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			pcf8563: pcf8563@51 {
 | 
						|
-				compatible = "nxp,pcf8563";
 | 
						|
-				reg = <0x51>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@10 {
 | 
						|
-		target = <&i2c_arm>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			m41t62: m41t62@68 {
 | 
						|
-				compatible = "st,m41t62";
 | 
						|
-				reg = <0x68>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@11 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			rv3028: rv3028@52 {
 | 
						|
-				compatible = "microcrystal,rv3028";
 | 
						|
-				reg = <0x52>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@12 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			pcf2129@51 {
 | 
						|
-				compatible = "nxp,pcf2129";
 | 
						|
-				reg = <0x51>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@13 {
 | 
						|
-		target = <&i2c_gpio>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-			status = "okay";
 | 
						|
-
 | 
						|
-			rv1805: rv1805@69 {
 | 
						|
-				compatible = "microcrystal,rv1805";
 | 
						|
-				reg = <0x69>;
 | 
						|
-				abracon,tc-diode = "standard";
 | 
						|
-				abracon,tc-resistor = <0>;
 | 
						|
-				status = "okay";
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
 	__overrides__ {
 | 
						|
-		abx80x = <0>,"+1";
 | 
						|
-		ds1307 = <0>,"+2";
 | 
						|
-		ds1339 = <0>,"+3";
 | 
						|
-		ds3231 = <0>,"+4";
 | 
						|
-		mcp7940x = <0>,"+5";
 | 
						|
-		mcp7941x = <0>,"+6";
 | 
						|
-		pcf2127 = <0>,"+7";
 | 
						|
-		pcf8523 = <0>,"+8";
 | 
						|
-		pcf8563 = <0>,"+9";
 | 
						|
-		m41t62 = <0>,"+10";
 | 
						|
-		rv3028 = <0>,"+11";
 | 
						|
-		pcf2129 = <0>,"+12";
 | 
						|
-		rv1805 = <0>,"+13";
 | 
						|
-
 | 
						|
-		addr = <&abx80x>, "reg:0",
 | 
						|
-		       <&ds1307>, "reg:0",
 | 
						|
-		       <&ds1339>, "reg:0",
 | 
						|
-		       <&ds3231>, "reg:0",
 | 
						|
-		       <&mcp7940x>, "reg:0",
 | 
						|
-		       <&mcp7941x>, "reg:0",
 | 
						|
-		       <&pcf8523>, "reg:0",
 | 
						|
-		       <&pcf8563>, "reg:0",
 | 
						|
-		       <&m41t62>, "reg:0",
 | 
						|
-		       <&rv1805>, "reg:0";
 | 
						|
-		trickle-diode-type = <&abx80x>,"abracon,tc-diode",
 | 
						|
-				     <&rv1805>,"abracon,tc-diode";
 | 
						|
-		trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
 | 
						|
-					<&abx80x>,"abracon,tc-resistor:0",
 | 
						|
-					<&rv3028>,"trickle-resistor-ohms:0",
 | 
						|
-					<&rv1805>,"abracon,tc-resistor:0";
 | 
						|
-		backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
 | 
						|
-		wakeup-source = <&ds1339>,"wakeup-source?",
 | 
						|
-				<&ds3231>,"wakeup-source?",
 | 
						|
-				<&mcp7940x>,"wakeup-source?",
 | 
						|
-				<&mcp7941x>,"wakeup-source?";
 | 
						|
-		i2c_gpio_sda = <&i2c_gpio>,"gpios:4";
 | 
						|
-		i2c_gpio_scl = <&i2c_gpio>,"gpios:16";
 | 
						|
-		i2c_gpio_delay_us = <&i2c_gpio>,"i2c-gpio,delay-us:0";
 | 
						|
+		i2c_gpio_sda = <&i2cbus>,"gpios:4";
 | 
						|
+		i2c_gpio_scl = <&i2cbus>,"gpios:16";
 | 
						|
+		i2c_gpio_delay_us = <&i2cbus>,"i2c-gpio,delay-us:0";
 | 
						|
 	};
 | 
						|
 };
 | 
						|
--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
 | 
						|
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
 | 
						|
@@ -2,249 +2,9 @@
 | 
						|
 /dts-v1/;
 | 
						|
 /plugin/;
 | 
						|
 
 | 
						|
-/ {
 | 
						|
-	compatible = "brcm,bcm2835";
 | 
						|
-
 | 
						|
-	fragment@0 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			abx80x: abx80x@69 {
 | 
						|
-				compatible = "abracon,abx80x";
 | 
						|
-				reg = <0x69>;
 | 
						|
-				abracon,tc-diode = "standard";
 | 
						|
-				abracon,tc-resistor = <0>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@1 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			ds1307: ds1307@68 {
 | 
						|
-				compatible = "dallas,ds1307";
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@2 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			ds1339: ds1339@68 {
 | 
						|
-				compatible = "dallas,ds1339";
 | 
						|
-				trickle-resistor-ohms = <0>;
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@3 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			ds3231: ds3231@68 {
 | 
						|
-				compatible = "maxim,ds3231";
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@4 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			mcp7940x: mcp7940x@6f {
 | 
						|
-				compatible = "microchip,mcp7940x";
 | 
						|
-				reg = <0x6f>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@5 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			mcp7941x: mcp7941x@6f {
 | 
						|
-				compatible = "microchip,mcp7941x";
 | 
						|
-				reg = <0x6f>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@6 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf2127@51 {
 | 
						|
-				compatible = "nxp,pcf2127";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@7 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf8523: pcf8523@68 {
 | 
						|
-				compatible = "nxp,pcf8523";
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@8 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf8563: pcf8563@51 {
 | 
						|
-				compatible = "nxp,pcf8563";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@9 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			m41t62: m41t62@68 {
 | 
						|
-				compatible = "st,m41t62";
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@10 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			rv3028: rv3028@52 {
 | 
						|
-				compatible = "microcrystal,rv3028";
 | 
						|
-				reg = <0x52>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@11 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf2129@51 {
 | 
						|
-				compatible = "nxp,pcf2129";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@12 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-	       __dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf85363@51 {
 | 
						|
-				compatible = "nxp,pcf85363";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@13 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			rv1805: rv1805@69 {
 | 
						|
-				compatible = "microcrystal,rv1805";
 | 
						|
-				reg = <0x69>;
 | 
						|
-				abracon,tc-diode = "standard";
 | 
						|
-				abracon,tc-resistor = <0>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@14 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			sd3078: sd3078@32 {
 | 
						|
-				compatible = "whwave,sd3078";
 | 
						|
-				reg = <0x32>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@15 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-	       __dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf85063@51 {
 | 
						|
-				compatible = "nxp,pcf85063";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@16 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-	       __dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			pcf85063a@51 {
 | 
						|
-				compatible = "nxp,pcf85063a";
 | 
						|
-				reg = <0x51>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
-
 | 
						|
-	fragment@17 {
 | 
						|
-		target = <&i2cbus>;
 | 
						|
-		__dormant__ {
 | 
						|
-			#address-cells = <1>;
 | 
						|
-			#size-cells = <0>;
 | 
						|
-
 | 
						|
-			ds1340: ds1340@68 {
 | 
						|
-				compatible = "dallas,ds1340";
 | 
						|
-				trickle-resistor-ohms = <0>;
 | 
						|
-				reg = <0x68>;
 | 
						|
-			};
 | 
						|
-		};
 | 
						|
-	};
 | 
						|
+#include "i2c-rtc-common.dtsi"
 | 
						|
 
 | 
						|
+/ {
 | 
						|
 	frag100: fragment@100 {
 | 
						|
 		target = <&i2c_arm>;
 | 
						|
 		i2cbus: __overlay__ {
 | 
						|
@@ -267,51 +27,8 @@
 | 
						|
 	};
 | 
						|
 
 | 
						|
 	__overrides__ {
 | 
						|
-		abx80x = <0>,"+0";
 | 
						|
-		ds1307 = <0>,"+1";
 | 
						|
-		ds1339 = <0>,"+2";
 | 
						|
-		ds1340 = <0>,"+17";
 | 
						|
-		ds3231 = <0>,"+3";
 | 
						|
-		mcp7940x = <0>,"+4";
 | 
						|
-		mcp7941x = <0>,"+5";
 | 
						|
-		pcf2127 = <0>,"+6";
 | 
						|
-		pcf8523 = <0>,"+7";
 | 
						|
-		pcf8563 = <0>,"+8";
 | 
						|
-		m41t62 = <0>,"+9";
 | 
						|
-		rv3028 = <0>,"+10";
 | 
						|
-		pcf2129 = <0>,"+11";
 | 
						|
-		pcf85363 = <0>,"+12";
 | 
						|
-		rv1805 = <0>,"+13";
 | 
						|
-		sd3078 = <0>,"+14";
 | 
						|
-		pcf85063 = <0>,"+15";
 | 
						|
-		pcf85063a = <0>,"+16";
 | 
						|
-
 | 
						|
 		i2c0 = <&frag100>, "target:0=",<&i2c0>;
 | 
						|
 		i2c_csi_dsi = <&frag100>, "target:0=",<&i2c_csi_dsi>,
 | 
						|
 			      <0>,"+101+102";
 | 
						|
-
 | 
						|
-		addr = <&abx80x>, "reg:0",
 | 
						|
-		       <&ds1307>, "reg:0",
 | 
						|
-		       <&ds1339>, "reg:0",
 | 
						|
-		       <&ds3231>, "reg:0",
 | 
						|
-		       <&mcp7940x>, "reg:0",
 | 
						|
-		       <&mcp7941x>, "reg:0",
 | 
						|
-		       <&pcf8523>, "reg:0",
 | 
						|
-		       <&pcf8563>, "reg:0",
 | 
						|
-		       <&m41t62>, "reg:0",
 | 
						|
-		       <&rv1805>, "reg:0";
 | 
						|
-		trickle-diode-type = <&abx80x>,"abracon,tc-diode",
 | 
						|
-				     <&rv1805>,"abracon,tc-diode";
 | 
						|
-		trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
 | 
						|
-					<&ds1340>,"trickle-resistor-ohms:0",
 | 
						|
-					<&abx80x>,"abracon,tc-resistor:0",
 | 
						|
-					<&rv3028>,"trickle-resistor-ohms:0",
 | 
						|
-					<&rv1805>,"abracon,tc-resistor:0";
 | 
						|
-		backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
 | 
						|
-		wakeup-source = <&ds1339>,"wakeup-source?",
 | 
						|
-				<&ds3231>,"wakeup-source?",
 | 
						|
-				<&mcp7940x>,"wakeup-source?",
 | 
						|
-				<&mcp7941x>,"wakeup-source?",
 | 
						|
-				<&m41t62>,"wakeup-source?";
 | 
						|
 	};
 | 
						|
 };
 |