summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* docs: Update docs on testcase.yaml to use new fields for conf filesTristan Honscheid2023-04-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | Update our documentation to highlight the use of the new `extra_conf_files`, `extra_overlay_confs`, and `extra_dtc_overlay_files` YAML fields instead of specifying these in CMake variables in `extra_args` in `testcase.yaml` files. These new fields are more readable and were introduced in upstream Zephyr earlier this year. The plan is to eventually deprecate the ability to specify confs and overlays through extra_args upstream following a migration. BUG=None BRANCH=None TEST=None Change-Id: I3db0b0dcbb24a8dc1f6e38214d7538e6dca50dfb Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4428296 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* util: Add new utility to find non-exec linesJeremy Bettis2023-04-141-0/+62
| | | | | | | | | | | | | | | | | | | | | Add a new utility that reads one or more lcov files, and reads each executable line from that file, and then tries to verify if that line is actually executable code or not. This should help when playing whack-a-mole with strange pre-processor off-by-one errors. BRANCH=None BUG=b:272518464 TEST=Ran it on a known bad commit Change-Id: I89b43f73e59f14854b45855322ada626146658b6 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426796 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: add checks for driver GPIOsKeith Short2023-04-141-1/+136
| | | | | | | | | | | | | | | | | | | | The named-gpios node is used to configure the initial state of all GPIOs. However, as drivers are moved upstream the GPIO configuration will be done by the driver. Add a configure time check that validates if a GPIO is specified in named-gpios and as a property to a driver, that the flags match. This will help prevent regressions in the future. BUG=b:271135255 BRANCH=none TEST=zmake configure -a TEST=./twister -b Change-Id: I45aa14bf93e74877082a2a674b391cfab56379e4 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387260 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: test drivers: Fix GPIO mismatchKeith Short2023-04-141-1/+1
| | | | | | | | | | | | | | | 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>
* rex: Fix failing unit tests because of new build checkMadhurima Paruchuri2023-04-142-0/+14
| | | | | | | | | | | | | 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>
* zephyr: tcpc: Add TCPC alt support for all existing TCPCMadhurima Paruchuri2023-04-1413-22/+134
| | | | | | | | | | | | | | 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>
* retimer: Fix bb to support 32-bits writeGaggery Tsai2023-04-141-6/+10
| | | | | | | | | | | | | | | | | | | | This patch fixes bb command to support 32-bits negative number (int) write. For a 32-bits i2c write, it doesn't need to judge the strtol is negative or positive number or even a zero. BUG=None BRANCH=None TEST=run $bb 3 w 7 0xd0000022 to force burnside bridge entering USB3 compliance mode and check $bb 3 r 7 to ensure the value is written. Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com> Change-Id: Ib58ca89cf62a527b19f8e708462250f54beb5861 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3595286 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Li1 Feng <li1.feng@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Brandon Breitenstein <brandon.breitenstein@intel.corp-partner.google.com>
* USB-PD: Update pd console command for EPRDaisuke Nojiri2023-04-143-5/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > pd 1 epr enter EPR enter requested > [130.434040 C1: PE_SNK_Send_EPR_Mode_Entry] [130.434852 C1: DPM Waiting] [130.445641 C1: PE_SNK_EPR_Mode_Entry_Wait_For_Response] [130.501005 C1: Entered EPR] [130.501378 C1: PE_SNK_Wait_for_Capabilities] [130.518489 C1: PE_SNK_Evaluate_Capability] [130.519076 C1: PE_SNK_Select_Capability] C1: Req [8] 28000mV 5000mA > pd 1 state Port C1 CC1, Enable - Role: SNK-UFP TC State: Attached.SNK, Flags: 0x1000 PE State: PE_SNK_Ready, Flags: 0x41000201 EPR > pd 1 epr exit EPR exit requested [222.511037 C1: Request SPR before EPR exit] [222.511515 C1: PE_SNK_Select_Capability] C1: Req [4] 20000mV 5000mA BUG=b:257320026 BRANCH=None TEST=Agah. Run make run-usb_pd_console. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: If7566e1dc4de790180e44b49893622e1e71269da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4296999 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: named_gpios: create _load_edt functionKeith Short2023-04-141-10/+45
| | | | | | | | | | | | | | Move the EDT devicetree object processing to a separate function. This allows additional checks to be run on the same EDT object. BUG=b:271135255 BRANCH=none TEST=zmake configure -a Change-Id: Ie1c813e6969b7df1dfd3c8c26da626bacc2b56d4 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387259 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* krabby.tentacruel: test: fix GPIO flag mismatchesKeith Short2023-04-141-0/+6
| | | | | | | | | | | | | | | 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>
* zephyr/tests/skyrim: Add skyrim variant usb_mux_config testsRobert Zieba2023-04-148-14/+282
| | | | | | | | | | | | | | 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>
* zephyr/dts/bindings/emul: Make ANX7483 emulator work with USB mux driverRobert Zieba2023-04-141-1/+1
| | | | | | | | | | | | | | Include generic USB mux properties to make this emulator compatible with the USB mux driver. BRANCH=none BUG=b:247151116 TEST=Ran tests Change-Id: I1287a64693896aa4516816c90b972d2bb3cdfd08 Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400553 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr/emul/retimer/anx7483: Add function to validate tuning settingsRobert Zieba2023-04-145-483/+228
| | | | | | | | | | | | | | | | | 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>
* zephyr/emul/anx7483: Add anx7483_emul_test_get_eq functionRobert Zieba2023-04-143-27/+68
| | | | | | | | | | | | | | 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>
* zephyr/tests/skyrim: Add shared usb_mux_config codeRobert Zieba2023-04-1415-50/+157
| | | | | | | | | | | | | | 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>
* zephyr: Remove deprecated calls to ceiling_fraction()Yuval Peress2023-04-141-3/+4
| | | | | | | | | | | | | | | The ceiling_fraction() macro was deprecated, use DIV_ROUND_UP() instead. BRANCH=none BUG=none TEST=zmake build --all Change-Id: I1dede993fbaebb0fb50f8082412196a0ffdb9c75 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426789 Commit-Queue: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* ap_power.alderlake: Add test for s0ix counter.Grzegorz Bernacki2023-04-143-0/+118
| | | | | | | | | | | | | | 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>
* drivers.power_host_sleep: Add test for s0ix counterGrzegorz Bernacki2023-04-142-0/+29
| | | | | | | | | | | | | | 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>
* ectool: Add command to get/set s0ix counterGrzegorz Bernacki2023-04-141-0/+41
| | | | | | | | | | | BUG=b:261869264 TEST=Tested on skyrim and nissa BRANCH=none Change-Id: Id6d7eb138f44559fb0c8c601935f6ab94c367b44 Signed-off-by: Grzegorz Bernacki <bernacki@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239444 Reviewed-by: Robert Zieba <robertzieba@google.com>
* host_cmd: Add command to get/set s0ix counterGrzegorz Bernacki2023-04-142-0/+39
| | | | | | | | | | | BUG=b:261869264 TEST=Tested on skyrim and nissa BRANCH=none Change-Id: I4f2cd0121b6eab445b9645037d607ae10daea835 Signed-off-by: Grzegorz Bernacki <bernacki@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239443 Reviewed-by: Robert Zieba <robertzieba@google.com>
* ap_pwrseq: Add s0ix counterGrzegorz Bernacki2023-04-142-1/+16
| | | | | | | | | | | | | | This commit adds counter which increments every time EC detects going into S0ix state. BUG=b:261869264 TEST=Tested on nissa BRANCH=none Change-Id: I2a35411eb085924c95129d98bb7b2be2bdc013a7 Signed-off-by: Grzegorz Bernacki <bernacki@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239442 Reviewed-by: Robert Zieba <robertzieba@google.com>
* power: Add s0ix counterGrzegorz Bernacki2023-04-144-0/+29
| | | | | | | | | | | | | | This commit adds counter which increments every time EC detects going into S0ix state. BUG=b:261869264 TEST=Tested on skyrim BRANCH=none Change-Id: I26475d80a891e64509686000e9fd37681553ef76 Signed-off-by: Grzegorz Bernacki <bernacki@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4239441 Reviewed-by: Robert Zieba <robertzieba@google.com>
* hades: Change keyboard configDavid Huang2023-04-141-12/+25
| | | | | | | | | | | | | Change keyboard config for hades. BUG=b:277981949 BRANCH=None TEST=make BOARD=hades Change-Id: I35dc16be604fba97c9c95b380312853bc2a67c74 Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4421946 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Hades: Relocate EC_PROCHOT_IN_LDaisuke Nojiri2023-04-142-3/+2
| | | | | | | | | | | | | | | | This patch relocates EC_PROCHOT_IN_L from GPIOf0 to GPIOA0. GPIOA0 is previously used by USB_C0_FRS_EN. FRS control for USB-C0 will be done by NCT3808. BUG=b:272815831 BRANCH=None TEST=make BOARD=hades Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I008a50257c56cfd44b6fa48951ee2aab71243c7c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409992 Reviewed-by: Tarun Tuli <taruntuli@google.com>
* TCPMv2: Disable PE during ErrorRecoveryDiana Z2023-04-131-2/+1
| | | | | | | | | | | | | | | | | | | | If ErrorRecovery was requested from the TC layer, ensure that the TC layer also disables the PE layer. Otherwise, the PE states may continue to progress while we're holding Open on the CC lines. Consolidate calls to disable PD messages into the tc_detached() function, which already handles the general necessities of getting the port cleaned up. BRANCH=None BUG=b:276837557 TEST=on skyrim, run some dead battery boots and observe we don't have any instances of sending a Request while in ErrorRecovery Change-Id: I8bd23ff8824b32e3895fe6e71f314aa6f0bc4127 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4416460 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* emul: isl923x: Syntax bug in ZTEST_RULE for multiple instancesTristan Honscheid2023-04-131-2/+2
| | | | | | | | | | | | | | | | The semicolon in the ztest rule for the ISL923X emulator was in the wrong spot and caused a syntax error when instantiating multiple chips. It should be in the macro so it gets repeated for each child. BUG=b:276805061 BRANCH=None TEST=./twister Change-Id: I4fc8f7e3c4360948648c377f99e84525bb0e61dd Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4421008 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: Add support for RNG devicesPatryk Duda2023-04-1312-0/+234
| | | | | | | | | | | | | | | | | | | | | | | 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>
* trng: Drop trng_rand() functionPatryk Duda2023-04-133-10/+3
| | | | | | | | | | | | | | | | | | | The function is not used anywhere except test/rng_benchmark.cc, so we will have a problem with code coverage when implementing the function using Zephyr API. The RNG benchmark was modified to use trng_rand_bytes() function. BUG=b:277029648 BRANCH=none TEST=./test/run_device_tests.py --board bloonchipper -t rng_benchmark Change-Id: Ic6cf7e511b2e8fe88a08e9e1c4354f7afa9ae425 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4423151 Tested-by: Patryk Duda <patrykd@google.com> Commit-Queue: Patryk Duda <patrykd@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* ktu1125: avoid touching vbus when not necessaryBoris Mittelberg2023-04-131-2/+12
| | | | | | | | | | | | | Avoid changing VBUS control wnen it is already set properly BUG=none BRANCH=none TEST=manual test on rex sku2 Change-Id: I0d45f1ddd4cbe3348394762cbfe38a51d11650c1 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4420424 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* zephyr: conditionally define DIV_ROUND_UPYuval Peress2023-04-131-0/+3
| | | | | | | | | | | | | | | The DIV_ROUND_UP macro conflicts with the Zephyr one added in sys/util.h. Conditionally add it only if it's not already defined. BRANCH=none BUG=none TEST=build Change-Id: I72f039c2cbe7dabd227289a4f119322d8320d549 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4421414 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Kconfig: add FLASH_PSTATE_BANK / FLASH_PSTATE_LOCKEDTing Shen2023-04-133-2/+34
| | | | | | | | | | | | | | | BUG=b:277557274 TEST=1. `zmake compare-builds --all` This change should not affect existing boards 2. write protect works on roach BRANCH=none Change-Id: I697215c1990c7d12cd81e9b50b940485934da1bb Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415812 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* voltorb: remove debug options and features for FW QUALSiyu Qin2023-04-131-0/+7
| | | | | | | | | | | | | | | | | Remove debug options and features for FW QUAL for voltorb. BUG=b:277391808 BRANCH=corsola TEST=zmake build voltorb Change-Id: I803180340c391a8cf56d9008b5b447c5eced4d44 Signed-off-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4416484 Reviewed-by: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org>
* constitution: Modify fan frequencyDavid Huang2023-04-131-2/+2
| | | | | | | | | | | | | Modify fan freq to 25kHz and remove PWM_CONFIG_DSLEEP. BUG=b:277842788 BRANCH=none TEST=Check fan work success. Change-Id: I3b9631b1b3fe9b1d0dffc8ca83be64ed54ffebc4 Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4413768 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* Hades: Swap GPU_ACOFF and BJ_ADP_PRESENTDaisuke Nojiri2023-04-131-2/+2
| | | | | | | | | | | | | | | This CL swaps GPU_ACOFF and BJ_ADP_PRESENT to reflect the latest schematics. BUG=b:272815831 BRANCH=None TEST=make BOARD=hades Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ic5194a252daaf25f438a96ebcec808a351ad1d3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409991 Commit-Queue: Tarun Tuli <taruntuli@google.com> Reviewed-by: Tarun Tuli <taruntuli@google.com>
* USB-PD: Update EC_CMD_TYPEC_STATUS for EPRDaisuke Nojiri2023-04-132-31/+123
| | | | | | | | | | | | | | | | | Currently, EC_CMD_TYPEC_STATUS can carry up to 7 PDOs. With EPR, the max number of PDOs is 11. This patch adds version 1 of the command with the new response struct which has 11 slots for source caps and sink caps. BRANCH=None BUG=b:257320026 TEST=Tested v0 on Vell. v1 will be tested when time comes. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I694b5897de7faee8e492c7cdc196ff94dd9c8fb4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4294392 Reviewed-by: Keith Short <keithshort@chromium.org>
* Hades: Replace ISL9241 with RAA489110Daisuke Nojiri2023-04-131-1/+1
| | | | | | | | | | | | | RAA489110 is an EPR capable version of ISL9241. BUG=b:277280318 BRANCH=None TEST=make BOARD=hades Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ie26fff93c56b472833a186fbd1c0d24e166d3710 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409987 Reviewed-by: Tarun Tuli <taruntuli@google.com>
* RAA489110: Add RAA489110 driverDaisuke Nojiri2023-04-127-21/+63
| | | | | | | | | | | | | | | RAA489110 is an EPR capable version of ISL9241. BUG=b:277280318 BRANCH=None TEST=make BOARD=hades TEST=./twister --toolchain host -T zephyr/test/drivers -s drivers.isl9241 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I15eb1f652027f157ccb6b3a2d509531bef0c7c6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409986 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
* ISL9241: Fix ACProchot reg <-> mA conversionDaisuke Nojiri2023-04-123-19/+19
| | | | | | | | | | | | | | | | | | 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>
* rex: db: retimer: Configure ANX7452 daughter boardMadhurima Paruchuri2023-04-125-1/+57
| | | | | | | | | | | | | | | | 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>
* presubmit: Validate test_ prefix is present for ZTESTAl Semjonovs2023-04-121-0/+8
| | | | | | | | | | | | | | | | | | Fail presubmit when 'test_' prefix is missing for new ZTESTs BUG=None BRANCH=NONE TEST=Preupload check with ZTEST(foo, test_good) ZTEST(foo, missing_prefix1) ZTEST_F(foo, missing_prefix2) ZTEST_USER(foo , missing_prefix3) ZTEST_USER_F(foo , missing_prefix4) Change-Id: I0f223852159151d4fe7895e70b6c0548a44e1f45 Signed-off-by: Al Semjonovs <asemjonovs@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4411762 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* binman: Add binman nodelabel and use itMadhurima Paruchuri2023-04-126-93/+90
| | | | | | | | | | | BRANCH=none BUG=b:272272649 TEST=build rex with cbi_flash overlap and check zephyr.dts Change-Id: I2316fd922bd05b3e9ed0a29456b1d9ff99dd3ffb Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415257 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* retimer: Add emulator and unit tests for ANX7452 retimer driverMadhurima Paruchuri2023-04-1211-0/+700
| | | | | | | | | | | BUG=b:267589042 BRANCH=none TEST=./twister -s drivers/drivers.anx7452 -c --coverage Change-Id: I7b4dcef7e667cd69ecb39f6dda7a6c8570177f40 Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4303379 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* retimer: Add driver for ANX7452 retimerMadhurima Paruchuri2023-04-1213-1/+363
| | | | | | | | | | | | BUG=b:267589042 BRANCH=None TEST=./twister -s drivers/drivers.anx7452 -c --coverage Change-Id: I99be488d82a58a5d38a2afcef0966b9c3236074d Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4226575 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* rollback: Move CONFIG_SHA256 outside of add_entropy()Patryk Duda2023-04-121-4/+4
| | | | | | | | | | | | | | | | | | | This patch introduces no functional changes. BUG=b:277029648 BRANCH=none TEST=make BOARD=bloonchipper TEST=./test/run_device_tests.py -b bloonchipper -t rollback.* Test "rollback_region0": PASSED Test "rollback_region1": PASSED Test "rollback_entropy": PASSED Change-Id: I4c826439a988dd66890837c2e8398049c0706de2 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4408868 Commit-Queue: Patryk Duda <patrykd@google.com> Tested-by: Patryk Duda <patrykd@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* yaviks: Placate watchdog after receiving dp_attentionDevin Lu2023-04-121-0/+10
| | | | | | | | | | | | | | | | | | There are some peripheral display docks will issue HPDs in the short time. TCPM must wake up pd_task continually to service the events. They may cause the watchdog to reset. This patch placates watchdog after receiving dp_attention. BUG=b:273208597 BRANCH=none TEST=On Yaviks. Attached Dock with multi displays. System isn't reset. Change-Id: I6a5fe1665ce2300af6123e49d530229d11e3a020 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388314 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Devin Lu <devin.lu@quantatw.com> Tested-by: Devin Lu <devin.lu@quantatw.com>
* charge_manager: don't refer to ramp functions if disabledPeter Marheine2023-04-121-9/+4
| | | | | | | | | | | | | | | | | | | Although preprocessor guards for charge ramp support were used to determine whether current should be ramped, this still depended on the compiler to optimize out references to chg_ramp_get_current_limit() in the no-ramp configuration. Such optimizations cannot be depended on when building unit tests, so lift the conditional branches that use ramp-related functions into the preprocessor conditional blocks. BUG=b:276805061,b:267959470 TEST=Zephyr unit tests no longer fail to link with undefined references to chg_ramp_get_current_limit and friends. BRANCH=none Change-Id: Ic17c690cd4bab5f51b31597023824fbbc7dcd4d5 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402422 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* adc: don't declare adc_channels if ADC support is disabledPeter Marheine2023-04-121-0/+2
| | | | | | | | | | | | | | If CONFIG_ADC is disabled, `struct adc_t` may not be defined in which case declaring adc_channels using that type is an error. BUG=b:267959470 TEST=Including adc.h with CONFIG_ADC disabled no longer causes an error. BRANCH=none Change-Id: I9cbc5b14a5e5a7f3307925c5bcd0da6e84b79758 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402419 Reviewed-by: Diana Z <dzigterman@chromium.org>
* system_safe_mode: Print process stack dumpRob Barnes2023-04-1112-47/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the CONFIG_SYSTEM_SAFE_MODE_PRINT_STACK option for printing the faulting process stack to the console buffer. This must be done in safe mode because the console buffer ignores log messages while in an ISR. This option is on by default when system safe mode is enabled. get_panic_stack_pointer is a new overidable function that each architecture needs to implement to support this feature. The default implementation returns 0, which will result in no stack being printed. This is a workaround until coredumps are fully supported. BUG=b:266084064 BRANCH=None TEST=System safe mode zephyr test passes Stack print observed on boten, guybrush, and skyrim boards. LOW_COVERAGE_REASON=Cortex-M and NDS32 specific code cannot be tested Change-Id: Ied78ab7e6edca9cfa97c50323d94e39a3fca0eef Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4301695 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* Reland "battery: Finish past cleanup of sb fw update"Aaron Massey2023-04-115-987/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 33885596426b7f419709d81529f3e4d02f960ddf Cq-Depend: chromium:4415154 Original change's description: > battery: Finish past cleanup of sb fw update > > We removed the SB_FW_UPDATE host command code in CL:792013 without > cleaning up all now dead references. > > Remove all dead code that references the SB_FW_UPDATE command and > associated sources. > > BRANCH=none > BUG=b:276458241 > TEST=CQ > > Change-Id: I66a79eb42508aaa7ba3a64f6022df777608a497b > Signed-off-by: Aaron Massey <aaronmassey@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388382 > Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Bug: b:276458241 Change-Id: I2002f156e1919496d1b3d8859ee0b78bab83d06c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4415696 Commit-Queue: Aaron Massey <aaronmassey@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Tested-by: Aaron Massey <aaronmassey@google.com>
* pinmap: migrate code to ArbitrageRachel Nancollas2023-04-1118-1642/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes pinmap code from the chromium codebase because it has been migrated to go/arbitrage. In order to use this code going forward, users should follow the steps in go/arbitrage to setup Arbitrage and the steps in https://team.git.corp.google.com/cros-arbitrage/arbitrage#zephyr-pinmap-generation to generate pinmaps. In order to develop this code going forward, developers should follow the steps in https://team.git.corp.google.com/cros-arbitrage/arbitrage/+/HEAD/documentation/dev_guide.md. For any questions, contact the Arbitrage team at arbitrage-eng@google.com. Bug: 274938064 Change-Id: I2948ee2245236d95a133758e695e51ecbb4969c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4412374 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Rachel Nancollas <rachelsn@google.com> Code-Coverage: Rachel Nancollas <rachelsn@google.com> Tested-by: Rachel Nancollas <rachelsn@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>