summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* driver/fingerprint: Clarify FPC 1145 hardware IDTom Hughes2020-03-091-1/+7
| | | | | | | | | | | | | BRANCH=none BUG=b:150407388 TEST=make buildall -j Change-Id: Id0e7b42affcabf90c94334603a40b87cbc9543a8 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2092913 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Andrey Perminov <andrey.perminov@fingerprints.com> Reviewed-by: Craig Hesling <hesling@chromium.org>
* c2d2: add vref detection console commandJett Rink2020-03-091-1/+15
| | | | | | | | | | | | | | | In order to support plugging in DUT power after running flash_ec, we need a way to poll for H1 Vref on DUT. BRANCH=servo BUG=b:150796623 TEST=flash_ec waits until power in inserted Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Ie597a6de06a35f48a93ac1615eebd2ef259ed341 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2090084 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* damu: add initial led supportScott Chao2020-03-094-1/+113
| | | | | | | | | | | | | | | Enable battery and power LED. Note: LED settings will be fine tune after we receive board. BUG=b:147163799, b:147192374 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I012abd5f4b745015e5265abfa215cf4d1c092e81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087436 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* bq25710: Do not soft reset when running out of RW imageScott Collyer2020-03-091-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | The bq25710 does not have a reset pin and therefore it's only following a power on reset that its registers are reset. The driver's init function executes a soft reset of the bq25710 to ensure that register settings following either an EC reboot or power on reset are the same. However, this is happening when the EC is in RO or RW, and there is no need to do this in RW. This CL adds a check around the soft reset so that it's only done in R0. BUG=b:148189096 BRANCH=firmware-hatch-12672.B TEST=Verified that low power mode no longer gets reenabled following the jump to RW. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I78a7484d3e44147cf350b785889f0f913b03bd06 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2092213 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* damu: update battery parameterScott Chao2020-03-092-41/+13
| | | | | | | | | | | | | | | | | Update battery parameter. - Modified Manufacturer Name and Device Name. - Read the data from reg. SBS_PackStatus_ACCESS (0x99), Bit-3:XDSG, Bit-2:XCHG. When XDSG and XCHG=1, MOSFET is off. BUG=b:150833879 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: If066a17c069e6652fee081060e37b9dfafb6ad20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2089211 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* TCPMv2: Don't interpret the CMD_DP_STATUS request as its response.Sam McNally2020-03-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | When a CMD_DP_STATUS response is received, both pe_vdm_acked_entry() and pe_do_port_discovery_run() invoke dfp_consume_attention(). However, pe_do_port_discovery_run() passes the message request after pe_vdm_acked_entry() invokes it correctly, overwriting the capabilities, resulting in only DP being enabled. Remove the additional call to dfp_consume_attention(). Similarly, when a CMD_DP_CONFIG response is received, both functions invoke post_config(). No arguments are passed so this is just unnecessary rather than harmful. Clean up the additional call here too. BUG=b:150652876 TEST=Puff with TCPMv2 enabled enables both HDMI and USB 3.0 for a dock with HDMI and 3.0. BRANCH=none Change-Id: I3ef89e63f6b930b7cf7c7fa694cacf99ae47d053 Signed-off-by: Sam McNally <sammc@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2038550 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Tested-by: Peter Marheine <pmarheine@chromium.org>
* util: Add script to update release branch from masterTom Hughes2020-03-071-0/+95
| | | | | | | | | | | | | | | Currently this script is specific to the fingerprint release branch process, but can be easily generalized to other ECs. See http://go/cros-fingerprint-firmware-branching-and-signing. BRANCH=none BUG=none TEST=./util/update_release_branch.sh Change-Id: I66087190754c789387a6537b69a026c81f93ead0 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2088602 Reviewed-by: Craig Hesling <hesling@chromium.org>
* ec_commands.h: add info_4 in sensor request structureGwendal Grignou2020-03-073-3/+3
| | | | | | | | | | | | | Fixes: 267da3cfc ("common: Add feature flag for online calibration") BUG=chromium:1023858 TEST=compile BRANCH=none Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I7e7784e509062f28c8dc12d52fe8daed2ab73b23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2084398 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Revert "Ampton: Set the PS8751 to source mode before enter low power mode"Matthew Blecker2020-03-077-39/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4ca73139635261ee1273fbe1767dcf06886d2208. Reason for revert: Breaks CCD with AP off https://issuetracker.google.com/150822168 Will work on a solution to address the original CL need, i.e. applying Rp in LPM. Follow the above bug. Some merge conflict happens. Resolved. Also change the usb_mux driver of Trogdor, as ps8xxx_usb_mux_driver is removed. Original change's description: > Ampton: Set the PS8751 to source mode before enter low power mode > > BUG=b:113830171 > BRANCH=octopus > TEST=check the power consumption is lower > > Change-Id: I527cdc5d1e4dd5de137ab0927e66c171696758ce > Signed-off-by: James_Chao <james_chao@asus.corp-partner.google.com> > Reviewed-on: https://chromium-review.googlesource.com/1426306 > Commit-Ready: James Chao <james_chao@asus.corp-partner.google.com> > Tested-by: James Chao <james_chao@asus.corp-partner.google.com> > Reviewed-by: Jett Rink <jettrink@chromium.org> BRANCH=None BUG=b:113830171,150822168 TEST=Build Trogdor, verified CCD with AP off working. Change-Id: I58c26e8466b70e035a1c396cfcba6a46da4bccc9 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2091519 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* TCPMv2: Probe cable identity from Ready statesDiana Z2020-03-061-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cable identity may be probed from the SRC_Ready and SNK_Ready states when a port is: - Vconn source - DFP (for PD 2.0) This change adds probing to the ready states in these conditions. Additionally, it down-revs the cable revision when sinking and the port partner is PD 2.0. BRANCH=None BUG=b:148834626 TEST=On kindred, verified: 1. When sourcing: a. partner with no e-marker is probed no more than 20 times between discovery probing and ready b. cable which was not probed in discovery is probed in ready 2. When sinking: a. no probing when partner does not allow us to Vconn source b. probing takes place once chromebook is DFP/Vconn source with PD 2.0 partner Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I27da70e324d617ad4d30285554a8cd3c0e5db3e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2084013 Reviewed-by: Jett Rink <jettrink@chromium.org>
* TCPMv2: Probe cable identity in PE_SRC_DiscoveryDiana Z2020-03-062-39/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds probing of the cable identity during startup as a source. There is no timing requirement for message spacing when sent from discovery, but this change starts with DiscoverIdentityTimer spacing to avoid spamming the cable too quickly. This can be tuned later if desired. When the port partner is running PD 2.0, the communications with the cable must also use PD 2.0. Otherwise, communications may be whatever revision the cable responds with. This change also corrects the tVDMBusy timer, which is 50 ms in both the PD 2.0 and PD 3.0 specs, and only clears discovery information when not power swapping. BUG=b:148834626 BRANCH=None TEST=on kindred, confirmed: 1. cable was probed during startup on connection as source a. cable probing stopped after an ACK b. cable probing did not continue past 20 messages with no GoodCRC 2. cable was note probed during startup as sink (charger connected) Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I65979f30d26ad8a37f507994a24ddc86c5cb41ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2084012 Reviewed-by: Jett Rink <jettrink@chromium.org>
* ccd_howtos: add test_that commandMary Ruthven2020-03-061-1/+9
| | | | | | | | | | | | | Add a test_that command to show how we run tests locally. BUG=none BRANCH=none TEST=none Change-Id: I04d1a5d96c03b1cdceff6677e64893498837ea88 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2092202 Reviewed-by: Shelley Chen <shchen@chromium.org>
* nuwani: Add new grunt-family board.Peichao Wang2020-03-068-0/+750
| | | | | | | | | | | | | | | | Add nuwani board. Initially base on treeya. BUG=b:150799568 BRANCH=none TEST=emerge-grunt chromeos-ec Ensure that ec.bin are created Change-Id: I2eb264dbd96aa7cda10b1d8e20fc0e67bc195254 Signed-off-by: xiaoqiang.zhu <xiaoqiang.zhu@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087435 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Martin Roth <martinroth@google.com> Tested-by: Martin Roth <martinroth@google.com>
* dalboz: add FSUSB42UMX driverPaul Ma2020-03-061-0/+36
| | | | | | | | | | | | | | | Add FSUSB42UMX support. This chip is used as SBU mux of usb c0 port. BUG=b:150398913 BRANCH=none TEST=build dalboz ec successfully. Change-Id: Ibd58c252b7e1256891df0626a0a7fb5292a9da84 Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2089213 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* asurada: initial board commitTing Shen2020-03-066-0/+280
| | | | | | | | | | | | | | | | | | | | Minimal set of code that is compilable and let people starts working on the board. Configs are disabled to make this CL smaller. Will add back in subsequent CLs. BUG=b:150341271 TEST=make BOARD=asurada BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I10cc4bebf0c30b7b5e05a73cf28cd596b64f1937 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2088825 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* driver/tcpm: fix incorrect pd message enum namesTing Shen2020-03-062-4/+4
| | | | | | | | | | | | | | | | CL:2001938 renamed SOPP/SOPPP to SOP_PRIME/SOP_PRIME_PRIME, but didn't change some affected code. This CL fixes the incorrect names. BUG=none TEST=`make BOARD=kappa` with TCPMV2 enabled BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I91526f5552a188e01338b72bc47125fb12ff53b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2088826 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* c2d2: update AP/AUX I2C to correct alternate funcJett Rink2020-03-061-1/+1
| | | | | | | | | | | | | | Fix copy and paste error, the I2C2 pins are alternate function 1 instead of 2. BRANCH=servo BUG=b:147381671 TEST=`i2cscan 1` on C2D2 console shows i2c CLK and SDA traffic Change-Id: I2739be429bc0924814ca6124f74132062e7bda1b Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2090083 Reviewed-by: David Schneider <dnschneid@chromium.org>
* nb7v904m: Fix bug with CHIP_EN polarityAseda Aboagye2020-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | The driver's set_low_power_mode() function had its logic inversed. If we want to enable low power mode, we need to clear the CHIP_EN bit. BUG=b:150822611,b:150875209 BRANCH=None TEST=Flash waddledoo with an AP FW that has the fixed VBT, flash the EC with an image that contains this patch, verify that external displays over USB-C are working and that hot plugging the displays are working as well. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Idc3c4d663365d0898b3e7c869b9c6e2dd088fa78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2090082 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* ec_commands.h: Minor changes to integrate with cros_ec_commands.hGwendal Grignou2020-03-052-4/+15
| | | | | | | | | | | | | | | - Update license - Extend #ifdef to remove code not needed by the kernel. BUG=chromium:945948 BRANCH=none TEST=compile. Check changes with linux-next/master cros_ec_commands.h. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: If0d5a49498a17a24ad7fae6e6bab9b7378374067 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2084024 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* foob : Add new battery informationxiaoqiang.zhu2020-03-052-0/+29
| | | | | | | | | | | | | | | | | | | foob need support new battery --AEC:bq40z50-R3 This CL add to support the AEC battery BUG=b:150802756 BRANCH=master TEST=boot foob board with new battery, charging/discharging/cutoff work as expected. Signed-off-by: xiaoqiang.zhu <xiaoqiang.zhu@bitland.corp-partner.google.com> Change-Id: I38b201c0464f4256236d8ce10e5643fd3059410a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087437 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* driver/tcpm/it8xxx2: fix incorrect function prototypeTing Shen2020-03-051-2/+6
| | | | | | | | | | | | | | | | Update prototype based on the tcpm_drv definition change in CL:1967932. BUG=none TEST=Verify this compiles with a WIP asurada board BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ib4640ad0d44261c431f6182352012465955e1b31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087099 Reviewed-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Dood: Modify battery LED behavior and color labelYu-An Chen2020-03-053-18/+18
| | | | | | | | | | | | | | | | | | | Modify battery LED behavior to 1 sec ON 3 sec OFF when battery error. Modify the color of the LED from blue to white. BUG=b:150180166 BRANCH=octopus TEST=Manual check battery LED behavior under battery error. LED colors is correct after changes. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Id165df02500093ce69a9ddacf7eea641c49f1369 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087432 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* pcal6408: add ioexpander driverPaul Ma2020-03-054-0/+400
| | | | | | | | | | | | | | | | Add NXP PCAL6408 io expander support. BUG=b:150385481 BRANCH=none TEST=Change dalboz board specific files and verify hdmi hpd status can be detected correctly. Other gpios can be initialized and can input or output correct value by console commands ioexget and ioexset. Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Change-Id: I94c63149bac4ecbac4078abfe375d3009c944079 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082299 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Ezkinil: Add battery informationSue2020-03-052-1/+29
| | | | | | | | | | | | | | LGC battery MPPACEEASW1C BUG=b:150666053 BRANCH=none TEST=Make sure battery can cutoff by console "cutoff" or "ectool cutoff" and resume by plug in adapter. Change-Id: If536d66d0eb86c1e90a768f3661dc9ddec3d1183 Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086381 Reviewed-by: Edward Hill <ecgh@chromium.org>
* lick: correct sku id setting of board_is_convertibleJulia Tsai2020-03-051-1/+1
| | | | | | | | | | | | | | | Set board_is_convertible to false for sku_id 1 and 255. BUG=b:150753388 BRANCH=octopus TEST=make -j BOARD=lick Signed-off-by: Julia Tsai <julia.tsai@lcfc.corp-partner.google.com> Change-Id: Ia5f9e90338d1a1a4eb811b7ec72bd9e8aa0b62f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087434 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* Button: Clean up button librarydnojiri2020-03-055-30/+28
| | | | | | | | | | | | | | | | | | | | Define BUTTON_DEBOUNCE_US and use it for recovery, volume, and power. Use struct button_config for characterizing power button. Introduce CONFIG_POWER_BUTTON_FLAGS for power button customization. Signed-off-by: dnojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=Verified power button works on Helios. TEST=Verified powerbtn command works on Helios. Change-Id: I4fd0db1da6190127f223d9c27b02ae370fa91c03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2088279 Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
* bb_retimer: Set Data_Connection_Present bit in Safe modeVijay Hiremath2020-03-051-0/+1
| | | | | | | | | | | BUG=b:150764332 BRANCH=none TEST=Data_Connection_Present is set in safe mode on Volteer Change-Id: Ib00ab10d2527636d9e6342de937477a72625f8bf Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087902 Reviewed-by: Keith Short <keithshort@chromium.org>
* Mushu : assign EN_PP5000_A_V0 to GPIO02loganliao2020-03-051-1/+1
| | | | | | | | | | | | | | | | | | EN_PP5000_A_V0 change to GPIO02 which is ground and meets the Mushu circuit . BUG=none BRANCH=none TEST=make BOARD=mushu Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Change-Id: Ie861a7ac1000ac2f09d41313a08c4158c943a897 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2072561 Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* puff: Use a 2k stack for the hostcmd task.Sam McNally2020-03-051-1/+1
| | | | | | | | | | | | | | EC_CMD_EFS_VERIFY causes a stack overflow. Use a 2k stack for the hostcmd task like fizz to avoid this. BUG=b:150742950 TEST=puff can sync RW EC and boot BRANCH=none Signed-off-by: Sam McNally <sammc@chromium.org> Change-Id: I8defe34a4ae2a7c5f8276e9caa73295794ac2db7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086390 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* common/keyboard_8042: When pressed, print F11-F15 for debugRajat Jain2020-03-042-7/+7
| | | | | | | | | | | | | | | | | | Vivaldi adds support for a new keyboard layout, and more function keys. The scan matrix is here: https://drive.google.com/corp/drive/u/1/folders/17UtVQ-AixnlQuicRPTp8t46HE-sT522E Allow to print F11-F15 labels when debugging those extra keys. BUG=b:146501925 TEST=Check extra keys by putting debug prints in the EC. BRANCH=firmware-hatch-12672.B Signed-off-by: Rajat Jain <rajatja@google.com> Change-Id: I0714baf4a8981b90aefdd3b955ebf93985f70197 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080602 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* common/keyboard_8042: Fix the Search key row/colRajat Jain2020-03-041-1/+1
| | | | | | | | | | | | | | The Search key is located at Row-3, Col0. Correspondingly, allow it to be printed when that key is pressed. BUG=b:146501925,b:148488560 TEST=Check search key while debugging BRANCH=firmware-hatch-12672.B Change-Id: Ic8422a0514698b1745925516bd15fe29f41c586a Signed-off-by: Rajat Jain <rajatja@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080601 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* hatch boards: Increase PD tasks stack sizeEdward Hill2020-03-047-14/+14
| | | | | | | | | | | | | | | | CL:2031650 increased stack used by tcpci_tcpm_init(), which caused stack overflow on boards using the ANX7447. BUG=b:149708491, b:150339191 BRANCH=none TEST=fixes EC stack overflow crash on boot, AP boots ok Change-Id: I29c4e2ccce1f3ac1ee125563e4367c4e7d8ea21e Signed-off-by: Edward Hill <ecgh@chromium.org> Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2068800 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org>
* getversion.sh: Generalize FP targets for nucleo-*Craig Hesling2020-03-041-1/+1
| | | | | | | | | | | | | | | | | | The nucleo-dartmonkey and future nucleo-bloonchipper will use the fingerprint private blobs and are designed to align as closely to dartmonkey and bloonchiper as possible. This patch makes these version strings equal too. BRANCH=none BUG=none TEST=make BOARD=nucleo-dartmonkey && strings build/nucleo-dartmonkey/ec.bin | grep dart TEST=make BOARD=dartmonkey && strings build/dartmonkey/ec.bin | grep dart TEST=make BOARD=bloonchipper && strings build/bloonchipper/ec.bin | grep bloon Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I8a4bce559a8c94222558e37b51b6a302595f29c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086733 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* getversion.sh: Add cryptoc git hash for fingerprintCraig Hesling2020-03-041-0/+3
| | | | | | | | | | | BRANCH=none BUG=none TEST=make BOARD=dartmonkey && strings build/dartmonkey/ec.bin | grep dart Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I845a6b72ca2489f8a89d9a856820300af0375e32 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086556 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* getversion.sh: Add private/.../fpc git hash for fingerprintCraig Hesling2020-03-041-0/+3
| | | | | | | | | | | | | | | | | | | | | Since we have moved the private FPC code/blobs into a sub-repository under private/, we should also represent the sub-repo in the version string. It now shows up as an additional "fpc:vBLAH-HASH". BRANCH=none BUG=b:150731735 TEST=make BOARD=dartmonkey && strings build/dartmonkey/ec.bin | grep dart TEST=make BOARD=nocturne_fp && strings build/nocturne_fp/ec.bin | grep noct TEST=make BOARD=bloonchipper && strings build/bloonchipper/ec.bin | grep bloon TEST=make BOARD=hatch_fp && strings build/hatch_fp/ec.bin | grep hatch TEST=make BOARD=nami_fp && strings build/nami_fp/ec.bin | grep nami Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ibf045a4f853e3a3589d84d8a62a726264223387e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086732 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* TCPMv2: Correctly handle DP Docks with charging portsSam Hurst2020-03-041-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following policy is implemented for docks with charging ports: 1) Rebooting the device with a non-powered dock connected re-enters alt mode. 2) Rebooting the device with a powered dock connected re-enters alt mode. 3) A powered down device with a powered dock connected begins to charge when a dock is connected. 4) Rebooting the device with a powered dock connected continues to charge when powered down. 5) A powered down device with a non-powered dock connected enters low power mode. BUG=b:149528846 BUG=b:149662829 BRANCH=none TEST=make -j buildall Manual tests: 1) Connected dock with DP a) power down device from OS b) verified that port entered low power mode c) power on device d) verified that DP returned 2) Connected dock with DP and USB Charger a) power down device from OS b) verified that port was still charging c) power on device d) verified that DP returned 3) Connected dock with DP a) power down device from OS b) plug in USB Charger to dock c) verified device was charging d) power on device e) verified that DP returned 4) Connected dock with DP and USB Charger a) power down device from OS b) unplug charger from dock c) verified that port entered low power mode Change-Id: I3c4402cb575abde59ca81081e01ff9a97cf08167 Signed-off-by: Sam Hurst <shurst@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2078692 Tested-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* malefor: Initial EC imagestabilize-12951.B-masterxiong.huang2020-03-047-0/+645
| | | | | | | | | | | | | | | | | | Create the initial EC image for the malefor variant of the volteer baseboard by copying the baseboard EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.0.1). BUG=b:150653745 BRANCH=none TEST=make BOARD=malefor Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: I58c679fb1150997c199dda23fd69d23480a0fb80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082304 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* dalboz: fix rotation matrixLu Zhang2020-03-041-2/+9
| | | | | | | | | | | | | | | | The rotation matrix needs be filled out into standard reference frame. BUG=b:149968926 BRANCH=none TEST=Using ec console 'accelinfo on' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 180 threshold. Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I349141c6128687b38f375b67086eb5fe611ce1ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2078817 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* remove board/cr50 and chip/gNamyoon Woo2020-03-03196-70631/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes cr50 related files from platform/ec. BUG=b:149350081 BRANCH=none TEST=$ make buildall -j $ cros_workon --host list chromeos-base/chromeos-cr50-dev chromeos-base/chromeos-ec chromeos-base/chromeos-ec-headers chromeos-base/ec-devutils chromeos-base/ec-utils chromeos-base/ec-utils-test dev-util/hdctools $ sudo emerge chromeos-cr50-dev -j $ sudo emerge chromeos-ec -j $ sudo emerge chromeos-ec-headers -j $ sudo emerge ec-devutils -j $ sudo emerge ec-utils -j $ sudo emerge ec-utils-test -j $ sudo emerge hdctools -j $ cros_workon-octopus list chromeos-base/chromeos-ec chromeos-base/chromeos-ec-headers chromeos-base/ec-devutils chromeos-base/ec-utils chromeos-base/ec-utils-test dev-util/hdctools $ sudo emerge-octopus chromeos-ec -j $ sudo emerge-octopus chromeos-ec-headers -j $ sudo emerge-octopus ec-devutils -j $ sudo emerge-octopus ec-utils -j $ sudo emerge-octopus ec-utils-test -j $ sudo emerge-octopus hdctools -j Signed-off-by: Namyoon Woo <namyoon@chromium.org> Change-Id: Ifa3a037fff17177204ce1a9b88474490fb9be3ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2083659 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* servo_v4: print PD-comm capability with cc commandEric Yilun Lin2020-03-031-0/+1
| | | | | | | | | | | | | | Support to print the PD-comm information for FAFT. BRANCH=servo BUG=b:150185455 TEST=ensure cc print the correct output at SNK/SRC roles Cq-Depend: chromium:2072543, chromium:2073423 Change-Id: Ia8c8a373eaab31a13f70e3422bf6dafcc27f92f1 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2072567 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* vboot: Add a reboot option to keep EFS in RO with the AP off.Sam McNally2020-03-036-7/+28
| | | | | | | | | | | | | | | | | | | | With EFS, the EC will typically switch to RW shortly after boot. cros_ec_softrec_power triggers recovery mode using the hostevent console command after rebooting the EC with ap-off and then simulates a power button press. This requires the EC to remain in RO after rebooting so doesn't currently work with EFS. Add a reboot option "ap-off-in-ro" to request the EC remain in RO with the AP off after rebooting. BUG=b:149657030 TEST=make buildall; firmware_RecoveryCacheBootKeys on puff BRANCH=none Change-Id: I65d291106accebf18bb46d951351def122627e61 Signed-off-by: Sam McNally <sammc@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2077699 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* system: Rename SYSTEM_IMAGE_RW to EC_IMAGE_RWdnojiri2020-03-031-1/+1
| | | | | | | | | | | | | This is left out from CL:2036599. BUG=none BRANCH=none TEST=build helios with EFS2 enabled. Signed-off-by: dnojiri <dnojiri@chromium.org> Change-Id: Iaf70443b89f0db155c2569b5e80b80879e9ea087 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080129 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* hatch/baseboard: Enable the Search key button in maskRajat Jain2020-03-031-1/+1
| | | | | | | | | | | | | Enable the search key located at Row-3, Col-0 BUG=b:146501925,b:148488560 TEST=Check search key while debugging BRANCH=firmware-hatch-12672.B Signed-off-by: Rajat Jain <rajatja@google.com> Change-Id: I3496d6413994f147839fbb29f6d666b5fc6c0914 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080600 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* common/keyboard_scan: Enable the SEARCH key in the default maskRajat Jain2020-03-031-1/+1
| | | | | | | | | | | | | | The SEARCH key on Row-3, Col-0 is now standard on Chromeos keyboards. Lets enable it by default. BUG=b:148488560,b:146501925 TEST=Build BRANCH=firmware-hatch-12672.B Signed-off-by: Rajat Jain <rajatja@google.com> Change-Id: I9164a7e2894d70599a2c2eb25ecb2408e3b1eebe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2080599 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* motion_sense: simple typo correction (CONIFG_ -> CONFIG)Jack Rosenthal2020-03-031-1/+1
| | | | | | | | | | | BUG=none TEST=none BRANCH=none Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: If62d1c4dc74000c1a4bd021c0c42e7bd2371ac81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2083584 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* kodama: rewrite charger CHG_CTRL1 registerxiong.huang2020-03-022-0/+14
| | | | | | | | | | | | | | | | | | | USB2.0 device cannot be recognized probabilistically when the smart battery is activated with the adapter at the first time. It found charger register CHG_CTRL1(0x11) is changed to 0x02 when disconnecting the external device since the unstable Vbat. In fact, the normal value should be 0x10. Rewriting the charger CHG_CTRL1 register after jumping to RW. BUG=b:150515707 TEST=ensure USB2.0 device can be recognized after the smart battery is activated with the adapter at the first time. BRANCH=kukui Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Iccba1f81099575968faa26bd8686c5ede37a3f31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082291 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* board/morphius: Enable PS/2 MouseRaul E Rangel2020-03-023-0/+16
| | | | | | | | | | | | BUG=b:145575366 BRANCH=none TEST=Verified mouse was enumerated in the kernel [ 19.329499] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input4 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I95f446f95902892df470dc1b9ad17dbc5b8b8b87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079696 Reviewed-by: Edward Hill <ecgh@chromium.org>
* common/keyboard_8042: Add ability to send/receive AUX dataRaul E Rangel2020-03-023-24/+95
| | | | | | | | | | | | | | | | | | | | * Added CHAN_AUX to CHAN enum. * Added two new types to kblog for AUX data. * Moved mouse methods to handle_mouse_data so they can respond on the AUX channel. * Call lpc_aux_put_char to put an AUX byte. * Added send_aux_data_to_host and send_aux_data_to_device to pipe data in and out of the 8042. CONFIG_8042_AUX must be set if the board implements these methods. BUG=b:145575366 BRANCH=none TEST=Verified I can see AUX data going in and out. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Iea1fc315846a9f768a1d82e309ff0725d1d2a9c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079695 Reviewed-by: Edward Hill <ecgh@chromium.org>
* include/lpc.h: Expose lpc_aux_put_charRaul E Rangel2020-03-022-3/+16
| | | | | | | | | | | | | | | * Expose lpc_aux_put_char so we can call it from common/keyboard_8042. * Renamed lpc_mouse_put_char to lpc_aux_put_char so it's more generic. * Added the send_irq parameter for parity with lpc_keyboard_put_char. BUG=b:145575366 BRANCH=none TEST=Verified it builds Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I61854ed7c9b9ad1c50e55735747cfb25ca15762b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079694 Reviewed-by: Edward Hill <ecgh@chromium.org>
* common/keyboard_8042: Add logging to keyboard_clear_bufferRaul E Rangel2020-03-021-0/+4
| | | | | | | | | | | | | It's useful to know when the buffer has been cleared. BUG=b:145575366 BRANCH=none TEST=Saw x in kblog Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I1c3474687c91a3e017d7a7a0e4e7967c3fb10f05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079693 Reviewed-by: Edward Hill <ecgh@chromium.org>