summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tcpci: zork: battery-less AP boot needs to set DRP on unattached portsDenis Brockus2020-03-301-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | The timing on the AP boot takes the PD stack into TOGGLE_OFF and then immediately to TOGGLE_ON. The TOGGLE_ON is getting lost due to being in execution past where we set the DRP and before we go back to LOW_POWER, so it gets lost. Then when we get back to LOW_POWER it requires a SOURCE attach to wake up and allow the port to detect a SINK. This CL tracks TOGGLE_x to see if we should have set DRP and didn't and reroute back if needed so we don't lose the port. BUG=b:152028728 BRANCH=none TEST=verify trembyle will see unattached port after boot to AP Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ifaf0e01e4816fdf2c569d21aba7968d8538768c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2118430 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* volteer: Select LED based on charge portAbe Levkoy2020-03-302-4/+27
| | | | | | | | | | | | | | If a port is charging, illuminate the LED next the the charging port. If no port is charging, illuminate both LEDs. BUG=b:139554899 TEST=Attach charger to C0 or C1; LED on attached side is illuminated BRANCH=none Change-Id: I85e3851132f42a35032bcd43bfd02c59c23cc589 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2113121 Reviewed-by: Keith Short <keithshort@chromium.org>
* Trogdor: Create Trogdor baseboardWai-Hong Tam2020-03-307-252/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the common stuff to from board to baseboard to reduce the effort of forking and maintaining derivatives. This CL is intended to simply moving things around, not to address other needs, like supporting a different EC. Leave the following stuff in board: * Features for debugging * GPIO and interrupt handlers (likely will be changed) * BC 1.2 (already changed from Trogdor rev-0 and rev-1) * TCPC/MUX/PPC (will be changed) * Sensors (clamshell vs convertible) * ADC (detachable vs convertible) * LED/PWM * Battery Others are moved to baseboard. BRANCH=None BUG=b:146237680 TEST=Build Trogdor and it boots. Should be good as there is no logic change. Change-Id: I2e4cd76d18f8739b5b7d5b1dae67c13e038b4480 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2099390
* damu: reduce bitbang failrateScott Chao2020-03-302-3/+3
| | | | | | | | | | | | | | apply CL:2050003 to damu. BUG=b:152456966 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall Change-Id: I397b8e2ae548080e4d6d3cd75f3e57b10080f09a Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2124431 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* damu: modify gpio as SPI for BMI160.Scott Chao2020-03-302-13/+24
| | | | | | | | | | | | | | | | | | | Damu EC using SPI to communicate with BMI160, so set gpio as alternate pin. Also include CL:2043151. BUG=b:147206199 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall TEST=No failed log when sensor init [25.483715 Accel: MS Done Init type:0x0 range:2] [25.492217 Accel ODR: 10000 - roundup 1 from config 1 [AP 0] [25.495683 Gyro: MS Done Init type:0x1 range:1000] [25.501918 Gyro ODR: 0 - roundup 0 from config 0 [AP 0]] Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I499762166a7021bdda2731f7b1bef0f11d61f1d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2123621 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* tcpm/it83xx_pd: cc1 and cc2 resistance setting separateRuibin Chang2020-03-302-0/+6
| | | | | | | | | | | | | | | | | | In it81202/it81302 setting cc1 and cc2 resistance is individual for each cc. BUG=none BRANCH=none TEST=on it8xxx2_pdevb board, check cc toggle and connection with adater and dongle by Oscilloscope. Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Change-Id: I3d0697b39b2302830c67061fc3279d33d40b9957 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120112 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
* Zork: Clean up FW_CONFIG hook functionsEdward Hill2020-03-286-65/+82
| | | | | | | | | | | | BUG=b:150239200 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I01238a98e17cd0a6320986e12bba32c08e1244fd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2125588 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Morphius/Ezkinil: Remove Trembyle V0 HW support.Edward Hill2020-03-286-48/+4
| | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I618a0ca9de0e767f47084527a11b56e10210223b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2125587 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* tcpmv2: reduce zork specific auto discharge disconnect codeDenis Brockus2020-03-288-208/+6
| | | | | | | | | | | | | | | | | | | Removing the conditional code to find the specifics that broke waddledoo and then fix that. BUG=b:152616398 b:152444591 b:150110431 b:150913968 b:151152817 BRANCH=none TEST=verify trembyle and waddledoo Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ieb88540b2298c3b999ab27ea78285f7f1c34bff6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121633 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* Volteer: add monitoring for PROCHOT inputKeith Short2020-03-289-0/+73
| | | | | | | | | | | | | | | | Add monotoring of the PROCHOT input to the EC. BUG=b:152340521 BRANCH=none TEST=makebuild all TEST=Assert PROCHOT output from the EC and confirm EC console logging or PROCHOT input. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib28537a227ea40ac947f7b999a85354b1ae4c111 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120067 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* common/vivaldi: Minor fixupsRajat Jain2020-03-272-4/+7
| | | | | | | | | | | | | | * Remove trailing "\n" from some debugs * Rename 2 keys to make it more clear / reader friendly. * Add a print for keyboard config for top keys on boot. Signed-off-by: Rajat Jain <rajatja@google.com> BRANCH=cros/firmware-hatch-12672.B BUG=b:146589270 TEST=Test on Jinlon Change-Id: I27691c697bbc26ad9cd5d3516e257110fe163df6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2124013 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* docs: Add factory quick guide to sitemapPhilip Chen2020-03-271-0/+2
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=View Markdown in gitiles Change-Id: I047797c977643cf1c5a3b87c8573ddcbce963f63 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2124877 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org>
* config: update TCPMv2 config optionsJett Rink2020-03-278-108/+108
| | | | | | | | | | | | | | | | | | | Reorganize how the TCPMv2 options are used - Update documentation in config.h and bring TCPMv2 items close together - Make the layer defines consistent on how they include compilation units - Update tests to account for how files are included now - Remove unnecessary defines in board.h since they are default on BRANCH=none BUG=none TEST=builds Change-Id: I91fca51648912deef44db23492ecc7775b2e3062 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120063 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Docs: Adding TCPMv2 overview documentDiana Z2020-03-277-8/+187
| | | | | | | | | | | | | | | General overview of TCPMv2, converted to md format. Updated new stack portion of the USB-C overview to link to this document, so only one location needs to be updated in the future with config changes. BUG=None BRANCH=None TEST=rendered in chrome with markdown preview plus extension Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iab74dbee97eeb8c39fe210787bb142c6a1ec6af8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2124010 Reviewed-by: Jett Rink <jettrink@chromium.org>
* nightfury: enable lid accelerometer lis2ds12Inno.Park2020-03-272-11/+13
| | | | | | | | | | | | | | | BUG=b:149226871 BRANCH=none TEST=make -j BOARD=nightfury flash ec and run 'ectool motionsense' Signed-off-by: Inno.Park <ih.yoo.park@samsung.corp-partner.google.com> Change-Id: I698f8990b3da0970273da59ca95fd4d363723a1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2123622 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Tested-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
* Mushu : Base G-sensor configloganliao2020-03-271-2/+2
| | | | | | | | | | | | | | | | | | G-sensor config is refer to Hatch. However G-sensor location is different from Hatch. This patch correct the right value in Mushu. BUG=b:152583296 BRANCH=none TEST=test in the pre-build Mushu Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Change-Id: Ie36b004837aba9b5e3529ae383f8f3292887c3ee Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2124427 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org> Tested-by: Bob Moragues <moragues@chromium.org>
* docs/fingerprint: Add factory quick guidePhilip Chen2020-03-271-0/+97
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=View Markdown in gitiles Change-Id: I0cba21879388ac228d306f54011e020130b0a233 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2116494 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org>
* driver: lis2ds12: Add driver supportMario Tesi2020-03-277-0/+557
| | | | | | | | | | | | | | | | | | | | | Added ACC LIS2DS/LIS2DS12 driver support. Features included: - FIFO support with watermark interrupt events - Uses shared function with other ST MEMs devices BUG=none BRANCH=master TEST=Tested on discovery_stmems target BOARD with LIS2DS connected to EC i2c master bus and motion sense task running. All basic features tested including changing in ODR and Full Scale Range. Also tested FIFO features and interrupt management. Change-Id: I8a9e96f59ebdca7e622cff29676c5e1a9e0d58f5 Signed-off-by: Mario Tesi <mario.tesi@st.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/481480 Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Inno.Park <ih.yoo.park@samsung.corp-partner.google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* usb_pd: Move cable communication functions to common fileAyushee2020-03-276-51/+81
| | | | | | | | | | | | | BUG=b:148528713 BRANCH=none TEST=Verified on TCPMV1 and TCPMv2, able to get correct cable characteristics. Change-Id: I812b21c87661952bf4e86acaa194d4b136371594 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2051628 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
* nucleo-h743zi: Enable blink exampleCraig Hesling2020-03-271-0/+6
| | | | | | | | | | | | | | BRANCH=none BUG=none TEST=make BOARD=nucleo-h743zi # Flash to nucleo # Check lights are counting in binary Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I66ff4e9f6a0af1922ec5c54c0f154e6f66d65435 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082075 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* SM5803: Clear Vbus source bits when setting charge modeDiana Z2020-03-261-10/+6
| | | | | | | | | | | | | | When either inhibiting charging from happening or enabling charging, the bits in FLOW_REG1 which cause Vbus to be sourced should be cleared. BUG=None BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I8713c50f7f6706882ecb9917bb329be22e0e1384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121199 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* icelake: Call hooks around RSMRST when shutting downAseda Aboagye2020-03-261-0/+3
| | | | | | | | | | | | | | | | | | | When we decide to force the chipset to shutdown, we were just simply asserting RSMRST_L which was bypassing the hooks around RSMRST (i.e. - board_has_before_rsmrst() and board_has_after_rsmsrt()). BUG=b:151680590 BRANCH=None TEST=Build and flash waddledoo, boot AP and shutdown, verify that PG_PP1050_ST is no longer asserted. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I8bc33ff12bf776dab7158bc2efac0637cebdaca4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2119590 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* x86: Make board_has_[before|after]_rsmrst overridableAseda Aboagye2020-03-264-24/+15
| | | | | | | | | | | | | | | | | | | There aren't many users of the CONFIG_* options CONFIG_BOARD_HAS_AFTER_RSMRST or CONFIG_BOARD_HAS_BEFORE_RSMRST, therefore this commit removes those CONFIG_* options and adds an empty default implementation that can be overridden by boards. BUG=b:151680590 BRANCH=None TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I3322e5ce07de19e729ca44a736b283641029c3ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2122628 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* dedede: Make EC_MKBP_INT_L open drainAseda Aboagye2020-03-262-2/+2
| | | | | | | | | | | | | | | | | | | | This commit changes EC_MKBP_INT_L to be an open-drain output. The AP firmware will also be configured to apply an internal pull-up to allow this configuration to work. BUG=b:151680590 BRANCH=None TEST=Build and flash waddledoo with modified AP FW that sets internal pull-up, verify that EC_MKBP_INT_L is asserted when the AP shuts down and is de-asserted when the AP turns on. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I76a772f88ab8af1a9c7c699e5922eb86b926ae86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2109117 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* zork: undo revert for zork on AutoDischargeDisconnectDenis Brockus2020-03-268-8/+313
| | | | | | | | | | | | | | | | | | | The revert caused Zork to no longer boot in battery-less mode. Doing a quick revert to locally unblock factory and will look for a correct solution so both zork and waddledoo function BUG=b:152444591 b:150110431 b:150913968 b:151152817 BRANCH=none TEST=verify trembyle and waddledoo Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I21d73206b252d0c22efb74de9318c11b019272d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121629 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* malefor: Add lid and base accel sensorsxiong.huang2020-03-265-202/+144
| | | | | | | | | | | | | | | | Malefor uses LIS2DE12TR as lid accel sensor and LSM6DS3TR as base accel sensor. AT the same time, remove unused sensor driver, like ALS sensor. BUG=b:150653745, b:152434719 BRANCH=none TEST=make buildall Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: I13364c3883940b7c9360f133763f00f316dfddc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2118031 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* damu: enable bit-bang for battery smbusScott Chao2020-03-264-1/+16
| | | | | | | | | | | | | | | EC using PA5/PC4 as i2c pin for battery. BUG=b:152456966 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall TEST=On board testing to wait until we receive proto1 board. Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I0064b8fde634fc3824593102e5fe8bc64563b0d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120877 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Ezkinil: Add FSUSB42UMX driverDavid Huang2020-03-262-1/+37
| | | | | | | | | | | | | | Add FSUSB42UMX support. This chip is used as SBU mux of usb c0 port. BUG=none BRANCH=ezkinil TEST=make buildall -j Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I566723de6b996652dc611262b609c08fe0d4b124 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115906 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Ezkinil: Add control USB_A1_RETIMER_EN during power on/offDavid Huang2020-03-261-0/+12
| | | | | | | | | | | | | | | Add enable USB_A1_RETIMER_EN when power on , and disable when power off. BUG=none BRANCH=ezkinil TEST=Insert USBA device and check device show up.. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Iba017263aa6ff72ff7d61fdcce93e304090191bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115905 Reviewed-by: Vincent Wang <vwang@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* kakadu: add new battery support for gauge max17055Scott Chao2020-03-261-4/+53
| | | | | | | | | | | | | | Configure battery parameter for gauge max17055 on kakadu. BUG=b:151899905 BRANCH=kukui TEST=make -j BOARD=kakadu TEST=make buildall Change-Id: I5253f248f0ec4dd0a8e41cf1609160d82212ee6e Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2089221 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* hatch/baseboard: Increase TCPC i2c speed to 400KhzDevin Lu2020-03-261-2/+2
| | | | | | | | | | | | | | | Currently TCPC tSenderResponse time is not meet PD specification. This patch increase TCPC i2c speed to 400Khz to improve response time. BUG=b:152008672, b:152306339 BRANCH=firmware-hatch-12672.B TEST=make sure tSenderResponse time is under 24ms while sysjump. Change-Id: I70c1b2a530006923dd1e6a51f1ba8e924e90400f Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115895 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Ezkinil: Add redriver TUSB544 and PS8743 for EzkinilDavid Huang2020-03-264-3/+52
| | | | | | | | | | | | | Setup usb_muxes for TUSB544 and PS8743. BUG=None BRANCH=ezkinil TEST=verify USB is working. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I606a571960bc0ff2634dd432573683e8d5631c6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115904 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Revert "tcpmv2: cleanup auto discharge disconnect"Aseda Aboagye2020-03-266-235/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03f5a8686a6a2274c176ead7fb928571a3e7c1f5. Reason for revert: This is causing chargers to not work in one orientation with the RAA489000 used on waddledoo. BUG=b:152444591 Original change's description: > tcpmv2: cleanup auto discharge disconnect > > This CL is based on the inability to boot trembyle when a > battery is not connected. The failure looks like it is always > right after AutoDischargeDisconnect has been set. I asked > Nuvoton if we could go back to using ForcedDischarge and > veer away from AutoDischargeDisconnect and I was told no > that it is now required. > > My first step was to determine how close the existing > AutoDischargeDisconnect was to the spec and found enough > difference that I wanted to get that in line before > trying to pinpoint the issues causing this problem. > > BUG=none > BRANCH=none > TEST=get tcpmv2 to work without a battery attached > > Signed-off-by: Denis Brockus <dbrockus@google.com> > Change-Id: I44b86ae5dfcf6b547c742c1af0228a0ed8e3520d > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2105935 > Tested-by: Denis Brockus <dbrockus@chromium.org> > Reviewed-by: Edward Hill <ecgh@chromium.org> > Reviewed-by: Keith Short <keithshort@chromium.org> > Commit-Queue: Denis Brockus <dbrockus@chromium.org> > Auto-Submit: Denis Brockus <dbrockus@chromium.org> Bug: none Change-Id: Id2afdeb8d48d044a0a94277dfa0c388f864e838f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121178 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* usbc: null-check modep when entering DP modePeter Marheine2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | If a received message has an unrecognized SVID, pd_get_amode_data will return NULL. In some cases this is normal, but any case that uses the alternate mode data must check that it's non-NULL. When connecting a weird display that seems to incorrectly advertise displayport capabilities on a port but not actually support it, without the NULL check the EC may crash or behave unpredictably when it tries to call modep->fx->status. In practice, status was also null so it crashed in a useful fashion. BUG=b:151564636 TEST=connecting a problematic device no longer crashes the EC BRANCH=None Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I6c552fb21556dd84f54e4228b5a7eeaab4a3bbca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2108432 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* malefor: move sensors support from baseboard to boardxiong.huang2020-03-2611-24/+435
| | | | | | | | | | | | | | | | | Considering every OEM would have different requirements for the use of sensors and sensors have kinds of models. So move sensors support from baseboard (volteer) to board (halvor, malefor and volteer), there will be happy to add/change sensors in boards. BUG=b:150653745 BRANCH=none TEST=make buildall Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Ib8d38c823b26a0b1b3838c6d72daf61a10bae680 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120115 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* cleanup: drop the _TYPEC part of USB device configJett Rink2020-03-2618-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | The three USB device configurations describe more than just the Type-C layer, so remove the _TYPEC part within the define. This is also in preparation to change how the usbc build.mk includes files. This was performed with the following commands: $ git grep --name-only CONFIG_USB_TYPEC_DRP_ACC_TRYSRC | xargs perl -i -ple 's/CONFIG_USB_TYPEC_DRP_ACC_TRYSRC/CONFIG_USB_DRP_ACC_TRYSRC/g' $ git grep --name-only CONFIG_USB_TYPEC_CTVPD | xargs perl -i -ple 's/CONFIG_USB_TYPEC_CTVPD/CONFIG_USB_CTVPD/g' $ git grep --name-only CONFIG_USB_TYPEC_VPD | xargs perl -i -ple 's/CONFIG_USB_TYPEC_VPD/CONFIG_USB_VPD/g' BRANCH=none BUG=none TEST=builds Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I4deab784b7c3479cffd3dee7fb3ea3c8a9d6081c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2121193 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* nightfury: Enable base light sensorJongpil Jung2020-03-262-13/+18
| | | | | | | | | | | | | | | | | nightfury uses opt3001 for base ALS sensor. So we need to update board files for nightfury. BUG=b:149226871 BRANCH=firmware-hatch-12672.B TEST=emerge-hatch chromeos-ec flash ec and check ectool motionsense Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com> Change-Id: I86ee37140d1a74d85baec53e0dd8792bd6b77362 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2100563 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
* SM5803: Configure lower TINT thresholdDiana Z2020-03-262-10/+30
| | | | | | | | | | | | | | In order to detect when temperatures have returned to a good range and cease AP throttling, add the lower TINT threshold. BUG=b:148289370 BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id8a22c4220539e3959cd2f831552f57ab12853fd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115569 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledee: Set up ADC thresholds for PP3300_A_PGOODDiana Z2020-03-262-1/+63
| | | | | | | | | | | | | | This configures the ADC threshold interrupts for ITE dedede variants, and has them set the baseboard pp3300_a_pgood flag. BUG=b:149094481 BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0a0af6f8c7093a5ce3a618cf04d25b062e6a96d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110975 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* USB: Make handling of CC overvoltage independent of PPCsDiana Z2020-03-262-6/+6
| | | | | | | | | | | | | | | Boards may have CC overvoltage detection from other chips besides PPCs, so this removes pd_handle_cc_overvoltage() from that constraint and uses it on waddledee. BUG=b:149094279 BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: If197c4ea2308fe6113c134e6a7e293cb8a3e3c3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110974 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledee: Configure DAC for PSYSDiana Z2020-03-262-6/+7
| | | | | | | | | | | | | This commit configures the DAC module in the waddledee build and sets up the PSYS output to use it. BUG=b:149094279 BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I1b08e46f25ec3f14924b0ed9da17a8cd213ddacc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110534
* dratini: Reduce input voltage to 5V when battery fullDevin Lu2020-03-251-1/+28
| | | | | | | | | | | | | | | | | | Apply CL:1401018 for dratini. To reduce power consumption, reduce USB-C PD input voltage to 5V when the battery is full and the system is off (S5/G3). BUG=b:149890873 BRANCH=firmware-hatch-12672.B TEST=battery 90%: chgsup shows 15V or 20V, when battery full: chgsup shows 5V, power on AP: chgsup shows 15V or 20V Change-Id: Ifa013d8f696f69aeba587fa45c72413a42445728 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2104813 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* nightfury : change BC1.2 IC to Pericom 9201YongBeum.Ha2020-03-252-13/+12
| | | | | | | | | | | | | | | BC1.2 IC of nightfury is Pericom 9201. BUG=b:147798205 BRANCH=firmware-hatch-12672.B TEST=make -j BOARD=nightfury Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I0eaf4d3c9f09d005acafd5827d93b3367bc1db36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2111913 Tested-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* asurada: board.h: add more section headingsTing Shen2020-03-251-9/+12
| | | | | | | | | | | | | BUG=b:150341271 TEST=make BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I17063436ccce10304d8af46c7b2b5bf3575d97f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2107117 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* util/flash_ec: correct board nameRuibin Chang2020-03-251-1/+1
| | | | | | | | | | | | | | | | The board name was changed in mistake, CL : 2107147. Revert the name back. BUG=none BRANCH=none TEST=can flash board it8xxx2_pdevb Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Change-Id: I11aa31f3987fd10c3c41ce19c7de44e383d4b67a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2115899 Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw> Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* common: Add blink exampleCraig Hesling2020-03-253-0/+47
| | | | | | | | | | | | | | | | | | | Sometime you really just need a sanity check that the system is still ticking or that a new chip works. This is "the" rudimentary blink example. BRANCH=none BUG=none TEST=# Add CONFIG_BLINK to nucleo-h743zi board.h make BOARD=nucleo-h743zi # Flash to nucleo # Check lights are counting in binary Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Idf2d2bb245bd261806d7202f1557ced477b483c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082074 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* common/sha256: Move to third_partyNicolas Boichat2020-03-254-297/+337
| | | | | | | | | | | | | | The code originally comes from vboot_reference, and is now found on github: https://github.com/ogay/sha2 . BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I8beac95430b2126f625a3981a9ebe038ab588212 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599763 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* core/cortex-m[0]: Move core functions assembly files to third_partyNicolas Boichat2020-03-2514-765/+801
| | | | | | | | | | | | | | | | The code originally comes from libaeabi-cortexm0. It is unclear which exact git commit the code comes from, but since we have used it without issue for 5 years, it is reliable, and a refresh is probably not required at this stage. BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I910c1c4e6a46b2f0fe8b7a429f1b6f0f50c2dc21 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599762 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* core/cortex-m0/curve25519: Move code to third_party folderNicolas Boichat2020-03-258-0/+31
| | | | | | | | | | | | | | Also, add LICENSE file (some files are under CC0, some are public domain), and METADATA file. BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: Ib3a7eb9245a0634c4052064c3e36cbe2ddafbcb9 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599761 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* common/sha1: Drop support for CONFIG_SHA1Nicolas Boichat2020-03-253-178/+0
| | | | | | | | | | | | | | | Nobody is using CONFIG_SHA1 anymore (it seems like some early zinger used it, but that was moved to SHA256 in 2014), let's just drop support, and not have to worry about moving that to third_party. BRANCH=none BUG=chromium:884905 TEST=make buildall -j Change-Id: If198d63b7e388f395c8efad82763f0dfa7f1ecc7 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1600947