Skip to content

Commit e59289d

Browse files
Dino-Likartben
authored andcommitted
soc/it8xxx2: disable USB debug path at default
This change disables USB debug path at default, in order to prevent SoC from entering debug mode when there is signal toggling on GPH5/GPH6. Signed-off-by: Dino Li <[email protected]>
1 parent 9f72e65 commit e59289d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

soc/ite/ec/common/chip_chipregs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,7 @@ struct gctrl_it8xxx2_regs {
16621662
/* 0x20: Memory Controller Configuration 3 */
16631663
#define IT8XXX2_GCTRL_SPISLVPFE BIT(6)
16641664
/* 0x30: Memory Controller Configuration */
1665+
#define IT8XXX2_GCTRL_USB_DEBUG_EN BIT(7)
16651666
#define IT8XXX2_GCTRL_ICACHE_RESET BIT(4)
16661667
/* 0x37: Eflash Protect Lock */
16671668
#define IT8XXX2_GCTRL_EPLR_ENABLE BIT(0)

soc/ite/ec/it8xxx2/soc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,12 @@ static int ite_it8xxx2_init(void)
387387
*/
388388
gctrl_regs->GCTRL_WMCR |= BIT(7);
389389

390+
/*
391+
* Disable USB debug at default, in order to prevent SoC
392+
* from entering debug mode when there is signal toggling on GPH5/GPH6.
393+
*/
394+
gctrl_regs->GCTRL_MCCR &= ~IT8XXX2_GCTRL_USB_DEBUG_EN;
395+
390396
/*
391397
* Disable this feature that can detect pre-define hardware
392398
* target A through I2C0. This is for debugging use, so it

0 commit comments

Comments
 (0)