| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The boringssl doesn't include the TRNG implementation, we need our own
CRYPTO_sysrand.
BUG=b:248508087
TEST=make V=1 BOARD=bloonchipper -j
TEST=./test/run_device_tests.py --board bloonchipper -t boringssl_crypto
=> PASS
TEST=./test/run_device_tests.py --board dartmonkey -t boringssl_crypto
=> PASS
Change-Id: I3136bcc96e09f674278bf338297d7bc0576e174c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4496289
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Yi Chou <yich@google.com>
Tested-by: Yi Chou <yich@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of commit 6fa9cc0c7484be908010a6acdd6547d686234e34
Original change's description:
> Use third_party boringssl for AES
>
> The original boringssl copy is not maintainable in the long term.
> We should build it from the upstream version.
>
> BUG=b:248508087, b:273639386
> TEST=make runhosttests -j
> TEST=make buildall -j
> BRANCH=none
>
> Signed-off-by: Yi Chou <yich@google.com>
> Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087
> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
BUG=b:248508087, b:273639386
TEST=make runhosttests -j
TEST=make buildall -j
BRANCH=none
Force-Relevant-Builds: all
Change-Id: I2bf9e2157eec030ec3526939846a5706b1954afd
Signed-off-by: Yi Chou <yich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4464659
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0164feeebaad4abc7deb510c57ca0707dd2babb1.
Reason for revert: Breaks postsubmit b/279174496
Original change's description:
> Reland "Use third_party boringssl for AES"
>
> This is a reland of commit 6fa9cc0c7484be908010a6acdd6547d686234e34
>
> Original change's description:
> > Use third_party boringssl for AES
> >
> > The original boringssl copy is not maintainable in the long term.
> > We should build it from the upstream version.
> >
> > BUG=b:248508087, b:273639386
> > TEST=make runhosttests -j
> > TEST=make buildall -j
> > BRANCH=none
> >
> > Signed-off-by: Yi Chou <yich@google.com>
> > Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087
> > Reviewed-by: Tom Hughes <tomhughes@chromium.org>
>
> BUG=b:248508087, b:273639386
> TEST=make runhosttests -j
> TEST=make buildall -j
> BRANCH=none
>
> Signed-off-by: Yi Chou <yich@google.com>
> Cq-Depend: chromium:4439330
> Change-Id: Ic22faafacaf331a1376d094a37c6efe271326d0b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439569
> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Bug: b:248508087, b:273639386
Change-Id: I5cfb826bff10df55bbadf76c6cc2062bc761a6d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4456117
Commit-Queue: Jonathon Murphy <jpmurphy@google.com>
Commit-Queue: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Auto-Submit: Jonathon Murphy <jpmurphy@google.com>
Reviewed-by: Jonathon Murphy <jpmurphy@google.com>
Tested-by: Jonathon Murphy <jpmurphy@google.com>
Owners-Override: Jonathon Murphy <jpmurphy@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of commit 6fa9cc0c7484be908010a6acdd6547d686234e34
Original change's description:
> Use third_party boringssl for AES
>
> The original boringssl copy is not maintainable in the long term.
> We should build it from the upstream version.
>
> BUG=b:248508087, b:273639386
> TEST=make runhosttests -j
> TEST=make buildall -j
> BRANCH=none
>
> Signed-off-by: Yi Chou <yich@google.com>
> Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087
> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
BUG=b:248508087, b:273639386
TEST=make runhosttests -j
TEST=make buildall -j
BRANCH=none
Signed-off-by: Yi Chou <yich@google.com>
Cq-Depend: chromium:4439330
Change-Id: Ic22faafacaf331a1376d094a37c6efe271326d0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439569
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6fa9cc0c7484be908010a6acdd6547d686234e34.
Reason for revert: break the build of chromeos-base/chromeos-fpmcu-unittests.
Original change's description:
> Use third_party boringssl for AES
>
> The original boringssl copy is not maintainable in the long term.
> We should build it from the upstream version.
>
> BUG=b:248508087, b:273639386
> TEST=make runhosttests -j
> TEST=make buildall -j
> BRANCH=none
>
> Signed-off-by: Yi Chou <yich@google.com>
> Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087
> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Bug: b:248508087, b:273639386
Change-Id: Ie6acdab0be298625229b69eb9ac3ff5fd196387c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439430
Commit-Queue: Yi Chou <yich@google.com>
Owners-Override: Yi Chou <yich@google.com>
Reviewed-by: Howard Yang <hcyang@google.com>
Tested-by: Yi Chou <yich@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original boringssl copy is not maintainable in the long term.
We should build it from the upstream version.
BUG=b:248508087, b:273639386
TEST=make runhosttests -j
TEST=make buildall -j
BRANCH=none
Signed-off-by: Yi Chou <yich@google.com>
Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> pd 1 epr enter
EPR enter requested
> [130.434040 C1: PE_SNK_Send_EPR_Mode_Entry]
[130.434852 C1: DPM Waiting]
[130.445641 C1: PE_SNK_EPR_Mode_Entry_Wait_For_Response]
[130.501005 C1: Entered EPR]
[130.501378 C1: PE_SNK_Wait_for_Capabilities]
[130.518489 C1: PE_SNK_Evaluate_Capability]
[130.519076 C1: PE_SNK_Select_Capability]
C1: Req [8] 28000mV 5000mA
> pd 1 state
Port C1 CC1, Enable - Role: SNK-UFP TC State: Attached.SNK, Flags: 0x1000
PE State: PE_SNK_Ready, Flags: 0x41000201 EPR
> pd 1 epr exit
EPR exit requested
[222.511037 C1: Request SPR before EPR exit]
[222.511515 C1: PE_SNK_Select_Capability]
C1: Req [4] 20000mV 5000mA
BUG=b:257320026
BRANCH=None
TEST=Agah. Run make run-usb_pd_console.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: If7566e1dc4de790180e44b49893622e1e71269da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4296999
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include GMR tablet sensor in testing to verify that they are not
on the way to lid calculation.
Check we enter/exit tablet mode on lid angle,
check GMR does not send incorrect information, trigger uncessary tablet
mode changes.
BUG=b:267680317, b:270994196
BRANCH=trogdor, dedede, many more potentially.
TEST=Check with 'make run-motion_lid'
Change-Id: I96d5f386dd0a3e0c207485e58d5ccdbe2d1f025f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4338480
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When sensors stop working, at least one accelerometer, the EC can not
calculate the lid angle anymore.
Add hook to the lid opening event, to be able to get out out of tablet
mode when lid close.
Move scope of the variables that keep track of the lid angle deduced
from the GMR sensors.
BUG=b:267680317, b:270994196
BRANCH=trogdor, dedede, many more potentially.
TEST=Added unit tests.
Change-Id: Iaf7cc0d27fba32b3c8616a0674a47af815921ac4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4338479
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Discovery can be a separate feature from DFP mode entry, as any data
role can run discovery in PD 3.0. Additionally, boards may want to
enable discovery separate from full EC mode entry so put this feature
behind a new CONFIG indicating its scope.
BRANCH=None
BUG=b:266714542
LOW_COVERAGE_REASON=only moving functions to a new file, b/267964449
filed to track expanding the testing of these functions later
TEST=./twister -T ./zephyr/test, run on both nipperkin (ECOS) and skyrim
(zephyr) to confirm cable and device identities are being reported
correctly
Change-Id: I84a08eaf4775ed427112d62777ff38f8a914a750
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4211268
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CONFIG option to gate DP mode support within the embedded
controller. By default, turn the DP module off if the AP is controlling
the VDMs for mode entry.
For modules which do not implement the DP config option, the header now
defines stubs for DP specific functions to use. This obsoletes some of
the stub functions from older unit tests.
BRANCH=None
BUG=b:266714542
TEST=on skyrim, compile with DP disabled and observe 3162 bytes saved,
run zmake compare-builds -a and util/compare_build.sh -b all, ./twister
-T ./zephyr/test passes (note: ECOS compare builds needed all assert
statements removed to pass, as they grab the line number, zephyr compare
builds passed before HC mode entry was revamped)
Change-Id: I9619eb5d34e418f1972c4bf16d4cf9c8d551eac5
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4201454
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Default input current" is not a very clear name, so rename this option to
better express its use as a default value that is set in the charger.
This is made possible by splitting other uses into
CHARGER_MIN_INPUT_CURRENT_LIMIT, making the only use for
CHARGER_INPUT_CURRENT be as a default.
BUG=b:163093572
TEST=make buildall; zmake build -a
BRANCH=none
LOW_COVERAGE_REASON=isl9241 and sm5803 currently lack emulators
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: Ia9c1df9061825b15477466e85343afeb2a371288
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025404
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a type-c state machine framework for the Device Policy
Manager (dpm) layer of USB-PD. This CL is focused just on adding the
state machine policy and minimizing any changes in the existing DPM
support functions.
Because the DPM is no longer being called directly from the PE layer,
an interlock mechanism is used to control when the DPM state machine
will take any actions.
This CL also renames include/usb_pd_dpm.h to include/usb_pd_dpm_sm.h
to be consistent with include file naming for the other TCPMv2 layer
state machine include files.
BUG=b:194504052
BRANCH=none
TEST=Verified that mode entry/exit is successful for DP, TBT, and
USB4 on Voxel.
ectool typeccontrol <port> 0 -> exit mode
ectool typeccontrol <port> 2 0 -> DP
ectool typeccontrol <port> 2 1 -> TBT
ectool typeccontrol <port> 2 2 -> USB4
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I196d342b031b96874d354610182be79eac613d00
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3922467
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not include LID_ANGLE when the test is not exercising that code.
Include math library whenever it is needed.
BUG=None
BRANCH=none
TEST=make -j buildall passes.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I3e0fe478e7970155cc9d2b8cae590ae5ce7b4392
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3984437
Reviewed-by: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a test for ARM that verifies that exception_panic() correctly
preserves the registers we expect it to.
BRANCH=none
BUG=b:172020503
TEST=./test/run_device_tests.py --board bloonchipper -t panic
TEST=make BOARD=discovery-stm32f072 test-panic
openocd -c "set BOARD discovery-stm32f072" \
-c "set BUILD_DIR build/discovery-stm32f072/panic" \
-f board/discovery-stm32f072/openocd-flash.cfg
screen /dev/ttyUSB1
> runtest
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I592483c922652df8a4fb2b0a0a5fb57b1480b8b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3288761
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The EC_CMD_PD_HOST_EVENT_STATUS retrieved and cleared a bit-array of
host event statuses that could never actually be set via public APIs,
i.e. the pd_host_send_event() function because the aforementioned
function was moved to a different source file.
Move the pd_host_send_event() back to usb_pd_host_cmd.c so it can
actually update the static event status bit-array. Validate this change
by testing the host command status attribute in its response after
invoking pd_send_host_event().
Also allow the EC_CMD_PD_HOST_EVENT_STATUS to be compiled in test builds
and instead disable it for the one incompatible test (charge ramp).
BRANCH=none
BUG=b:236075275
BUG=b:249574372
TEST=twister --clobber -i -s zephyr/test/drivers/drivers.host_cmd
TEST=make runhosttests -j
TEST=make BOARD=fusb307bgevb -j
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I548fc6c6eed3a2eab6e2c9b7d8862f4cc0786c12
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3924807
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that GCC can enable optimization per function using the
optimize("O3") attribute, but clang cannot. So, we need to enable
optimization in the build system per file.
If we want to look for alternatives to always_memset,
checkout libsodium's sodium_memzero function in the
sodium/utils.c file of commit c281249fd8f2d00c9a76e4686f95ff4783951040.
BRANCH=none
BUG=b:176500425
TEST=make run-always_memset V=1
TEST=CC=clang make run-always_memset V=1
Change-Id: I57ec10a558fe294587d9b777a558b80d30b9ec28
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3902571
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Andrea Grandi <agrandi@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests for rollback_get_secret when the get_latest_rollback fails,
returns a trivial secret, and returns a real secret.
BRANCH=None
BUG=b:242720910
TEST=make run-rollback_secret
TEST=make runhosttests
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Change-Id: I992daf7af3e80dcc4b20412037f792e125866af7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3900486
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Bobby Casey <bobbycasey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verify that the boundary conditions are met for the PD get and write
log entry commands as well as verify that the log entries are added
to the log FIFO.
BRANCH=none
BUG=b:236075606
TEST=twister -s zephyr/test/drivers/driver.host_cmd
Signed-off-by: Yuval Peress <peress@google.com>
Change-Id: Ifb246ad6e964dac25d3f70868cb031d80585d99a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863942
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unit tests for all the AUX port functionality.
BUG=b:242886255
BRANCH=none
TEST=run unit tests
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Iac8ca466c90a3dadc6aa175037c1ba5663063f0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3840654
Reviewed-by: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure the build of AES and AES-GCM for crypto benchmark tests
BUG=b:235476822
BRANCH=none
TEST=none
Cq-Depend: chrome-internal:4847231
Signed-off-by: Andrea Grandi <agrandi@google.com>
Change-Id: I63ed76b21a33548e294389b4a14857e7409fb704
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3736984
Reviewed-by: Bobby Casey <bobbycasey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Based on the driver written by Tim Wawrzynczak.)
This patch adds Nvidia GPU D-Notify driver. It asserts a GPIO, sends a
host event, and sets D-Notify level in shared memory when power
availability changes (i.e. AC plug/unplug, battery charge/discharge).
BUG=b:216485035
BRANCH=None
TEST=make run-nvidia_gpu && make buildall
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I231619157fe03fb357882540ffa34b4d48fba253
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3716794
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I2fcae6523dc95785c881f73376d1967293142f43
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730547
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the number of USB PD ports and verify if the initialization of
pd_timers and bitwise operators work well in this scenario.
BUG=b:208435177
TEST=make runhosttests
BRANCH=none
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: If495bd6260ffe6a6304ee60dce6a9663410aaf8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3586435
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Dawid Niedzwiecki <dawidn@google.com>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces a RGB keyboard task and a IS31FL3743B driver.
BUG=b:203664745, b:213921985, b:199995751
BRANCH=None
TEST=Vell and unit test.
Change-Id: Iefc1714efca9a4dc70db5a024d1ab020ec7b69b6
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3342506
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests to make sure the pd console is working properly
BUG=b:151481791
BRANCH=none
TEST=make run-usb_pd_console
make -j buildall
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I0c7f150049ebda580686a45a909ca4af1ee32ee9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3413652
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the implementation of EC_CMD_USB_PD_POWER_INFO in test builds.
Add a mock implementation of ADCs.
BRANCH=none
BUG=b:215389861
TEST=make buildall
TEST=zmake configure --test test-drivers
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: Icdef25cfb8e01e62b680af87683ca1dd34f04542
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3399877
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nearly every board uses LPM with its TCPCs, so configure this for our
TC DRP unit test as well.
BRANCH=None
BUG=b:195393479
TEST=make -j run-usb_typec_drp_acc_trysrc
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ic53074aad299cd350a8f8a52cf87edaf2ebdce94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3276663
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:198722643, b:203031618
BRANCH=None
TEST=buildall
Change-Id: I595da56412f4d30684b00d1138f7e2339c7f5204
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3227372
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basic checks to verify setting/clearing bits
for all of the currently allocated PD timers
works properly
BUG=b:141363146
BRANCH=none
TEST=make run-usb_pd_timer
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I22e237d367a3b3cb28c4a9d88d6c5c375f3b44cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3176394
Tested-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deep charge inspection is a battery protection mechanism: If
battery voltage is lower than 6V, deep charge for more than 30 minutes
The battery voltage is still lower than 6V, the system will stop charging
BRANCH=trogdor
BUG=b:198226241
TEST=run-sbs_charging_v2
Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com>
Change-Id: I89adf7809992b9e71b232ad1129af1407acf05a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3151037
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the config option, CONFIG_EEPROM_CBI_WP. It is to be
defined when the EC directly controls the CBI EEPROM WP signal. The EC
will set the WP according to the result of `system_is_locked()`. Note
that once the WP is set, the EC must be reset via EC_RST_ODL in order
for the WP to become unset. This is enabled by the accompanying
hardware.
BUG=b:181769483
BRANCH=None
TEST=`make -j buildall`
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: If490594ab4dd24af98119b01299215b997913b66
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3046412
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds CONFIG_KEYBOARD_STRICT_DEBOUNCE. It makes the keyboard
debouncer register a key stroke after deounce is done.
This CL also adds a unit test.
BUG=b:193505909
BRANCH=Dedede
TEST=make run-kb_scan_strict
TEST=Blipper
Change-Id: Ia380657021035930afab5cafffa8cc2edd7ff475
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044405
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of features that may cause a board to need sink
capabilities (3.0 A port balancing, FRS, or AP host commands). However,
other boards may not need these and the added traffic can increase the
liklihood of collisions on PD 2.0 connections.
BRANCH=None
BUG=b:192051705
TEST=connect honeybuns to TCPMv1 DUT and verify DP alternate mode can be
reliably entered
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I70e2f360a9a45eee85ed555cb0165937c01a661a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3016407
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new config CONFIG_USB_PD_ONLY_FIXED_PDOS. If that config is
enabled, ignore non-FIXED PDOs in both the console command `ada_srccaps`
and also when selecting the preferred PDO for a voltage.
Enable CONFIG_USB_PD_ONLY_FIXED_PDOS for servo_v4 and servo_v4p1, since
they don't expose non-fixed PDO in their srccaps. Without this change,
there is a risk that the "best" PDO for a given voltage will be
non-FIXED and then that voltage just won't be supported at all.
BRANCH=none
BUG=b:178484932
TEST=added
Change-Id: I0d1187ca372120c7fe21d627e1b82b59f6334add
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809353
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the capablility to explicity set a CTVPDs VDO
current.
BUG=b:165934405
BRANCH=none
TEST=make runtests
Verified that returned VDO from chocodile_vpdmcu was correct.
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I2292024986fa89b228b56678d61d1aef2866c817
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748427
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Sam Hurst <shurst@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Almost every relevant board copy-pastes 5000 us. Make that the default
and get rid of the redundant definitions. This is the approximate result
of this command:
find . -type f -name *.h | xargs sed -i -E \
'/#define CONFIG_USBC_VCONN_SWAP_DELAY_US[[:space:]]+5000[[:space:]]/d'
BUG=b:144165680
TEST=make buildall
BRANCH=none
Change-Id: Ife86f9752971abcd7ab5ad5a5e607eb2ccbde2ba
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628132
Reviewed-by: Aseda Aboagye <aaboagye@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Send the PE BIST requests with inappropriate VBUS voltages or
inappropriate BIST modes. Verify that the PE ignores them.
BUG=b:173023378,b:169385081,b:172709198,b:173028832,b:173028791
BUG=b:173141941,b:173142113
TEST=run-usb_pe_drp passes
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I240ff6746debcf49934419940ab4f49b54e2b7e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639585
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used
throughout. The issue is that the units don't match. In
Zephyr the value is in KiB instead of bytes. This refactor
simply renames CONFIG_FLASH_SIZE in platform/ec to include
the unit (via _BYTES).
BRANCH=none
BUG=b:174873770
TEST=make buildall
be generated by the build instead of per board
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I0bc4d3f9d7dfebf91d4b7045055440587be7a71e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615625
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Iaa6888d2e0d861d64b2747856465789304dde414
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613724
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the DPM will be handling source-out decisions for TCPMv2,
remove references to its old configuration options from TCPMv2 boards in
order to avoid any confusion as to what code is running now. Also
remove the charge manager notifications of sink attach/detach since the
policy is being centralized into the DPM.
Note that the previous configuration options only ever allocated one 3.0
A port, and so the default number of 3.0 A ports has been set to 1.
BRANCH=None
BUG=b:168862110,b:141690755
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie452e3da32b04226503539daa67b6b9f4a58aa58
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597431
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove test/usb_tcpmv2_tcpci.c to avoid duplication with
test/usb_tcpmv2_compliance.c
BUG=none
BRANCH=none
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ie62d0f7e2cc30c3086e03103a43dede5515006b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597598
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:175144677
BRANCH=none
TEST=make run-usb_tcpmv2_compliance
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I629e2811b2cba5aa9821d8c855e039a6cfaa32ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2595816
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retry twice when operating at PD 3.0 and thrice when operating at PD
2.0. Provide a TCPM-agnostic interface to get the number of retries.
BUG=b:173025773,b:173025737
TEST=Pass TD.PD.LL.E3 Soft Reset Usage and TD.PD.LL.E4 Hard Reset Usage
BRANCH=firmware-volteer-13521.B-master
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I422447718f1bfc9a9d4f8ffc5b284723a5332833
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578201
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows the `accelspoof` ec command to also
override the calibration data (bypassing the calibration
module). This config flag should be used when testing
layers above the EC (kernel and up)'s handling of the
calibration values.
BRANCH=none
BUG=none
TEST=Built on eve and added unit tests.
TEST=make run-online_calibration_spoof -j
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I4735b9613c152af5559661a91565b05635d6495e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2494986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Put sensors in forced mode, since interrupts are not generated in test
mode.
Remove unnecessary task wakeup, since motion sense are sending them.
Fix comments and remove empty code.
BUG=b:170703322
BRANCH=kukui
TEST=unittest
Change-Id: Ic9096998a29cebeb47bed5cc2c148b7743f6c78f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523295
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in support for crc8 used in CBI, I2C, and other
applications within platform/ec
BRANCH=none
BUG=b:168032589
TEST=add unit test for platform/ec and zephyr based
CRC8 approaches and verify they both pass.
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I9b6112cb83dab81a44a1ac020d4efb1b7bb1df5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532692
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|