2023-05-10 05:47:55 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 Antmicro <www.antmicro.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <zephyr/init.h>
|
|
|
|
|
|
|
|
#include <am_mcu_apollo.h>
|
|
|
|
|
2024-09-10 21:42:27 +08:00
|
|
|
extern void ambiq_power_init(void);
|
|
|
|
void soc_early_init_hook(void)
|
2023-05-10 05:47:55 +08:00
|
|
|
{
|
2023-09-05 22:54:39 +08:00
|
|
|
|
|
|
|
/* Initialize for low power in the power control block */
|
2023-05-10 05:47:55 +08:00
|
|
|
am_hal_pwrctrl_low_power_init();
|
2023-09-05 22:54:39 +08:00
|
|
|
|
|
|
|
/* Enable SIMOBUCK for the Apollo4 Family */
|
|
|
|
am_hal_pwrctrl_control(AM_HAL_PWRCTRL_CONTROL_SIMOBUCK_INIT, 0);
|
|
|
|
|
|
|
|
/* Disable the RTC. */
|
2023-05-10 05:47:55 +08:00
|
|
|
am_hal_rtc_osc_disable();
|
2024-09-10 21:42:27 +08:00
|
|
|
#ifdef CONFIG_PM
|
|
|
|
ambiq_power_init();
|
|
|
|
#endif
|
2023-05-10 05:47:55 +08:00
|
|
|
}
|