]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach
authorRD Babiera <rdbabiera@google.com>
Wed, 18 Jun 2025 23:06:04 +0000 (23:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:51:29 +0000 (09:51 +0100)
commit805fc1063b8f25e36d699a5da3d4ac0aece5dcae
treeb01cca98db8a273eaaeb32789fdfef7a14258c9d
parent60037d24d8dfea3ea95069911b9a599428de0ff6
usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach

commit bec15191d52300defa282e3fd83820f69e447116 upstream.

This patch fixes Type-C compliance test TD 4.7.6 - Try.SNK DRP Connect
SNKAS.

tVbusON has a limit of 275ms when entering SRC_ATTACHED. Compliance
testers can interpret the TryWait.Src to Attached.Src transition after
Try.Snk as being in Attached.Src the entire time, so ~170ms is lost
to the debounce timer.

Setting the data role can be a costly operation in host mode, and when
completed after 100ms can cause Type-C compliance test check TD 4.7.5.V.4
to fail.

Turn VBUS on before tcpm_set_roles to meet timing requirement.

Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable <stable@kernel.org>
Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250618230606.3272497-2-rdbabiera@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c