summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* common: move standard library functions from util.c to another fileMichał Barnaś2021-08-257-695/+336
| | | | | | | | | | | | | | | | | | This commit moves some of the standard library functions from util.c file to util_stdlib.c file. It will allow to use util.c for both CrOS EC and Zephyr builds and will make shim util file unnecessary. BRANCH=main BUG=b:177096231 TEST=Build both, CrOS EC and Zephyr firmwares Compilation should finish without any problems After flashing, both versions work as they should Change-Id: If6f930a04d28bec35faa16759f43b36176bf3de7 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3081827 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Chronicler: Update battery specYu-An Chen2021-08-252-4/+39
| | | | | | | | | | | | | | | Update battery manufacturer name BUG=b:190685811 BRANCH=volteer TEST=check NVT CP813907-01 still working. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I689a59b3a64194d163a2eff4d0d3c4c6ed70cc8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115076 Reviewed-by: Isaac Lee <isaaclee@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* guybrush: Enable AMD STTRob Barnes2021-08-255-13/+63
| | | | | | | | | | | | | | | | Enable AMD STT driver. The AMD STT driver will read the SOC and ambient temperature sensors every second and send the result to the SOC via SB RMI on the i2c bus. BUG=b:176994331 TEST=stt debug BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I45157acf172dcce00c24971be70c5ec609d460dd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082326 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* tmp112: Support reading TMP112 in millikelvinRob Barnes2021-08-258-18/+41
| | | | | | | | | | | | | | | TMP112 supports .0625 degrees of resolution. Retain this resolution and support reading the temp in degrees millikelvin. BUG=b:176994331 TEST=Build and run on guybrush BRANCH=None Change-Id: I2802016b1edb08678953238e7f01acdd320c37cf Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3001391 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Mrbland: Change the behavior of LEDstabilize-14179.B-mainliheyang2021-08-252-30/+73
| | | | | | | | | | | | | | | Add the new configuration of GPIO_EC_PWRBTN_LED and GPIO_EC_CHG_LED_R/G_C0 BUG=b:196325448 BRANCH=trogdor TEST=1.make BOARD=mrbland Signed-off-by: liheyang <liheyang@huaqin.corp-partner.google.com> Change-Id: Ib0a6b6693cf833ca6320f287328e6bead040c729 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090508 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* cherry: enable FRSTing Shen2021-08-252-3/+37
| | | | | | | | | | | | | BUG=b:190348051 TEST=Verify FRS workable BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ie612cb2e5448db4432772f32e2f84ea6a471d4b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3084323 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* brask: modify the usbc settingZhuohao Lee2021-08-258-207/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | There are 3 usb typec ports in the brask. The configuration listed below: Port 0: TCPC NCT3808-1, TCPPC SYV682B, Burnside Bridge retimer. Port 1: TCPC RT1716, TCPPC SYV682B, Kandou KB8002. Port 2: TCPC NCT3808-2, TCPPC SYV682B, Burnside Bridge retimer. In order to support the above configuration, this patch modifies: 1. use syv682v instead of using nv20p3483. 2. use rt1716 instead of using ps8815. 3. use kb800x retimer. 4. remove the fw_config because we don't need it to switch the different DBs. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: Ie09aef9dc7cc7a532b34d86ea022127099f7735e Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115807 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brask: configure the usb type-a portZhuohao Lee2021-08-251-1/+1
| | | | | | | | | | | | | Set USB_PORT_COUNT to 4 to support 4 usb type-a ports. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: I5c958e04a41af99448e03d79533a847959972408 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114502 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brask: add the barrel jack supportZhuohao Lee2021-08-252-0/+6
| | | | | | | | | | | | | | This patch adds the barrel jack support. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: Iea2df9c6a478b45cfc4a56e11f1aeb6d6b2adba2 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114501 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* rt1718s: enable FRSTing Shen2021-08-253-10/+75
| | | | | | | | | | | | | BUG=b:190348051 TEST=Combined with other CLs in the chain, verify FRS workable on Tomato BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I52a020b1288928eb9a0f3ada1364776cd8e78337 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3109709 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* brask: add recovery button supportZhuohao Lee2021-08-252-4/+10
| | | | | | | | | | | | | | | | | There is a dedicated recovery button for the brask. This patch adds the CONFIG_DEDICATED_RECOVERY_BUTTON and CONFIG_DEDICATED_RECOVERY_BUTTON_2 to enable it. Besides, the CONFIG_EMULATED_SYSRQ and CONFIG_MKBP_INPUT_DEVICES are added to let the EC pass the button state to the AP BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: Ic6ea693bbbc0bcd0d502d2636636bc38e080b1e9 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114500 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brask: modify adc and sensor nameZhuohao Lee2021-08-252-45/+39
| | | | | | | | | | | | | | | This patch modifies the adc and sensor name according to the brask rev0818 schematics. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: I3cab36d79041dd203fe9c31994ac99795afd384e Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114499 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brask: modify gpio.inc and i2c.cZhuohao Lee2021-08-255-75/+135
| | | | | | | | | | | | | | | This patch modifies the gpio.in and i2c.c based on the brask rev0818 schematics. Since pins' name are changed, the board.c and usbc_config.c are changed to avoid the build error. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: If20fccac4543611bbcea067abbf91638ac4d66b3 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114498 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brask: remove unnecessary configurationZhuohao Lee2021-08-2522-1255/+70
| | | | | | | | | | | | | | | | | | | | | This patch removes the configuration for the battery, charger, fan control, board id, keyboard, keyboard backlight, sensor, hibernate and led. In order to make the build pass, the CONFIG_ADC, CONFIG_POWER_BUTTON_IGNORE_LID and CONFIG_POWER_BUTTON_INIT_IDLE are added to the board.h/baseboard.h. In additional, the function board_set_active_charge_port() and board_set_charge_limit() are added to the board.c to avoid build error. BUG=b:191637086 BRANCH=None TEST=make BOARD=brask Change-Id: I15c01820dbd2f58f5722c87de51ebf425ffca13a Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114497 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Brask: Initial the baseboard and boardZhuohao Lee2021-08-2526-0/+2833
| | | | | | | | | | | | | | | | | | | | The baseboard/brask and board/brask are copied from the brya. Two difference are make: 1. change BASEBOARD to brask in the build.mk to point to the brask. 2. move the generated-gpio.inc to the gpio.inc BUG=b:191637086 BRANCH=None TEST=Build passed with: 1.make BOARD=brask 2.make buildall Change-Id: I57439cffa770b3e838f372f60ed1670ac0b435d8 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115806 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Homestar: Distinguish PS8755 with hidden registerxuxinxiong2021-08-253-0/+30
| | | | | | | | | | | | | | | | | | When TCPC PS8755 is upgraded to PS8805 firmware, the product id cannot distinguish whether the chip is PS8755 or PS8805. Only the hidden register value of PS8755 is 0x80, so use this hidden register to distinguish whether it is PS8755. BRANCH=trogdor BUG=b:196889096 TEST=emerge-strongbad chromeos-ec Change-Id: I99b50dfb2f5ae47c3d4dbb3334dcdae20c281478 Signed-off-by: xuxinxiong <xuxinxiong@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113261 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* primus: fix Sunwoda battery device namestabilize-14178.B-mainScott Chao2021-08-251-1/+1
| | | | | | | | | | | | | | | After receive correct battery and correct the device name. BUG=b:195568649 BRANCH=none TEST=make -j BOARD=primus TEST=ectool batterycutoff works Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ia36998864614dfb00ec9947ea2d5d08bd4167717 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115691 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* driblee: Rename the thermistors 2 namesMatt_Wang2021-08-241-1/+1
| | | | | | | | | | | | | | | Modify the thermistors 2 names to the charger. BUG=b:196922071 BRANCH=keeby TEST=make BOARD=driblee Signed-off-by: Matt_Wang <Matt_Wang@compal.corp-partner.google.com> Change-Id: Idf83f9658d21ddf9613869c00f18ff136e497db6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115037 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* ec: Run tests in normal and coverage modeJeremy Bettis2021-08-241-7/+6
| | | | | | | | | | | | | | | | As tests behave differently with coverage enabled, run the tests both with and without coverage in the CQ. BUG=None TEST=./zephyr/firmware_builder.py --metrics=/tmp/metrics test ; echo $? BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I8188542ceaf3974f9debd8b574895313941a75e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115430 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* moonbuggy: Update moonbuggy definitionsRehan Ghori2021-08-247-0/+1450
| | | | | | | | | | | | | | | | These EC files are copied over from firmware-puff-13324.B branch and modified for tot. BRANCH=None BUG=b:191356135 TEST=None Change-Id: I85e17a6d3d70f573e9264f2a6f2afd3d1999785e Signed-off-by: Rehan Ghori <rehang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114512 Reviewed-by: Matthew Ziegelbaum <ziegs@chromium.org> Commit-Queue: Rehan Ghori <rehang@chromium.org> Tested-by: Rehan Ghori <rehang@chromium.org>
* zmake: Fix zmake coverageJeremy Bettis2021-08-241-0/+15
| | | | | | | | | | | | | | | | zmake build was changed to generate ec_version.h, update zmake coverage to do the same. BUG=None TEST=zmake coverage BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ib65f862843617a3ee64d0e68b2b9e204afc85787 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115429 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* gooey: Add gpio EC_CBI_WParthur.lin2021-08-241-2/+1
| | | | | | | | | | | | | | This patch assign gpio EC_CBI_WP to GPH5. BRANCH=keeby BUG=b:197293788 TEST=make buildall -j Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: I8ce111b5dc3ee7309ee011cd095949bc6ed31be0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113254 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Corori: modified power and battery LED behaviorJosh Tsai2021-08-243-29/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Battery control for Corori Power LED System S0: White. System S0ix: Blinking White. (1 sec on, 3 sec off) System S5/G3: Off. Battery LED DC mode: System S0: Off. System S5/G3: Off. AC mode: Charging(0%-94%): Amber. Full charged: White. Battery low (OS 0%-10%) System S0: Blinking Amber (1 sec on, 3 sec off) System S0ix: Blinking White (1 sec on, 3 sec off) System S5/G3: Off Battery error System S0: Blinking Amber (1 sec on, 1 sec off) System S0ix: Blinking White (1 sec on, 3 sec off) System S5/G3: Off BUG=b:196723817 BRANCH=keeby TEST=make BOARD=corori, test on keeby MB Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: Iab747e29c85354cabb43759bfc7181717ea2ffe8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098123 Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* ec: Fix returning uninitialized varsJeremy Bettis2021-08-241-3/+3
| | | | | | | | | | | | | | | | | | | | And just to make it clearer, don't return ret at the bottom of a if all other cases already do if (ret) return ret; As it turns out, building with coverage doesn't initialize vars to 0. BUG=None TEST=zmake coverage. BRANCH=none Change-Id: Iae5368673517724fd23cb01425c027db9a50644b Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115428 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* Corori: Disable motionsensorMatt_Wang2021-08-244-297/+1
| | | | | | | | | | | | | | | | | Corori only have 180 SKU so remove the motionsensor code. BUG=b:197187330 BRANCH=keeby TEST=make BOARD=corori Signed-off-by: Matt_Wang <Matt_Wang@compal.corp-partner.google.com> Change-Id: I1983b2a6a6ea95069a426c33e01246d293cc20b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113257 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* driblee: Remove GPIO43 of ADC Alternate functionMatt_Wang2021-08-243-40/+2
| | | | | | | | | | | | | | | | | Remove GPIO43 of ADC Alternate function and set Input and Internal pull up. BUG=b:196922068 BRANCH=keeby TEST=make BOARD=driblee Signed-off-by: Matt_Wang <Matt_Wang@compal.corp-partner.google.com> Change-Id: I915342d8f40aeed68c24885992e5a88f42e7deef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3099390 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* pazquel: Detect the Refresh key at row 3Tang Qijun2021-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Pazquel uses the Vivaldi keyboard. The Refresh key is at T2 (col:2, row:3), instead of T3 (col:2, row:2). The code filters out the Refresh key and check any boot key remaining. BRANCH=trogdor BUG=b:194553244 TEST=Pressed Refresh (T2) at boot. And could find the log: "KB boot key mask". Without this change, pressing T2 at boot wouldn't trigger check_key_list() and spit "KB boot key mask" log. Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: I594cac4f0f63dc3f138a5811c187d1e335c3ecfd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113250 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* brya: moving buttons and switches to use MKBPBoris Mittelberg2021-08-241-0/+1
| | | | | | | | | | | | | | | | Switching config option to route buttons and switches over MKBP instead of 8042 driver BRANCH=main BUG=b:170966461 TEST=manual tested on Brya: volume keys and tablet mode Cq-Depend: chromium:3097939 Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ifc45a040565dcd248de0d1cabe853550cc10bf38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098574 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Rob Barnes <robbarnes@google.com>
* zephyr: herobrine_npcx9: Enable PSL and define psl-in-pads bindingWai-Hong Tam2021-08-242-0/+29
| | | | | | | | | | | | | | | | | | | | | | Enable the PSL mode for EC hibernate and define psl-in-pads DT binding. After EC enters hibernate, the PSL_OUT is off and the PPC chip is powered off. So the PPC chip can be woken up from the dead battery mode when the external AC is plugged. The DT binding is defined in the project DT. It enables the board DT more shareable, no custom-board configuration. BRANCH=None BUG=b:193583152, b:196405396 TEST=Entered EC hibernate, verified the following wake sources: * plugging AC, * pressing power button, * lid open (servo emulated). Change-Id: Ibe12d6ec45980cd41a306ad01f39e45456f3bcdd Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115437 Reviewed-by: Keith Short <keithshort@chromium.org>
* herobrine_npcx9: Enable PSL hibernate and define the PMU moduleWai-Hong Tam2021-08-242-2/+7
| | | | | | | | | | | | | | | | | Enable the PSL mode for EC hibernate and define the PMU module. After EC enters hibernate, the PSL_OUT is off and the PPC chip is powered off. So the PPC chip can be woken up from the dead battery mode when the external AC is plugged. BRANCH=None BUG=b:193583152, b:196405396 TEST=Entered EC hibernate, plugging AC can wake EC up. Change-Id: I976d7fa7b7dfa57ee8e79501d5973710ef2192e7 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115436 Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* usb_prl_sm: reduce i2c transactions in FRS pathTing Shen2021-08-241-4/+12
| | | | | | | | | | | | | | | | | | | | The get_cc function call is slow (2 i2c transactions in tcpci implementation) and redundant in FRS path. Use short-circuiting to remove the function call. This saves ~2ms on Cherry. BUG=b:190348051 TEST=Combined with other CLs in the chain, verify FRS workable on Tomato BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I4161bc3a5ba17eb4983d85dd78465c2e623f46dc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3109707 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* mt6360: Don't clear negative number supplier's charge port infoDino Li2021-08-241-1/+3
| | | | | | | | | | | | | | | Because we didn't create space for it to store current/voltage info. Clear its charge port info will override other global variables. BRANCH=asurada BUG=b:179206540 TEST=No panic on asurada when plug AC only on port 0. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Ia7a9a058d65aca9b5a84963d1e08f3e2541bc8da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113487 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* helios: gyro sensor add 2nd source icm40608Michael5 Chen12021-08-243-1/+100
| | | | | | | | | | | | | | | | gyro sensor add 2nd source icm-40608 BUG=b:196286603 BRANCH=hatch TEST=make BAORD=helios Using command "watch ectool motionsense lid_angle". Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I06c1ea21b353959f07dd16a3732d23c638d031bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3089086 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* gimble: fix port1 i2c settingScott Chao2021-08-241-10/+2
| | | | | | | | | | | | | | PPC, BC1.2, TCPC are all using same i2c bus. BUG=b:197200924 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I1468e6aca0deea1e4783ebcc2af1b52f22dd93b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3106906 Commit-Queue: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* dewatt: Initial EC imageBhanu Prakash Maiya2021-08-2410-0/+802
| | | | | | | | | | | | | | | | | | Create the initial EC image for the dewatt variant by copying the guybrush reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:196460993 BRANCH=None TEST=make BOARD=dewatt Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Change-Id: Ie4c683e10f15054c137784547aa535932ca77800 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114048 Commit-Queue: Rob Barnes <robbarnes@google.com> Reviewed-by: Rob Barnes <robbarnes@google.com>
* kano: change lid accel and base accel/gyroDavid Huang2021-08-234-44/+44
| | | | | | | | | | | | | | | Change Lid accel to kx022 and base accel/gyro to icm40608. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I034c2da62d1671294b4ce81536a0254a67c63240 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098118 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* Chronicler: Organize source codeYu-An Chen2021-08-231-22/+19
| | | | | | | | | | | | | | | | Add a comment for signal setting function Declared const variables for the port and address BUG=none BRANCH=volteer TEST=Check USB-C1 port working. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I3fd4d38195ec2714a1cea6af2fcda525f1c4cf51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3102342 Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* kano: Change C0 BBR FW addressDavid Huang2021-08-231-1/+1
| | | | | | | | | | | | | | Change C0 BBR FW address to 0x54. BUG=b:194020542 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I959b684bd6a879ee894052200bd6f81cdbbee38f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113488 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* Chronicler: Update thermal policyYu-An Chen2021-08-232-5/+83
| | | | | | | | | | | | | | | | | Change thermal policy as below: 1. Modify fan policy to nonlinear control 2. Add 5 sec sampling time to smooth fan speed BUG=b:190087114 BRANCH=volteer TEST=Thermal team verified thermal policy is expected. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I10ba0bd6d0f5f27baea84ebd4dd2d5ae3482fbf1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023816 Reviewed-by: Isaac Lee <isaaclee@google.com> Commit-Queue: Isaac Lee <isaaclee@google.com>
* riscv: panic: S0/S1 are clobbered registers in software_panic()Dino Li2021-08-231-2/+2
| | | | | | | | | | | | | | | | So compiler won't use these two registers to store any other value in the function. This fixed software panic info isn't correct issue when LTO is enabled. BRANCH=asurada BUG=b:179206540 TEST=Run "crash assert" on hayato, the software panic info is correct. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I4a94e7ea94ebc0bf4f056de58edb66c2962d669d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3113485 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* kano: remove unused adc channelDavid Huang2021-08-233-9/+0
| | | | | | | | | | | | | Remove unused adc channel. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I9174073cbaffd7aef51876eede57bfa20bed7b28 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098120 Reviewed-by: caveh jalali <caveh@chromium.org>
* kano: remove unused pwmDavid Huang2021-08-234-25/+1
| | | | | | | | | | | | | Remove unused pwm channel. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I41cbeff677c391d0ec976e63a2d3081eeedc1088 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098119 Reviewed-by: caveh jalali <caveh@chromium.org>
* kano: Change C0/C1 TCPM to RT1715David Huang2021-08-234-119/+34
| | | | | | | | | | | | | | | C0/C1 TCPM change to RT1715. Remove ioexpand function and db type function. C1 support BB retimer. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I278779dcd791fa5d2e2ccf85cdc4a8dbbfca2d8c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098122 Reviewed-by: caveh jalali <caveh@chromium.org>
* kano: remove usb port C2 and board ID 1 related functionDavid Huang2021-08-236-214/+9
| | | | | | | | | | | | | Remove usb port C2 and board ID 1 related function. BUG=b:192370253 BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Ie051e44424bdf9e1de6d1b13afddea10ef85ff3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098121 Reviewed-by: caveh jalali <caveh@chromium.org>
* gimble: configure the PPVAR_SYS depend on AC or AC+batteryWill Tsai2021-08-231-0/+12
| | | | | | | | | | | | | | set to 9.2 V if battery is present. set to 13.2 V if battery is not present. BUG=b:196184163 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I538a9b544cdc746d7e447e7eb3162cf2a69657cf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3099295 Reviewed-by: caveh jalali <caveh@chromium.org>
* Revert "TCPMv2: Fix LPM for non-dual role auto toggle chips"Tommy Chung2021-08-221-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 55f40b89d7f7b6cc3005e0d6fa755345d514a578. Reason for revert: type-C port with IT83XX can not detect plugged in device since the dual role CC1/CC2 voltages keep at 3V other than toggling for device. Original change's description: > TCPMv2: Fix LPM for non-dual role auto toggle chips > > If the "dual role" is enabled and the TCPC chip does not support > "Dual role auto toggle mode" then the PD state remains in > PD_DRP_TOGGLE_ON state in active state of the AP. Hence check for CC > line open state to decide to enter low power mode for such devices. > > BUG=b:195406641 > BRANCH=none > TEST=Tested on ADL RVP, FUSB302 & IT83XX can enter LPM > > pd 0 state > Port C0 CC1, Disable - Role: SRC-UFP TC State: LowPowerMode, > Flags: 0x0010 PE State: , Flags: 0x0001 > > Change-Id: Ic70c6bfcd2ffd0721fdcaf6e61c68736971e037b > Signed-off-by: Poornima Tom <poornima.tom@intel.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088161 > Tested-by: Vijay Hiremath <vijay.p.hiremath@intel.com> > Reviewed-by: Abe Levkoy <alevkoy@chromium.org> > Commit-Queue: Vijay Hiremath <vijay.p.hiremath@intel.com> Bug: b:195406641 Change-Id: I9a2deed330b0169be220e9b0a83125eb6a6e0faa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3109275 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
* common: Add Milli Kelvin conversion macrosRob Barnes2021-08-215-3/+65
| | | | | | | | | | | | | | Add macros to convert to and from milli kelvin and various temperature units. Utilize round_divide for more accurate conversions. BUG=b:176994331 TEST=Unit test BRANCH=None Change-Id: Ie6750b9d2d2b8093fdf9c14f904382e91d8d95bb Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078051 Reviewed-by: Keith Short <keithshort@chromium.org>
* juniper: Free up flash spaceRob Barnes2021-08-211-0/+4
| | | | | | | | | | | | | | | Make debug asserts brief. Lower PD debug level to 2. This matches a pattern used by other boards. BUG=None TEST=Free RO space went from 540 to 1628 BRANCH=None Change-Id: I7dcab46f912e913d18ee86cd9979e52d39be073f Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111306 Reviewed-by: Keith Short <keithshort@chromium.org>
* driver: bmi3xx: Fix perform calibrationBhanu Prakash Maiya2021-08-212-16/+62
| | | | | | | | | | | | | | | | BRANCH=none BUG=b:193869438 TEST=Accel implementation tested on Guybrush $ ectool motionsense calibrate 1 Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org> Signed-off-by: Latchiamaran Senram <latchiamaran.senram@bosch.corp-partner.google.com> Change-Id: Ib52f5a70137a135b8be68115c705f004f932b3b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3036651 Tested-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Auto-Submit: Bhanu Prakash Maiya <bhanumaiya@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com> Reviewed-by: Rob Barnes <robbarnes@google.com>
* zephyr: zmake: drop getversion.sh script from coverage reportJack Rosenthal2021-08-201-20/+1
| | | | | | | | | | | | | | | We don't use getversion.sh for our version strings, and this is purely for informational purposes only, so just delete it. BUG=b:184832251 BRANCH=none TEST=unit tests Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I479c25e4b2cc675cd24d173e56cc505c7e29f1ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111229 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>