summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zephyr: rex: enable CONFIG_PLATFORM_EC_SWITCHSubrata Banik2022-08-301-1/+1
| | | | | | | | | | | | | | | | | | | Fixed the following error message from AP console: error, assuming lid is always close and triggered shutdown request. BUG=b:243920003 TEST=No shutdown request has triggered while booting AP at depthcharge. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I60e56912f030f6f0e3cb49282bbffc920fb389e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864607 Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com> Tested-by: Subrata Banik <subratabanik@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Subrata Banik <subratabanik@chromium.org> Reviewed-by: Kapil Porwal <kapilporwal@chromium.org> Reviewed-by: Madhu P <mparuchuri@google.com>
* driver/bmi323: Update calibration codeLeo Huang2022-08-302-228/+43
| | | | | | | | | | | | | | | | First upload of code from Bosh to simplify IMU calibration. BUG=b:240404661 TEST=in progress BRANCH=None Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I20c479e7ad54ce6054ecf43e0655e7a9314d6879 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3807165 Reviewed-by: HUANG Leo <leo.huang@bosch.corp-partner.google.com> Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Commit-Queue: Knox Chiou <knoxchiou@chromium.org> Tested-by: HUANG Leo <leo.huang@bosch.corp-partner.google.com>
* rex: Enable lid backlightMadhurima Paruchuri2022-08-301-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:243919230 TEST=zmake build rex --clobber Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: Ie5c360fb21564c876d9a20bce1db9fc833b8435b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864609 Reviewed-by: Subrata Banik <subratabanik@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* usbc: Set VDM_SETUP_DONE on DR Swap fail due to PD 2.0B R, Harsha2022-08-301-0/+1
| | | | | | | | | | | | | | | | | | In USB PD 2.0, set VDM_SETUP_DONE flag after marking identity discovery as fail and notify kernel to avoid repeated host event generation which blocks system from entering s0ix. BUG=b:243906438 TEST=Hotplug PD 2.0 charger to DUT and check if kernel receives the corresponding notification. Check if system enters s0ix. BRANCH=none Signed-off-by: B R, Harsha <harsha.b.r@intel.com> Change-Id: I8cdd814e2c6bad4e63141bd77e2a8cd224cc688f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858970 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>
* dts-battery: Expand descriptions to explain useAndrew McRae2022-08-301-2/+8
| | | | | | | | | | | | | | Expand the manuf_name and device_name so that it is clear what their use and origin is for. BUG=none TEST=zmake build nissa BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I8defd0cd02eff15f4924866ca9268cad264819b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864747 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Xivu: Battery cut off failridden_liu2022-08-301-2/+2
| | | | | | | | | | | | | | | | Battery cut off fail. Modify manufacturerName and devicename can fix it. BUG=b:244129838 BRANCH=Xivu TEST=zmake build xivu.Xivu battery cutoff success. Signed-off-by: ridden_liu <ridden_liu@compal.corp-partner.google.com> Change-Id: I4bb9a1f5133b8849bc997a16ac01b44d8a91e17d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864744 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* tentacruel : Dynamic charging current control.jeffrey2022-08-304-1/+137
| | | | | | | | | | | | | | | | | | | | | | 1. Limit Charging Current by RT9490 thermistor. 2. Control with one minute average temperature. 3. If temperature over or under 55C and keep 5s, Charging Current will change to next level. 4. Limit Charging Current table : 3600/3000/2400/1800 BUG=b:242267801 TEST=zmake build tentacruel --clobber Use ectool temps all to check charger temperature. BRANCH=None Signed-off-by: jeffrey <jeffrey_lin@pegatron.corp-partner.google.com> Change-Id: Ib0f17e6798d36a93d571bd60d33af767ccbd2f00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3840995 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com> Tested-by: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com> Reviewed-by: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com>
* charger/rt9490: fix incorrect unit in ADC measurementTing Shen2022-08-301-3/+3
| | | | | | | | | | | | | | | The units returned from charger is mV/mA, no need to multiply 1000. BUG=none TEST=manually checked datasheet BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Icdb56294b6508f684a3d0eebeeadf786f5ef2086 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3744039 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org>
* corsola: remove unused filesTing Shen2022-08-302-91/+0
| | | | | | | | | | | | | | | | | regulator.c: totally unused krabby/battery.c: migrated to device tree BUG=none TEST=zmake build {krabby,kingler} BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ia0c3c341447a68263e19f26c6e425a759c8d4768 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860657 Commit-Queue: Eric Yilun Lin <yllin@google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* zephyr: Add test for Corsola db detectionwen zhang2022-08-307-1/+311
| | | | | | | | | | | | | | Add test for Corsola db detection in Kingler board. BUG=b:243423485 TEST=./twister --coverage -v -i -T zephyr/test/kingler BRANCH=none Change-Id: Ib91a1f5bed6c55fd00a8ba9c4b464a8dfcf457fe Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858962 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* winterhold: Modify LED behaviorLeila Lin2022-08-301-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Modify LED behavior for winterhold AC mode: Full charged: off Charging: white DC mode: S0-S5: off Battery low(S0/S3): amber Battery low(S5): off Battery erroe(S0-S5): blinking Amber, 1 sec on/1 sec off BUG=b:240003377 BRANCH=none TEST=zmake build winterhold Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Change-Id: Ia359d90cc8dff8b025e0195be879ff3110d4ad7a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858968 Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com>
* [test] Exclude *fpsensor* from Zephyr migrate hookBobby Casey2022-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Files from common/mock/fpsensor_* and include/mock/fpsensor_* were still getting caught in the precommit hook. I initially considered adding these paths to the exclusion list but it seemed to make more sense to just exclude everything with fpsensor in the name, as FPMCU presently does not support Zephyr. BRANCH=none BUG=none TEST=util/migrated_files.sh common/mock/fpsensor_state_mock.c successfully ignores the file TEST=util/migrated_files.sh common/mock/somethingelse.c successfully reports warning Signed-off-by: Bobby Casey <bobbycasey@google.com> Change-Id: I40a87c2e44a1feeec9eae43046fcbf6978190356 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3838933 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Use DT_STRING_UPPER_TOKEN_BY_IDXTristan Honscheid2022-08-291-4/+2
| | | | | | | | | | | | | | | | Use the new DT_STRING_UPPER_TOKEN_BY_IDX() macro to create the enum of i2c ports in i2c.h. This replaces a homegrown DT macro that no longer works and is blocking downstreaming BUG=None BRANCH=NOne TEST=./twister; zmake build herobrine Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ib9fcea829e5e11b079bcec05d253fba52ab6915c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864143 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* crota: modify custom fan controlPeter Chi2022-08-292-43/+51
| | | | | | | | | | | | | | | | | Sensor DDR also is a fan on/off switch: - temperature > 38°C = on - temperature < 37°C = off Record actual and target RPM every 2 minutes. BUG=b:243100667 BRANCH=none TEST=make -j BOARD=crota Signed-off-by: Peter Chi <peter_chi@wistron.corp-partner.google.com> Change-Id: I069512cf68639e597351f2bf6877d95f45094c89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826595 Reviewed-by: caveh jalali <caveh@chromium.org>
* npcx_evb: Disable TBT/USB4Abe Levkoy2022-08-292-0/+8
| | | | | | | | | | | | | | npcx_evb boards do not support TBT or USB4. Disable these configs. BUG=b:244218024 TEST=zmake build npcx7 npcx9 BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I88695fa06689c622553269f5609c05f725025e2f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863290 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* it8xxx2_evb: Disable USB4/TBTAbe Levkoy2022-08-291-0/+4
| | | | | | | | | | | | | | it8xxx2_evb does not support TBT or USB4. Disable these configs. BUG=b:244218024 TEST=zmake build it8xxx2_evb BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I2e354741844af64edca79e65ca7507de6aa0a9ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863289 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* lazor: Disable TBT/USB4Abe Levkoy2022-08-291-0/+2
| | | | | | | | | | | | | | | lazor does not support TBT or USB4. Disable the configs for these features. BUG=b:244218024 TEST=zmake build lazor BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ia3774b5f9c0938b23d6d16c70a81bc19b524334c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863288 Commit-Queue: Wai-Hong Tam <waihong@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* herobrine: Disable TBT/USB4Abe Levkoy2022-08-291-0/+2
| | | | | | | | | | | | | | herobrine does not support TBT or USB4. Disable these configs. BUG=b:244218024 TEST=zmake build -c herobrine BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I6d4f7eaeb5aaa082e8ac9a1c54889da99d6fe502 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863287 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* zephyr: test: Add the flash region info host command testsWai-Hong Tam2022-08-291-0/+63
| | | | | | | | | | | | | | | Add the tests for the flash region info host command. BRANCH=None BUG=b:236075788 TEST=./twister -s zephyr/test/drivers/drivers.default Change-Id: I4b86d101a8e5af8e424fc188e1b2996968d43f3a Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858038 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* drawcia_riscv: Disable CMD_ACCELS to reduce flash sizeCaveh Jalali2022-08-291-0/+3
| | | | | | | | | | | | BRANCH=none BUG=none TEST=buildall passes Change-Id: I7c4c32d933a2d16c9dd219db73ceedf4b65edd6a Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860647 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* TCPMv2: Release TCPC driver on port suspend requestCaveh Jalali2022-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | We need to release the TCPC driver from the TCPC when we want to suspend all operations on the TCPC. In practice, this means we disable ALERTs on the TCPC so the driver is not invoked. We introduced this functionality in TCPMv1 but it never made it to TCPMv2, so add it to TCPMv2. BUG=b:240458902 BRANCH=none TEST="pd 2 suspend ; pd 2 resume" no longer stops port 0 due to interrupt storm. /sys/class/typec shows devices are enumerated on resume. Change-Id: If6cc99a7a3392fd1ddfdf795074bc9f406b2555e Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859101 Reviewed-by: Poornima Tom <poornima.tom@intel.corp-partner.google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* tcpm/nct38xx: Fix typo in commentCaveh Jalali2022-08-291-3/+3
| | | | | | | | | | | | | | This fixes a typo in a comment. BUG=none BRANCH=none TEST=buildall passes Change-Id: Id9370e09e32a7d9cb2ed06899a4341ef96d4ac95 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859100 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* skyrim: Re-enable `crash` console commandRobert Zieba2022-08-291-1/+0
| | | | | | | | | | | | | | | This commit re-enables the `crash` console command. This command is required for the `firmware_ECSharedMem` FAFT test. BRANCH=none BUG=b:209512212 TEST=Verified that `crash` command works again Signed-off-by: Robert Zieba <robertzieba@google.com> Change-Id: Id331f0f2ce932dc73b633661f6ec75a7b0f51ee3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3862844 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* ec: Add util to sort lcov output by uncoveredJeremy Bettis2022-08-291-0/+59
| | | | | | | | | | | | | | | | | | | | | Add new utility script to sort lcov output by uncovered lines of code. When looking for an easy win, it is usually to look for files with a lot of uncovered lines, rather than a low coverage percentage. BRANCH=None BUG=None TEST=Ran it. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I9da9a54c22176bdaa06bad1eb394f8c09bed7c25 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858581 Commit-Queue: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Yuval Peress <peress@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* rex: Add support for MKBP eventsScott Collyer2022-08-291-0/+5
| | | | | | | | | | | | | | | | This CL adds the required MKBP config options to support MKBP events BRANCH=none BUG=b:243921710 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ie3dc0b3ceceb2a0b0e975c649180f022510bf959 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860655 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Madhu P <mparuchuri@google.com>
* rex: Add support for USB-AScott Collyer2022-08-292-0/+8
| | | | | | | | | | | | | | | | This CL adds the required config option and the usba-port-enable-list that are required to support USB-A opertation. BRANCH=none BUG=b:243899461 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I69e685133a2b319037feb07bffa48b2f4ccaa869 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860654 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* rex: Add PSL device tree nodesScott Collyer2022-08-291-9/+32
| | | | | | | | | | | | | | | | | This CL adds nodes required for the npcx PSL block. This CL also removes the hibernate-wake-pins entry as that is only required for having wake pins without the EC hibernate feature. BRANCH=none BUG=b:243920003,b:243353079 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ic1470ecd25f2aff88bce45f3f869a18d95f42d8c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860653 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* rex: Enable NCT3807 GPIO expander blockScott Collyer2022-08-291-1/+3
| | | | | | | | | | | | | | | | | | This CL adds CONFIG_GPIO_NCT38X which was missing. In addition, CONFIG_PLATFORM_EC_USB_PD_TCPM_SBU was removed as the SBU isolation for C0 is discrete and not integrated to the TCPC. BRANCH=none BUG=b:243482165 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ic19183b7b645b19d88e264ced1afb4f8dfacb066 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3852567 Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Madhu P <mparuchuri@google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Scott Collyer <scollyer@chromium.org>
* rex: Fix tcpc_get_alert_status functionScott Collyer2022-08-291-5/+6
| | | | | | | | | | | | | | | | | | | | There was an error in tcpc_get_alert_status where the pin level wasn't being read. This CL adds gpio_pin_get_dt() so the gpio pin level is going to be read and removes the macro that was being used and was only testing if the node existed. BRANCH=none BUG=b:243482165 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ife8aa4ed08c2be43776e12eeb9e28a9a04036bfd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855164 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Madhu P <mparuchuri@google.com>
* zephyr: Add new test for vboot efs2Jeremy Bettis2022-08-299-1/+425
| | | | | | | | | | | | | | | | | | | | This covers the cases in vboot_main. Next is to move the next level down and emulate the communication with the cr50 as well. Add new test hooks to vboot/efs2.c, and the flash emul. BRANCH=None BUG=None TEST=./twister Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Icca8dde3731a91645eabbf2bc547c84a51cb1474 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858041 Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* flash_fp_mcu: Fix script on nocturnePatryk Duda2022-08-291-13/+4
| | | | | | | | | | | | | | | | | | | | Recently nocturne board switched to 5.10 kernel. It means that SPI device for nocturne with 5.10 kernel needs to be changed to /dev/spidev1.0. This change is a good opportunity to get rid of separate config for nocturne-kernelnext board. The script still supports nocturne with kernel 4.4 because ChromeOS images can have this version in other kernel slots. BUG=b:244171527 BRANCH=None TEST=Run `flash_fp_mcu --hello` on nocturne and nocturne-kernelnext. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I7c2ecdd5d8ca3d9ce438376bdea33abbaf189e5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3861329 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com>
* zephyr: shim: led: Add led pwm period checksMadhurima Paruchuri2022-08-291-1/+19
| | | | | | | | | | | | | | | Add build asserts to make sure the led pwm period is configured right for all LEDs BUG=b:230093078 BRANCH=none TEST=zmake testall Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: I2fe4ee9af7c013d0f17b186baf93fc5f26fa770e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858971 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Also exclude mock dirJeremy Bettis2022-08-291-0/+1
| | | | | | | | | | | | | | | | Mocks are basically emulators. BRANCH=None BUG=None TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I4049cd90b29cfd3b00adb84df7bcf2a3a998d957 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860367 Commit-Queue: Al Semjonovs <asemjonovs@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* RT9490 : Use ADC thermistor on RT9490jeffrey2022-08-294-0/+123
| | | | | | | | | | | | | | | | | Use thermistor RT9490 for charger temperature. BUG=b:242267801 TEST=ectool temps all to check it can read thermistor temperature. BRANCH=None Signed-off-by: jeffrey <jeffrey_lin@pegatron.corp-partner.google.com> Change-Id: I91a01adafdc6aca7fcd2afb14c4e6a099826e46e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853779 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com> Commit-Queue: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com> Tested-by: Jeffrey Lin <jeffrey_lin@pegatron.corp-partner.google.com>
* Xivu: Submit Keyboard Mapping CLridden_liu2022-08-292-3/+35
| | | | | | | | | | | | | | | | | The row of function keys on the xivu is wrong. So need to submit a firmware Change List (CL). that specifies the top row layout unique to the device. BUG=b:243308699 BRANCH=Xivu TEST=zmake build xivu.Check if the function keys are normal. Signed-off-by: ridden_liu <ridden_liu@compal.corp-partner.google.com> Change-Id: I3b3fc31e3f86a52cb4bc0d4f23903a27a914cc90 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858896 Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: test: Add tests for the hibdelay console commandMadhurima Paruchuri2022-08-292-0/+38
| | | | | | | | | | | | BUG=b:236074678 BRANCH=none TEST=./twister -s zephyr/test/drivers/drivers.default -c Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: I2e18176f2a06a9330c55b6f9806297825a670427 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3856581 Reviewed-by: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: test: Add tests for the hcdebug console commandMadhurima Paruchuri2022-08-293-0/+52
| | | | | | | | | | | | BUG=b:236074352 BRANCH=none TEST=./twister -s zephyr/test/drivers/drivers.default -c Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: I74701533b62e55bf72169c807c8cf55ff477263e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3856575 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* anx7447: fix Rp value before entering low power mode.lschyi2022-08-291-1/+24
| | | | | | | | | | | | | | | | | | | | | | | If set ANX7447 as force source role in TCPC and not set the Rp value to default before entering the low power mode, ANX7447 would cause periodic voltage drop on type c port and resulting spam logs in EC console. Update the enter low power mode method to set the Rp value to default if ANX7447 is configured as force source role. BRANCH=none BUG=b:237603237 TEST=run `pd {port} dualrole {mode}` and check `tcpci_dump {port}` with (1) mode = on (2) mode = sink (3) mode = source and ensure no spam logs, and ROLE register matches to the mode. Signed-off-by: lschyi <lschyi@google.com> Change-Id: I0bc9b0e2e8708d479b0d7c783041c3a13026e6d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3861707 Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
* util/comm-dev.c: Fix passing wrong parameter to ioctlWen-Ting Tseng2022-08-291-1/+1
| | | | | | | | | | | | | | | | The method ec_command_dev_v2 re-calls ioctl again if the first attempt fails and the errno is EAGAIN. There is a typo that the pointer of pointer of data block is passed to ioctl. This may lead to segmentation fault or, if the driver writes malicious data, arbitrary code execution. BUG=b:243507497 BRANCH=None TEST=None Change-Id: Iece1ff89f9253d976e396d46c0e98f0332016bf6 Signed-off-by: Wen-Ting Tseng <wdzeng@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3850562 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* anx7447: support tcpc_get_bist_test_modemike2022-08-291-0/+11
| | | | | | | | | | | | | Support tcpc_get_bist_test_mode for anx7447. BUG=b:229812911 BRANCH=none TEST=ensure the BIST status is reported correctly Signed-off-by: mike <mike5@huaqin.corp-partner.google.com> Change-Id: I521f174ea29bcf015c7deb727e01c4772f276b79 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3827107 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* yaviks: remove imu sensorZick Wei2022-08-295-192/+19
| | | | | | | | | | | | | | | | yaviks is clamshell system, remove imu related code. BUG=b:242933564 BRANCH=none TEST=zmake build yaviks Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ia87bc947433856e3990e4887b0f88c78e1364e36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3837714 Reviewed-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Andrew McRae <amcrae@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* steelix: Support 65W PD adapterwen zhang2022-08-291-0/+4
| | | | | | | | | | | | | | | The default PD config in Zephyr Kconfig is 20V 3A 60W, we change the default config in the project to support 65W. BUG=b:235258222 TEST=DUT can request 20V 3.25A 65W BRANCH=none Change-Id: If1e5721133ef9808394950898cb90f1c155de3e6 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3855653 Reviewed-by: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
* Zephyr test: Add TBT exit checkDiana Z2022-08-271-1/+14
| | | | | | | | | | | | | | | Add a check for TBT mode exit path on SOP with the USB3 cable. BRANCH=None BUG=b:243151272 TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ic77435d5dae8e3235f0ddcae32af0d89d2bde174 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859565 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Zephyr emul: Generalize ExitModeDiana Z2022-08-272-12/+25
| | | | | | | | | | | | | | | | Allow ExitMode to take place with any SVID sent if we've ACK'd an EnterMode of that SVID. BRANCH=None BUG=b:243151272 TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iec3dec1900dba54d13d7a4bbe50078b547d4a1f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859564 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Zephyr test: Add a passive TBT entry testDiana Z2022-08-271-16/+144
| | | | | | | | | | | | | | | | Add a test for a passive cable to allow TBT entry. This is an exercise of the SOP entry only. BRANCH=None BUG=b:243151272 TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2dcfb75315148218df50207f4e9269a6014db621 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859563 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* USB PD: Add macro for passive cable VDODiana Z2022-08-271-0/+18
| | | | | | | | | | | | | | | Add a macro to generate passive cable VDOs and exactly enough enums to cover fields which have 0 as a reserved value. BRANCH=None BUG=b:243151272 TEST=zmake buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieff7eb9e9fa585d13b54d4c1c183467df5fc20b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859562 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Zephyr emul: Generalize mode entry responseDiana Z2022-08-273-18/+17
| | | | | | | | | | | | | | | | | Generalize the fields for mode entry so they can be used for modes besides DP as well. BRANCH=None BUG=b:243151272 TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Idf2ce813cbcfcf730042a1d55b1de63425fbc824 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859561 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Zephyr emul: Add cable supportDiana Z2022-08-273-24/+166
| | | | | | | | | | | | | | | | | Add support for the cable replying to messages for unit testing. For the first level of support, only reply to DiscoverIdentity (response for a cable with no alternate mode support). BRANCH=None BUG=b:243151272 TEST=./twister -T ./zephyr/test Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I731e0aad35a1d4bc07be75378df1f272d0eef525 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3859560 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* util/flash_ec: Fix shellcheck warningsTom Hughes2022-08-271-2/+2
| | | | | | | | | | | | | | | | | | : ${BOARD:=${FLAGS_board}} ^----------------------^ SC2223: This default assignment may cause DoS due to globbing. Quote it. SUPPORTED_CHIPS+="${FLAGS_chip}" ^-------------^ SC2179: Use array+=("item") to append items to an array. BRANCH=none BUG=b:242127759 TEST=./util/flash_ec --board=dartmonkey Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I8ccb3faf2ee01be1a35dda2a1c28f49b9d19d0ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860072 Reviewed-by: Andrea Grandi <agrandi@google.com>
* util/flash_ec: Fix shellcheck warningsTom Hughes2022-08-271-2/+2
| | | | | | | | | | | | | | | | | | | "UART baud rate to use when bit bang programming, "\ ^-- SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"? for p in $@ ; do ^-- SC2068: Double quote array expansions to avoid re-splitting elements. BRANCH=none BUG=b:242127759 TEST=./util/flash_ec --board=dartmonkey Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I20b517627bd3b6e216e87593309b78aeb27a49c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3860071 Reviewed-by: Andrea Grandi <agrandi@google.com>