ARM: dts: imx6qdl-hummingboard: Add rtc0 and rtc1 aliases to fix hctosys
authorJosua Mayer <josua@solid-run.com>
Thu, 18 Jan 2024 15:01:10 +0000 (16:01 +0100)
committerShawn Guo <shawnguo@kernel.org>
Mon, 5 Feb 2024 09:56:01 +0000 (17:56 +0800)
HummingBoard has two RTCs, first integrated within SoC that can be used to
wake up from sleep - and a second on the carrier board including back-up
battery which is intended for keeping time during power-off.

Add aliases for both, ensuring that the battery-backed clock is primary
rtc and used by default during boot for restoring system time.

Fixes keeping time across power-cycle observed on Debian,
which sets RTC_HCTOSYS_DEVICE="rtc0".

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard.dtsi
arch/arm/boot/dts/nxp/imx/imx6qdl-hummingboard2.dtsi

index bfade71490807a955882d8c35dc5bffbbdee8086..a955c77cd4998a56d6ee5e94eb0de7835b974291 100644 (file)
 #include <dt-bindings/sound/fsl-imx-audmux.h>
 
 / {
+       aliases {
+               rtc0 = &carrier_rtc;
+               rtc1 = &snvs_rtc;
+       };
+
        /* Will be filled by the bootloader */
        memory@10000000 {
                device_type = "memory";
        status = "okay";
 
        /* Pro baseboard model */
-       rtc@68 {
+       carrier_rtc: rtc@68 {
                compatible = "nxp,pcf8523";
                reg = <0x68>;
        };
index 0883ef99cded09b219ae81cbb0b68eb97e48df8c..e6017f9bf6409bd646559b424b79af5ffe01f4e5 100644 (file)
 #include <dt-bindings/sound/fsl-imx-audmux.h>
 
 / {
+       aliases {
+               rtc0 = &pcf8523;
+               rtc1 = &snvs_rtc;
+       };
+
        /* Will be filled by the bootloader */
        memory@10000000 {
                device_type = "memory";