| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename tcpm_transmit_type to tcpm_sop_type to reflect that it can be
used for Rx as well. Describe it in comments. This prepares to
consolidate enum pd_msg_type into this enum.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ife97d4ad51c48f2e832b94e007954919e236a309
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104290
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some PD chips have integrated SRC FET and control the SRC/SINK FET
from GPIOs hence cleaned up the code to enable Power Path Control
from either from PD or from Power MUX.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I77f96b681fd2e5fca35bce425e4bd5ec87d5ccfd
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2828980
Reviewed-by: Aseda Aboagye <aaboagye@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For boards which use Vbus ADCs, add a VBUS_REMOVED check level. The
level for VBUS_PRESENT should be used in any locations looking for
"Vbus is present" on transition, but in order to correctly detect
disconnection with a load on Vbus, VBUS_REMOVED (vSinkDisconnect)
is required. TODO statements have been added for places where work
will be needed to support vSinkDisconnectPD in the future.
For boards detecting Vbus through an external chip, the levels will
likely be indistinguishable due to the chips setting a lower threshold
for disconnect than for connection.
Unit test code has also been added to encourage new Vbus levels to be
added to the mock, and remind developers to update all locations using
the vbus_level enum.
BRANCH=None
BUG=b:168831161
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I04014ce54ec162dd9c62f545126d921c6d880741
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2436580
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to ensure that the previous Rd or Rp has been held long enough
before we transition into hardware auto toggle otherwise the first
toggle might be too short and violate the DRP timing spec
BRANCH=none
BUG=b:163095971
TEST=Verify on scope
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I92e9f5ca7dbca2b347e438d774551cc11476195b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343176
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver function to set FRS enable only exists if
CONFIG_USB_PD_FRS_PPC is enabled, so we must also make its callers
conditional in the same way. For consistency, also revise the TCPC
FRS code paths to be conditional.
BUG=b:146393213
BRANCH=None
TEST=make buildall
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: I3fb14c711dd2abdf6ef77d469b2103f37daac182
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276125
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old declaration with void is incompatible with the use of
tcpci_tcpc_fast_role_swap_enable in the one driver that currently
implements that function, causing build failure when
CONFIG_USB_PC_FRS_TCPC is enabled and using the nct38xx TCPC driver.
Because the underlying function may fail, walk up the stack and make all
users capable of failure as well (however the top level user currently
ignores the result).
BUG=b:146393213
BRANCH=None
TEST=make buildall
Change-Id: Ib8cabf4a435731ed804a3cc4696dfea97eef3c98
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276124
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original get_chip_info() returns a point of point to the chip_info.
This way helps to cache the chip_info to a static variable and the
function just returns the pointer to the static variable.
This static variable has a race condition on the PS8805 chip. The PS8805
chip returns a different PID when the firmware is corrupted, i.e. 0x8803
instead of 0x8805. The !live case fixes the PID, by modifying the static
variable directly. When another task calls the same function for the
live case, the static variable is modified and has a race condition.
This change fixes the issue by changing the get_chip_info() parameter to
a point of the chip_info. The caller has to allocate a buffer in the
stack and pass the address to the function. For the !live case, the
function copies the cache value from the static variable to the buffer.
So the static variable doesn't have a race condition.
BRANCH=None
BUG=b:159588335
TEST=Used ectool to check the PD chip PID 0x8805 (was 0x8803).
localhost ~ # ectool pdchipinfo 1
vendor_id: 0x1da0
product_id: 0x8805
device_id: 0x1
fw_version: 0x0
min_req_fw_version: 0x0
Change-Id: Ic24615af77ea58016d286480572d2a282c4fa09a
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2264477
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compilation error when building with CONFIG_COMMON_RUNTIME disabled.
BUG=none
BRANCH=none
TEST=make buildall succeeds
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: I19b4f620588a393f01ae97a3997d3fe6dd1cc009
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2203064
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In TCPCI Rev2, the extended status register was
added that allows Safe0V to be known. For other
platforms, this code will revert back to using
Safe0V will be !Safe5V, as it currently is.
BUG=none
BRANCH=none
TEST=verify USB functionality
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ifd6b5c3bb45ff076fd0d3b4b0bb687ccf6f4c91b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2199037
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is to add near future functionality to allow
not only the current PRESENT range check but to add
Save0V range checking as well, for platforms that
allow for this. This just lays the framework and
is functionally equivalent.
BUG=none
BRANCH=none
TEST=verify basic USB functionality
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I1eb3411bc3aa9b792c9b97799e1721e5cb229f64
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2199036
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that state between test cases is getting fully cleared between
different test cases
BRANCH=none
BUG=b:153071799
TEST=child CL pass when commenting various tests out without issue
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I7628d580c5c16bc404694a93ecc2418241d432b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131050
Reviewed-by: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also update prints functionality to make tests easier
to see what is happening
BRANCH=none
BUG=b:153071799
TEST=use mock in child CL
Change-Id: Ia9cfeeff220e3255e6fc0aa41f0795df3b1920e4
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131049
Commit-Queue: LaMont Jones <lamontjones@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TCPCIr2 had an issue with setting CC coming out of DRP
that if the polarity was not retained that the connection
dropped back to OPEN. Unfortunately this change broke
many of the other TCPCI implementations. I am working
on a different method of dealing with coming out of DRP
and this is no longer needed.
BUG=none
BRANCH=none
TEST=verify USB-C is working
Change-Id: Ifa8f26d417df2f5d5f41a23fbf7e6f9129031e94
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2056968
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move header files for mocks into the include/mocks folder. These header
files aren't just private to the common/mock implementation as the test/
files also need access to these defines.
BRANCH=none
BUG=none
TEST=buildall
Change-Id: I25d03d194ab46b7665f54175979577aa90af814f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2039038
Commit-Queue: Craig Hesling <hesling@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
BRANCH=none
BUG=none
TEST=use them in CL stack with tests
Change-Id: I8a970dc65f7395264a8c536977951ae305e9c24f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868831
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|