From 2e96374ae791e0781f3ce292d353340a32e73a70 Mon Sep 17 00:00:00 2001 From: Samsp_Liu Date: Wed, 22 Jul 2020 17:10:06 +0800 Subject: volteer: Support board-specific power parameters Separate usb pd power config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:159282888 BRANCH=none TEST=halvor test Change-Id: I5aba9c7c59ababd34e51906365b1ae2a28c256ea Signed-off-by: Samsp_Liu Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2312001 Tested-by: SamSP Liu Reviewed-by: Abe Levkoy Commit-Queue: Abe Levkoy --- baseboard/volteer/baseboard.h | 15 --------------- board/delbin/board.h | 13 +++++++++++++ board/halvor/board.h | 13 +++++++++++++ board/lindar/board.h | 13 +++++++++++++ board/lingcod/board.h | 13 +++++++++++++ board/malefor/board.h | 13 +++++++++++++ board/terrador/board.h | 13 +++++++++++++ board/todor/board.h | 13 +++++++++++++ board/trondo/board.h | 13 +++++++++++++ board/volteer/board.h | 14 ++++++++++++++ board/voxel/board.h | 13 +++++++++++++ 11 files changed, 131 insertions(+), 15 deletions(-) diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index f8a1e84d6b..ab459c06fd 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -212,26 +212,11 @@ */ #define CONFIG_USB_PID 0x503E -/* TODO: b/144165680 - measure and check these values on Volteer */ -#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ -#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ -#define PD_VCONN_SWAP_DELAY 5000 /* us */ - /* Retimer */ #define CONFIG_USBC_RETIMER_INTEL_BB #define CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG #define USBC_PORT_C1_BB_RETIMER_I2C_ADDR 0x40 -/* - * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C - * cables only support up to 60W. - */ -#define PD_OPERATING_POWER_MW 15000 -#define PD_MAX_POWER_MW 60000 -#define PD_MAX_CURRENT_MA 3000 -#define PD_MAX_VOLTAGE_MV 20000 - - #ifndef __ASSEMBLER__ #include "gpio_signal.h" diff --git a/board/delbin/board.h b/board/delbin/board.h index cf88e591a8..b9dbf7e39e 100644 --- a/board/delbin/board.h +++ b/board/delbin/board.h @@ -64,6 +64,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/halvor/board.h b/board/halvor/board.h index b3a1d92946..bd0c033e9c 100644 --- a/board/halvor/board.h +++ b/board/halvor/board.h @@ -53,6 +53,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/lindar/board.h b/board/lindar/board.h index 4b0774a17a..c5d36e02a3 100644 --- a/board/lindar/board.h +++ b/board/lindar/board.h @@ -42,6 +42,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* USB Type A Features */ /* USBC PPC*/ diff --git a/board/lingcod/board.h b/board/lingcod/board.h index 67462fb922..31e5e558bc 100644 --- a/board/lingcod/board.h +++ b/board/lingcod/board.h @@ -54,6 +54,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* USB Type A Features */ /* USBC PPC*/ diff --git a/board/malefor/board.h b/board/malefor/board.h index 67462fb922..31e5e558bc 100644 --- a/board/malefor/board.h +++ b/board/malefor/board.h @@ -54,6 +54,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* USB Type A Features */ /* USBC PPC*/ diff --git a/board/terrador/board.h b/board/terrador/board.h index 63e640f5b0..91a0f92b91 100644 --- a/board/terrador/board.h +++ b/board/terrador/board.h @@ -65,6 +65,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/todor/board.h b/board/todor/board.h index 63e640f5b0..91a0f92b91 100644 --- a/board/todor/board.h +++ b/board/todor/board.h @@ -65,6 +65,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/trondo/board.h b/board/trondo/board.h index 6730eeeac5..cebb5b23d0 100644 --- a/board/trondo/board.h +++ b/board/trondo/board.h @@ -58,6 +58,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/volteer/board.h b/board/volteer/board.h index 170dbf58c1..cc90e36fd5 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -77,6 +77,20 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +/* TODO: b/144165680 - measure and check these values on Volteer */ +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE diff --git a/board/voxel/board.h b/board/voxel/board.h index baf7fe4218..72981ded09 100644 --- a/board/voxel/board.h +++ b/board/voxel/board.h @@ -69,6 +69,19 @@ #define USBC_PORT_1_USB2_NUM 4 #define USBC_PORT_1_USB3_NUM 2 +#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 30000 /* us */ +#define PD_VCONN_SWAP_DELAY 5000 /* us */ + +/* + * SN5S30 PPC supports up to 24V VBUS source and sink, however passive USB-C + * cables only support up to 60W. + */ +#define PD_OPERATING_POWER_MW 15000 +#define PD_MAX_POWER_MW 60000 +#define PD_MAX_CURRENT_MA 3000 +#define PD_MAX_VOLTAGE_MV 20000 + /* Enabling Thunderbolt-compatible mode */ #define CONFIG_USB_PD_TBT_COMPAT_MODE -- cgit v1.2.1