summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Pazquel: Mask proper key locations on the board levelTang Qijun2021-08-201-6/+8
| | | | | | | | | | | | | | | | | | Because the matrix actual_key_mask isn’t correct, launcher key has no function. The key actual is mapped to (KSI_3,KSO_0) in matrix, so we change actual_key_mask[0] from 0x14 to 0x1c. And we have verified launcher key function. Because T11 key is not in keyboard, we change actual_key_mask[1] from 0xff to 0xfe. BRANCH=trogdor BUG=b:196325454 TEST=login system and then press launch key, the launch function is ok Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: Ib16cc6cac121daea37b3cf4ca9eec2f8fd98d05f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090506 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* Reland "zephyr: pull in the version string from zmake"Jack Rosenthal2021-08-207-27/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 93adb802c1a626fbb73d762124e90be4fee08a8b. This commit was reverted due to build failures with the chromeos-zephyr ebuild. The root cause of the build failures was that the ebuild uses different working directories between the configure and build phases, and so the path to the include directory we generate during the configure phase won't work in the build phase. Use the full path here so that we can run the diffrerent phases in different working directories. Diff from original commit: Change-Id: Idcbd0c0546f9fcb12fcd66c617e024b8aa2a893a > --- a/zephyr/zmake/zmake/zmake.py > +++ b/zephyr/zmake/zmake/zmake.py > @@ -235,7 +235,7 @@ class Zmake: > self.logger.info("Clearing old build directory %s", build_dir) > shutil.rmtree(build_dir) > > - generated_include_dir = build_dir / "include" > + generated_include_dir = (build_dir / "include").resolve() > base_config = zmake.build_config.BuildConfig( > environ_defs={"ZEPHYR_BASE": str(zephyr_base), "PATH": "/usr/bin"}, > cmake_defs={ BUG=b:197287679 BRANCH=none TEST=emerge-volteer chromeos-zephyr Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I80cec7a1622edcecc670b7dbeed56dadcdf71555 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3111305 Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* Revert "zephyr: pull in the version string from zmake"Rob Barnes2021-08-207-180/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 10809eb023d475681b45863e68d906fae4667eda. Reason for revert: Causing build errors b/197287679 Original change's description: > zephyr: pull in the version string from zmake > > Zmake computes a version string and stores it in FRID/FWID, but this > was never plumbed all the way out into the version functionality in > the OS, which was reporting the version generated by > util/getversion.sh. > > Add a mechanism to generate the version header from zmake and replace > the getversion.sh generation with that. > > BUG=b:184832251 > BRANCH=none > TEST=provided unit tests > TEST=get this version string on posix-ec: > posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095 > 2021-08-18 14:10:18 jrosenth@germania > > Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> > Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625 > Reviewed-by: Denis Brockus <dbrockus@chromium.org> Bug: b:184832251 Change-Id: Ifcc4830e3097c8dc8126bb76adfeb3ce75a7a667 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110293 Auto-Submit: Rob Barnes <robbarnes@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
* system: fix system_get_scratchpad APIYuval Peress2021-08-2017-58/+86
| | | | | | | | | | | | | | | The current API for system_get_scratchpad mixes the status and the value being read. Update the signature to allow both. BRANCH=none BUG=b:195481980 TEST=make testall && zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I3a5f5ad523d507c53a5d474806f58afafb82e70c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3074828 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* hayato: Fix gyro sensor rotation mistakeMichael5 Chen12021-08-201-10/+12
| | | | | | | | | | | | | | | Because rotation matrix will be overwritten by function "update_rotation_matrix" when AP SW SYNC. Modify update_rotation_matrix condition to fix it. BUG=b:193752214 BRANCH=asurada TEST=Run "watch ectool motionsense lid_angle" Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Ia39265ed7acc1f3cb2cbd2fa3971a8dc65362779 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3106633 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Corori: Implement new battery parametersearlwang2021-08-202-79/+20
| | | | | | | | | | | | | | | | | Crori support C21N2018 new battery. This patch makes EC configure battery parameters differently based on battery name. BUG=b:196506846 BRANCH=keeby TEST=make -j BOARD=corori Signed-off-by: earlwang <earl_wang@compal.corp-partner.google.com> Change-Id: I4495cfcd4ba018f8934bdd651d0e776dcb4cc12e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098115 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: Initialize the vivaldi keyboardjohnwc_yeh2021-08-202-27/+3
| | | | | | | | | | | | | | | | Initialize vivaldi keyboard. BUG=b:195810621 BRANCH=keeby TEST=make BOARD=driblee Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: If6041bb6a35b35cb8ce5750c1047d23a6978bad1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3099385 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>
* driver: bmi260: integrate body detectionGwendal Grignou2021-08-201-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Body detection is accelerometer agnostics. It was added in BMI260, but not finalized. Add list_activity function to enable/disable body detection. BRANCH=volteer BUG=b:195908820 TEST=Check cros-ec-activity is loaded. Enable proximity event: echo 1 > events/in_proximity_change_either_en Load iio_event_monitor, check we get events when moving device on lap to floor: Event: time: 925239910373, type: proximity, channel: 0, evtype: change, direction: falling Event: time: 945020001791, type: proximity, channel: 0, evtype: change, direction: rising ... Change-Id: I423c7044761d2addac36d435781ea19c1f1b18ed Signed-off-by: Gwendal Grignou <gwendal@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3097151 Tested-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Ching-Kang Yen <chingkang@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
* spherion: enable USMEric Yilun Lin2021-08-202-1/+13
| | | | | | | | | | | | | | | | | | Ultrasonic Module(USM) is used for noise cancelling the buzzing sound while charging. The sound is louder if we have USB peripheral connected. We only enable this function in S0, and disable it in S3 because the power consumption is significant. BUG=b:185978753 TEST=make buildall BRANCH=asurada Change-Id: Ic2bfbf5a1364f5da6d776a1be56abb66934f9496 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105905 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* Mrbland: set TCPC product id as PS8805Siyu Qin2021-08-201-5/+1
| | | | | | | | | | | | | | | | Mrbland will only support TCPC PS8805, set the product id to PS8805 directly, following homestar. BRANCH=trogdor BUG=b:194737342 TEST=emerge-strongbad chromeos-ec Change-Id: I95a0dffb03d3448ba8f94ed27a96f4ec09ce586c Signed-off-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090507 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* Mrbland: Remove GMR_TABLET_MODE DEFINESiyu Qin2021-08-201-3/+0
| | | | | | | | | | | | | | | Mrbland has no GMR sensor for 360 tablet mode when keyboard attached, following homestar. BRANCH=Trogdor BUG=b:193475186 TEST=make -j BOARD=mrbland Change-Id: I1a449ab02c6b874b877efcef1f695ff6a4ec45b4 Signed-off-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090505 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Mrbland: Remove CONFIG_DEVICE_EVENT DEFINESiyu Qin2021-08-201-1/+0
| | | | | | | | | | | | | | Follow homestar, mrbland doesn't have WLC and doesn't need it. BRANCH=trogdor BUG=None TEST=make BOARD=mrbland Signed-off-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Change-Id: Ia6d30344219b44df3f4e5aa3c5d4ae760c577edd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3090228 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* corori: Removed USB-A port 1 configurationMatt_Wang2021-08-203-18/+12
| | | | | | | | | | | | | | | | | Due to corori only support a USB-A port 0, so remove the USB-A port 1 configuration in board layer. BUG=b:197173555 BRANCH=keeby TEST=make BOARD=corori Signed-off-by: Matt_Wang <Matt_Wang@compal.corp-partner.google.com> Change-Id: I4fed93d7780a18ec627da7ef7e1935fdce240fa2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105921 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Commit-Queue: 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>
* nipperkin: add battery supportZick Wei2021-08-202-71/+35
| | | | | | | | | | | | | | This patch add Cosmx and Simplo battery on nipperkin. BUG=b:196748143 BRANCH=none TEST=make BOARD=nipperkin Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I45718d0cab4527651e0369e3c6396b134c01dd4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3097245 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Rob Barnes <robbarnes@google.com>
* bugzzy : modify ECYongBeum.Ha2021-08-205-202/+399
| | | | | | | | | | | | | | Modify EC for buggzy based on schemetics. BUG=b:192521391,b:194554146 BRANCH=None TEST=make -j BOARD=bugzzy Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: Ia0dad01f71c9a3db671427aadde286d18b2c1677 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068484 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* mchp: Support RPM-PWM Fan controlmartin yan2021-08-202-4/+15
| | | | | | | | | | | | | | | | | | | Support RPM based Fan Control Algorithm via RPM-PWM hardware block BUG=none BRANCH=none TEST=Tested on ADL RVP and MCHP1727 MECC system via UART console faninfo, fanduty and fanset 1: Verify fan RPM from 3000 to 9000; 2: Verify 2-pole fan expected tach output (100Hz~300Hz) per RPM setting; 3: Verify expected PWM duty (3%~100%) per PWM duty setting; 4: Limit: can not reach 10000 RPM since RPM reaches 9000 in max as PWM duty is set as 100%; Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: Ib41a06a734821c9f70a45e25e2020c6492c61563 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3100926 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>