| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move this out of the flash emulator so we can add to it and use it from
other tests.
Put it in a new 'fake' subdirectory, since we don't seem to have of this
sort of thing yet.
BUG=b:243982872
BRANCH=none
TEST=./twister -c -T zephyr/test/drivers/
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ia4cd3b10e2f38dbacadf0d20198be8f9bbc026e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3883773
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Emulate RTC driver
BUG=b:236074639
BRANCH=NONE
TEST=./twister -T zephyr/test
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
Change-Id: Ib1073c0e30c0c39d8e778c228a89cc9b6638c887
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3880865
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The zephyr.h header has been formally deprecated upstream thus causing a
build failure when downstreaming.
Replace zephyr.h with kernel.h
BRANCH=none
BUG=none
TEST=zmake build -a
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I0e6095160ab7248edde00f5c8336bc8d01c6b937
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3885035
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented a rt9490 charger emulator with basic i2c read/write, and
extra peek/reset reg functions
BUG=b:244233556,b:243841599
TEST=tested with CL:3873241
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I87b77cf2b0bc0a0d89f2f76353e16b9296dc5596
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3873240
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This covers the cases in vboot_main. Next is to move the next level down
and emulate the communication with the cr50 as well.
Add new test hooks to vboot/efs2.c, and the flash emul.
BRANCH=None
BUG=None
TEST=./twister
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Icca8dde3731a91645eabbf2bc547c84a51cb1474
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858041
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow ExitMode to take place with any SVID sent if we've ACK'd an
EnterMode of that SVID.
BRANCH=None
BUG=b:243151272
TEST=./twister -T ./zephyr/test
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Iec3dec1900dba54d13d7a4bbe50078b547d4a1f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859564
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generalize the fields for mode entry so they can be used for modes
besides DP as well.
BRANCH=None
BUG=b:243151272
TEST=./twister -T ./zephyr/test
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Idf2ce813cbcfcf730042a1d55b1de63425fbc824
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859561
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the cable replying to messages for unit testing. For
the first level of support, only reply to DiscoverIdentity (response for
a cable with no alternate mode support).
BRANCH=None
BUG=b:243151272
TEST=./twister -T ./zephyr/test
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I731e0aad35a1d4bc07be75378df1f272d0eef525
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859560
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both the TCPCI emulator and the partner emulator have message structures
with a member named "type". Re-name the TCPCI "type" to reduce
confusion when the code references msg->type in both files.
BRANCH=None
BUG=b:243151272
TEST=./twister -T ./zephyr/test
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I600e8b046a701f53f21157a15d5073a127209076
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859559
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all devicetree label usage from the i2c_mock emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Iece16f5aa8ff48e280db4487f38b776554556174
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855428
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all devicetree label usage from the sn5s330 emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I9f30cb5ba28b85d1cef1a838327a4ff599e28506
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855427
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all devicetree label usage from the lis2dw12 emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ice425e988f1d39e1eb3293c1ac1e9ff97de174d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855426
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove devicetree label property from the ps8xxx emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I8d46b18b3bf5394ca543b28b10ee1e6bf55526d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855424
Reviewed-by: Sam Hurst <shurst@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all devicetree label usage from the isl923x emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ie7bd86eadb0804d8d8321c56a2e1a06390b8d1e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855422
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all devcietree label references from the ln9310 emulator.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Id56fe974d4f18b32fcd47f9e0a2c4b69412fb827
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855420
Reviewed-by: Yuval Peress <peress@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the flash write and erase functions in the flash emulator. The
functions call the underlying flash controller to execute.
Add the simple test cases to exercise the flash write and erase, and
then readback the data to compare the results.
BRANCH=None
BUG=b:236075787, b:236075595, b:236075283
TEST=./twister -s zephyr/test/drivers/drivers.default
Change-Id: I50cb83c19382362c86a319d0feefa683f6b216bf
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3857443
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a simple flash protection for RO and ALL.
BRANCH=None
BUG=b:236075598
TEST=The following CL tests the functions.
Change-Id: I0eec87d7ebbf776a676103ae26df5460d3685431
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3854310
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_smart_battery driver.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Icd36f78688fd58eeb60527e8862ac3c020b9d843
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852580
Reviewed-by: Yuval Peress <peress@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_kb_raw driver.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I69ecd3f29a220d28e406777c31f2cf8e73374557
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852579
Reviewed-by: Sam Hurst <shurst@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_bb_retimer driver.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I31d1038606fc62f67c2782be40b148702137d25b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852578
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_syv682x driver.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Id4902fce70c00e189b1559791c21e5915257332d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852577
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_bmi and emul_bma255 drivers.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I51a48b255760c55ae322f03a2527f36d4c7bb77b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852573
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the label property from the emul_tcs3400 driver.
BUG=b:239165779
BRANCH=none
TEST=./twister --clobber
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ice83caeb85d83bf49f423b45efe1e682c257746a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852572
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename faulty_snk TCPCI partner emulator extension to faulty_ext as this
extension is not limited to use only with sink emulator.
BUG=None
TEST=./twister -T zephyr/test/drivers
BRANCH=None
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I185c2982e33068c4577e6ae99bd69764bb19573c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3823510
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to cover common/motion_sense.c:734 consistently, add a test
that triggers an interrupt and verifies it was handled.
Change the bmi160 emulator to clear interrupt status registers when
read. I believe that this is how the hardware works.
BRANCH=None
BUG=b:242765844
TEST=./twister --coverage
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I880bd9fbc8fd853120c87c20c12010c0e9364d98
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3834010
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a mock pwm device for testing pwm_led driver.
This driver supports 1 channel, and an extra get_duty function for
verification.
BUG=b:241064591
TEST=passed the new test in CL:3792590
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: Ife27e29bd615f37733b3592c9c8b0a6df61defb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3825344
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL fixed a bug that EC can't detect the boot key correctly if GSC
asserts KSI2/3.
When all columns have row2 or 3 asserted, read_matrix() tries to "fix"
this by adding more keys to the state array. This causes the
check_boot_key() function rejects the adjusted state.
To fix this, add another workaround step before the ghost key detection
to remove the rows affected by GSC.
BUG=b:239674288,b:236580049
TEST=with gsc firmware from b/239674288$comment9,
verify tentacruel able to enter recovery mode
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I3df2e56e0537446954e2b5de24bf849c2189d211
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3795747
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cleanup existing usages and corresponding dependencies on modifying
instances of struct i2c_emul so they do not serve as bad code examples
for future emulator development.
Remove reliance on setting these fields from emulators and tests
alike. This includes migrating where we rely on i2c_emul internal fields
to get a pointer to an emulator to using the EMUL_DT_GET macro.
BRANCH=none
BUG=b:241981636
TEST=twister -T ec/zephyr/test/
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I0ed864eee0795465ed4d54d498199b95f7fddc62
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3821052
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set read_fail_reg to I2C_COMMON_EMUL_NO_FAIL_REG on
i2c_common_emul_init(). It should be there to make emulators working as
the default state. This line of code was there before but was removed by
mistake.
BUG=None
TEST=./twister -T zephyr/test/drivers
BRANCH=None
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I3c037b6d357d9b54b773f79ba5be76ca26a0648b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3810443
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The i2c_emul_register() function now takes only two arguments, starting
from commit 59d9193df17f2de8e7dd075823c524183bf6f0de in the zephyr
repository. PS8xxx emulator has to be aligned to new API.
BUG=None
TEST=./twister -T zephyr/test/drivers
BRANCH=None
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I074e747ae3efb72f2ebf8bc5aa38f65fcf5cffb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3810442
Tested-by: Tomasz Michalec <tmichalec@google.com>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove these includes as they're not needed in this header. Instead,
the includes should go where they're actually being used.
BRANCH=none
BUG=b:240574048
TEST=make buildall -j
TEST=zmake build -a
Signed-off-by: Yuval Peress <peress@google.com>
Change-Id: I64b10af3216654b2a20caa1cabd267661a0bca39
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791980
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is not used anywhere and is causing problem with downstreaming
since the label is being removed.
BRANCH=none
BUG=none
TEST=zmake testall
Cq-Depend: chromium:3813331
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I1b900670bde540a745648eb72e7801dec74272b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3811111
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add all the missing include/ prefixes to the various #include around the
zephyr tests so that they build with LEGACY_INCLUDE_PATH=n.
BRANCH=none
BUG=none
TEST=zmake testall
Cq-Depend: chromium:3807663
Change-Id: I81cea4f291eea61e674ef2fa61bdc60407c5f142
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3810411
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the emulators to use EMUL_DT_INST_DEFINE and EMUL_DT_GET instead
of EMUL_DEFINE and EMUL_REG_NAME, because the latter have been removed
upstream.
BUG=b:224588313
TEST=zmake testall
BRANCH=none
Cq-Depend: chromium:3806745
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: If358bd2bcfe9b99df0a671e2542a94deb5fad8f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805535
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 5V fixed source cap may have a number of testable fields we'd be
interested in, such as the power offered or static capabilities
advertised. Store it for the tests to reference, and allow them to
clear it when desired.
BRANCH=None
BUG=b:237256250
TEST=zmake testall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ic396be8ca30ba5f1a86c1da1fe60a7a4c66dbea1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3789837
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Side effects of I2C write messages should be applied only after actual
write message. Selecting register before an I2C read message isn't
considered as a write message.
BUG=None
TEST=zmake -D test test-drivers
BRANCH=None
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I95871d1b518c7211ff1e56b74598e7ba35358d41
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3785335
Tested-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate the existing emulators and tests to use the new upstream
emulator API. Majority of these changes was the removal of struct
i2c_emul usages in favor of direct usages of struct emul.
BRANCH=none
BUG=b:240291860
TEST=zmake test -a
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Cq-Depend: chromium:3776856
Change-Id: I09c509ffc34ac3b28fbd4dece0acebcc36cc0932
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3781964
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace all instances of $(dt_compat_enabled, ...) with the equivalent
auto-generated Kconfig symbols.
BRANCH=none
BUG=none
TEST=zmake testall
TEST=zmake build brya and diff the .config
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Cq-Depend: chromium:3776850
Change-Id: I3a86a934182d3277aab7e5a545a4ca2d5cfedfb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779894
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add additional enum that is created based on used I2C ports from
devicetree.
Use the new enums to create i2c enums listed in the named-i2c-ports
node. The named-i2c-port enums that point to the same i2c port have
the same value.
The change should allow getting the i2c enum value from the
named-i2c-ports node and the i2c port node(the node created by the chip
vendor) alternately. It will be useful in process of moving usbc chips
e.g. bc12 under the i2c bus, not in the named-usbc-port node.
Since i2c enums using the same port have the same value, the
i2c_physical_ports is no longer needed.
The commit reduces the usage of memory a bit because I2C_PORT_COUNT is
lower and initialization of i2c_physical_ports isn't needed.
Also, change how the enum values are defined in the dts files. Only one
node should be created per physical i2c port and define multiple enum
values.
BUG=b:228240586
TEST=zmake testall; make sure all i2c ports work
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I95c3f6845cfb71a69d408f33a6c7b22383f10028
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763905
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr upstream deprecated DT_BUS_LABEL(node_id) and
DT_INST_BUS_LABEL(inst) macros causing a CQ build failure and blocking
Zephyr downstreaming.
Replace code occurrences of DT_INST_BUS_LABEL(inst) with
DT_LABEL(DT_BUS(DT_DRV_INST(inst))). This macro was only used in
emulators.
BRANCH=none
BUG=b:239447869
TEST=zmake test test-drivers # With breaking commit in downstreamed Zephyr
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: If745caeb1273c7e51331bd45b17dc28960c7f8da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3767857
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Does not look like this was used anywhere.
BRANCH=none
BUG=b:239165779
TEST=zmake testall
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ia196dbea753f8790fd4e52a3ee505815ebd3afd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763910
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The smart battery driver and other tests may change the smart battery
"capacity" and "full capacity" parameters without resetting them. This
can lead to bad state later on represented as flaky tests.
Add a ZTEST_RULE to reset the capacity and full_capacity values to their
defaults defined in devicetree after each test.
BRANCH=none
BUG=b:233103160
TEST=zmake test-drivers
TEST=shuffle_test.sh
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: If7bfb364a0398b5121eb935e2394d0940e04f27f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3761216
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Tricium: disable
Change-Id: Iea81aa4f4291eeb7489de760b2384102e3ed9df5
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749525
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the PD partner emulator, track the number of attempts by the TCPM to
enter DisplayPort mode. This will support tests to verify that the TCPM
does not retry DP mode entry forever.
BUG=b:235984702
TEST=zmake testall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I3cae20a37610194b60cba3c26d4b84cefa58c415
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3733068
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Tricium: disable
Change-Id: Id9e097a5408ffed37baa93926219cb3e7ea94e64
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730703
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I1c26c944c7d4dd4401449244c763d16f9bd02e36
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730707
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Ic45bcae0c25cb86efe934773ee9b38cb07f704c2
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730692
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Id9bcbf4a73816b3f04fc18d404a811faefbcf5e2
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730685
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I03b744dc2954361ad4a00755e5c7bf8799ccad23
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730695
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I1773982d45519b94b640910b8e0854f4833aacc6
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730705
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|