1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/bcm27xx/patches-5.14/0543-overlays-Add-TI-BQ32000-RTC-support.patch
Ycarus (Yannick Chabanois) 5c593832cc Add 5.14 patches for RPI
2021-10-01 16:58:58 +02:00

109 lines
4 KiB
Diff

From 2779c8b0cf43038bf08cd8eb4f7afa27a4d90850 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Mon, 16 Aug 2021 11:11:35 +0100
Subject: [PATCH 543/552] 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(-)
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index 57d5c2f45c50..708ebaac9c92 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1390,6 +1390,8 @@ Params: abx80x Select one of the ABx80x family:
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 one of the ABx80x family:
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 one of the ABx80x family:
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 one of the ABx80x family:
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)
diff --git a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
index f51981aafda8..7f749fc2d802 100644
--- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
@@ -256,6 +256,21 @@ s35390a: s35390a@30 {
};
};
+ 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 @@ __overrides__ {
pcf85063 = <0>,"+15";
pcf85063a = <0>,"+16";
s35390a = <0>,"+18";
+ bq32000 = <0>,"+19";
addr = <&abx80x>, "reg:0",
<&ds1307>, "reg:0",
@@ -288,13 +304,15 @@ __overrides__ {
<&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?",
--
2.33.0