Re: [PATCH] arm64: dts: s32g: force S32G RTC as rtc0

From: Fabio Estevam

Date: Tue Mar 10 2026 - 12:07:38 EST


On Tue, Mar 10, 2026 at 12:21 PM Andrei Botila
<andrei.botila@xxxxxxxxxxx> wrote:

> 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

You're missing the 'wakeup-source' property for the I2C RTC.

> > 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.

Yes, the I2C RTC is working as expected and is battery-backed.

You should use it as rtc0. Instead of relying on random probe order,
it is OK to pass an aliases inthe board devicetree to force the I2C
RTC to be rtc0.

If you use the SoC RTC as rtc0, the time will not be retained.