summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * mt8186,mt8188: check the holder of AP_RST_ODLEric Yilun Lin2023-04-078-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To distinguish the AP shutdown, and the AP reset held by GSC/Servo, we use the SYS_RST_ODL as the reference. If AP_EC_SYSRST_ODL is asserted, but SYS_RST_ODL is not, this is a normal shutdown. If AP_EC_SYSRST_ODL is asserted, and so is SYS_RST_ODL, the AP reset is held by GSC or Servo. In this case, we should let the power state stay at S0 to prevent from an unexpected shutdown. BUG=b:276229973 TEST=pass firmware_CorruptMinios TEST=dut-control warm_reset:on sleep:1 warm:reset:off, it stays at S0 BRANCH=none Change-Id: I9b69caa0d15e6e58e7f11ad1079536bc1954b5ce Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402421 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
| * omnigul: Update battery parameter.Logan_Liao2023-04-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the battery team, modify the omnigul battery parameter(AP19B8M & AP20CBL) for battery cutoff function. Ship mode command modify to 0x3A from 0x00. Ship mode data modify to 0xC574 from 0x0010. BUG=b:277158040 BRANCH=none TEST=test ectool batterycutoff success, and wake success when plug AC. Change-Id: I53e562cbea7dcb6c06b3f204e90883c4daca9e34 Signed-off-by: Logan_Liao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4408484 Reviewed-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Kyle Lin <kylelinck@google.com>
| * zmake: Track project inheritance in ProjectConfigTristan Honscheid2023-04-0611-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `inherited_from` list field to the ProjectConfig dataclass that tracks what project(s) the current project inherited from. When using the `.variant()` project resgistration method, `inherited_from` is automatically appended with the base project's name. When the following `BUILD.py` file is processed... ``` baseboard = register_raw_project(project_name="base") variant1 = baseboard.variant(project_name="variant1") variant2 = variant1.variant(project_name="variant2") ``` ... variant1's `config.inherited_from` field will be `['base']` and variant2's will be `['base','variant1']. It is also possible to manually specify `inherited_from` when registering a project (either as a string or list of strings): ``` register_raw_project( project_name="myboard", inherited_from=["root","baseboard1"], ) ``` This method is how the EC's `BUILD.py` files are configured. In either case, the project's full name can be accessed by reading the ProjectConfig object's `full_name` property to join the names of the parent boards plus the current project name. In the case of the above example, the property would read `"root.baseboard1.myboard"`. The full name is not consumed anywhere within zmake; it is intended to be used for external reporting tools and does not affect the builds. BRANCH=None BUG=b:276947804 TEST=zephyr/zmake/run_tests.sh Change-Id: I7d7413175c9c670a64e7ade01a41e46a2fb8d743 Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400532 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
| * NX20P348X: Correct dead battery exit error handlingDiana Z2023-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when we hit the maximum number of dead battery exit errors the driver will read/modify/write to mask off the interrupt. However, it will only modify/write if the read fails. Trigger instead on the read being successful. BRANCH=None BUG=None TEST=./twister -T ./zephyr/test Change-Id: I44404c79abb6be04abc25ff35ecbe9bcdf523308 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404282 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * Zephyr: Add irq-gpios for PPCsDiana Z2023-04-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a property to store IRQ GPIOs for the PPCs in a lovely zephyr format. BRANCH=None BUG=b:276468569 TEST=CQ+1 Change-Id: I2ba89f4483ee901fd596559f486ea78936140f65 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4389619 Reviewed-by: Keith Short <keithshort@chromium.org>
| * keyboard_scan: drop CONFIG_KEYBOARD_LANGUAGE_IDFabio Baltieri2023-04-0610-145/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the CONFIG_KEYBOARD_LANGUAGE_ID option and code, does not seem to be used, can't find any historical reference either. BRANCH=none BUG=b:277105687, b:80168723 TEST=zmake compare-builds -a Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: If4eb37818ec4819204bcb343c37188f70457e09d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4403956 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
| * fpsensor: Rename fpsensor_detect functionsBobby Casey2023-04-069-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename get_fp_sensor_type and get_fp_sensor_spi_select to fpsensor_detect_get_type and fpsensor_detect_get_spi_select to be more consistent with other APIs BRANCH=none BUG=b:256674283 TEST=./util/compare_build.sh -b all -j 120 => MATCH Change-Id: Ie548ff5b33079cbc607cb9552efdfe9676da4c02 Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4283704 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * fp_sensor_mock: Rename fp_sensor_mockBobby Casey2023-04-067-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename fp_sensor_mock files to fpsensor_mock to be consistent with other file names. This helps avoid issues with scripts using pattern matched filenames, such as util/migrated_files.sh. BRANCH=none BUG=none TEST=compare_build.sh -b fp => MATCH TEST=make BOARD=bloonchipper tests TEST=make BOARD=dartmonkey tests Change-Id: I6f7e213cbf72a59cfd5994c66dc7b93ea44c6505 Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4334695 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * fpsensor: Fix definition of FP_SENSOR_IMAGE_OFFSETBobby Casey2023-04-063-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FP_SENSOR_IMAGE_OFFSET defines the offset from the beginning of fp_buffer to the image read from the sensor. If not defined this value defaults to zero but the definition was inadvertently removed in https://crrev.com/c/4273187. BRANCH=none BUG=b:276928792 TEST=make runhosttests -j TEST=./test/run_device_tests.py --board bloonchipper => PASS TEST=./test/run_device_tests.py --board dartmonkey => PASS Change-Id: If91cf6276e9a9c848ebf1885016788d5f066f0ad Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400531 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * elan: Fix compilation with elan sensorBobby Casey2023-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilation was failing due to elan_sensor.h `enum finger_state` being undefined. This was caused by fpsensor_types.h not being included, which went unnoticed because Elan configurations are not built as part of any standard board config. BRANCH=none BUG=none TEST=./util/compare_build.sh -b all => MATCH Change-Id: I3a9721b96453dce5d1729ce626d7b112dccac634 Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400530 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * rollback: Replace interrupt_{disable,enable} with irq_{lock,unlock}Patryk Duda2023-04-061-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace interrupt_* functions with their irq_* counterparts since we are going to use rollback regions in Zephyr. Zephyr EC shim doesn't provide interrupt_disable() and interrupt_enable() functions. Instead, irq_lock() and irq_unlock() functions, used in Zephyr, are implemented in EC and compiled when building Cros EC (without Zephyr). These functions are wrappers for old interrupt_disable() and interrupt_enable() functions. 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: I4899985cfc50aff65b0daebeb139520ff72c6af4 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4403576 Tested-by: Patryk Duda <patrykd@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com>
| * system_safe_mode: Set test runner tidRob Barnes2023-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CONFIG_TASKS_SET_TEST_RUNNER_TID_RULE to system safe mode unit test so test runner tid is set automatically. Without this change, the look up of the task id of the current task will cause an assert error. BUG=none BRANCH=None TEST=Test passes without assert errors Change-Id: I35d012253d3ed907c3f1a921c894e6c43e816ef1 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404230 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
| * rollback: Remove SECTION_IS_RO around get_rollback_erase_size_bytes()Patryk Duda2023-04-061-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is used when CONFIG_ROLLBACK_UPDATE is enabled. There is no need to prevent from compiling this function in RW. BUG=b:277029648 BRANCH=none TEST=make BOARD=bloonchipper Change-Id: I75acb976dd53f15c9ce6bbdd5a2cc7c5e22da8e5 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4381921 Commit-Queue: Patryk Duda <patrykd@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Patryk Duda <patrykd@google.com>
| * keyboard_scan: drop CONFIG_KEYBOARD_SUPPRESS_NOISEFabio Baltieri2023-04-064-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the CONFIG_KEYBOARD_SUPPRESS_NOISE option and hooks, does not look like this is used anymore, last board using it has been dropped from the repository. BRANCH=none BUG=none TEST=zmake compare-builds -a Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I08a2a742f6c643a800fccc6c8ab05918432d691d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4403578 Reviewed-by: Tristan Honscheid <honscheid@google.com>
| * mt8186,mt8188: fix chipset_force_shutdown before power_chipset_initEric Yilun Lin2023-04-061-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power state is not reflect the actual power state before the power_chipset_init. When a chipset_force_shutdown is called before the task inited, the power state API will not reflect the actual state. This CL fix that by querying the signal state instead. BUG=b:276229973 TEST=pass firmware_CorruptMinios.minios_b BRANCH=none Change-Id: I0e48d9745039c6de460fd5579486fe5f3e74cda8 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387196 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
| * kracko: Override PS8805 device id for A3 chipTommy Chung2023-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | BUG=b:275651680 BRANCH=none TEST=make sure "ectool pdchipinfo 1" can get device_id 0x2 for PS8805 A3 chip. Change-Id: Icd6a4f13ef20af97b95e03a74b795edd6906689b Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379826 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
| * kracko: Enable 2nd TCPC source PS8805 for port 1Tommy Chung2023-04-062-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used the SSFC bits to judge which source driver needs to be loaded. BUG=b:275651680 BRANCH=none TEST=verifying DUT with PS8705 or PS8805 in th daughter-board can charging and displaying, and verifying multiple Docks also works. Change-Id: Ie3933c5acea8e0d3a9796ef0e3d2bb1677e8532d Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379825 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
| * kracko: Add SSFC bitmap for TCPC sourcesTommy Chung2023-04-062-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds SSFC bitmap to support additional TCPC sources. BUG=b:275651680 BRANCH=none TEST=make BOARD=kracko Change-Id: Iaef8aafbac69f27e68029ea4810612d5d6787423 Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379824 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
| * kracko: Update SSFC bitmap for codecTommy Chung2023-04-061-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update bitmap for audio codec sources. This does not affect EC firmware and already used for coreboot. BUG=b:275644832 BRANCH=none TEST=make BOARD=kracko Change-Id: I9203e9e1757d566b1e35ad175575c5c969c56b55 Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379823 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
| * nissa: test project-level sub_board.cPeter Marheine2023-04-069-11/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This defines a Nissa-like board for unit testing and adds tests to exercise the project's sub_board.c, in particular that GPIO configuration is correct. A small change is made to make it possible for the tests to reset some global values that are set by board code on initialization; there is no functional change to board code. BUG=b:271118112 TEST=./twister -ciC -T zephyr/test/nissa BRANCH=nissa Change-Id: I8edfddbf663761f5c72c4d680cc056ee7d46d2f8 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402751 Reviewed-by: Tristan Honscheid <honscheid@google.com>
| * zephyr/tcpc_emul: automatically include prerequisitesPeter Marheine2023-04-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic TCPCI emulator requires common I2C emulation code, so make it automatically select it. Also include i2c.h from tcpc_generic_emul.h because it uses the I2C_PORT_BY_DEV macro defined therein. BUG=b:271118112 TEST=./twister BRANCH=none Change-Id: I2282085ee00f49de7ae1a6a3bccff059d78d7400 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402750 Reviewed-by: Tristan Honscheid <honscheid@google.com>
| * util/flash_jlink: Disable GUI when flashingTom Hughes2023-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the GUI popup when flashing and just show the status on the commandline. BRANCH=none BUG=none TEST=./util/flash_jlink.py -b bloonchipper -i ./build/bloonchipper/ec.bin Change-Id: I5ff44d3521aa41286e7cf2faaab51d14f1857e8a Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4395581 Reviewed-by: Firas Sammoura <fsammoura@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
| * core: Remove "end" symbolTom Hughes2023-04-065-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://crrev.com/c/4390608 introduced our own sbrk implementation, which uses the equivalent __shared_mem_buf symbol, so "end" is no longer needed. BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all => MATCH Change-Id: Ic763378785e48b01eeedbb23b3a1f6b68339c357 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396775 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
| * docs/fingerprint: Update for Icetower v3Tom Hughes2023-04-065-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=none TEST=view in gitiles Change-Id: Id90e483501425f6f0adcfec35b9852a513dd3a80 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400371 Reviewed-by: Josie Nordrum <josienordrum@google.com> Reviewed-by: Firas Sammoura <fsammoura@google.com>
| * rex: rename register_variant to register_rex_projectYH Lin2023-04-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the function name in order to work with the variant creation script. BUG=b:276818954 TEST=None BRANCH=None Signed-off-by: YH Lin <yueherngl@chromium.org> Change-Id: I43d3b173e6c731bd156d67fd4d02c5fa50b888b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404280 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
| * myst: define CBIBoris Mittelberg2023-04-051-26/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Align CBI bits according to build matrix and SKUs BUG=b:275631095 BRANCH=none TEST=zmake build myst Change-Id: I3a1fc2949bb89a33c86bf862dd348be245213c48 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396406 Reviewed-by: Diana Z <dzigterman@chromium.org>
| * ec: Don't undef CONFIG_RTC if CONFIG_ZEPHYRJeremy Bettis2023-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This one was missed earlier. For all Kconfigs, don't undef them in config.h if we are building for zephyr. BRANCH=None BUG=b:272518464 TEST=make buildall_only -j$(nproc) TEST=CQ TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic63a3834ae3a24269da79ae57131db3be9aef943 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400340 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
| * test: Add unit tests for sbrkTom Hughes2023-04-049-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:234181908 TEST=./test/run_device_tests.py --board bloonchipper -t sbrk => PASS TEST=./test/run_device_tests.py --board dartmonkey -t sbrk => PASS Change-Id: I02d6fe269718f0f4f7f5d72e6a8f01bb4e6b4cfd Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396773 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * libc/syscalls: Add sbrk implementationTom Hughes2023-04-041-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sbrk implementation in newlib's nosys library does not do any bounds checking to make sure the allocated memory stays within the heap: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=libgloss/libnosys/sbrk.c This version checks for both overflow and underflow. BRANCH=none BUG=b:234181908 TEST=./test/run_device_tests.py --board bloonchipper => PASS TEST=./test/run_device_tests.py --board dartmonkey -t sbrk => PASS Change-Id: I0be8caee76776c4a0ddabcf979d08f2f0c430aa0 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4390608 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * util/compare_build.sh: Do a shared checkoutAllen Webb2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of git 2.39.2 clone operations are broken when the .git/objects folder is a symlink. Using --shared works around the issue without the performance impact of file:// which drops --local. BRANCH=None BUG=b:276300917 TEST=run compare_build locally. Change-Id: Ic0735970abe46f3c95badadd84480b81037116f9 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400552 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org>
| * ec: Remove unnecessary #line directivesJeremy Bettis2023-04-047-47/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we don't #include <autoconf.h> we should not need any of these. BRANCH=None BUG=b:272518464 TEST=Build coverage report at various problem commits Change-Id: I5152c64fce75b34b6269ea0a9fe7d8c8e2b1840e Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396146 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * zephyr: Don't include autoconf.hJeremy Bettis2023-04-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove #include of autoconf.h, because it is already included on the command line for all files. BRANCH=None BUG=b:272518464 TEST=zmake build -a TEST=zmake build -a --coverage TEST=zmake compare-builds -a --ref1 HEAD --ref2 665509933e Change-Id: Ie09b66d71c546272aa70e2a64f94c88e85d6d16b Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396144 Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
| * ec: Prevent #undef or #define of zephyr KconfigsJeremy Bettis2023-04-042-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block all #undef or #define of Kconfigs in include/config.h. This will allow removing the #include <autoconf.h> from zephyr/shim/include/config_chip.h, which will in turn allow removing all of the #line directives we've sprinkled throughout the headers. BRANCH=None BUG=b:272518464 TEST=make buildall_only -j$(nproc), fails before crrev/c/4396143 TEST=CQ, fails before crrev/c/4396143, passes after Change-Id: I09649cf778e339fb45dc05c6ebdffc9aaa5778d2 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396142 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * zmake: Fix compare builds and add loggingJeremy Bettis2023-04-041-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git clone now requires file:// on local paths. Add logging on errors to make it more clear exactly what command failed. BRANCH=None BUG=b:272518464 TEST=zmake compare_builds -a Change-Id: Ibb27fb736c03e986631a6b52b6712705c872a23d Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396771 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
| * ish: increase HECI response buffer sizeLi Feng2023-04-041-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HC version v1 response has 132 bytes, but ISH response buffer is smaller than this. We will get error as below: localhost ~ # ectool version --name=cros_ish EC result 14 (RESPONSE_TOO_BIG) Hence increase ISH response buffer size to 260 bytes. BUG=b:271502099 BRANCH=none TEST=on Rex platform with ISH enabled, "ectool version --name=cros_ish" will print firmware version, no error. Change-Id: I81cbea19a2b4719b88b232bfea02803b0a244b89 Signed-off-by: Li Feng <li1.feng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4302834 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
| * ec: Don't undef kconfigs if CONFIG_ZEPHYRJeremy Bettis2023-04-031-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For all Kconfigs, don't undef them in config.h if we are building for zephyr. BRANCH=None BUG=b:272518464 TEST=make buildall_only -j$(nproc) TEST=CQ TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I87fed97ea5068746a5d42d9d61f09917260e0659 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396143 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * myst: update GPIOs from the myst-gpios spreadsheetBoris Mittelberg2023-04-032-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated new CSV and DTSI for GPIOs. Main change: Active-low input GPIOs now use GPIO_ACTIVE_LOW flag BUG=b:275564237 BRANCH=none TEST=zmake build myst Change-Id: Ifd70ea61a032b7e245787c084bdf0cb31ca99572 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388564 Reviewed-by: Diana Z <dzigterman@chromium.org>
| * Zephyr test: Create NX20P383X testDiana Z2023-04-036-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a test for the NX20P383X driver. This first test checks the APIs into the driver, but does not test the interrupt functionality. BRANCH=None BUG=b:276468569 TEST=./twister -T ./zephyr/test Change-Id: I9ffffda688c6d45b1448aac781bc4c070f06777b Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4389618 Reviewed-by: Yuval Peress <peress@google.com>
| * Zephyr test: Create NX20P383X emulatorDiana Z2023-04-035-1/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create an emulator for this PPC so tests may use it as an available i2c target. BRANCH=None BUG=b:276468569 TEST=./twister -T ./zephyr/test LOW_COVERAGE_REASON=emulator edge cases not tested Change-Id: I54b8aced582e81b3f61895f25b472bce79dddc50 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4389617 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
| * doc: zephyr_troubleshooting: add some notes about tests and gdbFabio Baltieri2023-04-031-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a note about recompiling tests without rerunning twister and using gdb on a test generated binary. BRANCH=none BUG=none TEST=checked the page on gitiles Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Iaaa18d18e4be79d95793932f2848245571484b96 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4393513 Reviewed-by: Yuval Peress <peress@google.com>
| * ec_openocd: fix a bunch of presubmit errorsFabio Baltieri2023-04-031-58/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bunch of existing presubmit detected cosmetic issues. No presubmit warning after this patch. BRANCH=none BUG=b:276311425 TEST=repo upload --cbr . Change-Id: Iccd2f39ded16fb9e36283cb80652aa56c27df460 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386299 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_openocd: handle sigint properlyFabio Baltieri2023-04-031-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently sigint is passed to everything here, openocd, gdb, the python interpreter. This makes it impossible to interrupt the current execution without a breakpoint. Fix that by ignoring the signal for the python interpreter using signal, and ignoring it for openocd using setsid. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex debug TEST=./util/ec_openocd.py --board rex debug -x Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I4d73561985a19bcfe92bf1a85f8fda272ec36cb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386298 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_openocd: add an option for using an external gdbserverFabio Baltieri2023-04-031-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to skip the openocd start altogether and just run GDB and connect to an already running target. This is useful for using a different gdbserver (such as JLinkGDBServer), but still have most of the gdb initialization sequence done by the script. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex flash TEST=./util/ec_openocd.py --board rex flash -x Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I8e9ce853484160441ba79e378db3d513b3f6af3c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386297 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_openocd: refer to util base for the support file search pathFabio Baltieri2023-04-031-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows running the script from any path. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex flash Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ifce00008e3049bbd1b5764ce222f46051a02fe4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386296 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_opencode: drop the flash_board proceduresFabio Baltieri2023-04-032-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | They don't seem to be used anywhere anyway. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex flash Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib15e687d4f9e62542ead3008c525ac8d598dcb49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386295 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_openocd: add automatic fallback to gdb-multiarchFabio Baltieri2023-04-031-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the script to check for the board specific gdb executable, but fallback to the generic multiarch one, since that's what seems to be on debian machines these days. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex flash Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I32a87a95287a4d2be9f14c82eef869d1a85cac51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386294 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * ec_openocd: add support for rexFabio Baltieri2023-04-032-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for debugging rex, copy the configuration from skyrim. BRANCH=none BUG=b:276311425 TEST=./util/ec_openocd.py --board rex flash Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I9ae8aef1542c4f957f690b88ae2186c8a2e55118 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4386293 Reviewed-by: Robert Zieba <robertzieba@google.com>
| * zmake: use CONFIG_COMPILER_SAVE_TEMPS for save-tempsFabio Baltieri2023-04-032-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's now a dedicated Kconfig option for enabling save-temps, switch the zmake save-temps flag to use that instead of EXTRA_CFLAGS directly. Update the troubleshooting documentation as well while we are at it. BRANCH=none BUG=none TEST=python3 -m zmake build --save-temps rex Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Cq-Depend: chromium:4393983 Change-Id: I04ecf7cee5134da095c5b3656df2c4f7fdad2056 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4393512 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
| * ec: Fix kconfig_check.pyJeremy Bettis2023-04-034-64/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kconfig_check.py tool was reporting all symbols in the Kconfigs as configs, including things like ``` config PLATFORM_EC_PREINIT_HW_CYCLES_PER_SEC default 100000000 ``` would return CONFIG_PLATFORM_EC_PREINIT_HW_CYCLES_PER_SEC and CONFIG_100000000 as valid configs. Read only Symbol node names instead. Include Kconfigs in platform/ec but outside of platform/ec/zephyr also. Also include Kconfig.zephyr from third_party/zephyr/main, which was previously omitted. This requires setting some environment variables. BRANCH=None BUG=b:272518464 TEST=make buildall Change-Id: I02e86f5c96f1e9943386d1610af1b2ab07550754 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4383371 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * zephyr: tests: Update testcase.yaml to remove extra_argsTristan Honscheid2023-04-038-306/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update testcase.yaml files using `extra_args` to specify extra config an DT overlays to use the new dedicated YAML fields. BUG=None BRANCH=None TEST=./twister for affected test projects Change-Id: If8162b7424b22638613a60b22ab0b35b2cae4e09 Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4391242 Reviewed-by: Yuval Peress <peress@google.com>