Re: [PATCH] arm64: dts: s32g: force S32G RTC as rtc0
From: Andrei Botila
Date: Tue Mar 10 2026 - 11:28:54 EST
On 3/10/2026 4:02 PM, Fabio Estevam wrote:
> On Tue, Mar 10, 2026 at 10:50 AM Andrei Botila
> <andrei.botila@xxxxxxxxxxx> wrote:
>
>> Regarding the I2C RTC(PCA85073A) commands like hwclock or rtcwake use by
>> default /dev/rtc, /dev/rtc0 so they will try to use PCA and fail.
>
> These commands should not fail.
rtcwake -s 10 -m mem
rtcwake: cannot open /sys/class/rtc/rtc0/device/power/wakeup: No such file or directory
rtcwake: /dev/rtc0 not enabled for wakeup events
Through this patch what I am trying to do is to get rid of the need of specifying
the rtc (-d rtcX).
>
> date -s "2026-03-10 11:00:00"
> hwclock -w
>
> Power-cycle the board. Does the "date" command retain the correct time?
date -> Tue Mar 10 11:12:43 UTC 2026
date -s "2026-03-10 11:00:00" -> Tue Mar 10 11:00:00 UTC 2026
hwclock -w
date -> Tue Mar 10 11:00:06 UTC 2026
<Power cycle>
hwclock -r -> 2026-03-10 11:00:31.104653+00:00
So looks like it does retain the date between power cycles.
>
>> Also from what I could find online PCA85073A is also not battery-backed.
>
> I haven't checked, but this looks strange. How will the board retain
> the time then, after a power cycle?