diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2019-10-04 09:26:16 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-09 02:16:45 +0000 |
commit | b127de71fac86406c275a6ad6d5a7bbcf5d11111 (patch) | |
tree | 900c16af69519146f3c9916799a665da6dc0352f /board/garg | |
parent | b2cce02ee290287ddd2908553019d7c4c0547b69 (diff) | |
download | chrome-ec-b127de71fac86406c275a6ad6d5a7bbcf5d11111.tar.gz |
board/garg: Configure the number of USB PD ports
For HDMI SKU, there is one less USB PD Port compared to the other SKUs.
Implement the board specific helper function to return the number of USB
PD ports. This will ensure that the PD firmware update is not initiated
on that port.
BUG=b:140816510, b:143196487
BRANCH=Octopus
TEST=make -j buildall; Boot to ChromeOS with and without a monitor
plugged into HDMI port.
Change-Id: I2f582372de35bb7669c0607b41a5ddc42abfc52c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879339
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/garg')
-rw-r--r-- | board/garg/board.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/board/garg/board.c b/board/garg/board.c index 8da97ef1c8..3aa4c5cb65 100644 --- a/board/garg/board.c +++ b/board/garg/board.c @@ -301,3 +301,11 @@ void board_overcurrent_event(int port, int is_overcurrented) /* Note that the level is inverted because the pin is active low. */ gpio_set_level(GPIO_USB_C_OC, !is_overcurrented); } + +uint8_t board_get_usb_pd_port_count(void) +{ + /* HDMI SKU has one USB PD port */ + if (sku_id == 9) + return CONFIG_USB_PD_PORT_MAX_COUNT - 1; + return CONFIG_USB_PD_PORT_MAX_COUNT; +} |