summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Skyrim: Enable SoC OCP InterruptDiana Z2022-10-104-2/+40
| | | | | | | | | | | | | | | | | | Enable interrupt for SoC OCP, and shutdown with a log print if one occurs. LOW_COVERAGE_REASON=no unit test for skyrim board yet: b/247151116 BRANCH=None BUG=b:237563166 TEST=on skyrim A4 and D4, verify system can boot with no unexpected shutdown Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I822e31dfdc91fdde14ea428a4958a15dfd179d87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749802 Reviewed-by: Robert Zieba <robertzieba@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* flash_fp_mcu: Add support for 5.15+ kernel on Zork and GuybrushPatryk Duda2022-10-101-15/+38
| | | | | | | | | | | | | | | | | | | | Zork-kernelnext and guybrush-kernelnext are using 5.15 kernel which assigns different number to GPIO (shifted by 512). Change config in 'flash_fp_mcu' accordingly. BUG=b:251236295 BRANCH=none TEST=Run 'flash_fp_mcu --hello' on zork, zork-kernelnext, guybrush, guybrush-kernelnext. Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I9ed744bef6e74a55270ad7bc2ca4b0fdb68ed1f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3942064 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Patryk Duda <patrykd@google.com> Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com>
* zephyr: remove the msg NULL parameter in ztest macrosMichał Barnaś2022-10-1064-1361/+1334
| | | | | | | | | | | | | | | | | This commit removes the last NULL parameter that was required by the zassert_* and zassume_* macros. BRANCH=main BUG=b:242982518 TEST=run twister Change-Id: I8970ee0a755e103367c5edcdf0fd469337c66721 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3838329 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Michał Barnaś <barnas@google.com> Tested-by: Michał Barnaś <barnas@google.com>
* rex: Add "dynamic-speed" propertySubrata Banik2022-10-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables `dynamic-speed` property for I2C4. For Rex platform, PD (parade/ps8815) is attached to the I2C4. BUG=b:248775521 TEST=Able to perform PD sync without any error Update auxfw 0 CBFS: Found 'ps8815_a2.bin' @0x18df00 size 0xfc1 in mcache @0x75c2d49c vb2_digest_init: 4033 bytes, hash algo 2, HW acceleration enabled ps8815.1: found SPI flash ID 0xef11 ps8815.1: updating base FW ps8815.1: erased 4KB in 128ms ps8815.1: erased 64KB in 1712ms ps8815.1: verified 0KB in 6ms ps8815.1: programming 64KB... ps8815.1: programmed 64KB in 547ms (54867B skipped) ps8815.1: verified 64KB in 3518ms ps8815.1: reset MCU ps8815.1: vendor 0x1da0 product 0x8815 device 0x0003 fw_rev 0x28 Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I79c94083c60f2a97273c03d5c2569d3350e0eed4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935738 Tested-by: Kapil Porwal <kapilporwal@chromium.org> Commit-Queue: Subrata Banik <subratabanik@chromium.org> Reviewed-by: Kapil Porwal <kapilporwal@chromium.org>
* rex: Enable `CONFIG_PLATFORM_EC_HOSTCMD_I2C_CONTROL` configSubrata Banik2022-10-101-0/+1
| | | | | | | | | | | | BUG=b:248775521 TEST=Able to build and boot Google/Rex Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I928a1715cbd560282d67aeecf835da53711e599d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3930043 Reviewed-by: Kapil Porwal <kapilporwal@chromium.org> Tested-by: Kapil Porwal <kapilporwal@chromium.org> Commit-Queue: Subrata Banik <subratabanik@chromium.org>
* rex: Enable `CONFIG_PLATFORM_EC_CONSOLE_CMD_I2C_SPEED` configSubrata Banik2022-10-101-0/+1
| | | | | | | | | | | | BUG=b:248775521 TEST=Able to build and boot Google/Rex. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I2e425690fbe081eba6e4e53fab955f41813709f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3924978 Reviewed-by: Kapil Porwal <kapilporwal@chromium.org> Tested-by: Kapil Porwal <kapilporwal@chromium.org> Commit-Queue: Subrata Banik <subratabanik@chromium.org>
* nissa/vif: report DFPs as PDUSB hostPeter Marheine2022-10-104-8/+8
| | | | | | | | | | | | | | We now use CONFIG_SVDM_RSP_DFP_ONLY, which reports the product type as PDUSB Host. Update VIFs accordingly. BUG=b:242671457 TEST=XML changes match equivalent change in the VIF editor tool BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I1e03bf8158a10a6c5e999ee32556f7996fe9ae29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3941324 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr/usbc: implement a default DFP-only SVDM identityPeter Marheine2022-10-0911-0/+320
| | | | | | | | | | | | | | | | | | | | | | | | | Recent PD specifications require that devices with multiple DFPs respond to Discover Identity commands, even if they don't support any modes as responder. This implements a default handler for those commands appropriate for such devices that reports DFP-only operation, enabled by config and default-on for devices that aren't DRDs nor need extra SVDM support (such as for USB4 or TBT). This is implemented only for Zephyr (no equivalent implementation for legacy EC-OS) because it is expected that new devices which might benefit from it will all be using Zephyr. BUG=b:242671457 TEST=nereid now responds to Discover Identity, new test passes BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I2d11ced6928ae65ca00d20a1646509281080243b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3868882 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* adl_ish_lite: add ISH firmware for ADLstabilize-15174.B-mainLi Feng2022-10-084-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISH and UFS are in same PCI slot function 0. To enable UFS, ISH has to be enabled too. This ISH firmware is a lite version; only provides power management. If no activities, ISH will be in deep sleep all the time. BUG=b:234136500 BRANCH=none TEST=make BOARD=adl_ish_lite TEST=on ADLP RVP Flash ISH enabled Coreboot (ISH BUP and loader are stitched to CB) Copy ec.bin to DUT's file system: /lib/firmware/intel; Rename it as adlrvp_ish.bin and "sync". Reboot system, host dmesg shows ISH main firmware is loaded. And ISH console shows ISH is in deep sleep. dmesg: "ish-loader {C804D06A-55BD-4EA7-ADED-1E31228C76DC}: ISH firmware intel/adlrvp_ish.bin loaded" EC console: "[15.038421 Disabling console in deep sleep] " Signed-off-by: Li Feng <li1.feng@intel.com> Signed-off-by: Guangfu Hu <guangfu.hu@intel.com> Change-Id: I93877d7f50af985a63895bbb7785ca67d0ec0747 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925007 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* ish: add HOSTCMD task checkLi Feng2022-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | host_packet_receive() is defined when HOSTCMD task is enabled; so add a check of HOSTCMD; otherwise there is build error for board which doesn't enable HOSTCMD task. One of ISH solutions is to provide power management functionalities. It powers on ISH and puts it in deep sleep. HOSTCMD task is disabled in this case to avoid waking up ISH periodically. BUG=b:234136500 BRANCH=none TEST=build tglrvp_ish Signed-off-by: Li Feng <li1.feng@intel.com> Signed-off-by: Guangfu Hu <guangfu.hu@intel.com> Change-Id: I64cd6ad4d292847d477f08708ece4d41b4e94650 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3892628 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* core/host: Add implementation for host panicTom Hughes2022-10-071-0/+36
| | | | | | | | | | | | | | | | | | panic_set_reason() and panic_get_reason() are called from system_common_pre_init() if CONFIG_SOFTWARE_PANIC is enabled. A followup commit removes CONFIG_SOFTWARE_PANIC since all boards enable it, so we need stub implementations for the host in order to successfully compile. LOW_COVERAGE_REASON=legacy code BRANCH=none BUG=none TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I33322b593f707f3c8937f4a7cd2189841b197aa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935024 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* ec: Don't declare forward decls as weakJeremy Bettis2022-10-0712-36/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a function in a header is marked as weak (test_mockable), that tells the linker that it is ok for the symbol to be missing. We never want that. If a function implementation is marked as weak, that tells the linker it is ok to use a non-weak symbol instead of this one. This is what we want when we are trying to override functions. Remove all test_mockables from headers, except for one inline function that I wasn't sure what to do with. BRANCH=None BUG=None TEST=make -j$(nproc) runhosttests buildall && zmake build -a && \ ./twister -v -i --clobber LOW_COVERAGE_REASON=Added stub get_ap_reset_stats() for tests that don't care about that function, and it's always unused. Change-Id: Ic00a897131c93ef134544f26a8e368ce1f78a5de Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935720 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tristan Honscheid <honscheid@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: tests: Fix bug in crec_flash_is_erased__* testsTristan Honscheid2022-10-071-9/+9
| | | | | | | | | | | | | | | | These tests were using an invalid size when trying to erase flash causing the test to get skipped unknowingly BRANCH=None BUG=b:251471020 TEST=./twister --clobber -i -s zephyr/test/drivers/drivers.default Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Icdc08d371f74ab193a0ff08f31c6bcff6aa5be47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3939826 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Aaron Massey <aaronmassey@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: eSPI: disable interrupt before sysjumpJun Lin2022-10-071-0/+10
| | | | | | | | | | | | | | | | | | | | This commit disables the host interrupts before sysjump. This prevents the ISR from trigger during sysjump to cause the unexpected symptom. BANCH=none BUG=b:246963730 TEST=in skyrim, the hostcmd broken after sysjump symptom is fixed by the related PR and CL. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I861c907b0c251c642ae3e59d1a6553c3c52be38a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937849 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: CH Lin <chlin56@nuvoton.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* test: shim system.c system_get_chip propsAaron Massey2022-10-071-0/+37
| | | | | | | | | | | | | | | Add test that verifies the system_get_chip_vendor/name/revision() all invoke the chip-specific cros_system device driver routines. BRANCH=none BUG=b:236074898 TEST=twister --clobber -i -s zephyr/test/system_shim/system_shim.default Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I1291ec392c69f8fa6f81dc7fa1a567296a4f4df7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935638 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* test: shim system.c system_hibernate()Aaron Massey2022-10-072-1/+72
| | | | | | | | | | | | | | | | Add test that verifies the system_hibernate() function calls the chip-specific cros system routine for hibernation and can respond to an error from the aforementioned test without going into an infinite loop. BRANCH=none BUG=b:236074898 TEST=twister --clobber -i -s zephyr/test/system_shim/system_shim.default Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: Ice3aed18d7f9f858263aac4aecc980ca6720bfe1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3936482 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util: Change flash_ec file check to exists checkCraig Hesling2022-10-071-1/+1
| | | | | | | | | | | | | | This allows passing a pipe file as the image, which could be used to invoke flash_ec thorough ssh and a pipe for the image file. BRANCH=none BUG=b:176500425 TEST=ssh DUT -- flash_ec --board=bloonchipper "--image=<(cat)" <.../ec.bin Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I509037626e8c7299613ebdaf5391edfa0cf6a6fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937047 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: tests: Test motion_lid.c host commandTristan Honscheid2022-10-075-0/+132
| | | | | | | | | | | | | | Test the motion_lid.c subcommands of the motion_sense host command. BRANCH=None BUG=b:250726941 TEST=./twister Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ifb496e7e7d1bf91d320b6dce04a4e90c13975954 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3934412 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: tests: Test `hash` console cmd in `common/vboot_hash.c`Tristan Honscheid2022-10-074-0/+255
| | | | | | | | | | | | | | Test the `hash` console command and verify the hashes it returns BRANCH=None BUG=b:236074638 TEST=./twister Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I56205425272632ee8ec9f559bf369223189d00ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932113 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: tests: Test remaining functions in `common/util.c`Tristan Honscheid2022-10-072-0/+98
| | | | | | | | | | | | | | | Add tests for reverse(), parse_offset_size(), wait_for_ready(), binary_from_bits(), and ternary_from_bits() BRANCH=None BUG=b:249823196 TEST=./twister Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: If90c33fdbc9bd25dc52a3aa3f5141c90de4b7296 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925111 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* util: Add --fix to check_clang_format.pyJeremy Bettis2022-10-071-4/+14
| | | | | | | | | | | | | | | | | Add an option --fix to util/check_clang_format.py to easliy fix all formatting problems. BRANCH=None BUG=None TEST=./util/check_clang_format.py --fix Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I7e3c4d57c29da89d5ca27503e52d8362f0c0a1e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3939649 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* TCPMv2: modify default rp value when bist share modeScott Chao2022-10-073-1/+13
| | | | | | | | | | | | | | | | | Modify default rp value when bist share mode in order to pass the TDA.2.3.1.1. BUG=b:242957100 BRANCH=none TEST=Pass TDA.2.3.1.1 TEST=make host-coverage-usb_typec_drp_acc_trysrc TEST=make test-coverage Change-Id: I873c9a2bb135e69c24df7891215c84c0603e6d73 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3906517 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Add expected skips for tests that skipAl Semjonovs2022-10-071-0/+4
| | | | | | | | | | | | | | | These flash tests are currently being skipped. Set this as expected until failed assumptions are fixed. BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I5f06b41c4ae352c57a44480e60f5897da43a6ca9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935719 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: Return failure when tests are skippedAl Semjonovs2022-10-071-0/+23
| | | | | | | | | | | | | | | | | Prevent tests that are skipped pass CQ BUG=None BRANCH=NONE TEST=Verify FAILURE on ./twister -T zephyr/test Add ZTEST_EXPECT_SKIP for expected skips and verify SUCCESS on ./twister -T zephyr/test Cq-Depend: 3935719 Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I546f27fe4f19136609612f5139cff4b4dc1da4ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935718 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* rt9490: remove set_mode functionTing Shen2022-10-071-28/+0
| | | | | | | | | | | | | | | | The flags we implemented is not used anywhere in the codebase. BUG=none TEST=zmake BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I72b01806463aec903b1bfe23bb1c12a58a97265d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3896556 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* krabby: disable charger otg functionTing Shen2022-10-071-1/+0
| | | | | | | | | | | | | | | We don't need this. It was previously used to source detachable base. BUG=none TEST=zmake BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I597facaac26a6264e3a6faef2c29a50206355926 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3896557 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* crota: modify fan actual RPM logElsie Shih2022-10-071-1/+1
| | | | | | | | | | | | | | | Modify fan actual RPM log for recording actual RPM every 2 minutes. Deadline won't update in S0ix, so get the current time to avoid recording actual RPM every second. BUG=b:251019895 BRANCH=none TEST=make BOARD=crota Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com> Change-Id: Id3332a705bcd0a274848a86d36848163c3eefc6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3928458 Reviewed-by: caveh jalali <caveh@chromium.org>
* Frostflow : Remove FW_CONFIGridden_liu2022-10-076-179/+1
| | | | | | | | | | | | | | | | | Frostflow io-db only has the combination of PS8811-PS8818, convertible, and FAN models, so delete the unuse FW_CONFIG code. LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116 BUG=b:246873434 BRANCH=none TEST=zmake build frostflow success. Signed-off-by: ridden_liu <ridden_liu@compal.corp-partner.google.com> Change-Id: I6b32d4bc203608c9cf0e914c6b936b763ab1ddd5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3928625 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* TCPMv2: Add bist share mode console commandScott Chao2022-10-073-0/+60
| | | | | | | | | | | | | | | | | | This CL enable bist share mode control by ec console. BUG=b:242957100 BRANCH=none TEST=pd bistsharemode [disable|enable] TEST=./twister -v -T zephyr/test TEST=make run-usb_pd_console TEST=make buildall TEST=make test-coverage Change-Id: I3aaaf91eaa1321d57fd773bba18d126ead29f944 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3924556 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Frostflow: implement keyboard matrixLeo-Tsai2022-10-076-0/+271
| | | | | | | | | | | | | | | | | enable customization define, implement customization matrix LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116 BRANCH=none BUG=b:246873434 TEST=zmake build frostflow pass Signed-off-by: Leo-Tsai <leocx_tsai@compal.corp-partner.google.com> Change-Id: I56877bc5efb6a285f0fc9bed7dbddd6a031ac881 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3929903 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com>
* typec: Clear stale hard reset event when readyAndrew McRae2022-10-065-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | When entering PE_SNK_Ready or PE_SRC_Ready, clear the PD_STATUS_EVENT_HARD_RESET flag so that the kernel does not receive stale events (which can disable the USB port). The hard reset can be triggered if the EC cannot distinguish between a reset and a power-on reboot (such as occurs with the IT81302), and so is flagged as a power-on. A power-on reset flag will reset the PD connection. The hard reset PD status event flag is set, and then PD negotiation may proceed and complete. Eventually the kernel starts, and will read the PD status, and see the (now stale) hard reset event flag, and take action to disable the USB port. BUG=b:231401624 TEST=zmake build nereid; Enter recovery via keyboard BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Icc179d19e0a0b6fce215021e464516471cdd47cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3897917 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* test: shim rtc RTC_GET/SET_VALUE host commandsAaron Massey2022-10-067-1/+57
| | | | | | | | | | | | | | | | | | | | Verify the EC_CMD_RTC_GET/SET_VALUE host commands by setting the value to two different arbitrary values via the SET host command and subsequently retrieving these values via the GET host command. Also adds a new test-binary under the drivers tests for shim rtc code. BRANCH=none BUG=b:236161110 BUG=b:236160901 TEST=twister --clobber -i -s zephyr/test/drivers/drivers.shim_rtc Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I8b843c15d7f73e6905caccfec5a3ee5046bbfff8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3938407 Reviewed-by: Wai-Hong Tam <waihong@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* zephyr: Verify TASK_EVENT_RESET_DONE handlingAl Semjonovs2022-10-061-3/+9
| | | | | | | | | | | | | | | Validate pd_task_loop EVENT_RESET_DONE handling BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I98d4f4ed94f32ec6f58dec3f7154b8628a44f946 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935860 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* test: Make zassume in util zassertAaron Massey2022-10-061-16/+20
| | | | | | | | | | | | | | | | | | | The zassume macro loudly fails a build when it fails in a setup/before/teardown. However, it does not fail the build loudly when it fails in a test. Temporarily make all zassumes in util zasserts until zassume failures in a test fail the entire test. BRANCH=none BUG=b:251281997 TEST=/twister --clobber -i -s zephyr/test/drivers/drivers.default Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I8545ce8db5e94e997ec70f25283d7de9c7b75237 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937223 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* winterhold: change the charger from ISL9241 to ISL9238Matt Wang2022-10-063-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Modify the charger from ISL9241 to ISL9238 BUG=b:249707388 BRANCH=none TEST=zmake build winterfold skyrim frostflow morthal success TEST=Can get the ISL9238 charger by console cmd "charger" on Whiterun TEST=Charging/ discharging normal on Whiterun. LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116 Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: Ie23d69b44654502a061be473c20303292197dcb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932380 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Diana Z <dzigterman@chromium.org> Code-Coverage: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
* skyrim: separate the charger from i2c_common to the respective dts fileMatt Wang2022-10-065-6/+26
| | | | | | | | | | | | | | | | | | Separate the charger to the respective dts file so let each board can change the charger. BUG=b:249707388 BRANCH=none TEST=zmake build winterfold skyrim frostflow morthal success LOW_COVERAGE_REASON=Skyrim board tests not created yet: b/247151116 Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: Icc83e92b44e674a1ad52e1c56e345b65656c0585 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932275 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* zephyr: Move root cmakestabilize-15167.B-mainYuval Peress2022-10-064-25/+32
| | | | | | | | | | | | | | | | Move the root level CMake for the EC module to the top level directory. This will simplify future changes where zephyr logic is intermixed with legacy EC logic during the migration effort. BRANCH=none BUG=b:246839061 TEST=zmake build -all && ./twister -v Change-Id: I5e67310b2237aeffdf8033c5cf1201cb67559158 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3932868 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: test pause event loopAl Semjonovs2022-10-061-0/+18
| | | | | | | | | | | | | | Validate pd_task event loop pause APIs BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I65450cd8652ca5c95978bb0e52c57b46187b908d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935301 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* rex: zephyr: test: Setup unit test environmentmparuchuri2022-10-067-0/+58
| | | | | | | | | | | | BUG=b:247796816 BRANCH=None TEST=./twister -T zephyr/test/rex --clobber Signed-off-by: mparuchuri <mparuchuri@google.com> Change-Id: I9451056c8707f3e7d9c3d6d0f9f7aa5a94a576d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3931332 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* Revert "evoker: Enable backlight control"Yu-An Chen2022-10-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 003f969d94550ee09c3de16de6430fd7c98f4a10. Reason for revert: changed backlight brightness to PMIC control Original change's description: > evoker: Enable backlight control > > Enable backlight control > > BUG=b:241512602 > BRANCH=none > TEST=zmake build evoker > > Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> > Change-Id: Ib8a542cfb1732b5ce65397ecdc2870c8b3708f15 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826465 > Reviewed-by: Wai-Hong Tam <waihong@google.com> > Commit-Queue: Wai-Hong Tam <waihong@google.com> Bug: b:241512602 b:249434213 Change-Id: Ia191c4a0245fc2443ab40166c9304f822aa67e60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935727 Auto-Submit: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
* sm5803: disable sinking before other reconfigurationPeter Marheine2022-10-061-5/+11
| | | | | | | | | | | | | | | | | | | | | Silicon Mitus say that writing to flow2 enable bits when flow1 is set to an active state (sinking or sourcing) will have no effect, and a silently failed write like that may lead to unexpected (but not dangerous) behavior because the enable bits will not be in the expected state. Most code paths already satisfy this, but disabling the sink currently does not: change sm5803_vbus_sink_enable to disable sinking before updating other configuration, the mirror of ordering when enabling sinking. BUG=none TEST=nereid battery still charges/discharges as expected when PD source is connected or disconnected BRANCH=none LOW_COVERAGE_REASON=no emulators currently exist for sm5803 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I50c7bf20569d7cad058c19aa238aeed8eaf2aa56 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3930177 Reviewed-by: Andrew McRae <amcrae@google.com>
* agah: update fan enable settingZick Wei2022-10-062-1/+2
| | | | | | | | | | | | | | Update enable pin for fan2 to follow schematic. BUG=b:234053836 BRANCH=none TEST=make BOARD=agah Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ic9c07435e9a2db4ba76dc01088e933849ee8adba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935982 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* yaviks: remove HDMI related codeZick Wei2022-10-064-52/+3
| | | | | | | | | | | | | yaviks design without HDMI port. BUG=b:241964549 BRANCH=none TEST=zmake build yaviks Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ic164323aa16e2f19d9297641d69a218da1003ca6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858967 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* yaviks: remove keyboard backlight enable pinZick Wei2022-10-063-5/+4
| | | | | | | | | | | | | Yaviks design without keyboard backlight enable pin. BUG=b:241964549 BRANCH=none TEST=Keyboard backlight work intended. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ib226d99f64a6a7c87625b9cb433e9ce0c04d61d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3930165 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* ectool: support bist share mode enable/disable commandScott Chao2022-10-068-1/+102
| | | | | | | | | | | | | | | | | | | | Add bist share mode enable/ disable command. This command will only be effective if system is unlocked. Tested this command by sending Get_Source_Cap command. DUT will return Source Cap with 5V/3A after BIST share mode be enabled. BUG=b:242957100 BRANCH=none TEST=ectool typeccontrol 0 5 [0 | 1] TEST=./twister -v -T zephyr/test TEST=make buildall Change-Id: I307596b9b59d60b72ff1e594919fadfb644dcc53 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3881522 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* test: shim system.c idlestats console commandAaron Massey2022-10-066-1/+189
| | | | | | | | | | | | | | | | Verify the idlestats console command fetches the idling time stats from the cros system chip specific driver. Adds a new cros system driver for native posix explicitly for testing purposes. BRANCH=none BUG=b:236074898 TEST=twister --clobber -i -s zephyr/test/system_shim/system_shim.default TEST=CQ Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I44a5bea19923ecf46a1906a323aaa446b51bba41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3933259 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* cq: Add coverage builds for cq and gitlabJeremy Bettis2022-10-052-1/+6
| | | | | | | | | | | | | | | | | | | Add krabby, nivviks, and skyrim specific coverage builds to cq and gitlab. In cq this is just lcov commands, no new builds will actually be run. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I59120b9a2b7cff7fbe5f7d24c92a4c877ccd79b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3936944 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* power: Remove param to power_common_stateJeremy Bettis2022-10-051-3/+3
| | | | | | | | | | | | | | | | | | | | | Instead of passing the static var state to power_common_state(), just use the static var directly. This should make no change in the live code, but will allow tests to call power_set_state() while the chipset_task is blocked waiting for events. BRANCH=None BUG=b:236074354 TEST=CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I3a59f1e3008bf23a88d2b07d26c2ebd9720588a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3936945 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* brya: Disable USB3 on BB during S0ixCaveh Jalali2022-10-051-0/+2
| | | | | | | | | | | | | | | | This disables the BB's USB3 retimer to save power during S0ix. BRANCH=none BUG=b:245753005 TEST='make buildall' passes verified BB register 0x04 changes from 0x21 -> 0x01 on lid-close; is restored to 0x21 on lid open. Change-Id: Ib0007f4db9a7f4f9080d876ff2681349a202fa59 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3914995 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Add test for invalid arg for rw console commandAl Semjonovs2022-10-051-0/+4
| | | | | | | | | | | | | | | Cover default case for bad argument when argc greater than 2 BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Idfd6e53d9f10c84cd6df8808185941d8b941b34b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935031 Commit-Queue: Tristan Honscheid <honscheid@google.com> Reviewed-by: Tristan Honscheid <honscheid@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>