1 From 34bea6c63c915333ea838b07438e93c28a8030e7 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
6 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
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(-)
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
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
25 + ds1307 Select the DS1307 device
27 ds1339 Select the DS1339 device
29 @@ -514,7 +518,11 @@ Params: ds1307 Select t
31 pcf8563 Select the PCF8563 device
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)
37 + trickle-resistor-ohms Resistor value for trickle charge (DS1339,
40 wakeup-source Specify that the RTC can be used as a wakeup
42 --- a/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
43 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-overlay.dts
49 + compatible = "abracon,abx80x";
51 + abracon,tc-diode = "standard";
52 + abracon,tc-resistor = <0>;
56 compatible = "maxim,ds1307";
62 + abx80x = <&abx80x>,"status";
63 ds1307 = <&ds1307>,"status";
64 ds1339 = <&ds1339>,"status";
65 ds3231 = <&ds3231>,"status";
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
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
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