mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 21:02:27 +00:00
The FUSB302A had silicon limitation that required using its autodetect logic when presenting as a SRC. While testing on Kevin/Gru and connecting PD dongles, observed issues where following successful connects, the USB PD state machine would remain in SRC_DISCONNECTED state after removing the dongle. Flipping the connector (to reverse polarity) will recover from this stuck state. In order to resolve this problem and to make the tcpm_get_cc() FUSB302 driver function more consistent with the USB PD protocol state machine while acting as a source, the autodetect feature is now only used when a revA silicon device is detected. If it's not revA, then full manual mode is utilized for tcpm_get_cc. In addition, a new measure_cc_pin_source funciton was added that consolidates the operations that are shared between both autodetect and manual modes. BUG=chrome-os-partner:55429 BRANCH=None TEST=Manual Connected display adapter dongles and TypeC hub dongle repeatedly and verified that each connect attempt resulted in the USB PD state machine getting to SRC_READY state. Never observed the error state described above which previously could be repeated within ~ < 10 connection attempts. Change-Id: I3c8c6990129e0f1555a6698574adc603d6b7b45b Signed-off-by: Scott <scollyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/361617 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Joe Bauman <joe.bauman@fairchildsemi.com> Reviewed-by: Shawn N <shawnn@chromium.org>