diff options
author | Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> | 2020-12-28 11:36:13 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-07 19:03:20 +0000 |
commit | 840d7258423fced9538af206c2f13f8cd5600b59 (patch) | |
tree | ce26eb084e6d5ecd1e22b891af82b709900e8b7d | |
parent | 3ea3beefdab9a4e9cfdc83f28b6e32fbacc5078a (diff) | |
download | chrome-ec-840d7258423fced9538af206c2f13f8cd5600b59.tar.gz |
Metaknight: Remove USB C1
Add DB_LTE_HDMI in dedede fw_config_db
Remove metaknight USB C1 port
Remove C1 PD task and PD int task
Remove OCPC
BUG=b:176275423
BRANCH=main
TEST=make BOARD=metaknight
TEST=make BOARD=metaknight_legacy
TEST=make buildall -j4
TEST=check EC console ,EC will not init DB raa489000.
Signed-off-by: yu-an.chen@quanta.corp-partner.google.com
Change-Id: Ibd86ee852ba870a95e5b552588c7f81ce77a122d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2603095
Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Auto-Submit: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
-rw-r--r-- | baseboard/dedede/cbi_fw_config.h | 1 | ||||
-rw-r--r-- | board/metaknight/board.c | 53 | ||||
-rw-r--r-- | board/metaknight/board.h | 2 | ||||
-rw-r--r-- | board/metaknight/ec.tasklist | 4 |
4 files changed, 14 insertions, 46 deletions
diff --git a/baseboard/dedede/cbi_fw_config.h b/baseboard/dedede/cbi_fw_config.h index f9c2c03d5d..d65db8c2c6 100644 --- a/baseboard/dedede/cbi_fw_config.h +++ b/baseboard/dedede/cbi_fw_config.h @@ -19,6 +19,7 @@ enum fw_config_db { DB_1C_LTE, DB_1A_HDMI, DB_1C, + DB_LTE_HDMI, }; #define FW_CONFIG_DB_OFFSET 0 #define FW_CONFIG_DB_MASK GENMASK(3, 0) diff --git a/board/metaknight/board.c b/board/metaknight/board.c index c9a47dd33e..b8bf4a5d08 100644 --- a/board/metaknight/board.c +++ b/board/metaknight/board.c @@ -211,7 +211,8 @@ void board_init(void) gpio_enable_interrupt(GPIO_USB_C0_INT_ODL); check_c0_line(); - if (get_cbi_fw_config_db() == DB_1A_HDMI) { + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) { /* Disable i2c on HDMI pins */ gpio_config_pin(MODULE_I2C, GPIO_EC_I2C_SUB_C1_SDA_HDMI_HPD_ODL, 0); @@ -253,14 +254,16 @@ DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); /* Enable HDMI any time the SoC is on */ static void hdmi_enable(void) { - if (get_cbi_fw_config_db() == DB_1A_HDMI) + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) gpio_set_level(GPIO_EC_I2C_SUB_C1_SCL_HDMI_EN_ODL, 0); } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, hdmi_enable, HOOK_PRIO_DEFAULT); static void hdmi_disable(void) { - if (get_cbi_fw_config_db() == DB_1A_HDMI) + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) gpio_set_level(GPIO_EC_I2C_SUB_C1_SCL_HDMI_EN_ODL, 1); } DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, hdmi_disable, HOOK_PRIO_DEFAULT); @@ -330,7 +333,8 @@ __override void board_power_5v_enable(int enable) */ set_5v_gpio(!!enable); - if (get_cbi_fw_config_db() == DB_1A_HDMI) { + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) { gpio_set_level(GPIO_SUB_C1_INT_EN_RAILS_ODL, !enable); } else { if (isl923x_set_comparator_inversion(1, !!enable)) @@ -342,7 +346,8 @@ __override void board_power_5v_enable(int enable) __override uint8_t board_get_usb_pd_port_count(void) { - if (get_cbi_fw_config_db() == DB_1A_HDMI) + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) return CONFIG_USB_PD_PORT_MAX_COUNT - 1; else return CONFIG_USB_PD_PORT_MAX_COUNT; @@ -350,7 +355,8 @@ __override uint8_t board_get_usb_pd_port_count(void) __override uint8_t board_get_charger_chip_count(void) { - if (get_cbi_fw_config_db() == DB_1A_HDMI) + if (get_cbi_fw_config_db() == DB_1A_HDMI || + get_cbi_fw_config_db() == DB_LTE_HDMI) return CHARGER_NUM - 1; else return CHARGER_NUM; @@ -568,12 +574,6 @@ const struct charger_config_t chg_chips[] = { .i2c_addr_flags = ISL923X_ADDR_FLAGS, .drv = &isl923x_drv, }, - - { - .i2c_port = I2C_PORT_SUB_USB_C1, - .i2c_addr_flags = ISL923X_ADDR_FLAGS, - .drv = &isl923x_drv, - }, }; const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { @@ -582,12 +582,6 @@ const struct pi3usb9201_config_t pi3usb9201_bc12_chips[] = { .i2c_addr_flags = PI3USB9201_I2C_ADDR_3_FLAGS, .flags = PI3USB9201_ALWAYS_POWERED, }, - - { - .i2c_port = I2C_PORT_SUB_USB_C1, - .i2c_addr_flags = PI3USB9201_I2C_ADDR_3_FLAGS, - .flags = PI3USB9201_ALWAYS_POWERED, - }, }; /* PWM channels. Must be in the exactly same order as in enum pwm_channel. */ @@ -610,24 +604,8 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { .flags = TCPC_FLAGS_TCPCI_REV2_0, .drv = &raa489000_tcpm_drv, }, - - { - .bus_type = EC_BUS_TYPE_I2C, - .i2c_info = { - .port = I2C_PORT_SUB_USB_C1, - .addr_flags = RAA489000_TCPC0_I2C_FLAGS, - }, - .flags = TCPC_FLAGS_TCPCI_REV2_0, - .drv = &raa489000_tcpm_drv, - }, }; -const struct usb_mux usbc1_retimer = { - .usb_port = 1, - .i2c_port = I2C_PORT_SUB_USB_C1, - .i2c_addr_flags = NB7V904M_I2C_ADDR0, - .driver = &nb7v904m_usb_redriver_drv, -}; const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { .usb_port = 0, @@ -635,13 +613,6 @@ const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { .i2c_addr_flags = PI3USB3X532_I2C_ADDR0, .driver = &pi3usb3x532_usb_mux_driver, }, - { - .usb_port = 1, - .i2c_port = I2C_PORT_SUB_USB_C1, - .i2c_addr_flags = PI3USB3X532_I2C_ADDR0, - .driver = &pi3usb3x532_usb_mux_driver, - .next_mux = &usbc1_retimer, - } }; uint16_t tcpc_get_alert_status(void) diff --git a/board/metaknight/board.h b/board/metaknight/board.h index 43ff4bec6e..7b708a5440 100644 --- a/board/metaknight/board.h +++ b/board/metaknight/board.h @@ -24,8 +24,6 @@ #define CONFIG_CHARGER_RAA489000 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 #define CONFIG_CHARGER_SENSE_RESISTOR 10 -#define CONFIG_OCPC_DEF_RBATT_MOHMS 22 /* R_DS(on) 11.6mOhm + 10mOhm sns rstr */ -#define CONFIG_OCPC #undef CONFIG_CHARGER_SINGLE_CHIP /* diff --git a/board/metaknight/ec.tasklist b/board/metaknight/ec.tasklist index 0aba1fabeb..0d2ead8772 100644 --- a/board/metaknight/ec.tasklist +++ b/board/metaknight/ec.tasklist @@ -20,6 +20,4 @@ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(POWERBTN, power_button_task, NULL, VENTI_TASK_STACK_SIZE) \ TASK_ALWAYS(PD_C0, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_C1, pd_task, NULL, ULTRA_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_INT_C0, pd_interrupt_handler_task, 0, ULTRA_TASK_STACK_SIZE) \ - TASK_ALWAYS(PD_INT_C1, pd_interrupt_handler_task, 1, ULTRA_TASK_STACK_SIZE) + TASK_ALWAYS(PD_INT_C0, pd_interrupt_handler_task, 0, ULTRA_TASK_STACK_SIZE) |