diff options
-rw-r--r-- | board/kukui/board.c | 2 | ||||
-rw-r--r-- | board/kukui/board.h | 2 | ||||
-rw-r--r-- | board/kukui/gpio.inc | 21 | ||||
-rw-r--r-- | power/mt8183.c | 4 |
4 files changed, 1 insertions, 28 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c index 102aab1c92..2b285fb2ef 100644 --- a/board/kukui/board.c +++ b/board/kukui/board.c @@ -52,7 +52,6 @@ static void tcpc_alert_event(enum gpio_signal signal) schedule_deferred_pd_interrupt(0 /* port */); } -#if BOARD_REV >= 1 static void hall_interrupt(enum gpio_signal signal) { /* TODO(b/111378000): Implement hall_interrupt */ @@ -62,7 +61,6 @@ static void gauge_interrupt(enum gpio_signal signal) { task_wake(TASK_ID_CHARGER); } -#endif #include "gpio_list.h" diff --git a/board/kukui/board.h b/board/kukui/board.h index 784d8fa83e..9af682589c 100644 --- a/board/kukui/board.h +++ b/board/kukui/board.h @@ -11,7 +11,7 @@ /* board revision */ #define BOARD_REV 1 -#if BOARD_REV < 0 || BOARD_REV > 1 +#if BOARD_REV < 1 || BOARD_REV > 1 #error "Board revision out of range" #endif diff --git a/board/kukui/gpio.inc b/board/kukui/gpio.inc index 720eaa42c5..367c69e9a5 100644 --- a/board/kukui/gpio.inc +++ b/board/kukui/gpio.inc @@ -37,32 +37,20 @@ GPIO_INT_RO(EMMC_CMD, PIN(B, 15), GPIO_INT_FALLING, emmc_cmd_interrupt) GPIO_INT(SPI1_NSS, PIN(A, 15), GPIO_INT_BOTH, spi_event) -#if BOARD_REV == 0 -GPIO_INT_RW(SYNC_INT, PIN(A, 5), GPIO_INT_RISING | GPIO_PULL_DOWN, - sync_interrupt) -GPIO(SPI1_NSS, PIN(A, 15), GPIO_INPUT) -#elif BOARD_REV >= 1 GPIO_INT_RW(SYNC_INT, PIN(A, 8), GPIO_INT_RISING | GPIO_PULL_DOWN, sync_interrupt) GPIO_INT(HALL_INT_L, PIN(C, 5), GPIO_INT_FALLING, hall_interrupt) GPIO_INT(GAUGE_INT_ODL, PIN(C, 9), GPIO_INT_FALLING | GPIO_PULL_UP, gauge_interrupt) -#endif /* Interrupts not implemented yet */ -#if BOARD_REV >= 1 GPIO(ALS_INT_ODL, PIN(A, 6), GPIO_INPUT) -#endif /* Voltage rails control pins */ GPIO(PP3300_S0_EN, PIN(B, 6), GPIO_OUT_LOW) GPIO(PP1800_S3_EN, PIN(C, 7), GPIO_OUT_LOW) -#if BOARD_REV == 0 -GPIO(PP3300_S3_EN, PIN(A, 8), GPIO_OUT_LOW) -#elif BOARD_REV >= 1 GPIO(PP3300_S3_EN, PIN(D, 2), GPIO_OUT_LOW) -#endif /* Reset pins */ GPIO(AP_SYS_RST_L, PIN(C, 11), GPIO_OUT_LOW) @@ -86,12 +74,8 @@ GPIO(BOARD_ID, PIN(C, 0), GPIO_ANALOG) /* Other input pins */ GPIO(WP_L, PIN(C, 8), GPIO_INPUT) /* EC_FLASH_WP_ODL */ GPIO(BOOT0, PIN(F, 11), GPIO_INPUT) -#if BOARD_REV == 0 -GPIO(CCD_MODE_ODL, PIN(C, 9), GPIO_INPUT) -#elif BOARD_REV >= 1 GPIO(CCD_MODE_ODL, PIN(A, 1), GPIO_INPUT) GPIO(BATT_ID, PIN(A, 7), GPIO_INPUT) -#endif /* Other output pins */ GPIO(ENTERING_RW, PIN(C, 6), GPIO_ODR_HIGH) /* EC_ENTERING_RW_ODL */ @@ -102,13 +86,8 @@ GPIO(USB_C0_DP_POLARITY, PIN(C, 14), GPIO_OUT_LOW) GPIO(USB_C0_HPD_OD, PIN(F, 1), GPIO_ODR_LOW) GPIO(BOOTBLOCK_MUX_OE, PIN(C, 4), GPIO_ODR_HIGH) GPIO(BOOTBLOCK_EN_L, PIN(C, 1), GPIO_ODR_HIGH) -#if BOARD_REV == 0 -GPIO(USB_C0_DP_OE_L, PIN(C, 5), GPIO_OUT_HIGH) -GPIO(OTG_EN, PIN(A, 6), GPIO_OUT_LOW) -#elif BOARD_REV >= 1 GPIO(USB_C0_DP_OE_L, PIN(A, 5), GPIO_OUT_HIGH) GPIO(USB_ID, PIN(A, 13), GPIO_ODR_HIGH) -#endif /* USART1: PA9/PA10 */ ALTERNATE(PIN_MASK(A, 0x0600), 1, MODULE_UART, 0) diff --git a/power/mt8183.c b/power/mt8183.c index 72e844d97a..7d228a679a 100644 --- a/power/mt8183.c +++ b/power/mt8183.c @@ -380,9 +380,6 @@ enum power_state power_handle_state(enum power_state state) * shuts down upon receiving WATCHDOG. */ if (power_get_signals() & IN_PGOOD_PMIC) { -#if (defined(BOARD_KUKUI) || defined(BOARD_FLAPJACK)) && BOARD_REV == 0 - CPRINTS("Cannot force PMIC off (rev0)"); -#else CPRINTS("Forcing PMIC off"); gpio_set_level(GPIO_PMIC_FORCE_RESET_ODL, 0); msleep(5); @@ -390,7 +387,6 @@ enum power_state power_handle_state(enum power_state state) PMIC_FORCE_RESET_TIME); return POWER_S5G3; -#endif } return POWER_G3; |