Commit Graph

3205 Commits

Author SHA1 Message Date
Shawn Nematbakhsh
902706a2eb cleanup: Remove duplicate BD9995X CONFIGs
BUG=chromium:700933
BRANCH=None
TEST=`make buildall -j`

Change-Id: Id76fe93612fcd1ef924d7fa94479c45a52db046b
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648566
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-09-02 13:01:52 -07:00
Randall Spangler
686e0d05ad cr50: Use own CCD EXT state machine
The state machine in common/case_closed_debug.c only handles a subset
of what we need to do for Cr50 external case closed debugging, and
also supports a 'partial' CCD state that doesn't exist for Cr50.  Move
the few lines of code from that we actually need into our file.

BUG=none
BRANCH=cr50
TEST=manual
	Assert CCD_MODE_L
	See 'CCD EXT enable'
	Confirm Cr50 console appears as a RW /dev/ttyUSBn endpoint
	Confirm firmware update over USB works

	Deassert CCD_MODE_L
	See 'CCD EXT disable'
	Confirm Cr50 console appears as a RW /dev/ttyUSBn endpoint
	Confirm firmware update over USB does not work (can't find device)

Change-Id: Id96f2770632839a9690740ece54bc2eb71d39a38
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/647909
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-09-01 19:01:32 -07:00
Randall Spangler
ac1ce379e0 chip/g: use ccd_ext_is_enabled() instead of ccd_get_mode()
Currently, only usb_pd_protocol.c cares about the actual ccd mode
(disabled/partial/enabled).  Everything else just cares whether it's
enabled or not.  So promote the boolean ccd_is_connected() from
board/cr50 up to chip/g, and rename it to ccd_ext_is_enabled() to
match the new nomenclature (since 'CCD' itself is now too overloaded).
This will make it easier to handle CCD state directly in board/cr50
after we split it from common/case_closed_debug.c

BUG=none
BRANCH=cr50
TEST=make buildall; boot cr50; make sure USB endpoints still work

Change-Id: Ic3df7467bfe29f1c5d7060cac1309a1f0e090d9e
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/648212
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-09-01 16:41:55 -07:00
Randall Spangler
536c1e3449 chip/g: Move Rdd keepalive to chip driver
Previously, chip/g/rdd provided a method for an external console
command to override the Rdd cable detect state.  But since we'll be
refactoring the 'ccd' command, it's tidier to move this to a console
command inside the rdd driver itself.

BUG=none
BRANCH=cr50
TEST=manual, with no debug cable present
	rdd enable -> Rdd connect
	rdd -> keepalive
	rdd disable
	rdd -> connected (hasn't had a chance to run state machine)
	(wait <1 sec)
	rdd -> debouncing
	(wait 1 sec) -> Rdd disconnect

Change-Id: I141eedf8070b4ad2c96cc5a364f4e37dc29bed70
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/647991
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-09-01 16:41:55 -07:00
Randall Spangler
fe0a3b99ff cr50: Split servo state machine into its own file
This is the last state machine which used common/device_state.c.  But
servo is more complex than that, because it needs to differentiate
state-isn't-known (debouncing) from state-isn't-knowable (Cr50 driving
EC TX), so it's cleaner to split it out the way we did AP and EC state
machines in previous CLs.

BUG=b:35587387
BRANCH=cr50
TEST=manual with CR50_DEV=1 build
	// Test detect at boot, even with CCD connected
        Pull CCD_MODE_L low
	Pull DETECT_SERVO high
        Pull DETECT_EC high
	reboot -> 'Servo connect'
	// CCD is not driving EC UART TX
	ccd -> EC on, Servo connected, CCD enabled, EC UART RX

	// When servo disconnects CCD can drive EC TX
	Pull DETECT_SERVO low --> 'Servo disconnect'
	ccd -> EC on, Servo undetectable, CCD enabled, EC UART RX+TX

	// Can't detect servo reconnecting if we're driving EC TX
	Pull DETECT_SERVO high --> (no change)
	ccd -> EC on, Servo undetectable, CCD enabled, EC UART RX+TX

	// When we stop driving EC TX, can redetect servo
        Pull EC_DETECT low --> See 'EC off', 'Servo connected'
	ccd -> EC off, Servo connected, CCD enabled, EC UART disabled

	// Test debouncing at boot
        Pull DETECT_EC high
	Pull DETECT_SERVO low
        Pull CCD_MODE_L high
	reboot
	Within 1 sec, pull DETECT_SERVO high --> 'Servo connected'

	// Test debouncing after boot
	Pull DETECT_SERVO low then high < 1 sec --> (no message)

Change-Id: I964bd36c35f52c8ef7b3ea3793b6e0764e93587c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/636047
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-09-01 14:41:47 -07:00
Wei-Ning Huang
af00619b1e hammer: enable keyboard backlight support
Enable keyboard backlight support through HID output report.

BRANCH=none
BUG=b:37971411,b:63364143
TEST=with stacked CLs
     1. `make BOARD=hammer -j`
     2. `echo 10 > /sys/class/leds/hammer\:\:kbd_backlight/brightness`
        console shows 'Keyboard backlight set to 10%'

Change-Id: Icd08c2c48ab2f0a6ea6ecbc45bad8dd2c743931d
Reviewed-on: https://chromium-review.googlesource.com/586349
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2017-09-01 12:39:19 -07:00
Philip Chen
e6c6404cd6 scarlet: Limit the maximal acceptable VBUS to 13V
When my 15V/30W charger is plugged in scarlet,
I see rt946x (the battery charger on Scarlet) asserts OVP because
VBUS(15V) > VBUS_OVP(14V) defined in rt946x datasheet.

So we should limit the maximal VBUS to ~13V even if the source can
provide higher voltage.

Meanwhile, let's replace some numbers with macros for better
maintainability.

BUG=b:65118519
BRANCH=none
TEST=manually verify charging works with a 15V/30W PD charger

Change-Id: I19b7d8297bdbab0a722c488910fd872eb1395e16
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/639927
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-31 14:19:58 -07:00
Philip Chen
f35ae8ab1c scarlet: Initialize non-PD/USB-C charge suppliers
Before all of the charge suppliers are initialized,
charge_manager_refresh() wouldn't be called to update
charging voltage/current.
Since we don't define CONFIG_USB_CHARGER, we need
to do the initialization in board specific files.

BUG=b:65118519
BRANCH=none
TEST=manually verify charging voltage/current are updated

Change-Id: Ib0c226c236b8add0dcba7bf3610da47c26166732
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/639926
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-30 16:13:18 -07:00
Randall Spangler
17150b05ff cr50: Split AP state machine into its own file
The device state machines aren't quite similar enough to use common
code.  Split the AP state machine out, the way we split out the EC
state machine in the previous CL.

BUG=b:35587387
BRANCH=cr50
TEST=manual, with Cr50 strapped (or hard-coded) not to use platform reset
     and not to use TPM reset to detect the AP:
        Pull CCD_MODE_L low, so Cr50 detects/enables CCD
        Pull AP_DETECT high.
	Pull INT_AP_L low (with resistor).

        Pull AP_DETECT low --> See 'AP off' message
	gpioget --> INT_AP_L=0
        ccd --> AP UART disabled

        Pull AP_DETECT high --> See 'AP on' message
	gpioget --> INT_AP_L=1
        ccd --> AP UART RX+TX

        Pull AP_DETECT low for <1 sec then back high
        (don't see AP off/on message)
	gpioget --> INT_AP_L=1
        ccd --> AP UART RX+TX

	Reboot with AP_DETECT still low -> AP off at 1 second

	Reboot with AP_DETECT still low and then assert AP_DETECT
	within a second -> AP on immediately

	Repeat with Cr50 strapped/hard coded to use platform reset, but
	using TPM_RST_L instead of AP_DETECT.  Note that this will also
	show TPM reset debugging output when TPM_RST_L is asserted.

Change-Id: Ief9e4e5f2585ff925de1595cc8fbd5306c94a806
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/634248
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-30 16:13:16 -07:00
Randall Spangler
8202ddaa95 cr50: Only enable UART RX when EC/AP is on
Previously, some code paths such as CCD permissions change could
result in enabling EC or AP UART RX when the EC or AP is off.  This
could result in interrupt storms.

BUG=none
BRANCH=cr50
TEST=manual
	// Initial conditions
	Assert CCD_MODE_L
	Deassert DETECT_SERVO

	// Both RX and TX disabled when processor turns off
	// and re-enabled when it turns back on
	Deassert DETECT_EC
	ccd -> EC UART disabled
	Assert DETECT_EC
	ccd --> EC UART RX+TX

	Deassert DETECT_AP
	ccd -> AP UART disabled
	Assert DETECT_AP
	ccd --> AP UART RX+TX

	// TX disabled when CCD disabled
	Deassert CCD_MODE_L
	ccd --> EC UART RX, AP UART RX

	Assert DETECT_SERVO
	ccd --> EC UART RX, AP UART RX

	// Don't enable TX when detecting EC, if servo is connected
	Deassert DETECT_EC
	ccd -> EC UART disabled
	Assert DETECT_EC
	ccd --> EC UART RX

	// Don't enable TX when detecting CCD, if servo is connected
	Assert CCD_MODE_L
	ccd --> EC UART RX, AP UART RX

	// When servo disconnects, enable TX if CCD is connected
	Deassert DETECT_SERVO
	ccd --> EC UART RX+TX, AP UART RX+TX

Change-Id: Icb144c23e949afb0384c242965aa729b078b03eb
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/642349
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-30 16:13:16 -07:00
Patrick Georgi
09136dea76 ec_features / coral: Allow disabling keyboard backlight feature
Allow reporting that keyboard backlight doesn't exist even when the code
is compiled in. Useful if there are multiple device models that should
share firmware.

BUG=b:64705535
BRANCH=none
TEST=none

Change-Id: I9c1fc370aedf66ef856a571f73831095d27e3d39
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/633926
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-30 03:58:28 -07:00
Caveh Jalali
c1e5671e56 anx3429: force chip reset on PD_RESUME
we need to properly restart the anx3429 after a firmware update.
simply initializing the chip doesn't seem to get it to reload its
firmware - at least not the portion of the chip that implements the
firmware version register.  so, we explicitly power down and reset the
chip before reinitializing it to force it to run the new firmware.

the chip also needs a 10ms "off" time so the reset is properly seen by
the chip, so i did a light refactoring of the code paths that reset
the anx3429.

TEST=used 2 different firmware blobs and verified it switches between
	them during software sync.

BRANCH=none
BUG=b:35586895

Change-Id: I967898dd906f21bdc5bc4ce9c1dff9f873d198c1
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://chromium-review.googlesource.com/631976
2017-08-29 22:08:20 -07:00
Aseda Aboagye
c191bf9f4d cr50: Add vendor cmd to query rec btn state.
In order to test certain devices in the test lab using cased closed
debugging (CCD), we need a mechanism to programmatically "press" the
recovery button.  Even though this signal is being buffered through the
EC to the AP, and the EC could theoretically set it if needed, we cannot
trust the EC in its RO image since it may speak to the outside world
over USB PD.

Instead, this commit introduces a console command on cr50 that can be
used to force the recovery button state to be pressed.  However, it is
gated behind the CCD capabilities defaulting to the IfOpened state.
Additionally, a new vendor command is added to query the trusted state
of the recovery button.  The AP should use this command instead of
trusting the GPIO connected to it.

BUG=b:37751915, b:64146626
BRANCH=cr50
TEST=Flash cr50.  Press KEY0, verify that reported rec btn follows the
state of the button.
TEST=`recbtnforce enable` causes the button to be reported as pressed.
Physical presses of the button do not alter the reported state.
TEST=`recbtnforce disable` causes the reported state to follow that of
the physical button.
TEST=The `recbtnforce` command is set to the IfOpened capability by
default.
TEST=CCD locking the DUT and attempting to force the recovery button
results in an error of access denied.  The physical state is reported.
TEST=From the AP, issue the vendor command to retrieve the button state
and verify that it behaves as expected.

Change-Id: Ib8c2928e75e5f9a1a83c5361664efc3fa0ae2ddb
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/635955
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2017-08-29 22:08:19 -07:00
Randall Spangler
b0891c9450 cr50: Let state machines print their own states
Add a function to translate device_state enum into a string, then use
it for printing the ec and RDD state.

Refactor ec_state so that all state transitions go through a
set_state() function, which makes it easier to turn on debugging all
state transitions.  That's normally not compiled in because it would
be spammy during debouncing.

BUG=none
BRANCH=cr50
TEST=ccd command prints EC and RDD states

Change-Id: Ie7bc56c7b66beee23d1d1989711c640e5e39ce43
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/642121
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-29 19:37:05 -07:00
Randall Spangler
63deaa4f59 cr50: Configure AP detect GPIO based on correct config
Now that there are separate board config functions, use
!board_detect_ap_with_tpm_rst() to decide whether to configure
DETECT_AP on DIOA3, not board_use_plt_rst().

BUG=none
BRANCH=cr50
TEST=Boot cr50 strapped to use platform reset.  See that 'gpioget'
     shows DETECT_AP does not respond to changes on the DIOA3 pin.

     Boot cr50 strapped not to use platform reset.  See that 'gpioget'
     shows DETECT_AP responds to changes on DIOA3.

Change-Id: Ieb05015c948b2bbafa744f00a11e6b3da143ca5b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/642120
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-29 19:37:05 -07:00
Daisuke Nojiri
3dc0eae365 EFS: Rename CONFIG_VBOOT_EC to _EFS
This patch renames CONFIG_VBOOT_ET to CONFIG_VBOOT_EFS. It also
adds the macro to config.h.

BUG=none
BRANCH=none
TEST=make buidlall

Change-Id: I7cb9f4c73da635b36119db74bac6fe26e77a07d2
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/639955
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2017-08-29 19:37:05 -07:00
Philip Chen
472d50b729 scarlet: Enable software-controlled input current limit
By default the input current on Scarlet is limited to 500mA,
which is defined by ILIM pin.
We need to disable the control from ILIM pin to draw more
current from the source.

BUG=b:64821815
BRANCH=none
TEST=manually monitor the charging current

Change-Id: Ia356a2397b3671c178479a581b44a17215fee83d
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/639918
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-29 19:37:04 -07:00
Aseda Aboagye
88abd3ee72 zoombini: Add USB-A charge control support.
BUG=None
BRANCH=None
TEST=make -j buildall

Change-Id: I8ee0ec01d06343a158f4271e1f9ecdb3d8895659
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/634275
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-28 15:24:10 -07:00
Aseda Aboagye
52789bd7fd usb_port_power_smart: Add CDP/SDP only option.
For some boards, the control lines to the charging port controller are
all tied to a power rail.  In essence, this leaves the ILIM_SEL as the
only signal able to be controlled, which means that we only support
CDP/SDP.

This commit adds a new CONFIG_* option which describes this.

    CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY

Additionally, some cleanup is made to not always assume the number of
smart power ports.

BUG=None
BRANCH=None
TEST=make -j buildall

Change-Id: I080ccd67ffc20ccccf1e6b33a3cf9374a6b70ad6
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/634274
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-28 15:24:10 -07:00
Randall Spangler
1154a307e1 cr50: Split EC state machine into its own file
The device state machines aren't quite similar enough to use common
code.  Split the EC state machine out, the way we split out BattPrsnt
and CCD_MODE.

BUG=b:35587387
BRANCH=cr50
TEST=manual
	Pull CCD_MODE_L high, so Cr50 detects/enables CCD
	Pull EC_DETECT high.
	reboot -> 'EC RX only', then 'EC on' at 1 second

	Pull EC_DETECT low --> See 'EC off' message
	ccd --> EC UART disabled

	Pull EC_DETECT high --> See 'EC on' message
	ccd --> EC UART RX+TX

	Pull EC_DETECT low for <1 sec then back high
	(don't see EC off/on messages)
	ccd --> EC UART RX+TX

	Reboot with EC_DETECT still low -> EC off at 1 second

	Reboot with EC_DETECT still low and then assert EC_DETECT
	within a second -> EC RX only, then EC connect at 1 second.

Change-Id: I71687e651d625cadd656934f4cb2bbadc0b58816
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/619750
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-25 19:54:11 -07:00
Rachel Nancollas
07d646ced0 zoombini: fixed gpio.inc to make power enables push-pull
Made EN_PP3300_TRACKPAD, EN_PP3300_WLAN, and EN_PP3300_WWAN push-pull
and added USB1_ENABLE.

BUG=None
TEST=Check to make sure power enables are not floating.
BRANCH=None

Change-Id: I5e63b61a83e4c5504cead6d7b28d087fc5538c3b
Signed-off-by: Rachel Nancollas <rachelsn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/630056
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-08-25 14:21:38 -07:00
Mary Ruthven
611887143a cr50: add board property functions
Add some board property functions that describe what behavior we are
checking instead of just using board_use_plt_rst. More devices are
getting deep sleep support. This changes some function names to make the
transition easier.

This change adds board_use_deep_sleep and board_detect_ap_with_tpm_rst.
Right now both of these just call board_use_plt_rst. This will
eventually change with the expansion of deep sleep to new devices.

BUG=none
BRANCH=cr50
TEST=run firmware_Cr50DeepSleepStress with 10 suspend/resume cycles

Change-Id: I8d9ef23f686dea788d26ac4973054ad027fdd3a4
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/633891
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2017-08-24 17:20:42 -07:00
Furquan Shaikh
c859c057e1 poppy: Enable base on sysjump
Now that we enable base only on chipset state transition, sysjump
needs to be handled in a special way. On sysjump if chipset is already
in S0, then enable base right away.

BUG=b:64987346
BRANCH=None
TEST=Verified that base is enabled and connected on sysjump. Tablet
mode events work again in evtest.

Change-Id: I917b0ca84d2735a4f2b32ecea3d310eccb7c008c
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/631218
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-08-24 01:25:52 -07:00
Ryan Zhang
f9a2ef2347 Coral: Fix FAFT failure for firmware_ECUsbPorts
+ Follow Change#386854
+ Remove gpio41: gpio41 is used for ADC and already exist.

BUG=b:64738358
BRANCH=master
TEST=`make -j BOARD=coral`, `firmware_ECUsbPorts` passed on santa MB
Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>

Change-Id: I1c08c68c5449a94a333aca3384a48244450155ab
Reviewed-on: https://chromium-review.googlesource.com/613061
Commit-Ready: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Tested-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
2017-08-23 23:13:41 -07:00
Scott Collyer
8eea86766b coral: Enable TCPC init to happen in pd_task init
This CL enables the config option CONFIG_USB_PD_TCPC_BOARD_INIT and
modifies the board level tcpc init function to wait up to 2 seconds
to ensure that the battery is out of its disconnected state.

This change was put into Eve to ensure the PD chips are not reset until
the battery is out of disconnect and delay start of the pd_task
(and PD negotiation) until the battery is out of disconnect state.
This is part of a change was initially done on Eve
https://chromium-review.googlesource.com/c/592716.

For Coral the delay of tcpc init relative to the PD task also
addresses an issue where VBUS would be dropped by the external charger
when attempting to boot with no battery connected. When no battery is
connected there is a timing issue between the Analogix TCPC and the EC
related to when the TCPC sends its auto GOODCRC. This results in a
hard reset which causes the drop of VBUS.

BUG=b:64375688
BRANCH=none
TEST=Tested by Bitland using 500 iterations and showed no occurrence
of the hard reset causing VBUS to drop. Prior to this CL, the failure
rate was 1 out 300 attempts.

Change-Id: I28fe3266eb1c0a2940e1bdacee65cf4e642d3483
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/627115
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-23 21:17:23 -07:00
Scott Collyer
6d286d157c battery: Check physical battery presence before inhibiting power
In order to satisfy factory testing requirements we need to
boot a bare board with just an AC adapter without requiring
a power button.

However we also don't want to always allow booting of the
battery is present but cut-off (which will indicate BP_NO so
we can't use the existing battery_is_present function) or has
critically low level as it may not immediately boot.

To accomplish this add a function that allows the board to
specify a custom "hardware presence" for the battery that is
separate from the battery presence check.

This CL is taking a change done for Eve and pulling into TOT so it can
be used for other projects that have the same
requirements. https://chromium-review.googlesource.com/c/582544

BUG=b:63957122
BRANCH=none
TEST=manual

Change-Id: Ib1dc4f659adbf0eebd3dc8c3c61b39b8fa36cb4a
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/627113
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-23 21:17:22 -07:00
Philip Chen
c361021498 scarlet: Enable waking up AP by power button
Meanwhile, we can disable waking up AP by key press,
because there is no keyboard.

BUG=none
BRANCH=none
TEST=when AP is in S3, verify 'powerbtn' command on
ec console can wake up AP

Change-Id: I60c58458cf6f7e1f16b5129c8748b386c9928415
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/627675
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-23 19:04:20 -07:00
Randall Spangler
af85b4f30e cr50: Don't enable GPIO interrupts by default
Each GPIO interrupt should only be enabled after its state machine is
ready to accept interrupts.  Enabling them all by default may cause
undefined behavior if an interrupt occurs before state machine init.

Also, EC_TX_CR50_RX was enabled, and then explicitly disabled in
board_init() because we didn't want it.  Simpler only to enable the
interrupts we do.

BUG=b:35587228
BRANCH=cr50
TEST=boot cr50; manually wiggle platform reset and the detect GPIOs
     and see that interrupts are still generated.

Change-Id: If810eb6fee9945f0c6dfe0d4b592bdc5ff4be6e7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/619749
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-23 17:01:21 -07:00
Randall Spangler
b91ff0a480 cr50: Refactor Rdd state machine
The code to mirror Rdd detect into CCD_MODE_L and handle keepalive is
now inside chip/g/rdd.c It uses a HOOK_SECOND state machine similar to
what's coming for EC/AP/Servo.

This also removes the explicit 'ccd enable' / 'ccd disable' commands,
since they'd be overridden by the HOOK_SECOND handler.  If you need to
force CCD enabled, use 'ccd keepalive enable'.

BUG=b:64799106
BRANCH=cr50
TEST=With a CR50_DEV=1 images:
	Disconnect CCD cable (pull RDCC1 and RDCC2 outside 0.2-2.0V)
	gpioget --> CCD_MODE_L = 1
	ccd --> CCD disabled

	Connect CCD cable --> see 'Debug accessory connected'
	gpioget --> CCD_MODE_L = 0
	ccd --> CCD enabled

	Briefly disconnect and reconnect CCD cable --> No debug output
	gpioget --> CCD_MODE_L = 0
	ccd --> CCD enabled

	Disconnect CCD cable and wait a second --> 'disconnected'
	gpioget --> CCD_MODE_L = 1
	ccd --> CCD disabled

	Force CCD_MODE_L = 0 externally, wait a second
	gpioget --> CCD_MODE_L = 0
	ccd --> CCD enabled

	Stop forcing CCD_MODE_L externally, wait a second
	gpioget --> CCD_MODE_L = 1
	ccd --> CCD disabled

	ccd keepalive enable
	gpioget --> CCD_MODE_L = 0
	ccd --> CCD enabled

	ccd keepalive disable
	gpioget --> CCD_MODE_L = 1
	ccd --> CCD disabled

Change-Id: I65110b45e76f60390828e0fbbac8f36fc2cc9b37
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/619393
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-23 17:01:21 -07:00
Scott Collyer
c592ced088 coral: Read SKU ID at initialization time
BUG=b:64705535
BRANCH=none
TEST=Tested two boards with different strapping resistors and verified
that the SKU ID logged in the EC console matches the expected values.

Change-Id: I3534e99856f25dbef810b97a2e4b90c00a65f32e
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/627664
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-08-23 12:19:09 -07:00
Philip Chen
13269c2117 scarlet: Enable RTC console/host commands
BUG=b:63908519
BRANCH=none
TEST=on scarlet, manually test 'rtc'/'rtc set' on ec console and
'ectool rtcget/rtcset/rtcgetalarm/rtcsetalarm' on ap console.

Change-Id: Ie7de53895bd0ef88af32b74d8410e2e735d1bda4
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/627640
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-08-23 12:19:08 -07:00
Vadim Bendebury
e24bd63fae cr50: log tpm reset event
Use the previously introduced TPM logging framework to log TPM reset
events. The two lowest data field bits are used to communicate the
type of reset passed to tpm_reset_request(),

BRANCH=cr50
BUG=b:63760920
TEST=with the upcoming patches verified that TPM initialization is
     logged as expected

Change-Id: Ic0874723ec6df616a8237b036542398b29fe5ccc
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/620113
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-23 12:19:07 -07:00
Nicolas Boichat
9ea128966b hammer: Pull down PWM output pin
Some staff boards were accidentally built with both pull-up and
pull-down stuffed, leaving the backlight output always on when
the EC is not driving the pin.

This "fixes" the issue by adding an internal pull-down on the pin,
so that the pin is pulled low whenever the PWM is disabled.

BRANCH=none
BUG=b:64845198
TEST=staff EC console:
     pwm 0 -1 => backlight is off
     pwm 0 0 => backlight still off
     pwm 0 100 => backlight full intensity
TEST=Power consumption with PWM disabled (pwm 0 -1) and always 0
     (pwm 0 0) are comparable.

Change-Id: I32549bfc037a6506470408f8e98cae5ae56006e2
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/627345
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2017-08-23 00:04:09 -07:00
Furquan Shaikh
844b03dd0e poppy: Enable/disable power to base on chipset startup/shutdown
Instead of always enabling power to base whenever it is connected,
enable/disable power to base depending upon chipset startup/shutdown.

BUG=b:64460667
BRANCH=None
TEST=Verified following:

1. On system startup, base is connected only after chipset startup.
2. On apshutdown, base is disconnected after chipset shutdown.
3. Wake from base still works.
4. Base still works on firmware screen.

Change-Id: I39454701889650964b7c678b275c984772ecd3e7
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/625244
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-22 16:43:58 -07:00
Furquan Shaikh
1fb39a4247 poppy: Return early from base_detect_change if status is unchanged
If current status is the same as requested state, then return early
from base_detect_change without taking any action.

BUG=b:64460667
BRANCH=None
TEST=make -j buildall

Change-Id: I3c403739a2e5c43f31fe77b5633927cf49b974eb
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/625243
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-08-22 12:38:47 -07:00
Scott Collyer
af6024cc08 coral: Remove volume up/dn button flip in gpio.inc
The Coral schematics are being changed to reflect that volume up is
connected to GPIO83 and volume down to GPIO82. The current EC code
implemented this same assignment, but introduced an intermediate
signal name to match with previous schematics which had the opposite
assignment. With the signal names fixed on the schematic, the
intermediate #defines are no longer needed.

BUG=b:64012307
BRANCH=None
TEST=manual testing on Coral proto. Verified that up button presses
cause the volume bar to go up and volume down button presses cause the
volume bar to go down.

Change-Id: Ib04f8416e8f36271972fc650bf1593a4babaeb82
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/625063
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-08-22 12:38:46 -07:00
Divya Sasidharan
577a741855 glkrvp: Enable USB MUX PS8743 driver
Add Parade PS8743 USB Type-C Redriving Switch for USB Host /
DisplayPort.

BUG=b:64598680
BRANCH=glkrvp
TEST=On glkrvp,
     Connect Apple dongle and verify mux setting with i2c read.
     1. i2cxfer r 1 0x20 0 -> 0x50 (DP/USB enabled)
     2. flip i2cxfer r 1 0x20 0 -> 0x54 (Flip bit enabled)
     Connect pluggable and verify the same.
     Similar testing was successful on second type-c port.

Change-Id: I96ec380024eb659e071b019dd58b3c640fa1cc03
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/616075
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-21 22:03:53 -07:00
Vijay Hiremath
309289df45 glkrvp: Enable TCPC using NXP PTN5110 AIC
BUG=b:64531818
BRANCH=glkrvp
TEST=TCPC can negotiate to 20V & 2.25A

Change-Id: I16510a510133bbb1827634303a6b9d02dec4bbc6
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/614311
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-21 22:03:53 -07:00
Philip Chen
a438efab9c scarlet: Define BATTERY_DESIRED_CHARGING_CURRENT
BUG=b:64821815
CQ-DEPEND=CL:621776
BRANCH=none
TEST=plug in AC, and check 'charger' command on ec console

Change-Id: I53681d21a5311ea58562acf2fae451ebc7f41d4d
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/621777
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-21 12:52:14 -07:00
Randall Spangler
9ca5e791cc cr50: Wake on AC detect edges
Currently, we only use the AC detect interrupt for battery cutoff
support on detachable devices, and we use the RDD detect interrupt for
waking Cr50 from deep sleep.  However, Eve accidentally detects RDD
when the EC is off, so this is not a reliable signal - particularly if
Cr50 is explicitly driving EC reset.

Enable the AC detect interrupt all the time, and defer sleep for 5
seconds when it transitions.  This will have a negligible effect on
overall power (since AC is not normally transitioning) and will allow
the RDD detect code to be simplified.

BUG=b:64799106
BRANCH=cr50
TEST=manually pull DIOR5 up and down; see AC interrupt debug output.
     idle d, wait for sleep, then wiggle DIOR5 and see that cr50 wakes.

Change-Id: I7551f25e27a79573bf4527d8c38994634df621ec
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/619319
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-08-18 14:27:19 -07:00
Vadim Bendebury
430d55879d g: add 'recover hosed slave' i2cs capability
A common failure condition on the i2c bus is when the master
unexpectedly stops clocking the bus while the slave is driving the SDA
line low. In this case the master is not able to issue Stop or Start
sequences, which makes the bus unusable.

Good slave controllers are able to detect this condition and recover
from it by removing the pull down from the SDA line. This patch adds
this capability to the g chip i2c slave controller.

A new timer function is created which samples the SDA line twice a
second. If it detects that SDA is low in two consecutive invocations
and the number of i2cs read interrupts has not advanced, it decides
that the "hosed slave" condition is happening and reinitializes the
i2c driver, which removes the hold from the SDA line.

Even though the state of the SDA line is supposed to be accessible
through the I2CS_READVAL register, it in fact is not, reads always
return zero in the SDA bit. To work around this a GPIO (port 0, bit
14) is being allocated to allow to monitor the state of the line, it
is multiplexed to the same pin the SDA line uses.

When the AP is in low power modes the SDA line is held low, this state
should not trigger i2c reinitializations.

CQ-DEPEND=CL:616300
BRANCH=none
BUG=b:35648537
TEST=connected H1 on the test board to an I2c master capable of
     stopping clocking mid byte. Observed that the existing code would
     just sit in the "hosed" state indefinitely. The code with the fix
     recovers from the condition (drives the SDA line high) 500ms to
     1s after the failure condition is created.

Change-Id: Iafc7433bbae9e49975a72ef032a923274f8aab3b
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/614391
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-08-17 20:41:57 -07:00
Philip Chen
add041bd7c scarlet: Make AP_CORE_PG a non-INT pin
AP_EC_S3_S0_L and AP_CORE_PG can't be INT pins
at the same time.

BUG=b:64528567
BRANCH=none
TEST=boot scarlet rev1

Change-Id: I3e70d2ef2a1f78c0661c8c4d40db32f22dff616f
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/611650
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-17 20:41:54 -07:00
Randall Spangler
86d7ea33af cr50: Remove BOARD_AP_USB property
We previously disabled the USB PHY to the AP.  But the BOARD_AP_USB
property lingered on.  Remove the property.

Also clean up the idle task deciding when to do utmi wakes.  With the
AP USB connection disabled, that's only necessary when the debug cable
is attached, so we can check that explicitly.

BUG=none
BRANCH=cr50
TEST=make buildall; boot CR50_DEV=1 image

Change-Id: If81a7bcfe845d9d70dcc7e16239244a4f5f2427b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616301
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-17 01:56:48 -07:00
Randall Spangler
f2b3aa47a6 cr50: Add helper functions for device-is-enabled
A subsequent CL will massively refactor the device state machines.
Add the helper functions which will be used by that CL, so that
the refactoring touches fewer files.

No change in functionality.

BUG=none
BRANCH=cr50
TEST=make buildall; boot cr50 with a CR50_DEV=1 image

Change-Id: I3499d45e93fa15b6de9c04ce398d1c5bfbbc01e9
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616300
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2017-08-17 01:56:48 -07:00
Caesar Wang
d7a41825d9 nefario/battery: support the 3s battery
As Nefario supports 3s battery, we can change the parameter
for board-specific instead of the charger driver.

BUG=chromium:754824
BRANCH=none
TEST=Build and check battery information
> battery
  Status:    0x0080 INIT
  Param flags:00000003
  Temp:      0x0bc0 = 300.8 K (27.7 C)
  V:         0x2e1e = 11806 mV
  V-desired: 0x32fa = 13050 mV
  I:         0x07a7 = 1959 mA(CHG)
  I-desired: 0x0fa0 = 4000 mA
  Charging:  Allowed
  Charge:    17 %
  Manuf:     sunwoda
  Device:    BBLD485595
  Chem:      LION
  Serial:    0x0064
  V-design:  0x2c88 = 11400 mV
  Mode:      0x6001
  Abs charge:17 %
  Remaining: 667 mAh
  Cap-full:  4079 mAh
    Design:  4000 mAh
  Time-full: 2h:47

Change-Id: If9a4cdd9932e3287bf06cbe0840c94085cbeea1f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/616508
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-16 20:46:37 -07:00
Vadim Bendebury
f7f552251a cr50: enhance sleep wake indicator
Printing dots each time device wakes up from sleep causes the terminal
to be overflown with dots, especially in cases when interrupts are
generated at high rate.

Let's replace printing dots with a rotating wheel, the screen is not
going to be wiped out, and one still can tell the rate the wake
interrupts are coming at.

Also, each time the wake source changes, print its hex value.

BRANCH=none
BUG=none
TEST=verified proper printing of the spinning wheel and wake interrupt
      sources.

Change-Id: Ic32466234f91b4a19b6186f74296dc6dd765a8fa
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/611962
Tested-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2017-08-16 20:46:37 -07:00
Caveh Jalali
ee3fb6c6aa ps8xxx: use custom tcpm_drv
the ps8xxx family of TCPCs (ps8751, ps8805) have historically used the
generic tcpci_tcpm_drv functions, but we need to override some of
these entry points because the parade parts need to be woken up before
accessing registers.

in most cases, this doesn't matter because we access the chip in quick
succession where we can "safely" assume the chip is awake -- and the
code is structured to implicitly keep the chip awake.  the new case we
need to address here is where we need to suspend the pd_task and TCPC
at an arbitrary point in time.  the driver's .release method is called
to shut down the chip, and that involves first waking up the chip to
be able to access its regs to mask off interrupts, etc.

BUG=b:35586896
BRANCH=none
TEST=tested from depthcharge - we no longer get errors in the EC
	console logs about TCPC "release" failed.

Change-Id: Ic2a90b71050b3f68c697b1cef48d736ed88b3f41
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://chromium-review.googlesource.com/616460
Reviewed-by: Shawn N <shawnn@chromium.org>
2017-08-16 20:46:36 -07:00
Nicolas Boichat
9e33d6ce3c chip/stm32/usb: Replace reset handler by generic event handler
Some USB interface handlers need to know when USB has been
successfully resumed after a wake event. For example, this is
useful so that HID keyboard can send the events at the right time.

BRANCH=none
BUG=b:35775048
TEST=Using USB HID keyboard patches to queue keys in a FIFO:
     After USB autosuspends, press a single key and hold it. Without
     this patch the endpoint data only gets reloaded on the _next_
     event.
TEST=On hammer, I2C passthrough still works.

Change-Id: I9b52b9de16767c8a66c702a5ae70369334a3d590
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/569547
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2017-08-16 04:03:24 -07:00
Che-yu Wu
a1abf686c3 board/elm/board.h: Remove CONFIG_CMD_HOSTCMD
The command "hostcmd" in console isn't very useful and will cause
stack overflow in console task when processing some hash commands.

BUG=chromium:755048
BRANCH=none
TEST=make BOARD=elm -j
     make BOARD=elm tests
     There should be no hostcmd command in the console of elm.

Change-Id: Ifa721a1731bc1ebfb39e12430b6631338bdccd9f
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/616600
Reviewed-by: Rong Chang <rongchang@chromium.org>
2017-08-16 04:03:23 -07:00
Scott Collyer
8df230291a servo_v4: Tie data role preference to DTS mode setting
When servo_v4 acts as a debug test system (DTS) its expected use
case is for triggering CCD mode and Faft testing. To that end, its
desired default data role is to be a UFP so that the enet and USB
port are accessible by the DUT.  However, when servo is acting a
regular SRC port, it makes more sense for the data role pairing to
be consistent with a normal SRC port device which is SRC/DFP.

BUG=b:64720447
BRANCH=servo
TEST=Tested with Eve using twinkie USB PD analyzer. Verified that when
DTS mode is enabled a data role swap request is sent to the DUT and
when DTS mode is disabled that servo_v4 does not send a data role swap
request.

Change-Id: I071f85fc99f1c877d86ef48ec7fa38d6850d5679
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/615813
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2017-08-15 20:21:05 -07:00