diff options
-rw-r--r-- | board/nipperkin/board.c | 18 | ||||
-rw-r--r-- | board/nipperkin/gpio.inc | 6 |
2 files changed, 22 insertions, 2 deletions
diff --git a/board/nipperkin/board.c b/board/nipperkin/board.c index cdb3b6e642..42df3c312b 100644 --- a/board/nipperkin/board.c +++ b/board/nipperkin/board.c @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* Guybrush board-specific configuration */ +/* Nipperkin board-specific configuration */ #include "adc.h" #include "base_fw_config.h" @@ -321,3 +321,19 @@ static int board_get_temp(int idx, int *temp_k) return EC_ERROR_NOT_POWERED; return get_temp_3v3_30k9_47k_4050b(idx, temp_k); } + +/* Called on AP resume to S0 */ +static void board_chipset_resume(void) +{ + ioex_set_level(IOEX_HDMI_DATA_EN, 1); + ioex_set_level(IOEX_EN_PWR_HDMI, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + +/* Called on AP suspend */ +static void board_chipset_suspend(void) +{ + ioex_set_level(IOEX_EN_PWR_HDMI, 0); + ioex_set_level(IOEX_HDMI_DATA_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); diff --git a/board/nipperkin/gpio.inc b/board/nipperkin/gpio.inc index 06e9fc3ccd..ec35ce6c2c 100644 --- a/board/nipperkin/gpio.inc +++ b/board/nipperkin/gpio.inc @@ -15,6 +15,10 @@ GPIO(C0_CHARGE_LED_WHITE_L, PIN(8, 0), GPIO_OUT_HIGH) GPIO(C1_CHARGE_LED_AMBER_L, PIN(6, 7), GPIO_OUT_HIGH) GPIO(C1_CHARGE_LED_WHITE_L, PIN(7, 0), GPIO_OUT_HIGH) +/* HDMI */ +IOEX(EN_PWR_HDMI, EXPIN(USBC_PORT_C0, 0, 3), GPIO_OUT_LOW) +IOEX(HDMI_DATA_EN, EXPIN(USBC_PORT_C0, 1, 4), GPIO_OUT_LOW) + /* Test Points */ GPIO(EC_GPIO56, PIN(5, 6), GPIO_INPUT | GPIO_PULL_UP) GPIO(EC_PS2_RST, PIN(6, 2), GPIO_INPUT | GPIO_PULL_UP) @@ -22,4 +26,4 @@ GPIO(EC_GPIOB0, PIN(B, 0), GPIO_INPUT | GPIO_PULL_UP) GPIO(EC_GPIO81, PIN(8, 1), GPIO_INPUT | GPIO_PULL_UP) GPIO(EC_FLPRG2, PIN(8, 6), GPIO_INPUT | GPIO_PULL_UP) GPIO(EC_PSL_GPO, PIN(D, 7), GPIO_INPUT | GPIO_PULL_UP) -GPIO(EC_PWM7, PIN(6, 0), GPIO_INPUT | GPIO_PULL_UP)
\ No newline at end of file +GPIO(EC_PWM7, PIN(6, 0), GPIO_INPUT | GPIO_PULL_UP) |