diff options
author | reno.wang <reno.wang@lcfc.corp-partner.google.com> | 2021-03-17 17:33:54 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-18 07:55:27 +0000 |
commit | c200669dfe250a989864e7889f3e2f35406ec40d (patch) | |
tree | 7ee4792d051ccc6d6db947ac99f59e422e2515f2 | |
parent | 77ea2c29a7661539307934f61aecb9650deba270 (diff) | |
download | chrome-ec-c200669dfe250a989864e7889f3e2f35406ec40d.tar.gz |
boten: Optimize EC power consumption
From Boten HW circuit, some GPIO in EC side is NC or unused.
So, we can configure it as NC to optimize EC power consumption.
1. HDMI_EN_SUB_ODL (GPE0)
2. EC_SUB_IO_1 (GPF0)
3. EC_SUB_IO_1 (GPL3
4. EC_SUB_ANALOG (GPL0/ADC13)
BUG=b:182973699
BRANCH=boten
TEST=make buildall
Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com>
Change-Id: I98875455a04ae58deb4a70a73ed2c73aafac0fe7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2767060
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Henry Sun <henrysun@google.com>
-rw-r--r-- | board/boten/board.c | 9 | ||||
-rw-r--r-- | board/boten/board.h | 1 | ||||
-rw-r--r-- | board/boten/gpio.inc | 8 |
3 files changed, 4 insertions, 14 deletions
diff --git a/board/boten/board.c b/board/boten/board.c index 7c7ba53814..4ca4141218 100644 --- a/board/boten/board.c +++ b/board/boten/board.c @@ -167,13 +167,6 @@ const struct adc_t adc_channels[] = { .shift = 0, .channel = CHIP_ADC_CH3 }, - [ADC_SUB_ANALOG] = { - .name = "SUB_ANALOG", - .factor_mul = ADC_MAX_MVOLT, - .factor_div = ADC_READ_MAX + 1, - .shift = 0, - .channel = CHIP_ADC_CH13 - }, }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); @@ -228,8 +221,6 @@ void board_init(void) /* Enable gpio interrupt for pen detect */ gpio_enable_interrupt(GPIO_PEN_DET_ODL); - gpio_set_level(GPIO_HDMI_EN_SUB_ODL, 0); - /* Set LEDs luminance */ pwm_set_duty(PWM_CH_LED_RED, 70); pwm_set_duty(PWM_CH_LED_GREEN, 70); diff --git a/board/boten/board.h b/board/boten/board.h index 14b1de5325..8b456e7971 100644 --- a/board/boten/board.h +++ b/board/boten/board.h @@ -120,7 +120,6 @@ enum adc_channel { ADC_VSNS_PP3300_A, /* ADC0 */ ADC_TEMP_SENSOR_1, /* ADC2 */ ADC_TEMP_SENSOR_2, /* ADC3 */ - ADC_SUB_ANALOG, /* ADC13 */ ADC_CH_COUNT }; diff --git a/board/boten/gpio.inc b/board/boten/gpio.inc index 493ef32acb..eaccd0b8ae 100644 --- a/board/boten/gpio.inc +++ b/board/boten/gpio.inc @@ -85,14 +85,11 @@ GPIO(EN_USB_A1_VBUS, PIN(E, 6), GPIO_OUT_LOW) GPIO(EC_AP_USB_C0_HPD, PIN(L, 4), GPIO_OUT_LOW) GPIO(EC_AP_USB_C1_HDMI_HPD, PIN(K, 7), GPIO_OUT_LOW) GPIO(HDMI_SEL_L, PIN(C, 6), GPIO_OUT_LOW) -GPIO(HDMI_EN_SUB_ODL, PIN(E, 0), GPIO_OUT_HIGH) /* MKBP event synchronization */ GPIO(EC_AP_MKBP_INT_L, PIN(L, 5), GPIO_ODR_HIGH) /* Misc pins which will run to the I/O board */ -GPIO(EC_SUB_IO_1_1, PIN(L, 3), GPIO_INPUT) -GPIO(EC_SUB_IO_1_2, PIN(F, 0), GPIO_INPUT) /* Misc */ GPIO(EN_BL_OD, PIN(K, 4), GPIO_ODR_LOW) @@ -110,6 +107,8 @@ GPIO(ECH1_PACKET_MODE, PIN(H, 1), GPIO_OUT_LOW) GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOC3_NC, PIN(C, 3), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOC4_NC, PIN(C, 4), GPIO_INPUT | GPIO_PULL_DOWN) +GPIO(GPIOE0_NC, PIN(E, 0), GPIO_INPUT | GPIO_PULL_DOWN) +GPIO(GPIOF0_NC, PIN(F, 0), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOF4_NC, PIN(F, 4), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOF5_NC, PIN(F, 5), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOG3_NC, PIN(G, 3), GPIO_INPUT | GPIO_PULL_DOWN) @@ -122,7 +121,9 @@ GPIO(GPIOH6_NC, PIN(H, 6), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ4_NC, PIN(J, 4), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ5_NC, PIN(J, 5), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOJ6_NC, PIN(J, 6), GPIO_INPUT | GPIO_PULL_DOWN) +GPIO(GPIOL0_NC, PIN(L, 0), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOL2_NC, PIN(L, 2), GPIO_INPUT | GPIO_PULL_DOWN) +GPIO(GPIOL3_NC, PIN(L, 3), GPIO_INPUT | GPIO_PULL_DOWN) GPIO(GPIOM6_NC, PIN(M, 6), GPIO_INPUT | GPIO_PULL_DOWN) /* Alternate functions GPIO definitions */ @@ -136,7 +137,6 @@ ALTERNATE(PIN_MASK(F, BIT(6) | BIT(7)), 0, MODULE_I2C, GPIO_SEL_1P8V) /* I2C2 - ALTERNATE(PIN_MASK(A, BIT(4) | BIT(5)), 0, MODULE_I2C, 0) /* I2C5 */ /* ADC */ -ALTERNATE(PIN_MASK(L, BIT(0)), 0, MODULE_ADC, 0) /* ADC13: EC_SUB_ANALOG */ ALTERNATE(PIN_MASK(I, BIT(0) | BIT(2) | BIT(3)), 0, MODULE_ADC, 0) /* ADC0: EC_VSNS_PP3300_A, ADC2: TEMP_SENSOR_1, ADC3: TEMP_SENSOR_2 */ /* DAC */ |