summaryrefslogtreecommitdiff
path: root/driver/tcpm/ps8xxx.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-30 15:59:04 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-07 04:13:11 +0000
commitf171bb5d3b0749d63e5fa49d0e16faa518fb0347 (patch)
tree4d507c7fce0a4493edcc10a3c93cc9edee1dddb5 /driver/tcpm/ps8xxx.h
parentd8646a8aae7dcd621018472cf8166422f9b66d07 (diff)
downloadchrome-ec-f171bb5d3b0749d63e5fa49d0e16faa518fb0347.tar.gz
Create public headers for a few PPC/TCPM drivers
At present boards includes the private header of some of the drivers. This is not ideal but it works. For Zephyr we don't really want to access headers in private driver directories. Instead, create public headers for the five drivers needed by the Zephyr volteer build. For now, include the public header in the private header (the one included by the EC code), so that fewer code changes are required. BUG=b:175434113 BRANCH=none TEST=make buildall -j30 (way too verbose to see what is happening) build volteer on zephyr Change-Id: I5b810f53cdf545a885f3977849f9f2ca1d04d60a Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607506 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver/tcpm/ps8xxx.h')
-rw-r--r--driver/tcpm/ps8xxx.h35
1 files changed, 2 insertions, 33 deletions
diff --git a/driver/tcpm/ps8xxx.h b/driver/tcpm/ps8xxx.h
index 6ef1cd9d90..968d1eeaab 100644
--- a/driver/tcpm/ps8xxx.h
+++ b/driver/tcpm/ps8xxx.h
@@ -4,19 +4,13 @@
*/
#include "usb_mux.h"
+#include "driver/tcpm/ps8xxx_public.h"
+
/* Parade Tech Type-C port controller */
#ifndef __CROS_EC_USB_PD_TCPM_PS8XXX_H
#define __CROS_EC_USB_PD_TCPM_PS8XXX_H
-/* I2C interface */
-#define PS8751_I2C_ADDR1_P1_FLAGS 0x09
-#define PS8751_I2C_ADDR1_P2_FLAGS 0x0A
-#define PS8751_I2C_ADDR1_FLAGS 0x0B /* P3 */
-#define PS8751_I2C_ADDR2_FLAGS 0x1B
-#define PS8751_I2C_ADDR3_FLAGS 0x2B
-#define PS8751_I2C_ADDR4_FLAGS 0x4B
-
#define PS8751_P3_TO_P1_FLAGS(p3_flags) ((p3_flags) - 2)
/* Minimum Delay for reset assertion */
@@ -50,7 +44,6 @@
#define PS8751_BIST_COUNTER_BYTE1 ((PS8751_BIST_COUNTER >> 8) & 0xff)
#define PS8751_BIST_COUNTER_BYTE2 ((PS8751_BIST_COUNTER >> 16) & 0xff)
-#define PS8XXX_VENDOR_ID 0x1DA0
#define PS8XXX_REG_I2C_DEBUGGING_ENABLE 0xA0
#define PS8XXX_REG_I2C_DEBUGGING_ENABLE_ON 0x30
#define PS8XXX_REG_I2C_DEBUGGING_ENABLE_OFF 0x31 /* default */
@@ -92,28 +85,4 @@
/* Vendor defined registers */
#define PS8815_P1_REG_HW_REVISION 0xF0
-extern const struct tcpm_drv ps8xxx_tcpm_drv;
-
-/**
- * Board specific callback to judge and provide which chip source of PS8XXX
- * series supported by this driver per specific port.
- *
- * If the board supports only one single source then there is no nencessary to
- * provide the __override version.
- *
- * If board supports two sources or above (with CONFIG_USB_PD_TCPM_MULTI_PS8XXX)
- * then the __override version is mandatory.
- *
- * @param port TCPC port number.
- */
-__override_proto
-uint16_t board_get_ps8xxx_product_id(int port);
-
-void ps8xxx_tcpc_update_hpd_status(const struct usb_mux *me,
- int hpd_lvl, int hpd_irq);
-
-#ifdef CONFIG_CMD_I2C_STRESS_TEST_TCPC
-extern struct i2c_stress_test_dev ps8xxx_i2c_stress_test_dev;
-#endif /* defined(CONFIG_CMD_I2C_STRESS_TEST_TCPC) */
-
#endif /* defined(__CROS_EC_USB_PD_TCPM_PS8XXX_H) */