| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was some leftover constants and a #include we are no longer
using due to using a monotonic counter, clean it up.
BUG=chromium:1013701
BRANCH=none
TEST=buildall
Change-Id: Ieeb130aef9ee89d65459f52c8f34753c30c3c388
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1879335
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__fls(n) is defined as (31 - __builtin_clz(n)) in include/common.h.
Because of the definition, n can't be 0. When n is 0, __fls(0)
will be -1 and it is a wrong result.
Since sensor data rate can be set lower than LIS2DW12_ODR_MIN_VAL,
it is possible for __fls() to get a 0 parameter. This CL will fix
this condition.
Because macros are getting complex, move them to c file and convert
to functions.
BUG=b:143242489
BRANCH=none
TEST=run 'suspend_stress_test --suspend_min=10 --wake_min=10 \
--count=2500' on DUTs, test pass and no EC crash.
Change-Id: I46febb602b47624ba5d0106abaedd34a23ebe96f
Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1876297
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g753 is used on akemi board. It's a temperature sensor,
analog-to-digital converter, and digital over-temperature
detector with SMBus interface.
BUG=b:138426009, b:143046086
BRANCH=none
TEST=use Akemi board, add g753 as temp sensor, boot the board
and make sure temperature can be read from g753
Change-Id: Iefa1039628171170cf0ca322b462a29b33eb0df5
Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1857978
Reviewed-by: Philip Chen <philipchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gdbinit sets up useful functions and initialization
for EC debugging.
BRANCH=none
BUG=none
TEST=ln -s util/gdbinit .gdbinit
Tested debugging on stm32h743.
TEST=make BOARD=nocturne_fp
BOARD=nocturne_fp GDBSERVER=openocd GDBPORT=3333 gdb
# Check that the right object files were added
Change-Id: I0e15501832d4e65e8779aee2c0dc8ca170fa5f3c
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1856380
Reviewed-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PD header specifies the power role for SOP packets and cable plug for
SOP' and SOP" packets. Refactor code to make this more obvious.
BRANCH=none
BUG=none
TEST=builds and new stack runs on hatch
Change-Id: I6cdb1561082d2142214ac65703ff42586b16d70b
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865986
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This command is called by u2fd in M77 on startup,
and if a success response is not returned, u2fd
will not start up or send commands.
We need to support M77 in newer cr50 versions,
due to the enterprise rollback feature.
cr50 has been updated to not require these commands
to be sent, so the dummy command here does nothing
other than return success.
BUG=b:133275654
TEST=flash M77 and ToT cr50 with this change,
check u2fd starts up and works
BRANCH=none
Signed-off-by: Louis Collard <louiscollard@chromium.org>
Change-Id: Ie1576f582df6c3a076a8b9a3cbc7101fb05204b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869172
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously used to enable/disable U2F
or the extended mode. This was never used to
disable U2F, and the distinction between U2F and
extended mode is no longer required.
BRANCH=none
BUG=b:133275654
TEST=build, U2FTest,
enable g2f mode in u2fd, check attestation certification
does not change across multiple registrations
Change-Id: I323fa245bf23fb12ffed75fb8dcfc81913bafff7
Signed-off-by: Louis Collard <louiscollard@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1786886
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
USB_C0_DISCHARGE is implemented on board rev #1, we can add it to
gpio.inc now.
BUG=b:137939749
TEST=make
BRANCH=master
Change-Id: I4a5142594f90b902c455eaaada74a76f66c021de
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1844661
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplo updated L19M4PG2 battery specifications and its minimum
voltage and precharge current changed.
BUG=b:143162679
BRANCH=none
TEST=boot akemi board with Simplo battery, charging/discharging/
cutoff work as expected.
Change-Id: Iad3fbb2308d82a287eb6c1cc40a9786b148cb36f
Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1875859
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices (like the keyboard, CBI) need I2C access pretty early.
Until now I2C would get initialized pretty late in a hook, which was far
too late for some stuff.
As a result from this change, CONFIG_I2C_MASTER now implies the i2c_init()
function will be called at board boot. Some chips (cr50, host tests)
needed a stub i2c_init in order to compile cleanly.
BUG=b/138384267
TEST=EFS doesn't happen significantly later than it used to
TEST=Recovery keys now work with I2C keyboard on jacuzzi
TEST=make buildall
TEST=Sanity check i2c behavior (booting, "i2scan", "battery") on a variety
of ECs:
* ampton (ite EC, x86 AP)
* bobba (npcx EC, x86 AP)
* jacuzzi (stm32f0 EC, ARM AP)
* cheza (npcx EC, ARM AP)
BRANCH=master
Change-Id: Ifa830e8e509ff16b36b4dcc86617869b1cb86ac3
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1772490
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use first class enums types instead of int for power and data
role.
BRANCH=none
BUG=none
TEST=builds and new stack works with single charger on C1 hatch
Change-Id: Ied4562e6a148803140cf277bd229b6c3ed801470
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865985
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to let board specific code run any time we change the data role
on our USB-C connection.
When looking at all of the calls to tc_set_data_role, I realized that we
don't really reset any data role until we start a new contract with
SNK/SRC ready. We will do need to call into the code that disables the
MUX lines when we detach.
To do this, I created a super state for SNK/SRC unattached.
BRANCH=none
BUG=none
TEST=builds. No board has an OTG signal using the new stack yet
Change-Id: I017d20b2e1973b31ebf2b8925a7f8c5488a8ee24
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1864427
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:143089106
BRANCH=none
TEST=make buildall
Change-Id: I38b9331f6d0707dcd5b19823153549bd5806969f
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1876891
Reviewed-by: Edward Hill <ecgh@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During code review for tgl rvp enablement, found some hpet timer
related unused irq defines, so cleanup them.
BUG=b:141519691
BRANCH=none
TEST=successfully compile for arcada
Signed-off-by: Leifu Zhao <leifu.zhao@intel.com>
Change-Id: Ieb6872d6633be8c5e9f38a4642f874db4201403e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871247
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Auto-Submit: Leifu Zhao <leifu.zhao@intel.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per the TCPCI spec, we don't need to try to write the header or
byte count when sending a non SOP* packet.
BRANCH=none
BUG=none
TEST=PS8751 can still send a hard reset
Change-Id: I6cccbc52cf600f7930f0cbc3ac2aab578a81dc51
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1872603
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Non SOP* packets (e.g. hard reset) do not have a message
counter, so do not try to access the message counter field.
BRANCH=none
BUG=chromium:1016109
TEST=reproduced fuzz failure locally then verified fix with prints
Change-Id: I2e46b43988cba92636eb9da7f86448b037fbc0a8
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1872602
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL ultimately restricts access to the md and rw console
commands when the system is locked, when system_is_locked().
It does this by enabling and configuring the restricted console
command feature for nocturne_fp and hatch_fp.
This sets up the framework for more console commands to use the
restricted flag for fingerprint, but right now, only the md and rw
commands use the restricted console command flag.
The restricted flag for md and rw was introduced in crrev.com/c/1868430.
BRANCH=nocturne
BRANCH=hatch
BUG=b:142559996, b:142505927
TEST=# Test on nocturne_fp
make BOARD=nocturne_fp
scp build/nocturne_fp/ec.bin dut1:~/
ssh dut1 flash_fp_mcu ./ec.bin
# From FPMCU UART console
version
# Ensure that version is custom based on workstation
help
# Ensure that md and rw are not prefixed with "-"
help list
# Ensure that a "Flags" column exists and that
# md and rw both have a 1 in the column.
md 0x0
# Ensure that this successfully reads the word
rw 0x24000000
# Ensure that this successfully reads the word
syslock
md 0x0
# Ensure that this fails with "Access Denied"
rw 0x24000000
# Ensure that this fails with "Access Denied"
help
# Ensure that md and rw are now prefixed with "-"
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I1202a118b836ff2a2acc986f6f3b0f6e07b36894
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867388
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This marks both the md and rw console commands as restricted.
This alone does nothing, unless the specific board has enabled
console flags, enabled restricted console commands, and
provided an implementation for console_is_restricted().
The idea is to allow boards to deny access to these commands
under some runtime condition, for example when system_is_locked().
Restricted console commands were introduced in crrev.com/c/376185/4.
See crrev.com/c/1867388 as an example board usage.
BRANCH=nocturne
BRANCH=hatch
BUG=b:142559996, b:142505927
TEST=# Test on nocturne_fp, since it has not enabled
# console restricted commands, at this CL.
# Note that this will not be the case in future CLs.
make BOARD=nocturne_fp
scp build/nocturne_fp/ec.bin dut1:~/
ssh dut1 flash_fp_mcu ./ec.bin
# From FPMCU UART console
version
# Ensure that version is custom based on workstation
syslock
help
# Ensure that md and rw are not prefixed with "-"
help list
# Ensure that no "Flags" column exists
md 0x0
# Ensure that this successfully reads the word
rw 0x24000000
# Ensure that this successfully reads the word
TEST=A positive test case is done in crrev.com/c/1867388.
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: Ica6b1f24d9b89186ad0ff854bb6e0786392fd1df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868430
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is just a minor cosmetic fix of assert.h courtesy of
clang-format.
BRANCH=none
BUG=none
TEST=make buildall passes
Change-Id: Ic503c22f1d29e0511a3b5ecbf697c5940c93d18c
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1864424
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=none
TEST=use them in CL stack with tests
Change-Id: I8a970dc65f7395264a8c536977951ae305e9c24f
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868831
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The data role as defined in the USB spec is 1 bit.
Disconnected does not fit and no one is using it properly.
All users of Disconnected value alias the value to DFP anyway. Just
use DFP explicitly
BRANCH=none
BUG=none
TEST=builds and runs new stack on hatch
Change-Id: I5c7dddea8f34c8e3c524da8701913c87c23b42b2
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865984
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:138600585
BRANCH=none
TEST=build
Change-Id: I547309c7000e7d3ca8549a7e626a63789665305d
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868921
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this moves the jump_data related declarations out of system.c into a
dedicated sysjump_impl.h header file. this will make it possible to
implement unit tests for sysjump.
BRANCH=none
BUG=b:142031466
TEST=make buildall passes
Change-Id: I7df3d24e1f9c0f203656ee8dddc234b64e2dc8c3
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1855647
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust the rotation matrix of lid sensor to ensure auto-rotate function
works as expected.
BUG=b:142562612
BRANCH=kukui
TEST=1. Work well in UI when rotate DUT.
2. The values returned by the accelerometers must match the axes
used by android or w3c:
https://source.android.com/devices/sensors/sensor-types,
https://www.w3.org/TR/accelerometer/#model
device on table: in_accel_z_raw >> 0 (a very large positive value)
e.g. X(65), Y(134), Z(8245)
device on its default bottom edge: in_accel_y_raw >> 0 (a very
large positive value)
e.g. X(-17), Y(8141), Z(164)
device on its default left edge: in_accel_x_raw >> 0 (a very large
positive value)
e.g. X(8107), Y(-79), Z(-174)
Change-Id: Id570e3665e2c7165a0f43dccc988a157fa7eda29
Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871274
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For functions which should only be used in test builds, this lets us
add __test_only to the prototype, causing an error if used outside of
tests.
Example error output:
test.c: In function ‘main’:
test.c:17:5: error: call to ‘foo’ declared with attribute error:
This function should only be used by tests
foo();
^~~~~
This will not cause errors if the usage is guarded by a disabled
IS_ENABLED (or any other form of optimized-away branch).
BUG=none
BRANCH=none
TEST=see above
Change-Id: I64115fd9e7940de9b10063a46548e8d00033d1d3
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1872962
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clang compiler is used by the fuzz tests, and while clang does not
have support for the error attribute in GCC, we can do our best to
make sure that errors are raised on clang where appropriate by placing
functions defined with __error in the special section "/DISCARD/",
which the linker discards.
An error like below is shown when compiling in clang:
`foo' referenced in section `.text' of foo.o:
defined in discarded section `/DISCARD/' of /tmp/foo.o
BUG=none
BRANCH=none
TEST=see above error output when __error is used on clang
Change-Id: Id58131578f67b9dff7e58e5df58b3509d6046138
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1874382
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=grunt
BUG=b:143095616
TEST=GPIO is locked as input
Change-Id: I36b123ed068db268d1cd02e990dd720663eaae57
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1873008
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes for PD 3.0 spec version 2.0
State machine for Source Port Soft Reset and Protocol Error,
new section 8.3.3.4.1 changed entry requirements to go to
state PE_SRC_Send_Soft_Reset and PE_SRC_Ready.
State machine for Sink Port Soft Reset and Protocol Error,
new section 8.3.3.4.2 changed entry requirements to go to
state PE_SNK_Send_Soft_Reset and PE_SNK_Ready.
BUG=b:141468157
BRANCH=none
TEST=make buildall -j
Change-Id: Ibda109fa15c0bcab34472498920bef06806e0880
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1863710
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rotation matrix needs be filled out into standard reference frame.
BUG=b:143045241
BRANCH=none
TEST=Using ec console 'accelinfo on' verified lid angle now goes
from 0 to 360 and swtiches to tablet mode after crossing 180 threshold.
Change-Id: I615ac3c582f7deec681c638a79b59324c9b69584
Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871276
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When DUT starts up in S5/G3, HOOK_CHIPSET_STARTUP only called in RO
stage. In fact, POGO ADC interrupt not be enabled after jumping to RW
stage.
Krane and Kodama board use POGO keyboard function. Moving common API
to HOOK_INI (pogo_chipset_init) to ensure POGO ADC interrupt is enabled
and API base_detect_deferred would be called after jumping to RW stage.
BUG=b:142849032
BRANCH=kukui
TEST=folio case works well in UI and VT2.
Change-Id: Ie3fed9a88620414afeea2fa4dcbf2cd120e7ac37
Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869170
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initial files for dood are copied from bobba,
to be revised later.
BRANCH=octopus
BUG=b:141960652
TEST=build
Change-Id: Ie26c6dfd21f420a9d66902de39d2393b0cd95fb3
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1868129
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Tested-by: Henry Sun <henrysun@google.com>
Commit-Queue: Justin TerAvest <teravest@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When converting the ADC reads into mV, I had used the wrong value which
was leading to some errors that would grow with the voltage. This
commit simply uses the right values and attempts to gain more accuracy
by increasing the number of significant figures.
BUG=b:140393065
BRANCH=None
TEST=Flash fluffy; measure the VBUS voltage with a multimeter, verify
that the fluffy reported value is now closer to the multimeter.
Change-Id: I9dfd749eb533d96c8bc45454f968d7bcb095b9ef
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1871123
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since pinhold will hold UART pin, UART won't work correctly. In this
case, we want to delay uart_init() done until pinhold is disengaged.
The messages to UART are still kept in the UART buffer and can be
correctly printed through UART after pinhold is released.
BUG=b:138327854
BRANCH=none
TEST=manual
Testing: verified that after cold or warm reset, messages from RW image
can be correctly printed to UART. Without this change, we might see
incomplete messages or garbage characters.
Change-Id: I00934aa16178b995d996f6ba773abab80f329124
Signed-off-by: Pai Peng <paipeng@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1717547
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed a bug that RELOAD bit not cleared properly when there's two
consecutive chip_i2c_xfer() calls, where the first call only contains
"write" transaction, and the second call contains a "read" transaction.
BUG=b:138095176
TEST=Case 1 - write and read in two separate i2c_xfer call:
`ectool i2cxfer 1 0x55 8 0x64`
On Krane, this should print the string "L16D2P31" in hex.
Case 2 - no write and read 1 byte:
`i2cscan` in ec console.
BRANCH=kukui
Change-Id: I57c1909058606b458801b3b35f54c16c1309c594
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866222
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Embedded flash of it8xxx2 is KGD, so we made this change
to support it.
BUG=b:133460224
BRANCH=none
TEST=On both it83202 and it8320 EVBs, verify flasherase and flashwrite
console commands.
Change-Id: Idde0846eb8c59a330ccf69d7f6b7aa352c623caa
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1844657
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
split thermal configration table for temp sensor 1/temp sensor 2, because
sensor location is different, they have their own table.
BUG=none
BRANCH=none
TEST=manually remove dptf control then do follwoing:
make sure system shutdown when over 85 degree with temp sensor 1.
make sure system shutdown when over 75 degree with temp sensor 2.
make sure fan works when over 25 degree with temp sensor 1.
make sure fan fully on when over 70 degree with temp sensor 1.
make sure fan works when over 25 degree with temp sensor 2.
make sure fan fully on when over 50 degree with temp sensor 2.
Change-Id: I1139f9ee8a8ef9fc67c3ba6f5cbc2b6cf265ede9
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869171
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dratini and dragonair use the same PCB with BOM changes. Dratini uses a
hall sensor instead of GMR, and does not stuff the accelerometer and gryo
sensors. Disable initialization of those sensors on Dratini. Dratini is a
clamshell that does not support tablet mode, so disable that, too.
BUG=none
BRANCH=none
TEST=make buildall -j.
make sure no initial event occurs with dratini.
make sure tablet mode was disabled with dragonair.
Change-Id: If65183f458d62f0b74e21233900d86102c4cc88d
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866220
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=Check screen rotation with tablet mode.
Check keyboard disabled and on-screen keyboard enabled with tablet mode.
Change-Id: Ifa3bcc24b19608fb52525208569e8fdde25e99ea
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866218
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of 92b3e86b23b59ebec3e59132cae2b32288fcf1b4,
fixing up the call to base_init that does not exist anymore.
Original change's description:
> baseboard/kukui: use BASE_STATE_SWITCH instead
>
> tablet mode will also depend on BASE_ATTACHED_SWITCH.
>
> TEST=see EC sends BASE_ATTACHED event when keyboard attach/detach
> BUG=b:140608847
> BRANCH=none
>
> Change-Id: Ib7d9bd0e8cf0efb5d0a3808f4649e0d9eb69b6d8
> Signed-off-by: Yilun Lin <yllin@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1806178
> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
BRANCH=kukui
BUG=b:140608847
BUG=b:141518464
TEST=see EC sends BASE_ATTACHED event when keyboard attach/detach
Cq-Depend: chromium:1844514
Change-Id: I609c8ac958f7d344d73f28934e2b1187a8d11f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1844653
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=octopus
BUG=b:142953493
TEST=verify that later modification of gpio flag will no allow driving
signal high.
Change-Id: I0b8c1503ba8c03afa3eb6fa4f921b3480106f05b
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869407
Commit-Queue: Edward Hill <ecgh@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the need for stubs of charge_manager_set_ceil() by adding a few
missing IS_ENABLED(CONFIG_CHARGE_MANAGER) checks.
BUG=none
BRANCH=none
TEST=buildall
Change-Id: Ia70434b05107747eb773ae30ee1de5b4bd8cbcea
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1869401
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the battery spec in b/142097561#comment15, EoC current
should be 140mA.
BUG=b:142097561
TEST=make
BRANCH=kukui
Change-Id: I913a1abecd2fc6ac28ba16513c3f0cc145afc38c
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866212
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On-pack battery gauges should have better knowledge about battery life, so
maybe we can trust SoC value reported from gauge and don't need this
hack.
BUG=b:142097561
TEST=confirm battery SoC won't jump to 97% unexpectedly
BRANCH=kukui
Change-Id: Ie3efdcbfa6d6525040e68b5abe0345a4b6c1fcde
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866210
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the dimensions, and also the size, and make sure that updating
the FW actually works (it seems like increasing the timeout to
2000ms is needed).
BRANCH=kukui
BUG=b:140596094
TEST=Flash masterball, no warning in console on start
TEST=
Host:
make TOUCHPAD_FW=S8648A-15H0_FW01.bin BOARD=masterball -j
USE=updater_utils emerge-kukui -av ec-utils
cros deploy $IP ec-utils
DUT:
usb_updater2 -d 18d1:503c -r; sleep 0.5; \
usb_updater2 -d 18d1:503c -s; usb_updater2 -d 18d1:503c ec.bin
usb_updater2 -d 18d1:503c -p S8648A-15H0_FW01.bin
Change-Id: Ia473ac420b42f52ad1639f950a3f08ff5d32df09
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1847512
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on the Lenovo requirement,modify the Charging and
Fully charged LED color as white
BUG=b:137618886
BRANCH=kukui
TEST=Do a charge test
Change-Id: I75a3e9f24c98a67cb6b9dda8294c73926c20d4d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1706248
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Tested-by: Leo Zhou <zhoubo@huaqin.corp-partner.google.com>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
panic.h uses types from stdint.h, so it should really include it by
default. also, order standard header files ahead of project specific
header files.
BRANCH=none
BUG=b:142031466
TEST=make buildall passes
Change-Id: I8ac6d42f1da412bd3ce20df2838b8e420ad25e52
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1855643
Tested-by: Caveh Jalali <caveh@google.com>
Commit-Queue: Caveh Jalali <caveh@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify EC fan control table by Thermal request. (#21)
BUG=b:136565336
BRANCH=none
TEST=Manual
Verify fan behavior by thermal team.
Remove DPTF and check fan speed with temperature.
When temperature over 65 degree, the fan start working.
When temperature over 85 degree, the fan full run.
And check system shutdown when temperature over 90 degree.
Change-Id: I0d4633e9ba93ba12f28d4d069a9ae2a7a82fcedd
Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com>
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1833944
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=When device is laying on a table, lid angle at 180, both sensors
report gravity along Z axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: -1040 4336 15408
Sensor 1: 760 -291 17127
Sensor 2: 0 0 0
When on the base bottom edge, report gravity along Y axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: -960 14112 -5952
Sensor 1: 453 16136 -373
Sensor 2: 0 0 0
When on its left side, report gravity along X axis:
localhost ~ # ectool motionsense
Motion sensing active
Sensor 0: 16352 -432 64
Sensor 1: 16802 -338 192
Sensor 2: 0 0 0
and check the screen rotation was normally.
Change-Id: Idbe7184d5c14eb31d7823f9e17648d9bf3df4443
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866209
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FIPS ACVP tests require that on an empty input, the result is the
hash of the empty string. In the current implementation, an empty
result is returned. Change the implementation so it matches FIPS
expectations.
Also added two test cases in hash crypto test to check the corner
case of the empty input.
BUG=None
BRANCH=cr50
TEST=test/tpm_test/tpmtest.py
Change-Id: I9f5c3f71e4b10cbce2ea204eeb52e57ef26ad0e7
Signed-off-by: Gurleen Grewal <gurleengrewal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1866444
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Tested-by: Gurleen Grewal <gurleengrewal@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initialize the local struct so that the test is not flaky. Also
extract helper function and add more asserts to make the logic more
explicit to readers.
BUG=none
BRANCH=nocturne
TEST=make -j buildall
Change-Id: I84ccd097b64c3ff304f4af228121b2cb989e6ab7
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865956
Reviewed-by: Craig Hesling <hesling@chromium.org>
|