Files
OpenCellular/driver/tcpm
Scott 17f02ee5a7 tcpm: fusb302: Fix issue with MDAC register definition
There was a mistake in the initial driver implementation
regarding the MDAC field in the measure register (address 0x04).
The header file and associated code defined this 6 bit field
to be the upper 6 bits of the 8 bit register. However, the
data sheet for both rev A and B silicon show this field as
being the lower 6 bits of this register.

In addition, when using this threshold to distinguish between
a Rd and Ra attach, the threshold test logic was backwards.
If the threhold bit is set, then it means the voltage is
higher than the 200mV setting and should indicate a Rd attach.

BUG=chrome-os-partner:54790
BRANCH=none
TEST=manual
Tested with Anker TypeC hub using known polarity (CC1). Previously,
would see CC2 be selected as the active polarity. This resulted
in USB PD state machine getting stuck in SRC_DISCOVERY due to
SRC_CAP messages not being received correctly. With the changes,
verified that correct CC polarity is always detected and results
in reaching SRC_READY state.

Change-Id: Ia522abdac31642ff99bbf13ccc73a0a77bbdb32d
Signed-off-by: Scott <scollyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/361614
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Joe Bauman <joe.bauman@fairchildsemi.com>
Reviewed-by: Guenter Roeck <groeck@google.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2016-07-20 13:04:37 -07:00
..
2016-06-16 09:40:40 -07:00
2016-06-16 09:40:40 -07:00
2016-04-18 17:32:41 -07:00