| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort all includes in common with the clang-format rules used by
the zephyr project.
BRANCH=None
BUG=b:247100970
TEST=zmake build -a
TEST=./twister --clobber -v -i
TEST=make -j72 buildall_only runtests
TEST=zmake compare-builds -a
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I70c2ed7bb2ce50c968f3e2dbdc274de3a455129a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049889
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally we don't do this, but enough changes have accumulated that
we're doing a tree-wide one-off update of the name & style.
BRANCH=none
BUG=chromium:1098010
TEST=`repo upload` works
Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: If87e96c88aab70e062a507271490fcdd932c9fca
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729694
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a followup to CL:3104290, give the TCPCI TRANSMIT and
RX_BUF_FRAME_TYPE types more consistent names. Most of them can be used
for receiving, not just transmitting. Fix lint errors thus revealed.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I399ec479eacc18622fc4d3f55f8bdabf4560fcff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3125995
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't enable USB superspeed signals until the PD capability is known.
This fixes an issue where platforms that enable the virtual USB mux
violate the tSenderResponse timeout when the attached SRC sends the
Source Capabilities message.
BUG=b:187796705
BRANCH=none
TEST=Volteer - connect PD charger, obsserve no hard reset
TEST=Connect non-PD USB device, verify USB mode is enabled
TEST=Connect USB+DP monitor, verify DP mode entry and USB mode enabled
TEST=Connect USB4 dock, verify USB4 entry
TEST=faft_pd test suite passes on Voxel
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I4be08874178d1e225cf41939b9626a81b0da0524
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895424
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When executing a fast role swap, ensure that any 3.0 A selected current
is preserved through the select_current_limit_rp in the TC layer.
Additionally, use this selected current to set our current limit when
first attaching as a source.
If FRS is disabled on a port, restore the default Rp value for the
board.
BRANCH=None
BUG=b:180434465
TEST=Check that a 3A FRS device loaded over 1.5 A is able to
successfully complete FRS
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I6e6b2f95066a3f8972664c6ac62b450e179e408d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757096
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a condition is reached outside the PD task which requires USB Type-C
Error Recovery, it can now use pd_set_error_recovery() to request that
the PD task execute this. Note that this will return before the error
recovery has completed, which is in contrast to the suspend port
behavior.
BRANCH=None
BUG=b:180453483
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I487e0da3ef65c201ff406500f0c95244b460afcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2718836
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the device has a USB superspeed UFP (which is uncommon, this is
either servo v4.1 or a laptop port in SS device-mode), if we connect as
a sink *before* trying PD communication, we should connect the SS mux
without waiting for the partner PD comm capability as we might never be
able to communicate with it over PD.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=b:150614702
BRANCH=servo
TEST=use the sink mode enabled by 'cc pdsnk', connect to a USB-C
Chromebook, try both video output on USB-C->mini-DP and USB 3.0.
Change-Id: Iea0409fce2cb7aca089814ae406a7c05848dd8e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637647
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow tests to use a mock charge_manager. Do not build the real charge
manager when this is used.
BUG=b:173023378,b:169385081,b:172709198,b:173028832,b:173028791
BUG=b:173141941,b:173142113
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I49caccafd024515833880d7251092b77623d4a71
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639584
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Place mock functions in the mock libraries corresponding to the layers
of the real implementations. Broadly, move towards one layer of the TCPM
stack as a UUT, with mocks for the other layers as needed. There should
be a one-to-one correspondence between real modules and mock modules.
usb_pd_mock.c does not correspond to any real implementation module or
TCPM stack layer, so remove it and move its contents to the layers
corresponding to their real implementations.
Also clean up some redundant or misplaced mocks inside tests.
BUG=b:153071799,b:173791979
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ic44df8675de2b9f1f8c7669cd97dcdc296bf107f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578200
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:171370392
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I1517a7080bd4853918ffc7127d44e1955d925789
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2510455
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant checks for VCONN Source in pe_attempt_port_discovery
(which prevent discovery from running). Allow pe_vdm_send_request to
attempt to become VCONN Source if necessary. Make the checks in the VDM
request child states more complete (not just checking for VCONN Source).
BUG=b:170662791
TEST=Attach Tapex Creek board; observed successful discovery
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Id7d3a1b82d1029f69b3e05b845632e7237524bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2486303
Tested-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As requested in CL:2321869 review, make a new version of
test_send_caps_error that uses the external interface of the PE
layer.
BUG=b:161835483
BRANCH=none
TEST=make run-usb_pe_drp
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I983b145cd1e731e844363955896898a2374a0a30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2419834
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new unit test for usb_pe_drp with mocks for the various
subsystems that it will use.
The fake_prl module is already essentially a mock for the PRL layer,
so just move it into the mocks directory and make it available as
mock to other tests.
BUG=b:163421994
BRANCH=None
TEST=`make runhosttests` succeeds
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: I2aea3fa0694e8d9e6bae1f47516cb4d5d2a1e714
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364050
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unit tests for the packet discard logic for packets while going
into SinkTxNG.
BUG=b:160622527, b:161174072
BRANCH=None
TEST=`TEST_LIST_HOST=usb_prl make runhosttests`
Signed-off-by: Paul Fagerburg <pfagerburg@chromium.org>
Change-Id: Ied7689d2fe40da93069e58b53ea32e053ab887b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2300690
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
Now that the old usb_prl unit test is under usb_prl_old, add a new
unit test for usb_prl with mocks for the various subsystems that it
will use.
BUG=b:158608129
BRANCH=None
TEST=`TEST_LIST_HOST="usb_prl_old usb_prl" make runhosttests`
Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: Ie1bf9a4494cd933473caa4ceb594eddd97c277c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2252662
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
|