drivers: clock_control: npcx: add NPCXn variant support in clock init

As title.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
This commit is contained in:
Alvis Sun 2025-04-15 11:24:24 +08:00 committed by Fabio Baltieri
parent f24ba75aba
commit bcf7717e97

View File

@ -208,9 +208,11 @@ static int npcx_clock_control_init(const struct device *dev)
struct cdcg_reg *const inst_cdcg = HAL_CDCG_INST(dev);
const uint32_t pmc_base = ((const struct npcx_pcc_config *)dev->config)->base_pmc;
#if defined(CONFIG_NPCX_SOC_VARIANT_NPCXN)
if (IS_ENABLED(CONFIG_CLOCK_CONTROL_NPCX_EXTERNAL_SRC)) {
inst_cdcg->LFCGCTL2 |= BIT(NPCX_LFCGCTL2_XT_OSC_SL_EN);
}
#endif
/*
* Resetting the OFMCLK (even to the same value) will make the clock