diff options
author | AlvinCC_Hsu <alvincc_hsu@compal.corp-partner.google.com> | 2020-09-03 11:01:12 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-04 00:59:36 +0000 |
commit | 6776ed2456d49b8be53ec05590d70e0089d47ac8 (patch) | |
tree | c422de34d7696a2153ae6444c55b14ca30cb95ef /board/pompom | |
parent | 94f6a302dff4166f35181dcc09a3b2efac39ff53 (diff) | |
download | chrome-ec-6776ed2456d49b8be53ec05590d70e0089d47ac8.tar.gz |
pompom: Change TCPC from PS8751 to PS8805 for board rev1
This patch adds a marco to define the board version
and use it to determine what TCPC is used.
BUG=b:167476139
BRANCH=none
TEST=make BOARD=pompom
Signed-off-by: AlvinCC_Hsu <alvincc_hsu@compal.corp-partner.google.com>
Change-Id: If8cb4a7f213c68b37883a8a8a6f53478d8fd5924
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391027
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'board/pompom')
-rw-r--r-- | board/pompom/board.h | 5 | ||||
-rw-r--r-- | board/pompom/board_revs.h | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/board/pompom/board.h b/board/pompom/board.h index dbefef734d..ac7cf8e85c 100644 --- a/board/pompom/board.h +++ b/board/pompom/board.h @@ -9,6 +9,7 @@ #define __CROS_EC_BOARD_H #include "baseboard.h" +#include "board_revs.h" /* TODO(waihong): Remove the following bringup features */ #define CONFIG_BRINGUP @@ -26,7 +27,11 @@ #define CONFIG_BC12_DETECT_PI3USB9201 /* USB */ +#if BOARD_REV == POMPOM_REV0 #define CONFIG_USB_PD_TCPM_PS8751 +#else +#define CONFIG_USB_PD_TCPM_PS8805 +#endif #define CONFIG_USBC_PPC_SN5S330 #define CONFIG_USB_PD_PORT_MAX_COUNT 1 diff --git a/board/pompom/board_revs.h b/board/pompom/board_revs.h new file mode 100644 index 0000000000..1ac5ee1337 --- /dev/null +++ b/board/pompom/board_revs.h @@ -0,0 +1,23 @@ +/* Copyright 2020 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_BOARD_REVS_H +#define __CROS_EC_BOARD_REVS_H + +#define POMPOM_REV0 0 +#define POMPOM_REV1 1 +#define POMPOM_REV_LAST POMPOM_REV1 +#define POMPOM_REV_DEFAULT POMPOM_REV1 + +#if !defined(BOARD_REV) +#define BOARD_REV POMPOM_REV_DEFAULT +#endif + +#if BOARD_REV < POMPOM_REV0 || BOARD_REV > POMPOM_REV_LAST +#error "Board revision out of range" +#endif + + +#endif /* __CROS_EC_BOARD_REVS_H */ |