summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clear OWNERS for factory/firmware branchfactory-excelsior-12812.B-masterBrian Norris2021-09-108-28/+0
| | | | | | | | | | | | BUG=none TEST=none Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155052 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* nami_fp: Replace individual symlinks with directory symlinkTom Hughes2020-01-048-7/+1
| | | | | | | | | | | | | | | | | When the directory was originally created, there were separate flash_fp_mcu scripts for nocturne_fp and nami_fp. Now there is a single script, so we can symlink the entire directory instead of individual files. BRANCH=none BUG=none TEST=make buildall -j Change-Id: I7a0f645f65aeba16c8ae0ae3b4cb367b8175cfb0 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986321 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* cr50: Add support for ACVP tests of HMAC implementationsVadim Sukhomlinov2020-01-042-92/+184
| | | | | | | | | | | | | | | | | | | | | | In order to support NIST ACVP testing, new commands to provide access to HMAC implementations (software, and hardware accelerated HMAC SHA-256) with CRYPTO_TEST_SETUP added: - Software HMAC (_cpri_StartHMAC) TPM implementation - dcrypto HMAC (DCRYPTO_HMAC_SHA256_init) Updated hash_test.py to support different hash algorithms for hash and HMAC, added HMAC tests. BRANCH=cr50 TEST=make BOARD=cr50 CRYPTO_TEST=1 -j && test/tpm_test/tpmtest.py BUG=b:138578319 Change-Id: I57da2f27734fc7e5dbc896d75c5f8b2ed60e3b18 Signed-off-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1854885 Reviewed-by: Gurleen Grewal <gurleengrewal@google.com> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Gurleen Grewal <gurleengrewal@google.com>
* USB PD: Consider DFET of battery when refrain from snk_resetMarco Chen2020-01-041-2/+4
| | | | | | | | | | | | | | | | | | | | | CL:1565147 introduced a new clause to the SNK_DISCOVERY state to prevent reset timers from starting when a battery is reporting below a configured level, which indicates the point at which the battery is capable of withstanding the potential loss of Vbus. There is an another case of having good battery level but battery can't discharge due to the DFET status of fuel gauge so we need to consider it as well. BUG=b:146758440 BRANCH=octopus TEST=Verify on the DUT with bad battery which can report battery level correctly but DFET is disabled and can't be revived. Change-Id: Ia3f3d26625a054f631fdddc74065f2e829852989 Signed-off-by: Marco Chen <marcochen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980406 Reviewed-by: Diana Z <dzigterman@chromium.org>
* kohaku: tcs3400: update coeffs for als and rgb sensorMengqi Guo2020-01-031-15/+15
| | | | | | | | | | | | | | | | | | | | | | Update board files for kohaku to use new coefficients for als and rgb sensor. BUG=b:145701281, b:138754582 BRANCH=master TEST='make -j BOARD=kohaku' in EC repo, verified builds succeed. Verify on the device that ALS readings are valid. Reading in dark: in_illuminance_blue_raw:0 in_illuminance_green_raw:7 in_illuminance_raw:0 in_illuminance_red_raw:3 Cq-Depend: chromium:1986286 Change-Id: I3953adf6960db8e242e01db16bc126330d4a7d86 Signed-off-by: Mengqi Guo <mqg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984893 Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
* dedede: Add initial baseboard skeletonAseda Aboagye2020-01-033-0/+73
| | | | | | | | | | | | | | | | | This commit simply adds the few baseboard files for dedede. It only contains support for the NPCX7 variant boards at the moment. BUG=b:146172102, b:146557556 BRANCH=None TEST=None Change-Id: I714dc44c5f54330f43fa20f31f982ac556eda9b9 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986313 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>
* cbi: Add support for CONFIG_WP_ACTIVE_HIGHAseda Aboagye2020-01-031-0/+4
| | | | | | | | | | | | | | | | | The CBI module was missing support for an inverted write protect signal, this commit simply adds that support. BUG=b:146172102 BRANCH=None TEST=`make -j buildall` Change-Id: Ic52853e67a9f650609c09d719e57ed34f18d7f02 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986312 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>
* npcx: Add support for CONFIG_WP_ACTIVE_HIGHAseda Aboagye2020-01-031-0/+12
| | | | | | | | | | | | | | | | | NPCX was missing support for an inverted write protect polarity, this commit simply adds that support. BUG=b:146172102 BRANCH=None TEST=`make -j buildall` Change-Id: I3324d7f7cfa268a2d55f87d3b1943717e26c856c Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986311 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>
* docs/fingerprint: Update for Dragonclaw Rev 0.2Tom Hughes2020-01-036-22/+32
| | | | | | | | | | | | | | Update FPMCU partner documentation for the Dragonclaw Rev 0.2 development board. BRANCH=none BUG=none TEST=view in gitiles Change-Id: Ib0c5acb95843583289a76fc17cba2daa675341dd Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986874 Reviewed-by: Craig Hesling <hesling@chromium.org>
* bloonchipper: Update GPIOs for Hatch 3.0 designTom Hughes2020-01-031-7/+9
| | | | | | | | | | | | | | | Based on the following schematics: https://ee-schematics.teams.x20web.corp.google.com/hatch/hatch_p0/hatch_p0_499d1e339869c92d67ea9077ba35b66a6c103e1c.html BRANCH=none BUG=b:145847137 TEST=none Change-Id: I29c5ec5abb9bdf7650c5a1eb190309c6ea85bfce Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1972376 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* kukui_scp: drop unused interruptsEric Yilun Lin2020-01-032-21/+0
| | | | | | | | | | | | | | TEST=make buildall BUG=b:144820026 BRANCH=kukui Change-Id: I73407109b99e4371ef80a97b7e2d7173616b6bb7 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982290 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-by: Erin Lo <erin.lo@mediatek.corp-partner.google.com> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
* puff: accept switch to CHARGE_PORT_NONEPeter Marheine2020-01-031-2/+12
| | | | | | | | | | | | | | | | | The charge manager requires that we accept such a transition, even though it doesn't really make sense for a batteryless board. This is okay because it only requests this change if the only available charging port doesn't support PD, which means we definitely don't have enough power to boot the AP. BRANCH=none TEST=hardware no longer resets endlessly when plugged into non-PD source BUG=b:146515963,b:143975429 Change-Id: I45da0cd16949f9f73ede19a411694c132248b99d Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985725 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* puff: ensure barrel jack removal is detectedPeter Marheine2020-01-031-1/+1
| | | | | | | | | | | | | | | | | There isn't an external pull-up on the barrel jack detect switch, so we need to use an on-chip one to ensure we detect when the barrel jack is removed. Otherwise the input is pulled down when connected and floating when disconnected. BRANCH=none TEST=chgsup reports expected values after (dis)connecting barrel jack with USB-C connected. BUG=b:143975429 Change-Id: I1e287ef02a8c1365ebe4208769b2dc56ee5d2e71 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985724 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* puff: Enable type C power source when requested.Andrew McRae2020-01-031-0/+22
| | | | | | | | | | | | | | | Implement the board function to enable type C power sourcing. BUG=b:146031922 TEST=Verified on puff, plugged in phone to charge. BRANCH=none Change-Id: I4dbdc9d5e5103e48b2d163ccfb841ae615957d0c Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985727 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* puff: Remove ANX7447 OCM flash erase support.Andrew McRae2020-01-031-1/+0
| | | | | | | | | | | | | | | | | Puff uses the ANX3447 variant of the ANX7447 TCPC. This part has no support for OCM flash, so there is no need to have a command to erase this flash. BRANCH=none TEST=verified on puff h/w BUG=b:147113023 Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I1409dea863ee908c5592d576d7c6ffd7def0ad04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1985723 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* cr50: update size checks for U2F_ATTESTAndrey Pronin2020-01-031-2/+2
| | | | | | | | | | | | | | | This CL updates verification of the message size in U2F_ATTEST after adding userSecret field. BUG=b:147020573 TEST=test_that <dut> firmware_Cr50U2fCommands Change-Id: Ib1e9444fdd13ed27547df27aa9c2fed19ba59496 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984894 Tested-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
* cr50: add checks to U2F_ATTESTAndrey Pronin2020-01-031-3/+34
| | | | | | | | | | | | | | | | | | This CL adds checks to U2F_ATTEST and rejects signing of the passed data if one of the following conditions is not satisifed: - reserved byte is 0, - public key matches the key associated with the keyhandle. BUG=b:147097407 TEST=test_that <dut> firmware_Cr50U2fCommands Change-Id: I10005742042a182a894eed243e006fcf14f68e28 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984891 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Tested-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org> Auto-Submit: Andrey Pronin <apronin@chromium.org>
* driver: lsm6dsm: Implement temperature readingYuval Peress2020-01-032-0/+18
| | | | | | | | | | | | | | Implement reading the internal chip temperature BUG=b:138303429,chromium:1023858 TEST=None BRANCH=None Change-Id: Ia077d5d439d5557333aae5325140ab1958da993e Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1922293 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* driver: bmi160: Implement temperature readingYuval Peress2020-01-021-0/+6
| | | | | | | | | | | | BUG=b:138303429,chromium:1023858 BRANCH=None TEST=buildall Change-Id: I1a1fd0f0cf9fd4d4d85d537ecf0e1ace76d3e196 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867224 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* puff ec: Enable all GPIO interruptsAndrew McRae2020-01-021-0/+8
| | | | | | | | | | | | | | | | | Some EC GPIO interrupts are enabled by common code, and some need to be explicitly enabled by puff code. Ensure that all EC GPIO interrupts are enabled. BRANCH=none TEST=Verified on puff h/w. BUG=b:147068623 Change-Id: Iab8c705402840340d37b33f15a1323f6566b8adc Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984154 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* Kukui: Fix shutdown battery can't do pre-chargeDavid Huang2019-12-311-12/+15
| | | | | | | | | | | | | | | | | | | | | | Use battery_get_disconnect_state() to check battery status. If get BATTERY_DISCONNECT_ERROR, consider battery require pre-charge for wake up. If get BATTERY_NOT_DISCONNECTED when not in cutoff, consider battery is not present. BUG=b:146876246 BRANCH=master TEST=1.Use cutoff command to shutdown battery gauge, and make sure battery resume normally. 2. Overdischarge battery to shutdown battery gauge, and make sure battery resume normally. Change-Id: Id88dfb6deb96db1d021d0aafd4854ce84e4f9c95 Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984143 Commit-Queue: David Huang <david.huang@quanta.corp-partner.google.com> Tested-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* dood: Add battery informationyu-an.chen2019-12-312-0/+90
| | | | | | | | | | | | | | | | | | | dood support battery: - SMP: PC-VP-BP126 - SMP: PC-VP-BP136 - SMP: PC-VP-BP144 BUG=b:145882251 BRANCH=octopus TEST=boot dood board with battery, charging/discharging/cutoff work as expected. Change-Id: Ie5b5312ac7c81d3ec0742ce867ab7eebea731a97 Signed-off-by: yu-an.chen@quanta.corp-partner.google.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958290 Reviewed-by: Marco Chen <marcochen@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* puff: prevent AP boot when there isn't enough powerPeter Marheine2019-12-316-56/+85
| | | | | | | | | | | | | | | The common x86 state machine does this, but the EC-controlled sequencing did not. Since trying to boot the AP without enough power will cause the system to brown out, we need to do it too. TEST=boot prevented on hardware BRANCH=none BUG=b:146515963 Change-Id: I7dbe6ab962fbe47d4d866be98d4174291c757c72 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980104 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* puff: EC TCPC and TCPPC interrupts are not enabled.Andrew McRae2019-12-311-0/+3
| | | | | | | | | | | | | | | | The TCPC and TCPPC interrupts on the EC are not enabled. Enable them. BUG=b:146985348 TEST=Confirm that interrupts now occur. BRANCH=none Change-Id: If50a5a315289baf4ff5e5f64582432c7538cbb96 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1984142 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: support switching between USB-C and barrel jack powerPeter Marheine2019-12-313-2/+104
| | | | | | | | | | | | | | | | | | | | | We let the charge controller decide which port to use, watching the presence signal to tell the charge control what is connected. We only allow switching the input when the system is off, since switching may cause us to brown out. This is mostly copied from Fizz; I'm unsure if we need to do anything with the TCPPC when switching (Fizz has a GPIO that physically connects or disconnects the type-C port). BUG=b:143975429 TEST=booted on hardware, verified chgsup output with barrel jack BRANCH=None Change-Id: I6d2f8365c03aa44f272195708dd534fdc35cd2f6 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1958387 Reviewed-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* puff: correctly detect vbus presence on USB-CPeter Marheine2019-12-311-1/+1
| | | | | | | | | | | | | Otherwise the PD stack never even sees that the port is connected to begin negotiation. BUG=b:146504182 TEST=ran on hardware, verified VBUS detected BRANCH=none Change-Id: I96f7f643e064501e2dcc3716fa917d92bb456d7a Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1978989
* ccd: add information about AP flash programming speed up.Vadim Bendebury2019-12-301-0/+78
| | | | | | | | | | | | | | | | | When programming AP flash for the very first time it is sufficient to program just a few sections. This makes it possible for the device to boot Chrome OS, at which point the rest of the AP flash can be programmed much faster. BRANCH=none BUG=none TEST=verified proper rendering using gerrit Change-Id: I444b857302e67c6d7c54c026b9205d0ec734e24a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1981085 Tested-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* Kodama: limit the max input current as 2Axiong.huang2019-12-301-0/+4
| | | | | | | | | | | | | | | The 45W type-c adapter can support 5V/3A and 9V/3A but can not meet DOE efficiency for those power, so it only put 5V/2A and 9V/2A on the label. So we limit the input current to 2A to keep same with the certification. BUG=b:146464104 TEST=the max charger IARCR value is 2A. BRANCH=kukui Change-Id: I50b27ecab50b1ff7267afbe80d2f3acf8fff1aba Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1977995 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* dood: Change LED Pin Output Typeyu-an.chen2019-12-301-2/+2
| | | | | | | | | | | | | | | | | | Change LED Pin Type to Open-drain from Push-pull to support change LED voltage to 5V from 3.3V. BUG=b:142627243 BRANCH=octopus TEST=Check ec console (md .b 0x40099006). GPIOC3 and GPIOC4 is setting open drain. Change-Id: I0908cf326b3801e9e34af185d056ac4c1251f470 Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980107 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
* stryke: remove ALS supportJosh Tsai2019-12-303-95/+1
| | | | | | | | | | | | | | | | Stryke of the hatch family do not include any ALS sensor. Remove it entirely, both to save space and to disable some factory tests. BUG=b:146868242 BRANCH=none TEST=make BOARD=stryke Change-Id: Idaf1ffdd5085586b615d643b033be34f22fc469f Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982306 Reviewed-by: Ruby Lee <ruby_lee@compal.corp-partner.google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* Kindred: fix rotation matrices of base accel configben.chen2@quanta.corp-partner.google.com2019-12-271-1/+1
| | | | | | | | | | | | | | | | Fix the base accel config BUG=b:145706600 BRANCH=hatch TEST=Using ec console 'accelinfo on' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 180 threshold. Change-Id: I5fb33e9796a64bb1c4995b65fe002132afcb5e44 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980402 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* drivers/tcs3400: don't apply zero scale.Jongpil Jung2019-12-271-0/+4
| | | | | | | | | | | | | | | | | EC will be broken with scale zero. So, we need to check scale value before we apply value. BUG=b:146868237 TEST=emerge-hatch chromeos-ec and flash ec on device. apply zero scale into rgb sensor. (clear, red, green and blue) echo "0" > /sys/bus/iio/devices/iio\:device6/in_illuminance_calibscale BRANCH=none Change-Id: I716ae805ff1742ddd45dbbdfd956beb1c22d5a6c Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982294 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
* jacuzzi: enable ledTing Shen2019-12-277-7/+238
| | | | | | | | | | | | | | | | | Implemented pwm module using it8801, and enable led_pwm on jacuzzi. BUG=b:135086465 TEST=1) verify the led status looks good (full=green, charging=blue) 2) enable CONFIG_CMD_LEDTEST and verify the color settings looks good. BRANCH=none Change-Id: Ifa682473c02fec98ae026e2502df775505d614d7 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1892381 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* led_pwm: support different pwm modulesTing Shen2019-12-278-39/+64
| | | | | | | | | | | | | | | | add enable() and set_duty() into struct pwm_led, to support PWMs other than the default one. BUG=b:135086465 TEST=verify led works on grunt BRANCH=none Change-Id: I1fd919d4990a145df272a7ee0b2072612f80cd44 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1963730 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* zork: Detect PS8802 or PS8818 retimer for USB-C1Edward Hill2019-12-263-3/+60
| | | | | | | | | | | | | | | | To support both OPT1 DB with PS8818 retimer, and OPT3 DB with PS8802 retimer, try both, and remember the first one that succeeds. BUG=b:138682132, b:143147353 BRANCH=none TEST=USB3 device enumerates as 5G on Trembyle OPT1 and OPT3 USB-C1 Change-Id: I9a78801dc35c19f97fc015b739b105541c41e1d5 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980392 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* retimer: Add PS8802 driverEdward Hill2019-12-264-0/+105
| | | | | | | | | | | | | BUG=b:138682132, b:143147353 BRANCH=none TEST=USB3 device enumerates as 5G on Trembyle OPT3 USB-C1 Change-Id: I214517f9b2f821fd47079ea0828a810a0b7bb287 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980391 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* jslrvp: add Jasperlake RVP supportDivagar Mohandass2019-12-268-0/+439
| | | | | | | | | | | | | | | | | | | | | | | Following features are enabled and verified. 1. Power sequencing 2. Host communication 3. Battery 4. Charger 5. USB TYPE-C MUX, DP/HDMI, USB2/3 6. TPM-SOC communication 7. LED 8. Keyboard BRANCH=none BUG=b:146693933 TEST=Build, flash and boot the Jasperlake RVP platform to OS make BOARD=jslrvp_ite; sudo util/flash_ec --board=jslrvp_ite Change-Id: I80227833fcfca5636ac8f30abc099db5717bfa05 Signed-off-by: Divagar Mohandass <divagar.mohandass@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980091 Reviewed-by: Justin TerAvest <teravest@chromium.org>
* kappa: enlarge stack for hook_taskDevin Lu2019-12-251-1/+1
| | | | | | | | | | | | | Clone from CL:1957341 BUG=none BRANCH=kukui TEST=make BOARD=kappa Change-Id: I98479731d2b6c0323bae2b4ced1a25b856ca2b21 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980400 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* power: add support for Jasperlake chipsetDivagar Mohandass2019-12-253-9/+8
| | | | | | | | | | | | | | | | | | - Jasperlake power sequencing flow is same as Icelake - Rename CONFIG_CHIPSET_ICL_TGL as CONFIG_CHIPSET_ICELAKE to avoid duplicate code - define CONFIG_CHIPSET_ICELAKE on CONFIG_CHIPSET_JASPERLAKE or CONFIG_CHIPSET_TIGERLAKE BRANCH=none BUG=b:146693933 TEST=make buildall -j Change-Id: I25f43d85fcfc7fbbfe06787e5a201983c0e49cc7 Signed-off-by: Divagar Mohandass <divagar.mohandass@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980090 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* foob : add convertible check by sku_idxiaoqiang.zhu2019-12-241-1/+1
| | | | | | | | | | | | | | | | Foob has tow sku_id, sku_id=1 is for foob-180, sku_id=9 is for foob-360. BRANCH=master BUG=b:145643393 TEST=make buildall Change-Id: I3e682db0405b061cb21328654c8637275866d05f Signed-off-by: xiaoqiang.zhu <xiaoqiang.zhu@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980396 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* driver/usb_mux: add ANX7440 USB Type-C mux driverDivagar Mohandass2019-12-245-0/+154
| | | | | | | | | | | | | | | | Add support to Analogix ANX7440 USB Type-C USB mux with integrated Re-timers for USB3.1/DisplayPort BRANCH=none BUG=b:146683781 TEST=make buildall -j verify the mux functionality with reference platform Change-Id: I7847e67025385ca6ea044ee72da143c8e52e65cf Signed-off-by: Divagar Mohandass <divagar.mohandass@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980089 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* rt946x: polish charger log formatEric Yilun Lin2019-12-241-5/+6
| | | | | | | | | | | | | Prefix logs with RT946X and add some minor information TEST=make buildall BUG=None BRANCH=kukui Change-Id: I10992c1d8fbde97eb70bf29c655ea124ce80891f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980106 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* kodama: overwrite bad battery params to known good valueTing Shen2019-12-235-0/+88
| | | | | | | | | | | | | | | | | | | | | | | Kodama's bitbang driver fails randomly, and there's no way to notify kernel side that bitbang read failed (batt->flags does not propagate into kernel). Thus, if any value in batt_params is bad, replace it with a cached good value, to make sure we never send random numbers to kernel side. BUG=b:144195782 TEST=Modify smart battery driver to make sb_read has 50% fail rate, and monitor /sys/class/power_supply/sbs*/*, make sure the bad values does not observable in kernel. BRANCH=kukui Change-Id: Idf4691eb743f1ef785593b308b8f07a34e5ea642 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1943637 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* virtual_battery: return errors on bad battery flagsTing Shen2019-12-231-0/+18
| | | | | | | | | | | | | | | | Stop virtual_battery_handler from sending random values to host and make userland programs panic. BUG=b:144195782 TEST=UI never shows incorrect battery level. BRANCH=kukui Change-Id: Ia1ce4d6806db70cd3b189acdf1df4f865e5f8076 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1972161 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* puff: Change default EC GPIO to enable MST.Andrew McRae2019-12-231-1/+1
| | | | | | | | | | | | | | | | | The MST has two open drain disable GPIOs, one wired to the EC and one to the CPU. Fix the EC GPIO so that it doesn't disable the MST by default. BRANCH=none BUG=b:146368608 TEST=EC buildall, ran on puff. Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Idf3673f2c01896a3e69bc0d0ab4e2bea3a1b8951 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1980098 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* chip/it8xxx2: Don't let internal flash go into deep power down modeDino Li2019-12-233-0/+28
| | | | | | | | | | | | | | | | | We got an issue on IT83202BX that flash won't be able to wake up correctly in EC low power mode when WRST# is asserted. This issue might cause cold reset failure so we made this change to fix it. BUG=none BRANCH=none TEST=hibernate EC and then press servo board's COLD_RST_L to reset EC. EC reboots. Change-Id: Ide3a240e1fe62d712536c69d8f390241e67144f6 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1973974 Reviewed-by: Jett Rink <jettrink@chromium.org>
* dratini: assign SKUIDs for DVTDevin Lu2019-12-221-5/+8
| | | | | | | | | | | BUG=b:146504217 BRANCH=hatch TEST=make buildall -j. Change-Id: Iccf5f9e5785ca3bfcb14af619718f9b8c6747a0b Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1975946 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* dratini: override battery LEDs to indicate system suspendDevin Lu2019-12-223-1/+26
| | | | | | | | | | | | | | | Dratini is non-power LED design, to indicate system suspend, blinking both two side battery white LEDs (1 sec on/1 sec off) to indicate system suspend with non-charging state. BUG=none BRANCH=hatch TEST=make sure both two side LEDs are blinking white after system suspend. Change-Id: Ia8173bd78b6678633de50c747100c6c3f11fb29e Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1977989 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* mushu: Create initial buildBob Moragues2019-12-217-0/+1026
| | | | | | | | | | | | | | Create initial overlays and build for mushu BUG=b:144857888 TEST=./build_packages --board mushu TEST=./build_image --board mushu --noenable_rootfs_verification test BRANCH=none Signed-off-by: Bob Moragues <moragues@chromium.org> Change-Id: I7ad99b12d3c05445c777f01577fa68c8ab1193db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1931420 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* zork: Enable PS8818 retimer for USB-C1Edward Hill2019-12-202-0/+5
| | | | | | | | | | | | BUG=b:139428235, b:145766506 BRANCH=none TEST=USB3 device enumerates as 5G on Trembyle OPT1 USB-C1 Change-Id: I360cde6cf1ef5d717cf89149e99257bdfa4289e9 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1977984 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>