| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Vivaldi is a new keyboard that allows individual boards to have
additional or different top row keys and/or to reorder those keys.
The primary agenda of vivaldi is to allow customization of the top
row keys. However, as a secondary objective, it also allows coreboot
to send a keymap to the kernel, for only the keys that are actually
present on the keyboard.
As part of enabling vivaldi, another feature that get enabled
is to start sending action codes instead of function codes for the top
row of the keyboard.
go/vivaldi-prd
go/vivaldi-design
go/vivaldi-fw-design
With this patch, things remain unchanged for any boards that do not provide
board_set_vivaldi_keybd_config(). For boards that do provide it:
* EC begins to send action scancodes instead of function scancodes for the
top row when top row keys are pressed.
* EC responds to an EC command from the coreboot, that asks for the
layout for the keyboard. Coreboot uses this to expose corresponding
keycodes to the kernel.
BUG=b:146501925
TEST=Check on Jinlon the (new) expected scancodes are output from EC.
BRANCH=firmware-hatch-12672.B
Signed-off-by: Rajat Jain <rajatja@google.com>
Change-Id: I1f45ce6eee138a984f8d4caef1ec76c9538dd30b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2135566
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revamps pe_attempt_port_discovery to be called from the ready run
states, try once to be DFP and Vconn source, and moves timer check and
discovery calls into this function.
Note that nDiscoverIdentityCount and DiscoverIdentityTimer are only
applicable to cable plugs, though here the discover identity timer is
also repurposed to space out requests to a BUSY partner.
Long term, the policy decisions regarding our data and vconn role will
be moved out into their own file in order to support allowing the AP to
override EC default policies.
BRANCH=None
BUG=b:152417977
TEST=on kindred running TCPMv2, ensured we could complete discovery and
enter mode DP mode (when applicable) with:
- PD 2.0 Apple dongle, with and without external power
- PD 2.0 Acer hub
- PD 2.0 charger which would DR swap
- PD 3.0 Cable Matters hub, with and without external power
- PD 3.0 Hoo Too hub, with and without external power
Ensured we did not attempt discovery with:
- PD 2.0 charger which won't DR swap
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I9c049690a87f3fc0eca3b9d2c85128470cbb2a91
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2130478
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configures the TCPMv2 PE test to build the alternate mode code.
BRANCH=None
BUG=None
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I4cb5824875e2a4b4e93fbae0a4d8762195b987f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2137258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add pd console commands that enables the device
to work with PD FAFT. Other pd commands such as
bist, vdm and ping will be added in another CL.
BUG=b:151481791
BUG=chromium:1021235
BRANCH=none
TEST=make -j buildall
manual:
Verified that system:
pd tryscr 0 - did not trysrc
pd tryscr 1 - did trysrc
pd tryscr 2 - normal trysrc operation
pd 0 tx - started as snk
pd 0 charger - started as src
pd 0 dev 5 - charged at 5V
pd 0 dev 12 - charged at 12V
pd 0 dev 15 - charged at 15V
pd 0 dev 20 - charged at 20V
pd 0 disable - pd was disabled
pd 0 enable - pd was enabled
pd 0 soft - sent soft reset
pd 0 hard - sent hard reset
pd 0 dualrole off - stayed in src and switched to snk on disconnect
pd 0 dualrole on - toggled from snk to src and vice versa
pd 0 dualrole sink - was a sink only
pd 0 dualrole source - was a source only
pd 0 dualrole freeze - stayed in current power role and switched
to snk on disconnect
pd 0 swap power - initiated a power role swap
pd 0 swap vconn - initiated a vconn swap
pd 0 swap data - initiated a data role swap
Change-Id: Id1542001c0e52d1d5bfbc5b9cb826b9a204e5b2e
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1962506
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add polarity tests
Add try source tests
Add no try source test
BRANCH=none
BUG=b:153071799
TEST=all unit tests pass
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ib3d8b6afa2e8fdd80642e026deb4322e2c3e1e9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2132872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move pd_ function that belong in PE layer to PE layer. Remove the extra
pe_ layer.
- Remove unnecessary PE and Vconn ifdef guards in TC layer
- Remove unused print_dev_info function
- Move host commands in TC layer to host command file
- Move RW hash stuff from TC to PE, since this only has to do with VDO
(Which is a PE layer thing)
- Removed dependency for tc_drp test on usbc_fake as we don't really
need it anymore once we don't pull in the PRL and PE layers anymore
(based on previously landed CLs)
BRANCH=none
BUG=b:153071799
TEST=everything still builds and passes tests
Change-Id: Id1d1efa291c3525f57bc26af9fddda6ddace1b58
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2132871
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a PD explicit contract is negotiated in RO,
the contract is maintained while performing a
sysjump to RW. This is done by serializing
the PD Power, Data, and VCONN Roles, along with
the explicit contract flag. After jumping to RW,
deserialization is performed by restoring the
power roles and setting the explicit contract
flag.
BUG=b:152350558,b:152027807,b:152967274
BRANCH=none
TEST=make -j buildall
Manual tests:
Used total phase to verify that charging voltage
was maintained across sysjump from RO to RW and
that DP was reestablished when a dock was used.
Tested that Kohaku booted properly without a
battery and a charger connected to port 0. This
test was repeated with a charger connected to port 1.
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I349c41f2279e9af9830564d44ac73ad8435f1f80
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2119131
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looking at code, we only test one port, so make the test
defines match the test code
BRANCH=none
BUG=none
TEST=all tests pass
Change-Id: I0b793425e20678173f3ec52fdcff4567f0b8ccb4
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131047
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reorganize how the TCPMv2 options are used
- Update documentation in config.h and bring TCPMv2 items close together
- Make the layer defines consistent on how they include compilation
units
- Update tests to account for how files are included now
- Remove unnecessary defines in board.h since they are default on
BRANCH=none
BUG=none
TEST=builds
Change-Id: I91fca51648912deef44db23492ecc7775b2e3062
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120063
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:148528713
BRANCH=none
TEST=Verified on TCPMV1 and TCPMv2, able to get correct
cable characteristics.
Change-Id: I812b21c87661952bf4e86acaa194d4b136371594
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2051628
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The three USB device configurations describe more than just the Type-C
layer, so remove the _TYPEC part within the define. This is also in
preparation to change how the usbc build.mk includes files.
This was performed with the following commands:
$ git grep --name-only CONFIG_USB_TYPEC_DRP_ACC_TRYSRC | xargs perl -i
-ple 's/CONFIG_USB_TYPEC_DRP_ACC_TRYSRC/CONFIG_USB_DRP_ACC_TRYSRC/g'
$ git grep --name-only CONFIG_USB_TYPEC_CTVPD | xargs perl -i -ple
's/CONFIG_USB_TYPEC_CTVPD/CONFIG_USB_CTVPD/g'
$ git grep --name-only CONFIG_USB_TYPEC_VPD | xargs perl -i -ple
's/CONFIG_USB_TYPEC_VPD/CONFIG_USB_VPD/g'
BRANCH=none
BUG=none
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I4deab784b7c3479cffd3dee7fb3ea3c8a9d6081c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121193
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If PD is not in a connected state, the previous approach was to enable
PD comm on TX Phy reset and then disable it later (the SM_RUN case in
prl_run()). In this short period of time, the TCPC wil respond GoodCRC
to the PD message and the PD partner will go forward to the next state
that messes up its state machine and causes an unexpected hard reset.
We should not enable PD comm if not in a connected state.
BRANCH=None
BUG=b:151159750
TEST=Tested on Trogdor, with extra patches to fix the DP discovery
and separate the Tx and Rx buffers. Unplugged battery and plugged
a 20V charger and verified it boot fine, no reboot loop.
TEST=Built chocodile_vpdmcu image successfully.
TEST=make runtests -j
Change-Id: Ic819787f1ec0085abdded3bab8ecbcb813495408
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2107882
Reviewed-by: Sam Hurst <shurst@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
curve25519 comes from boringssl as well, move it to that directory.
See git log for which boringssl commit the implementation comes from,
and changes that were applied.
BRANCH=none
BUG=chromium:884905
TEST=make buildall -j, which also include basic tests.
Change-Id: I1dee4795009c1e2034a181f6083d1f9445c87d41
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1600946
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use separate buffers for transmit and reception of PD
messages. This prevents the potential corruption of PD
messages waiting to be transmitted when an unexpected PD
message is received
BUG=b:150637227
BUG=b:149662829
BRANCH=none
TEST=make -j buildall
Manual tests:
Tested hatch device and powered dock. Used total phase
to verify that transmitted messages were not corrupted
by unexpected message reception.
Change-Id: I12df471f59fb7510e642bb92b769ccbddd79c84f
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2103253
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement online calibration for accelerometers and fire a new
MKBP event when a new calibration value is computed.
TEST=Added new unit tests
BRANCH=None
BUG=b:138303429,chromium:1023858
Change-Id: I31ec7164be0d8c7dac210a1ac4b94ec9ecd6a60a
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2012847
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:149350081
BRANCH=none
TEST=build all, and emerged ec related packages for host and octopus.
$ make buildall -j
$ cros_workon --host list
chromeos-base/chromeos-cr50-dev
chromeos-base/chromeos-ec
chromeos-base/chromeos-ec-headers
chromeos-base/ec-devutils
chromeos-base/ec-utils
chromeos-base/ec-utils-test
dev-util/hdctools
$ sudo emerge chromeos-cr50-dev -j
$ sudo emerge chromeos-ec -j
$ sudo emerge chromeos-ec-headers -j
$ sudo emerge ec-devutils -j
$ sudo emerge ec-utils -j
$ sudo emerge ec-utils-test -j
$ sudo emerge hdctools -j
$ cros_workon-octopus list
chromeos-base/chromeos-ec
chromeos-base/chromeos-ec-headers
chromeos-base/ec-devutils
chromeos-base/ec-utils
chromeos-base/ec-utils-test
dev-util/hdctools
$ sudo emerge-octopus chromeos-ec -j
$ sudo emerge-octopus chromeos-ec-headers -j
$ sudo emerge-octopus ec-devutils -j
$ sudo emerge-octopus ec-utils -j
$ sudo emerge-octopus ec-utils-test -j
$ sudo emerge-octopus hdctools -j
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Change-Id: If751b26b0635b0021c077338e96eaa8e8dcf17a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080631
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes cr50 related files from platform/ec.
BUG=b:149350081
BRANCH=none
TEST=$ make buildall -j
$ cros_workon --host list
chromeos-base/chromeos-cr50-dev
chromeos-base/chromeos-ec
chromeos-base/chromeos-ec-headers
chromeos-base/ec-devutils
chromeos-base/ec-utils
chromeos-base/ec-utils-test
dev-util/hdctools
$ sudo emerge chromeos-cr50-dev -j
$ sudo emerge chromeos-ec -j
$ sudo emerge chromeos-ec-headers -j
$ sudo emerge ec-devutils -j
$ sudo emerge ec-utils -j
$ sudo emerge ec-utils-test -j
$ sudo emerge hdctools -j
$ cros_workon-octopus list
chromeos-base/chromeos-ec
chromeos-base/chromeos-ec-headers
chromeos-base/ec-devutils
chromeos-base/ec-utils
chromeos-base/ec-utils-test
dev-util/hdctools
$ sudo emerge-octopus chromeos-ec -j
$ sudo emerge-octopus chromeos-ec-headers -j
$ sudo emerge-octopus ec-devutils -j
$ sudo emerge-octopus ec-utils -j
$ sudo emerge-octopus ec-utils-test -j
$ sudo emerge-octopus hdctools -j
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Change-Id: Ifa3a037fff17177204ce1a9b88474490fb9be3ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2083659
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes retimers appear as generic muxes. By allowing a
chain of muxes they can be stacked up to the new configurations
that zork requires and will continue to work as they did before
on configurations that only have a single mux.
The code used to have two different arrays, 1) muxes and 2)
retimers. On one of the zork configurations the processor
MUX stopped being the primary mux and the retimer took its
place. In a different configuration of that same platform
it left the primary and secondary alone but the mux_set
FLIP operation had to be ignored. Since the same
interfaces needed to be available for both it stopped making
sense to have two different structures and two different
methods of handling them. This consolodates the two into
one.
The platforms that do not have retimers, this change will
not make any difference. For platforms like zork, it will
remove the retimers and make them chained muxes. So
testing on trembyle makes sense to verify,
BUG=b:147593660
BRANCH=none
TEST=verify USB still works on trembyle
Change-Id: I286cf1e302f9bd3dd7e81098ec08514a2a009fe3
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2066794
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"enum ec_current_image" is exposed in ec_commands.h (and used by non-EC
code, such as biod).
We also have an "enum system_image_copy_t" that is the exact same thing
(though has a few more definitions).
A followup CL (I714b6bd8c0d7192386404c25a831e38438fa5238) adds the
"sysinfo" host command, so we want to be able to expose all the
potential image variants. Rather than maintain two enums that can
potentially get out of sync, unify the code to use a single enum. We
choose to keep the "enum ec_current_image", since external code depends
on it.
To verify that this change results in no changes to the generated
binaries:
./util/compare_build.sh --board all
BRANCH=none
BUG=b:146447208
TEST=./util/compare_build.sh --board=all
Change-Id: I13776bc3fd6e6ad635980476a35571c52b1767ac
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2036599
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current use of the PD Config Flags are a bit confusing and
has been changed to the following:
The CONFIG_USB_POWER_DELIVERY flag is used to enable and disable
the TCPMv1 and TCPMv2 stacks. And when CONFIG_USB_POWER_DELIVERY
is enabled, one of the following must be enabled:
CONFIG_USB_PD_TCPMV1 - legacy power delivery state machine
CONFIG_USB_PD_TCPMV2 - current power delivery state machine
BUG=b:149993808
BRANCH=none
TEST=make -j buildall
Change-Id: Ie3f8615a75b15b4f1c703f57f3db9e152a471238
Signed-off-by: Sam Hurst <shurst@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2068519
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix potential bug when iterating over FIFO entries for commit.
This bug can manifest when non-timestamp/non-data entries are
inserted into the FIFO.
TEST=Added unit tests
BRANCH=None
BUG=b:138303429,chromium:1023858
Change-Id: I64855db2141f7ad6aafb3f3a84632a1dabef11f4
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2012846
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the code that handles caching the temperature
(which is the first step in online calibration) into a new
compilational unit.
TEST=None
BRANCH=None
BUG=b:138303429,chromium:1023858
Change-Id: Ib1fe3d2234dc2436e2bbfd4febd22196e5cdafef
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906340
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:148528713
BRANCH=none
TEST=make buildall -j
Change-Id: I6bd6b5875a322ca4ba6d77a4cfc96a72630e5f5c
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2051220
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:148528713
BRANCH=none
TEST=make buildall -j
Change-Id: Id7b0d10396300c4bd5b8253b7ce77c1fe59c9bc8
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2051216
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes cr50 or TPM2 related test cases from fuzz and
test directory, so that buildall or chromeos-ec package won't check
them. Those test cases are already moved to cr50_stab branch.
BUG=b:149243259
BRANCH=none
TEST=ran 'make buildall -j' and
'sudo 'FEATURES=test' 'PKGDIR=/build/eve/test-packages' \
-- /mnt/host/source/chromite/bin/parallel_emerge \
'--sysroot=/build/eve' '--jobs=10' chromeos-ec
Change-Id: Ie6f7c8622fe3e488758a814dc99ddf4587ffd973
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2047935
Reviewed-by: Allen Webb <allenwebb@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Document why we need the MT flag as a compiler option
BRANCH=none
BUG=none
TEST=builds
Change-Id: Id6bceacc3b0af110f79d9f727ded595950fa2afb
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2044358
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements the hybrid accelerometer calibration
algorithm described in
https://drive.google.com/corp/drive/u/0/folders/13k8AWvVkCg8KUr1HhD2qv6_ob1ixgCbE
1. Waits until the device is still
2. Adds a still sample to an orientation accumulator
- If the new sample is close to an existing one, they're
merged.
- If the new sample is unique, it is added to the list of
orientations in a FIFO manner (may be evicting an older
sample).
- Once enough orientations have been gathered, run the
kasa algorithm.
- The kasa algorithm should yield a radius that's near 1g,
since all the samples were added when still. If this isn't
the case, we fall back on newton's method (which takes
longer).
BUG=b:138303429,chromium:1023858
BRANCH=None
TEST=buildall with new unit tests
Change-Id: I98bb0d365017d8a916b008c7c0c263345a9cddac
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879716
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using separate test binaries helps to prevent state from one set of
tests accidentally leaking into other tests. Ideally all unit tests
should be completely independent. Since there's a lot of global state in
the fpsensor code the separate test binaries should help prevent the
state from leaking across tests as we continue to add more.
Also, by having a 1:1 correspondence between test binaries and test
files, it's clearer what file (and functionality) each set of tests is
targeting.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I937a5ffebfe61aa711efbbc2467d15d514fcfbae
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1832748
Commit-Queue: Yicheng Li <yichengli@chromium.org>
Tested-by: Yicheng Li <yichengli@chromium.org>
Reviewed-by: Yicheng Li <yichengli@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There seems to be some odd interaction between ccache version 3.7.6
and the set of command line options passed to gcc by the EC makefile,
as a result the generated dependency files are wrong, the target file
name is missing the path.
The -MT command line option makes sure that the correct target file
name is generated. Had to make similar changes in
../../third_party/{cryptoc,tpm2} Makefiles.
No need to change extra/usb_updater/Makefile as it puts .o files in
the same directory where .c files are.
BRANCH=all
BUG=b:148943341
TEST=verified that relevant object files are rebuilt when an .h file
is touched.
Also, with companion changes in cryptoc and tpm2 trees verified
that all generated my 'make buildall' .d files have proper target
values (including path), apart froom files in extra/usb_udater,
which place .o files in the same directory with .c files.
Change-Id: I22dfad94c112582230a2b6b60289e029a382d822
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2039988
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add implementation of Newton's method for sphere fitting.
BUG=b:137758297,chromium:1023858
TEST=Added new unit tests
BRANCH=None
Change-Id: Ic78ec4f8a8c2f57ddfa1d5220861bf5c06981ad8
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869730
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done via:
* queue_begin(q) gets an iterator to the start of the list
* queue_next(q, &it) updates the iterator to the next element
** Once the iterator reaches the end, ptr will be NULL.
** If the queue was modified between the _begin and _next calls
queue_next will terminate the iterator (set the ptr to NULL).
BUG=None
TEST=New unit tests
BRANCH=None
Change-Id: I643f544ed91bafac8e8b4c85545d4070f2d82610
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879715
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sensors add offset to raw value.
kaza_compute calculate the bias (the hard iron) and it has to be remove
from the raw value.
Invert the vector in magnetometer calibration code.
Fixes: 994af4a65fa7e ("common: mag_cal: update magnetometer to leverage kasa")
BUG=b:144027014
BRANCH=none
TEST=Check that after successful online calibration, value reported to
the host are closer to 0 than before calibration.
Change-Id: I6cfd711c82287b1c877912e85d84d2725b063cb2
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2034675
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding simple unit test that ensures that a deferred call can call
itself and won't repeat forever. I thought this might be a problem, but
it wasn't. We might as well add this code as a unit test.
BRANCH=none
BUG=none
TEST=test passes
Change-Id: Ie9791606e4a401821594df122481f22d87eadbbd
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2025073
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:142911453
BRANCH=none
TEST=make buildall -j
Change-Id: Iadb75b9b187a0444c445c2641ec71d592cf4ac92
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2013228
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update magnetometer calibration algorithm to leverage
the new kasa standalone code.
BUG=b:138303429,chromium:1023858
TEST=added unit test
BRANCH=None
Change-Id: I5c0403b66d9fe7c2925b2ec6244cf9e32ad5ea5f
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1931464
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:145796172
BRANCH=none
TEST=make buildall -j
Change-Id: Ie4ffaf208745764262931501f0dff77b525a4e59
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2017569
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:142911453
BRANCH=none
TEST=make buildall -j
Change-Id: If9d902ef77da7d56a123c0c78b1ebbcd0d95bc3b
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2008301
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:142911453
BRANCH=none
TEST=make buildall -j
Change-Id: Ia858db061811c58a14b2525d17d6abdc35ea6fa7
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2008299
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an implementation of the kasa sphere fit algorithm
adapted from AOSP.
BUG=b:138303429,chromium:1023858
TEST=Added unit tests
BRANCH=None
Change-Id: I8194bfaddbb7c57a2b20a1917c91f7c78707e685
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867226
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building on-device unit test binaries, the static array in
test/aes.c were not address-aligned after being linked into the
final binary. This causes "runtest" to emit an exception on device
as the MCU tries to load from the address of the static array which
is unaligned address. Enforce alignment to avoid the error.
BRANCH=nocturne
BUG=b:146059307
TEST=make BOARD=nucleo-h743zi tests -j
# Flash build/nucleo-h743zi/test-aes.bin
# Connect to UARD console
runtest
Change-Id: I91e8523fa0f13bf89baa609cded36e111e466972
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2006708
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:147249926, b:146623068
BRANCH=none
TEST=make buildall -j
Change-Id: Ibb24bdad4e9ec24b02106c05ca5fe51269efcb1c
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1990425
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assuming online calibration is enabled, and the driver implements
the get_temp function. When a driver stages data, if this is the
first staged sample, read the current internal sensor temperature
and cache it (will later be used in commit_data()).
BUG=b:138303429,chromium:1023858
BRANCH=None
TEST=buildall
Change-Id: I8e5404e628d3e8ded7c2d75b1b5cbac8166e97aa
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867225
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the tc versions were doing the same thing as the pd version
so removed the duplication
BUG=b:147290482,b:147314832
BRANCH=none
TEST=make buildall -j
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Change-Id: Iaa48dcd65e3a6c325b0ae2cca33e629fec6e33c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1993861
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pd_get_role in the TCPMv1 stack meant pd_get_power_role.
pd_get_role in the TCPMv2 stack meant pd_get_data_role.
This CL will clean that up and make them the correct naming.
pd_get_power_role will also return an enum pd_power_role
type instead of an int.
BUG=b:147290482
BRANCH=none
TEST=make buildall -j
Change-Id: I73ee465401ccd050c2bd151f2fc043a59d95e079
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1991844
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of potential callers that care if there is a battery,
but for boards that don't support batteries (chromeboxes) we can let
them skip implementing this stub.
Tests default to battery present, but they can provide their own
per-test implementation if desired.
Some PD battery presence checks have been disabled when battery support
is disabled; these are irrelevant when there is no battery, and they
cause linking failures because they depend on both the charge manager
and battery presence.
BUG=b:146504182
BRANCH=none
TEST=buildall
Change-Id: Ifad6a9e356c8ac2146b09bc83b359a7c55adc1a7
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980099
Reviewed-by: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bloonchipper (aka hatch_fp aka dragonclaw) has a voltage divider that
can be used to select the sensor and the transport type.
Supported designs:
* Dragonclaw rev 0.2 (green with Google logo):
go/dragonclaw-schematic-rev-0.2
* Hatch reference v3.0:
go/hatch-schematic-rev-3.0
The selection lines are connected to ADC inputs, so a future change will
use the ADC to allow more than two transports or sensors.
BRANCH=none
BUG=b:147113851
TEST=flash dragonclaw rev 0.2 and view console output
Change-Id: If2e4b150d34cfe41477be528c70e1645043d4d82
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986322
Reviewed-by: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to support NIST ACVP testing, new commands to provide access to
HMAC implementations (software, and hardware accelerated HMAC SHA-256)
with CRYPTO_TEST_SETUP added:
- Software HMAC (_cpri_StartHMAC) TPM implementation
- dcrypto HMAC (DCRYPTO_HMAC_SHA256_init)
Updated hash_test.py to support different hash algorithms for hash
and HMAC, added HMAC tests.
BRANCH=cr50
TEST=make BOARD=cr50 CRYPTO_TEST=1 -j && test/tpm_test/tpmtest.py
BUG=b:138578319
Change-Id: I57da2f27734fc7e5dbc896d75c5f8b2ed60e3b18
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1854885
Reviewed-by: Gurleen Grewal <gurleengrewal@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Gurleen Grewal <gurleengrewal@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kodama's bitbang driver fails randomly, and there's no way to notify
kernel side that bitbang read failed (batt->flags does not propagate
into kernel).
Thus, if any value in batt_params is bad, replace it with a cached
good value, to make sure we never send random numbers to kernel side.
BUG=b:144195782
TEST=Modify smart battery driver to make sb_read has 50% fail rate,
and monitor /sys/class/power_supply/sbs*/*, make sure the bad values
does not observable in kernel.
BRANCH=kukui
Change-Id: Idf4691eb743f1ef785593b308b8f07a34e5ea642
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1943637
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|