summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
* Power_x86: Correct the debounce delay for SYS_RESET_L signalKattamuri, Sowjanya2020-04-081-0/+11
| | | | | | | | | | | | | | | | | | | | RVP uses MAX6818 to digitize the apreset physical button. The EC SYS_RESET_L is connected to input of the digitizer. From MAX6818 Data sheet, range of 'Debounce Duration' is Minimum - 20 ms, Typical - 40 ms, Maximum - 80 ms. Hence, implemented an override function to wait for an appropriate delay. BUG=b:153128296 BRANCH=none TEST=manually tested on TGLRVP, aprset EC console command triggers warm boot Change-Id: I4f883c925a82d32bfaaeed8120671869d3744843 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2134326 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* grunt/baseboard: Slow keyboard scan rateDevin Lu2020-04-081-2/+7
| | | | | | | | | | | | | | Slow the keyboard scan rate from 60 us to 80 us. This compensates the additional delay added to the KBO line by H1. BUG=b:153470574 BRANCH=grunt TEST=make sure defect unit will not output t Key while pressing F3 key. Change-Id: I9548ccc2368ac7be5ea566577a479e98291efb29 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2141372 Reviewed-by: Edward Hill <ecgh@chromium.org>
* volteer: Move GPIO runtime configuration from baseboardKeith Short2020-04-082-22/+15
| | | | | | | | | | | | | | | | | Other boards in the Volteer board family will not use the same definitions for the CBI board version field. Move this code from the volteer baseboard to the volteer board files. BUG=b:153367561 BRANCH=none TEST=make buildall TEST=verify GPIOs on Volteer boards with board version=0 and board version=1 Change-Id: I4c3afe6929ffaa52ccc3ec0678f2b1abd5478c16 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2138146 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Dedede: Configure sensor ports as unpowered in S5/G3Diana Z2020-04-082-0/+10
| | | | | | | | | | | | | | | | Sensor i2c lines on dedede are tied to the A rails, which are off in S5/G3, so define CONFIG_I2C_BUS_MAY_BE_UNPOWERED to check the chipstate when unwedging the bus. BRANCH=None BUG=b:153195490 TEST=on waddledee, "apshutdown" can be run from the EC with no i2c wedge issues Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id5c7980b4fc687e245720b7b220fe52e1491756c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2136903 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zork: move thermal setting to variantZick Wei2020-04-071-58/+0
| | | | | | | | | | | | | This CL move thermal setting from baseboard to variant. BUG=b:153277249 BRANCH=none TEST=make buildall Change-Id: I456a00f2b72a079b875267bfa0a56dc7f87b7f9b Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2120765 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* it83xx/gpio: disable unused cc port moduleRuibin Chang2020-04-074-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | To prevent cc pins leakage and cc pins can be used as gpio. We will check if the chip supported tcpc physical port count is more than board active ITE port count. If yes, we will disable unused cc port module. BUG=none BRANCH=none TEST=1) on board it8xxx2_pdevb with chip it81202, check the pd port connection with adapter and dongle when hibernate and resume. adapter: connect dongle: disconnect then re-connect 2) on board it83xx_evb with chip it8320, set cc pins as gpio, check output level when hibernate and resume. Change-Id: I13511741b2e066dd87277db9f71f2b4a9323ad6d Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1994693 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Zork: avoid losing edges from MST hub to DP1_HPDEdward Hill2020-04-071-2/+12
| | | | | | | | | | | | BUG=b:152512560 BRANCH=none TEST=scope shows 1ms HPD pulses preserved by EC Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I37c983385582955f31f24aed65b4b2c5b15e93ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2131051 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Revert "volteer: Disable Burnside Bridge with TCPMv2"Ayushee2020-03-312-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f062e3e0e7243ee4c75f7fd0d54a4b4dadad2c21. Reason for revert: On enabling TCPMv2 and connecting a Type-C dock to port 1, the Burnside bridge gets set correctly. Original change description: > volteer: Disable Burnside Bridge with TCPMv2 > > Burnside Bridge support has not yet been ported to TCPMv2. Don't build > Burnside Bridge support with TCPMv2, but allow code that supports the > USB3 daughter board to compile. > > BUG=b:145756626 > TEST=make buildall > BRANCH=none > > Change-Id: I949cabb26779a48ce3ca3f5f3a97ccdd3f30f58d > Signed-off-by: Abe Levkoy <alevkoy@chromium.org> > Reviewed-by: Keith Short <keithshort@chromium.org> BUG=b:15030104 BRANCH=None TEST=Tested on Volteer with TCPMv2 enabled by pluging in the Type-C dock 1. Without the monitor connected 2. With the monitor connected The Burnside bridge works as expected. Able to get the HPD request on connecting the monitor. Change-Id: I69eb3605b264801c0019297f0894ff064e2af89b Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2125378 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* baseboard/kukui: correct FUSB302 VBUS turn-on delayEric Yilun Lin2020-03-311-4/+12
| | | | | | | | | | | | | | | | | TCPC FUSB302 needs more time to raise VBUS to 5V. This CL increases the delay to ensure that in SRC_DISCOVER state, the VBUS is already raised to 5V. BRANCH=kukui BUG=b:152544526 TEST=Tested on kappa, kappa source to servo-v4, and issue hard reset, and ensure they can recover from the hard reset. Change-Id: I5d656c1941c4f75410e51374ba6859d6d29776fe Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2128394 Reviewed-by: Ting Shen <phoenixshen@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-304-0/+544
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Zork: Clean up FW_CONFIG hook functionsEdward Hill2020-03-282-8/+0
| | | | | | | | | | | | 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>
* tcpmv2: reduce zork specific auto discharge disconnect codeDenis Brockus2020-03-281-1/+0
| | | | | | | | | | | | | | | | | | | 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-282-0/+4
| | | | | | | | | | | | | | | | 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>
* config: update TCPMv2 config optionsJett Rink2020-03-271-3/+0
| | | | | | | | | | | | | | | | | | | 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>
* x86: Make board_has_[before|after]_rsmrst overridableAseda Aboagye2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* zork: undo revert for zork on AutoDischargeDisconnectDenis Brockus2020-03-261-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* 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-262-0/+14
| | | | | | | | | | | | | 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>
* malefor: move sensors support from baseboard to boardxiong.huang2020-03-263-207/+0
| | | | | | | | | | | | | | | | | 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-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* Waddledee: Configure DAC for PSYSDiana Z2020-03-261-5/+5
| | | | | | | | | | | | | 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
* volteer: enable ps8815 on USB3 daughter boardCaveh Jalali2020-03-251-3/+12
| | | | | | | | | | | | | | | | | this enables the ps8815 functionality on the USB3 daughter board. note that that this relies on "early TCSS" capability being enabled in the BIOS to configure the TCSS. BUG=b:144397088 BRANCH=none TEST=USB3 flash drive shows up as 5Gbit device recovery works, also shows up as 5Gbit device. Change-Id: Ifb2c021b9df6fdf6fe0964bc9b0508469b593175 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2113639 Reviewed-by: Keith Short <keithshort@chromium.org>
* Waddledee: Complete basic EC tasksDiana Z2020-03-242-5/+270
| | | | | | | | | | | | | | | This commit adds tasks to cover PD functionality, charging, and LED behavior. The charger and TCPC functionality are a part of the ITE variant code for now, but may be moved out as OEM boards are determined. BUG=b:146557556 BRANCH=None TEST=make -j buldall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I50df3caabfae5e3981d7a8b76c0a76332f7d00a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110532 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* nucleo-f412zg: Initial board offeringCraig Hesling2020-03-246-0/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | This brings initial support for the Nucleo-F412ZG development board. This configuration is similar to bloonchipper, but without fingerprint sensor support, without rollback secret support, and with an adjusted console USART selection. The included README.md shows some quick steps to get a Nucleo-F412ZG up and running EC. Note that the RSA key included is only for test builds. It should not be used for any production builds. BRANCH=none BUG=none TEST=make BOARD=nucleo-f412zg make BOARD=nucleo-f412zg flash minicom -D/dev/ttyACM0 Change-Id: Ic1150152adbef9ed3f81aafb007be747b2c436af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1970642 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org> Tested-by: Craig Hesling <hesling@chromium.org>
* dedede: Check PG_VCCIO_EXT for ALL_SYS_PGOODAseda Aboagye2020-03-241-2/+4
| | | | | | | | | | | | | | | | | | According to the latest Intel documentation, ALL_SYS_PGOOD should also take into account PG_VCCIO_EXT. This commit does simply that. BUG=b:151783164 BRANCH=None TEST=Build and flash waddledoo, verify it still boots up. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I1035f5d128d8fdece4b0c5b4642c3f7403db2170 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2116667 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: George Engelbrecht <engeg@google.com> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: George Engelbrecht <engeg@google.com>
* nct38xx: Remove ioexpander_nct38xx.hEdward Hill2020-03-202-2/+2
| | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I830196908012778254e7306ea6a53bb3e4e4258d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110547 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* dalboz: Set usb_port_enable[] for DB optionEdward Hill2020-03-203-3/+10
| | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I9e914a767a6b0fd1d77b3c32a2414711531404f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2108337 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* dalboz: select GPIOs based on DB optionEdward Hill2020-03-203-20/+25
| | | | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I7079d989013e022fb0bc7ffa925f51e6490d864c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2101223 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* zork: split baseboard_tcpc_init to trembyle and dalbozEdward Hill2020-03-203-22/+40
| | | | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I5cae9cd365d198873c4d022dd1b166b318c1a4c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2108336 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* zork: split ioex_config[] to trembyle and dalbozEdward Hill2020-03-204-17/+53
| | | | | | | | | | | | | BUG=b:150349225 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ifc615bf8c4c5c8a684954ef932c5e9f5e60122de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2108335 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* zork: Use only AutoDischargeDisconnect to DischargeDenis Brockus2020-03-201-1/+0
| | | | | | | | | | | | | | BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ic9af1a8b3bde25b9525b20bfba84685d7d7bf21e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110545 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>
* zork: allow AutoDischargeDisconnect to be sole DischargeDenis Brockus2020-03-201-2/+3
| | | | | | | | | | | | | | | | | Guard calls to discharge if all discharge is being performed by AutoDischargeDisconnect BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ie584e5579ef816f13ce40604da80fafc76dc4777 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110544 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>
* zork: cleanup TCPMvX selection in case of roll back needsDenis Brockus2020-03-201-7/+10
| | | | | | | | | | | | | | | | | | Removed defines that are now on by default as well. Also turned FRSwap off because it is not currently working. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I4f4cb79ef69ce842be398fca1846da721c68c51b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2110543 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* volteer: Switch to TCPC VBUS detectAbe Levkoy2020-03-181-1/+1
| | | | | | | | | | | | | | | The SYV682 PPC does not interrupt when VBUS changes, which makes it difficult to use for VBUS detection. Use the TCPCs to do this. BUG=b:151102905 TEST=Charge using each Type-C port using TCPMv1 and TCPMv2 TEST=Observe no console spam when not charging with TCPMv1 and TCPMv2 BRANCH=none Change-Id: I4dd17294e756b94d844af3ed788eed7388120f3b Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2107880 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: enable battery cutoffKeith Short2020-03-171-3/+1
| | | | | | | | | | | | | | | Enable battery cutoff from console and from AP. BUG=b:143809318 BRANCH=none TEST=make buildall TEST=run "cutoff" from EC console, verify voltage on battery is 0 TEST=run "ectool batterycutoff" from AP, verify voltage on battery is 0 Change-Id: If5902a2469201da97d29db6d2e15c6b8b053efda Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2042903 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* kukui: increase PD_POWER_SUPPLY_TURN_OFF_DELAYTing Shen2020-03-171-1/+1
| | | | | | | | | | | | | | | | | The default value (50ms) is not enough for kukui platform, increase it to 250ms. BUG=b:149808890 TEST=plug in usb hub, plug in power cable to the hub verify power role swap succeed. BRANCH=kukui Change-Id: I487f0aeea78f2fc5de9a7dcc4a9a38cb831944cf Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2102171 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Juniper: Return BP_NOT_SURE when DFET status is offDavid Huang2020-03-172-2/+22
| | | | | | | | | | | | | | | | | | Make battery_is_present and battery_check_present_status overridable for customize by device. Do not return BP_NO when DFET status is off. Battery might need more charge time to wake up from shutdown. Return BP_NOT_SURE to keep charge battery. BUG=b:149971271 BRANCH=jacuzzi TEST=Insert UVP/shutdown battery and check battery resume normally. Change-Id: I68841e4e6e0457711fc4f43e6346b54805b7217c Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2091131 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Dedede: Configure PROCHOT as active lowDiana Z2020-03-161-0/+1
| | | | | | | | | | | | | PROCHOT for both waddledee and waddledoo is active low. BUG=None BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I047be61dcd2b59269898c1f0da696b24520915d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2101221 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* OCPC: Introduce charger enumDiana Z2020-03-161-0/+6
| | | | | | | | | | | | | | | This enum will specify which charger is primary, and the number of total charger chips for the board. This will be pre-defined for boards using a single charger chip. BUG=b:147440290 BRANCH=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id612ace560207a7805e103465fd4035d46beed8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2101220 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* volteer: enable DRP auto toggle and TCPC low powerKeith Short2020-03-131-2/+4
| | | | | | | | | | | | | | Enable TCPC auto toggling and enable TCPC low power mode for Volteer. BUG=b:145250123, b:149974946 BRANCH=none TEST=make buildall TEST=Verify connection of SRC and SNK devices to USB C0 on Volteer. Change-Id: Ida0c62ac9488f01992ba4e0b1689a8f67ef81ae8 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2073278 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* kukui/dynamic-pdo: setting input current limit correctlyEric Yilun Lin2020-03-131-7/+17
| | | | | | | | | | | | | | | | While the input current is restricted when charger throttling, we should consider the previous set current limit, rather than just only the PD_MAX_CURRENT_MA. Otherwise, the power source's ability would be ignored, and will request more than the power source can provide. BRANCH=kukui BUG=b:147852834 b:141903096 TEST=Plug 9V/2A PD charger, and ensure krane drains under 2A. Change-Id: I8a0c99cad1c61e556af13ca166fdd0e3664af55d Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2100370 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Mushu : enable GPU temperature sensor driver in Mushuloganliao2020-03-131-0/+3
| | | | | | | | | | | | | | BUG=b:148968367 BRANCH=none TEST=make BOARD=mushu Change-Id: I20e1ebd8714e3d4b3b990d6e2a38f415afd8b5c5 Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2082303 Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Logan Liao <logan_liao@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
* baseboard/ite_evb: create ite_evb baseboardRuibin Chang2020-03-124-0/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The development board of it83xx and it8xxx2 have common code and config options which are moved to baseboard ite_evb. And we create another board for PD EVB based on baseboard ite_evb. BUG=none BRANCH=none TEST=on baseboard ite_evb: 1.test board it83xx_evb and it8xxx2_evb: successfully Flash EC image and boot on chip it8320 and it83202. 2.flashrom by ite_spi test: $ sudo ./util/flash_ec --board=it8xxx2_evb --verbose INFO: Using servo_v2. INFO: Using ec image : /mnt/host/source/src/platform/ec/build/ it8xxx2_evb/ec.bin dut-control --port=9999 i2c_mux_en:on dut-control --port=9999 i2c_mux:remote_adc INFO: Flashing chip ite_spi. dut-control --port=9999 cold_reset:on dut-control --port=9999 fw_up:on dut-control --port=9999 cold_reset:off dut-control --port=9999 fw_up:off dut-control --port=9999 spi1_vref:pp1800 spi1_buf_en:on dut-control --port=9999 spi1_buf_on_flex_en:on INFO: Running flashrom: sudo /usr/sbin/flashrom -p ft2232_spi:type=servo-v2,port=B, serial=911416-00012 --flash-size flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64) flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64) INFO: Programming EC firmware image. INFO: Running flashrom: /usr/sbin/flashrom -p ft2232_spi:type=servo-v2,port=B, serial=911416-00012 -w /tmp/flash_spi_6163 flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64) flashrom v0.9.9 : : on Linux 4.15.0-76-generic (x86_64) Calibrating delay loop... OK. Erasing and writing flash chip... Verifying flash... VERIFIED. SUCCESS INFO: Flashing done. INFO: Restoring servo settings... dut-control --port=9999 cold_reset:off dut-control --port=9999 i2c_mux_en:on dut-control --port=9999 i2c_mux:remote_adc dut-control --port=9999 spi1_vref:off dut-control --port=9999 spi1_buf_en:off dut-control --port=9999 spi1_buf_on_flex_en:off dut-control --port=9999 cold_reset:on dut-control --port=9999 cold_reset:off 3.test board it8xxx2_pdevb: successfully Flash EC image and boot on chip it83202. Connection with adapter and dongle are able to ready state. Change-Id: Ib6371b61c27980eb9977548177efb8c896e72d47 Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Signed-off-by: tim <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2071551 Reviewed-by: Jett Rink <jettrink@chromium.org>
* dedede: Require >15W to boot without a batteryAseda Aboagye2020-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | Waddledoo appears to have issues booting with just a 15W supply. Therefore, this commit sets the minimum power required to boot to be greater than 15W such that a PD contract is required. Otherwise, if the battery is present and has greater than 1% SOC, then booting is allowed. BUG=b:150702984 BRANCH=None TEST=build and flash waddledoo, plug in a 15W non PD charger, verify that the system does not attempt to boot the SoC. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I165de0aa6c7185c8087328a427b0bb1eefb21e8d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2097137 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* variant trembyle: use fw_config for mux initializationDenis Brockus2020-03-125-220/+22
| | | | | | | | | | | | | | | | Setup the usb_muxes table to the correct values based on fw_config instead of using probing. BUG=none BRANCH=none TEST=verify USB is still working Signed-off-by: Denis Brockus <dbrockus@chromium.org> Change-Id: I7550d15d563f987def4fe70d52a55e31b655b753 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2094743 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* trembyle: change set_mux calls to be board namesDenis Brockus2020-03-111-4/+6
| | | | | | | | | | | | | | | | ps8802_set_mux and ps8818_set_mux were confusing at the board level with the same names as the main driver function names. So added board_ in front BUG=none BRANCH=none TEST=make buildall -j Signed-off-by: Denis Brockus <dbrockus@chromium.org> Change-Id: I2123b0d11823b5a01e14a8efb58cf579dc513d2f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2095530 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* trembyle: move ps8811 from variant to boardDenis Brockus2020-03-111-56/+0
| | | | | | | | | | | | | | | The USBA retimer is only on the Zork:Trembyle:Trembyle board so don't include it in the Zork:Trembyle vriant BUG=b:151099955 BRANCH=none TEST=make buildall -j Signed-off-by: Denis Brockus <dbrockus@chromium.org> Change-Id: I3dae1fee52255bdc6f51dc4225e46d8f7a254a15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2095529 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>