| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After entering a PD contract, always issue an SOP' soft reset before
sending any discovery VDMs to the cable.
BUG=b:172364575
BRANCH=volteer
TEST=connect monitor with emarked cable, verify SOP' soft reset is sent
when EC starts as SNK/DFP.
TEST=Connect monitor with non-emark cable. Verify SOP' soft reset is
sent once regardless of starting role.
TEST=Connect USB4 dock, verify USB4 entry.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Id5026a2c8c9877b860e1356dd33763bad3e51841
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2596838
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nothing uses this, and anyway, the EC doesn't have the means to evaluate
the results of a BIST Carrier Mode test that it initiates.
BUG=none
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I8aa0d97c81422689de4ca165cb2c0c34c324f6a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2602719
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copy sink caps for later reference, and report them up to the AP in the
TYPEC_STATUS host command return. This also moves the location of the
DPM set for sink caps, to be symmetrical between source and sink inits.
Set the old unit tests to clear all DPM requests. New PE tests will
correctly handle our startup sequence, but the old tests may have
erratic behavior based on how many states run before the connection is
forced over to READY.
BRANCH=None
BUG=b:160009733,b:168862110
TEST=on drawcia, verify sink capabilities match those from PD traces
with several docks and dongles
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Iadc6ef4c7364d7c709878a75fd5e707a965f77f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540390
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a SRC that runs on battery it can be handy to determine
if the connected partner has unconstrained power available
so we can try to PR_Swap to let them power us. This only
requests the information, if it is not already available,
and leaves it to other code to determine if the swap is
a good idea.
BUG=b:166446426
BRANCH=none
TEST=connect a sink device and determine it performed the action
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: If45801a33df8b75e541989d7ee8f36ed316ffcc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2381408
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Building up the framework to handle discarded DPM
requests and using it on all of the sender_response
messages
BUG=b:165822172
BRANCH=none
TEST=DUT-DUT PR_Swap
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I542d4cba89a923fb16588cc675d2ea4ab7954e0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2376386
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like other state machine declarations, put all of the super states
together to make it more clear when reading states.
BRANCH=none
BUG=none
TEST=build and unit tests
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I1bb776434911d3acdb34abc64e7e8fa5f87154de
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354193
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enabled use of the IS_ENABLE macro we need to define some of the usb
state machine states as extern variables that will never be linked. This
allows the compiler to know about a state but will still fail the
linking phase if the config option is not defined properly.
This is just adding a convenience macro for this paradigm, not creating
the paradigm itself.
BRANCH=none
BUG=none
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ia19b5babd43d536f043745314481475cf25f6e01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2353369
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
USB Power Delivery Specification Revision 3.0, version 2.0 section 6.3.7
states that a dual-role port shall respond to Get_Source_Cap with its
source capabilities, but this was incorrectly handled by responding with
a request for source capabilities.
Per section 8.3.3.18.10, implement the PE_DR_SNK_Give_Source_Cap state to
handle this correctly.
To support the new test, some helper functions for the fake PE are added
and the test code's copy of the PE state enum is updated to be in sync
with the real one.
BUG=b:161400825,b:161331630
TEST=New host test for this state, and verified on Dalboz that requesting a
PRS via the EC console (`pd 1 swap power`) now sends source
capabilities when the partner requests them.
BRANCH=None
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I87c27d406e0a3f57cf2c25fa583bee51155b6b12
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2336233
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If CONFIG_USB_PD_EXTENDED_MESSAGES is defined, support sending and
receiving extended messages. If it is not, remove the chunking state
machines from the PRL and modify the PE to respond with Not Supported as
appropriate.
BUG=b:160374787,b:158572770
TEST=Attach various devices; observe PD traffic
TEST=make run-usb_prl_noextended; make run-usb_pe_drp_noextended
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I862020155927b5613d599274708e60678c49c43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2304263
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling pe function direction in unit test, use the existing
state machine task for unit tests. This allows the real code to call
into a task_set_event on the PD tasks. See CL:1786462 where this is
needed.
BRANCH=none
BUG=none
TEST=run test passes with and without CL:1786462
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: If31f946e2253c724dd314b2b22e2265cf46197f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2307713
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PE_FLAGS_DISCOVER_PORT_IDENTITY_DONE has been used to indicate that
DisplayPort configuration is done for some time.
PE_FLAGS_DISCOVER_PORT_CONTINUE is now only used to resume non-discovery
VDM requests. Maybe the way they are used should change. For now, rename
them to reflect their current use; this should make subsequent changes
easier to understand.
BUG=b:155890173,b:158813138
TEST=make buildall
BRANCH=none
Change-Id: Icbb6a44412b1b901ed160da58d4fbe016348bc2b
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2250921
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were out of spec for PR Swap transitioning from
SNK to SRC by sending PS_RDY before we were Safe0V.
We only waited for the TC state machine to go from
attached.snk to attached.src, which happened on the
first state machine tick after
pe_prs_src_snk_transition_to_off_entry was called
and this does not guarantee Safe0V as is needed.
Added an extra state to reflect what the PD spec
requests and now waiting for Safe0V before
indicating we are powered off.
BUG=b:157755939
BRANCH=none
TEST=ThinkPad Dock G2 should attach
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I93eb36acc64f273e8b30ca0a0bb76d6fa96b64ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2223723
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TCPMv2 stack defaults to PD2.0 functionality. Defining
CONFIG_USB_PD_REV30 enables PD3.0 functionality.
BUG=b:155879504
BRANCH=none
TEST=make -j buildall
Manual tests:
passed FAFT_PD running on kohaku
Before patch:
*** 18624 bytes in flash and 29216 bytes in RAM on kohaku RO ****
*** 18544 bytes in flash and 29216 bytes in RAM on kohaku RW ****
After patch:
*** 23320 bytes in flash and 30336 bytes in RAM on kohaku RO ****
*** 23228 bytes in flash and 30336 bytes in RAM on kohaku RW ****
Flash savings of 4696 bytest
Ram savings of 1120
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I082cf62617a91b487d2d3567afd5e340bd52258c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2184547
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is never checked.
BUG=none
TEST=make buildall
BRANCH=none
Change-Id: I74034ae998c8c8ac068c6712f9b078afcab8942b
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2203840
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:141563840
TEST=make -j buildall
Change-Id: Iaff605f5d93ccce26aec4d9e33be78017c7b9231
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906194
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current PD3.0 EMarker cable probe functionality is unstable.
Remove and add back as a feature after the PD3.0 code base is stable.
BRANCH=none
BUG=b:144093713
TEST=make -j buildall
Used total phase to verify that the cable was not probed.
Change-Id: I2906a16c96faff9d8107ef19286acdbe60869180
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1904157
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of the flags in all layer needs comments of what the flags means
and a potential usage. all TC_FLAGS_*, PR_FLAGS_* and PRL_FLAGS_*
BRANCH=none
BUG=b:141563840
TEST=make -j buildall
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I520daa841a61e36a8a6b394e0f96b198b16ad561
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1904148
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
|
|
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I55453ddf1d1da0fdee902a33e14357716fb12c4a
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1859826
Reviewed-by: Jett Rink <jettrink@chromium.org>
|