1 /*
2  * Copyright (c) 2024 Nuvoton Technology Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/device.h>
9 #include <zephyr/init.h>
10 #include <soc.h>
11 #include <zephyr/logging/log.h>
12 
13 LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
14 
15 extern void scfg_init(void);
soc_early_init_hook(void)16 void soc_early_init_hook(void)
17 {
18 	if (IS_ENABLED(CONFIG_NPCX_VCC1_RST_HANG_WORKAROUND)) {
19 		uintptr_t scfg_base = DT_REG_ADDR_BY_NAME(DT_NODELABEL(scfg), scfg);
20 
21 		SET_FIELD(NPCX_JEN_CTL1(scfg_base), NPCX_JEN_CTL1_JEN_HEN,
22 			  NPCX_JEN_CTL1_JEN_DISABLE);
23 	}
24 	scfg_init();
25 }
26