summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zephyr: kconfig: alphabetize the root kconfigYuval Peress2021-04-071-108/+107
| | | | | | | | | | | BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I371beb4cda83199ec2d0cc2bb85e4af0144d4e70 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808334 Reviewed-by: Simon Glass <sjg@chromium.org>
* cherry: add batteryTing Shen2021-04-072-21/+22
| | | | | | | | | | | | | | | BUG=b:181838424 TEST=1) EC console prints "found batt:LGC KT0030G020" 2) cutoff works BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I903d0140e75a7877fa8ae6a8f04997f44989755b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807249 Tested-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Parker Lin <parkerlin@google.com> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* asurada: enable FRSEric Yilun Lin2021-04-071-0/+1
| | | | | | | | | | | | BUG=b:176876036 TEST=1. ensure smart discharge works with FRS 2. FRS 5V work BRANCH=asurada Change-Id: I3f7ffa805b313d9cbac5fe8908b47d1473caed61 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738508 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* asurada: enable SYV682C and smart dischcargeEric Yilun Lin2021-04-072-1/+8
| | | | | | | | | | | | | | This CL enables SYV682C for hayato revision > 2. BUG=b:160548079 TEST=1. hayato meets tVconnOff 2. hayato meets tVBUSDischarge BRANCH=asurada Change-Id: I424b7785ba877b7cfdc413b8b253457a759b98d3 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738507 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: kconfig: move timer configs to separate fileYuval Peress2021-04-072-13/+17
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.timer). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ie5987fd413cdc89a1f3f15508def6fdc64d94750 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808333 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move timer configs to separate fileYuval Peress2021-04-072-47/+51
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.timer). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I11a4c10d19d23aa46f53ea6676dac637f1cd85a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808152 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move throttle_ap configs to separate fileYuval Peress2021-04-072-29/+33
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.throttle_ap). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I78097f824a95ecce1bf588a27c0c600e31e127b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808151 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move rtc configs to separate fileYuval Peress2021-04-072-37/+41
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.rtc). BRANCH=none BUG=none TEST=zmake testall Change-Id: I6d9879dd293f944b3029ed1100fc4e406ae8f82c Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808150 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move panic configs to separate fileYuval Peress2021-04-072-39/+44
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.panic). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: If506bc71ac969477d88250c1fcacca6a19101968 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808149 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move mkbp_event configs to separate fileYuval Peress2021-04-072-46/+50
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.mkbp_event). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Icc9b40075c57dd5384016f213c0ebb5c38a38185 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808148 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move flash configs to separate fileYuval Peress2021-04-072-110/+114
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.flash). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I7ac8ec87bdca8ab799bc1faf47804e34c7a6beda Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808147 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move espi configs to separate fileYuval Peress2021-04-072-25/+29
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.espi). BRANCH=none BUG=none TEST=zmake testall Change-Id: Ie5bd22b1179b03370a3e45cc91738b767865e2a0 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808146 Reviewed-by: Simon Glass <sjg@chromium.org>
* flash_ec: remove hammer like boards from BOARDS_STM32 arrayTing Shen2021-04-071-8/+0
| | | | | | | | | | | | | | | | | flash_ec script is able to infer chip name from servod, we don't need this explicit list for hammer. BUG=none TEST=flash ec command `util/flash_ec --board zed` still works BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I4f4d72aa3f30e6178f6f7a968af6e2bc8a5c7845 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807250 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* it8xxx2: add support option CONFIG_PRESERVE_LOGSDino Li2021-04-078-4/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On it8xxx2 chips, assert WRST# to reset itself will clear memory content to default value, this is a HW mechanism. So if CONFIG_PRESERVE_LOGS and CONFIG_IT83XX_HARD_RESET_BY_GPG1 are enabled at the same time, we have to save EC logs into flash before reset. We will restore logs from flash on the next initialization before jumping to main routine. BUG=b:183899510, b:183466169 BRANCH=none TEST=1) __image_size is same as ec.RW.bin size. 2) buildall. 3) manually verify reboot, poweroff, and sysjump from AP console: localhost ~ # ectool uptimeinfo EC uptime: 64.755 seconds AP resets since EC boot: 0 Most recent AP reset causes: EC reset flags at last EC boot: reset-pin | power-on localhost ~ # reboot ... localhost ~ # ectool uptimeinfo EC uptime: 19.334 seconds AP resets since EC boot: 0 Most recent AP reset causes: 71.609: reset: at AP's request EC reset flags at last EC boot: reset-pin | power-on | hard localhost ~ # poweroff ... localhost ~ # ectool uptimeinfo EC uptime: 20.627 seconds AP resets since EC boot: 0 Most recent AP reset causes: 71.609: reset: at AP's request 32.149: reset: at AP's request EC reset flags at last EC boot: reset-pin | power-on | hard localhost ~ # ectool reboot_ec RW localhost ~ # ectool uptimeinfo EC uptime: 37.998 seconds AP resets since EC boot: 0 Most recent AP reset causes: 71.609: reset: at AP's request 32.149: reset: at AP's request EC reset flags at last EC boot: reset-pin | power-on | sysjump | hard localhost ~ # Change-Id: I76b5f172b7728dc5ce9bf3a965cb7b2d638f8fc3 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794322 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* zephyr: kconfig: move debug_assert configs to separate fileYuval Peress2021-04-072-39/+46
| | | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.debug_assert). Also, add correct dependency to only allow PLATFORM_EC_DEBUG_ASSERT_* configs if PLATFORM_EC_DEBUG_ASSERT is enabled. BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I1cdd0dbba3b7300b8b95eb69df49d44033a0eb6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808145
* zephyr: kconfig: move console_cmd_mem configs to separate fileYuval Peress2021-04-072-30/+33
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.console_cmd_mem). BRANCH=none BUG=none TEST=zmake testall Change-Id: Id9abef7be1943eee42fe6a31cf0488f4b7209a42 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808144 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: kconfig: move board_version configs to separate fileYuval Peress2021-04-072-42/+46
| | | | | | | | | | | | | | Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.board_version). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I876b0d811b72a0691c763225218ad101ec3826b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808143 Reviewed-by: Simon Glass <sjg@chromium.org>
* lantis: Move C1 SM5803 processing to the PD_INT taskTommy Chung2021-04-071-1/+15
| | | | | | | | | | | | | | | | | Since the SM5803 shares an interrupt line with the TCPC, allow the PD_INT task for C1 to process interrupts for this chip. This will ensure that any interrupts from the charger are handled at a high priority and cannot leave the shared IRQ line low for extended periods. BUG=none BRANCH=dedede TEST=On lantis, confirm charger attach to C1 works reliably. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Id363b743eb7825f4a03f7119248218d0259e9d5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2804004 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* brya: Update generated-gpio.inc from spreadsheetCaveh Jalali2021-04-071-1/+1
| | | | | | | | | | | | | | This refreshes generated-gpio.inc from the latest GPIO spreadsheet. The change is to configure EC_ACCEL_INT_R_L for 1.8v instead of 3.3v. BRANCH=none BUG=b:179648721 TEST=buildall passes, brya boots. accel interrupts tested by bmbm@ Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: Ib0c2667e7593329e533b47fdb1ce09a4eece6590 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807252 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: lazor: enable RTC host commandsWai-Hong Tam2021-04-071-0/+1
| | | | | | | | | | | | | | | | The RTC host commands are enabled by another config PLATFORM_EC_HOSTCMD_RTC. Enable it on Lazor. BRANCH=None BUG=b:182398910, b:178230662 TEST=Tested on Lazor. Disabled any network connection. Powered down AP for a while. Booted AP again and checked the time is accurate. Change-Id: Id4c2d32747b5a970ff1354c1597c1356143e36ff Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808795 Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: doc: Add a title to the shimming docSimon Glass2021-04-061-47/+49
| | | | | | | | | | | | | | | | | This is confusing when browsing since it has no title. Add one. Also move the 'alternatives considered' to the bottom while we are here, since that is confusing for people who are less interested in the motivation for shimming and just want to know what to do. BUG=b:181253613 BRANCH=none TEST=check it in gitiles Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I73a4716278396dfdf0661d6ced67b3d6a9785165 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807487 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: doc: Add zephyr docs to sitemapSimon Glass2021-04-061-0/+7
| | | | | | | | | | | | | | To make it easier for people to get started with Zephyr, link in the existing docs. BUG=b:181253613 BRANCH=none TEST=check it in gitiles Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I68f0deb52a64147e705e53410699c372fd1e69b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2807484 Reviewed-by: Yuval Peress <peress@chromium.org>
* ec: Add instructions on debugging testsJeremy Bettis2021-04-061-0/+17
| | | | | | | | | | | | | | | | For host based tests, add instructions on emerging and running gdb. BRANCH=none BUG=b:178484932 TEST=doc change only Change-Id: I5c99d2699134d732e4596a0ce9acffb39c22bda6 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2805225 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* zephyr: dts: volteer: add PSL input pads in 'psl-in-pads' prop.Mulin Chao2021-04-062-0/+23
| | | | | | | | | | | | | | | | | | | | | | Add PSL input pads which used on volteer platform in 'psl-in-pads' property and overwrite their 'flag' property for detection mode. BUG=b:173787365 BRANCH=none TEST=zmake testall TEST=hibernate wake-up from 1. power button 2. lid 3. AC adaptor 4. reset pin Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I669acd24cbd4e46f9042d1ea36f9c040a7f67e07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794207 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Homestar: Remove the DA9313 support, add the LN9310 supportxuxinxiong2021-04-063-11/+45
| | | | | | | | | | | | | | | | LN9310 and DA9313 are not pin compatible. The layout of Homestar can only choose one and it is LN9310. So remove the DA9313 support and add the LN9310's. BRANCH=Trogdor BUG=b:182358144 TEST=Built homestar image Change-Id: I3c07c0f062a68f64a13a006aa7010c438dfe1b5e Signed-off-by: xuxinxiong <xuxinxiong@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748208 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* Drawcia: Move C1 SM5803 processing to the PD_INT taskDiana Z2021-04-061-1/+15
| | | | | | | | | | | | | | | | Since the SM5803 shares an interrupt line with the TCPC, allow the PD_INT task for C1 to process interrupts for this chip. This will ensure that any interrupts from the charger are handled at a high priority and cannot leave the shared IRQ line low for extended periods. BRANCH=None BUG=b:182534117,b:173056845 TEST=on drawcia, confirm charger attach to C1 works reliably Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I6670c62ca6d59fc3f5db4151cf7142b2da1fec38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803462 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* SM5803: Add interrupt processing function to headerDiana Z2021-04-061-0/+3
| | | | | | | | | | | | | | | Expose the function for interrupt processing for use by other tasks, such as the PD_INT task if the charger chip is sharing an IRQ line with the TCPC. BRANCH=None BUG=b:182534117,b:183679237 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ic147fc282ecd5954c95e0c71e230c27b8c91186b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803461 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* PD_INT: Add ability to process non-TCPC alerts in PD_INTDiana Z2021-04-062-1/+16
| | | | | | | | | | | | | | | | Some boards may have other chips sharing the TCPC interrupt line, in which case their alerts may need to be handled at the same priority as the TCPC itself. Otherwise, it becomes difficult to respond quickly to TCPC interrupts. BRANCH=None BUG=b:182534117,b:183679237 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I905f20eeb0dd89c8516de31005d402a890906595 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803460 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* nightfury: Change down debounce time to 30msPatryk Duda2021-04-062-0/+15
| | | | | | | | | | | | | | | This patch is implementation of CL:2744760 from firmware-hatch-12672.B for ToT. This change can't be cherry-picked because CL:2194160 removes keyscan_config structure from baseboard/hatch/baseboard.c. BUG=b:181307934 BRANCH=none TEST=make BOARD=nightfury Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I070390b1f4f13dcce5a93ed0c8982b82a3574d6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784642 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* kohaku : limit charging current to 0.45CYongBeum.Ha2021-04-062-0/+32
| | | | | | | | | | | | | | | | | Change charging current from 0.72C to 0.45C when system is in S0 BUG=b:144532818 BRANCH=firmware-hatch-12672.B TEST=FW_NAME=kohaku emerge-kohaku chromeos-ec & check charging current Change-Id: Iba1dd08465b2469a6456cc04ad72a39c7af8b8a4 Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957605 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784641 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Patryk Duda <pdk@semihalf.com> Commit-Queue: Patryk Duda <pdk@semihalf.com>
* cret: Initial EC image setup battery parameterjohnwc_yeh2021-04-062-18/+180
| | | | | | | | | | | | | | | | Setup battery parameter for cret. BUG=b:183875170 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I3f4df0a4255bbc6aaf9bbee1260abc7660e4626d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789807 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* bq25720: Add VSYS_TH2 tuning supportCaveh Jalali2021-04-065-0/+64
| | | | | | | | | | | | | | | | | | This adds support for tuning the bq25720 VSYS_TH2 threshold so that a custom threshold voltage can be specified. The default 3.2v for 1S batteries and 5.9v for 2S (or more) batteries may need to be adjusted to improve system stability. When VSYS droops to this threshold, PROCHOT is asserted to reduce system power demand. BRANCH=none BUG=b:183474163 TEST=with rest of patch stack, booted brya to the OS without a battery Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I7f52a369371eb93860b14ad8438b790af231c450 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2798979 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* adlrvp: initialise over current indicationSooraj Govindan2021-04-061-1/+3
| | | | | | | | | | | BUG=none BRANCH=none TEST=ADL-P-RVP boots to OS Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I398c6d642c0cfac48e647878e9b06f164b17db60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2804000 Reviewed-by: caveh jalali <caveh@chromium.org>
* Cozmo: Remove motion sensorsSue Chen2021-04-064-211/+4
| | | | | | | | | | | | | For Cozmo is clamshell, it doesn't have motion sensors. BUG=b:183454206 BRANCH=icarus TEST=make BOARD=icarus Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I3da637bdc5a5ea4a11e1b715fdd8bff030e388b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799331 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* kodama: disable PD logging to save flashEric Yilun Lin2021-04-061-0/+1
| | | | | | | | | | | | BUG=none TEST=make buildall BRANCH=none Change-Id: If9c725dd2244a4b013d64e97a8f0262d3ea83f8f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2804007 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* zephyr: lazor: enable watchdogWai-Hong Tam2021-04-061-0/+6
| | | | | | | | | | | | | | | | | | | | | Enable watchdog on Lazor. BUG=b:182398910 BRANCH=None TEST=Modified the `waitms` implementation to disable interrupt during the wait (since Zephyr-EC uses preemptive threads so some other threads can preempt the wait). Called `waitms 2000` which triggered watchdog reset, as watchdog is expired at 1600ms. Called `waitms 1000` which didn't trigger watchdog reset. Change-Id: Ibd8280f5984d1a5fe93cd1b884f5fa9a53edc983 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803971 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* boldar: Reset SLP VW signals on EC-AP eSPI resetSooraj Govindan2021-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | This enables an option for the NPCX eSPI support code to reset SLP signals when eSPI# is asserted because of a global reset. This is needed exclusively on platforms that do not use deep Sx. The EC console apshutdown command forces the AP into G3 but the SLP_S4 signal is not reset in this case as virtual wire signals are not reset on ungraceful AP shutdown (global reset). BRANCH=none BUG=none TEST=Use EC "powerindebug" command to observe the SLP_S4 virtual wire is now reset after "apshutdown" command. Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I09b78492d24ddeb2e372b7a2390854bd991488a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803999 Reviewed-by: caveh jalali <caveh@chromium.org>
* spherion: remove motion sensor functionBen Chen2021-04-065-150/+6
| | | | | | | | | | | | | | Not supports tablet mode, disable motion sensor function. BUG=b:183064682 BRANCH=asurada TEST=check ec console don't initialize motion sensors. Change-Id: Ibeadb05849bb7e4bdd8bb780be805ef1d057e945 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2794201 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* gitlab: Add lazor buildstabilize-13895.B-mainSimon Glass2021-04-051-7/+14
| | | | | | | | | | | | | | We currently have only volteer building on gitlab. Since trogdor is under active development, add a build for that as well. BUG=b:178731498 BRANCH=none TEST=pass at https://gitlab.com/zephyr-ec/ec/-/pipelines/281073991 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I0526a83596825e8859ea74fad555c37bddf2fcc2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803996 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* gitlab: Update build name for zephyrSimon Glass2021-04-051-1/+2
| | | | | | | | | | | | | | The directory has changed. Update this in the gitlab file so that builds can succeed. BUG=b:178731498 BRANCH=none TEST=pass at https://gitlab.com/zephyr-ec/ec/-/pipelines/281069048 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: If4924a221f33b3ad17c97a20ead1c35fc760291d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803995 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Disable LTO for zephyr toolchainKeith Short2021-04-051-1/+8
| | | | | | | | | | | | | | | | | | | | | If both CONFIG_LTO and CONFIG_FPU are enabled, the Zephyr toolchain generates linker errors. Disable LTO to unblock non-chroot builds and Gitlab builds. BUG=b:184302085 BRANCH=none TEST=Build zephyr EC for volteer with coreboot toolchain, verify LTO is enabled TEST=Build zephyr EC for volteer with zephyr toolchain, verify LTO is disabled Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib8e99df0b96c3a1579bdcb1f98b023bf13f0be8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2801251 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* zephyr: firmware_builder bundle functionalityKevin Shelton2021-04-051-10/+106
| | | | | | | | | | | | | | | | | | | | | | Ports bundle functionality (excluding LCOV info bundling) from platform/ec/firmware_builder.py. BUG=b:176926834 BRANCH=None TEST=./firmware_builder.py --metrics=/tmp/metrics build, ./firmware_builder.py --metrics=/tmp/metrics bundle, ./firmware_builder.py --output-dir=/tmp/testbundle --metrics=/tmp/metrics --metadata=/tmp/testmetadata bundle, ./firmware_builder.py --metrics=/tmp/metrics --code-coverage bundle, bundle with code-coverage option raises an exception as expected, build included some errors that are unrelated to this change, e.g.: "Zmake/ERROR: Including boilerplate (Zephyr base): Signed-off-by: Kevin Shelton <kmshelton@chromium.org> Change-Id: I3b7a5a0d2ec8415320bdf289b1d64210feeb39c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2797541 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* PCHG: Support firmware updateDaisuke Nojiri2021-04-057-57/+671
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds EC_CMD_PCHG_UPDATE, which allows the host to update firmware of ctn730 via I2C. An updater (e.g. ectool) is expected to issue EC_PCHG_UPDATE_CMD_OPEN, multiple EC_PCHG_UPDATE_CMD_WRITEs, then EC_PCHG_UPDATE_CLOSE. Each sub-command completion is notified to the host via EC_MKBP_EVENT_PCHG. An updater is supposed to wait for the previous sub-command to complete before proceeding to the next. Example: localhost ~ # ectool pchg 0 State: DOWNLOAD (6) FW Version: 0x104 localhost ~ # ectool pchg 0 update 0x207000 0x105 /path/to/image.bin Update file /path/to/image.bin (85632 bytes) is opened. Writing firmware (port=0 ver=0x105 addr=0x207000 bsize=128): ********************************************************************** FW update session closed (CRC32=0x7bd5c66f). localhost ~ # ectool pchg 0 reset Reset port 0 complete localhost ~ # ectool pchg 0 State: ENABLED (2) FW Version: 0x105 BUG=b:182600604, b:173235954 BRANCH=trogdor TEST=ectool pchg 0 update 0x201200 0x105 /tmp/user_ee_X0.1_V1.5.bin TEST=ectool pchg 0 reset Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I9c62f1714dd69428ab5870c443cb4eb77881a6c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757099
* crc: Don't use crc_hw.h for host toolsDaisuke Nojiri2021-04-051-2/+2
| | | | | | | | | | | | | | | | | Currently, crc_hw.h is included when CONFIG_HW_CRC is defined. This breaks host tools which call crc32 APIs because they run on an AP (which has no 'hw_crc'). This patch avoids using crc_hw.h for host tools. BUG=none BRANCH=none TEST=buildall Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I50f496275f4d8969950bf51e3de5cff9697e3b29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2800717 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* mchp: Add i2c_chip.h and board_i2c_p2c() in chipmartin yan2021-04-052-0/+39
| | | | | | | | | | | | | | | | Add board_i2c_p2c() which returns default I2C controller for i2c but this function can be overridden by board BRANCH=none BUG=none TEST=Build sklrvp_mchp172x. Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I88740517f11c6afcfc1edb37a59bbf04f336f655 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2800091 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* mchp: Move general flash definitions into chipmartin yan2021-04-051-0/+16
| | | | | | | | | | | | | | | | | | | | | Move general flash definitions: CONFIG_SPI_FLASH_PORT CONFIG_SPI_FLASH into config_chip.h Redefine CONFIG_FLASH_SIZE_BYTES per MEC1727 with integrated SPI flash BRANCH=none BUG=none TEST=Build MEC170x/MEC152x boards and sklrvp_mchp172x. Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I2dc9af69b0794ec2e3ec11c45be9ff74aa19f561 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799977 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Ravin Kumar <ravin.kumar@microchip.com> Tested-by: Ravin Kumar <ravin.kumar@microchip.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Lindar: Lindar's lightbar support in S0ix/S3reno.wang2021-04-034-2/+480
| | | | | | | | | | | | | | | | | | | | | | | | | 1. Lid is closed, lightbar keep off 2. Lid is opened, its behavior follow below. AC+Battery < 20%, lightbar solid 2 amber led on. AC+Battery < 40%, lightbar solid 4 amber led on. AC+Battery < 60%, lightbar solid 6 amber led on. AC+Battery < 80%, lightbar solid 8 amber led on. AC+Battery < 97%, lightbar solid 10 amber led on. AC+Battery >= 97%, lightbar solid 10 green led on. Battery only >= 15%, lightbar keep off. Battery low < 15%, lightbar blink amber color, 1s on, 5s off. 3. Some SKU un-support lightbar, and shouldn't run lightbar task. 4. Lightbar is powered by PP3300_A, and shouldn't run it in S4/S5/G3. 5. Add debounce time for lightbar state change. BUG=b:174133147 BRANCH=volteer TEST=make buildall, test lightbar behavior in S0ix/S3. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Ibbdc17627f7b2d1b2abbbad23b6c06024455e66b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2739008 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: Enable the last two charger optionsSimon Glass2021-04-031-0/+2
| | | | | | | | | | | | | | | Enable these options to hopefully reach parity with ECOS in this area. BUG=b:183296099 BRANCH=none TEST=build for lazor (no test yet) Change-Id: I04539d7eb258cf71ff462f210a4070c506565b1f Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789806 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* lazor: Move GPIO_CCD_MODE_ODL to the shared fileSimon Glass2021-04-032-7/+6
| | | | | | | | | | | | | | | | | | Move this init to the shared usbc_config file so that Zephyr can use it. BUG=b:183296099 BRANCH=none TEST=build for lazor Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I65b0f835b5005b783b752fe33085002f9689f9cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789805 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: lazor: Add support for the ccd_mode_odl interruptSimon Glass2021-04-031-1/+4
| | | | | | | | | | | | | | | | | | This is used on lazor so add it to the map. BUG=b:183296099 BRANCH=none TEST=with another CL, build for lazor and check that the init compile compiles Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I981b36b738b7429416a3dcadc5c9d79fad4e6749 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789804 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>