kernel: bump kernel 4.4 to 4.4.129 for 17.01
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0549-config-Add-ABX80X-RTC-driver-and-overlay.patch
1 From da62b2064a19346529bf827e8d7fbbd76e5e7ead Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 23 Nov 2016 14:19:40 +0000
4 Subject: [PATCH] config: Add ABX80X RTC driver and overlay
5
6 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
7 ---
8 arch/arm/boot/dts/overlays/README | 12 ++++++++++--
9 arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts | 12 +++++++++++-
10 arch/arm/configs/bcm2709_defconfig | 1 +
11 arch/arm/configs/bcmrpi_defconfig | 1 +
12 4 files changed, 23 insertions(+), 3 deletions(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -498,7 +498,11 @@ Params: addr I2C addr
17 Name: i2c-rtc
18 Info: Adds support for a number of I2C Real Time Clock devices
19 Load: dtoverlay=i2c-rtc,<param>=<val>
20 -Params: ds1307 Select the DS1307 device
21 +Params: abx80x Select one of the ABx80x family:
22 + AB0801, AB0803, AB0804, AB0805,
23 + AB1801, AB1803, AB1804, AB1805
24 +
25 + ds1307 Select the DS1307 device
26
27 ds1339 Select the DS1339 device
28
29 @@ -514,7 +518,11 @@ Params: ds1307 Select t
30
31 pcf8563 Select the PCF8563 device
32
33 - trickle-resistor-ohms Resistor value for trickle charge (DS1339-only)
34 + trickle-diode-type Diode type for trickle charge - "standard" or
35 + "schottky" (ABx80x only)
36 +
37 + trickle-resistor-ohms Resistor value for trickle charge (DS1339,
38 + ABx80x)
39
40 wakeup-source Specify that the RTC can be used as a wakeup
41 source
42 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
43 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
44 @@ -12,6 +12,13 @@
45 #size-cells = <0>;
46 status = "okay";
47
48 + abx80x: abx80x@69 {
49 + compatible = "abracon,abx80x";
50 + reg = <0x69>;
51 + abracon,tc-diode = "standard";
52 + abracon,tc-resistor = <0>;
53 + status = "disable";
54 + };
55 ds1307: ds1307@68 {
56 compatible = "maxim,ds1307";
57 reg = <0x68>;
58 @@ -56,6 +63,7 @@
59 };
60 };
61 __overrides__ {
62 + abx80x = <&abx80x>,"status";
63 ds1307 = <&ds1307>,"status";
64 ds1339 = <&ds1339>,"status";
65 ds3231 = <&ds3231>,"status";
66 @@ -64,7 +72,9 @@
67 pcf2127 = <&pcf2127>,"status";
68 pcf8523 = <&pcf8523>,"status";
69 pcf8563 = <&pcf8563>,"status";
70 - trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0";
71 + trickle-diode-type = <&abx80x>,"abracon,tc-diode";
72 + trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
73 + <&abx80x>,"abracon,tc-resistor";
74 wakeup-source = <&ds1339>,"wakeup-source?",
75 <&ds3231>,"wakeup-source?",
76 <&mcp7940x>,"wakeup-source?",
77 --- a/arch/arm/configs/bcm2709_defconfig
78 +++ b/arch/arm/configs/bcm2709_defconfig
79 @@ -1060,6 +1060,7 @@ CONFIG_LEDS_TRIGGER_CAMERA=m
80 CONFIG_LEDS_TRIGGER_INPUT=y
81 CONFIG_RTC_CLASS=y
82 # CONFIG_RTC_HCTOSYS is not set
83 +CONFIG_RTC_DRV_ABX80X=m
84 CONFIG_RTC_DRV_DS1307=m
85 CONFIG_RTC_DRV_DS1374=m
86 CONFIG_RTC_DRV_DS1672=m
87 --- a/arch/arm/configs/bcmrpi_defconfig
88 +++ b/arch/arm/configs/bcmrpi_defconfig
89 @@ -1067,6 +1067,7 @@ CONFIG_LEDS_TRIGGER_CAMERA=m
90 CONFIG_LEDS_TRIGGER_INPUT=y
91 CONFIG_RTC_CLASS=y
92 # CONFIG_RTC_HCTOSYS is not set
93 +CONFIG_RTC_DRV_ABX80X=m
94 CONFIG_RTC_DRV_DS1307=m
95 CONFIG_RTC_DRV_DS1374=m
96 CONFIG_RTC_DRV_DS1672=m