summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
* krane: add it5205 driverTing Shen2019-09-052-9/+12
| | | | | | | | | | | | | | | | | | | | | | | An it5205 is added in kukui/krane rev 5, and deprecated gpio pin USB_C0_DP_OE_L and USB_C0_DP_POLARITY. This CL is intended to make the fw works for both old and new boards: 1) the default usb_mux driver is updated to rev 5, and board_rev_init may change it back for old boards. 2) keep VARIANT_KUKUI_DP_MUX_GPIO in kukui/board.h, and add a customized function to set/clear these gpio pins. BUG=b:135079572 TEST=verify that type c display works on board rev 4/5 BRANCH=master Change-Id: Ibe28816eed026ccb8a9a5234a612f80b038884f1 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1785197 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* config: Refactor CONFIG_ACCEL_FIFO to enable use of IS_ENABLEDYuval Peress2019-09-035-13/+20
| | | | | | | | | | | | | | | This change allows us to use the IS_ENABLED condition to replace the various ifdef guards around the CONFIG_ACCEL_FIFO BUG=b:137758297,chromium:981990 BRANCH=None TEST=buildall and CTS tests on Arcada Change-Id: I65d36bac19855e51c830a33e6f3812575e8d15d9 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704164 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* grunt: Disable ec_feature kbbacklit for barla refresh SKUsDevin Lu2019-08-291-0/+1
| | | | | | | | | | | | BUG=b:139686328 BRANCH=grunt TEST=make buildall -j Change-Id: I588874c2f4f9556137d4cc9e895c3f2f6aaa5436 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1772868 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* jacuzzi: disable adc after board version detectedTing Shen2019-08-291-0/+10
| | | | | | | | | | | | | | | | | | | | This CL reverts the change in CL:1416074 for devices without POGO pin. To reduce power consumption, we should to disable adc module if it's only used by one-off board/sku id init. For devices with pogo, keep adc enabled for device type detection. BUG=b:138180455 TEST=dut-power in G3, verify that power consumption is lower BRANCH=master Change-Id: I5ca69adf99bba91f86527e377a45e42b021ee310 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741567 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Krane: Override the charger_profile_override based on battery SPECLeo Zhou2019-08-261-3/+71
| | | | | | | | | | | | | | | | Based on the battery specification modify the battery_info and restructure the charger_profile_override BUG=b:139012888 BRANCH=master TEST=Do a charge Test under extreme temperature Change-Id: I2f85abe98d4e7f73f77c6ff0091fb0cb144e2769 Signed-off-by: Leo zhou <zhoubo@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1746349 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* tglrvpu_ite: Enable fan and temperature sensorVijay Hiremath2019-08-243-19/+53
| | | | | | | | | | | BUG=b:139882986 BRANCH=none TEST=Manually tested on tglrvp. Fan works as per thermal profile. Change-Id: I04b9b5b6319c484932ccdd0703b4cd56d203b9d9 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1768931 Reviewed-by: Keith Short <keithshort@chromium.org>
* hatch: Remove unused board_set_vconn functionScott Collyer2019-08-241-11/+0
| | | | | | | | | | | | | | | | This function had been incorrectly added to baseboard.c, but was never required to be there. This CL removes this unsed function. BUG=b:139761723 BRANCH=None TEST='make BOARD=hatch' Change-Id: I9025fc6c7a49742186e520fdd09525e4ba256b47 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1764709 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* Hatch: add board-specific hook to disable/enable KB backlightben.chen2@quanta.corp-partner.google.com2019-08-232-7/+16
| | | | | | | | | | | | | | | | This patch add enable/disable kb backlight during suspend/resume. BUG=b:138326244 BRANCH=master TEST=None Change-Id: I8c88d63c0d6a5a425e2210b9edca91da174b7429 Signed-off-by: ben.chen2@quanta.corp-partner.google.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1730373 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org> Tested-by: David Huang <David.Huang@quantatw.com>
* tglrvpu_ite: Adding VCONN supportAyushee2019-08-236-3/+40
| | | | | | | | | | | | | | | Added GPIOs pin config to support VCONN on tglrvp. Also added power switch function to enable/disable VCONN according to the cc lines. BRANCH=None BUG=b:139763031 TEST=Able to get characteristics of an E-marked cable Change-Id: Ib09307aafe68ea955f256d3f35670579072c3040 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1762591 Reviewed-by: Keith Short <keithshort@chromium.org>
* common: Move fifo logic out of motion_sense.cYuval Peress2019-08-232-0/+4
| | | | | | | | | | | | | | | | | | | | This change is needed to allow better testing of the fifo behavior. Additionally, motion_sense_fifo.c will only be compiled if CONFIG_ACCEL_FIFO is defined. This behaviour requires a few small changes to several boards and baseboards to make sure that we only define CONFIG_ACCEL_FIFO when the MOTIONSENSE task is present (some times that may be only in one section RW or RO). BUG=b:137758297 BRANCH=None TEST=buildall and ran CTS on arcada Change-Id: I2f7e4e436ba9568a35b7a0b2c8d53a73f198ba73 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704163 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Alexandru M Stan <amstan@chromium.org>
* baseboard/intelrvp: Avoid including "usb_pd_tcpm.h" from baseboard.hYu-Ping Wu2019-08-212-1/+1
| | | | | | | | | | | | | | | | | | | | | board/tglrvpu_ite/board.h includes baseboard.h, which includes usb_pd_tcpm.h, which includes ec_commands.h, which includes board.h again, leading to compilation failure in CL:1535086. This patch breaks the circular dependency by removing "usb_pd_tcpm.h" inclusion in baseboard.h. To make baseboard/intelrvp/retimer.c compilable, "compile_time_macros.h" is also included since it is where BUILD_ASSERT is defined. BRANCH=none BUG=b:109900671,b:118654976 TEST=make buildall -j Change-Id: Ifdf6594f4eb3a2f732bc5979c0fbb0c79ee15ddf Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1760656 Commit-Queue: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* baseboard/kukui: remove incorrectly defined flagsTing Shen2019-08-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The expected usage of baseboard.h is: <in board.h> #define VARIANT_KUKUI_SOMETHING ... #include "baseboard.h" If some VARIANT_KUKUI_* flag is also defined/removed in baseboard.h, it will overwrite board's config. As a result, baseboard.h should not define any of the VARIANT_* flags. Move VARIANT_KUKUI_DP_MUX_GPIO into comment for document propose only. BUG=b:139648560 TEST=verify both direction of dp works BRANCH=master Change-Id: I0b4f6afa07657ee4cd1495d302e026a99e770640 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1761752 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* driver/tcpm/it83xx: Enable TCPC receive SOP'Ruibin Chang2019-08-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable TCPC receive SOP' for communication with cable, when we are Vconn source role. BUG=None BRANCH=None TEST=test on board: ampton and reef_it8320 1.SRC connects to SNK via E-mark cable, sources Vconn successfully, and receives cable's ack of discover id request. 2.SRC connects to SNK via E-mark cable, but not source Vconn to cable, and receives nothing of discover id request (this isn't effect on request SNK flow). 3.console cmd pdcable 0 2019-07-30 11:43:40 > pdcable 0 2019-07-30 11:43:45 Cable Type: Passive 2019-07-30 11:43:45 Connector Type: Type C 2019-07-30 11:43:45 Cable Current: 5A 2019-07-30 11:43:45 USB Superspeed Signaling support: Gen 1 Change-Id: Icd2e6f8481bb7a4e0b922460d46b831f36112738 Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1728669 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* treeya: enable motion sensor drivers and fix ec feature flagPaul Ma2019-08-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Treeya use two sets of base/lid sensors, one is BMI160/KX022 which is supported by baseboard, another is LSM6DS3TR/LIS2DWL. This patch will enable one of them according to sku_id. This patch also remove keyboard backlight feature from ec feature flags according to sku_id since both Treeya and Treeya360 do not support keyboard backlight. BUG=b:138744661, b:137945787, b:137849739 BRANCH=none TEST=boot treeya boards which mounted BMI160/KX022 or LSM6DS3TR/LIS2DWL, use 'accelinfo on' to enable sensor output, make sure that their x/y/x value are correct. Cq-Depend: chromium:1741598, chromium:1751302 Change-Id: I213a2073c2232ef0f2f70be788f859a264e09425 Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1746006 Tested-by: Martin Roth <martinroth@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org>
* Grunt/Treeya: Add ANX3447 variant for TCPC 0.Paul Ma2019-08-212-1/+195
| | | | | | | | | | | | | | | | | | | Merge common TCPC code into baseboard, and add choice of ANX3429 or ANX3447 for port 0 TCPC. Treeya uses ANX3447, all others use ANX3429. BUG=b:138744661 BRANCH=none TEST=build -j BOARD=treeya Change-Id: I66f84ae50be0b5fe80479dfdc699717427e4457c Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1751302 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org>
* driver: IO expander: nct38xx: add the interrupt supportCHLin2019-08-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IO pins of Nuvoton TCPC NCT38XX chips have the ability to support the interrupt function. This commit adds the driver to support it. However, please note that if the system needs to use an IO on NCT38XX to support the interrupt, the following two consideration should be taken into account. 1. Interrupt latency: Because it requires to access the registers of NCT38XX via I2C transaction to know the interrupt event, there is some added latency for the interrupt handling. If the interrupt requires short latency, we do not recommend to connect such a signal to the NCT38XX. 2. Shared ALERT pin: Because the ALERT pin is shared also with the TCPC ALERT, we do not recommend to connect any signal that may generate a high rate of interrupts so it will not interfere with the normal work of the TCPC. BRANCH=none BUG=none TEST=No error for "make buildall" TEST=Apply this and related CLs, manually test each IO pins; make sure each pin's interrupt handler is correctly executed. Change-Id: I72d835557913d87097b2e0d82165e40fe132ca77 Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1734948 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com>
* log: Preserve Kukui EC reset logs across every EC reboot on SRAM.Shannon Chen2019-08-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Kukui, we need to put console logs and reset reasons at fixed addresses on SRAM to save the information across each EC resets. Otherwise, EC will lose console logs and reset reasons after resetting EC. This CL ensures that the contents of reset and console logs will not be clobbered or cleared by putting mandatory symbols at a fixed location on SRAM. The values will only be reset when checksum or sanity check fails. BUG=b:133795403 TEST=1. On Kukui, shutdown AP, reboot AP, or sysjump, and see the previous logs before reboot will be kept on /var/log/croc_ec.log 2. Reset reasons can be viewed with ectool uptimeinfo BRANCH=master Change-Id: I19db49101fda1675dc2fdc047b7f14af77cdb6e6 Signed-off-by: Shannon Chen <shannc@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1716671 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Shannon Chen <shannc@chromium.org> Tested-by: Shannon Chen <shannc@chromium.org>
* Volteer: add I2C bus configurationKeith Short2019-08-202-0/+61
| | | | | | | | | | | | | Configure I2C pins and i2c_ports for Volteer BUG=none BRANCH=none TEST=make BOARD=volteer, make buildall Change-Id: I3834a18a94565566b839d1e34befb180a366177c Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1758534 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Volteer: Add initial AP signalsKeith Short2019-08-201-0/+12
| | | | | | | | | | | | | | Enable ESPI interface and support for IceLake chipset. Configure reset and power button signals. BUG=none BRANCH=none TEST=make BOARD=volteer Change-Id: I6f06a71fc2516781fe3c23b997310a960e6e0bb8 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1758533 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Trembyle: Make GPIO names match schematicEdward Hill2019-08-203-18/+17
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=make BOARD=trembyle Change-Id: I870bb384e59468c91ad19ebfbdf6d376438ae7ba Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1755648 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Trembyle: update usb_pd_policyDenis Brockus2019-08-201-15/+28
| | | | | | | | | | | | | | | | | | Update some of the latest usb_pd_policy fixes that did not migrate to the code base used for trembyle https://crrev.com/c/1450815 https://crrev.com/c/1585121 https://crrev.com/c/1742870 BUG=b:139351980 BRANCH=none TEST=make buildall -j Change-Id: I536c1c19acaf72c66ca2ed3e6729a88f3f524344 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1754583 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Volteer: initial EC board setupKeith Short2019-08-203-0/+73
| | | | | | | | | | | | | | | | Create Volteer skeleton build. Only includes base NPCX7 configuration required to build. BUG=none BRANCH=none TEST=make BOARD=volteer, make buildall TEST=Booted skeleton volteer EC image on careena board. Change-Id: I07769edfac9818320f18bbc9d0ebcd8f345fb8bb Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1758532 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* usb: de-dup common code from old and new PD stackJett Rink2019-08-191-1/+0
| | | | | | | | | | | | | | We still need to pull out more common code between the two stacks, but this is scaffolding with a few examples. BRANCH=none BUG=b:137493121 TEST=unit tests pass Change-Id: Ibd9dda1e544e06f02aa3dde48ca7de1539700cfa Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1744655 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* kodama: Support smart batterystabilize-12428.Bxiong.huang2019-08-161-1/+2
| | | | | | | | | | | | | | | | | Provide SMP and Celxpert smart battery initial files. BUG=b:136977971, b:138826367 BRANCH=master TEST=boot ec, verify that ec console prints 'found batt:SMP' or 'found batt:Celxpert'. Cq-Depend:chromium:1730377 Change-Id: I607fc41c51e8b27acddefda4dcd2ea02a7597a0f Signed-off-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731211 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Paul Ma <magf@bitland.corp-partner.google.com> Tested-by: Paul Ma <magf@bitland.corp-partner.google.com>
* tglrvp_ite: Add TGL-U/Y RVP base codeDaniel Gonzalez2019-08-156-17/+45
| | | | | | | | | | | | | | | | | | | | | | Added TGL-U/Y RVP base code using ITE EC. Following features are enabled. 1. TCPC + retimer 2. Charger 3. Battery 4. Power sequencing 5. Host communication 6. LED 7. Keyboard BUG=b:138597987 BRANCH=none TEST=Both TGLRVP U&Y can boot to ChromeOS Change-Id: Idf6be38796c26b31be6e13485a63ec13487bf954 Signed-off-by: Daniel Gonzalez <daniel.d.gonzalez@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1726943 Reviewed-by: Keith Short <keithshort@chromium.org>
* kukui: enable CONFIG_CHARGER_MT6370_BC12_GPIOTing Shen2019-08-151-0/+1
| | | | | | | | | | | | | | | Apply the new option in CL:1575050 to Kukui devices with MT6370. TEST=Verify that krane is able to detect BC12 DCP. BUG=b:122866184 BRANCH=None Change-Id: I18f17af3672a364952779dcc2ee19b05b0459e20 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1753566 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Trembyle: enable external 32K crystal oscDenis Brockus2019-08-141-0/+3
| | | | | | | | | | | | BUG=b:138601174 BRANCH=none TEST=make buildall -j Change-Id: Ic2b285a0d1c1f4a43b62bee3db760fedae3bfe6f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1752599 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* usb_mux: Send DP safe mode info to virtual MUXVijay Hiremath2019-08-141-1/+3
| | | | | | | | | | | | | | | | | Before entering into alternate mode, state of the USB-C MUX needs to be in safe mode so that the USB-C pins cab be re-purposed without getting damaged or do not damage their Port Partner. Hence, sending the DP safe mode info to virtual MUX from EC. BUG=b:139140865 BRANCH=none TEST=Manually tested on Intel RVP, MUX is able to configure to safe mode before entering alternate mode. Change-Id: I3715b5118112b7744407ac5e652f63f6d7cd0a1b Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1745540 Reviewed-by: Keith Short <keithshort@chromium.org>
* octopus: reduce USB-C source current to 1.5Alu.zhang2019-08-131-1/+0
| | | | | | | | | | | | | | | | octopus hardware does not support sourcing 3A over USB-C and 1.5A over USB-A at the same time for any daughter board. Reduce what we advertise to 1.5A. BRANCH=none BUG=b:139110010,b:139201733 TEST=connect a sink device with a pd analyzer to see if source capabilities is 5V/1.5A Change-Id: Idad7a11b28cefda1aabbca540864a6248d826a47 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741597 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: Change port 1 PPC to NX20P3483Denis Brockus2019-08-132-5/+6
| | | | | | | | | | | | BUG=b:138599218 BRANCH=none TEST=make buildall -j Change-Id: If68259e289a2b3e052028ff0b2ffd59076eaf970 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1745569 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* kukui: Check IRQ and HPD in DPStatus message.Pi-Hsun Shih2019-08-121-1/+1
| | | | | | | | | | | | | | | | | | | Per the VESA DisplayPort Alt Mode on USB Type-C spec, IRQ_HPD indicates that a high to low followed by a low to high transition was detected. Therefore, we should be checking when IRQ is high and HPD is low is received as that is an error. This commit fixes that bug where were comparing our level to the GPU instead of what was shown in the PDO. This is basically applying CL:1422458 to kukui. BUG=b:138696135 BRANCH=none TEST=manually Change-Id: I53e6d96a54dc45910055a7d535bf89477ce87430 Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1743906 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* hatch: Allow data role swaps when EC is in ROScott Collyer2019-08-091-9/+2
| | | | | | | | | | | | | | | | | | | | | | | Data role swap requests were being rejected when the EC was running RO. This can result in our type C ports attaching in the wrong data role in cases such as dead battery. The rationale for this PD policy is no longer valid as data/power roles are perserved during RO to RW sysjumps. This CL removes the check for RO such that data role swaps are allowed. BUG=b:138618816 BRANCH=none TEST=Tested by issuing battery cutoff command, then connected a powered charger though hub. Verfied that data role swap request is no longer reejected and the USB device attached to the hub enumerates as expected. Change-Id: Ic63ecde3336ba4c64492d9f727035c8fea936e8f Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1742870 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Trembyle: enable throttle ap to allow the system to use fanDenis Brockus2019-08-081-0/+3
| | | | | | | | | | | | BUG=b:138600244 BRANCH=none TEST=make buildall -j Change-Id: I31b662bbd14388e238d1bd4fd1b5597824dd5749 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741300 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Zork: cleanup USBC related arraysKeith Short2019-08-081-4/+7
| | | | | | | | | | | | | | | | Fix some consistency problems with the USBC related arrays. Add some addtional BUILD_ASSERTS to ensure port counts are correct. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Ib68ae887288e8171ef02f2544ec28bb0ca633780 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1744649 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* isl9241: add charger_get_vbus_voltageDenis Brockus2019-08-081-1/+0
| | | | | | | | | | | | BUG=b:138600692 BRANCH=none TEST=make buildall -j Change-Id: Idd20b1833945e37a84db4e7c444d8974f6059f83 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1742532 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: add fan supportDenis Brockus2019-08-082-0/+82
| | | | | | | | | | | BUG=b:138600244 BRANCH=none TEST=make buildall -j Change-Id: Ibaf217e9fccf76dff6b70ae529e089367db89221 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1742039 Reviewed-by: Keith Short <keithshort@chromium.org>
* baseboard/kukui: refactor smart battery codeTing Shen2019-08-082-52/+5
| | | | | | | | | | | | | | | | | | | | - Use common fuel gauge implenentation in battery_fuel_gauge.c for things like cutoff and get_info - Move battery characteristics data into per-board folder, so follower devices can add their own battery. - Move Jacuzzi-only battery_hw_present() into per-board folder BUG=b:136977971 TEST=boot ec, verify that ec console prints 'found batt:PANASONIC' BRANCH=master Change-Id: Ib4d33a2d3b4e1e061b390a000071f805d4780c27 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1728671 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
* baseboard/kukui: enable suppressing HCYilun Lin2019-08-071-0/+3
| | | | | | | | | | | | | | | | Some of the HCs are too noisy. TEST=hcdebug normal, and see HC are suppressed BUG=none BRANCH=none Change-Id: Ib095a0df3491c9be9e4df6b71441eabb666d747d Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741107 Tested-by: Yilun Lin <yllin@chromium.org> Auto-Submit: Yilun Lin <yllin@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Yilun Lin <yllin@chromium.org>
* Hatch: Enable CBI info of board skuben.chen2@quanta.corp-partner.google.com2019-08-062-1/+24
| | | | | | | | | | | | | | | This patch enables get board sku BUG=b:138326244 BRANCH=master TEST=None Change-Id: I489de71c75804dd460bda98fa1c49b94c91c8a12 Signed-off-by: ben.chen2@quanta.corp-partner.google.com Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1716674 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: David Huang <David.Huang@quantatw.com> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* Trembyle: update usb_pd_policyDenis Brockus2019-08-052-6/+52
| | | | | | | | | | | | BUG=b:138599669 BRANCH=none TEST=make buildall -j Change-Id: I125a40e316f4d6431412851bd6bd3c8c57118365 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1737132 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: implement board_set_active_charge_portDenis Brockus2019-08-051-0/+57
| | | | | | | | | | | | | | BUG=b:138599952 BRANCH=none TEST=make buildall -j Change-Id: I82ef7cad0cd6d91d1e4bbcc0d1a2d312dd773e8f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1736797 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Trembyle: implement system_get_sku_idDenis Brockus2019-08-051-1/+7
| | | | | | | | | | | | BUG=b:138600504 BRANCH=none TEST=make buildall -j Change-Id: Ibaa43ae3976c171fc715aef380e0f9f26951b432 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1736695 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: Fix USB-C TCPC driversDenis Brockus2019-08-022-4/+97
| | | | | | | | | | | | | | Add NCT3807 USB-C TCPC drivers BUG=b:138600238,b:138599948 BRANCH=none TEST=make buildall -j Change-Id: Id98df51748beb60e787350265127936b18f4cf46 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1728478 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Trembyle: Add USB-C PPC driversDenis Brockus2019-08-022-3/+69
| | | | | | | | | | | | | | Add SN5S330 USB-C PPC drivers BUG=b:138599218 BRANCH=none TEST=make buildall -j Change-Id: I697dbba1f5c5bbc809e0de9a633d9102596a3a98 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1729529 Commit-Queue: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* hatch: Add charger-related configs for low-battery bootingTim Wawrzynczak2019-08-021-0/+7
| | | | | | | | | | | | | | | | | When there is a battery that isn't communicating, the DUT should not boot the AP in order to avoid brown outs after the system jumps to RW and can begin PD negotiation. BUG=b:136970148 BRANCH=none TEST=Disable PD negotiation in RO, cutoff battery, plug in A/C, and verify that the DUT stays in G3, and doesn't attempt to boot the AP, because Hatch's battery is slow to come back from cutoff (>10 s). Change-Id: I6f53ce83e89520369e9761a64133839b3c162b91 Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731976 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* kukui: fix incorrect input power limitTing Shen2019-08-021-5/+2
| | | | | | | | | | | | | | | | | | | This CL includes two major changes: - set input current in board_set_charge_limit() instead of charger_profile_override(). - remove board revision constraint, apply the fix to all kukui/kranes. BUG=b:134227872 TEST=manually, boot with new fw and measure the power. BRANCH=master Change-Id: Ib826e805990fe3e9af5a88c231825bd477592e49 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1730378 Reviewed-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Trembyle: Add IO expandersEdward Hill2019-07-312-11/+39
| | | | | | | | | | | | | | Add NCT3807 IO expander drivers and GPIO definitions. BUG=b:138599199 BRANCH=none TEST=make BOARD=trembyle Change-Id: I1257263225b4146a4a87d350921189b90a2b3901 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1726941 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* jacuzzi: bringup ecTing Shen2019-07-312-0/+20
| | | | | | | | | | | | | | | | | | | | Initial version of jacuzzi ec. The files are basically copied from board/kukui/, battery and charger configured to the correct i2c port and component, and pogo / sensor removed. BUG=b:135895590 TEST=verify that this is bootable on a Jacuzzi, charger and battery looks good, and no error message spamming on ec console. BRANCH=master Change-Id: Ia786076c08019dd2aa1711a68ff1c82cc7fa45ed Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1673955 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* baseboard/kukui: add smart batteryTing Shen2019-07-313-0/+116
| | | | | | | | | | | | | | | Add a smart battery for implementation Kodama and Jacuzzi. BUG=b:137172860 TEST=boot on a jacuzzi, verify that `battery` command looks good BRANCH=master Change-Id: Ifdaf3c700ea9dccb7f60a266395644daec4eab2f Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725387 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* baseboard/kukui: support battery/charger variantsTing Shen2019-07-317-118/+215
| | | | | | | | | | | | | | | | | | This CL introduces config option VARIANT_KUKUI_BATTERY_* and VARIANT_KUKUI_CHARGER_* for derivatives to pick their battery / charger option. BUG=b:137172860 TEST=build and deploy on Krane, verify that `battery` and `charger` console output looks reasonable. BRANCH=master Change-Id: Ic5c33a233ec30c9bc71414c95603157301281041 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1697781 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>