Improvement on backup-switchover-mode overlay value definitions (#5884)
authorTiago Freire <41837236+tiagofreire-pt@users.noreply.github.com>
Tue, 23 Jan 2024 12:10:24 +0000 (12:10 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:31 +0000 (11:35 +0000)
commit2b331929cf09f161dadc92153e0fa8178d38d5fb
tree5d2988fed2dce7e61ada946ff8b0c42db82e3aba
parenta37733b11c15365093802ecdc4906d399541fdfe
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