bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-0818-overlays-Add-trickle-voltage-mv-parameter-to-RTCs.patch
1 From 31822340129e3c4030500d7f30ce4d19bbf9dd40 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Mon, 24 Jul 2023 17:34:47 +0100
4 Subject: [PATCH] overlays: Add trickle-voltage-mv parameter to RTCs
5
6 The RV3032 RTC requires an additional DT property to enable trickle
7 charging. Add a parameter - trickle-voltage-mv - to the i2c-rtc
8 and i2c-rtc-gpio overlays to set it.
9
10 See: https://github.com/raspberrypi/linux/issues/5547
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 arch/arm/boot/dts/overlays/README | 12 ++++++++----
15 arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi | 2 ++
16 2 files changed, 10 insertions(+), 4 deletions(-)
17
18 --- a/arch/arm/boot/dts/overlays/README
19 +++ b/arch/arm/boot/dts/overlays/README
20 @@ -1957,13 +1957,15 @@ Params: abx80x Select o
21 "schottky" (ABx80x and RV1805 only)
22
23 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
24 - ABx80x, RV1805, RV3028)
25 + ABx80x, BQ32000, RV1805, RV3028, RV3032)
26 +
27 + trickle-voltage-mv Charge pump voltage for trickle charge (RV3032)
28
29 wakeup-source Specify that the RTC can be used as a wakeup
30 source
31
32 backup-switchover-mode Backup power supply switch mode. Must be 0 for
33 - off or 1 for Vdd < VBackup (RV3028 only)
34 + off or 1 for Vdd < VBackup (RV3028, RV3032)
35
36
37 Name: i2c-rtc-gpio
38 @@ -2027,13 +2029,15 @@ Params: abx80x Select o
39 "schottky" (ABx80x and RV1805 only)
40
41 trickle-resistor-ohms Resistor value for trickle charge (DS1339,
42 - ABx80x, RV1805, RV3028)
43 + ABx80x, BQ32000, RV1805, RV3028, RV3032)
44 +
45 + trickle-voltage-mv Charge pump voltage for trickle charge (RV3032)
46
47 wakeup-source Specify that the RTC can be used as a wakeup
48 source
49
50 backup-switchover-mode Backup power supply switch mode. Must be 0 for
51 - off or 1 for Vdd < VBackup (RV3028 only)
52 + off or 1 for Vdd < VBackup (RV3028, RV3032)
53
54 i2c_gpio_sda GPIO used for I2C data (default "23")
55
56 --- a/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
57 +++ b/arch/arm/boot/dts/overlays/i2c-rtc-common.dtsi
58 @@ -339,8 +339,10 @@
59 <&ds1340>,"trickle-resistor-ohms:0",
60 <&abx80x>,"abracon,tc-resistor:0",
61 <&rv3028>,"trickle-resistor-ohms:0",
62 + <&rv3032>,"trickle-resistor-ohms:0",
63 <&rv1805>,"abracon,tc-resistor:0",
64 <&bq32000>,"abracon,tc-resistor:0";
65 + trickle-voltage-mv = <&rv3032>,"trickle-voltage-millivolts:0";
66 backup-switchover-mode = <&rv3028>,"backup-switchover-mode:0";
67 wakeup-source = <&ds1339>,"wakeup-source?",
68 <&ds3231>,"wakeup-source?",