9fabd9fd133266b3d199ec6772891c8fdfae22a3
[openwrt/staging/neocturne.git] /
1 From f85acc3d0fb33ce5c92578dca7b1345915f744ff Mon Sep 17 00:00:00 2001
2 From: Tiago Freire <41837236+tiagofreire-pt@users.noreply.github.com>
3 Date: Tue, 23 Jan 2024 12:10:24 +0000
4 Subject: [PATCH 1252/1295] Improvement on backup-switchover-mode overlay value
5 definitions (#5884)
6
7 For the RV3028 RTC, the definitions for its `backup-switchover-mode` overlay
8 were not intelligible neither complete/exhaustive.
9
10 Accordingly to the https://github.com/raspberrypi/linux/issues/2912#issuecomment-477670051
11 these one here proposed should be correct.
12
13 `/boot/config.txt` should be as a configuration example, for rv3028, on a
14 Uputronics GPS Extension HAT:
15
16 # For GPS Expansion Board from Uputronics
17 dtparam=i2c_arm=on
18 dtoverlay=i2c-rtc,rv3028,backup-switchover-mode=3
19 dtoverlay=pps-gpio,gpiopin=18
20 init_uart_baud=115200
21
22 From my tests (`sudo rmmod rtc_rv3028 && sudo i2cget -y 1 0x52 0x37`):
23
24 `Default from factory`: `0x10`
25 `Mode 0`: `0x10`
26 `Mode 1`: `0x14`
27 `Mode 2`: `0x18`
28 `Mode 3`: `0x1c`
29
30 `Mode 3`: `0x1c` is consistent with the manufacturer configuration script: http://store.uputronics.com/files/configure-rv3028.sh
31 ---
32 arch/arm/boot/dts/overlays/README | 8 +++++++-
33 1 file changed, 7 insertions(+), 1 deletion(-)
34
35 --- a/arch/arm/boot/dts/overlays/README
36 +++ b/arch/arm/boot/dts/overlays/README
37 @@ -2106,7 +2106,13 @@ Params: abx80x Select o
38 source
39
40 backup-switchover-mode Backup power supply switch mode. Must be 0 for
41 - off or 1 for Vdd < VBackup (RV3028, RV3032)
42 + "Switchover disabled", 1 for "Direct Switching"
43 + (if Vdd < VBackup), 2 for "Standby
44 + Mode" (if Vdd < Vbackup,
45 + does not draw current) or 3 for
46 + "Level Switching" (if Vdd < Vbackup
47 + and Vdd < Vddsw and Vbackup > Vddsw)
48 + (RV3028, RV3032)
49
50
51 Name: i2c-rtc-gpio