diff options
author | Yun-chieh, Lee <lyunjie@google.com> | 2020-09-10 23:52:50 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-09-24 18:46:38 +0000 |
commit | de120a50f59240ed76d3942b779a36bd0cdeb888 (patch) | |
tree | c97035da7d5893e04b001e89e4953bdfe64f5274 /board/fusb307bgevb/board.h | |
parent | 512b9c0ad6e72fb8db6b2038c6b835965fc6cbb1 (diff) | |
download | chrome-ec-de120a50f59240ed76d3942b779a36bd0cdeb888.tar.gz |
ucsa: fusb307 driver and enable tcpc interrupt
Enable interrupt from tcpc fusb307bg.
BUG=b:162057390
TEST=make buildall
BRANCH=master
Signed-off-by: Yun-Chieh Lee <lyunjie@google.com>
Change-Id: If2ab2998b4430abcfd746e9879abd4334de319e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2405713
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/fusb307bgevb/board.h')
-rw-r--r-- | board/fusb307bgevb/board.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/board/fusb307bgevb/board.h b/board/fusb307bgevb/board.h index e920c7efd1..2497dc7c69 100644 --- a/board/fusb307bgevb/board.h +++ b/board/fusb307bgevb/board.h @@ -12,6 +12,10 @@ /* 48 MHz SYSCLK clock frequency */ #define CPU_CLOCK 48000000 +/* Debug Congifuation */ +#define DEBUG_GET_CC +#define DEBUG_ROLE_CTRL_UPDATES + /* Enable USART1,3,4 and USB streams */ #define CONFIG_STREAM_USART #define CONFIG_STREAM_USART1 @@ -34,8 +38,33 @@ #define CONFIG_USB_PID 0x1234 #define CONFIG_USB_CONSOLE +/* USB Power Delivery configuration */ +#define CONFIG_USB_POWER_DELIVERY +#define CONFIG_USB_PD_TCPMV1 +#define CONFIG_USB_PD_PORT_MAX_COUNT 1 +#define CONFIG_USB_PD_TCPM_TCPCI +#define CONFIG_USB_PD_DUAL_ROLE +#define CONFIG_USB_PD_VBUS_DETECT_TCPC +#define CONFIG_USB_PD_REV30 +#define CONFIG_USB_PD_DECODE_SOP +#define CONFIG_USBC_VCONN +#define CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE +#define CONFIG_USB_PD_TCPM_FUSB307 + +/* delay to turn on/off vconn */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ +/* Define operating power and max power */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_VOLTAGE_MV 20000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_POWER_MW ((PD_MAX_VOLTAGE_MV * PD_MAX_CURRENT_MA) / 1000) + +/* Degine board specific type-C power constants */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */ +#define PD_POWER_SUPPLY_TURN_ON_DELAY 160000 /* us */ + /* I2C master port connected to the TCPC */ -#define I2C_PORT_TCPC 0 +#define I2C_PORT_TCPC 1 /* LCD Configuration */ #define LCD_SLAVE_ADDR 0x27 |