Skip to content

Commit 3f88026

Browse files
committed
soc: ite: it51xxx: Prevent floating FSPI pins by enabling tri-state
To prevent FSPI pins from floating, which may cause internal leakage and increase SoC power consumption, tri-state is enabled by default. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
1 parent b15404f commit 3f88026

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

soc/ite/ec/it51xxx/chip_chipregs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ struct smfi_it51xxx_regs {
7575
#define SCARH_ENABLE BIT(7)
7676
#define SCARH_ADDR_BIT19 BIT(3)
7777

78+
#define IT51XXX_SMFI_BASE 0xf01000
79+
/* 0x63: Flash Control Register 3 */
80+
#define IT51XXX_SMFI_FLHCTRL3R (IT51XXX_SMFI_BASE + 0x63)
81+
#define IT51XXX_SMFI_FFSPITRI BIT(0)
82+
7883
/**
7984
*
8085
* (16xxh) General Purpose I/O Port (GPIO) registers

soc/ite/ec/it51xxx/soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ void soc_prep_hook(void)
117117
struct gpio_ite_ec_regs *const gpio_regs = GPIO_ITE_EC_REGS_BASE;
118118
struct gctrl_ite_ec_regs *const gctrl_regs = GCTRL_ITE_EC_REGS_BASE;
119119

120+
/* Set FSPI pins are tri-state */
121+
sys_write8(sys_read8(IT51XXX_SMFI_FLHCTRL3R) | IT51XXX_SMFI_FFSPITRI,
122+
IT51XXX_SMFI_FLHCTRL3R);
123+
120124
/* Scratch SRAM0 uses the 4KB based form 0x801000h */
121125
gctrl_regs->GCTRL_SCR0BAR = IT51XXX_SEL_SRAM0_BASE_4K;
122126

0 commit comments

Comments
 (0)