summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2018-03-27 10:35:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-04-05 18:41:19 -0700
commitbf6be57ca25be07ff3f949ff5b5b943f7ad95fc2 (patch)
treee209f7c40d8e1731268b12ebf55c21938f5d96a6
parent211c2125201f5783ceeb18f34452b3ed90627e01 (diff)
downloadchrome-ec-bf6be57ca25be07ff3f949ff5b5b943f7ad95fc2.tar.gz
yorp: Include anx7447 driver for port 0
Port 0 uses the Anx7447. This CL updates the tcpc config to use the Anx7447 driver instead of the Anx74xx driver. BUG=b:74127309 BRANCH=NONE TEST=make -j BOARD=yorp and verified that when connected external type C charger to port 0 it reaches SNK_READY Change-Id: I96967a1d272fcda079280ba6d2f0eb5ed8e3dd7f Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/982894 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--board/yorp/board.c22
-rw-r--r--board/yorp/board.h9
-rw-r--r--include/config.h1
3 files changed, 18 insertions, 14 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c
index 72cb26a15a..6842221d32 100644
--- a/board/yorp/board.c
+++ b/board/yorp/board.c
@@ -14,7 +14,7 @@
#include "driver/bc12/bq24392.h"
#include "driver/charger/bd9995x.h"
#include "driver/ppc/nx20p3483.h"
-#include "driver/tcpm/anx74xx.h"
+#include "driver/tcpm/anx7447.h"
#include "driver/tcpm/ps8xxx.h"
#include "driver/tcpm/tcpci.h"
#include "driver/tcpm/tcpm.h"
@@ -34,7 +34,7 @@
#include "usbc_ppc.h"
#include "util.h"
-#define USB_PD_PORT_ANX74XX 0
+#define USB_PD_PORT_ANX7447 0
#define USB_PD_PORT_PS8751 1
static void tcpc_alert_event(enum gpio_signal signal)
@@ -463,10 +463,10 @@ void lid_angle_peripheral_enable(int enable)
#endif
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
- [USB_PD_PORT_ANX74XX] = {
+ [USB_PD_PORT_ANX7447] = {
.i2c_host_port = I2C_PORT_TCPC0,
- .i2c_slave_addr = ANX74XX_I2C_ADDR1,
- .drv = &anx74xx_tcpm_drv,
+ .i2c_slave_addr = AN7447_TCPC0_I2C_ADDR,
+ .drv = &anx7447_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
[USB_PD_PORT_PS8751] = {
@@ -478,10 +478,10 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
};
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
- [USB_PD_PORT_ANX74XX] = {
- .port_addr = USB_PD_PORT_ANX74XX,
- .driver = &anx74xx_tcpm_usb_mux_driver,
- .hpd_update = &anx74xx_tcpc_update_hpd_status,
+ [USB_PD_PORT_ANX7447] = {
+ .port_addr = USB_PD_PORT_ANX7447,
+ .driver = &anx7447_usb_mux_driver,
+ .hpd_update = &anx7447_tcpc_update_hpd_status,
},
[USB_PD_PORT_PS8751] = {
.port_addr = USB_PD_PORT_PS8751,
@@ -491,7 +491,7 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
};
const struct ppc_config_t ppc_chips[CONFIG_USB_PD_PORT_COUNT] = {
- [USB_PD_PORT_ANX74XX] = {
+ [USB_PD_PORT_ANX7447] = {
.i2c_port = I2C_PORT_TCPC0,
.i2c_addr = NX20P3483_ADDR2,
.drv = &nx20p3483_drv,
@@ -509,7 +509,7 @@ const unsigned int ppc_cnt = ARRAY_SIZE(ppc_chips);
/* BC 1.2 chip Configuration */
const struct bq24392_config_t bq24392_config[CONFIG_USB_PD_PORT_COUNT] = {
- [USB_PD_PORT_ANX74XX] = {
+ [USB_PD_PORT_ANX7447] = {
.chip_enable_pin = GPIO_USB_C0_BC12_VBUS_ON,
.chg_det_pin = GPIO_USB_C0_BC12_CHG_DET_L,
.flags = BQ24392_FLAGS_CHG_DET_ACTIVE_LOW,
diff --git a/board/yorp/board.h b/board/yorp/board.h
index 9869dcc38d..bf9d11a79f 100644
--- a/board/yorp/board.h
+++ b/board/yorp/board.h
@@ -77,9 +77,12 @@
#define CONFIG_USB_PD_ALT_MODE_DFP
#define CONFIG_USB_PD_COMM_LOCKED
#define CONFIG_USB_PD_DISCHARGE_PPC
-#define CONFIG_USB_PD_TCPC_LOW_POWER
-/* TODO(b/74127309): Replace below config once cl:956790 lands */
-#define CONFIG_USB_PD_TCPM_ANX3429 /* C0 TCPC: ANX7447QN */
+/*
+ * TODO(b/77544959): This mode doe not work with ANX7447 currently and floods
+ * the EC console with low power mode messages.
+ */
+#undef CONFIG_USB_PD_TCPC_LOW_POWER
+#define CONFIG_USB_PD_TCPM_ANX7447 /* C0 TCPC: ANX7447QN */
#define CONFIG_USB_PD_TCPM_PS8751 /* C1 TCPC: PS8751 */
#define CONFIG_USB_PD_TCPM_MUX
#define CONFIG_USB_PD_TCPM_TCPCI
diff --git a/include/config.h b/include/config.h
index 69525249a5..5ad8dd822f 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2852,6 +2852,7 @@
#undef CONFIG_USB_PD_TCPM_ANX3429
#undef CONFIG_USB_PD_TCPM_ANX740X
#undef CONFIG_USB_PD_TCPM_ANX741X
+#undef CONFIG_USB_PD_TCPM_ANX7447
#undef CONFIG_USB_PD_TCPM_ANX7688
#undef CONFIG_USB_PD_TCPM_PS8751
#undef CONFIG_USB_PD_TCPM_PS8805