summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* isl923x: disable AMON/BMON after use.stabilize-14816.84.B-mainstabilize-14816.82.B-mainstabilize-14816.131.B-mainrelease-R103-14816.B-mainEric Yilun Lin2022-05-122-14/+27
| | | | | | | | | | | | | | | | Disable the AMON/BMON when it's not using to reduce power consumption. BUG=b:215659327 TEST=check ISL9238C control1 bit5 is set. BRANCH=none Change-Id: I53b2177ec9683661daac7b99be88ad7113b7377b Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3419358 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* Krabby: add charger EOC deglitch workaroundTing Shen2022-05-122-0/+16
| | | | | | | | | | | | | | | Vendor provided workaround, see b/230442545#comment3 BUG=b:230442545 TEST=make BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I86c9dd0d615c5ebff82429a2dbc11a4bd2f37fc2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3613148 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org>
* mithrax: felwinter renamed to mithraxjohnwc_yeh2022-05-1217-39/+39
| | | | | | | | | | | | | | Felwinter renamed to mithrax. BUG=b:223091246 BRANCH=None TEST=make BOARD=mithrax Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: Ibfa865d2309cc44a6f1af1d2f7d8e90eca30c8b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631726 Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
* kinox: add enable and disable ppc sink modeMatt Wang2022-05-121-21/+23
| | | | | | | | | | | | | | | | | | | When Kinox is sinking power from the type-c port then enable the PPC to sink and disabled when using the barrel jack. And the Kinox does not support the adapter change when EC is on. BUG=b:225769067 BRANCH=none TEST=Test on Kinox, The system can power on to OS via barrel adapter or type-c adapter. Plugin the barrel adapter the log has the "New charger is p1" and successfully disables C0 to sink path. Plugin the Type-C 65w adapter the log has the"New charger is p0" and successfully enables C0 to sink path. Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I7adaa113d15cd607f1be799da072386160bdcb74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3535546 Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Ricky Chang <rickytlchang@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
* zephyr: check power rails is platform specificLi Feng2022-05-124-11/+22
| | | | | | | | | | | | BUG=none BRANCH=none TEST=zmake build nivviks, flash, boot up. Signed-off-by: Li Feng <li1.feng@intel.com> Change-Id: I991569d50728e0c07292bc134dffa433e36a66a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3633268 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* npcx: eSPI: workaround the issue in NPCX99nF errata rev1_2, No.3.10.Jun Lin2022-05-124-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling an eSPI channel (r.g. Peripheral Channel, Virtual Wire Channel, etc.) during an eSPI transaction might (with low probability) cause the eSPI_SIF module to transition to a wrong state and therefore respond with FATAL_ERROR on an incoming transaction. This CL workarounds this issue by clearing the bit 4 of NPCX eSPI specific register#2. This workaround should be also applied to NPCX7 (except npcx7m6f). The Zephyr PR:https://github.com/zephyrproject-rtos/zephyr/pull/45294 also fixes this issue. BRANCH=none BUG=b:231667217 TEST=pass "make buildall -j4" TEST=Test on Volteer, make sure the platform bootup to ChromeOS. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: If929fe48246e0902b182143031f99af019fca1f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626850 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Amit Maoz <Amit.Maoz@nuvoton.com> Commit-Queue: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com>
* ec: Make tests pass with TEST_ASAN=yJeremy Bettis2022-05-115-15/+19
| | | | | | | | | | | | | | | | | | | | | | | There are some mismatched enums and other errors that prevent building with asan. Fix them all. Change the cq builder to prevent these breakages in the future. If the tests pass with ASAN in the chroot, they will likely pass in gitlab with coverage enabled. BRANCH=None BUG=None TEST=make clobber ; make -j8 runtests && echo PASS make clobber ; make -j8 TEST_ASAN=y runtests && echo PASS Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I6d86fd5750282e0257eb97f65b31046a1613a453 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631365 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* oak: reduce flash usageCaveh Jalali2022-05-111-2/+0
| | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I774a2535ba9327395ecb7a35157c1ee621d38063 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640439 Reviewed-by: Diana Z <dzigterman@chromium.org>
* meep: reduce flash usageCaveh Jalali2022-05-111-4/+0
| | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I005f202c60d17ce76c121e01febc6fd58fc12d11 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640438 Reviewed-by: Diana Z <dzigterman@chromium.org>
* lazor: reduce flash usageCaveh Jalali2022-05-111-0/+3
| | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Change-Id: I5582b2006c2ffe38d305a2c5438291bf1b21d11d Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640437 Reviewed-by: Keith Short <keithshort@chromium.org>
* dood: reduce flash usageCaveh Jalali2022-05-111-4/+0
| | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Change-Id: Ia0099cf8f7f6223199f83fefa565462a49097a89 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640436 Reviewed-by: Diana Z <dzigterman@chromium.org>
* PCHG: Don't wake up device if lid is closedDaisuke Nojiri2022-05-111-3/+8
| | | | | | | | | | | | | | | | | | | Currently, a PCHG device wakes up the system even with the lid is closed. Since the lid is closed, the system would re-suspend after 30 seconds but this is a little wasting power. This patch makes the PCHG subsystem prevent device an attach or detach event from resuming the system if the lid is closed. BUG=b:192098599 BRANCH=None TEST=Suspend CoachZ by closing the lid. Verify device doesn't resume by attacing or removing a stylus. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I11b6fbf30270174048de215a27905524a04a40bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636448 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* zephyr:test: Add USB pd console testsAl Semjonovs2022-05-112-0/+256
| | | | | | | | | | | | | Validate PD console commands BUG=b:222240738 BRANCH=NONE TEST=zmake test test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I643f90d9b349991df09a7cd2c512e33340f41c5c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636186 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* ec: Include the pd console command in testsJeremy Bettis2022-05-111-2/+5
| | | | | | | | | | | | | | | | | | | | | Stop special casing TEST_BUILD and instead use TEST_USB_PD_CONSOLE as the special case. TEST_USB_PD_CONSOLE expects command_pd to be non-static, but the DECLARE_CONSOLE_COMMAND really wants it to be static. BRANCH=None BUG=b:222240738 TEST=make runhosttests && zmake testall Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ib7b01d870af6ddbe6ba70b6f751ecadd6d23ec1e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3642537 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Al Semjonovs <asemjonovs@google.com>
* guybrush: Enable i2c PEC for battery fuel gaugeRob Barnes2022-05-111-0/+2
| | | | | | | | | | | | | | | | | | The fuel gauge could NACK during a read operation and then return invalid data. The only way to detect this corruption is to enable PEC. The config enables PEC globally, but the smart battery is the only driver that sets the I2C_FLAG_PEC flag, so this change will only affect the smart battery. BUG=b:230520109 BRANCH=guybrush TEST=Boot nipperkin, no errors observed, battery status is correct Change-Id: I50e60350ccff7e58f170c24921bc442eea0af817 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3641481 Commit-Queue: Robert Zieba <robertzieba@google.com> Reviewed-by: Robert Zieba <robertzieba@google.com>
* corori2: reduce flash usageCaveh Jalali2022-05-111-3/+0
| | | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Change-Id: Ib753b55dbfe88c7a5d6e2a7671d9817d42d3f1ed Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640435 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* emul: partner emuls reset roles on hard resetAaron Massey2022-05-116-30/+52
| | | | | | | | | | | | | | | | | The tcpci_partner emulators did not reset their roles when receiving a hard reset from the TCPM. Reset data and power roles in the tcpci partner emulator hard reset handlers. BRANCH=none BUG=b:230656752 TEST=zmake test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: Ib3072f1a483d1031991dd9ff83a23d863e661fc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626074 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* emul: Partner data arg tcpci_snk_emul_init_dataAaron Massey2022-05-114-6/+11
| | | | | | | | | | | | | | | | | | The tcpci_partner_data will be accessed via the tcpci_snk_emul_data struct inside the tcpci emul sink partner hard reset handler. Add the tcpci_partner_data struct field to the tcpci_snk_emul_data struct and add it as a parameter to the tcpci_snk_emul_init_data function. BRANCH=none BUG=b:230656752 TEST=zmake test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: If7425474c8c301e1c075a45be1555568ffb92dad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626073 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* treewide: Convert ESPI_DEFAULT_SCI_WIDTH_US to default VWIRE pulse widthTim Wawrzynczak2022-05-1114-38/+42
| | | | | | | | | | | | | | | | | | | | In the corresponding bug, Intel has clarified that this SCI# pulse length requirement is actually for all virtual wires, therefore this patch renames CONFIG_ESPI_DEFAULT_SCI_WIDTH_US to CONFIG_ESPI_DEFAULT_VW_WIDTH_US to reflect its broader purpose. All pulses of virtual wire signals were converted to use this new pulse width config option, and all GPIO pulses were converted back to their original value (65 us). BUG=b:227367177 BRANCH=brya TEST=build Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: I1225b3e436cd1dca71c93500538a201d008781b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3610694 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* zmake: Don't allow duplicate projectsJeremy Bettis2022-05-111-6/+6
| | | | | | | | | | | | | | | | | | | | If you call zmake with the same project name multiple times, it would actually build it multiple times, this is a big problem if you use zmake -j. Change _resolve_projects to return a set instead of a list. BRANCH=None BUG=b:178196029 TEST=zmake -j100 build -B build brya brya Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ib9bbabe4e96a186731a3c15256558b3e9a3923d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636183 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* bobba: reduce flash usageCaveh Jalali2022-05-111-0/+3
| | | | | | | | | | | | BRANCH=none BUG=none TEST=board build no longer fails due to flash space overflow Change-Id: Ie6af01024209ae1046a3fd53d4941e6c5bcfff7a Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640434 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* ec: Disable the host-interrupt testJeremy Bettis2022-05-111-1/+3
| | | | | | | | | | | | | | | | | It's generally not useful, as it is testing test-only code. We already skip it for code coverage, because it times out so often. BRANCH=None BUG=b:227793011 TEST=make runtests |& grep -i interrupt Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I34ab231421d1e52673a90831e297cd80df44f234 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3639491 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* moli: remove ADC6 (for WIFI thermal sensor) in gpio.incElsie Shih2022-05-111-1/+1
| | | | | | | | | | BUG=b:231900728 TEST=make BOARD=moli Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com> Change-Id: I14a4c74d7bf2155ef84ec607de8d3ae54dc82c45 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631788 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: ap_pwrseq: move some functions to be commonLi Feng2022-05-112-50/+38
| | | | | | | | | | | | | | | | | Move functions that should be common from chipset file to common file. De-assert system reset pin is not necessary to power up; so remove init_chipset_pwr_seq_state(). BUG=none BRANCH=None TEST=zmake build nivviks; power up. Signed-off-by: Li Feng <li1.feng@intel.com> Change-Id: I364d91503af8cb923342aead03120042cebe9420 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3630830 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
* mithrax: Initial EC imagejohnwc_yeh2022-05-1120-1166/+642
| | | | | | | | | | | | | | | | | Copy the Felwinter reference board EC files into a new directory name for the Mithrax variant. (Copy from commit 60c5d955940500bd5c9ea29ed8814c2977adc266.) BUG=b:223091246 BRANCH=None TEST=make BOARD=mithrax Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: Ieea80fcf70f55e02755d32d065c90503a820d97c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631847 Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* vell: cleanup: Remove unused PPC defineDevin Lu2022-05-111-2/+1
| | | | | | | | | | | BUG=b:211791444 BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I4db66d4815a03f0482462fadbc66e14baba675d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3596384 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr/riscv: implement FPU support functions for RV32FPeter Marheine2022-05-112-4/+18
| | | | | | | | | | | | | | | EC floating-point depends on custom implementations of `fqrtf` and `fabsf` since Zephyr doesn't provide them. Implement them in terms of the standard F extension's instructions for those operations. BUG=b:227961840 TEST=Nereid now builds if CONFIG_FPU is enabled BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I904084f297d6a6c85f69feb9e0e72775dbabf83f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631854 Reviewed-by: Keith Short <keithshort@chromium.org>
* osiris: Move CHARGER_VAP_OTG_EN gpio pinstabilize-14803.B-mainYu-An Chen2022-05-101-2/+2
| | | | | | | | | | | | | | Move CHARGER_VAP_OTG_EN from GPIO73 to GPIO41 BUG=b:224423318 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Ia60fe700733d24d7ed20b409171e58abc603b92c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634167 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* osiris: Remove volume buttonYu-An Chen2022-05-102-5/+4
| | | | | | | | | | | | | | | undefine CONFIG_VOLUME_BUTTONS set GPIO93 and GPIO97 to unused pins BUG=b:224423318 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Iadc90c186dae4dbfd2eee8ddc650826658002577 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631857 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* zephyr:test: Add test to check Alert sends from the ECJameson Thies2022-05-103-0/+41
| | | | | | | | | | | | | | | Updates the emulator to check for alert messages and adds a test case which uses pd_broadcast_alert_msg to check new functions for sending USB PD Alerts. BUG=b:230975527 BRANCH=NONE TEST=zmake test --coverage test-drivers --clobber Signed-off-by: Jameson Thies <jthies@google.com> Change-Id: I67164c2012a8d52d6d483365bca4209f0f59dc0b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636760 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* README: Update emerge EC binary pathmparuchuri2022-05-101-0/+16
| | | | | | | | | | | | | | | | After building the ChromeOS EC repo using emerge, the ec.bin is not found in the current path mentioned in Readme. This commit is updating that path. BUG=none BRANCH=none TEST=Manually check the ec.bin file at current and updated path Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: If91e290637cfaa5fdb404fc348ca17c4ff5cd413 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626474 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: it81302: Enable divide-by-zero exception checkAndrew McRae2022-05-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the divide-by-zero exception check in the the compiler for RISCV CPUs. Without this change: ec:~$ crash divzero ffffffffCommand returned error: 1 With this change: ec:~$ crash divzero E: E: mcause: 3, Breakpoint E: mtval: 0 E: a0: 00000001 t0: 8010d988 E: a1: fffffffe t1: 00000020 E: a2: 00000000 t2: 00000000 E: a3: 000000c0 t3: 00000000 E: a4: 00f02700 t4: 00000001 E: a5: 00000008 t5: aaaaaaaa E: a6: 00000011 t6: aaaaaaaa E: a7: 00000000 E: tp: aaaaaaaa E: ra: 80013866 E: mepc: 8001386a E: mstatus: 00001880 E: E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0 E: Current thread: 0x801063f0 (shell_uart) E: Halting system BUG=b:231844211 TEST=crash divzero BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Cq-Depend: chromium:3637157 Change-Id: I4edf7d5b33d31a39d2172f3b8b1e4becdd94def4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631725 Reviewed-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* chip: max32660: convert pwrseq_regs.h file newline to unix formatFabio Baltieri2022-05-101-489/+489
| | | | | | | | | | | | | | | The file has DOS newline format for some reason, it's the only one in the repository and gets in the way when scripting changes, let's convert it (vim, set fileformat=unix, write). BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I696141bbcaa17b6e1944b86317f909752f613580 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634346 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* katsu: support AC connect/disconnect wake sourcewen zhang2022-05-102-0/+16
| | | | | | | | | | | | | | | Enable the AC connect/disconnect events to wake up host BUG=b:230778126 BRANCH=kukui TEST=1.manually test pass 2.autotest-power_WakeSources pass Change-Id: I8dc5c67b925c5696a1f20c4dad2fb140dcd76a34 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631794 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Xuxin Xiong <xuxinxiong@huaqin.corp-partner.google.com>
* Krabby: enable TUSB546Ting Shen2022-05-101-1/+1
| | | | | | | | | | | | | | | Move from shared TUSB1044 to our own TUSB546 driver. BUG=b:228289594 TEST=C1 type-c to hdmi works BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I0a147ee469997d2b8bbefb8ab174d84171201a73 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612721 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* usb_mux: add TUSB546 driverTing Shen2022-05-108-5/+39
| | | | | | | | | | | | | | | | | | | Reuse the code from existing TUSB1064/TUSB1044 driver and add TUSB546 specific logic to it. Currently the only change is that we will enable IN_HPD when mux enters dock mode, instead of using hpd_update. BUG=b:228289594 TEST=make BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I2182eef1a4c5d8cc830f837c544379e854ac331c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612720 Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* volmar: Add battery AP19B8MYu-An Chen2022-05-102-0/+30
| | | | | | | | | | | | | | | Copy AP19B8M info from kano BUG=b:218976941 BRANCH=none TEST=Check battery charge/discharge/cutoff working Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I0f1b57be505b33b29529635aca17dc5e51319cc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627703 Commit-Queue: Ofer Fried <oferfried@google.com> Tested-by: Michael Law <michaelsplaw@google.com> Reviewed-by: Ofer Fried <oferfried@google.com>
* TCPCI: Allow TCPM to use sink/source control without PPCs presenceDevin Lu2022-05-1012-31/+3
| | | | | | | | | | | | | | | This patch removes define CONFIG_USBC_PPC to allow TCPM to use sink and source control without PPCs presence. since they exist generally in TCPCI specification independently of PPCs. BUG=b:211791444 BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ia4be8bf872f981c23908944381b156778f63064b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597314 Reviewed-by: Diana Z <dzigterman@chromium.org>
* test: Verify host command for motion_sense spoofYuval Peress2022-05-103-3/+121
| | | | | | | | | | | | | | Check that enabling, disabling, setting, and locking the motion_sense spoof mode and values works. BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I9decb422f71e468a081325371abcf2accd7c7cc4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636758 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* test: Verify host command for motion_sense interruptYuval Peress2022-05-103-0/+52
| | | | | | | | | | | | | | Check that enabling and disabling the motion_sense interrupt flag works. BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I361feacbd71e2829f852b1d0565017e71680c609 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636757 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* ec: Switch to gen_sdk importJeremy Bettis2022-05-102-7/+5
| | | | | | | | | | | | | | | | | Switch from importing chromite.api.gen.chromite.api to chromite.api.gen_sdk.chromite.api, to avoid the odd import order. BRANCH=None BUG=b:187795298 TEST=Ran firmware builders Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I21ba7856679d67bd889a2585b28cdb74ef5493d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3635075 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
* zephyr: test: run clang-format on motion_sense.cYuval Peress2022-05-101-4/+2
| | | | | | | | | | | | BRANCH=none BUG=none TEST=zmake build test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ie84e5611ce7e3ceff58fbf7b007643c166177a24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3636016 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* Docs: Replace Chrome OS with ChromeOS in FP docsBobby Casey2022-05-098-51/+51
| | | | | | | | | | | | | | | | Per https://carbon.googleplex.com/cros-ux/pages/mechanics, "As of Q1 2022, we are using 'ChromeOS' instead of 'Chrome OS'". This commit brings all `ec/docs/fingerprint` up to compliance. BRANCH=none BUG=b:229978105 TEST=Review to verify only expected changes were made Signed-off-by: Bobby Casey <bobbycasey@google.com> Change-Id: I7f740bf4f8932e01522c07e32212f5d4a6dc6716 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3600914 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Andrea Grandi <agrandi@google.com>
* TCPMv2: Set tVconnReapplied to 10 msAbe Levkoy2022-05-091-1/+1
| | | | | | | | | | | | | | | The specified range of this timeout is 10-20 ms. Reduce the amount of time that the PE explicitly waits to 10 ms to allow for variable time taken by the TC to actually discharge VCONN. BUG=b:209624473,b:209625351 TEST=Observe VCONN off for 10-20 ms during Data Reset on scope BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ie860266ca22001e8b4425318da7fc3b1dff2de0c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3625574 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Wait for VCONN discharge during Data ResetAbe Levkoy2022-05-091-4/+10
| | | | | | | | | | | | | | | During PE_DDR_Perform_Data_Reset, do not start tVconnReapplied until VCONN has discharged, according to the VCONN transition time configured for the board. BUG=b:209625351,b:209624473 TEST=Observe DFP-initiated Data Reset with scope on VCONN BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I8d0e59b4b873d26f179e9d4b1b3ca0f93d944b8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3625573 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Clear flags during Data ResetAbe Levkoy2022-05-091-2/+5
| | | | | | | | | | | | | | Clear PE flags for protocol error and discard while processing them instead of waiting for Error Recovery to reinitialize the PE. BUG=b:209624473,b:209625351 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I90102bfa5ab591124ce73b670785c66129e23e4e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3624939 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Support Data Reset as UFP, recipientAbe Levkoy2022-05-091-8/+37
| | | | | | | | | | | | | Support receiving Data_Reset as a UFP. BUG=b:141363146,b:209629635 TEST=make buildall BRANCH=firmware-13672.B-main Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I8b14fc260fc59eeb32598abc74356d4fbad567f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871060 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Support Data Reset as UFP, initiatorAbe Levkoy2022-05-091-2/+196
| | | | | | | | | | | | | | Support sending Data_Reset as a UFP. BUG=b:141363146,b:209629032 TEST=Observe Data Reset from voxel (UFP) to lindar (DFP) with each as VCONN Source. BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I153911c6f233a85dfcd973a910e2c3cd0a1d198b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871059 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: add a zephyr/ prefix to all zephyr includesFabio Baltieri2022-05-09289-691/+691
| | | | | | | | | | | | | | | | | | | This adds a zephyr/ prefix to all #include path pointing to Zephyr header files, so that we could drop LEGACY_INCLUD_PATH once all upstream code has been converted. Generated using something similar to the script in: c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I5ba2c859fe10a34ea8d3a49a612132ea4d02f2cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634345 Reviewed-by: Yuval Peress <peress@google.com>
* nissa: enable PROCHOT monitoringKeith Short2022-05-091-0/+13
| | | | | | | | | | | | | | | | | | | | The EC_PROCHOT_ODL signal was connected to the throttle_ap_prochot_input_interrupt, but the interrupt was never enabled. Configure the PROCHOT input and enable the interrupt, which will log to the EC console when PROCHOT is detected. If the board provides fans, then the fans are also enabled during PROCHOT conditions. BUG=b:230783041 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I686a684e86d3c9897e7c980e41c3d4a2995e0ccc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615481 Reviewed-by: Andrew McRae <amcrae@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>