Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e268eeb authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa
Browse files

USB: policy_engine: Enable VBUS after VCONN before PE_SRC_Startup



Currently driver is enabling VBUS first and then enable VCONN before
PE_SRC_startup when type C mode is POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE.
On some platforms, enabling VBUS is taking time which is causing VCONN
reaching 2.7V after VBUS reaches VsafeV. This is exceeding 2msec timelimit
mentioned in type C specification and causes type C complaince tests
failure. Hence enable VCONN first and then enable VBUS to pass below
type C compliance tests:
TD 4.8.3 DRP Connect Vconn Accessory Test
TD 4.9.1 Source Suspend Test

Change-Id: I2697acdcaa063f251dd37035475392510037bee5
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent bc399a65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1691,7 +1691,6 @@ static void usbpd_sm(struct work_struct *w)
		if (pd->current_pr == PR_SINK) {
			usbpd_set_state(pd, PE_SNK_STARTUP);
		} else if (pd->current_pr == PR_SRC) {
			enable_vbus(pd);
			if (!pd->vconn_enabled &&
					pd->typec_mode ==
					POWER_SUPPLY_TYPEC_SINK_POWERED_CABLE) {
@@ -1701,6 +1700,7 @@ static void usbpd_sm(struct work_struct *w)
				else
					pd->vconn_enabled = true;
			}
			enable_vbus(pd);

			usbpd_set_state(pd, PE_SRC_STARTUP);
		}