| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They take up flash space, and should not be super useful.
BRANCH=none
BUG=chromium:988303
TEST=make buildall before and after
Save 64-100 bytes on most boards
Change-Id: I8eafb19b971f0823c0b0b704e680e063aa23dbd8
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723610
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit d31dd57e48b58171d86666007a712a1af5dd3f8c)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731140
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No need to use up flash space if the command is not supported
anyway.
BRANCH=none
BUG=chromium:988303
TEST=make buildall -j
TEST=make BOARD=jerry -j32, see that there is still 156 bytes free
Save 64-128 bytes on most boards.
Change-Id: Ib0494969840dfc4c11d236a2932f5de688ad6d14
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1723611
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 7c34f1301021a998d41b7970201c79cfe846d199)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1730968
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a new host command, EC_CMD_MKBP_WAKE_MASK which allows
the host to retrieve and set the MKBP host event wake mask along with
the MKBP event wake mask. An accompanying console command,
`mkbpwakemask` is present as well to view and adjust the wake masks. In
order to use this host command, one of the following EC CONFIG_* options
must be enabled in the EC: CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK or
CONFIG_MKBP_EVENT_WAKEUP_MASK.
BUG=chromium:786721
BRANCH=None
TEST=Deploy new version of ectool and EC firmware on nocturne, verify
that ectool can view and adjust the wake masks. Verify that masks can
be adjusted via the console command as well.
Change-Id: I01a389ccd571328220eadd19ded4167dea8c6faa
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1700004
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
None of the existing i2c addresses in the EC code base are less than 0x08
and those addresses are reserved by the i2c and SMBus specification.
BRANCH=none
BUG=b:138156666
TEST=i2c bus scan with a smart battery doesn't "misbehave" any more and
other devices can be detected properly.
Change-Id: I561b082c4c7e3df7caaa33b6ef6ad467dabbd5a5
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1715326
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For TCS3400, performing calibration is not just a one-shot event:
The RBG sensor stays in calibration mode: returns raw value in R, G, B
space.
When out of calibration, it returns light information in X, Y and Z
space.
BUG=b:124512628
BRANCH=hatch,flapjack
TEST=unit test
Change-Id: I6766907054c8e79a3cbcb629ef91a0967ea0780a
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1702543
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new before/after test functions to be used for clean-up and
tear-down of tests.
Add new asserting functions:
- TEST_EQ ensures that two values are equal
- TEST_NE ensures that two values are not equal
- TEST_BITS_SET ensures that a value contains all bits in mask
- TEST_BITS_CLEARED ensures that a value doesn't contain any
bits in mask
The benefit of these is that unlike TEST_ASSERT they will
also print the values when the assersion is wrong.
BRANCH=None
BUG=b:137758297
TEST=None yet
Change-Id: I2f305ef34e541c289f22c6596f53ee5cd977c7a8
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704165
Reviewed-by: Enrico Granata <egranata@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the common code to provide a friendly interface to control the
IOs of IO expander. It adopts a similar concept to GPIO.
1. Define the IO expander IO in gpio.inc by the format:
IOEX(name, EXPIN(ioex, port, offset), flags)
- name: the name of this IO pin
- EXPIN(ioex, port, offset)
- ioex: the IO expander port (defined in board.c) this IO
pin belongs to.
- port: the port number in the IO expander chip.
- offset: the bit offset in the port above.
- flags: the same as the flags of GPIO.
2. The following APIs are supported:
1. ioex_get_flags_by_mask
2. ioex_set_flags_by_mask
3. ioex_get_flags
4. ioex_set_flags
5. ioex_get_level
6. ioex_set_level
7. ioex_init
3. The following console commands are supported:
1. ioexget [IO_EXPANDER_PIN_NAME]
2. ioexset IO_EXPANDER_PIN_NAME 0/1
BRANCH=none
BUG=none
TEST=No error for "make buildall"
TEST=Apply this and related CLs, manually test each API, make sure each
function works correctly with IO expander chip (NCT3807/NCT3808.)
Change-Id: I79c9813abccc67d5554e2ceb5c119dcf549b7dce
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1657858
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: CH Lin <chlin56@nuvoton.com>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: CH Lin <chlin56@nuvoton.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
report_no_payload_failure() function gets an input 'failure type',
but it always marks failure type as 'inconsistent flash content'
instead of that input.
BUG=None
BRANCH=cr50, cr50-mp
TEST=none
Change-Id: I5bac69478416eeabf735faf5333f5f7eaa98b54e
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1715910
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The extentions were added to make the compiler perform most
of the verification that the conversion was being done correctly
to remove 8bit addressing as the standard I2C/SPI address type.
Now that the compiler has verified the code, the extra
extentions are being removed
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
TEST=verify sensor functionality on arcada_ish
Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Semantics of renew field in EC_CMD_USB_PD_CHIP_INFO is changing as
follows:
0 -> Return hard-coded info for Vendor ID/Product ID and cached info for
the Firmware Version
1 -> Return the live chip info for Vendor ID/Product ID/Firmware Version
Also rename the 'renew' field to 'live' to match the new semantics.
BUG=b:128820536,b:119046668
BRANCH=None
TEST=make -j buildall; Boot to ChromeOS.
Change-Id: Ie3dd022336b0be5c9728bb0ebabef32b7a6b5d57
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1617893
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Auto-Submit: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opt for 7bit slave addresses in EC code. If 8bit is
expected by a driver, make it local and show this in
the naming.
Use __7b, __7bf and __8b as name extensions for i2c/spi
addresses used in the EC codebase. __7b indicates a
7bit address by itself. __7bf indicates a 7bit address
with optional flags attached. __8b indicates a 8bit
address by itself.
Allow space for 10bit addresses, even though this is
not currently being used by any of our attached
devices.
These extensions are for verification purposes only and
will be removed in the last pass of this ticket. I want
to make sure the variable names reflect the type to help
eliminate future 7/8/7-flags confusion.
BUG=chromium:971296
BRANCH=none
TEST=make buildall -j
Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch addresses a few issues with the current formatter.
The major points are as follows:
1. Cannot specify precision 0 (truncate all) for string or hexdump
2. Forced safe precision for malformed strings
3. No padding when using hexdump
4. Bad error EC_ERROR_INVAL in vsnprintf
5. Documentation errors
For (1), no piece of code explicitly sets the precision to 0 in
order to invoke the default behavior, which is currently no
precision limit.
You can check using the following grep line:
grep -rI '%[\*0-9]\{0,20\}\.0\{1,20\}[a-zA-Z]'
However, there are many cases where the precision is used to limit
the character output (as it should be).
grep -rI '%[\*0-9]\{0,20\}\.[\*0-9]\{1,20\}[a-zA-Z]'
There are many more instances that use variable precision without
checking if the precision is zero. One of which is the following:
crrev.com/4a4e2c71a0f6aaa50e0728922f84a7d54c14380a/test/host_command_fuzz.c#116
https://clusterfuzz.com/testcase-detail/5699023975088128
Our current implementation will insert ERROR and stop processing,
if a precision of zero is detected when using the hexdump flag.
This results in a badly formatted console line or runtime string,
when the intended behavior would be to simply read no bytes.
In the aforementioned fuzzer case, outputting ERROR triggers
a false positive.
Our printf should handle explicit zero precision similar to
stdlib's printf, which means truncating all the way to zero
positions, if specified.
For (2), our current implementation uses strlen to identify the
length of the input string, regardless of the set precision.
Since this is an embedded platform, we should use strnlen to
impose safe limits, when a precision is specified.
For (3), our implementation should support padding and adjusting
of all formatter types, since that is a primary feature of a
printf formatter.
The remaining commented code highlights odd behavior that should
be fixed at some point, but is not critical.
BUG=chromium:974084
TEST=Checked for any format lines that rely on a set precision of 0
grep -rI '%[\*0-9]\{0,20\}\.[\*0-9]\{1,20\}[a-zA-Z]'
TEST=make run-printf V=1
BRANCH=none
Change-Id: I897c53cce20a701fcbe8fb9572eb878817525cc3
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1659835
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the EC could notify the AP that it had entered into
DisplayPort Alternate mode by sending a MODE_CHANGE host event.
However, there was no mechanism to disable that functionality if desired
without effecting the other MODE_CHANGE events (i.e. - base
attach/detach). By changing the DisplayPort Alternate mode entry to an
MKBP event, we can have more granularity and only affect this single
event.
- This commit adds a new MKBP event, EC_MKBP_EVENT_DP_ALT_MODE_ENTERED.
- The commit also changes the DP AltMode entry notification from sending
a MODE_CHANGE host event to this new MKBP event.
BUG=chromium:786721
BRANCH=None
TEST=Build and flash nocturne, verify that system still wakes up on
DisplayPort Alternate Mode entry.
Change-Id: Ia5f294b26701c3c98c9b7f948fc693d26234c835
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685787
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MKBP was recently refactored to offer choice in the MKBP notification
method. However, if a board is using a GPIO to notify the AP of a MKBP
event, and the AP cannot wake from the GPIO, the MKBP event cannot wake
the system up from suspend as is. This commit simply adds a new config
option, CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT such that MKBP events can
wake the system from suspend. Note that the board will have to add MKBP
events to the host event sleep mask in coreboot. Typically on ARM
devices, EC_INT_L is already a wake pin, but on Intel devices it is not;
there's actually a different pin, PCH_WAKE_L which is set via sending a
host event and wakes the system.
BUG=b:136272898,chromium:786721
BRANCH=None
TEST=Enable config option on nocturne, flash nocturne, suspend DUT,
verify that MKBP events can wake the AP.
Change-Id: If5026bfe3efacbc051f99a180e061c6fd679ce5a
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685786
Reviewed-by: Jett Rink <jettrink@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
crbug.com/982442 requests a way for developers to enable tracing of
i2c commands when debugging. This adds a new debug feature, the
i2ctrace command, which provides that. The command is guarded by
CONFIG_I2C_DEBUG.
BUG=chromium:982442
BRANCH=none
TEST=enabled CONFIG_I2C_DEBUG on arcada_ish, made sure that command
functioned as it says on the tin
Change-Id: I9c762271237cbf131e5ef7c0f605c89af4f209fd
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699347
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_SMBUS is not used. Cleaning up the code by
removing this.
Added a comment to document the removal and why. This will
give a way to find the code if we ever needed to bring it back
BUG=chromium:982316
BRANCH=none
TEST=make buildall
Change-Id: I40703a95bc849538e1aee32f6f96beab811285bd
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704279
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EAR (extended address register) is used to access addresses above
16MiB when 3-byte address mode is used. These two functions allow to
write to and read from EAR to set up what addresses to access in
3-byte mode. For example, for a 64MiB EEPROM:
EAR value Addresses to access
0 0x0000000 - 0x0FFFFFF
1 0x1000000 - 0x1FFFFFF
2 0x2000000 - 0x2FFFFFF
3 0x3000000 - 0x3FFFFFF
BUG=b:132252340
BRANCH=none
TEST=manual
Testing:
1. Writing to EAR returns successfully.
2. Writing different values to EAR, verify that accessing EERPOM
in 3-byte mode is to the correct address, e.g., when EAR=2,
accessing 0x0FFFFFF is actually to 0x2FFFFFF.
Change-Id: I2a8bde7fc4b9069afc80a81042fb47359bffa015
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688150
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Pai Peng <paipeng@google.com>
Commit-Queue: Pai Peng <paipeng@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no room in the flash for both dcrypto tests and the TPM
library. Let's disable TPM function (and not link the library) when
the image is compiled with dcrypto tests included.
BRANCH=cr50, cr50-mp
BUG=b:137659935
TEST=verified that there is plenty of room for tests now:
$ make BOARD=cr50 -j -k CRYPTO_TEST=1 CR50_DEV=1
.
.
.
*** 8124 bytes in flash and 61564 bytes in RAM still ... in cr50 RO ***
*** 66100 bytes in flash and 6000 bytes in RAM still ... in cr50 RW ***
- building without CRYPTO_TEST=1 still produces a functional Cr50
image;
- when building with CRYPTO_TEST=1, the version string reflects it:
$ strings build/cr50/ec.bin | grep cr50_v | head -1
DBG/CT/cr50_v2.0.1776-46b015f6a
- CCD of the images built with crypto test enabled is fully
functional, in particular USB updates are operational.
Change-Id: Iae91ca36dc203301ac423fe048fc67eb44ef5de6
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704608
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looking at where the non-standard %T printf modifier is used in EC
codebase, the majority is cases where CPRINTS could have been used
instead of CPRINTF. This is a somewhat-mechanical refactor of these
cases, which will make implementing a standard printf easier.
BUG=chromium:984041
BRANCH=none
TEST=buildall
Change-Id: I75ea0be261bfbfa50fb850a0a37fe2ca6ab67cb9
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1703128
Reviewed-by: Evan Green <evgreen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a new CONFIG_* option, CONFIG_MKBP_EVENT_WAKEUP_MASK.
This allows a board to specify which MKBP events are allowed to wake the
system when it is in suspend.
BUG=b:136282898,chromium:786721
BRANCH=None
TEST=With some other code, flash nocturne, suspend DUT, verify that only
the MKBP events in the CONFIG_MKBP_EVENT_WAKEUP_MASK wake the system up.
Change-Id: Ib4d04418aacab209d0e26703500df119924090b7
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685785
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The updated name is more is better aligned with EC codebase use of
CONFIG_ variables.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I52a35e33debb2cab41c009dbb8938614a810baef
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688134
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:124996507
TEST=In hatch_fp and nocturne_fp console with CONFIG_RWSIG_JUMP_TIMEOUT
increased to large value and console_task stack size increased to
4096:
> rollbackinfo
rollback minimum version: 0
RW rollback version: 0
rollback 0: 00000000 00000000 0b112233 [00..00] *
rollback 1: ffffffff ffffffff ffffffff [ff..ff]
> rollbackupdate 1
> rollbackinfo
rollback minimum version: 1
RW rollback version: 0
rollback 0: 00000000 00000000 0b112233 [00..00]
rollback 1: 00000001 00000001 0b112233 [00..00] *
> rollbackaddent 1234
> rollbackinfo
rollback minimum version: 1
RW rollback version: 0
rollback 0: 00000002 00000001 0b112233 [e5..8c] *
rollback 1: 00000001 00000001 0b112233 [00..00]
TEST=test_that --board=nocturne <IP> firmware_Fingerprint.ObeysRollback
firmware_Fingerprint.ObeysRollback [ PASSED ]
firmware_Fingerprint.ObeysRollback/firmware_Fingerprint [ PASSED ]
Change-Id: I90b524138ca1125e2c1b62936b9f6fbe00e957d4
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1681379
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The chargen command sends continuous stream of characters to the
console (UART console in case of EC).
The stream follows a pattern where the value of each next character is
the value of the previous character + 1, while staying in the ASCII
range of 0..9A..Za..Z
This allows to create tests which validate console output by verifying
that no characters in the received sequence were lost.
BRANCH=none
BUG=b:38448364
TEST=Enabled the command for bobba EC board, and verified that the
chargen works on both EC and AP on an Octopus device
Change-Id: I9701bb493b0454de4cb4baa4784ab645b33a415f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1554198
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_MKBP_WAKEUP_MASK is a bit confusing and is wrongly named. The
comment stated that "With this option, we can define the MKBP wakeup
events in this mask (as a white list) in board level, those evets allow
to interrupt AP during S3.". However, these events are NOT MKBP events
at all but are instead host events. This commit tries to clear things
up by renaming CONFIG_MKBP_WAKEUP_MASK to
CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK to better show that these events are
in fact host events.
BUG=b:136282898
BRANCH=None
TEST=`make -j buildall`
Change-Id: I42beadec8217435fd30e679ccf52d784a8ef99a0
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685784
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a new clause to the SNK_DISCOVERY state to
prevent reset timers from starting when a battery is reporting below a
configured level, which indicates the point at which the battery is
capable of withstanding the potential loss of Vbus.
Once the battery has charged enough, a timer for soft reset will begin
to trigger PD negotiation to start over if it hasn't been able to
complete.
BUG=b:128935567
BRANCH=octopus
TEST=verified hard reset doesn't occur on grabbiter when system is locked
and coming back from battery cutoff without enough battery, verified
soft followed by hard resets after the battery had charged
Change-Id: Ib885d2b55acacad7ef1375572b0e6d243e639bdf
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1565147
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a check for chipset state to prevent the console message
"can't read any temp sensors!" from being displayed when the AP is in
G3. It is likely that temp sensors are tied to a rail that's not up in
the G3 state.
BUG=b:123900860
BRANCH=Master
TEST=Put the AP in G3 and verified that the console message is no
longer displayed.
Change-Id: Iee8549b8d2425bbc42972d704ebc931bbe6c2690
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679041
Tested-by: Scott Collyer <scollyer@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Auto-Submit: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we get too many interrupts too fast, then we will starve the rest of
the EC. Disable an overactive port for 5 seconds.
BRANCH=none
BUG=b:134702480,b:128701054
TEST=7-magic hub no longer watch dog resets phaser port 0, HDMI dongle
plugged into port 1 still able to function while port 0 is periodically
suspending
Change-Id: Ic2d13ecc64990994ffc8e3fb68537aa909657745
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1650484
Tested-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To aid in system level UART console performance testing a test
function needs to know when the UART console buffer is full. This
patch provides an API for that.
BRANCH=none
BUG=b:38448364
TEST=verified proper operation of the chargen CLI command which uses
this API.
Change-Id: I5fbc6cf4031a5077c91cd4bb85ab6f4dfb18821e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679710
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds checks to handle unexpected chip ID sizes in
get_rma_device_id() to make sure we always end up with deterministic
device ID and handle possible errors.
BRANCH=none
BUG=b:136091350
TEST=Verify that RSU Device ID reported through vNVRAM that uses this
new method mathes the same ID calculated from device ID in G2FA
certificate. See CL:1677238 for the exact method.
Change-Id: I288ef84d8fdc164df6b6b6c3a350c754a418be0a
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1678252
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL extracts get_rma_device_id() that can be used by rma_auth and
other cr50 components.
BRANCH=none
BUG=b:136091350
TEST=Verify that RSU Device ID reported through vNVRAM that uses this
new method mathes the same ID calculated from device ID in G2FA
certificate. See CL:1677238 for the exact method.
Change-Id: I08f58dbd8f838f1e595601ec4532792acda62428
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1677237
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a panic that should never happen. If there was a bug to make the
EC go down that code path, it seems better to log and error about motion
sense than take down the entire system with an EC panic.
BRANCH=none
TEST=builds
BUG=none
Change-Id: I6231b0b2bf14f9bcb3701040d0844f765d5637ad
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1678254
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Used 'git grep' to fix the following misspelled words across the
codebase:
* woud
* setion
* cleand
* independantly
* dedup
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I95905c56221034cf3f9d286755d7e0c07f8c58b6
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1678246
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the other console commands have help descriptions except for the
fingerprint sensor commands.
BRANCH=none
BUG=none
TEST="help list" in hatch_fp console
Change-Id: I601c7e49a28693f4b7f4344a6030febb87c2ae20
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1674808
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old link just redirects to source code on github, which is not the
source that we build fmap from.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I013032a1a1c71c238393f23bf5798134cc2d53a2
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1674052
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the charge limit is set repeatedly even when the ramping is
stable.
This patch makes chg_ramp_task sleep until
chg_ramp_charge_supplier_change and skip board_set_charge_limit if
ramping is stable.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/131284131,b/36468002
BRANCH=none
TEST=buildall
Change-Id: I701ffaf149627582bf7bcb4660420d4f9438ad94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1650217
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Sean Abraham <seanabraham@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a config option, CONFIG_HWTIMER_64BIT, which when enabled
expects the chip implementation to define __hw_clock_source_read64 and
__hw_clock_source_set64. This allows for support of native 64-bit
hardware clock when available on hardware instead of a rollover
interrupt style.
BUG=chromium:976804
BRANCH=none
TEST=made implementation of 64-bit hardware timer for ISH (child CL),
and working great
Change-Id: Idb2c3bb8f804e6c83a33901c953ddd5f1ae89784
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1668055
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Console commands return different error code types than host commands.
When the host command return value is returned for a console command,
the error message that is printed on the console is wrong, which is
confusing.
BRANCH=none
BUG=chromium:978078
TEST="syslock" in hatch FP console so system_is_locked returns true
"fpcapture" in hatch FP console => Access Denied
"fpenroll" in hatch FP console => Access Denied
Change-Id: I18dbc093011743d4a9469eb5843c1464496bdd53
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1674049
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fix applies to both the console command and the host (when
switching to FP_MODE_ENROLL_SESSION).
BRANCH=nocturne
BUG=b:124773209
TEST="fpenroll" multiple times in FP console
=> verify we get error after 5 attempts
TEST=ectool --name=cros_fp fpmode enroll
=> verify we get error after 5 attempts
TEST=make buildall -j
Change-Id: I4e1d50f5e72d65d707e1889dee3036334f07f1eb
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1650036
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactoring allows us to call fp_command_mode from the debug
console commands and ensure that we're testing the same underlying code
path that the host commands use.
BRANCH=nocturne
BUG=b:124773209
TEST="fpenroll" in hatch FP console
"fpmatch" in hatch FP console
"fpclear" in hatch FP console
TEST=On nocturne:
flash_fp_mcu ec.bin
Enroll fingerprint via UI, lock/unlock, Remove fingerprint via UI
Change-Id: I5e1e314c7f1d67dc663795cafe751545516e9f89
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652285
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit simply adds a notification that can be called when the
device enters DisplayPort Alternate mode or a DP attention VDM is
received. Calling the notification will send a MODE_CHANGE host event
which may wake the AP.
BUG=chromium:786721
BRANCH=firmware-nocturne-10984.B
TEST=With other patches, flash nocturne; suspend DUT, plug in powered
charge through hub, verify DUT wakes up.
Change-Id: Iaa221e69060a7d1015f7c1e2f6f053e6810a674a
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1666366
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Intel SoC needs which USB2/3 ports are assigned to which Type-C ports.
This patch adds USB2 and USB3 port numbers to tcpc_config_t so that
EC_CMD_LOCATE_CHIP can return it to the host.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/134614710
BRANCH=none
TEST=TBD
Change-Id: I10206dde4d71ac6e40a71c65333db4edd3c81e7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1669880
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently our USB PD protocol stack has "low power mode" tightly coupled
with PD_STATE_DRP_AUTO_TOGGLE. In addition, it has the side effect of us
dual role toggling (and resolving as sources) even though we have no
intention of being a source. (e.g. DRP toggle in S0, once we suspend
we're still toggling, even after shutting down to S5, we're still
toggling.)
This commit makes it such that we not dual role toggle in those lower
power states, but instead behave properly as a sink and present only the
Rd's.
It also fixes a bug where if a port was previously sourcing in S0 and
remained sourcing in suspend, if the sink was unplugged the port would
be stuck presenting Rp's until a sink was plugged and unplugged again.
BUG=chromium:902437
BUG=b:119055792
BRANCH=firmware-nocturne-10984.B
TEST=Flash nocturne, use twinkie verify port does not dual role toggle
in suspend or off.
TEST=Verify that TCPC goes into low power mode in SNK_DISCONNECTED.
TEST=Verify that charging works in suspend and off.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/1320909
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Change-Id: Ie44581a1a1a82cf29a786b57a71ce70760862ca2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1667940
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Auto-Submit: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move HKDF extract and HKDF expand code to two helper functions.
This is in preparation for future change to implement positive
match secret.
BRANCH=nocturne
BUG=chromium:927095
TEST=ran unittests, including unit test for derive_encryption_key()
TEST=tested enrollment, matching and multifinger on DUT nocturne
Change-Id: Ia7c67ef8339a3617b0177334ba824b4c805047c8
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1641962
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=none
BRANCH=none
TEST=make buildall
Change-Id: Icaba23f76c2ece14e416f1791b1314325d44d85e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1662990
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPRINTS already prints a new line, no need to add another one.
Spotted during boot on kukui, and then realized there are many
more instances:
""
[3.689239 Module 7 is not supported for clock disable
]
""
BRANCH=none
BUG=none
TEST=make buildall -j
TEST=`git grep CPRINTS | grep "\\\\n\""` shows nothing of
interest.
Change-Id: I4d2bbbc65a91fa56c6e6115aa5c353bfd2b384a1
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660519
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic for popping data from the staged partition of the fifo
was incorrect. We never ended up decrementing the count.
BUG=b:135239484
BRANCH=None
TEST=Added code in motion_sense_init() to fake staging data into
the fifo. This replicated the issue, with the fix the issue was
resolved.
Change-Id: Ic4a0338131defbdfa44e1121d26ee3c5e8238b3b
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1665213
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Enrico Granata <egranata@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ran the following command:
git grep -l 'Copyright (c)' | \
xargs sed -i 's/Copyright (c)/Copyright/g'
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=cr50
TEST=dump_nvmem still prints when only the command channel is active.
Other new_nvmem messages are only printed when CC_SYSTEM is active.
There aren't any extra newlines in these messages.
Change-Id: Ia32689265a406994c22335c247b37eeb1618a01a
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1656634
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use CC_SYSTEM for nvmem print statments instead of CC_COMMAND, so the
CC_COMMAND channel will only have command output.
BUG=none
BRANCH=cr50
TEST=chan 0 restricts the console, so it only prints command output.
Nvmem prints are still enabled by default.
Change-Id: Ief79c930416a3560f7316c0df77c73504d855070
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1656628
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete extra slashes in build.mk so that the build target names are
correct.
BRANCH=nocturne
BUG=chromium:973618
TEST=make -j buildall
TEST=no more extra slashes:
CC RW/common/fpsensor/fpsensor.o
CC RW/common/fpsensor/fpsensor_state.o
CC RW/common/fpsensor/fpsensor.o
CC RW/common/fpsensor/fpsensor_state.o
CC RO/common/fpsensor/fpsensor_state.o
Change-Id: Ibb8a975462242487c9dfbf84558cbbc97d31e87f
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1658516
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|