aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch
blob: 9fabd9fd133266b3d199ec6772891c8fdfae22a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From f85acc3d0fb33ce5c92578dca7b1345915f744ff Mon Sep 17 00:00:00 2001
From: Tiago Freire <41837236+tiagofreire-pt@users.noreply.github.com>
Date: Tue, 23 Jan 2024 12:10:24 +0000
Subject: [PATCH 1252/1295] Improvement on backup-switchover-mode overlay value
 definitions (#5884)

For the RV3028 RTC, the definitions for its `backup-switchover-mode` overlay
were not intelligible neither complete/exhaustive.

Accordingly to the https://github.com/raspberrypi/linux/issues/2912#issuecomment-477670051
these one here proposed should be correct.

`/boot/config.txt` should be as a configuration example, for rv3028, on a
 Uputronics GPS Extension HAT:

    # For GPS Expansion Board from Uputronics
    dtparam=i2c_arm=on
    dtoverlay=i2c-rtc,rv3028,backup-switchover-mode=3
    dtoverlay=pps-gpio,gpiopin=18
    init_uart_baud=115200

From my tests (`sudo rmmod rtc_rv3028 && sudo i2cget -y 1 0x52 0x37`):

`Default from factory`: `0x10`
`Mode 0`: `0x10`
`Mode 1`: `0x14`
`Mode 2`: `0x18`
`Mode 3`: `0x1c`

`Mode 3`: `0x1c` is consistent with the manufacturer configuration script: http://store.uputronics.com/files/configure-rv3028.sh
---
 arch/arm/boot/dts/overlays/README | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2106,7 +2106,13 @@ Params: abx80x                  Select o
                                 source
 
         backup-switchover-mode  Backup power supply switch mode. Must be 0 for
-                                off or 1 for Vdd < VBackup (RV3028, RV3032)
+                                "Switchover disabled", 1 for "Direct Switching"
+                                (if Vdd < VBackup), 2 for "Standby
+                                Mode" (if Vdd < Vbackup,
+                                does not draw current) or 3 for
+                                "Level Switching" (if Vdd < Vbackup
+                                and Vdd < Vddsw and Vbackup > Vddsw)
+                                (RV3028, RV3032)
 
 
 Name:   i2c-rtc-gpio