TCPMv2: Do not enter Unattached.SRC state when PD_DRP_FORCE_SINK is set
TCPMv2: Do not enter Unattached.SRC state when PD_DRP_FORCE_SINK is set

Check DRP state in AttachWait.SNK when any CC pin is not RP. If DRP state
is PD_DRP_FORCE_SINK then we are not allowed to enter Unattached.SRC.

This was found when running master branch on nocturne. While performing
shutdown on chromebook all USB-C ports enters Unattached.SNK, due to
reaction on PD_DRP_FORCE_SINK DRP state and PD_EVENT_UPDATE_DUAL_ROLE.
From Unattached.SNK state port goes to Attached.SRC again through
AttachWait.SNK and then Unattached.SRC. Attached.SRC state enables
power on USB-C port, but in this case it is not actually enabled because
chipset is in CHIPSET_STATE_ANY_OFF.

While booting, device port is still in Attached.SRC state, but with
disabled power on USB-C port. As a result USB-C device needs to be
replugged in order to get it working again.

Approach to fix this is just prevent entering Unattached.SRC when
PD_DRP_FORCE_SINK is set (enter Unattached.SNK instead).

BUG=b:151301058
BRANCH=none
TEST=Run ChromeOS.
     Plug some USB-C device and make sure device is working.
     Shutdown and power on board.
     Check if USB-C device is working. Do not replug it.

Signed-off-by: Patryk Duda <6aed17a362577cf10cb5675888c1635d522769c1@semihalf.com>
Change-Id: Ie53ae579147fc15e5dbefd1ec3d03b6ba7b71ddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2139756
Reviewed-by: Aseda Aboagye <12c9b286316a940fd31c24070da5ab64cdd4d0e7@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec