servo_v4/usb_pd_policy: Disable VBUS instead of power supply reset
servo_v4/usb_pd_policy: Disable VBUS instead of power supply reset

When running 'fakedisconnect' command on ServoV4, CC_DETACH bit is
going to be set. Detach is done by calling pd_power_supply_reset()
which disables VBUS (set DUT_CHG_EN to 0) and requests 5 volts from
charger. Next step is disable PD communication by calling
pd_comm_enable() and set RP to RP_RESERVED value (pd_set_rp_rd()
function).

Setting RP to RP_RESERVED (just disconnect all resistors on CC1 and CC2)
actually is a trick to make PD_C1 task think that DUT is disconnected.
TCPM stack checks voltage on CC lines and when voltage on active CC line
indicates that we are open it changes state to SRC_DISCONNECTED.

Changing state to SRC_DISCONNECTED triggers pd_power_supply_reset()
which was already run in do_cc() function as a result of 'fakedisconnect'
command. Calling this once again causes weird behaviour - communication
issues and finally Hard Reset, eg:

 > fakedisconnect 100 1000
 Fake disconnect for 1000 ms starting in 100 ms.
 C0 Req [1] 5000mV 3000mA
 [210.470350 CL: p0 s0 i500 v15000]
 [210.472703 PD TMOUT RX 1/1]
 RXERR1 Preamble
 C1 srcCAP>-1
 C1 srcCAP>-1
 C1 st14 SRC_DISCONNECTED
 [210.473835 PD TMOUT RX 467/1]
 RXERR0 Preamble
 C0 REQ>1
 C0 st6 SNK_REQUESTED
 C0 st34 HARD_RESET_SEND
 C0 st35 HARD_RESET_EXECUTE
 C0 HARD RST TX

Hard Reset in PD_C0 task can cause additional delay when C1 gets
connected and DUT requests higher voltage. As a result DUT sends Hard
Reset due to timeout. Hard Reset on port 1 causes PDTrySrc to fail
because of timeout waiting for 'fakedisconnect' command.

This was fixed by removing one voltage change request. In other words in
do_cc() function we are not calling pd_power_supply_reset(), but
disabling VBUS only. Eventually pd_power_supply_reset() will be called during
transition to SRC_DISCONNECT state.

BUG=b:162254118
BRANCH=none
TEST=Run FAFT_PD test suite. All tests should pass except PDVbusRequest
     (depends on charger connected to ServoV4).
TEST=Call 'fakedisconnect' command on ServoV4 console and check if there
     is no Hard Reset on port 0.

Signed-off-by: Patryk Duda <6aed17a362577cf10cb5675888c1635d522769c1@semihalf.com>
Change-Id: I657dd1ce2dc3a2f4914e975387eeebb037e1ada5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569652
Reviewed-by: Jett Rink <9d4aef0593e6843318d99df31597fb6153b89787@chromium.org>
Reviewed-by: Diana Z <cb2016afc7183e5356c690dc63b4ba817470501a@chromium.org>

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