summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "voxel, drobit: Create EC mode entry builds"stabilize-13856.B-mainAbe Levkoy2021-03-194-7/+0
| | | | | | | | | | | | | | | | | This reverts commit 5cc244149f9d2f2502860bb7fc718676001c3d26. Reason for revert: This breaks builds outside the EC that still rely on voxel_apmodeentry (that should also be deleted). BUG=none TEST=none Change-Id: I143e332cdcd1348239f8cf632c5b49c23d75617c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774908 Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org> Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org> Tested-by: Kazuhiro Inaba <kinaba@chromium.org> Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
* chip/stm32: Rename field since "or" is reserved in C++Tom Hughes2021-03-161-1/+1
| | | | | | | | | | | | | | https://en.cppreference.com/w/cpp/keyword https://en.cppreference.com/w/cpp/keyword/or BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I8ac62e6fbcab8fe0c842c737d183b462899bd017 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740563 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* zephyr: Fix recovery modeKeith Short2021-03-162-1/+12
| | | | | | | | | | | | | | | | | | | The Zephyr initialization was missing a call to lpc_int_mask(), which caused the detected recovery event to be ignored. Add this call before keyboard_scan_init() to match Chromium EC initialization. Note - this requires CL:2731180 for recovery mode be detected correctly. BUG=b:182808955 BRANCH=none TEST=zmake testall TEST=Press recovery combo, verify depthcharge starts recovery mode. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: If03a837208d6fc025aef1359e72c09fcf39b5656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2760805 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* blipper: support keypad functionMike Lee2021-03-162-0/+33
| | | | | | | | | | | | | | | Enable keypad function BUG=b:182018600 BRANCH=dedede TEST=make BOARD=blipper pass, then test keypad function ok Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I313ceba51290ea8968ca25962551431d73518184 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755358 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* chip/stm32: Remove duplicate macrosTom Hughes2021-03-163-171/+0
| | | | | | | | | | | | | | Re-defining a macro is an error in C++. BRANCH=none BUG=b:144959033 TEST=make buildall TEST=./util/compare_build.sh --boards all --ref1 HEAD --ref2 HEAD^ Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If8329bc9e79e153961c8ddfb4ddb1c01cdb9b112 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740562 Reviewed-by: Craig Hesling <hesling@chromium.org>
* ucpd: Add support to turn off type-2 BIST modeScott Collyer2021-03-162-6/+37
| | | | | | | | | | | | | | | | | | | This CL adds changes to the ucpd driver to support turning off BIST mode once it's been started. For ucpd, the peripheral has to be disabled and reset for this purpose. BUG=b:182436876 BRANCH=None TEST=Verfied that honeybuns can pass TDA.2.1.1.1: BMC-PHY-TX-EYE compliance test, which previously was failing because BIST type-2 mode was not being stopped. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ib6aa898ef5727dd5887e5d1c0b2eee94fdb366b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751328 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* zephyr: Add Kconfig for disabling CBI write protectKeith Short2021-03-162-0/+15
| | | | | | | | | | | | | | | | | | Add a Kconfig option to control the CONFIG_BYPASS_CBI_EEPROM_WP_CHECK Chromium EC option. BUG=chromium:1188511 BRANCH=none TEST=make BOARD=drobit TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I119963f0aa74a49f772de5c059206ecddd4941c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762530 Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* guybrush: Add fan supportRob Barnes2021-03-162-1/+46
| | | | | | | | | | | | | | | Add basic fan support. More tuning will be needed. BUG=b:178217015 TEST=Build BRANCH=None Change-Id: I8133bfeb63346a254d0300d99d2b0ade35f74cc6 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762804 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* guybrush: disable internal pull up for EC_BATT_PRES_ODLelmo_lan2021-03-161-1/+1
| | | | | | | | | | | | | | Disable internal pull up for EC_BATT_PRES_ODL. BUG=b:182876576 TEST=Verified EC_BATT_PRES_ODL will change by plug/remove battery. BRANCH=None Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: If4cc5a8ecf59a682eebf764a9a5c710c8029a8d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2764204 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* brya: Update auto-generated GPIO listCaveh Jalali2021-03-161-13/+0
| | | | | | | | | | | | | | | | | This refreshes the generated GPIO list based on updates in the main GPIO definition spreadsheet. The only difference is that GPIOs are no longer marked as "alternate" even when GPIO functionality is the alternate function of a pin. The NPCX support code automatically puts all declared GPIO pins into GPIO mode even when that is a pin's alternate function. BRANCH=none BUG=b:173575131 TEST=buildall passes Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: Ib7ba12f45407f86dc5fac6a75f68dee14be02514 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738548 Reviewed-by: Keith Short <keithshort@chromium.org>
* cozmo: create a link to icarusLucas Chen2021-03-161-0/+1
| | | | | | | | | | | | | | create a /ec/board/cozmo link to icarus for ec. BUG=b:181144502 BRANCH=None TEST=None Change-Id: I63a2ce0c84eefab60bce4c0140a465ed10253920 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2760678 Tested-by: David Wu <david_wu@quanta.corp-partner.google.com> Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org>
* voxel, drobit: Create EC mode entry buildsAbe Levkoy2021-03-164-0/+7
| | | | | | | | | | | | | | | | Disable AP-driven mode entry to facilitate regression testing. Also remove now-unused voxel_apmodeentry build. BUG=b:181144682 TEST=make BOARD=voxel_ecmodeentry; make BOARD=drobit_ecmodeentry TEST=Inspect .config files BRANCH=firmware-volteer-13672.B-main Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I5e52a46013315db4415a3255c12cd0fcd39354bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2760804 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Trogdor: Add HANG_DETECT host event as a S3 wake sourceWai-Hong Tam2021-03-161-0/+1
| | | | | | | | | | | | | | | | When EC detects AP suspend hang, it sends the HANG_DETECT host event to AP. Should make this event as a S3 wake source such that it can wake AP up. BRANCH=Trogdor BUG=b:182477897 TEST=Used an image which fails to enter suspend, checked EC detect the suspend hang and wake AP up afterward. Change-Id: I75d721d9bc0589a839d2b952054d2e4b22e19f31 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757101 Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
* Mancomb: Add EN_USM_ODLDiana Z2021-03-151-0/+1
| | | | | | | | | | | | | | | | Add EN_USM_ODL and set to open drain disabled for now. USM may be enabled in the future if there are noise issues with the voltage regulators. BRANCH=None BUG=b:182477680 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I5614f36078f400385f6e9c37f599cd3bbc7f6991 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762801 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Mancomb: Add TEMP_AMBIENT_VRDiana Z2021-03-153-18/+30
| | | | | | | | | | | | | | | | Add temperature sensor for ambient temperature. Additionally, simplify the temperature reads since all sensors are hooked up to the same PP3300_S5. BRANCH=None BUG=b:182601210 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I27b1a078e9bfe5db8e043eb9d5b9c7eb29cc1eaf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762800 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Mancomb: Switch temperature inputs to MODULE_ADCDiana Z2021-03-151-4/+4
| | | | | | | | | | | | | | | Switch definitions for temperature and other analog inputs to MODULE_ADC. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I7e02281158aa2d34e4beff24fbd15782cbfcd274 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762799 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Mancomb: Enable Power Group interruptsDiana Z2021-03-151-0/+4
| | | | | | | | | | | | | | | | Enable interrupts for EN_PWR_PCORE_S0_R. Note that other power interrupts which are included in the power_signal_list get enabled during power_common_init(). BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I799b0f6055f29b94226aed05930499d74fc41b31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762798 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* zephyr: set the NPCX FW headerWealian Liao2021-03-153-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | For CONFIG_BOARD_RESET_AFTER_POWER_ON feature, the longer initialization time lets H1 reset EC before EC writes EC_RESET_FLAG_INITIAL_PWR flag to BBRAM. It causes EC couldn't recognize the first reset-pin for the current mechanism. Set the volteer, kohaku, delbin firmware NPCX firmware header to improve the initialization time: core clock to SPI clock ratio - 2, SPI clock - 50MHz, flash read mode - dual BUG=None. BRANCH=None. TEST=Check output header offset 6 = 0x0c, offset 7 = 0x03. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: If9b3cd9a5ed7086a44ec7efa7bb5c7c40d4bcd81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2759763 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: complete the NPCX FW header settingWealian Liao2021-03-152-10/+37
| | | | | | | | | | | | | | | | | | This CL includes the following: 1. Add core clock to spi clock ratio header option. 2. CMakeLists uses the wrong config name. Fix it. BUG=None. BRANCH=None. TEST=Check the firmware header can set by kconfig. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I106c0b6b5987444a77cf07878736374378bc25f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747554 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: volteer: disable chargen/chgramp commandsKeith Short2021-03-151-1/+1
| | | | | | | | | | | | | | Disable the chargen and chgramp console commands to match the Chromium EC configuration. BUG=b:181794644 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5a4922604deea94640b448285f212efe57cc903d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2756982 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: add CONFIG_ISL9241_SWITCHING_FREQ to allowlistKeith Short2021-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | Add the CONFIG_ISL9241_SWITCHING_FREQ to the allowlist to avoid a compile error on Chromium EC builds. A follow on CL converts the CONFIG_ISL9241_SWITCHING_FREQ to a devicetree property. BUG=none BRANCH=none TEST=make buildall TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic16f3a7747dd2a32f25f9c8acfd8f50310fa1910 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748446 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* virtual_battery: bug fix in reading SB_AVERAGE_CURRENTIkjoon Jang2021-03-153-5/+8
| | | | | | | | | | | | | | | Fix a bug from CL:2747559, virtual battery returns an error for SB_AVERAGE_CURRENT. virtual battery handler should call battery_get_avg_current(), not battery_get_avg_voltage(). BRANCH=none BUG=b:170921599 TEST=read current_avg knob in kukui Signed-off-by: Ikjoon Jang <ikjn@chromium.org> Change-Id: I90c26a8e1d4fa6faccc0166b9f7b63fca9baef51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751320 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* dirinboz: add FW_CONFIG support for different keyboard layoutIsaac Lee2021-03-153-0/+33
| | | | | | | | | | BUG=b:182232569 BRANCH=firmware-zork-13434.B-main TEST=build all Change-Id: I567739a9499249d5bdb067e23ee80a957ba7c2e4 Signed-off-by: Isaac Lee <isaaclee@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755360
* juniper: Ignore TABLET_MODE_GPIO_L for kenzoDavid Huang2021-03-152-0/+13
| | | | | | | | | | | | | | | Kenzo only support clamshell. Ignore TABLET_MODE_GPIO_L on Kenzo. BUG=none BRANCH=main TEST=Check device is able to get in and out of tablet mode for board version != 8/9. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I2a7343d7970dc08e9e43a6e17796468b969312db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2759313 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* dooly: remove unused thermistorZick Wei2021-03-152-15/+0
| | | | | | | | | | | | | This patch remove ADC1 thermistor wheich not use on dooly. BUG=b:174294972 BRANCH=puff TEST=make BOARD=dooly Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I37be7a30e5e4a10571e308e8de5bd31e314309db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755357 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* dooly: add usb-c 1 port throttlingZick Wei2021-03-151-0/+4
| | | | | | | | | | | | | | dooly is puff variant but has usb-c 1 port, this patch adds usb-c 1 port throttling when OCP. BUG=b:174294972 BRANCH=puff TEST=make BOARD=dooly Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I520303c5c0a70af7094c1b6220a8332745d1f850 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755348 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* dirinboz: update thermal protect parameterZick Wei2021-03-151-10/+16
| | | | | | | | | | | | | | | | | | This patch update thermal protect parameter as below: All trigger/release by charger thermistor, Charging current 0.5A: Trigger > 58’C ; Release < 57’C CPU PROCHOT: Trigger > 63’C ; Release < 62’C Set USB-C0 port to 1.5A: Trigger > 63’C ; Release < 62’C BUG=b:181803301 BRANCH=zork TEST=verify EC behavior intended when trigger/ release thermal protection. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I9ce794a37c2d29f02f1e2829dcc53340c542b13e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751304 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Guybrush: Enable Power Group interruptsstabilize-13851.B-mainelmo_lan2021-03-131-0/+4
| | | | | | | | | | | | | | Enable interrupt of PG_GROUPC_S0_OD and PG_LPDDR4X_S3_OD. BUG=b:182581653 BRANCH=None TEST=EN_PWR_PCORE_S0_R works normal. Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: I06ece39630b3f4eab290a80a64b9f70a8f61cac0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757809 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* mchp: Update chip configuration and flash layout for MEC172xScott Worley2021-03-132-24/+42
| | | | | | | | | | | | | | | | | | | Adding MEC172x specific changes to chip configuration and flash layout header files. MEC172x Boot-ROM loader SPI flash layout is different from previous chips. BRANCH=none BUG=none TEST=Build MCHP MEC170x and MEC152x boards Signed-off-by: Scott Worley <scott.worley@microchip.corp-partner.google.com> Change-Id: Id02cdeac8131844e948799c0c9de4f45c47d4d73 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747654 Reviewed-by: Martin Yan <martin.yan@microchip.corp-partner.google.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Ravin Kumar <ravin.kumar@microchip.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Martin Yan <martin.yan@microchip.corp-partner.google.com>
* mchp: Add Microchip MEC172x registersScott Worley2021-03-134-66/+1536
| | | | | | | | | | | | | | | | | | | | Microchip MEC172xN is an EC with 416KB total SRAM with eSPI and SPI Host interfaces. The CPU is an ARM Cortex-M4 with FPU, 8 region MPU, and maximum frequency of 96 MHz. This change also adds common CPU clock divider defines for all MEC chips and moves the DMA API struct to the common register header. BRANCH=none BUG=none TEST=Build MCHP MEC170x and MEC152x boards Signed-off-by: Scott Worley <scott.worley@microchip.corp-partner.google.com> Change-Id: Ie159a4addf0bbcd30404339944d5b1695482ab6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2746438 Reviewed-by: Ravin Kumar <ravin.kumar@microchip.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Martin Yan <martin.yan@microchip.corp-partner.google.com>
* zephyr: fix Kconfig name for console commandsKeith Short2021-03-126-20/+20
| | | | | | | | | | | | | | | Cleanup Kconfig options to match the convention of starting with CONFIG_PLATFORM_EC_CONSOLE_CMD_*. BUG=b:181794644 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ibed3d0371483b26c17f8f8c05c088694b6f3728d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2756981 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* ocpc: Use desired current from charger taskAseda Aboagye2021-03-121-5/+5
| | | | | | | | | | | | | | | | | | | | | OCPC was directly querying the desired battery current instead of honoring the request from the charger task by mistake. This commit fixes that and makes sure that we don't set our current target from the desired battery current directly. BUG=b:180710082 BRANCH=dedede TEST=Build and flash sasuke, charge from C1, verify that desired charge profile is adhered to. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I6d59babcad891fd09ab9a4fc5641e6d152223b74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740572 Tested-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* zephyr: volteer: Enable battery cut-offKeith Short2021-03-121-3/+1
| | | | | | | | | | | | | | | | | Battery cut-off was disabled because it caused problems when the battery capacity reached 99%. Battery cut-off is no longer causing any charging issues. BUG=b:179393708 BRANCH=none TEST=Discharge battery to 90%, charge to 100% successfully TEST=Run `ectool batterycutoff`, verify battery cutsoff Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ied8fa9478ff0360f4077225317d8ae4ad69598d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2756968 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* VPD: Properly set VPD RA and RD on CC1 and CC2Sam Hurst2021-03-121-2/+2
| | | | | | | | | | | | | | | | Set the RA and RD on CC1 and CC2 of a Vconn Powered Device during the Disc. ID phase. BUG=b:165934405 BRANCH=none TEST=make runtests Verified that CC1 and CC2 were detected as RA and RD using a Total Phase Analyzer. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I23e6cdaaa89b77adeb503b28d5847df68ab3cd5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748428 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMV2: Add explicit setting of VPD VDO CT CurrentSam Hurst2021-03-125-17/+41
| | | | | | | | | | | | | | | | | | Add the capablility to explicity set a CTVPDs VDO current. BUG=b:165934405 BRANCH=none TEST=make runtests Verified that returned VDO from chocodile_vpdmcu was correct. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I2292024986fa89b228b56678d61d1aef2866c817 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748427 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Sam Hurst <shurst@google.com>
* TCPMV2: Fix the VPD_VDO returned by VPDsSam Hurst2021-03-121-1/+1
| | | | | | | | | | | | | | | | A device that supports Vconn Powered functionality must reflect this by setting bit0 of its VPD VDO to 1 or 0 if said functionality isn't supported. BUG=b:165934405 BRANCH=none TEST=make runtests Verified that returned VDO from chocodile_vpdmcu was correct. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I2f7b6a66c09221f1d5c12831cd2e4b56510aecdd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748426 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: add DPTF supportKeith Short2021-03-126-0/+33
| | | | | | | | | | | | | | | | | | | | | | Add a Kconfig option to enable DPTF support. Adds support for the following ACPI entries: EC_ACPI_MEM_FAN_DUTY (0x04) EC_ACPI_MEM_TEMP_ID (0x05) EC_ACPI_MEM_TEMP_THRESHOLD (0x06) EC_ACPI_MEM_TEMP_COMMIT (0x07) BUG=b:179886912 BRANCH=none TEST=zmake testall TEST=Boot zephyr-ec on Volteer, observe that ACPI warnings for ignored read/writes for DPTF commands are fixed. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I40cbe79e57c3d4687d828ec46fe0d51034e96bfc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757028 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* zephyr: Improve help text for ACPI supportKeith Short2021-03-121-3/+15
| | | | | | | | | | | | | | Expand on the help text for the CONFIG_PLATFORM_EC_ACPI option. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib24f355ad22664805c8ab1ada84aa40ed6572637 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757027 Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org>
* Jelboz: Dynamic charging current control.Jacky Wang2021-03-122-0/+90
| | | | | | | | | | | | | | | | | | 1. Limit Charging Current by thrmal sensor 0 temperature(Charger). 2. If temperature over or under 54C and keep 5s, Charging Current will change to next level. 3. Limit Charging Current table : 2200/1800/1700/1600 BUG=b:181085004 BRANCH=firmware-zork-13434.B TEST=make BOARD=shuboz 1. Verified pass by thermal team. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ic2526db54815759e52b56c662a364237ff6d878f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2716585 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* TCPMv2: Add support for disabling type-2 BIST modeScott Collyer2021-03-124-1/+25
| | | | | | | | | | | | | | | | | | | | | | This CL adds a TCPCI method to disable BIST mode for the case where the TCPC does not handle the duration automatically. This is required for the ucpd driver as once type-2 BIST mode is started, the ucpd peripheral needs to be reset to stop. This CL also reduces the timer value from 60 msec to 55 msec to ensure that there is enough time for BIST to be stopped and still be in spec. BUG=b:182436876 BRANCH=None TEST=verifed on Quiche that when type-2 BIST is started then it stops when the timer in PE expires. This fixes TDA.2.1.1.1: BMC-PHY-TX-EYE Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I59ee7ac0dead09ac3a1b5783cfa3fe9db238eb7e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2660803 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* kconfig: Add CONFIG_USB_PD_TCPC_VCONNRob Barnes2021-03-123-0/+15
| | | | | | | | | | | | | | | | Add CONFIG_USB_PD_TCPC_VCONN to Kconfig.usb. Also add CONFIG_VBOOT_HASH_RELOAD_WATCHDOG to allow list since it's a temporary config (b/182499153). BUG=None TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Idde220f7d89a719686b3afba83c94b9973deca9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752431 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Guybrush: Don't read GPIO_EN_KB_BL as ioexRob Barnes2021-03-121-2/+2
| | | | | | | | | | | | | | GPIO_EN_KB_BL is being read as an ioexpander gpio. This was true on Zork but on Guybrush it's a regular EC GPIO. BUG=None BRANCH=None TEST=Build Change-Id: I1ced4ebbb8c5cbd2dfca0e12528dfcb8fa47f789 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755194 Reviewed-by: Diana Z <dzigterman@chromium.org>
* brya: Enable tablet modeBoris Mittelberg2021-03-124-1/+11
| | | | | | | | | | | | | Enable GMR sensor and tablet mode for Brya. BRANCH=none BUG=b:181368071 TEST=buildall passes, manually tested with a magnet Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I3d408e6b6bdd2bc5da81203c0c4e80c2ff367c05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2737240 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* USB PD: Lower SinkWaitCap timerDiana Z2021-03-121-1/+1
| | | | | | | | | | | | | | | | | Currently, our SinkWaitCap timer is about 20 ms below the maximum. Lower an additional 25 ms to ensure we're hard resetting consistently in time during testing. This should still offer relatively generous time for the partner to begin sending source capabilities. BRANCH=None BUG=b:173027500 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I308ad2c5590aeeed8179ed482cf03a784a852840 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728946 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* TCPMv2: Detach before disabling PDAbe Levkoy2021-03-121-0/+1
| | | | | | | | | | | | | | | | Set TC state as if it were entering an Unattached state when entering an open state, so that accesses to TC state during open states return coherent results. BUG=b:182401047 TEST=Run ectool typecstatus with PD suspended; events are cleared BRANCH=firmware-volteer-13672.B-main Change-Id: I17d64459452c2671dddd8f4b6ff11124c09ace72 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752798 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* elemi: Remove CONFIG_SYSTEM_UNLOCKEDDevin Lu2021-03-121-2/+0
| | | | | | | | | | | | | Remove CONFIG_SYSTEM_UNLOCKED for firmware qual. BUG=none BRANCH=volteer TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Iba80311009ebd0b78dee68d7184e892564c43c40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744557 Reviewed-by: Keith Short <keithshort@chromium.org>
* elemi: Remove CONFIG_BYPASS_CBI_EEPROM_WP_CHECKDevin Lu2021-03-121-1/+0
| | | | | | | | | | | | | Remove CONFIG_BYPASS_CBI_EEPROM_WP_CHECK for firmware qual. BUG=none BRANCH=volteer TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ie3af6ba0b6a2661c071150908a3748e3220c305c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744556 Reviewed-by: Keith Short <keithshort@chromium.org>
* kconfig: Alias EN_PWR_A to EN_PWR_S5Rob Barnes2021-03-124-4/+2
| | | | | | | | | | | | | EN_PWR_A should alias to EN_PWR_S5. EN_PWR_Z1 is PSL_OUT. BUG=b:182512084 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Iabec65bb573d200a12e727d281f8c97cf1ee0ec4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2753816 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Mordin: Add one more SKUIDsDevin Lu2021-03-121-0/+1
| | | | | | | | | | | BUG=b:171755306 BRANCH=firmware-grunt-11031.B TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I45830335545206f665e84866e0b11a2c666d0101 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752572 Reviewed-by: Edward Hill <ecgh@chromium.org>
* brya: remove CONFIG_BRINGUPBoris Mittelberg2021-03-121-1/+0
| | | | | | | | | | | | | Remove BRINGUP flag to allow proper cold reboot BRANCH=none BUG=b:182443498 TEST=buildall passes, manual test via `ectool reboot_ec cold` Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I5a9d25ea9125acdec3645a6566965988eedb3e94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752436 Reviewed-by: Furquan Shaikh <furquan@chromium.org>