mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
103 lines
3.5 KiB
Diff
103 lines
3.5 KiB
Diff
|
From 1afb520ffaf9667f18336aa4e983a2dd95462f20 Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Elwell <phil@raspberrypi.com>
|
||
|
Date: Mon, 16 Aug 2021 11:11:35 +0100
|
||
|
Subject: [PATCH] overlays: Add TI BQ32000 RTC support
|
||
|
|
||
|
See: https://github.com/raspberrypi/linux/issues/4531
|
||
|
|
||
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||
|
---
|
||
|
arch/arm/boot/dts/overlays/README | 10 ++++++++++
|
||
|
.../arm/boot/dts/overlays/i2c-rtc-common.dtsi | 20 ++++++++++++++++++-
|
||
|
2 files changed, 29 insertions(+), 1 deletion(-)
|
||
|
|
||
|
--- a/arch/arm/boot/dts/overlays/README
|
||
|
+++ b/arch/arm/boot/dts/overlays/README
|
||
|
@@ -1390,6 +1390,8 @@ Params: abx80x Select o
|
||
|
AB0801, AB0803, AB0804, AB0805,
|
||
|
AB1801, AB1803, AB1804, AB1805
|
||
|
|
||
|
+ bq32000 Select the TI BQ32000 device
|
||
|
+
|
||
|
ds1307 Select the DS1307 device
|
||
|
|
||
|
ds1339 Select the DS1339 device
|
||
|
@@ -1434,6 +1436,9 @@ Params: abx80x Select o
|
||
|
device must be configured to use the specified
|
||
|
address.
|
||
|
|
||
|
+ trickle-diode-disable Do not use the internal trickle charger diode
|
||
|
+ (BQ32000 only)
|
||
|
+
|
||
|
trickle-diode-type Diode type for trickle charge - "standard" or
|
||
|
"schottky" (ABx80x and RV1805 only)
|
||
|
|
||
|
@@ -1455,6 +1460,8 @@ Params: abx80x Select o
|
||
|
AB0801, AB0803, AB0804, AB0805,
|
||
|
AB1801, AB1803, AB1804, AB1805
|
||
|
|
||
|
+ bq32000 Select the TI BQ32000 device
|
||
|
+
|
||
|
ds1307 Select the DS1307 device
|
||
|
|
||
|
ds1339 Select the DS1339 device
|
||
|
@@ -1495,6 +1502,9 @@ Params: abx80x Select o
|
||
|
device must be configured to use the specified
|
||
|
address.
|
||
|
|
||
|
+ trickle-diode-disable Do not use the internal trickle charger diode
|
||
|
+ (BQ32000 only)
|
||
|
+
|
||
|
trickle-diode-type Diode type for trickle charge - "standard" or
|
||
|
"schottky" (ABx80x and RV1805 only)
|
||
|
|
||
|
--- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
|
||
|
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
|
||
|
@@ -256,6 +256,21 @@
|
||
|
};
|
||
|
};
|
||
|
|
||
|
+ fragment@19 {
|
||
|
+ target = <&i2cbus>;
|
||
|
+ __dormant__ {
|
||
|
+ #address-cells = <1>;
|
||
|
+ #size-cells = <0>;
|
||
|
+
|
||
|
+ bq32000: bq32000@68 {
|
||
|
+ compatible = "ti,bq32000";
|
||
|
+ trickle-resistor-ohms = <0>;
|
||
|
+ reg = <0x68>;
|
||
|
+ };
|
||
|
+ };
|
||
|
+ };
|
||
|
+
|
||
|
+
|
||
|
__overrides__ {
|
||
|
abx80x = <0>,"+0";
|
||
|
ds1307 = <0>,"+1";
|
||
|
@@ -276,6 +291,7 @@
|
||
|
pcf85063 = <0>,"+15";
|
||
|
pcf85063a = <0>,"+16";
|
||
|
s35390a = <0>,"+18";
|
||
|
+ bq32000 = <0>,"+19";
|
||
|
|
||
|
addr = <&abx80x>, "reg:0",
|
||
|
<&ds1307>, "reg:0",
|
||
|
@@ -288,13 +304,15 @@
|
||
|
<&m41t62>, "reg:0",
|
||
|
<&rv1805>, "reg:0",
|
||
|
<&s35390a>, "reg:0";
|
||
|
+ trickle-diode-disable = <&bq32000>,"trickle-diode-disable?";
|
||
|
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";
|
||
|
+ <&rv1805>,"abracon,tc-resistor:0",
|
||
|
+ <&bq32000>,"abracon,tc-resistor:0";
|
||
|
backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
|
||
|
wakeup-source = <&ds1339>,"wakeup-source?",
|
||
|
<&ds3231>,"wakeup-source?",
|