Using 5.15.0-1056-bluefield, was able to see the rtc battery status using cat /sys/bus/platform/drivers/mlxbf-bootctl/MLNXBF04\:00/rtc_battery
svc-soc-ver@bu-lab64v1-oob:~$ cat /etc/mlnx-release bf-bundle-2.9.0-64_24.10_ubuntu-22.04_dev svc-soc-ver@bu-lab64v1-oob:~$ uname -r 5.15.0-1056-bluefield svc-soc-ver@bu-lab64v1-oob:~$ sudo lsmod | grep bootctl mlxbf_bootctl 28672 0 svc-soc-ver@bu-lab64v1-oob:~$ cat /sys/bus/platform/drivers/mlxbf-bootctl/rtc_battery cat: /sys/bus/platform/drivers/mlxbf-bootctl/rtc_battery: No such file or directory svc-soc-ver@bu-lab64v1-oob:~$ sudo cat /sys/bus/platform/drivers/mlxbf-bootctl/MLNXBF04\:00/rtc_battery 0x0 ** Tags removed: verification-needed-jammy-linux-bluefield ** Tags added: verification-done-jammy-linux-bluefield -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-bluefield in Ubuntu. https://bugs.launchpad.net/bugs/2078881 Title: mlx-bootctl: support RTC battery status read and clear Status in linux-bluefield package in Ubuntu: New Status in linux-bluefield source package in Jammy: Fix Committed Bug description: SRU Justification: [Impact] The RTC battery status is not directly accessible from the kernel user space. The recent Nvidia UEFI added SMC to report the RTC battery status and clear the status bit if needed. [Fix] * Added an rtc_battery entry in the bootctl driver. * Read the rtc_battery entry will trigger an SMC call to read the RTC battery status. [Test Case] * Check if the bootctl driver is loaded. * Check the rtc_battery entry: cat /sys/bus/platform/drivers/mlxbf-bootctl/rtc_battery A value of 0x0 means RTC battery voltage is good. A value of 0x80 means RTC battery voltage is low. The status bit is also cleared after the read. An error code will be return if this feature is missing from UEFI. [Other] * This code is likely to change depending on feedback we received from maintainers. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-bluefield/+bug/2078881/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp