[PATCH 2/3] configs: am62ax: setup the 32k RTC crystal

Bryan Brattlof
2023-11-07T23:22:29Z

The am62ax utilizes the same 32k crystal for a more accurate RTC clock
source. Enable the configuration to set this up for Linux.

Signed-off-by: Bryan Brattlof <bb@ti.com>
---
board/ti/am62ax/evm.c | 5 +++++
configs/am62ax_evm_a53_defconfig | 1 +
2 files changed, 6 insertions(+)

diff --git a/board/ti/am62ax/evm.c b/board/ti/am62ax/evm.c
index f2dd3b4192ee0..6e031784766c4 100644
--- a/board/ti/am62ax/evm.c
+++ b/board/ti/am62ax/evm.c
@@ -14,8 +14,13 @@
#include <fdt_support.h>
#include <spl.h>

+#include "../common/rtc.c"
+
int board_init(void)
{
+ if (IS_ENABLED(CONFIG_BOARD_HAS_32K_RTC_CRYSTAL))
+ board_rtc_init();
+
return 0;
}

diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
index d0a34c75505d2..e9e969c842d7d 100644
--- a/configs/am62ax_evm_a53_defconfig
+++ b/configs/am62ax_evm_a53_defconfig
@@ -1,6 +1,7 @@
CONFIG_ARM=y
CONFIG_ARCH_K3=y
CONFIG_SYS_MALLOC_F_LEN=0x8000
+CONFIG_BOARD_HAS_32K_RTC_CRYSTAL=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
--
2.42.0