aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0493-overlays-i2c-rtc-Add-the-Dallas-DS1340.patch
blob: 08b1f4a1bc6214ad4dfe9200a33c04176402f4ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From fd478b369992e56665de3aabf0e19e24b5fa5e43 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Fri, 26 Feb 2021 14:19:00 +0000
Subject: [PATCH] overlays: i2c-rtc: Add the Dallas DS1340

See: https://github.com/raspberrypi/linux/issues/4180

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
@@ -1311,6 +1311,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
--- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
@@ -231,6 +231,20 @@
 		};
 	};
 
+	fragment@17 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			ds1340: ds1340@68 {
+				compatible = "dallas,ds1340";
+				trickle-resistor-ohms = <0>;
+				reg = <0x68>;
+			};
+		};
+	};
+
 	frag100: fragment@100 {
 		target = <&i2c_arm>;
 		i2cbus: __overlay__ {
@@ -242,6 +256,7 @@
 		abx80x = <0>,"+0";
 		ds1307 = <0>,"+1";
 		ds1339 = <0>,"+2";
+		ds1340 = <0>,"+17";
 		ds3231 = <0>,"+3";
 		mcp7940x = <0>,"+4";
 		mcp7941x = <0>,"+5";
@@ -273,6 +288,7 @@
 		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";