| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: If5487b71106a02d9273bd0e99bf4809c45c734f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707909
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use outstanding PD Timer expiration times to adjust to
faster state machine ticks.
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Iee7f75baf29e70f5fd7ef31de5c53d5824b52871
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707908
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: If7b81f9b19e8898be12df8fb25b13d1c90d17db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707907
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I437efe7b10a7de09a483bfaea3c53ca29f73a771
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707906
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I7d6e5e12e735029d0efb183f0ba6a1abc8f61e6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707905
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Id00a8bdd9b2c7967e6080211c35144af46def800
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707904
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ie7b6dfb64fb419c43f71493f5de44a6e90b8542a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707903
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I66f35864109e11b53f8211c18e0ae0e0889d1853
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707822
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ie77f8a7b9087985e78377b2a0414d8457d9a8300
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707821
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I6f7a5c79a79d5938c13514a3cea935491a443c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707820
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I6809f24f30521ff5939127c58b2e2be03f87194e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707819
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I3018528667273ddbe9b97ec0ad1db55cfba934b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707818
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Id956787b7f3cfc07bb1bb333936a4595f841646e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707817
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ifba1403f5edd6ae56b7c2d25a3b06a1f39ed697e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707816
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:178029034
BRANCH=none
TEST=make runtests
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I74ad19364fa8d73fbac685097611347de2a9e537
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707815
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the AP resets, reset the SOP and SOP' discovery events so it knows
there is completed discovery information to consume. Additionally,
remove the requirement that events only be set from the port's PD task.
Since this is just an atomic or of events and the setting of a host
event, it should be safe to do from other tasks.
BRANCH=None
BUG=b:179505381
TEST=on galtic, verify events are reset after reboot with:
- Apple 3-in-1 (SOP identity, no SOP')
- TBT dock (both SOP and SOP' identity)
- Active cable tied to another chromebook (SOP' identity, no SOP)
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib2c49854fd4269c65e771565210fe88222c6e848
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2708785
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we support FRS, we should query the SRC sink_capabilities on entry to
SNK_Ready. Currently we queue up this when we enter snk_startup, but
only when it isn't due to a power role swap. Some devices will change
their sink capabilities depending on what their current status is, so we
should check again following a power role swap.
BUG=b:181156774
TEST=make buildall
TEST=Check that get_sink_capabilities message is sent following a
SRC->SNK power role swap
BRANCH=none
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Change-Id: I5f1cbe2b300e8c29bef16336bd7ddfa8f7a8b2c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2718495
Reviewed-by: Nathan Kolluru <nkolluru@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Temporarily remove check for VBUS = vSafe5V when entering BIST mode. It
does this by measuring VBUS, but this facility is inadequate to the
purpose on Volteer. Since this even more of an edge case than actually
running BIST tests, remove the check for now, pending a more general
solution.
BUG=b:180957710,b:173023378
TEST=make buildall; pass TDA.2.1.2.2 BMC PHY RX INT REJ on voxel
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I172c1bcc10731c2e405344cdc6ad2b5a1ed80ced
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2714203
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL fixes/improves the follow areas:
- Refactors the svdm_response entry state, including logic to
set/clear the modal operation flag upon enter/exit mode.
- Adds a check for tx message discarded flag in the response run state
which allows a VDM command sequence to be proplerly interrupted.
- Adds logic in the vdm common parser helper function to check for DP
attention messages so the state doesn't wait for a reply.
BUG=b:175660576,b:173027965
BRANCH=None
TEST=Verified on quiche that can enter ALT-DP mode as a UFP-D and that
display is extended properly via display port or hdmi connector.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I723f09ced39a3cd7c3d434102fad51c4c31f8d9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2677703
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no PD sinks require 3.0 A and no FRS ports require it, offer this
current level to non-PD sinking devices. The non-PD devices will be
downgraded whenever a higher-priority type of port is connected.
BRANCH=None
BUG=b:141690755
TEST=on madoo, verify:
- plugging in a flash drive, it is offered 3.0 A
- plugging in a 3.0 A PD sink, flash drive CC resistor is downgraded
- unplugging 3.0 A PD sink, flash drive CC resistor is back to 3.0 A
- connect power to 3.0 A PD sink, flash drive CC resistor is back to
3.0 A
With FRS config check commented out, verify:
- flash drive is downgraded and FRS enabled on powered hub plug in
- flash drive is back to 3.0 A on FRS hub detach
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Iaa5c3f0a6a4f41db83978bb1e1d0b54f2519abb2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692030
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To reduce code indenting, add the check for CONFIG_USB_PD_REV30 into the
pe_set_frs_enable function. Also move typec current limit setting into
the FRS enable function.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Id272c40c447c799f299fb59294c77a1603ccc1c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692028
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When there are no PD sinks requiring 3.0 A, any FRS ports which require
that much current will have FRS detection enabled. If a PD sink
requiring 3.0 A is attached, then FRS detection will be disabled on that
port again.
FRS port partners which require only USB or 1.5 A of current will always
have FRS detection enabled.
BRANCH=None
BUG=b:141690755
TEST=on volteer-based system, verify:
- FRS source partners requiring 1.5 A or less always have FRS detection
enabled
- FRS detection is disabled on detach
- FRS source partner requiring 3.0 A has FRS detection enabled if no PD
sink needing 3.0 A is present
- Plugging in a 3.0 A PD sink disables FRS detection for the 3.0 A FRS
partner
- Unplugging a 3.0 A PD sink enables FRS detection for the 3.0 A FRS
partner
- When FRS occurs on 3.0 A port with detection enabled, partner is
offered appropriate starting current in first source caps
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib067ac7c1c2f4a6e64f36aeffd1b8dde5cb93760
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676084
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Eric Herrmann <eherrmann@chromium.org>
Tested-by: Eric Herrmann <eherrmann@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Entry to the PE_SNK_Startup and PE_SRC_Startup states resets the
protocol layer, and clears the message IDs for all SOP types.
These states are entered during initial connect, hard reset, and after a
power role swap. The cable should automatically clear it's message IDs
on the initial connect (because it didn't have power) and on a hard
reset, so modify the PE policy to only send SOP' soft reset after power
role swaps.
BUG=b:179325862
BRANCH=volteer
TEST=Connect TBT loopback device, verify no SOP' soft reset is sent and
that TBT entry is successful.
TEST=Connect USB+DP monitor when EC starts as SRC/DFP and VCONN source.
Verify EC sends SOP' soft reset is sent after power role swap.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I2c133eec0e76c1ecb7b79cea94a541fdb55ee9c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691423
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, when a DUT is connected to another DUT they can enter into an
infinite loop of Vconn swapping. Remove the vconn swap counter re-set
on Accept, and only re-set the counter on new connections.
BRANCH=None
BUG=b:174334068,b:179334214
TEST=with two DUTs connected, connection is able to settle into a stable
state after swap attempts are exhuasted
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib2eec57812465efbec63220142912978c6655ba2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2678659
Tested-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL fixes a few issues with using drp_state = FORCE_SOURCE. There
were some instances where the the state was always returning to
snk_unattached without checking drp_state.
In addition, this CL allows for a board to specify a starting
drp_state when the chipset task is not defined.
BUG=b:175512794
BRANCH=None
TEST=Set drp_state as FORCE_SOURCE and verified that it attaches and
can detach, then attach in source power role.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I4c46b9aa4dfdbb073bd0bbebe8449c135034721b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2589895
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just call prl_execute_hard_reset.
BUG=b:173725284,b:179198412
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ib801c72e5082918c4449efed2d0fcdaa58d7e029
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2679991
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stored PD revs for partners should only be reset upon Detach, Hard
Reset, or Error Recovery. Don't do it when the PE enters a Startup
state, e.g. after a Power Role Swap.
BUG=b:173725284,b:179198412
TEST=make buildall
TEST=PR Swap after SOP' Discover Identity with PD 2.0 cable; subsequent
SOP' messages still PD 2.0; subsequent Enter_USB message has
correct cable speed
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I2c12287c99154fba96e4f04a76ebc48273b0bb2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676265
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: Divya Sasidharan <divya.s.sasidharan@intel.corp-partner.google.com>
Tested-by: Ayushee Shah <ayushee.shah@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a DPM request to control FRS detection enable and disable on a task.
This allows the FRS detection to be safely toggled from other tasks when
3A port balancing occurs.
BRANCH=None
BUG=b:141690755
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I41d4f4a77f536c95a8119fef0de0474f0726fbab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676083
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move DPM handling for source run and sink run into helper functions to
reduce the level of nesting for their clauses.
Additionally, allow the run state to continue when an unhandled DPM
request is received as there's no reason to exit early in that case.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I4d42d9417e155df8cff7f86016d3a6c8365675b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2680938
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the comments are out-of-sync or incorrect for this option.
Fix them along with an extra blank line at end-of-file.
BUG=none
BRANCH=none
TEST=build for volteer
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I68bc96907b61b16244e114f594adb31ed1438c50
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2677181
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check for message discard and restore DPM request if cable soft reset
doesn't send, then return to Ready to handle the incoming message.
BRANCH=None
BUG=None
TEST=connect Magolor and Madoo together repeatedly and observe the
connection is able to stabilize
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I28787f802a8279d318170a304e5aeac6abb03b75
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676925
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When booting into S0, take the current charge port into account when
deciding whether to power role swap. If the port has been selected from
the UI as a charge port, then refrain from swapping and continue to
charge from it.
BRANCH=None
BUG=b:179334214,b:179095748,b:178070314
TEST=on madoo, connect to magolor and select charging from magolor on
the UI. Go through suspend and shutdown iterations and confirm that
madoo continues to charge from magolor
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I40ef73309f75372b0a34a7542282244ff30868ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676924
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a board does not want to power role swap (ex. because it is in S5),
then do not allow the DPM request for the power role swap to be set.
This is equivalent to the logic done when a PR_SWAP message is received
by the system.
BRANCH=None
BUG=b:174726240
TEST=on madoo, plug in phone and shutdown. Verify DUT does not swap to
sourcing when in S5
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ia6684006d0de6d9f23bac8bd792c34191fabab14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676931
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On soft reset SOP', the cable's PD revision is lost causing
Thunderbolt and USB4 devices to downgrade. Hence, this patch
retains the cable revision by storing it again after a soft
reset SOP'.
BUG=b:173725284
BRANCH=None
TEST=No downgrade seen with USB4 with 100 continuous hotplugs
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Change-Id: I4498c6b397503058e5c4c2bce91e7d31960f6395
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669418
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust the timing and behavior of our sink hard resets. This allows us
to reply to partners faster after a hard reset if they take very little
time to reach vSafe0V, and also only reduces our input current limit if
Vbus actually drops. Since we may still be drawing current from a
non-PD port partner on startup, compare Vbus against the vSinkDisconnect
level rather than vSafe5V.
Additionally, this clears flags in the sink hard reset path, similar to
the source hard reset path, and removes an incorrect comment.
BRANCH=None
BUG=b:172867393,b:178615293
TEST=on drawcia, confirm hard resets as sink go well with:
- Suzy-q
- servo_v4 with charger
- BenQ monitor
- Apple 3-in-1 dongle
- Powered Dock
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I4c5633705da4716536316255834455da2b383a5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2541883
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Incoming messages may cause the PS_RDY message from a Vconn swap to be
discarded. Check for this condition and soft reset using the SOP* of the
incoming message.
BRANCH=None
BUG=b:157228506,b:174726240
TEST=on galtic, verify after reboot phone is able to charge
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ic74d490ab2c1450851b795249f2e57322461ad2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2653794
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On EC chips that support CONFIG_CHIP_DATA_IN_INIT_ROM, the code
execution RAM is smaller than flash, leaving some flash unused.
The CONFIG_CHIP_DATA_IN_INIT_ROM moves the .data section into the unused
flash area, where it is copied directly into data RAM at startup.
Add a new attribute __const_data that allows constant data objects to
link into the .data section instead of .rodata.
This saves 1600 bytes of RO and RW flash space on boards that enable
CONFIG_CHIP_DATA_IN_INIT_ROM.
delbin_npcx796fc
eldrid_npcx796fc
halvor
lindar
lingcod
magolor_legacy
malefor
metaknight_legacy
terrador
todor
trondo
voema
volteer_apmodeentry
volteer
waddledoo
BUG=none
BRANCH=none
TEST=make buildall
TEST=boot Volteer and verify USB-PD operation
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ibb97a499442bbab8185b1d07f8867a7af1e793f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2651208
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During power contract negotiation, after sending Accept, wait for
tSrcTransition before transitioning the supply and sending PS_RDY. See
PD r3.0, v2.0, Table 7-22.
BUG=b:173023378
TEST=Pass TDA.2.1.2.2 using MQP compliance tester (or at least don't
fail due to sending PS_RDY too early).
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I76e31ff5df6bfd71f78642bda25e1e8f9f590f9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2644179
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: JC Huang <j.c.huang@quanta.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the cables has been queried with PD 3.0, but the port partner
supports PD 2.0, re-discover the cable capabilities.
BUG=b:178077239
BRANCH=None
TEST=Tested with PD2.0 dock and PD3.0 cable, able to enter Thunderbolt
mode.
Signed-off-by: Ayushee Shah <ayushee.shah@intel.com>
Change-Id: I559f57a64a525a7ee0ae8744f88ec347688fe880
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643580
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds functions responsible for providing voltage and current
requested from charger.
This patch doesn't introduce any logical changes.
BUG=b:161775827
BRANCH=none
TEST=make -j buildall
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: Ib86285e4c4e6f2da3f922a8a4389e78706f1de96
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2592497
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace PD_VCONN_SWAP_DELAY with CONFIG_USBC_VCONN_SWAP_DELAY_US. This
is the approximate result of the following command, run from
platform/ec:
find . -type f -\( -name '*.c' -o -name '*.h' -\) | \
xargs sed -iE 's/PD_VCONN_SWAP_DELAY/CONFIG_USBC_VCONN_SWAP_DELAY/g'
Fix some latent formatting errors in usb_pd_protocol.c, because they
were preventing pre-upload hooks from passing.
BUG=b:144165680
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Icaf3b309c08fdcd162e960cf5dc88185016b5d2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628131
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the first BIST Test Data packet, enable BIST Test Mode if the TCPC
supports it (currently just TCPCI). While in BIST Test Mode, mask
ALERT.ReceivedSOP*MessageStatus. Unmask it when the test ends, due to
Hard Reset or to detach.
BUG=b:173023378,b:169385081,b:172709198,b:173028832,b:173028791
BUG=b:173141941,b:173142113
TEST=Complete TDA.2.1.2.2 BMC PHY RX INT REJ on volteer without running
out of Rx buffer space or watchdog timeout (still fail though)
BRANCH=firmware-volteer-13521.B-master
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I03bbc4cfacceebd0334aa814e11a16e09177a322
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2545667
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ignore BIST messages when not operating at vSafe5V. Ignore unsupported
BIST modes.
BUG=b:169385081
TEST=make buildall
BRANCH=firmware-volteer-13672.B-main
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ia7504cf0f7cf16273aa641edb364eef7e666a3ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2602720
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increased the event loop while waiting for the
response in PE_SRC_Send_Capabilities in order
to respond with the HardReset in the correct
window of time.
BUG=b:173025780
BRANCH=zork
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ia108b3d4d4f18b76da6550f406011d1ee79c2757
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639663
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After an FRS signal, the initial sink will attempt to initiate the FR
Swap AMS, and the initial source should apply SinkTxOk. If the initial
source is removed entirely, FRS will be triggered butSinkTxOk will
never be applied and this will get the initial sink state machine stuck.
So, in the case of an FRS ignore the CC voltage. After an FRS signal,
the source isn't allowed to initiate an AMS.
BUG=b:171740860
TEST=On Volteer with the PS8815, enable FRS and remove the FRS device.
Make sure we enter ErrorRecovery instead of hanging in
PE_PRS_SNK_SRC_Send_Swap
TEST=make buildall
BRANCH=none
Change-Id: I8373a76c0c19feeb909b0623a1ae2d6b0ad5fa60
Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633654
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices may reply to discovery differently if they're not yet being
offered sufficient current. Process DPM requests before running
discovery in order to get these devices into the best state for
discovery probing.
This also moves the cable soft reset DPM request up to the common DPM
request function. Otherwise, it will be considered an unhandled request
and dropped before attempting discovery.
BRANCH=volteer
BUG=b:177303467,b:177001425
TEST=verify we can reliably receive DiscoverSVIDs ACK from LaCie SSD
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I0917476c2aeb0cb9551edde3df14ddd1fd47fcab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627805
Tested-by: Utkarsh H Patel <utkarsh.h.patel@intel.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds checking for enough battery level before sending
hard reset in PE_SNK_Hard_Reset state.
There are a lot of reasons causing Policy Engine to send hard reset.
One of them is timeout in PE_SNK_Wait_For_Capabilities, which can cause
brown out if battery doesn't have enough charge
New flag PE_FLAGS_SNK_WAITING_BATT was added. This flag is set on
PE_SNK_Hard_Reset entry, and can be cleared when battery
reaches minimal charge (see pe_update_waiting_batt_flag()).
Original fix implemented for TCPMv1 stack:
https://chromium-review.googlesource.com/1565147
https://chromium-review.googlesource.com/1980406
BUG=b:160243307, b:161775827
BRANCH=none
TEST=Get board with bad battery (eg. bobba). Flash ToT EC.
Discharge battery to cutoff. Plug charger. Make sure that
PD goes to PE_SRC_Disabled after PE_SNK_Wait_For_Capabilities
tries to send hard reset (switches to PE_SNK_Hard_Reset).
PD should remain in PE_SRC_Disabled state until battery
reaches minimal charge.
It might be necessary to limit PD_CAPS_COUNT (in my case to 10)
in ServoV4 (used as charger) to actually trigger timeout.
During test EC RO have to report that PD comm is disabled, in
other words system must be locked.
When battery charges quickly, it is allowed to do 'sysjump RW'.
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: I63ac93a093d921f41bea2af93de8325783056962
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600985
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
USB PD specification states that we can send Hard Reset on DPM
request regardless of state we are currently in (see USB PD
Specification 8.3.3.3.8).
This patch implements changing state to PE_SNK_Hard_Reset or
PE_SRC_Hard_Reset depending on current power role when requested
by DPM. Currently, requests can come only from PD console.
BUG=b:160243307
BRANCH=none
TEST=Connect DUT to ServoV4. Configure ServoV4 as source using 'cc src'
or 'cc srcdts'. Issue Hard Reset from DUT EC console using
'pd 0 hard'. Check if transition PE_SNK_Ready -> PE_SNK_Hard_Reset
occurs. Configure ServoV4 as sink using 'cc pdsnk' or
'cc pdsnkdts'. Issue Hard Reset from DUT EC console using
'pd 0 hard'. Check if transition PE_SRC_Ready -> PE_SRC_Hard_Reset
occurs.
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: I46a0446ff9dd417bab19fd13d71aa11e8aa83d04
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2618002
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:152058087
BRANCH=volteer
TEST=Connect to monitor as SRC, verify SOP' soft reset sent after VCONN
swap and before SOP' DiscoveryIdentity.
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: If8b52ed033b1ee78d61958d6c9bf5d7ff01bc8dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2601143
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|