diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2020-08-11 19:10:32 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-21 07:08:04 +0000 |
commit | ec6669945dc38d053e139587e3346d80f1f0d6c8 (patch) | |
tree | 187c1ee783055d0e72f728562385657b079a48ca | |
parent | b6aeedc1f939b93f4b81ec1cd336ba8f928178a1 (diff) | |
download | chrome-ec-ec6669945dc38d053e139587e3346d80f1f0d6c8.tar.gz |
morphius: add ppc_id for ppc option
This pathc use external gpio as ppc id for different ppc:
1:nx20p3483
0:aoz1380
BUG=b:150278507
BRANCH=none
TEST=make BOARD=morphius
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I32c26f86a35bd18bd23689a53ab2c44174a01e34
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2348739
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/morphius/board.c | 6 | ||||
-rw-r--r-- | board/morphius/gpio.inc | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/board/morphius/board.c b/board/morphius/board.c index ab47596e0f..fade286178 100644 --- a/board/morphius/board.c +++ b/board/morphius/board.c @@ -299,6 +299,8 @@ enum gpio_signal board_usbc_port_to_hpd_gpio(int port) static void board_remap_gpio(void) { + int ppc_id = 0; + if (board_ver >= 3) { int rv; @@ -328,7 +330,9 @@ static void board_remap_gpio(void) ioex_enable_interrupt(IOEX_HDMI_CONN_HPD_3V3_DB); } - support_aoz_ppc = (board_ver == 3); + ioex_get_level(IOEX_PPC_ID, &ppc_id); + + support_aoz_ppc = (board_ver == 3) || ((board_ver >= 4) && !ppc_id); if (support_aoz_ppc) { ccprintf("DB USBC PPC aoz1380\n"); ppc_chips[USBC_PORT_C1].drv = &aoz1380_drv; diff --git a/board/morphius/gpio.inc b/board/morphius/gpio.inc index 1d099c1140..a40064d5ec 100644 --- a/board/morphius/gpio.inc +++ b/board/morphius/gpio.inc @@ -78,7 +78,7 @@ IOEX(EN_USB_A0_5V, EXPIN(USBC_PORT_C0, 1, 5), GPIO_OUT_LOW) /* A0 5V Source Ena IOEX(USB_A0_CHARGE_EN_L, EXPIN(USBC_PORT_C0, 1, 6), GPIO_OUT_HIGH) /* A0 5V High Current Enable */ IOEX(USB_A1_RETIMER_EN, EXPIN(USBC_PORT_C1, 0, 0), GPIO_OUT_LOW) /* A1 Retimer Enable */ -IOEX(PPC_ID, EXPIN(USBC_PORT_C1, 0, 1), GPIO_INPUT | GPIO_PULL_DOWN) /* PPC ID */ +IOEX(PPC_ID, EXPIN(USBC_PORT_C1, 0, 1), GPIO_INPUT) /* PPC ID */ IOEX(USB_C1_HPD_IN_DB, EXPIN(USBC_PORT_C1, 0, 2), GPIO_OUT_LOW) /* C1 HPD */ /* |