summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2020-01-29 11:19:22 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-31 03:41:45 +0000
commitdbb8bb2d7e71a5b6cb3aa71e3f324a576f6c9a5f (patch)
treea7263a800ebac93b1fbf68976133fd9a71444190
parent036e9f7b214b763524497550aae0ee94df8fd536 (diff)
downloadchrome-ec-dbb8bb2d7e71a5b6cb3aa71e3f324a576f6c9a5f.tar.gz
waddledoo: Change PP1050_ST power good
The power good for VCCST is actually now a digital signal as opposed to an analog signal that it used to be. This commit updates the waddledoo GPIO configuration to account for this fact. BUG=b:148169171 BRANCH=None TEST=`make -j BOARD=waddledoo`; flash waddledoo, verify EC boots okay. Change-Id: I0fe64c07705fa3652b79414a3ec451ebf7204aae Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2028354 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--baseboard/dedede/baseboard.c10
-rw-r--r--baseboard/dedede/variant_ec_npcx796fc.c4
-rw-r--r--board/waddledoo/board.h1
-rw-r--r--board/waddledoo/gpio.inc3
4 files changed, 5 insertions, 13 deletions
diff --git a/baseboard/dedede/baseboard.c b/baseboard/dedede/baseboard.c
index e68b955849..330abcfd44 100644
--- a/baseboard/dedede/baseboard.c
+++ b/baseboard/dedede/baseboard.c
@@ -33,14 +33,10 @@ __override int intel_x86_get_pg_ec_dsw_pwrok(void)
__override int intel_x86_get_pg_ec_all_sys_pwrgd(void)
{
/*
- * ALL_SYS_PWRGD is an AND of both DRAM PGOOD and VCCST PGOOD. Note
- * that this is an inverted power good; a low value means that the power
- * is good. Therefore, we are assuming that power is good if voltage is
- * no more than 20% of nominal level.
+ * ALL_SYS_PWRGD is an AND of both DRAM PGOOD and VCCST PGOOD.
*/
- int vccst = adc_read_channel(ADC_VSNS_PP1050_ST_S);
-
- return (vccst < 210) && gpio_get_level(GPIO_PG_DRAM_OD);
+ return gpio_get_level(GPIO_PG_PP1050_ST_OD) &&
+ gpio_get_level(GPIO_PG_DRAM_OD);
}
void baseboard_chipset_startup(void)
diff --git a/baseboard/dedede/variant_ec_npcx796fc.c b/baseboard/dedede/variant_ec_npcx796fc.c
index 085f29c32f..d981b2e786 100644
--- a/baseboard/dedede/variant_ec_npcx796fc.c
+++ b/baseboard/dedede/variant_ec_npcx796fc.c
@@ -25,10 +25,6 @@ const struct adc_t adc_channels[] = {
[ADC_SUB_ANALOG] = {
"SUB_ANALOG", NPCX_ADC_CH2, ADC_MAX_VOLT, ADC_READ_MAX+1, 0},
- [ADC_VSNS_PP1050_ST_S] = {
- "PP1050_ST_S_PGOOD", NPCX_ADC_CH3, ADC_MAX_VOLT, ADC_READ_MAX+1,
- 0},
-
[ADC_VSNS_PP3300_A] = {
"PP3300_A_PGOOD", NPCX_ADC_CH9, ADC_MAX_VOLT, ADC_READ_MAX+1,
0},
diff --git a/board/waddledoo/board.h b/board/waddledoo/board.h
index f643c04ed9..05db45882e 100644
--- a/board/waddledoo/board.h
+++ b/board/waddledoo/board.h
@@ -96,7 +96,6 @@ enum adc_channel {
ADC_TEMP_SENSOR_1, /* ADC0 */
ADC_TEMP_SENSOR_2, /* ADC1 */
ADC_SUB_ANALOG, /* ADC2 */
- ADC_VSNS_PP1050_ST_S, /* ADC3 */
ADC_VSNS_PP3300_A, /* ADC9 */
ADC_CH_COUNT
};
diff --git a/board/waddledoo/gpio.inc b/board/waddledoo/gpio.inc
index 92d33ab341..91e3f6f8eb 100644
--- a/board/waddledoo/gpio.inc
+++ b/board/waddledoo/gpio.inc
@@ -22,6 +22,7 @@ GPIO_INT(VCCIN_AUX_VID0, PIN(F, 4), GPIO_INT_BOTH | GPIO_SEL_1P8V, power_signal
GPIO_INT(PG_VCCIO_EXT_OD, PIN(B, 0), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(PG_PP5000_U_OD, PIN(E, 2), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(PG_DRAM_OD, PIN(E, 4), GPIO_INT_BOTH, power_signal_interrupt)
+GPIO_INT(PG_PP1050_ST_OD, PIN(4, 2), GPIO_INT_BOTH | GPIO_PULL_UP, power_signal_interrupt)
/* USB-C interrupts */
GPIO_INT(USB_C0_INT_ODL, PIN(6, 2), GPIO_INT_FALLING | GPIO_PULL_UP, usb_c0_interrupt)
@@ -100,7 +101,7 @@ UNIMPLEMENTED(PG_EC_ALL_SYS_PWRGD)
/* Alternate Functions */
/* ADC */
ALTERNATE(PIN_MASK(F, BIT(0)), 0, MODULE_ADC, 0) /* ADC9 */
-ALTERNATE(PIN_MASK(4, 0x3C), 0, MODULE_ADC, 0) /* ADC0-3 */
+ALTERNATE(PIN_MASK(4, 0x38), 0, MODULE_ADC, 0) /* ADC0-2 */
/* Keyboard */
ALTERNATE(PIN_MASK(3, 0x03), 0, MODULE_KEYBOARD_SCAN, GPIO_INPUT | GPIO_PULL_UP) /* KSI0, KSI1 */