diff options
-rw-r--r-- | board/zoombini/board.c | 10 | ||||
-rw-r--r-- | board/zoombini/board.h | 3 | ||||
-rw-r--r-- | board/zoombini/gpio.inc | 21 | ||||
-rw-r--r-- | power/cannonlake.c | 1 |
4 files changed, 23 insertions, 12 deletions
diff --git a/board/zoombini/board.c b/board/zoombini/board.c index 5ee427a69a..755948a45f 100644 --- a/board/zoombini/board.c +++ b/board/zoombini/board.c @@ -14,6 +14,9 @@ #include "compile_time_macros.h" #include "driver/tcpm/ps8xxx.h" #include "ec_commands.h" +#ifdef CONFIG_ESPI_VW_SIGNALS +#include "espi.h" +#endif /* defined(CONFIG_ESPI_VW_SIGNALS) */ #include "extpower.h" #include "gpio.h" #include "hooks.h" @@ -72,9 +75,14 @@ BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT); /* Power signal list. Must match order of enum power_signal. */ const struct power_signal_info power_signal_list[] = { - /* TODO(aaboagye): consider eSPI VW signals. */ + {GPIO_PCH_SLP_S0_L, 1, "SLP_S0_DEASSERTED"}, +#ifdef CONFIG_ESPI_VW_SIGNALS + {VW_SLP_S3_L, 1, "SLP_S3_DEASSERTED"}, + {VW_SLP_S4_L, 1, "SLP_S4_DEASSERTED"}, +#else {GPIO_PCH_SLP_S3_L, 1, "SLP_S3_DEASSERTED"}, {GPIO_PCH_SLP_S4_L, 1, "SLP_S4_DEASSERTED"}, +#endif /* defined(CONFIG_ESPI_VW_SIGNALS) */ {GPIO_PCH_SLP_SUS_L, 1, "SLP_SUS_DEASSERTED"}, {GPIO_RSMRST_L_PGOOD, 1, "RSMRST_L_PGOOD"}, {GPIO_PMIC_DPWROK, 1, "PMIC_DPWROK"}, diff --git a/board/zoombini/board.h b/board/zoombini/board.h index 0dfd73373f..4a2447c1e5 100644 --- a/board/zoombini/board.h +++ b/board/zoombini/board.h @@ -9,7 +9,6 @@ #define __CROS_EC_BOARD_H /* Optional features */ -#define CONFIG_BRINGUP #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands. */ /* NPCX7 config */ @@ -25,6 +24,7 @@ /* EC Modules */ #define CONFIG_ADC #define CONFIG_ESPI +#define CONFIG_ESPI_VW_SIGNALS #define CONFIG_I2C #define CONFIG_LPC #define CONFIG_PWM @@ -125,6 +125,7 @@ enum pwm_channel { }; enum power_signal { + X86_SLP_S0_DEASSERTED, X86_SLP_S3_DEASSERTED, X86_SLP_S4_DEASSERTED, X86_SLP_SUS_DEASSERTED, diff --git a/board/zoombini/gpio.inc b/board/zoombini/gpio.inc index 5b022c45bc..882234eba2 100644 --- a/board/zoombini/gpio.inc +++ b/board/zoombini/gpio.inc @@ -18,16 +18,18 @@ GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH, lid_interrupt) GPIO_INT(AC_PRESENT, PIN(0, 0), GPIO_INT_BOTH, extpower_interrupt) /* Power Signals. */ +GPIO_INT(PCH_SLP_S0_L, PIN(A, 4), GPIO_INT_BOTH, power_signal_interrupt) +#ifndef CONFIG_ESPI_VW_SIGNALS GPIO_INT(PCH_SLP_S3_L, PIN(A, 6), GPIO_INT_BOTH, power_signal_interrupt) GPIO_INT(PCH_SLP_S4_L, PIN(A, 3), GPIO_INT_BOTH, power_signal_interrupt) +#endif /* defined(CONFIG_ESPI_VW_SIGNALS) */ GPIO_INT(PCH_SLP_SUS_L, PIN(D, 4), GPIO_INT_BOTH, power_signal_interrupt) /* TODO(aaboagye): Internal PU may be needed later on... */ GPIO_INT(RSMRST_L_PGOOD, PIN(E, 2), GPIO_INT_BOTH, power_signal_interrupt) -/* TODO(aaboagye): is this the same as DSW_PWROK ? */ GPIO_INT(PMIC_DPWROK, PIN(F, 4), GPIO_INT_BOTH, power_signal_interrupt) /* Power Enables. */ -GPIO(EN_PP3300_DSW, PIN(6, 0), GPIO_OUT_LOW) +GPIO(EN_PP3300_DSW, PIN(6, 0), GPIO_OUT_HIGH) GPIO(EN_PP3300_EC_TCPC_DX, PIN(8, 5), GPIO_OUT_HIGH) GPIO(EN_PP3300_TRACKPAD, PIN(B, 7), GPIO_ODR_LOW) GPIO(EN_PP3300_WLAN, PIN(C, 0), GPIO_ODR_LOW) @@ -38,14 +40,13 @@ GPIO(ENTERING_RW, PIN(E, 1), GPIO_OUT_LOW) GPIO(CCD_MODE_ODL, PIN(E, 3), GPIO_INPUT) /* Case Closed Debug mode. */ GPIO(KB_BL_EN, PIN(8, 6), GPIO_OUT_LOW) -GPIO(PCH_DSW_PWROK, PIN(3, 7), GPIO_OUT_LOW) /* EC_PCH_DSW_PWROK */ -/* TODO(aaboagye): Revisit these default states. */ +GPIO(PCH_DSW_PWROK, PIN(3, 7), GPIO_OUT_LOW) /* EC_PCH_DSW_PWROK */ GPIO(PCH_RSMRST_L, PIN(C, 2), GPIO_OUT_LOW) /* EC_PCH_RSMRST_L */ -GPIO(PCH_RTCRST, PIN(7, 6), GPIO_OUT_LOW) /* EC_PCH_RTCRST */ -GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* EC_PCH_PWR_BTN_ODL */ -GPIO(PCH_WAKE_L, PIN(7, 4), GPIO_OUT_HIGH) /* EC_PCH_WAKE_ODL */ -GPIO(CPU_PROCHOT, PIN(3, 4), GPIO_INPUT) /* PCH_PROCHOT_ODL */ -GPIO(SYS_RESET_L, PIN(0, 2), GPIO_ODR_HIGH) /* SYS_RST_ODL */ +GPIO(PCH_RTCRST, PIN(7, 6), GPIO_OUT_LOW) /* EC_PCH_RTCRST */ +GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* EC_PCH_PWR_BTN_ODL */ +GPIO(PCH_WAKE_L, PIN(7, 4), GPIO_ODR_HIGH) /* EC_PCH_WAKE_ODL */ +GPIO(CPU_PROCHOT, PIN(3, 4), GPIO_INPUT) /* PCH_PROCHOT_ODL */ +GPIO(SYS_RESET_L, PIN(0, 2), GPIO_ODR_HIGH) /* SYS_RST_ODL */ GPIO(I2C0_SCL, PIN(B, 5), GPIO_INPUT) GPIO(I2C0_SDA, PIN(B, 4), GPIO_INPUT) @@ -76,7 +77,7 @@ ALTERNATE(PIN_MASK(B, 0x30), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C0 */ ALTERNATE(PIN_MASK(9, 0x07), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C1 SDA / I2C2 */ ALTERNATE(PIN_MASK(8, 0x80), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C1 SCL */ ALTERNATE(PIN_MASK(D, 0x03), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C3 */ -ALTERNATE(PIN_MASK(3, 0x44), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C5 */ +ALTERNATE(PIN_MASK(3, 0x48), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C5 */ /* Keyboard Pins */ /* KSI_00-01 */ diff --git a/power/cannonlake.c b/power/cannonlake.c index 49a38051c3..18a20ebef0 100644 --- a/power/cannonlake.c +++ b/power/cannonlake.c @@ -75,6 +75,7 @@ enum power_state chipset_force_g3(void) { CPRINTS("Faking G3. (NOOP for now.)"); /* TODO(aaboagye): Do the right thing for real. */ + /* TODO(aaboagye): maybe turn off DSW load switch. */ return POWER_G3; } |