[PATCH 2/6] board: ti: am62ax: Add basic initialization for 32k crystal

Vishal Mahaveer vishalm at ti.com
Wed Dec 10 16:48:40 CET 2025


Do the basic configuration required for enabling the 32k crystal. If
external 32k source is not used, 32k rc-osc comes into play, which is
accurate to +-20%.

Signed-off-by: Vishal Mahaveer <vishalm at ti.com>
---
 board/ti/am62ax/evm.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/board/ti/am62ax/evm.c b/board/ti/am62ax/evm.c
index da6c31176cd..fffbddbdcc0 100644
--- a/board/ti/am62ax/evm.c
+++ b/board/ti/am62ax/evm.c
@@ -35,3 +35,19 @@ int board_late_init(void)
 	return 0;
 }
 #endif
+
+#if IS_ENABLED(CONFIG_SPL_BOARD_INIT)
+void spl_board_init(void)
+{
+	u32 val;
+
+	/* We have 32k crystal, so lets enable it */
+	val = readl(MCU_CTRL_LFXOSC_CTRL);
+	val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL);
+	writel(val, MCU_CTRL_LFXOSC_CTRL);
+	/* Add any TRIM needed for the crystal here.. */
+	/* Make sure to mux up to take the SoC 32k from the crystal */
+	writel(MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL,
+	       MCU_CTRL_DEVICE_CLKOUT_32K_CTRL);
+}
+#endif
-- 
2.34.1



More information about the U-Boot mailing list