summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch cros/main into firmware-corsola-15194.B-mainfirmware-corsola-15194.B-mainEric Yilun Lin2023-04-1350-177/+1473
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py -r -z --board corsla --relevant_paths_file util/corsola-relevant-paths.txt firmware-corsola-15194.B-main Relevant changes: git log --oneline 846964eb47..fd4151fe81 -- zephyr/program/corsla common/charge_state_v2.c common/dps.c common/mkbp_* common/usb_charger.c common/usb_common.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_pe_drp_sm.c common/usbc/usb_prl_sm.c common/usbc/usb_sm.c common/usbc/usb_tc_drp_acc_trysrc_sm.c driver/battery/smart.c driver/bc12/pi3usb9201.* driver/charger/isl923x.* driver/charger/rt949* driver/ppc/nx20p348x.* driver/ppc/rt1718s.* driver/ppc/syv682x.* driver/tcpm/anx7447.* driver/tcpm/rt1718s.* driver/tcpm/tcpci.* driver/usb_mux/it5205.* driver/usb_mux/ps8743.* power/mt8186.c zephyr/boards/arm/npcx9/* zephyr/boards/riscv/it8xxx2/* zephyr/drivers/* zephyr/program/corsola/* zephyr/shim/* util/getversion.sh fd4151fe81 zephyr: Kconfig: add FLASH_PSTATE_BANK / FLASH_PSTATE_LOCKED d18304f138 voltorb: remove debug options and features for FW QUAL 57ed659cb9 USB-PD: Update EC_CMD_TYPEC_STATUS for EPR d14883b6fd RAA489110: Add RAA489110 driver e06fe77101 binman: Add binman nodelabel and use it 48cde011ac retimer: Add driver for ANX7452 retimer BRANCH=None BUG=none TEST=`make -j buildall` Cq-Depend: chromium:4421692 Force-Relevant-Builds: all Change-Id: I2d7a5d8c6dbfc9d8c13cde3b9e1fcc06ae782067 Signed-off-by: Eric Yilun Lin <yllin@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>
* | Merge remote-tracking branch cros/main into firmware-corsola-15194.B-mainEric Yilun Lin2023-04-1282-2866/+1375
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py -r -z --board corsla --relevant_paths_file util/corsola-relevant-paths.txt firmware-corsola-15194.B-main Relevant changes: git log --oneline 0dd5bdacef..30ffbb7635 -- zephyr/program/corsla common/charge_state_v2.c common/dps.c common/mkbp_* common/usb_charger.c common/usb_common.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_pe_drp_sm.c common/usbc/usb_prl_sm.c common/usbc/usb_sm.c common/usbc/usb_tc_drp_acc_trysrc_sm.c driver/battery/smart.c driver/bc12/pi3usb9201.* driver/charger/isl923x.* driver/charger/rt949* driver/ppc/nx20p348x.* driver/ppc/rt1718s.* driver/ppc/syv682x.* driver/tcpm/anx7447.* driver/tcpm/rt1718s.* driver/tcpm/tcpci.* driver/usb_mux/it5205.* driver/usb_mux/ps8743.* power/mt8186.c zephyr/boards/arm/npcx9/* zephyr/boards/riscv/it8xxx2/* zephyr/drivers/* zephyr/program/corsola/* zephyr/shim/* util/getversion.sh 9a2f21a9f6 system_safe_mode: Print process stack dump 513f2d68b8 voltorb: Select 15V PDO when battery charge full. 8096498329 zephyr: shim: Add GESTURE_DETECTION to enable/disable body detection 9a77bb3d4a zephyr: Support PLATFORM_EC_CMD_POWERINDEBUG flag 89379a0a5e zephyr: Support PLATFORM_EC_CMD_GPIO_EXTENDED flag BRANCH=None BUG=none TEST=`make -j buildall` Cq-Depend: chromium:4416478 Force-Relevant-Builds: all Change-Id: I2df27a3ea81bf76aa859c63e7cb623679ebe33e0 Signed-off-by: Eric Yilun Lin <yllin@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>
| * lis2dw: enable the low noise configurationJosh Tsai2023-04-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the low noise configuration at Control register 6 bit3. BRANCH=None BUG=b:262680246 TEST=use i2c read_byte command to check the low noise bit is set Change-Id: I19e519d9de69eaaac276027b1ab5bb9f80757eb1 Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4359354 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Kornel Dulęba <korneld@google.com> Reviewed-by: Kornel Dulęba <korneld@google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
| * Agah/Hades: Make d_notify_policies more readableDaisuke Nojiri2023-04-112-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds no functionality change. BUG=None BRANCH=None TEST=compare_build.sh -b "agah hades" Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I2dfea8e764cb25350b33f29597a2178e87402464 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409980 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
| * rollback: Move variables declaration under one #ifdef in add_entropy()Patryk Duda2023-04-111-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't need to create variables at the beginning of the function we can merge two CONFIG_ROLLBACK_SECRET_LOCAL_ENTROPY_SIZE blocks into one. 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: I2eff4fed07e8edb983384ed4cff72b1e0ffbd379 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4408869 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com> Tested-by: Patryk Duda <patrykd@google.com>
| * voltorb: Select 15V PDO when battery charge full.mike2023-04-113-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | voltorb needs set PDO=15V or higher when battery is full to prevent battery low current leakage, and change CONFIG_PLATFORM_EC_BATT_FULL_CHIPSET_OFF_INPUT_LIMIT_MV to 15000mv. BUG=b:269431836 BRANCH=corsola TEST=1.zmake build voltorb 2. test battery no leakage after fully charged Change-Id: I68e62f739bc1e058131e7a2d918fd6bdf0f62f29 Signed-off-by: mike <mike5@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4405804 Reviewed-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
| * zephyr: shim: Add GESTURE_DETECTION to enable/disable body detectionRuihai Zhou2023-04-114-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GESTURE_DETECTION to enable/disable body detection on zephyr. Also define LID_ACCEL and format the string literal to avoid build failed after enable GESTURE_DETECTION. BRANCH=corsola BUG=b:272655176 TEST=zmake build steelix TEST=check cros-ec-activity loaded Change-Id: Id77f0baeee3b7e710746991a653a77497984402b Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4405803 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
| * driver: bmi3xx: integrate body detectionRuihai Zhou2023-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Body detection is accelerometer agnostics. Add list_activity function to enable/disable body detection. BRANCH=corsola BUG=b:272655176 TEST=zmake build steelix TEST=check cros-ec-activity loaded Change-Id: I949e2d400e38944e6264886d7af357d6b9c39c61 Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4405802 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
| * zephyr: Support PLATFORM_EC_CMD_POWERINDEBUG flagKnox Chiou2023-04-114-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support PLATFORM_EC_CMD_POWERINDEBUG flag for `powerindebug` on zephyr. BUG=b:272185086 BRANCH=none TEST=zmake build geralt TEST=disable flag and check powerindebug Signed-off-by: Knox Chiou <knoxchiou@google.com> Change-Id: I89af4161b6bcc351e750d2716e0cc594cfe74814 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4383291 Tested-by: Knox Chiou <knoxchiou@chromium.org> Commit-Queue: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Knox Chiou <knoxchiou@chromium.org>
| * zephyr: Support PLATFORM_EC_CMD_GPIO_EXTENDED flagKnox Chiou2023-04-114-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support PLATFORM_EC_CMD_GPIO_EXTENDED flag to enable `gpioset` on zephyr. BUG=b:272185086 BRANCH=none TEST=zmake build geralt TEST=gpioset lid-open 0/1 Change-Id: I40097dcb9fca337177b9cef9458ddab0c4eab2bf Signed-off-by: Knox Chiou <knoxchiou@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4383289 Code-Coverage: Knox Chiou <knoxchiou@chromium.org> Commit-Queue: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Knox Chiou <knoxchiou@chromium.org>
| * doc: test.md: add links for getting on discordEric Peers2023-04-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add links for how to register/get an invite to the Zephyr discord server. BUG=none BRANCH=none TEST=loaded in chrome and checked for correct render + click on links. Signed-off-by: Eric Peers <epeers@google.com> Change-Id: Ib2600bf09f8b258da429925c07f457c308214662 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4412617 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
| * docs: Add instructions for tracing ec commandsGwendal Grignou2023-04-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document how we can trace ec_commands in the EC console and in the kernel. BUG=none BRANCH=none TEST=Check with `python3 src/chromium/src/tools/md_browser/md_browser.py -d src/platform/ec/docs` and go to http://localhost:8080/ap-ec-comm.md Change-Id: Iaf790dc945b46046b84b9f9574bf9a8e552789a5 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4369567 Reviewed-by: Rob Barnes <robbarnes@google.com>
| * Uldren: LED settingmick_hsiao2023-04-107-123/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set LED behavior in different power state BUG=b:274744844 BRANCH=none TEST=zmake build uldren successfully Change-Id: Ibac078642bc147319eaf8b0c62374e8e69a28c7c Signed-off-by: mick_hsiao <mick_hsiao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4362342 Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Tested-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
| * geralt: fix initial base stateTing Shen2023-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geralt's base_detect_tick() and base_update() assumes that `base-attached` implies `!TABLET_TRIGGER_BASE`, which is not true during static global initialization. Fix this by forcing base detached at init. BUG=b:273687730 TEST=`ectool mkbpget switches` reports reasonable state before first base state change. BRANCH=none LOW_COVERAGE_REASON=early development Change-Id: I68b22bee8f273348f4f75a83c80deaebfaa80933 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4411755 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
| * geralt: fix roration matrixTing Shen2023-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the rotation matrix after kernel rotates panel by 270 degree (CL:4379961) BUG=b:273687730 TEST=display orientation looks good BRANCH=none Change-Id: Id7d3f3f2842d7aae48b092331b738f0daee795ff Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4411757 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org>
| * uldren: Implement uldren battery.Logan_Liao2023-04-1011-4/+546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch base on battery team implement battery. BUG=b:274750316 BRANCH=none TEST=zmake build uldren success Change-Id: Iaf03efff6d6043eb0c8c573facd25431009e522f Signed-off-by: Logan_Liao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387195 Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Code-Coverage: Kyle Lin <kylelinck@google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Kyle Lin <kylelinck@google.com>
| * zephyr: driver: add gpio test for rt1718slschyi2023-04-107-34/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test for GPIO related driver tests. The common code used in different test suite are extracted into a new file, and extend the GPIO related functionality in RT1718S emulator for testing. BUG=b:273854897 BRANCH=none TEST=./twister -c -i -T zephyr/test/drivers -s drivers.rt1718s Change-Id: Ic32973bcee0f944be59ac6840612a3358d010b76 Signed-off-by: lschyi <lschyi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387396 Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* | Merge remote-tracking branch cros/main into firmware-corsola-15194.B-mainEric Yilun Lin2023-04-10275-1245/+9358
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py -r -z --board corsla --relevant_paths_file util/corsola-relevant-paths.txt firmware-corsola-15194.B-main Relevant changes: git log --oneline 012bda0c99..44842a951c -- zephyr/program/corsla common/charge_state_v2.c common/dps.c common/mkbp_* common/usb_charger.c common/usb_common.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_pe_drp_sm.c common/usbc/usb_prl_sm.c common/usbc/usb_sm.c common/usbc/usb_tc_drp_acc_trysrc_sm.c driver/battery/smart.c driver/bc12/pi3usb9201.* driver/charger/isl923x.* driver/charger/rt949* driver/ppc/nx20p348x.* driver/ppc/rt1718s.* driver/ppc/syv682x.* driver/tcpm/anx7447.* driver/tcpm/rt1718s.* driver/tcpm/tcpci.* driver/usb_mux/it5205.* driver/usb_mux/ps8743.* power/mt8186.c zephyr/boards/arm/npcx9/* zephyr/boards/riscv/it8xxx2/* zephyr/drivers/* zephyr/program/corsola/* zephyr/shim/* util/getversion.sh ad568190dd USB-PD: Support Vconn swap during EPR entry for Sink a421b3380f Zephyr: Add NX20P3481 CONFIG 53f35199ba Zephyr test: Test NXP PPC interrupts eea95bc3d1 mt8186,mt8188: check the holder of AP_RST_ODL 171aa03229 zmake: Track project inheritance in ProjectConfig 67d4a05823 NX20P348X: Correct dead battery exit error handling 5056315df0 mt8186,mt8188: fix chipset_force_shutdown before power_chipset_init 76c0324c1b zephyr/tcpc_emul: automatically include prerequisites 2921b0afa3 zephyr: Don't include autoconf.h fafe10a6fe ppc/nx20p348x: Do not set reserved bit a514bea1d0 battery: Remove dead sbs_passthrough host cmds d32a389718 Charger: CONFIG gate bypass mode a4eb1414fd zephyr: tcpc: implement i2c transactions in rt1718s emulator d8c8d452f7 zephyr: tcpc: add rt1718s as basic tcpc emulator BRANCH=None BUG=b:257320026 b:273854897 b:276229973 b:276468569 b:276947804 BUG=b:273722902 b:272518464 b:271118112 b:276458241 TEST=`make -j buildall` Cq-Depend: chromium:4410221 Force-Relevant-Builds: all Change-Id: I87dfb3549a3f228c1d4067965561a351999aa2c8 Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
| * markarth: Update battery shipping mode parameterLogan_Liao2023-04-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the power team document, modify battery(ap19b8m & ap20cbl) shipping mode parameter. modify shipping command to 0x3A from 0x00. modify shipping data to 0xC574 from 0x00. BUG=b:277303266 BRANCH=none TEST=test ectool batterycutoff success, wake success with AC. Change-Id: I74cdcb00ee7abe68f1318483be8f2daf0ddca0a4 Signed-off-by: Logan_Liao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4405801 Reviewed-by: Chao Gui <chaogui@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: Logan Liao <logan_liao@compal.corp-partner.google.com>
| * test/malloc: Add a test for double-free when using mallocstabilize-15415.B-mainTom Hughes2023-04-071-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:274737509 TEST=Add RUN_TEST(test_malloc_double_free) to run_test ./test/run_device_tests.py --board bloonchipper -t malloc => PASS TEST=Add RUN_TEST(test_malloc_double_free) to run_test ./test/run_device_tests.py --board dartmonkey -t malloc => PASS TEST=Add RUN_TEST(test_malloc_double_free) to run_test make run-malloc Change-Id: I1695d3b5cbf5d29bbaf35aaddcea76be51de53f7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4406092 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
| * USB-PD: Support Vconn swap during EPR entry for SinkDaisuke Nojiri2023-04-072-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a sink port must not be a Vconn source before entering EPR. This CL makes TCPMv2 allow a sink port to swap Vconn during EPR mode entry. BUG=b:257320026 BRANCH=None TEST=Agah. Set the sink port as Vconn source. Trigger EPR enter. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: If569ec9fe9e0f4ffbb153db649c3f9c04b698eb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4295370 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
| * test: Add a test for malloc/freeTom Hughes2023-04-076-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:274737509 TEST=./test/run_device_tests.py --board bloonchipper -t malloc => PASS TEST=./test/run_device_tests.py --board dartmonkey -t malloc => PASS TEST=make run-malloc Change-Id: Ida58335dcacbeefad56804246897810936c98546 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4390609 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
| * zephyr: Add `test_` prefix to ZTEST function namesAl Semjonovs2023-04-0748-228/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Twister parsing fails when `test_` prefix is missing from the test name. BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Change-Id: Ic7148a66c761eaf45619b4e764e5aac9b869092c Signed-off-by: Al Semjonovs <asemjonovs@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4409346 Reviewed-by: Keith Short <keithshort@chromium.org>
| * zephyr: test: Fix flaky keyboard_scan testTristan Honscheid2023-04-073-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latent key presses were appearing in a subsequent test, throwing off FFF expectations. Resolved by adding a test-only helper function to `keyboard_scan.c` to wipe out the debouncing state between tests. Also broke out the failing test into two independent ones. BRANCH=None BUG=None TEST=./twister -s drivers/drivers.keyboard_scan Change-Id: I79f2a6891f36e10a7df87865573348312c5b57d5 Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404706 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
| * Zephyr Test: Create test for NX20P3481 PPCDiana Z2023-04-074-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Create test cases and emulor behavior to cover the slightly-different portions of the NX20P348X code related to Vbus sourcig and sinking. BRANCH=None BUG=b:276468569 TEST=./twister -T ./zephyr/test Change-Id: Ieb30b3dbe3ad52448359ef253085058efe5b1d39 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404285 Reviewed-by: Simon Glass <sjg@chromium.org>
| * Zephyr: Add NX20P3481 CONFIGDiana Z2023-04-074-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a configuration for the now lesser-used NX20P3481 chip. BRANCH=None BUG=b:276468569 TEST=CQ+1 Change-Id: I28c2cc4821e4e456571bfb5584fa746845c9a750 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404284 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
| * Zephyr test: Split NX20P3483 specifics into their own testDiana Z2023-04-076-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver code in drivers/ppc/nx20p348x.c is split between two similar PPCs, with the primary difference being their methods of enabling sourcing and sinking. Split the code for the "3" variant into its own file so it may be tested separately. BRANCH=None BUG=b:276468569 TEST=./twister -T ./zephyr/test Change-Id: I83a8f0a1b01981aa8654aac472b2fb747bcb9feb Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404283 Reviewed-by: Aaron Massey <aaronmassey@google.com>
| * Zephyr test: Test NXP PPC interruptsDiana Z2023-04-077-18/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for testing interrupts with the NX20P384X driver. BRANCH=None BUG=b:276468569 TEST=./twister -T ./zephyr/test Change-Id: I3856063c367ec6d8ffcbd8599c3b62fa73e01b1f Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4389620 Reviewed-by: Tomasz Michalec <tmichalec@google.com>
| * flash_fp_mcu: Dynamically determine gpiochip number for hatchPatryk Duda2023-04-071-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hatch-kernelnext uses upstream kernel which changes every week. In this case it's cumbersome to hardcode gpiochip number in the script and we should determine it dynamically. BUG=b:277206670 BRANCH=none TEST=Run `flash_fp_mcu --hello` on hatch and hatch-kernelnext Change-Id: Ib2aaf37888bf880e7066c02fee68352808d9b344 Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4404897 Reviewed-by: Bobby Casey <bobbycasey@google.com> Commit-Queue: Patryk Duda <patrykd@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Patryk Duda <patrykd@google.com>
| * rt1739: check PD state before disconnect SBU/DU/DMEric Yilun Lin2023-04-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the issue when SBU/DP/DM is affected by the disconnection of the other port. BUG=b:274553828 b:276416575 BRANCH=none TEST=disconnect C0, and C1 USB is still probable Change-Id: I1a3fc502bde1e48e19107fbd9fdafae7b3cb9869 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4408487 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com>