summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiong.huang <xiong.huang@bitland.corp-partner.google.com>2019-08-05 17:00:45 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-14 17:33:36 +0000
commita18332870ba0f77eb686366d616201da6ff90527 (patch)
treeea809a6d39d0b04a210c9a12e693a04274c73584
parent2941f4874d8f8f8ff7d94bcf7aafadc49db0bc9a (diff)
downloadchrome-ec-a18332870ba0f77eb686366d616201da6ff90527.tar.gz
kodama: remove DEVICE_TYPE_DOCK
Kodama removes BC1.2 in pogo port and only support dock keyboard. BUG=b:136977971 BRANCH=master TEST=1)Pogo detect pin level is changed with dock keyboard plugged in or out 2)Can get expected chars when type keys. Change-Id: Ib322f4aaa7174c3459d06633202e4c38ba6d6888 Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1736410 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Tested-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
-rw-r--r--board/kodama/base_detect_kodama.c29
-rw-r--r--board/kodama/board.c7
-rw-r--r--board/kodama/build.mk3
3 files changed, 2 insertions, 37 deletions
diff --git a/board/kodama/base_detect_kodama.c b/board/kodama/base_detect_kodama.c
index 2ec9fa7d2e..d118c4c4cb 100644
--- a/board/kodama/base_detect_kodama.c
+++ b/board/kodama/base_detect_kodama.c
@@ -30,8 +30,7 @@ enum kukui_pogo_device_type {
DEVICE_TYPE_ERROR = -2,
DEVICE_TYPE_UNKNOWN = -1,
DEVICE_TYPE_DETACHED = 0,
- DEVICE_TYPE_DOCK = 1,
- DEVICE_TYPE_KEYBOARD = 2,
+ DEVICE_TYPE_KEYBOARD = 1,
DEVICE_TYPE_COUNT,
};
@@ -39,7 +38,6 @@ struct {
int mv_low, mv_high;
} static const pogo_detect_table[] = {
[DEVICE_TYPE_DETACHED] = {2700, 3500}, /* 10K, NC, around 3.3V */
- [DEVICE_TYPE_DOCK] = {141, 173}, /* 10K, 0.5K ohm */
[DEVICE_TYPE_KEYBOARD] = {270, 400}, /* 10K, 1K ohm */
};
BUILD_ASSERT(ARRAY_SIZE(pogo_detect_table) == DEVICE_TYPE_COUNT);
@@ -62,24 +60,6 @@ static enum kukui_pogo_device_type get_device_type(int mv)
return DEVICE_TYPE_UNKNOWN;
}
-static void enable_charge(int enable)
-{
- if (enable) {
- struct charge_port_info info = {
- .voltage = 5000, .current = 1500};
- /*
- * Set supplier type to PD to have same priority as type c
- * port.
- */
- charge_manager_update_charge(
- CHARGE_SUPPLIER_DEDICATED, CHARGE_PORT_POGO, &info);
- } else {
- charge_manager_update_charge(
- CHARGE_SUPPLIER_DEDICATED, CHARGE_PORT_POGO, NULL);
- }
- pd_send_host_event(PD_EVENT_POWER_CHANGE);
-}
-
static void enable_power_supply(int enable)
{
gpio_set_level(GPIO_EN_PP3300_POGO, enable);
@@ -123,16 +103,9 @@ static void base_detect_deferred(void)
case DEVICE_TYPE_DETACHED:
enable_power_supply(0);
- enable_charge(0);
- break;
-
- case DEVICE_TYPE_DOCK:
- enable_power_supply(0);
- enable_charge(1);
break;
case DEVICE_TYPE_KEYBOARD:
- enable_charge(0);
enable_power_supply(1);
break;
diff --git a/board/kodama/board.c b/board/kodama/board.c
index 2f1c289e2c..c16a841dca 100644
--- a/board/kodama/board.c
+++ b/board/kodama/board.c
@@ -194,13 +194,6 @@ int pd_snk_is_vbus_provided(int port)
return rt946x_is_vbus_ready();
}
-#if defined(BOARD_KUKUI) || defined(BOARD_KODAMA)
-/* dummy interrupt function for kukui */
-void pogo_adc_interrupt(enum gpio_signal signal)
-{
-}
-#endif
-
static void board_init(void)
{
/* If the reset cause is external, pulse PMIC force reset. */
diff --git a/board/kodama/build.mk b/board/kodama/build.mk
index 5abd305013..9391e6933b 100644
--- a/board/kodama/build.mk
+++ b/board/kodama/build.mk
@@ -12,5 +12,4 @@ CHIP_FAMILY:=stm32f0
CHIP_VARIANT:=stm32f09x
BASEBOARD:=kukui
-board-y=board.o led.o
-board-$(BOARD_KRANE)+=base_detect_kodama.o
+board-y=base_detect_kodama.o board.o led.o