| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the scenario where we are not building from platform/ec, we define
BUILD_ASSERT to a no-op. We should only do that if the BUILD_ASSERT
macro is undefined; otherwise we should just leave the definition.
BRANCH=none
BUG=none
TEST=build EC and zephyr code without issue
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I6d51106f51217279acb2dcf252ee8ac3383f9959
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532684
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I missed a few bound checks in the gpio shim. Add a bound check to all
remaining gpio shim functions that need it.
BRANCH=none
BUG=b:172512307
TEST=volteer, posix-ec, and test/app/ec all build without warnings
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Id915532b83e1621c86253fe86137034751a4da6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532683
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Should be PS8751 instead of PS8705.
BRANCH=None
BUG=b:171446429, b:173004739
TEST=Built a Trogdor image successfully.
Change-Id: Id99f2b424038327346a7b6ef995fa35c7d4723fd
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532680
Commit-Queue: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do need a true 64-bit input function for common platform/ec code, and
zephyr doesn't have this. Add the support to the shim
BRANCH=none
BUG=b:172592963,b:172512307
TEST=build EC and volteer and posix_ec
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I81f69fdbe03916f3a54091ce6c077db32ed3a73c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532679
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long is 32-bit, but a long long is 64-bit. The function name should be
strtoull if it is returning 64 bits of data.
BRANCH=none
BUG=b:172592963
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I04c40f9256ed37eb1cf9b6bd1b0ef0320fe49b0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530874
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PLATFORM_EC_KEYBOARD_PROTOCOL_8042 should be guarded
by the PLATFORM_EC_KEYBOARD option.
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Idd070454a11ed65cab763ff7788dec4b907f610d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530152
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The static check for zephyr will generate warnings if we
do not bounds check the incoming gpio_signal enum. We should
bounds check anyway.
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I1b2014c02e02d7271eeabd3cc041b3c452b1c43f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530151
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling posix-ec, there are issues with strncasecmp. If we
include the correct zephyr headers and hide the EC's version of stdlib,
we can make everything work
BRANCH=none
BUG=b:172512307
TEST=build posix-ec with CL stack
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ia4d412a45e15b91b36b94ca58ecc9cbe41b2b082
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530150
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shim in support for crc8 used in CBI, I2C, and other
applications within platform/ec
BRANCH=none
BUG=b:168032589
TEST=add unit test for platform/ec and zephyr based
CRC8 approaches and verify they both pass.
Change-Id: Ib609f98596c4edc6e6f0d01b6242e62a1f95ad72
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527811
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating a new test for crc8, just make the existing crc32
test more generic.
BRANCH=none
BUG=none
TEST=none
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I459e9b721a6cc0d94cef8c0d93102ad372095c34
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527493
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr already provides a robust implementation for crc8, but it
conflicts with platform/ec's name of crc8.
Rename platform/ec to use cros_crc8 instead since it is a special case
of zephyr crc8 implementation.
BRANCH=none
BUG=b:168032589
TEST=builds. Just a rename
Change-Id: Idf312098cb921c8e10dcb48c5eb297801af2df8a
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527810
Reviewed-by: Yuval Peress <peress@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables EFS2 on malefor.
BRANCH=volteer
BUG=b:172877805
TEST=buildall succeeds
Change-Id: I6ea7f751075b2e540012ec03034568b82ce5ab89
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528702
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Commit-Queue: Nick Vaccaro <nvaccaro@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables EFS2 for volteer.
BUG=b:152998236
BRANCH=firmware-volteer-13521.B
TEST=Verify system boots and software sync works.
Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com>
Change-Id: Ibb3a107889212df2e2b1eaa4c88aa8a0763c5b07
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521553
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Config GPIOC3, GPIOC4 to control LED.
Move GPIOC2 to NC pins.
Modify Led behavior.
BUG=b:172845491
BRANCH=master
TEST=make BOARD=metaknight PASS
TEST=Led behavior is correct after change.
Signed-off-by: yu-an.chen@quanta.corp-partner.google.com
Change-Id: Icc86b6e6c7e6541c73d70c0903a609be419782ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528730
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate asurada image and use hayato image instead.
Define BOARD_ASURADA_REV0 to get the old asurada image back.
BUG=none
TEST=make buildall -j
BRANCH=none
Change-Id: I10bc67bf36337158d30918e2b77070328b963f33
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530816
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On OCPC systems, the BATGONE pin is left unconnected as it's not
needed. However, the default setting of the RAA489000 looks at the
BATGONE pin in order utilize LEARN mode. This commit modifies the
initialization to ignore the BATGONE pin on auxiliary chargers in an
OCPC system.
BUG=b:171457154, b:166168305
BRANCH=None
TEST=Build and flash magolor, verify that `chgstate discharge on`
results in 0 amperes being consumed from the connected AC adapter.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Iefec97e2dfcf0852a02c7acd05257014e93e9f57
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523303
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
support battery GH02047XL
BRANCH=master
BUG=b:172613247
TEST=make BOARD=coachz -j
flash ec and check battery info
Change-Id: I6bdb0b18a88272e56b2aba1f82c99620243a70be
Signed-off-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2529269
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables EFS2 on lingcod.
BRANCH=volteer
BUG=b:172877836
TEST=buildall succeeds
Change-Id: Ic3cc5c508f83d8679f11ec8e268b7f7822150ba4
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528700
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is so that the unittest can be built for a board that actually
uses 3072-byte RSA in RW signature verification, and run on-device.
E.g. `build --BOARD=hatch_fp test-rsa`
BRANCH=none
BUG=b:169256204
TEST=make -j buildall
TEST=make BOARD=bloonchipper test-rsa3, flash to Dragonclaw,
rwsig verify OK, test passes.
Change-Id: I1e67f05b76b53d96fe508832a94e9af5ad896d4d
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2429392
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nocturne_fp uses RSA exponent 3 for its own rwsig verification, so
the rsa test will fail on a nocturne_fp device. If we modify the test,
we won't pass rwsig verification on device.
BRANCH=none
BUG=b:169256204
TEST=make -j buildall
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Change-Id: I9ca69da2ee870a672ffb029e962f5e0cc0c17c2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2464231
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hatch_fp uses RSA exponent 3 for its own rwsig verification, so
the rsa test will fail on a hatch_fp device. If we modify the test,
we won't pass rwsig verification on device.
BRANCH=none
BUG=b:169256204
TEST=make -j buildall
Change-Id: I92a2f419c8cc022dc231ffa00fb643be3d6db20c
Signed-off-by: Yicheng Li <yichengli@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2444455
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enable red LED on dooly.
BUG=b:163574191, b:172781906
BRANCH=puff
TEST=verify with console command: LED red/pink,
confirm LED change to red/pink.
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I320e716a8243421a827897b5e86902ad459fc462
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519242
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Tested-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Commit-Queue: Zick Wei <zick.wei@quanta.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL implements vivald function row config for hammer keyboard.
If CONFIG_USB_HID_KEYBOARD_VIVALDI defined, STM32 HID keyboard now returns
an extra 32-bit data represents the status of action keys. Additionally,
if board_vivaldi_keybd_config returns a non-null pointer, driver will
convert function keys to action key according to the given config.
BUG=b:171156337
TEST=verify keycode is correct in `evtest`
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: Ide3289fd2c1bb8859a74e97134e6113441cfb967
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508848
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some zork variants have battery model names that differ only beyond
the 7th character, which cannot be differentiated with the current
limitation of 8 characters per battery string. Introduce a new hostcmd
version that allows longer battery strings and enable it on Zork.
Because allowing longer strings through the host memory map is more
difficult and not required (because getting the full longer string
is mostly only useful for servicing), the host memory map is unchanged.
ectool is updated to use hostcmd (rather than memory map) if the new
command version is available, in order to take advantage of it.
BUG=b:171854783
TEST=ectool battery prints longer strings when supported by the EC;
a hacked EC on morphius can return 11 characters of text.
An EC running older firmware still works with a new ectool.
BRANCH=zork
Change-Id: I63d20d4f690b6945cb1d423aafaf55dafc039211
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519243
Reviewed-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per the power sequencing requirements, SYS_PWROK_EC should be
driven based on ALL_SYS_PWRGD deassertion/assertion.
BRANCH=None
BUG=b:169551130
TEST=Build, flash and boot the Alderlake RVP platform to OS
make BOARD=adlrvpp_ite -j;
sudo util/flash_ec --board=adlrvpp_ite --image=<path>
Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com>
Change-Id: Ifd6805dc878cbbaa401f43b325a42d1b1431b1ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521550
Tested-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PSYS monitor consumes power, 905uA (enabled) vs 24uA (disabled).
When AP is in suspend, which uses less power, the PSYS monitor takes
a significant portion. Should disable it to save power. The `psys`
command will return -1.
BRANCH=None
BUG=b:172701160
TEST=Triggered AP in suspend, used `amonbmon` command to check the
battery discharge current drop.
Change-Id: I6df18a65b040b73e626587d9775296df58d283c6
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528691
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the requirement of OEM, update the led behavior.
BUG=b:172400861
BRANCH=master
TEST=1.make -j BOARD=kakadu
2.verified LED behavior and result is OK.
Change-Id: I9b81e8f4b345eb8e9766a99fee95668affacc853
Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2517417
Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org>
Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:172842249
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I7fa19424a37c2a295f94351143ed22821968ea3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527702
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding CONFIG_USB_PD_MANUFACTURING_INFO guard
BUG=b:172842062
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ia048ead9060f11dc9bc943ef6dd3b935c7d5cf5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527701
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:172424930,b:172842768
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ib7734fca61b9169f718ce58aa15277251d2bd560
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523383
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:172439432
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I9440fc55caf33adce3e5b846e3ad9dd68ce44d35
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523378
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:172665003
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ic356fc0df99e449f90bdb0390e5473c621f717d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523451
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:172419824
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I465fadb323649fbcace24f81a944595a0751d714
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2522670
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings over the extpower_common.c and extpower_gpio.c files to
the Zephyr build. This is needed as a dependency of power sequencing.
BUG=b:172720290
BRANCH=none
TEST=on volteer, observe "hostevents" command output to see AC_PRESENT
event set when charger connected. (requires the zephyr-chrome CL
as well)
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I28ad442180762d542cc6031ab1f33284b08a4572
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527703
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At present a build error is produced when building keyboard_scan.c
due to a redefinition of this symbol. Undef it first.
BUG=b:167405015
BRANCH=none
TEST=make BOARD=volteer
zmake configure .../zephyr-chrome/projects/experimental/volteer \
-B /tmp/z/cos
zmake build /tmp/z/cos
see there are no errors
Change-Id: I9b13d1737d6ce6f7ab35b0d6457c2db49cea8dbc
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523838
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add build assert to ensure that deferred task is lower than all of the
other shimmed tasks.
Also make priority of tasks from 0 to COUNT - 1 instead of 1 to COUNT
BRANCH=none
BUG=none
TEST=volteer still builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Iabe9f1117850975ec9bf3df1dcfc690b4725a7e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523389
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to align with go/zephyr-shim-how-to, update all of the
platform/ec header files to use "quotes" and only use <brackets> for
zephyr header files. Also include an empty line between the two.
BRANCH=none
BUG=none
TEST=all zephyr tests build and pass; build volteer
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I27c275c24aa4f8eb40e100b07517b60f548f06cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521594
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to need to perform initialization in Zephyr's main before
we start the EC tasks or call the INIT hooks. If we rely on SYS_INIT,
all of that happens before main is called.
BRANCH=none
BUG=none
TEST=pass tasks unit tests and run on volteer
Cq-Depend: chromium:2523462
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Icd035695b86fc9690cea88887902be61d9b37a18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523380
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an option to shim the power button module.
BUG=b:172471187
BRANCH=none
TEST=volteer: press power button, observe UART output
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I7dbc705b19bfc312e2707080f22e411ebd7e2c1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Include host_command.c and host_event_commands.c so that we get some
basic definitions to get things compiling. Since we don't have
CONFIG_HOSTCMD_ESPI enabled yet, this is really just pulling in stub
definitions.
BUG=b:172678200
BRANCH=none
TEST=compiles for volteer
Cq-Depend: chromium:2523466
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ic293f80d30ecf9534ff935b73aa4ca42614a77be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change replaces the stubbed irq_(un)lock static functions
defined in task.h with new functions that behave more like the
Zephyr implementation of irq_(un)lock functions. This should
make the migration from interrupt_(dis|en)able to Zephyr more
seamless.
BRANCH=none
BUG=b:172060699
TEST=Added unit tests, make runtests -j, and built for various
boards: eve, volteer, arcada_ish, atlas, hatch, kohaku,
nocturne, samus, and scarlet
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ia7ad2b8d7d411a11699353bf5d3cc36a261fad14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change accomplishes 2 things:
1. It refactors the zephyr/shim directory to structure around
chip specific compilation. In this example, we're focusing
on npcx7m6fb which is used in volteer but others can be
added easily.
2. It shims the common/i2c_master.c by providing an alternate
implementation of i2c_xfer_unlocked that calls down to the
Zephyr API i2c_write_read instead of the chip specific
i2c_xfer_no_retry or chip_i2c_xfer_with_notify.
The shim layer is made possible by the addition of
zephyr/shim/include/i2c/i2c.h which adds a functions that
needs to be implemented per chip (npcx7 family in this case)
and allows us to map the current port int which is defined
in chip/${CHIP}/registers.h (chip/npcx/registers-npcx7.h in
our case). This function (i2c_get_device_for_port) maps the
platform/ec port int to a const struct device * which is
needed in the Zephyr I2C APIs.
BRANCH=none
BUG=b:171302975
TEST=clean_build.sh projects/experimental/volteer/ and make BOARD=eve
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I210f4758337bf384d0d6f103eef8b89126887d11
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2504285
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change migrates interrupt_disable -> irq_lock and
interrupt_enable -> irq_unlock.
BRANCH=none
BUG=b:172060699
TEST=make runtests -j, and built for various boards:
eve, volteer, arcada_ish, atlas, hatch, kohaku,
nocturne, samus, and scarlet
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Ia5d872d8b9fcabc23a859350cf3bf121597d84af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2517629
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The BC1.2 chip PI3USB9281 some Trogdor old revisions used has push-pull
output on the interrupt pin. But the PI3USB9201 some latest revisions
used has open-drain output. These lines don't have external PU. So apply
EC internal PU.
BRANCH=Trogdor
BUG=b:172674040
TEST=Plugged a C-to-A adapter to a CDP port, the BC1.2 interrupted and
detected the 1.5A source.
Change-Id: I15e27221bff1ce35fc35b03ac38340b5dfb1055d
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523298
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable an option to compile common/lid_switch.c.
BUG=b:172652088
BRANCH=none
TEST=On volteer, with zephyr-chrome CL, observe lid{open,close,state}
console commands, gpio interrupt works
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ica5b8abd1b0e0d9666ded9bd27927562ee36b80c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523456
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These two platform/ec functions are used pretty widely across common
code, and enables/disables the interrupt functionality on a GPIO PIN.
BUG=b:172652088
BRANCH=none
TEST=compile with lid switch shim, observe lid state change
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Iad662397da24b58e577537d835c4a2d532307bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523455
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This header can be included from shimmed modules for an actual
build (not just tests). In that case, CONFIG_ZEPHYR would be defined,
but not CONFIG_ZTEST, and headers like ztest.h are not available.
BUG=b:172678200
BRANCH=none
TEST=compile both host_command.c and hooks test
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I24c704f6288eac9a8ca53580ec00e43073a6fef0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2522968
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, many things in config.h rely on HAS_TASK_* to be
defined before we start processing config.h.
Move this include a little sooner so we have it then.
BUG=b:172678200
BRANCH=none
TEST=compiles with host_command.c added
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I791426b78777997748eff2c91210b8a426d9a8ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2522970
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unnecessary the "tcpm.h" include.
It will help with porting the pi3usb9201 driver to Zephyr.
BRANCH=none
BUG=b:172236680
TEST=make buildall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I446daf8025e35876c5018e041ba515e4ae017b3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521598
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit checks if the dedicated port count is greater than 0 for
the charger specific files while keeping the code common for both DC
jack supported and non DC jack supported boards.
BUG=b:172642304
BRANCH=None
TEST=make buildall -j
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Change-Id: I138d33802c2df586963e244f18b787ccce60b8f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523294
Reviewed-by: Keith Short <keithshort@chromium.org>
|