MLK-16013-26 staging: typec: tcpm: update PD timing
authorLi Jun <jun.li@nxp.com>
Thu, 27 Jul 2017 15:27:15 +0000 (23:27 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:20 +0000 (15:36 -0500)
This patch is to update several PD timings for PD compliance, all
those timing definitions should be configurable via user config,
this can be improved later, for now I just update its values in PD
spec defined range.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/staging/typec/pd.h

index c93abb8..7fdc129 100644 (file)
@@ -253,13 +253,13 @@ static inline unsigned int rdo_max_power(u32 rdo)
 #define PD_T_SENDER_RESPONSE   25      /* 24 - 30 ms, relaxed */
 #define PD_T_SOURCE_ACTIVITY   45
 #define PD_T_SINK_ACTIVITY     135
-#define PD_T_SINK_WAIT_CAP     240
+#define PD_T_SINK_WAIT_CAP     400
 #define PD_T_PS_TRANSITION     500
 #define PD_T_SRC_TRANSITION    35
 #define PD_T_DRP_SNK           40
 #define PD_T_DRP_SRC           30
-#define PD_T_PS_SOURCE_OFF     920
-#define PD_T_PS_SOURCE_ON      480
+#define PD_T_PS_SOURCE_OFF     790
+#define PD_T_PS_SOURCE_ON      400
 #define PD_T_PS_HARD_RESET     30
 #define PD_T_SRC_RECOVER       760
 #define PD_T_SRC_RECOVER_MAX   1000
@@ -272,8 +272,8 @@ static inline unsigned int rdo_max_power(u32 rdo)
 #define PD_T_DRP_TRY           100     /* 75 - 150 ms */
 #define PD_T_DRP_TRYWAIT       600     /* 400 - 800 ms */
 
-#define PD_T_CC_DEBOUNCE       200     /* 100 - 200 ms */
-#define PD_T_PD_DEBOUNCE       20      /* 10 - 20 ms */
+#define PD_T_CC_DEBOUNCE       110     /* 100 - 200 ms */
+#define PD_T_PD_DEBOUNCE       10      /* 10 - 20 ms */
 
 #define PD_N_CAPS_COUNT                (PD_T_NO_RESPONSE / PD_T_SEND_SOURCE_CAP)
 #define PD_N_HARD_RESET_COUNT  2