diff options
author | Ruibin Chang <Ruibin.Chang@ite.com.tw> | 2021-07-01 16:56:03 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-09 03:45:49 +0000 |
commit | 4cf446bf5f122050f00376af66b9f5edcab26ba6 (patch) | |
tree | 1ec37f00932eea32cac7bb4d0e53cc0a1a62d788 /driver/tcpm/it83xx_pd.h | |
parent | de941c3ac9c049fea4fa199a95b39d0df20ce6c0 (diff) | |
download | chrome-ec-4cf446bf5f122050f00376af66b9f5edcab26ba6.tar.gz |
driver/tcpm/ite_pd_intc: separate pd interrupt to ite_pd_intc
Separate pd interrupt functions to ite_pd_intc for
easier maintenance on cros_ec and zephyr.
And enable PD interrupt functions for zephyr.
BRANCH=none
BUG=none
TEST=1.can zmake hayato and make asurada
2.PD port functions work on board hayato
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Change-Id: I67082bb442da7dfb669e23d8315d81f4abe7ba76
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999358
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'driver/tcpm/it83xx_pd.h')
-rw-r--r-- | driver/tcpm/it83xx_pd.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/driver/tcpm/it83xx_pd.h b/driver/tcpm/it83xx_pd.h index c3efb7e150..ff7c231f23 100644 --- a/driver/tcpm/it83xx_pd.h +++ b/driver/tcpm/it83xx_pd.h @@ -379,6 +379,26 @@ IS_MASK_SET(IT83XX_USBPD_IFS(port), USBPD_REG_FAST_SWAP_DETECT_STAT) #endif +#if defined(CONFIG_USB_PD_TCPM_ITE_ON_CHIP) && defined(CONFIG_ZEPHYR) +/* Use the Zephyr names here. When upstreaming we can update this */ +#include <dt-bindings/interrupt-controller/ite-intc.h> + +#define IT83XX_GPIO_GPCRF4 GPCRF4 +#define IT83XX_GPIO_GPCRF5 GPCRF5 +#define IT83XX_GPIO_GPCRH1 GPCRH1 +#define IT83XX_GPIO_GPCRH2 GPCRH2 +#define IT83XX_GPIO_GPCRP0 IT8XXX2_GPIO_GPCRP0 +#define IT83XX_GPIO_GPCRP1 IT8XXX2_GPIO_GPCRP1 +#define IT83XX_IRQ_USBPD0 IT8XXX2_IRQ_USBPD0 +#define IT83XX_IRQ_USBPD1 IT8XXX2_IRQ_USBPD1 +#define IT83XX_IRQ_USBPD2 IT8XXX2_IRQ_USBPD2 +#define USB_VID_ITE 0x048d + +/* ITE chip supports PD features */ +#define IT83XX_INTC_FAST_SWAP_SUPPORT +#define IT83XX_INTC_PLUG_IN_OUT_SUPPORT +#endif + enum usbpd_port { USBPD_PORT_A, USBPD_PORT_B, |