summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/dingdong/usb_pd_config.h3
-rw-r--r--board/firefly/usb_pd_config.h3
-rw-r--r--board/fruitpie/usb_pd_config.h3
-rw-r--r--board/hoho/usb_pd_config.h3
-rw-r--r--board/host/usb_pd_config.h3
-rw-r--r--board/plankton/usb_pd_config.h3
-rw-r--r--board/ryu/usb_pd_config.h3
-rw-r--r--board/ryu_p1/usb_pd_config.h3
-rw-r--r--board/samus_pd/usb_pd_config.h8
-rw-r--r--board/twinkie/usb_pd_config.h3
-rw-r--r--board/zinger/usb_pd_config.h3
-rw-r--r--common/usb_pd_protocol.c10
12 files changed, 29 insertions, 19 deletions
diff --git a/board/dingdong/usb_pd_config.h b/board/dingdong/usb_pd_config.h
index db46d83b73..185adf151d 100644
--- a/board/dingdong/usb_pd_config.h
+++ b/board/dingdong/usb_pd_config.h
@@ -139,7 +139,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* we are never a source : don't care about power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 0 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 0 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 0 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 1000
diff --git a/board/firefly/usb_pd_config.h b/board/firefly/usb_pd_config.h
index 36a05f330c..9afaf00670 100644
--- a/board/firefly/usb_pd_config.h
+++ b/board/firefly/usb_pd_config.h
@@ -149,7 +149,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* we are never a source : don't care about power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 0
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 0 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 0 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 1000
diff --git a/board/fruitpie/usb_pd_config.h b/board/fruitpie/usb_pd_config.h
index 069829e196..759ca21212 100644
--- a/board/fruitpie/usb_pd_config.h
+++ b/board/fruitpie/usb_pd_config.h
@@ -162,7 +162,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 1000
diff --git a/board/hoho/usb_pd_config.h b/board/hoho/usb_pd_config.h
index db46d83b73..185adf151d 100644
--- a/board/hoho/usb_pd_config.h
+++ b/board/hoho/usb_pd_config.h
@@ -139,7 +139,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* we are never a source : don't care about power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 0 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 0 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 0 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 1000
diff --git a/board/host/usb_pd_config.h b/board/host/usb_pd_config.h
index 0e6fe65ac4..8ce979062e 100644
--- a/board/host/usb_pd_config.h
+++ b/board/host/usb_pd_config.h
@@ -36,7 +36,8 @@ int pd_snk_is_vbus_provided(int port);
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 20000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 15000
diff --git a/board/plankton/usb_pd_config.h b/board/plankton/usb_pd_config.h
index af0a0e07b3..6fd5b9c48a 100644
--- a/board/plankton/usb_pd_config.h
+++ b/board/plankton/usb_pd_config.h
@@ -155,7 +155,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 5000
diff --git a/board/ryu/usb_pd_config.h b/board/ryu/usb_pd_config.h
index 453014b2c2..cbe707e8ed 100644
--- a/board/ryu/usb_pd_config.h
+++ b/board/ryu/usb_pd_config.h
@@ -174,7 +174,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay for the voltage transition on the power supply, chip max is 16us */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 20000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 10000
diff --git a/board/ryu_p1/usb_pd_config.h b/board/ryu_p1/usb_pd_config.h
index 0328a2c1db..61c5d0d32a 100644
--- a/board/ryu_p1/usb_pd_config.h
+++ b/board/ryu_p1/usb_pd_config.h
@@ -171,7 +171,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay for the voltage transition on the power supply, chip max is 16us */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 20000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 20000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 10000
diff --git a/board/samus_pd/usb_pd_config.h b/board/samus_pd/usb_pd_config.h
index c30c7d76fc..a2e80aaabd 100644
--- a/board/samus_pd/usb_pd_config.h
+++ b/board/samus_pd/usb_pd_config.h
@@ -259,11 +259,11 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/*
- * delay for the voltage transition on the power supply, chip max is 16ms.
- * delay to turn off the power supply depends on vbus capacitance, but
- * is well above that. 80ms seems to work for most devices.
+ * delay to turn on the power supply max is ~16ms.
+ * delay to turn off the power supply max is about ~180ms.
*/
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 80000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 30000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 250000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 15000
diff --git a/board/twinkie/usb_pd_config.h b/board/twinkie/usb_pd_config.h
index 72dbe72ee4..67a472fff4 100644
--- a/board/twinkie/usb_pd_config.h
+++ b/board/twinkie/usb_pd_config.h
@@ -189,7 +189,8 @@ static inline int pd_snk_is_vbus_provided(int port)
#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */
/* Define typical operating power and max power */
#define PD_OPERATING_POWER_MW 15000
diff --git a/board/zinger/usb_pd_config.h b/board/zinger/usb_pd_config.h
index 0456a24652..e87580a89e 100644
--- a/board/zinger/usb_pd_config.h
+++ b/board/zinger/usb_pd_config.h
@@ -118,6 +118,7 @@ static inline int pd_adc_read(int port, int cc)
#define PD_DEFAULT_STATE PD_STATE_SRC_DISCONNECTED
/* delay necessary for the voltage transition on the power supply */
-#define PD_POWER_SUPPLY_TRANSITION_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_ON_DELAY 50000 /* us */
+#define PD_POWER_SUPPLY_TURN_OFF_DELAY 50000 /* us */
#endif /* __USB_PD_CONFIG_H */
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index c7e44e267d..fe844ce136 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1990,13 +1990,13 @@ void pd_task(void)
* on during debounce.
*/
get_time().val +
- PD_POWER_SUPPLY_TRANSITION_DELAY -
+ PD_POWER_SUPPLY_TURN_ON_DELAY -
(pd[port].last_state ==
PD_STATE_SRC_DISCONNECTED_DEBOUNCE
? PD_T_CC_DEBOUNCE : 0),
#else
get_time().val +
- PD_POWER_SUPPLY_TRANSITION_DELAY,
+ PD_POWER_SUPPLY_TURN_ON_DELAY,
#endif
PD_STATE_SRC_DISCOVERY);
}
@@ -2061,7 +2061,7 @@ void pd_task(void)
set_state_timeout(
port,
get_time().val +
- PD_POWER_SUPPLY_TRANSITION_DELAY,
+ PD_POWER_SUPPLY_TURN_ON_DELAY,
PD_STATE_SRC_TRANSITION);
}
break;
@@ -2210,7 +2210,7 @@ void pd_task(void)
pd_power_supply_reset(port);
set_state_timeout(port,
get_time().val +
- PD_POWER_SUPPLY_TRANSITION_DELAY,
+ PD_POWER_SUPPLY_TURN_OFF_DELAY,
PD_STATE_SRC_SWAP_STANDBY);
}
break;
@@ -2595,7 +2595,7 @@ void pd_task(void)
set_state_timeout(
port,
get_time().val +
- PD_POWER_SUPPLY_TRANSITION_DELAY,
+ PD_POWER_SUPPLY_TURN_ON_DELAY,
PD_STATE_SNK_SWAP_COMPLETE);
}
break;