arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards
Subsystems (2)
PATCH 1/1 arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards
Enable the rtc node on VIM1/VIM2 boards so users can simply attach a power cell and use the on-board RTC without modifying the device-tree.
Cold boot with no cell attached is gracefully handled:
VIM2:~ # dmesg | grep rtc
[ 7.716150] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.716957] rtc-hym8563 1-0051: registered as rtc0 [ 7.729850] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.729877] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock [ 8.126768] rtc-hym8563 1-0051: no valid clock/calendar values available
Warm boot (and any boot with cell attached) recalls stored values resulting in consistently faster (re)boot times:
VIM2:~ # dmesg | grep rtc
[ 7.441671] rtc-hym8563 1-0051: registered as rtc0 [ 7.442663] rtc-hym8563 1-0051: setting system clock to 2020-11-16T05:49:59 UTC (1605505799)
---
This supersedes other recent attempts by Art to make the same change [0] and [1] which were rejected for lack of justification for the change and leaving comments behind. I have been using the same changes in my own tree for a while.
Christian
[0] https://patchwork.kernel.org/project/linux-amlogic/patch/[email protected]/
[1] https://patchwork.kernel.org/project/linux-amlogic/patch/[email protected]/
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +1 -2
@@ -97,8 +97,7 @@ pinctrl-names = "default"; rtc: rtc@51 { - /* has to be enabled manually when a battery is connected: */ - status = "disabled"; + status = "okay"; compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>;
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -2
@@ -228,8 +228,7 @@ pinctrl-names = "default"; rtc: rtc@51 { - /* has to be enabled manually when a battery is connected: */ - status = "disabled"; + status = "okay"; compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>;
Signature · 7 lines
2.17.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 57 lines · Christian Hewitt
Enable the rtc node on VIM1/VIM2 boards so users can simply attach a power cell and use the on-board RTC without modifying the device-tree.
Cold boot with no cell attached is gracefully handled:
VIM2:~ # dmesg | grep rtc
[ 7.716150] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.716957] rtc-hym8563 1-0051: registered as rtc0 [ 7.729850] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.729877] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock [ 8.126768] rtc-hym8563 1-0051: no valid clock/calendar values availableWarm boot (and any boot with cell attached) recalls stored values resulting in consistently faster (re)boot times:
VIM2:~ # dmesg | grep rtc
[ 7.441671] rtc-hym8563 1-0051: registered as rtc0 [ 7.442663] rtc-hym8563 1-0051: setting system clock to 2020-11-16T05:49:59 UTC (1605505799)Suggested-by Artem Lapkin <[email protected]>Signed-off-by Christian Hewitt <[email protected]>---
This supersedes other recent attempts by Art to make the same change [0] and [1] which were rejected for lack of justification for the change and leaving comments behind. I have been using the same changes in my own tree for a while.
Christian
[0] https://patchwork.kernel.org/project/linux-amlogic/patch/[email protected]/
[1] https://patchwork.kernel.org/project/linux-amlogic/patch/[email protected]/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 3 +-- arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +1
-2@@ -97,8 +97,7 @@ pinctrl-names = "default"; rtc: rtc@51 { - /* has to be enabled manually when a battery is connected: */ - status = "disabled"; + status = "okay"; compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>;arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +0
-0
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts line 234
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1
-2@@ -228,8 +228,7 @@ pinctrl-names = "default"; rtc: rtc@51 { - /* has to be enabled manually when a battery is connected: */ - status = "disabled"; + status = "okay"; compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>;
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Quoted 5 lines · Christian Hewitt
Enable the rtc node on VIM1/VIM2 boards so users can simply attach a power cell and use the on-board RTC without modifying the device-tree.
Cold boot with no cell attached is gracefully handled:
Quoted 8 lines
VIM2:~ # dmesg | grep rtc
[ 7.716150] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.716957] rtc-hym8563 1-0051: registered as rtc0 [ 7.729850] rtc-hym8563 1-0051: no valid clock/calendar values available [ 7.729877] rtc-hym8563 1-0051: hctosys: unable to read the hardware clock [ 8.126768] rtc-hym8563 1-0051: no valid clock/calendar values available[...]
Applied, thanks!
[1/1] arm64: dts: meson: enable rtc node on Khadas VIM1/VIM2 boards
commit: a735defaf1ee74e9f06a616162f1ba6f26555d38
Best regards,
Signature · 1 line
Kevin Hilman <[email protected]>