mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-31 02:51:26 +00:00
glados: chell: add VCONN swap ability
Add VCONN swap ability and accept VCONN_SWAP requests as long as we have the ability to provide VCONN. BUG=none BRANCH=none TEST=test on glados. ask for vconn swap and make sure vconn swap is successful. Change-Id: I7340e6253dcde4cdbe333a9622d7826e7ccbe6b4 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/308238 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
#define CONFIG_USBC_SS_MUX
|
||||
#define CONFIG_USBC_SS_MUX_DFP_ONLY
|
||||
#define CONFIG_USBC_VCONN
|
||||
#define CONFIG_USBC_VCONN_SWAP
|
||||
#define CONFIG_VBOOT_HASH
|
||||
|
||||
#define CONFIG_SPI_FLASH_PORT 1
|
||||
@@ -169,6 +170,9 @@ enum temp_sensor_id {
|
||||
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
|
||||
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */
|
||||
|
||||
/* delay to turn on/off vconn */
|
||||
#define PD_VCONN_SWAP_DELAY 5000 /* us */
|
||||
|
||||
/* Define typical operating power and max power */
|
||||
#define PD_OPERATING_POWER_MW 15000
|
||||
#define PD_MAX_POWER_MW 45000
|
||||
|
||||
@@ -123,6 +123,12 @@ int pd_check_data_swap(int port, int data_role)
|
||||
return (data_role == PD_ROLE_UFP) ? 1 : 0;
|
||||
}
|
||||
|
||||
int pd_check_vconn_swap(int port)
|
||||
{
|
||||
/* in G3, do not allow vconn swap since pp5000_A rail is off */
|
||||
return gpio_get_level(GPIO_PMIC_SLP_SUS_L);
|
||||
}
|
||||
|
||||
void pd_execute_data_swap(int port, int data_role)
|
||||
{
|
||||
/* Do nothing */
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#define CONFIG_USBC_SS_MUX
|
||||
#define CONFIG_USBC_SS_MUX_DFP_ONLY
|
||||
#define CONFIG_USBC_VCONN
|
||||
#define CONFIG_USBC_VCONN_SWAP
|
||||
#define CONFIG_VBOOT_HASH
|
||||
|
||||
#define CONFIG_SPI_FLASH_PORT 1
|
||||
@@ -190,6 +191,9 @@ enum als_id {
|
||||
#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
|
||||
#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */
|
||||
|
||||
/* delay to turn on/off vconn */
|
||||
#define PD_VCONN_SWAP_DELAY 5000 /* us */
|
||||
|
||||
/* Define typical operating power and max power */
|
||||
#define PD_OPERATING_POWER_MW 15000
|
||||
#define PD_MAX_POWER_MW 45000
|
||||
|
||||
@@ -121,6 +121,12 @@ int pd_check_data_swap(int port, int data_role)
|
||||
return (data_role == PD_ROLE_UFP) ? 1 : 0;
|
||||
}
|
||||
|
||||
int pd_check_vconn_swap(int port)
|
||||
{
|
||||
/* in G3, do not allow vconn swap since pp5000_A rail is off */
|
||||
return gpio_get_level(GPIO_PMIC_SLP_SUS_L);
|
||||
}
|
||||
|
||||
void pd_execute_data_swap(int port, int data_role)
|
||||
{
|
||||
/* Do nothing */
|
||||
|
||||
Reference in New Issue
Block a user