blob: 4a45bccd1f8e15e88a99cf37017c0fa0074c1dcd (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
/*
* Copyright (C) 2019 Stuart Longland <me@vk4msl.id.au>
*
* Based on PB-I2C2-RTC-DS1307.dts:
*
* Copyright (C) 2018 Tim Small <tim@seoss.co.uk>
*
* Based on PB-I2C2-RTC-PCF8523.dts:
*
* Copyright (C) 2018 Robert Nelson <robertcnelson@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This overlay is for a Microchip MCP7940X RTC connected via the
* BeagleBone's second I2C bus.
* https://www.microchip.com/wwwproducts/en/MCP79400
*
* Brisbane WICEN are using this RTC for their RFID field terminals to keep
* time whilst the PocketBeagle is powered down to prevent lengthy NTP time
* synchronisation sessions over AX.25, but may be useful for others.
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
fragment@0 {
target-path="/";
__overlay__ {
chosen {
overlays {
BB-I2C2-RTC-MCP7940X = __TIMESTAMP__;
};
};
};
};
fragment@1 {
target-path="/";
__overlay__ {
aliases {
rtc0 = &extrtc;
/* The OMAP RTC implementation in the BBB is
* buggy, so that it cannot be used as a
* battery-backed RTS, so that it loses its
* contents when power is removed from the
* Beaglebone...
*
* We move the omap built-in RTC to rtc1, so
* that userspace defaults to using the DS1307.
*
* The omap RTC must remain enabled because it
* is also used during the reboot process on the
* BBB.
*/
rtc1 = "/ocp/rtc@44e3e000";
};
};
};
fragment@2 {
target = <&i2c2>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
extrtc: ds1307@68 {
compatible = "microchip,mcp7940x";
reg = <0x6f>;
};
};
};
};
|