Skip to content

Commit 9cf6d66

Browse files
alvsunkartben
authored andcommitted
soc: npcx: npcx9: disable CCDEV_SEL in early initialization.
Enabling CCDEV_SEL_EN may interfere with the expected behavior of VCC1_RST#. To prevent potential issues, this commit sets CCDEV_SEL_EN to be disabled by default, ensuring reliable VCC1_RST# behavior. Signed-off-by: Alvis Sun <yfsun@nuvoton.com> Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
1 parent 9847818 commit 9cf6d66

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

soc/nuvoton/npcx/common/npcxn/include/reg_def.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,13 @@ struct scfg_reg {
198198
#define NPCX_JEN_CTL1_JEN_ENABLE 0x9
199199
#define NPCX_JEN_CTL1_JEN_DISABLE 0x6
200200

201+
#define NPCX_JEN_CTL2_OFFSET 0x121
202+
#define NPCX_JEN_CTL2(base) (*(volatile uint8_t *)(base + (NPCX_JEN_CTL2_OFFSET)))
203+
204+
#define NPCX_JEN_CTL2_CCDEV_SEL_EN FIELD(0, 4)
205+
#define NPCX_JEN_CTL2_CCDEV_SEL_ENABLE 0x9
206+
#define NPCX_JEN_CTL2_CCDEV_SEL_DISABLE 0x6
207+
201208
/* SCFG register fields */
202209
#define NPCX_DEVCNT_F_SPI_TRIS 6
203210
#define NPCX_DEVCNT_HIF_TYP_SEL_FIELD FIELD(2, 2)

soc/nuvoton/npcx/npcx9/soc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ void soc_early_init_hook(void)
2020

2121
SET_FIELD(NPCX_JEN_CTL1(scfg_base), NPCX_JEN_CTL1_JEN_HEN,
2222
NPCX_JEN_CTL1_JEN_DISABLE);
23+
24+
SET_FIELD(NPCX_JEN_CTL2(scfg_base), NPCX_JEN_CTL2_CCDEV_SEL_EN,
25+
NPCX_JEN_CTL2_CCDEV_SEL_DISABLE);
2326
}
2427
scfg_init();
2528
}

0 commit comments

Comments
 (0)