ITE: drivers/i2c: add the compatibility of GPIO F2/F3 for i2c3

The default I2C channel 3 is used by alternate function of GPIO H1/H2
Krabby uses GPIO F2/F3 as I2C channel 3, so we need to add the
compatibility of the GPIO F2/F3.

TEST=test on it8xxx2_evb:
zmake configure -b zephyr/projects/it8xxx2_evb/

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
This commit is contained in:
Tim Lin 2021-12-16 11:54:51 +08:00 committed by Carles Cufí
commit 45b6aa4c3b
5 changed files with 29 additions and 27 deletions

View file

@ -1652,6 +1652,11 @@ enum chip_pll_mode {
#define IT83XX_I2C_RAMH2A(base) ECREG(base+0x50)
#define IT83XX_I2C_CMD_ADDH2(base) ECREG(base+0x52)
/* SMBus/I2C register fields */
/* 0x07: Time Out Status */
#define IT8XXX2_I2C_SCL_IN BIT(2)
#define IT8XXX2_I2C_SDA_IN BIT(0)
/* --- General Control (GCTRL) --- */
#define IT83XX_GCTRL_BASE 0x00F02000
@ -1847,6 +1852,8 @@ struct gctrl_it8xxx2_regs {
#define IT8XXX2_GCTRL_LRSIWR BIT(2)
#define IT8XXX2_GCTRL_LRSIPWRSWTR BIT(1)
#define IT8XXX2_GCTRL_LRSIPGWR BIT(0)
/* 0x46: Pin Multi-function Enable 3 */
#define IT8XXX2_GCTRL_SMB3PSEL BIT(6)
/* 0x4B: ETWD and UART Control */
#define IT8XXX2_GCTRL_ETWD_HW_RST_EN BIT(0)
/* Accept Port 80h Cycle */