bcm27xx: switch to 5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0734-overlays-Add-TI-BQ32000-RTC-support.patch
1 From 1afb520ffaf9667f18336aa4e983a2dd95462f20 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 16 Aug 2021 11:11:35 +0100
4 Subject: [PATCH] overlays: Add TI BQ32000 RTC support
5
6 See: https://github.com/raspberrypi/linux/issues/4531
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
9 ---
10 arch/arm/boot/dts/overlays/README | 10 ++++++++++
11 .../arm/boot/dts/overlays/i2c-rtc-common.dtsi | 20 ++++++++++++++++++-
12 2 files changed, 29 insertions(+), 1 deletion(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -1390,6 +1390,8 @@ Params: abx80x Select o
17 AB0801, AB0803, AB0804, AB0805,
18 AB1801, AB1803, AB1804, AB1805
19
20 + bq32000 Select the TI BQ32000 device
21 +
22 ds1307 Select the DS1307 device
23
24 ds1339 Select the DS1339 device
25 @@ -1434,6 +1436,9 @@ Params: abx80x Select o
26 device must be configured to use the specified
27 address.
28
29 + trickle-diode-disable Do not use the internal trickle charger diode
30 + (BQ32000 only)
31 +
32 trickle-diode-type Diode type for trickle charge - "standard" or
33 "schottky" (ABx80x and RV1805 only)
34
35 @@ -1455,6 +1460,8 @@ Params: abx80x Select o
36 AB0801, AB0803, AB0804, AB0805,
37 AB1801, AB1803, AB1804, AB1805
38
39 + bq32000 Select the TI BQ32000 device
40 +
41 ds1307 Select the DS1307 device
42
43 ds1339 Select the DS1339 device
44 @@ -1495,6 +1502,9 @@ Params: abx80x Select o
45 device must be configured to use the specified
46 address.
47
48 + trickle-diode-disable Do not use the internal trickle charger diode
49 + (BQ32000 only)
50 +
51 trickle-diode-type Diode type for trickle charge - "standard" or
52 "schottky" (ABx80x and RV1805 only)
53
54 --- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
55 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
56 @@ -256,6 +256,21 @@
57 };
58 };
59
60 + fragment@19 {
61 + target = <&i2cbus>;
62 + __dormant__ {
63 + #address-cells = <1>;
64 + #size-cells = <0>;
65 +
66 + bq32000: bq32000@68 {
67 + compatible = "ti,bq32000";
68 + trickle-resistor-ohms = <0>;
69 + reg = <0x68>;
70 + };
71 + };
72 + };
73 +
74 +
75 __overrides__ {
76 abx80x = <0>,"+0";
77 ds1307 = <0>,"+1";
78 @@ -276,6 +291,7 @@
79 pcf85063 = <0>,"+15";
80 pcf85063a = <0>,"+16";
81 s35390a = <0>,"+18";
82 + bq32000 = <0>,"+19";
83
84 addr = <&abx80x>, "reg:0",
85 <&ds1307>, "reg:0",
86 @@ -288,13 +304,15 @@
87 <&m41t62>, "reg:0",
88 <&rv1805>, "reg:0",
89 <&s35390a>, "reg:0";
90 + trickle-diode-disable = <&bq32000>,"trickle-diode-disable?";
91 trickle-diode-type = <&abx80x>,"abracon,tc-diode",
92 <&rv1805>,"abracon,tc-diode";
93 trickle-resistor-ohms = <&ds1339>,"trickle-resistor-ohms:0",
94 <&ds1340>,"trickle-resistor-ohms:0",
95 <&abx80x>,"abracon,tc-resistor:0",
96 <&rv3028>,"trickle-resistor-ohms:0",
97 - <&rv1805>,"abracon,tc-resistor:0";
98 + <&rv1805>,"abracon,tc-resistor:0",
99 + <&bq32000>,"abracon,tc-resistor:0";
100 backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
101 wakeup-source = <&ds1339>,"wakeup-source?",
102 <&ds3231>,"wakeup-source?",