mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 00:26:30 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
211c212520
commit
bf6be57ca2
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user