| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test is timing out on gitlab, increase timeout to 6m.
https://gitlab.com/zephyr-ec/ec/-/jobs/4264180403
BUG=None
TEST=None
Change-Id: I5a18e20091825f649d29b29950644f1121b90ed6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4523022
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have a v1 anymore, so the name makes no sense. Move it into
the existing file.
Include charge_state.h instead of v2, doing this in the same change to
avoid build errors.
This makes no functional change.
BUG=b:218332694
TEST=make buildall
Change-Id: Ic3e3adc45e4d002c2cd5ba8aa65e24686e01d628
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516191
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have enum charge_state_v2 and used to have enum charge_state. Try
to avoid using charger_state in the source except as an enum.
This makes no functional change.
BUG=b:218332694
TEST=CQ
Change-Id: I3e53843799b7a6258cf636c11df47389b8d98123
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516190
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests for the `8042` set of console commands in `keyboard_8042.c`,
covers about 100 new lines.
BUG=b:281691908
TEST=./twister -s drivers/drivers.keyboard_8042
Change-Id: I1e28e0258305d0e1d17571346fcdca8f19102cb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520583
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
Tested-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Auto-Submit: Tristan Honscheid <honscheid@google.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many old boards are out of flash space, which makes porting safe mode to
older boards difficult. To make this process smoother shorten strings so
less flash space is needed.
BUG=None
TEST=Safe mode runs
Change-Id: I0934f1a477b01e7c8f71241844ac0eefa093c5ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4519102
Commit-Queue: Rob Barnes <robbarnes@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Rob Barnes <robbarnes@google.com>
Auto-Submit: Rob Barnes <robbarnes@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add unittest for ICM42607 accel+gyro sensor.
Note that we've already hit the hard limit of motion sensor count in
zephyr/test/drivers/default/, so this one is implemented as a
standalone test.
Also fixed an endian bug in driver/accelgyro_icm42607.c.
BUG=b:272665228
TEST=twister
Change-Id: Ia52a81e671a981fc0f003d07c7f59ca3d0c24233
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4497324
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whiterun uses a custom fan duty control logic.
Implement a unit test for it.
Two global structures that describe fan and its state were mocked.
The test makes a really simple fan pseudo-emulation, i.e. after fan duty
is change the RPM is adjusted taking inertia into account.
BUG=b:279493434
TEST=./twister -i -T zephyr/test/skyrim/
Change-Id: Id32dd8c8ee76420a83de25b23837b8df35ecabbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4479372
Tested-by: Kornel Dulęba <korneld@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Kornel Dulęba <korneld@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The A1 retimer needs to remain enabled in suspend in order to prevent
issues with USB detection on resume. Enable and disable on the
transition into/out of S5 instead.
BUG=b:273849234,b:280957965
TEST=on frostflow, ensure USB file transfer is able to resume after
suspend
Change-Id: I0186d54a76c14f3d0141fbeec75ed5b13aa599d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455299
Tested-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add tests ensuring we set the HPD gpio correctly for the AP when we get
VDM:Attention messages in for DisplayPort, and also wake the AP when
needed.
BUG=b:266714542
TEST=./twister -T ./zephyr/test
Change-Id: Ie9946477ae4b1a3e22b5cd92a02fe844a32ae5c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4218927
Tested-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `int_usba` interrupt configuration in dts is actually configuration
for XHCI init done interrupt, which is not equivalent to settings for
USB A port. Update the naming and the interrupt handler function name,
and remove the KConfig `VARIANT_CORSOLA_USBA` as this name does not
match to the actual effect and whether to have USBA related settings are
controlled by the usba.dtsi is imported or not.
BUG=b:274723043
TEST=`zmake build <all board> --clobber`, and the USB A port works on
Krabby proto 1 board.
Change-Id: I400990745804e059f22b02845a11d1367ea079f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4505770
Tested-by: Sung-Chi Li <lschyi@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add coverage to much of ocpc_config_secondary_charger() and
ocpc_calc_resistances()
BUG=b:276805061
TEST=./twister -T zephyr/test/ocpc
Change-Id: I78ca222fc44c087807d1419ae1dd15e1875b1b2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4504794
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Tested-by: Tristan Honscheid <honscheid@google.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OCPC code seems to use ERROR_UNIMPLEMENTED as a signal that it should
do some work, and SUCCESS as a signal that everything has been done.
Always returning success appears to cause incorrect charging behavior:
restore the unconditional ERROR_UNIMPLEMENTED that was removed in commit
ae68afbb5d58ce7af0be3e04f833900b105021cd and change the test to reflect
this.
A note is added to the definition of this driver field to document that
ERROR_UNIMPLEMENTED is an expected normal result.
BUG=b:280530115
TEST=Battery once again charges on Yaviks port C1 when
connected to a charger.
Change-Id: I491247148c523123206fefcdbcde62a92ea8caf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506012
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Peter Marheine <pmarheine@chromium.org>
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable CONFIG_PLATFORM_EC_GESTURE_HOST_DETECTION for
drivers.body_detection, to enable additional testing.
BUG=b:259754018
TEST=./twister -v -i -p native_posix -p unit_testing
Change-Id: I092e2c3e9c9b5db5a29adf15cfb338647058f514
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4484797
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Tested-by: Tim Van Patten <timvp@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current USB PD policy will only allow Vconn swaps when the AP is on.
This causes the EC to send a hard reset to USB PD partners instead of
trying to Vconn swap when the device is booting, leading to device
discovery issues in the kernel. This CL updates the Vconn swap policy to
allow Vconn swaps when PWR_ALL_SYS_PWRGD is asserted. During boot, this
policy prevents a USB PD hard reset from disrupting device discovery in
the cros-ec-typec driver.
BUG=b:274576896
TEST=emerge-rex chromeos-base/chromeos-zephyr, ./twister -T
zephyr/test/rex -c, checked that the EC did not hard reset with
connected partners during boot.
Change-Id: Ic9560509f4d7f6161bb001a80ba588f3d5108b13
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4484808
Commit-Queue: Jameson Thies <jthies@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jameson Thies <jthies@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two behavioral changes:
* sm5803_set_otg_current_voltage is modified to ensure it never attempts
to program an output voltage less than the minimum supported by the
chip, because that would program unintended bits.
* the SM5803 emulator is fixed to still build correctly if no interrupt
GPIO is specified, because not all users of the emulator care about
the interrupts (such as the newly-introduced secondary charger for
this test, allowing it to exercise OCPC-specific functionality).
BUG=b:242544165
TEST=./twister -ci -T zephyr/tests/drivers -s drivers.sm5803
Change-Id: I9df854d5e9666a833d209a0d98d6987c7b29e953
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4482276
Tested-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
design port0 ppc change from aoz1380 to sm5360
BRANCH=skyrim
BUG=b:260771028
TEST=1. zmake build crystaldrift
test port0 typeC function is ok
2. twister -T zephyr/test/skyrim
Change-Id: I4c33c1004d18a07e84cb9390ccf1b686e71c9da7
Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4493843
Commit-Queue: Chao Gui <chaogui@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:277862759,b:267589042
TEST=./twister -T zephyr/test/rex -c
Low-Coverage-Reason: Tracked in bug b:273928607
Change-Id: Ie002ea5796c45ba33e6915486c42929ba17a9dff
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415130
Commit-Queue: Madhu 🌱 <mparuchuri@google.com>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Tested-by: Madhu 🌱 <mparuchuri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL reduces the code size of the adc console command by removing
some redundancy.
BUG=None
TEST=twister -T zephyr/test/drivers -s drivers.default.console_cmds
Change-Id: Icd08d6b73adc25d1be0cd4a2f69ff38a65ed0ddf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4501179
Reviewed-by: Rob Barnes <robbarnes@google.com>
Commit-Queue: Rob Barnes <robbarnes@google.com>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add body detection tests.
Test results: http://go/259754018
BRANCH=none
BUG=b:259754018
TEST=./twister -v -i -p native_posix -p unit_testing
Change-Id: I6a9b8ce6bce718e9231987698f4943d6c5e04dbb
Signed-off-by: Tim Van Patten <timvp@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4484777
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On NX20P3483, it needs 2 dedicated TCPC GPIO to reflect the
VBUS sink and source control. There's no such binding now,
so we checked the TCPC POWER_STATUS instead, and it should have
the same functionality for the VBUS status checking.
BUG=b:272664811
TEST=./twister -ci -T zephyr/test
BRANCH=none
Change-Id: I05e73e16a4ddb1d22b812e672dbaaa366704f984
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4483239
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Tested-by: Eric Yilun Lin <yllin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two bugs in the driver were exposed by this test and are fixed:
* All 8 bits of IR_COMP_REG2 are used as resistance value (in addition
to bits 6 and 7 of IR_COMP_REG1), but the driver incorrectly masked
off bit 7 which would cause incorrect values to be programmed when
resistance is greater than 212 mΩ.
* sm5803_set_vsys_compensation always returned an error, which apparently
goes unchecked by regular charger code.
BUG=b:242544165
TEST=./twister -ci -T zephyr/test/drivers/ -s drivers.sm5803
BRANCH=none
Change-Id: I761c3523d9903c3498cfe30d93ddb56b004cc4ef
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4482275
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The BMA422 sensor provides interrupts. Enable these for all skyrim
variants using this chip for more accurate readings when the ODR is
changing frequently.
BRANCH=skyrim
BUG=b:278156424
TEST=on frostflow, ensure factory tablet test passes
Change-Id: Iafabd8ccf04cd4df970d6f0c1f77195ba340f76a
Signed-off-by: Diana Z <dzigterman@chromium.org>
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4460851
Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com>
Reviewed-by: Chao Gui <chaogui@google.com>
Commit-Queue: Chao Gui <chaogui@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the SM5803 emulator landed, this uses the required functionality to
test the board implementation of pd_is_valid_input_voltage(). The
emulator is modified to explicitly cast dt_flags for the interrupt GPIO,
because not doing so causes a warning (promoted to error) if using EC GPIO
flags that lie outside the 16-bit range supported by gpio_dt_spec.
BUG=b:267959470
TEST=twister -T zephyr/test/nissa
BRANCH=nissa
Change-Id: I7192cce5e7e3f08a148cddbf71d68b901d93dc2d
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4458507
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call set_offset with extreme values to exercise the clipping code.
BRANCH=None
BUG=b:278607671
TEST=./twister -T zephyr/test/drivers/ --coverage -s drivers.default \
-- --test=bmi160::test_bmi_gyr_set_offset_min_max &&\
lcov --list-full-path -l twister-out/coverage.info | \
awk '/accelgyro_bmi_common.c/ {print $2, $3}'
Change-Id: I3c3ca9ea638e6bb45e3d737019f34d71831a855e
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4454188
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new test binary that has a Nissa-style Kconfig and devicetree,
complete with chargers. Use this configuration to run OCPC
(common/ocpc.c) and test this module, which has never previously been
used in our tests.
This CL contains tests for ocpc.c's console commands.
BRANCH=None
BUG=b:276805061
TEST=./twister -T zephyr/test/ocpc
Change-Id: I34dbe1abcae98d8ca9aa9613dddf3b4ba2838792
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4438529
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reland of commit fd2415cda6a261b92390aad04829f46f33ffc9e6,
with sleeps in test_lpm increased from 4 to 10 seconds. This seems
to fix the flakiness that was observed, verified with no failures
over 8 CQ builds.
Original change's description:
> zephyr/tests: emulator and tests for sm5803
>
> This implements an emulator and some tests for the SM5803 charger. The
> current tests do not exercise the driver as comprehensively as intended,
> but those will be added in a later change.
>
> One discovered bug in the driver is fixed, where some interrupts were
> disabled immediately after being enabled.
>
> BUG=b:242544165
> TEST=twister -ciC -s drivers/drivers.sm5803
> BRANCH=nissa
>
> Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c
> Signed-off-by: Peter Marheine <pmarheine@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087
> Reviewed-by: Tristan Honscheid <honscheid@google.com>
BUG=b:242544165,b:278890420
TEST=`bb add chromeos/cq/firmware-zephyr-cov-cq
-commit https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4451846`
8 times, verified success for all builds.
Change-Id: Ifd0d486a45be2242023e6efba6457e7907aaedd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4451846
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Tested-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pd_power_supply_* functions are almost identical between krabby and
kingler. Since the krabby version is already tested, merge them to
reduce test code implementation effort.
BUG=b:272664811
TEST=1) ./twister
2) zmake compare-builds krabby kingler
BRANCH=none
Change-Id: If00c8576589ae657447a7adfb18c46907f47538c
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439254
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:278138274
BRANCH=none
TEST=Tested on ADL-RVP, retimer console command works
./twister -T zephyr/test/drivers
./twister -T zephyr/test/drivers -s drivers.default
./firmware_builder.py --metrics /tmp/tmp_pc1rc15 build
Change-Id: Idaec9b41f550ad6aafa34400e95ebf00b9c11348
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426790
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit fd2415cda6a261b92390aad04829f46f33ffc9e6.
Reason for revert: http://b/278890420 - test was flakily blocking CQ
Original change's description:
> zephyr/tests: emulator and tests for sm5803
>
> This implements an emulator and some tests for the SM5803 charger. The
> current tests do not exercise the driver as comprehensively as intended,
> but those will be added in a later change.
>
> One discovered bug in the driver is fixed, where some interrupts were
> disabled immediately after being enabled.
>
> BUG=b:242544165
> TEST=twister -ciC -s drivers/drivers.sm5803
> BRANCH=nissa
>
> Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c
> Signed-off-by: Peter Marheine <pmarheine@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087
> Reviewed-by: Tristan Honscheid <honscheid@google.com>
Bug: b:242544165
Change-Id: I315d36d1e08035f13d847ea1a21756ee3790216e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4448966
Commit-Queue: Aaron Massey <aaronmassey@google.com>
Tested-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements an emulator and some tests for the SM5803 charger. The
current tests do not exercise the driver as comprehensively as intended,
but those will be added in a later change.
One discovered bug in the driver is fixed, where some interrupts were
disabled immediately after being enabled.
BUG=b:242544165
TEST=twister -ciC -s drivers/drivers.sm5803
BRANCH=nissa
Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This file contains some utility functions that are fairly straightforward
to test, but requires more complex build configuration than the existing
sub_board tests because it requires the charger code be built in.
The SM5803 input voltage checks are not fully tested because the
isl923x driver does not implement get_battery_cells(); testing that will
require a SM5803 emulator.
BUG=b:267959470
TEST=./twister -T zephyr/test/nissa
BRANCH=nissa
Change-Id: Ic89f8f84b1889cfb4fe588fdd7c6f06a817e76c1
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402420
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL formats the led-pins devicetree to be more intuitive as part of
the LED driver overhaul. led-policy and led driver logic is unmodified
in this CL and will be added later.
BUG=b:228868616
TEST=twister, power LED verified on Villager, Lazor, Skyrim, Xivu
BRANCH=none
Change-Id: Ia688e872811199447d1e0b11a5533fd8478d2935
Signed-off-by: Jason Yuan <jasonyuan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426805
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Auto-Submit: zhi cheng yuan <jasonyuan@chromium.org>
Tested-by: zhi cheng yuan <jasonyuan@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The watchdog panic info may be set in watchdog handler or during system
pre init after the watchdog reset. It depends on the chip
implementation. For cortex-m on Zephyr, the watchdog panic reason is
not set in the watchdog handler.
The current logic in system pre init only sets the watchdog panic reason
when the current reason is not a watchdog. This means only the first
watchdog is reported. Successive watchdogs are ignored because the panic
flags are never reset. The panic flags will only be reset if a
non-watchdog panic occurs or EC memory cleared (FW update or 0 battery).
This change checks if the current watchdog panic is old. This is
inferred by checking for the PANIC_DATA_FLAG_OLD_HOSTCMD flag, which is
set when the host reads the panic info.
BUG=b:273516527
BRANCH=Zephyer NPCX boards
TEST=Succesive watchdogs are correctly reported in elog
TEST=drivers.system unit test
Change-Id: I91ec1bf75a85ea7fed978895a262ff74e6ac16c7
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415329
Commit-Queue: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test was causing inconsistent code coverage due to calling
set_offset with an uninitialized variable.
BRANCH=None
BUG=b:278607671
TEST=Ran test several times
Change-Id: I779096eb0b90deb040b50b1015bbffcf22fc0583
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4437750
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Aaron Massey <aaronmassey@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until recently we're used it only as lid accel, where no significant
precision is required. However in Winterhold we want to use it for
body detection. In order to reduce the noise and make it usable for that
purpose we need to set it into "high performance" power mode.
ODR is used to recognize the sensor purpose.
For lid accel it's set to 12.5Hz, assume that if it's at least 50Hz
the high performance is wanted.
BUG=b:262680246
BRANCH=none
TEST=Set ODR to 50Hz, verify high performance mode is on
Change-Id: I8c4decc93d2f2cfcc074cf2399f5cb582eb72696
Signed-off-by: Kornel Dulęba <korneld@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379149
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=None
BUG=b:267629295
TEST=./twister -T zephyr/test -c
Change-Id: Ibcf176f10860cc126b267908faba054df256c3d4
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4414226
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add base board power signals test for skyrim.
BRANCH=none
BUG=b:247151116
TEST=Ran tests
Change-Id: Ibace231b5123724a796d77535325f4ae1aede5f0
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4354876
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the GPIO flags match for the PPC interrupt in the named-gpios node
and the ppc device node. Eventually the named-gpios node will be
eliminated, but it is currently needed to configure the GPIO pin.
BUG=none
BRANCH=none
TEST=twister
Change-Id: Iea28bdf5c29386f19576ad64ed149120a08f0f74
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426792
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a named-i2c-port stub to pass the build check
BRANCH=none
BUG=b:278274316
TEST=./twister -T zephyr/test/rex -c
Change-Id: Iae04f5a1e8dc52c8025b7394e448520c867d046f
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4416742
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add TCPC alt support for all TCPCs and tests to test the
working of TCPC alternatives
BRANCH=none
BUG=b:274126703
TEST=./twister -s drivers/drivers.usbc_tcpc -c
Change-Id: Icafdaf8b940b09cfc3c17ed124e1b4a0a9427d01
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4375619
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The krabby.tentacruel devicetree overlay doesn't override the
unused-pins node like the real board does. The unused-pins node is not
covered by any tests, so delete the node.
BUG=none
BRANCH=none
TEST=./twister
Change-Id: I5fc8f0a047b9e0a922a0f51874ea0a4d5d32d200
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387258
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add usb_mux_config tests for the skyrim variant.
BRANCH=none
BUG=b:247151116
TEST=Ran tests
Change-Id: Ibdfb34198335562f44849dfc6532856fb30a144e
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4345937
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Board tests may want to have a basic check to ensure that tunings are
getting set, while the actual full testing remains in the ANX7483
emulator tests. Add `anx7483_emul_validate_tuning` function to
facilitate this.
BRANCH=none
BUG=b:247151116
TEST=Ran tests
Change-Id: I88ce43b079db98d16aedf561a463df0046c4460b
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4354875
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add `anx7483_emul_test_get_eq` function. This function will be useful
for board tests.
BRANCH=none
BUG=b:247151116
TEST=Ran tests
Change-Id: I88ca9ee6d73eac7db513633f2fdfe590fea8ef92
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4345936
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add shared usb_mux_config test code file to contain tests that are
common to all variants.
BRANCH=none
BUG=b:247151116
TEST=Ran tests
Change-Id: I2a03bce7e757762f0ee13b9bf8841b26484284c5
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4345935
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds test to verify if s0ix counter is
incremented on change to s0ix state.
BUG=b:261869264
TEST=Run with twister
BRANCH=none
Change-Id: Ic0d53d01fe84207999ce1007e5081097464b1b6b
Signed-off-by: Grzegorz Bernacki <bernacki@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239447
Reviewed-by: Robert Zieba <robertzieba@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commits add test the verifies if s0ix counter
gets incremented on change state to s0ix.
BUG=b:261869264
TEST=Run with twister
BRANCH=none
Change-Id: Iae5aecb4a6feec84d233f296b0215e54f6c60abb
Signed-off-by: Grzegorz Bernacki <bernacki@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239446
Reviewed-by: Robert Zieba <robertzieba@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides implementation of trng_rand_bytes() using Zephyr's
entropy API. Zephyr driver is responsible for hardware initialization,
enabling and disabling, so trng_init() and trng_exit() are no-op.
Add hostcmd and console command which can be used to test random number
generator. Both commands have unit tests implemented.
BUG=b:277029648
BRANCH=none
TEST=zmake build bloonchipper
TEST=Enable CONFIG_PLATFORM_EC_CONSOLE_CMD_RAND and compile firmware.
Use 'rand' command to check if random values are generated.
TEST=./twister -v -i -T zephyr/test/drivers/ --test drivers.random
Change-Id: I3fa2c6a1aaf84dc23a8fbb06e557d9e07f5d1d32
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4381919
Tested-by: Patryk Duda <patrykd@google.com>
Commit-Queue: Patryk Duda <patrykd@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL fixes expressions used to convert ACProchot register values
to/from the current.
There is no functionality change because the register happens to use
identical conversion. That is, 128 mA <-> 0x80, for example.
BUG=b:277280318
BRANCH=None
TEST=./twister --toolchain host -T zephyr/test/drivers -s drivers.isl9241
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I7c2d6c8b1819c5031306de4ea421193828359290
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409985
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ANX7452 retimer configuration
Add SYV682 PPC configuration
Add RT1716 TCPC configuration
Update the CBI lookup for DB type method with ANX7452 DB type
BRANCH=none
BUG=b:267589042
TEST=./twister -T zephyr/test/rex -c
Change-Id: I8ecfb731fc4a18bc7ae718a483b5bc4d3f9ec6a1
Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4345598
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|