summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch cros/main into firmware-brya-14505.B-mainfirmware-brya-14505.B-mainIvan Chen2023-05-17132-420/+2324
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py --board brya firmware-brya-14505.B-main Relevant changes: git log --oneline 8641442366..b34dc2ae90 -- board/brya board/brya util/getversion.sh BRANCH=None TEST=`make -j buildall` Force-Relevant-Builds: all Change-Id: I63149b4c1782b3ed57f2556755901c21f5f1e3e9 Signed-off-by: Ivan Chen <yulunchen@google.com>
| * presubmit: Require bug in LOW_COVERAGE_REASONTristan Honscheid2023-05-163-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce having a bug listed in the LOW_COVERAGE_REASON to track the issue that impedes coverage for that specific CL. This encourages developers to go back and fix those problems. Also update the documentation. BUG=None TEST=util/check_low_coverage_reason.py Change-Id: If35f918b11771d10944e0b6e7a4aeeba84e05eaf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4537010 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Tristan Honscheid <honscheid@google.com> Tested-by: Tristan Honscheid <honscheid@google.com>
| * ec: Add #line in include/lid_switch.hJeremy Bettis2023-05-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around coreboot GCC preprocessor bug. BUG=b:272518464 TEST=gcc -E Change-Id: Ic95717cab141d76a20d45a16126ac37a8859829e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4540107 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
| * TCPMv2: Do not attempt Enter_USB under PD 2.0Abe Levkoy2023-05-162-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the port partner is not PD 3.0 or higher, do not consider it to support USB4/Enter_USB. If the AP requests USB4 entry, disregard the request and consider mode entry complete. Avoid repeatedly sending Enter_USB to a PD 2.0 partner. BUG=b:279421317 TEST=twister -s drivers/drivers.usbc_usb4_mode Change-Id: I3e82738f816e6dd5af24d627b6cd971a34d74586 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4533369 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jameson Thies <jthies@google.com>
| * AMD Mux Emul: Stabilize delayed mux set codeDiana Z2023-05-163-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current emulator relies on timing in order to delay mux sets. However, this can lead to some surprising mismatches in time between the emulator and test (such as the write completing during a subsequent test case). Instead, delay by the number of reads the driver has done. BUG=b:234771735 TEST=./twister -s drivers/drivers.amd_fp6_usb_mux Change-Id: I71c78348e29b70c479da8009b8a085cf4e57c188 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4528795 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Tested-by: Diana Z <dzigterman@chromium.org>
| * motion_sense: Fix null pointer reference in gesture detectionRuihai Zhou2023-05-163-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motion_sense_fifo_stage_data with NULL were removed in CL:4499747. But we need to stage and commit the motion state changed to activity sensor for body detection on the ap side. Revert the change and Add null pointer check in motion_sense_fifo_stage_data and fifo_stage_unit to fix it. BUG=b:272655176 TEST=./twister -v -i -p native_posix -p unit_testing -s drivers/drivers.body_detection TEST=received User proximity: Near/Far event from powerd log Change-Id: I1ef882f25e07fa17d879d8b0a4b9ffe211b071e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520740 Tested-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
| * boringssl: Add elliptic curve key helpersYi Chou2023-05-165-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=b:248508087 TEST=make V=1 BOARD=bloonchipper -j TEST=./test/run_device_tests.py --board bloonchipper -t boringssl_crypto => PASS TEST=./test/run_device_tests.py --board dartmonkey -t boringssl_crypto => PASS Change-Id: Ifdca7743c09910d413407be986e9d959e5b90479 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4505560 Tested-by: Yi Chou <yich@google.com> Commit-Queue: Yi Chou <yich@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * boringssl: Implement sysrand from TRNGYi Chou2023-05-1613-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boringssl doesn't include the TRNG implementation, we need our own CRYPTO_sysrand. BUG=b:248508087 TEST=make V=1 BOARD=bloonchipper -j TEST=./test/run_device_tests.py --board bloonchipper -t boringssl_crypto => PASS TEST=./test/run_device_tests.py --board dartmonkey -t boringssl_crypto => PASS Change-Id: I3136bcc96e09f674278bf338297d7bc0576e174c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4496289 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Yi Chou <yich@google.com> Tested-by: Yi Chou <yich@google.com>
| * test_util.h: Add TEST_ASSERT_ARRAY_NEYi Chou2023-05-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | BUG=b:248508087 make runhosttests -j200 >/dev/null Change-Id: I7fa48a68bc8a56fb94649a4a0930ce83df6d9a84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506541 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Yi Chou <yich@google.com> Tested-by: Yi Chou <yich@google.com>
| * ec_openocd: flip the logic for verify, change to --no-verifyFabio Baltieri2023-05-161-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current verify option has to be used with --verify=0, which is a bit unintuitive. Replace it with a --no-verify, or -n. BUG=none TEST=./util/ec_openocd.py --board rex flash -n Change-Id: Ib2747c52b9a07c8ff3985dd0c7416331e2b042b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4534336 Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Robert Zieba <robertzieba@google.com>
| * vell: Sync up FW_CONFIG with config.starDevin Lu2023-05-162-69/+14
| | | | | | | | | | | | | | | | | | | | | | | | BUG=b:282189358 TEST=make BOARD=vell Change-Id: I7a37cf41e22982f354f74f0fe9dbe27673fb29f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530325 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: caveh jalali <caveh@chromium.org>
| * starmie: Config the thermal sensor settingwangganxiang2023-05-162-0/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add thermistor 1V9-100K-100K-4250B for ambient temperature. BUG=b:277309876 TEST=zmake build starmie Use ectool temps all to check can read thermistor temperature. Change-Id: Ia0786b2495f2b4f0d6d29d74cf176b9f61cff01a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4525658 Tested-by: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com>
| * omnigul: Remove TBT and USB4 defineLogan_Liao2023-05-161-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omnigul don't support Thunderbolt and USB4, remove them. BUG=b:282045980 TEST=omnigul didn't hang when connect two omnigul with typec cable Change-Id: Ied52af43231d7454b51d18b531c1d1bf0b54eaac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530331 Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Code-Coverage: Kyle Lin <kylelinck@google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
| * voltorb: enable checking battery stable statusSiyu Qin2023-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check battery status TCA/TDA mask, any one of these two masks is set, the battery state can be considered stable. BUG=b:275392868 TEST=no "charge problem: batt params" in EC console when DUT wakes up from battery ship mode Change-Id: If8712e6e958bac9d9c0645b284a2569cdffae327 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4525879 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Tested-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
| * battery: check the battery stable state when battery wake upSiyu Qin2023-05-164-6/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the specific battery status to judge whether the battery is initialized and stable when the battery wakes up from ship mode. Use two MASKs to provide logical AND and logical OR options for different status. BUG=b:275392868 TEST=zmake build -a Change-Id: I7c5b4c9a74024846b6611ed49bf4823cf877469c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4486658 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Tested-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com>
| * taranza: Enable ectool led controlYu-An Chen2023-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable ectool led control BUG=b:278167979 TEST=ectool led power white/off/auto Change-Id: I36f5aac2ff78aa6e68347ece6cc59eb87a3bb8b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4533460 Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
| * yavilla: Add convertible related functionsTommy Chung2023-05-166-19/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yavilla has convertible sku, add convertible related functions, including motion sensors, gmr sensor, vol button. Disable motion sensors and gmr semsor for clamesell sku. BUG=b:273791621 TEST=make sure all convertible functions work. Change-Id: I29beaaae8f002c811ad1ccb8ecdd77fa78840a5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4457658 Commit-Queue: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Devin Lu <devin.lu@quantatw.com>
| * corsola: Fix reported USB-C ports for no DB design with DB detection onlschyi2023-05-167-4/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definition of `CORSOLA_DB_NONE` was settled to no DB in the project in the previous CL "corsola: Update implementation for no daughter board ", and the USB-C counts is determined by dts settings in previous CL " corosla: Improve USB-C port configuration". This introduces a reported port number mismatch when the DB detection is enabled, and the desired detection result is no DB in the design. Extend the DB status enum with `CORSOLA_DB_NO_DETECTION` to properly describe the different DB status, and fix the reported USB-C port logic. BUG=b:282625153 TEST=`zmake build <all board> --clobber` Change-Id: Idd55381759677272e0bfc7b270647d759642ce01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530326 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
| * Hades: Give SEQ_EC_DSW_PWROK interrupt higher priorityDaisuke Nojiri2023-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL gives SEQ_EC_DSW_PWROK interrupt a higher priority to reduce the latency of PCH_PWROK. BUG=b:279918234 TEST=Agah. Latency is reduced to 18 usec. Change-Id: I359b045a7078862bd0d32fa0121c93dee3ef9f7e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520132 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
| * Agah: Give SEQ_EC_DSW_PWROK interrupt higher priorityDaisuke Nojiri2023-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL gives SEQ_EC_DSW_PWROK interrupt a higher priority to reduce the latency of PCH_PWROK. BUG=b:279918234 TEST=Agah. Latency is reduced to 18 usec. Change-Id: I0cca3e6d5c7bc97eefddc0958eaeb0b65007e5fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518231 Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
| * NPCX9: Allow boards to customize MIWU interrupt priorityDaisuke Nojiri2023-05-152-16/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL will add macros used to set MIWU interrupt priorities. These macro can be set by each board to adjust priorities as needed. BUG=b:279918234 TEST=build agah Change-Id: Ide840e4ab8cc9aa8deb83b6ad76fa64bc0d83972 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518230 Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Mulin Chao <mlchao@nuvoton.com> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
| * chip: add support for npcx trngDavid Cross2023-05-152-0/+252
| | | | | | | | | | | | | | | | | | BUG=b:280889889 TEST=add CONFIG_RNG to NPCX based board.h file (e.g. npcx9_evb) Change-Id: I93b3a7742c3b7d614cc1218104cd642b3339f8b3 Signed-off-by: David Cross <davidmcross@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507895 Reviewed-by: Bobby Casey <bobbycasey@google.com>
| * tasks: Only report stack overflow if task is enabledRob Barnes2023-05-155-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't report stack overflow on a task that has been disabled. Without this change, system safe mode will fail to recover from a stackoverflow because the stackoverflow will be detected again, even though the task has already been disabled. BUG=b:278792557 TEST=System safe mode starts on boten after a stackoverflow Change-Id: I59ab579c296d108dcd8c5aba9cb32bba6c7bbf54 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455298 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
| * ec: Add #line in include/system.hJeremy Bettis2023-05-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around coreboot GCC preprocessor bug. BUG=b:272518464 TEST=gcc -E Change-Id: I609d019680bedddc8deea0f377c8bee4df6f5df1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4533365 Commit-Queue: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
| * ppc: ktu1125: Fix register used for VCONN controlScott Collyer2023-05-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The register that was being used to enable/disable VCONN (KTU1125_SET_SW_CFG) was incorrect. It should be KTU1125_CTRL_SW_CFG. In addition, VCONN was being applied to wrong CC line. KTU1125_CC1S_VCONN --> applies VCONN to CC1 when the polarity is CC2 KTU1125_CC2S_VCONN --> applies VCONN to CC2 when the polarity is CC1 BUG=b:267589112 TEST=Verfied using totalphase that VCONN is being enabled and the CC voltage of the CC data line is correct. Change-Id: I45c85800849dbabeac36d976525de7d058ad23f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4519354 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Scott Collyer <scollyer@chromium.org>
| * charger: Rename enum charge_state_v2 to charge_stateSimon Glass2023-05-154-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we don't have an old charge_state, this is the only one. Rename it accordingly. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: I95923eedd2715b8c7793df8f6e3171c82f9347ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516193 Reviewed-by: Tristan Honscheid <honscheid@google.com> Tested-by: Simon Glass <sjg@chromium.org> Commit-Queue: Eric Peers <epeers@google.com>
| * charger: Delete charge_state_v2.hSimon Glass2023-05-151-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not used any more. Delete it. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: I982d9ac1e593232518850ad061480cd9746cfcbe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516192 Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Eric Peers <epeers@google.com>
| * doc: zephyr_troubleshooting: add a note about macro expansionFabio Baltieri2023-05-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a note about the new config option CONFIG_COMPILER_TRACK_MACRO_EXPANSION, and also add an example on how to disable LTO without changing the project file itself. BUG=none TEST=check the page on gitiles Change-Id: I3af8b5ba4f8a0e59a419e426baa4d5460040e86c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516858 Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
| * ec: Enable unaligned access for cortex-mFiras Sammoura2023-05-157-2/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable unaligned access for cortext-m and. Add a unit test to validate that unaligned access runs properly on both bloonchipper and dartmonkey. Add benchmarks to measure the speed gain between aligned and unaligned access. BRANCH=none BUG=b:239254184 TEST=test/run_device_tests.py -b dartmonkey -t unaligned_access TEST=test/run_device_tests.py -b bloonchipper -t unaligned_access Change-Id: I7d75433e6b7b33d7c82ad740dc85a8646d891c6a Signed-off-by: Firas Sammoura <fsammoura@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4327795 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
| * omnigul: Modify LED behaviorLogan_Liao2023-05-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify LED behavior to meet SPEC. S3(discharge): Amber on 1 sec, off 3 sec. S5(discharge): LED off. Battery Error: Amber on 1 sec, off 1 sec. BUG=b:281786726, b:281785649, b:281782326 TEST=test LED behavior meet SPEC. Change-Id: I8e99dfe1d3d415fd5182e494d57e1a02b5c1c59e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4521358 Code-Coverage: Kyle Lin <kylelinck@google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
| * [marasov] Enable CONFIG_USB_PD_VBUS_DETECT_PPCmichael5_chen12023-05-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Denpend on HW design, the VBUS control by PPC. Enable CONFIG_USB_PD_VBUS_DETECT_PPC. Disable CONFIG_USB_PD_VBUS_DETECT_TCPCl. BUG=b:277171675 TEST=manual C1: Plug AC through HUB pass (10/10) C1: Plug AC pass (10/10) C0: Plug AC through HUB Pass (10/10) C0: PLug AC pass (10/10) Change-Id: Id91f0aef5e5e24e969c9a50934d821a491d9146b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520030 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Code-Coverage: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Kyle Lin <kylelinck@google.com>
| * starmie: Improve RT1739 dead battery voltage issuewangganxiang2023-05-153-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add RT1739 initialization during EC boot. This modification is optimized for dead battery voltage issues. BUG=b:281606949 TEST=zmake build starmie The board can power on normally under AC only mode. Change-Id: I1843b9bce231bc730ad1c4ccb69d74fe3d7beb65 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516061 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Commit-Queue: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Tested-by: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com>
| * Craask: define LED behavior at STATE_DISCHARGE_S0_BAT_LOWben chen2023-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | STATE_DISCHARGE_S0_BAT_LOW: Blue on BUG=b:282116750 TEST=check LED behavior while SOC < 10% in battery mode. Change-Id: I57487200de2360dfa34cecda8a99ab1c008d2758 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4525880 Reviewed-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Tested-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>
| * USB Mux: Use polarity in safe modeJameson Thies2023-05-1223-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a handful of drivers look for the mux_state to be equal to USB_PD_MUX_SAFE_MODE when handling safe mode. This check requires that the polarity information be cleared before sending the mux_state to any drivers to correctly handle the safe state. But the same mux_state is sent to the kernel, which relies on polarity information from the EC when setting USB-C switches. This CL updates the retimer, tcpm and usb_mux drivers which check for mux_state to equal USB_PD_MUX_SAFE_MODE to instead only look for the safe mode bit to be set. This allows those drivers to function the same way in safe mode regardless of polarity information. It also updates usb_mux.c to preserve the polarity bit when sending mux_state to drivers in safe_state. LOW_COVERAGE_REASON=20 of the changed drivers have no emulators BUG=b:279733113 TEST=make -j buildall, confirmed that no remaining drivers check for mux state to equal USB_PD_MUX_SAFE_MODE. Checked on redrix that we are able to drive a monitor with inverted and normal polarity after losing Try.SRC. Change-Id: Ifc89d0ba1da0975436f93be102fadf725a5b8566 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4527219 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Tested-by: Jameson Thies <jthies@google.com> Commit-Queue: Jameson Thies <jthies@google.com>
| * zmake: Resolve coreboot_sdk_root pathAaron Massey2023-05-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The COREBOOT_SDK_ROOT environment variable is not resolved. Resolve the COREBOOT_SDK_ROOT environment variable to an absolute path. BUG=b:268050548 TEST=CQ TEST=fwsdk: bazel build //platform/rules_cros_firmware/cros_firmware:herobrine_ec Change-Id: Ib5e053531dfce1a13e2840d8968ae559d425cf89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4529215 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
| * common: move chip agnostic trng code from stm32 to commonDavid Cross2023-05-125-71/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making this change causes common trng functions to move memory locations. This change only affects fingerprint (FPMCU) boards BUG=b:280889889 TEST=make BOARD=bloonchipper, CONFIG_CMD_RAND enabled in board.h ALLOW_CONFIG=1 ./util/compare_build.sh -b all => All boards match, except the following Fingerprint boards: bloonchipper dartmonkey hatch_fp nami_fp nocturne_fp nucleo-dartmonkey Change-Id: I4dbb5e255be0f61eb7b446af4565bea487c08e52 Signed-off-by: David Cross <davidmcross@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507892 Reviewed-by: Bobby Casey <bobbycasey@google.com>
| * kingler: add usbc testEric Yilun Lin2023-05-1212-78/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds the initial USB-C tests on kingler BUG=b:272664811 TEST=twister -ci zephyr/test Change-Id: I14395ce84442f40e6fd05f7c14a2814fb24ebb9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4483240 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
| * rt1718s: integrate board src enable functionsEric Yilun Lin2023-05-125-42/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate the source enable functions into the driver. Also, reorder the TCPCI call and the board hook call to ensure the board hook is called later in case that the GPIO config auto-reload clobbers the GPIO values. BUG=b:276661970 TEST=test voltorb C1 source/sink Change-Id: Ifff3ae116c088f13ee5e7eec3418810a35ead884 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4522688 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
| * Uldren: modify rotate matrixmick_hsiao2023-05-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modift rotate matrix to let motionsensor works corretly BUG=b:281487225 TEST=watch -n 1 ectool motionsense, all data are correctly as expected Change-Id: I13032d7c9eb46695eb281be9cc3f0125dcde85a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4515843 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Mick Hsiao <mick_hsiao@compal.corp-partner.google.com> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>
| * joxer: Allow alternate rotation parameters for JoxerScott Chao2023-05-124-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow joxer to load different rotation matrix according to cbi. BUG=b:282054731 TEST=make sure joxer rotate correctly Change-Id: I03aa376f05f8f68cbabacf897915cb54d6b80ab7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4486659 Commit-Queue: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
| * starmie: implement base detectionwangganxiang2023-05-124-5/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the judgment mode to interrupt. BUG=b:281643319 TEST=`ectool mkbpget switches` Change-Id: I974cd46ed187fefc3989a0072bc93fe556fd425b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516960 Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Tested-by: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com> Commit-Queue: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com>
| * winterhold: Enable CHARGER_MAINTAIN_VBAT Configjohnwc_yeh2023-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents charger from requesting minimum voltage when AC is off and battery is not present. LOW_COVERAGE_REASON=no unit tests for skyrim yet, b/247151116 BUG=b:269679145 TEST=test on winterhold, AC only after cold reboot the last time of the charger 0x15(Max System Voltage) not fill in 0x15=0800(2.048V) Change-Id: I716f43adab716823c68f3a1f8a7accfa1ead05db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506107 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com>
* | Merge remote-tracking branch cros/main into firmware-brya-14505.B-mainYH Lin2023-05-11341-2338/+4480
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py --baseboard brya --relevant_paths_file baseboard/brya/relevant-paths.txt firmware-brya-14505.B-main Relevant changes: git log --oneline e79a9dab17..5df400b037 -- baseboard/brya board/agah board/anahera board/banshee board/brya board/crota board/felwinter board/gimble board/hades board/kano board/marasov board/mithrax board/omnigul board/osiris board/primus board/redrix board/taeko board/taniks board/vell board/volmar driver/bc12/pi3usb9201_public.* driver/charger/bq25710.* driver/ppc/nx20p348x.* driver/ppc/syv682x_public.* driver/retimer/bb_retimer_public.* driver/tcpm/nct38xx.* driver/tcpm/ps8xxx_public.* driver/tcpm/tcpci.* include/power/alderlake* include/intel_x86.h power/alderlake* power/intel_x86.c util/getversion.sh 76d2b9b1e4 battery: Deprecate CONFIG_BATTERY_LEVEL_NEAR_FULL 3d5b996f73 Hades: Fast forward DSW_PWROK to PCH_PWROK 56af450c1a Agah: Fast forward DSW_PWROK to PCH_PWROK b729eab7c7 charger: Move charger_state_v2.h into charge_state.h 47acf64182 charger: Rename charge_get_state() to led_pwr_get_state() 632c7c935a power/x86: Add dedicated interrupt handler for pwrok 0fff3a0bd4 omnigul: Add condition use Accel and Gyro by FWCONFIG. 7540daff3f driver/tcpm/nct38xx: Remove write to RO register 3f279f30d4 GPU: Rename DC_ATLEAST_SOC to DC_ATMOST_SOC BRANCH=None BUG=b:218332694 b:216485035 b:280818345 b:280351196 b:280001153 BUG=b:279918234 TEST=`emerge-[brya,hades,draco] chromeos-ec` Force-Relevant-Builds: all Change-Id: I19f2f6c5573d8c748ac63b488a808f10de352b1d Signed-off-by: YH Lin <yueherngl@google.com>
| * chgstv2: Change battery near full depends on display SOCwen zhang2023-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The battery_near_full is used to set PWR_STATE_DISCHARGE_FULL and PWR_STATE_CHARGE_NEAR_FULL and these two states are used to set LED behaviors. We should change battery_near_full to depend on display SOC because LED bahaviors are already depends on display SOC. There is an exception, isl9241.c also checks charge_get_state() == PWR_STATE_CHARGE_NEAR_FULL in function isl9241_restart_charge_voltage_when_full. With this change, this feature will depend on the battery display SOC rather than RSOC. The display SOC is bigger than RSOC ~3% when the battery is BATTERY_LEVEL_NEAR_FULL(default 97%) so this feature may be 3% ahead of schedule. The 3% difference should have no harm for this feature. BUG=b:278512388 TEST=1.verify LED behavior on voltorb 2.no "E: Node with matching prop not found" on voltorb Change-Id: I87f555571e22cbcdd0e8e0a201f76e3de8204ebe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4478776 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Commit-Queue: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Tested-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
| * battery: Deprecate CONFIG_BATTERY_LEVEL_NEAR_FULLwen zhang2023-05-1127-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atlas, coral, corori, eve, morphius, primus, and rammus are setting CONFIG_BATTERY_LEVEL_NEAR_FULL to custom values. This causes their LEDs show 'full' while the display battery percentages are still < 100%. We'll make these boards define CONFIG_BATT_HOST_FULL_FACTOR, instead. And fix LED dts for some zephyr projects. BUG=b:280818345 TEST=build pass Change-Id: I98f97798ea99cc812671d5b31d64e92d55a1e05a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4523043 Commit-Queue: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Tested-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
| * Hades: Fast forward DSW_PWROK to PCH_PWROKDaisuke Nojiri2023-05-112-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On urgent shutdown, it's required for PCH_PWROK to drop while PCH's voltages are still above 95%. This CL adds a dedicated interrupt handler for DSW_PWROK to reduce the latency. BUG=b:279918234 TEST=On Agah. The latency improved from 1.5 ms to 127 us. Change-Id: I5d0b1ab880f8d7ec6af89e3d9b230541c75d57ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520131 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
| * Agah: Fast forward DSW_PWROK to PCH_PWROKDaisuke Nojiri2023-05-112-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On urgent shutdown, it's required for PCH_PWROK to drop while PCH's voltages are still above 95%. This CL adds a dedicated interrupt handler for DSW_PWROK to reduce the latency. BUG=b:279918234 TEST=On Agah. The latency improved from 1.5 ms to 127 us. Change-Id: I004d11789bc94eb91f1f0df440bc5532bcb67a4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518229 Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com>
| * panic_output: Do not use ccprintf to induce stack overflowRob Barnes2023-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The console command to induce a stack overflow crash uses ccprintf, which acquires a mutex lock internally. The exception handler aborts the thread (shell_uart) when the stack overflow is detected, but the mutex is not released. This causes system safe mode to deadlock. Switch to panic_printf to avoid this deadlock. A more robust long term fix may be to change Zephyr internals to release mutexes on aborted threads. LOW_COVERAGE_REASON=Swapping single function call BUG=b:278792557 TEST=Able to start system safe mode after a stack overflow on skyrim Change-Id: Ib7b50487d27e77fdd5b6cec5176060074868dca3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4504115 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com> Tested-by: Rob Barnes <robbarnes@google.com>
| * flash_ec: Fix shellcheck warning SC2009Bobby Casey2023-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error was: Hook script "cros lint ${PRESUBMIT_FILES}" failed with code 1: In util/flash_ec line 854: if ps -o cmd= "${pid}" | grep -qE "(servod|/sbin/init)"; then ^ SC2009 (info): Consider using pgrep instead of grepping ps output. Unfortunately, per this thread crrev.com/c/3864978/4/util/flash_ec#857 it seems like the ps / grep solution is our best bet so shellcheck exclusion was added. BRANCH=none BUG=b:242127759 TEST=util/flash_ec --board=dartmonkey --image build/dartmonkey/ec.bin Change-Id: I271384dae6d0edd9a84546883b799a5a8fe64207 Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864978 Reviewed-by: Josie Nordrum <josienordrum@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
| * Uldren: update fw configmick_hsiao2023-05-113-63/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update cbi config to let DB works, Also remove fan code, because uldren doesn't have fan design BUG=b:273159459 TEST=DB can charge and read usb Change-Id: I9da2c3fd7eedc44cfcaad89d32c393cc528feff2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4522690 Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Mick Hsiao <mick_hsiao@compal.corp-partner.google.com> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>