summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge remote-tracking branch cros/main into factory-brya-14517.B-main"factory-brya-14517.B-mainYH Lin2022-12-052355-53976/+36474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit af25602b15b22b9ef5821dcba9934311f2157c48. Reason for revert: broken build due to ec-utils. Original change's description: > Merge remote-tracking branch cros/main into factory-brya-14517.B-main > > Generated by: util/update_release_branch.py --baseboard brya --relevant_paths_file > baseboard/brya/relevant-paths.txt factory-brya-14517.B-main > > Relevant changes: > > git log --oneline 54462f034b..aa40b859b3 -- baseboard/brya board/agah > board/anahera board/banshee board/brya board/crota board/felwinter > board/gimble board/kano board/mithrax board/osiris board/primus > board/redrix board/taeko board/taniks board/vell board/volmar > driver/bc12/pi3usb9201_public.* driver/charger/bq25710.* > driver/ppc/nx20p348x.* driver/ppc/syv682x_public.* > driver/retimer/bb_retimer_public.* driver/tcpm/nct38xx.* > driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.* include/power/alderlake* > include/intel_x86.h power/alderlake* power/intel_x86.c > util/getversion.sh > > e6da633c38 driver: Sort header files > 234a87ae2d tcpci: Add FRS enable to driver structure > a56be59ccd tcpm_header: add test for tcpm_dump_registers > 57b3256963 Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT > e420c8ff9a marasov: Modify TypeC and TypeA configuration. > 43b53e0045 Add default implementation of board_set_charge_limit > b75dc90677 Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT > f1b563c350 baseboard: Sort header files > 7d01b1e58d driver/retimer/ps8818.h: Add I2C ADDR FLAGS 0x30, 0x58, 0x70 > ec31407993 Add CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT > 8f89f69a5b crota: disable lid angle sensor for clamshell > > BRANCH=None > BUG=b:259002141 b:255184961 b:247100970 b:259354679 b:260630630 > BUG=b:163093572 b:254328661 > TEST=`emerge-brya chromeos-ec` > > Force-Relevant-Builds: all > Change-Id: Ia85a701fbf6b8e67ec214b9e25e0e55e980a6f47 > Signed-off-by: YH Lin <yueherngl@google.com> Bug: b:259002141 b:255184961 b:247100970 b:259354679 b:260630630 Bug: b:163093572 b:254328661 Change-Id: I48d5aa4cc67a69ee1f6ac9255ac3087d34da4c72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4077248 Tested-by: YH Lin <yueherngl@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Auto-Submit: YH Lin <yueherngl@chromium.org>
* Merge remote-tracking branch cros/main into factory-brya-14517.B-mainYH Lin2022-11-302355-36474/+53976
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py --baseboard brya --relevant_paths_file baseboard/brya/relevant-paths.txt factory-brya-14517.B-main Relevant changes: git log --oneline 54462f034b..aa40b859b3 -- baseboard/brya board/agah board/anahera board/banshee board/brya board/crota board/felwinter board/gimble board/kano board/mithrax board/osiris board/primus board/redrix board/taeko board/taniks board/vell board/volmar driver/bc12/pi3usb9201_public.* driver/charger/bq25710.* driver/ppc/nx20p348x.* driver/ppc/syv682x_public.* driver/retimer/bb_retimer_public.* driver/tcpm/nct38xx.* driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.* include/power/alderlake* include/intel_x86.h power/alderlake* power/intel_x86.c util/getversion.sh e6da633c38 driver: Sort header files 234a87ae2d tcpci: Add FRS enable to driver structure a56be59ccd tcpm_header: add test for tcpm_dump_registers 57b3256963 Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT e420c8ff9a marasov: Modify TypeC and TypeA configuration. 43b53e0045 Add default implementation of board_set_charge_limit b75dc90677 Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT f1b563c350 baseboard: Sort header files 7d01b1e58d driver/retimer/ps8818.h: Add I2C ADDR FLAGS 0x30, 0x58, 0x70 ec31407993 Add CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 8f89f69a5b crota: disable lid angle sensor for clamshell BRANCH=None BUG=b:259002141 b:255184961 b:247100970 b:259354679 b:260630630 BUG=b:163093572 b:254328661 TEST=`emerge-brya chromeos-ec` Force-Relevant-Builds: all Change-Id: Ia85a701fbf6b8e67ec214b9e25e0e55e980a6f47 Signed-off-by: YH Lin <yueherngl@google.com>
| * mtlrvp: Enable S0ix error recovery confRajesh Kumar2022-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables S0ix error recovery for intel rvp platform using native power sequencing. BUG=none BRANCH=none TEST=zmake build mtlrvpp_npcx 'powerd_dbus_suspend' on AP and observed timeout and hang detected through EC logs. Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: If2b92b5e631703efeeb6be9b88b8469a5dd9aefe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062576 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
| * cmake: Add ARMv7-M CMake toolchain fileTom Hughes2022-11-301-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:248508087, b:254530679 TEST=Build googletest with the ARMv7-M toolchain: cmake -GNinja -Dgtest_disable_pthreads=ON \ -DCMAKE_TOOLCHAIN_FILE=~/chromiumos/src/platform/ec/cmake/toolchain-armv7m.cmake \ -DCMAKE_INSTALL_PREFIX=~/chromiumos/src/third_party/tmp .. ninja ninja install Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If31e1937f444f44f153fde9c8aadcb1824e12ee8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3929249 Reviewed-by: Andrea Grandi <agrandi@google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * util: Use libec for EC_CMD_ADD_ENTROPYTom Hughes2022-11-301-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:144959033, b:116060828 TEST=rm -rf build && make BOARD=host utils TEST=tast run firmware.FpAddEntropy Force-Relevant-Builds: all Cq-Depend: chromium:3139188 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id5cebe9dbc174d486474c5e9fd40b8f517b05e19 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3938416 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Andrea Grandi <agrandi@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: usb_muxes, bb_retimer: fix kconfig dependenciesFabio Baltieri2022-11-304-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Kconfig dependencies for usb_muxes and bb_retimer_usb_mux so that we can safely drop the compiler guards and the source is included only if the necessary structures are defined. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I9ab501a81549ef10b6db7f221517ff7cce619a8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4054625 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
| * common/charger: read charger parameters using primary chargerDeepti Deshatty2022-11-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when no active charger is connected to the system, retrieve charger parameters using primary charger(0). This avoids setting the 'problems_exist' flag which allows charger_task() to sleep for a period of CHARGE_POLL_PERIOD_VERY_LONG in susped scenarios. BUG=b:258613461 BRANCH=none TEST=zmake build craask, EC S0ix power is optimized Change-Id: Ic177acb74f943ec8b3eafaae7bf6b56db758d6e5 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4050321 Code-Coverage: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
| * console: Don't call console_buf_notify_chars from isrRob Barnes2022-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if in isr before calling uart_write_char in uart_write_char. console_buf_notify_chars attempts to acquire a mutex, which isn't allowed from an isr. BUG=None BRANCH=None TEST=Pass rw_safe_mode tests Change-Id: If5a5a4c99fae9342f2e1e3c1bf0c841e5490f692 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4065004 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
| * nissa: Allow sub-board support to be optionalAndrew McRae2022-11-304-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sub-board support a config option so that variants can have fixed hardware configurations without having to deal with sub-board options. BUG=b:260779639 TEST=build nissa boards BRANCH=none Change-Id: Icac6767a9405362ba229626a1038e2bc4c42895c Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4059932 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
| * test: Sort header filesJeremy Bettis2022-11-3078-139/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort all includes in test with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iae52f99a3a8b5623c1c92722c325ca92816fa856 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052760 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * zephyr: Override LOG_PRINTK default to disabledAaron Massey2022-11-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a downstream change LOG_PRINTK is enabled by default when PRINTK and the ZTEST_NEW_API are enabled. LOG_PRINTK seems to timeout/fail our tests. Add a KConfig override that disables LOG_PRINTK by default. BRANCH=none BUG=b:260772137 TEST=twister TEST=CQ Change-Id: Iec189124c891a53a8230a2291bc7852e44acc94e Signed-off-by: Aaron Massey <aaronmassey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4065008 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: Sort remaining includesJeremy Bettis2022-11-295-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last of the files in platform/ec. Sort all includes with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I95e37e74d860cbb7c74ec478b543aef0b0e967e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062620 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * zephyr: Project organization - skyrimJason Yuan2022-11-2978-106/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Organized the skyrim program into folders for projects. Similar .dtsi files in project directory will be merged into program directory in a followup CL. BUG=b:254097911 TEST=Ran zmake compare-builds BRANCH=none Signed-off-by: Jason Yuan <jasonyuan@google.com> Change-Id: I1e0b9b4ea096f2e4ffa97067fe8aecdea171fc00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4035057 Tested-by: zhi cheng yuan <jasonyuan@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: zhi cheng yuan <jasonyuan@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * chip: Sort header filesJeremy Bettis2022-11-29140-321/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort all includes in chip with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I13454e38fa3766aa0ba26a058075f51965b8462e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4053346 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * common: Sort header filesJeremy Bettis2022-11-2992-192/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort all includes in common with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I70c2ed7bb2ce50c968f3e2dbdc274de3a455129a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049889 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * driver: Sort header filesJeremy Bettis2022-11-29102-177/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort all includes in driver with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I675e0db416b6b7cbcfce031c97fd24ad97b66f4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052767 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * test: host_command: EC_CMD_READ_MEMMAPKeith Short2022-11-295-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new test binaries to verify the EC_CMD_READ_MEMMAP command. This command is only provided when the host interface is not eSPI and not LPC. One binary verifies operation with CONFIG_PLATFORM_EC_SWITCH enabled, and one with CONFIG_PLATFORM_EC_SWITCH disabled. BUG=none BRANCH=none TEST=twister Change-Id: Ice44bb9a0c57e62231dbc3b494cb540dbd153f79 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063184 Reviewed-by: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * test: cleanup deprecated host commandsKeith Short2022-11-291-92/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the deprecated host command tests to support non-X86 configurations. BUG=none BRANCH=none TEST=twister Change-Id: I4da2ff748a10b56cfb80272df5cced0ef6134016 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063183 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com>
| * evoker: Select pcf85063a oscillator capacitor to 12.5 pFYu-An Chen2022-11-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select pcf85063a oscillator capacitor to 12.5 pF BUG=b:260165217 BRANCH=none TEST=check CAP_SEL bit can set LOW_COVERAGE_REASON=RTC driver currently has no tests Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Ida74a1c3cadcc376a68d2386f60d7972ba0b8040 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4050011 Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Bob Moragues <moragues@chromium.org> Tested-by: Bob Moragues <moragues@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: rt9490: drop the compiler guardsFabio Baltieri2022-11-292-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bc12_rt9490.c is only being built if the driver or emulators are enabled, and the emulator defines both compatibles anyway, so it's not really needed. Also fix a dts syntax thing. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I622dbf07f74f52b5c3bdbe634c5c1bcd0774845e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4054624 Reviewed-by: Sam Hurst <shurst@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: emul: select few more emulator config automaticallyFabio Baltieri2022-11-293-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Select EMUL_BB_RETIMER and EMUL_PCT2075 when unit testing, drop the now unnecessary explicit settings. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Idda7529476de7bc1e5e2b7dade47c8322628f16d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4055682 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
| * include: Sort header filesJeremy Bettis2022-11-2963-91/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort all includes in include with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic23f440ebd93519e4341423cf6cb7a298620cbfe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049883 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com>
| * ec: IWYU Add missing includesJeremy Bettis2022-11-293-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some circular include problems here also. Add "config.h" for CONFIG_ZEPHYR. Add <zephyr/devicetree.h> for DT_NODE_EXISTS Add <stddef.h> for size_t Add <sys/types.h> for ssize_t Add "gpio_signal.h" for enum gpio_signal BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ifbadcba90c2c0774713dc7ed3992e58f1d15d70d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052766 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: test pd_log_recv_vdmAl Semjonovs2022-11-291-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Validate log is captured BUG=None BRANCH=NONE TEST=./twister -T zephyr/test/drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ic8edb5994bf3a6f12a9fb7a2d222d98813c7d3f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049885 Reviewed-by: Tristan Honscheid <honscheid@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: pcf85063a: Support oscillator capacitor selectionYu-An Chen2022-11-293-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support to select the internal oscillator capacitor to 12.5 pF for PCF85063A, default setting is 7 pF. BUG=b:260165217 BRANCH=none TEST=zmake build evoker LOW_COVERAGE_REASON=RTC driver currently has no tests Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I3418adb08fb4f56bba06a0844acec7806b2bc35d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4050010 Commit-Queue: Wai-Hong Tam <waihong@google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Sam Hurst <shurst@google.com>
| * zephyr: Remove CONFIG_PLATFORM_EC_FPUMark Hasemeyer2022-11-293-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove CONFIG_PLATFORM_EC_FPU. Use Zephyr's CONFIG_FPU option instead. BUG=b:217926701 BRANCH=none TEST=twister -T zephyr/test/ TEST=zmake compare-builds -a Signed-off-by: Mark Hasemeyer <markhas@google.com> Change-Id: Icd0fdbc440f0dd574b75bf5ca0f1750f1e858b40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049382 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
| * test: math: Support native posix fpu testsMark Hasemeyer2022-11-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The floating point math tests fail to build if PLATFORM_EC_FPU is enabled on a native posix board. Include the math library to support fpu tests for native posix builds. BUG=b:217926701 BRANCH=none TEST=twister -T zephyr/test/math/ Signed-off-by: Mark Hasemeyer <markhas@google.com> Change-Id: I2cc5d2c22d182d8b1f6ca66fff68c0a5da0c24cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049381 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
| * test: Add const to functions of benchmark.hAndrea Grandi2022-11-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | BUG=b:246366702 BRANCH=none TEST=test/run_device_tests.py -b bloonchipper -t benchmark TEST=make run-benchmark Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I73bacbd76194055d79ca3a250a4fab6d0c67ff4d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062574 Reviewed-by: Bobby Casey <bobbycasey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * tcpci: Add FRS enable to driver structureAbe Levkoy2022-11-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the generic FRS enable driver function in the generic TCPCI driver. BUG=b:260630630 TEST=twister -s zephyr/test/drivers/drivers.usbc_frs BRANCH=none Change-Id: I711fb41569d477f1dad3d14fa18a7b7f8f217ce4 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063186 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: exclude non posix logic from panic_outputYuval Peress2022-11-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that's non posix cannot be tested with current infrastructure. Remove it from the coverage reports. BRANCH=none BUG=none TEST=twister -C Change-Id: Ic4725334ac7dad893d35bb97bed1c9757dc2bd72 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062993 Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: emul: rename the binding to be consistentFabio Baltieri2022-11-2920-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zephyr uses a -emul suffix on all emulation bindings. Rename some of the EC emul bindings so that they are consistent with upstream and the other ones we already have. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I666b74bb243da10a79dd1d0da56028c2b142d360 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4047463 Reviewed-by: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * xivur: Initial zephyr config for xivur projectjeffrey2022-11-2918-1/+1783
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial EC Zephyr config for xivur Reuse most of nivviks sources. BUG=b:258325854 TEST=zmake build xivur --clobber BRANCH=nissa LOW_COVERAGE_REASON=Initial xivur project, board test under developement(b/258325854) Signed-off-by: jeffrey <jeffrey_lin@pegatron.corp-partner.google.com> Change-Id: Iffbaed8bfe3dc292bc263ecd4fb4016941de78cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022845 Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org> Code-Coverage: Kyle Lin <kylelinck@google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com>
| * craask: add Fw_config structure for FAN controlben chen2022-11-296-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Craask need to implement FW_FAN config in bit 17 of cbi fw_config.Enable/Disable fan control by FW_FAN flag. BUG=b:257387315 BRANCH=none TEST=check fan workable by FW_FAN flags setting. Change-Id: I94876d0092f713d4c29980f76338803081276503 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060382 Code-Coverage: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
| * tcpm_header: add test for tcpc_has_frs_control from flagsClayton Whitelaw2022-11-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function previously had no coverage for the case when TCPC_FLAGS_CONTROL_FRS was set. BUG=none TEST=twister, verify lines are now covered BRANCH=none Change-Id: I1b8d902fc0551388fcb12200e9c85a1f62ed7209 Signed-off-by: Clayton Whitelaw <cawhitelaw@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063190 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Yuval Peress <peress@google.com> Reviewed-by: Yuval Peress <peress@google.com>
| * tcpm_header: add test for tcpm_dump_registersClayton Whitelaw2022-11-293-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function previously had no coverage for the case where standard registers should be dumped. To support this test, mark tcpc_dump_std_registers as test_mockable. BUG=none TEST=twister, verify lines are now covered BRANCH=none Change-Id: Id7bbba6f77c1684a7eeafb1be1f990fb9176e16b Signed-off-by: Clayton Whitelaw <cawhitelaw@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062461 Commit-Queue: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Yuval Peress <peress@google.com>
| * tcpm_header: add test for tcpm_get_chip_info unimplementedClayton Whitelaw2022-11-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function previously had no coverage for this particular path. BUG=none TEST=twister, verify lines are now covered BRANCH=none Change-Id: Ia09dff83a8cc9d54b93e1158d834d091feaa512c Signed-off-by: Clayton Whitelaw <cawhitelaw@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4061756 Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * tcpm_header: add test for tcpc_get_bist_test_mode unimplementedClayton Whitelaw2022-11-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function previously had no coverage this particular path. BUG=none TEST=twister, verify lines are now covered BRANCH=none Change-Id: I7fef8ab28251c2658fba8162d1077d2e78a9479f Signed-off-by: Clayton Whitelaw <cawhitelaw@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4061754 Reviewed-by: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Yuval Peress <peress@google.com>
| * test: unit test uart_printf.cYuval Peress2022-11-2910-4/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests to get uart_printf.c to 100% coverage. BRANCH=none BUG=none TEST=twister LOW_COVERAGE_REASON=the lines showing up as red are tested by existing tests. I'm not sure why those tests don't count towards this CL. Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I6fc4321a7a46836f212c285aca67c71613011b95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4009401 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * tcpmv2: dpm: Add DATA_RESET stateScott Collyer2022-11-291-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds a DATA_RESET state to the DPM state machine. The check for data reset being required remains in the mode entry/exit helper functions as the criteria is different between the 2 cases. However, data reset being handled in its own state removes the need to check if a data reset is ongoing. BUG=b:194504052 BRANCH=none TEST=Verified that mode entry/exit is successful for DP, TBT, and USB4 on Voxel. ectool typeccontrol <port> 0 -> exit mode ectool typeccontrol <port> 2 0 -> DP ectool typeccontrol <port> 2 1 -> TBT ectool typeccontrol <port> 2 2 -> USB4 Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I7346d521531c800c787c9794fedd81e485b5912e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3965269 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * frostflow: modify thermal settingMatt Wang2022-11-294-8/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Frostflow has different thermal settings and add the fan step function. This patch also allows the EC to manage the fan table when the unit is in clamshell or tablet mode. BUG=b:257174577, b:257149501 BRANCH=none TEST=zmake build frostflow. Thermal test pass. LOW_COVERAGE_REASON=no unit test for skyrim board yet: b/247151116 Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I3976bb73bf3f5867c451c90b4c553485c5e607a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025402 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com>
| * board/burnet: Free up flash spaceTom Hughes2022-11-292-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=CC=clang make BOARD=burnet Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If04c6b209990822ccad384a1a6cbd66870eefcaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024564 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
| * Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMITPeter Marheine2022-11-2955-90/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Default input current" is not a very clear name, so rename this option to better express its use as a default value that is set in the charger. This is made possible by splitting other uses into CHARGER_MIN_INPUT_CURRENT_LIMIT, making the only use for CHARGER_INPUT_CURRENT be as a default. BUG=b:163093572 TEST=make buildall; zmake build -a BRANCH=none LOW_COVERAGE_REASON=isl9241 and sm5803 currently lack emulators Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ia9c1df9061825b15477466e85343afeb2a371288 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025404 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
| * host_command_pd: remove ad-hoc charge current manipulationPeter Marheine2022-11-291-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes make board_set_charge_limit the correct place to apply adjustments like the existing minimum current limit done here, so change this host command to simply call that function. Most other code that used this pattern was converted in commits b75dc90677f29424e6f0d63f294dce4b39782135 and 43b53e004573a56a255ca57d4a6d04ac4bed44d7, but this one was missed. BUG=b:163093572 TEST=make buildall, zmake build -a BRANCH=none Change-Id: I29d3dd332aa748afdee8fa3c4da53ccab85e3fd1 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060434 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * tcpmv2: dpm: Split DPM_READY to DFP/UFP specific statesScott Collyer2022-11-291-64/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL splits the ready state to be either DFP or UFP specific. The check for mode entry being done is moved into the DFP_READY state handler. BUG=b:194504052 BRANCH=none TEST=Verified that mode entry/exit is successful for DP, TBT, and USB4 on Voxel. ectool typeccontrol <port> 0 -> exit mode ectool typeccontrol <port> 2 0 -> DP ectool typeccontrol <port> 2 1 -> TBT ectool typeccontrol <port> 2 2 -> USB4 Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I905a5c758cb5e5e71a86c54c1bace1e2f5e0da34 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3965268 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: test: Add tests for USB_Enter/DATA_RESET messagesScott Collyer2022-11-297-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds support for USB_Enter and DATA_RESET messages to the tcpc emmulator. In addition it adds a test suite for USB4 mode. The usbc_tbt_mode test suite was used as a starting reference. BUG=b:260095516 BRANCH=none TEST=manual twister -c -v -i -s <path>/drivers/drivers.usbc_usb4_mode and verify that the tests pass. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I34e104a1e53b1540b20451fbd0631bbd9d42559b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4029517 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * nissa/sm5803: avoid charging from 12V with 3S batteryPeter Marheine2022-11-292-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combination of 12V VBUS and 3S battery is extremely inefficient with the SM5803, so completely reject 12V PD contracts when the battery design voltage is consistent with a 3S battery and the board uses SM5803. BUG=b:260271871, b:258754576 TEST=With PD max voltage limited to 12V and a charger with 12V source caps, nereid negotiates a 9V PD contract instead. BRANCH=nissa LOW_COVERAGE_REASON=no emulator for SM5803 yet Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ieb93d5ca410e8b942686c23cb4b761416f8981d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4054762 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * test: Fix TypeError in run_device_tests.pyAndrea Grandi2022-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | BUG=b:260607990 TEST=run_device_tests.py --help BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I51166b553497a20e2ba8743d2da682768a3d2cd6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4062572 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
| * zephyr: update cmake toolchain for unittest coverageYuval Peress2022-11-296-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for unittest coverage in our own toolchain. BRANCH=none BUG=none TEST=./twister -c -v -i --gcc -p unit_testing -C TEST=./twister -c -v -i --llvm -p unit_testing -C Change-Id: I3e7ffd7bbea809ae9c6ab1d9b6e6104627245abf Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060364 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
| * tcpm_header: add tests for tcpm_set_frs_enableClayton Whitelaw2022-11-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function had no coverage previously. Added tests for both cases where the driver does and does not implement these functions. Since the function is conditionally included, guard the tests by checking the same configuration. BUG=none TEST=twister, verify lines are now covered BRANCH=none Signed-off-by: Clayton Whitelaw <cawhitelaw@google.com> Change-Id: I287642975e05b7331333b7016af8e571c9e28676 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052580 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * crash_analyzer: improve the assert caseBoris Mittelberg2022-11-281-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Detecting PC in case of assert (cause 3) from r3 BRANCH=none BUG=none TEST=manually on redrix crash reports Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ifab41cfd081dd61a18db9cee2cd83b5e58fa06ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4053343 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Ricardo Quesada <ricardoq@chromium.org>