summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-08-15 15:23:21 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-16 20:46:36 -0700
commitee3fb6c6aa1b1ba3a7d92e1fdd8a32a5924246d6 (patch)
tree40686bba3abaae99d1581ffd8c406bf37862259f /board
parent63158e2ee67a906d0868fad4c65d04207b4e0427 (diff)
downloadchrome-ec-ee3fb6c6aa1b1ba3a7d92e1fdd8a32a5924246d6.tar.gz
ps8xxx: use custom tcpm_drv
the ps8xxx family of TCPCs (ps8751, ps8805) have historically used the generic tcpci_tcpm_drv functions, but we need to override some of these entry points because the parade parts need to be woken up before accessing registers. in most cases, this doesn't matter because we access the chip in quick succession where we can "safely" assume the chip is awake -- and the code is structured to implicitly keep the chip awake. the new case we need to address here is where we need to suspend the pd_task and TCPC at an arbitrary point in time. the driver's .release method is called to shut down the chip, and that involves first waking up the chip to be able to access its regs to mask off interrupts, etc. BUG=b:35586896 BRANCH=none TEST=tested from depthcharge - we no longer get errors in the EC console logs about TCPC "release" failed. Change-Id: Ic2a90b71050b3f68c697b1cef48d736ed88b3f41 Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/616460 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/coral/board.c2
-rw-r--r--board/fizz/board.c2
-rw-r--r--board/kahlee/board.c4
-rw-r--r--board/poppy/board.c2
-rw-r--r--board/reef/board.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/board/coral/board.c b/board/coral/board.c
index f32b81dc73..4bb5144465 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -252,7 +252,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
[USB_PD_PORT_PS8751] = {
.i2c_host_port = NPCX_I2C_PORT0_1,
.i2c_slave_addr = 0x16,
- .drv = &tcpci_tcpm_drv,
+ .drv = &ps8xxx_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
};
diff --git a/board/fizz/board.c b/board/fizz/board.c
index d72b9c8415..842a75d1b0 100644
--- a/board/fizz/board.c
+++ b/board/fizz/board.c
@@ -114,7 +114,7 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
/* TCPC mux configuration */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
- {NPCX_I2C_PORT0_0, I2C_ADDR_TCPC0, &tcpci_tcpm_drv,
+ {NPCX_I2C_PORT0_0, I2C_ADDR_TCPC0, &ps8xxx_tcpm_drv,
TCPC_ALERT_ACTIVE_LOW},
};
diff --git a/board/kahlee/board.c b/board/kahlee/board.c
index f95808c4ef..b825d9b124 100644
--- a/board/kahlee/board.c
+++ b/board/kahlee/board.c
@@ -183,13 +183,13 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
[0] = {
.i2c_host_port = NPCX_I2C_PORT0_0,
.i2c_slave_addr = 0x16,
- .drv = &tcpci_tcpm_drv,
+ .drv = &ps8xxx_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
[1] = {
.i2c_host_port = NPCX_I2C_PORT0_1,
.i2c_slave_addr = 0x16,
- .drv = &tcpci_tcpm_drv,
+ .drv = &ps8xxx_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
};
diff --git a/board/poppy/board.c b/board/poppy/board.c
index 6aacaa08fe..5d1bb89a96 100644
--- a/board/poppy/board.c
+++ b/board/poppy/board.c
@@ -362,7 +362,7 @@ const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
/* TCPC mux configuration */
const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
{NPCX_I2C_PORT0_0, 0x50, &anx74xx_tcpm_drv, TCPC_ALERT_ACTIVE_LOW},
- {NPCX_I2C_PORT0_0, 0x16, &tcpci_tcpm_drv, TCPC_ALERT_ACTIVE_LOW},
+ {NPCX_I2C_PORT0_0, 0x16, &ps8xxx_tcpm_drv, TCPC_ALERT_ACTIVE_LOW},
};
struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = {
diff --git a/board/reef/board.c b/board/reef/board.c
index 786a8e56b3..0e6b01fca2 100644
--- a/board/reef/board.c
+++ b/board/reef/board.c
@@ -250,7 +250,7 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_COUNT] = {
[USB_PD_PORT_PS8751] = {
.i2c_host_port = NPCX_I2C_PORT0_1,
.i2c_slave_addr = 0x16,
- .drv = &tcpci_tcpm_drv,
+ .drv = &ps8xxx_tcpm_drv,
.pol = TCPC_ALERT_ACTIVE_LOW,
},
};