aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.18/0087-Add-device-tree-overlay-for-ds1307.patch
blob: 29cd5d8545c9e40a058cead3016dd14deb312b3a (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
From fe72f81ecb7578418207444186fa035262530946 Mon Sep 17 00:00:00 2001
From: Ryan Coe <bluemrp9@gmail.com>
Date: Sat, 31 Jan 2015 18:26:03 -0700
Subject: [PATCH 087/114] Add device-tree overlay for ds1307

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
---
 arch/arm/boot/dts/Makefile               |  1 +
 arch/arm/boot/dts/ds1307-rtc-overlay.dts | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 arch/arm/boot/dts/ds1307-rtc-overlay.dts

--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -64,6 +64,7 @@ dtb-$(CONFIG_BCM2708_DT) += iqaudio-dacp
 dtb-$(CONFIG_BCM2708_DT) += lirc-rpi-overlay.dtb
 dtb-$(CONFIG_BCM2708_DT) += pcf8523-rtc-overlay.dtb
 dtb-$(CONFIG_BCM2708_DT) += pps-gpio-overlay.dtb
+dtb-$(CONFIG_BCM2708_DT) += ds1307-rtc-overlay.dtb
 dtb-$(CONFIG_BCM2708_DT) += w1-gpio-overlay.dtb
 dtb-$(CONFIG_BCM2708_DT) += w1-gpio-pullup-overlay.dtb
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb
--- /dev/null
+++ b/arch/arm/boot/dts/ds1307-rtc-overlay.dts
@@ -0,0 +1,22 @@
+// Definitions for DS1307 Real Time Clock
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "brcm,bcm2708";
+
+	fragment@0 {
+		target = <&i2c1>;
+		__overlay__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ds1307@68 {
+				compatible = "maxim,ds1307";
+				reg = <0x68>;
+				status = "okay";
+			};
+		};
+	};
+};