summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* waddledoo/magolor: Add check for CFET disabledAseda Aboagye2020-08-262-0/+28
| | | | | | | | | | | | | | | | | This commit adds the function to check whether the charge FET (CFET) is disabled or not for waddledoo and magolor. BUG=b:160918663 BRANCH=None TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I843d3a2d25c42d861ac86964a3e0ec8d557d97f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370043 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* waddledee: Add Sony Battery CFET mask & valAseda Aboagye2020-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | The Sony battery being used on waddledee sometimes randomly disables the charge FET (CFET) in order to perform some impedence measurements. This commit adds the fields for the CFET disable status such that it can be retrieved by the system. BUG=b:160918663 BRANCH=None TEST=Build and flash waddledee, verify that CFET disable status is reflected. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I6487e36724683b3d81ad1063b2609a883d60570d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370042 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* battery_fuel_gauge: Add check for CFET statusAseda Aboagye2020-08-262-14/+62
| | | | | | | | | | | | | | | | | | | This commit adds a function that allows the system to check the if the charge FET (CFET) is disabled or not. BUG=b:160918663 BRANCH=None TEST=Build and flash waddledee; cutoff battery, revive system, verify that "found batt in disconnect" statements are still found. TEST=Add other code, verify that CFET status is able to be retrieved. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I899070e50a38499708a367bba6b5f502b0232672 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368071 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* zork: Set HDMI DATA_EN with POWER_ENEdward Hill2020-08-267-4/+10
| | | | | | | | | | | | | | | Avoid setting IOEX_HDMI_DATA_EN_DB high when power is off. This prevents leakage in S3 and S5. BUG=b:158266701 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I9f1c02b3631887661905be1e65be5d4d8b9f8e66 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2375803 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Ezkinil: pull HDMI_DATA_EN_DB low at suspendSue Chen2020-08-261-0/+2
| | | | | | | | | | | | | | | | HDMI EA 7-3 test fail because HDMI_DATA_EN_DB floating in S3/S5 cause 0.7V leakage. Therefore, pull HDMI_DATA_EN_DB low at suspend and pull high when the system enter S0. BUG=b:158062907 BRANCH=zork TEST=make sure that fix 0.7V leakage Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I6e3e0f26f63a707670c270c522c3598dc0104a13 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2373851 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Eldrid: Add batteries configurationlennon chen2020-08-252-23/+50
| | | | | | | | | | | | | | | Add batteries: 1.SIMPLO HIGHPOWER battery 2.COSMX battery BUG=none BRANCH=none TEST=make buildall -j Change-Id: Iac959e5e3f0199f616b9ebbeda3aabced82d3ea2 Signed-off-by: lennon chen <lennon_chen@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2371789 Reviewed-by: caveh jalali <caveh@chromium.org>
* eve: Remove CONFIG_SYSTEM_UNLOCKEDDuncan Laurie2020-08-251-6/+0
| | | | | | | | | | | | | | | | | | Remove this debug feature on the Eve firmware branch. BUG=b:35582164 BRANCH=eve TEST=manual testing on Eve Change-Id: I620e42b118a40492c9db664b208ad5ce78bf4f0c Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/573144 Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2319996 Tested-by: Patryk Duda <pdk@semihalf.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Patryk Duda <pdk@semihalf.com>
* bb retimer: Use mutex to lock the access to shared NVMVijay Hiremath2020-08-2510-36/+29
| | | | | | | | | | | | | | | | | | | If the BB retimer has a shared NVM we need 40ms delay after releasing the RESET line to synchronize, load and initialize both the retimers. On a non-shared NVM we need 20ms delay to load and initialize. In order to synchronize, instead of 40ms delay this CL uses a MUTEX to lock the access of another retimer by not releasing the RESET line until the first retimer completes initialization. BUG=b:165895649 BRANCH=none TEST=Tested on volteer(non shared NVM), tglrvpu_ite (shared NVM) Retimer is able to initialize (DP, USB, TBT, USB4 are detected) Change-Id: I709377c2e6401faa26871289143d71665ee516d1 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368223 Reviewed-by: Keith Short <keithshort@chromium.org>
* voxel: add voxel_npcx797fc build targetBen Chen2020-08-253-0/+15
| | | | | | | | | | | | | | Add the voxel_npcx797fc build target to test Voxel boards reworked with the NPCX797FC EC. BUG=b:163687531 BRANCH=none TEST=make buildall, workable on the re-worked Board. Change-Id: I03ea3957de033c4abe2c66a416c258ef44aeb3d4 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364332 Reviewed-by: Keith Short <keithshort@chromium.org>
* madoo: add Power LED behaviorLeo-Tsai2020-08-254-77/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On madoo, we have a LED indicator with following: Power LED: System S0: White. System S0ix: Blinking white (1 sec on, 1 sec off) System S5/G3: Off. Battery LED: DC mode: System S0: off. System S5/G3: Off. System battery low: Blinking white (1 sec on, 1 sec off) AC mode: Charging: Amber. Full charged: White. only AC without battery: Blinking Amber (0.5 sec on, 0.5 sec off). BUG=b:163935841 BRANCH=none TEST=test on waddledoo reference board ,battery 、 Power LEDs are work. Signed-off-by: Leo-Tsai <leocx_tsai@compal.corp-partner.google.com> Change-Id: I633582dfbcf2a0050d3c30f9a70ff838f2cfcdc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2352958 Reviewed-by: Diana Z <dzigterman@chromium.org>
* asurada: enable CONFIG_BOARD_RESET_AFTER_POWER_ONTing Shen2020-08-251-0/+1
| | | | | | | | | | | | | BUG=b:163963220 TEST=make buildall BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1dd184e564ad3bd2e5c691911aa45d0127bfcada Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2371752 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* it83xx: fix incorrect reset cause when boot from z-stateTing Shen2020-08-252-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the following features to support z-state for Asurada. 1) Call chip_save_reset_flags() before entering board_hibernate_late() to make sure the hibernate flag saved before ec powered off. 2) Handle the second ec reset correctly if CONFIG_BOARD_RESET_AFTER_POWER_ON enabled. BUG=b:163963220 TEST=Check the reset cause under following cases: 1) boot from z-state -> reset-pin power-on hibernate initial-pwr 2) boot from cutoff -> reset-pin power-on initial-pwr 3) `ecrst pulse` in cr50 console -> reset-pin power-on initial-pwr BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I176075ea2b3f6b2abbfe22e47f3019ee23af57a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2371751 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* asurada: implement ULP modeTing Shen2020-08-252-1/+18
| | | | | | | | | | | | | | | | | Implemented ultra low power mode by pulling EN_SLP_Z, with a known issue that reboot reason is not configured correctly before entering hibernate. BUG=b:162790592 TEST=manually BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Idbee7914fc261d74bdc70c2858befdfbd83c40e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2342986 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* isl9238c: implement hibernate/resumeTing Shen2020-08-252-0/+60
| | | | | | | | | | | | | | | | | Implemented isl9238c_hibernate/resume for ulp mode. And added a helper method raw_update16 for the read-update-write register flow. BUG=b:162790592 TEST=make BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I0c3d80aaf6e1290da299b27d88961806295c90e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2366644 Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* usb_mux: move usb_mux_set_safe_mode()Keith Short2020-08-245-26/+26
| | | | | | | | | | | | | | Move usb_mux_set_safe_mode() definition into usb_common.c so it's available to the test framework. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I789a470468ae441e366afbf94ce3c29db526dfd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370409 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* willow: free flash spaceTing Shen2020-08-241-0/+7
| | | | | | | | | | | | | | | | Disable PD log and enable GPIO short name to save ~800 bytes for RO. BRANCH=None BUG=None TEST=make buildall Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I28ecf9055c0833496bf8fc225ee313fd14dcf9b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2371745 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
* it81202_pdevb, it81202_evb: change chip variant to it81202Ruibin Chang2020-08-245-15/+7
| | | | | | | | | | | | | | | | Change chip variant to mass product it81202, and it's more convenient to develop on these boards. BUG=none BRANCH=none TEST=can flash and boot on board it81202_pdevb and it81202_evb Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Change-Id: Id9e32b38ae392c13799f1403da60e56327d67e23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2359616 Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw> Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Jett Rink <jettrink@chromium.org>
* ectool: add pse host commandJeff Chase2020-08-221-0/+66
| | | | | | | | | | | | BUG=b:163786867 TEST=manual BRANCH=none Change-Id: Ibc595f8a887e3fe63a45dc9b29f3bc4f75feb8ad Signed-off-by: Jeff Chase <jnchase@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354545 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Joe Tessler <jrt@chromium.org>
* Fennel: Remove the prepocessor check for BOARD_JUNIPER and BOARD_JACUZZI.Aaron Zhang2020-08-223-18/+2
| | | | | | | | | | | | | | Remove the prepocessor check for BOARD_JUNIPER and BOARD_JACUZZI. BUG=b:165214737 BRANCH=firmware-kukui-12573.B TEST=make -j BOARD=fennel Change-Id: I0cc9c143be16b02ad7d1b2735772d3d6875ba34e Signed-off-by: Aaron Zhang <zhangjianbo@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2351643 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* pi3hdx1204: Print error if enable failsEdward Hill2020-08-221-3/+9
| | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I33b574d42008330b58ae21d5bfbfc6fc73d50271 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2367313 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Trembyle: Fix HDMI retimer suspend / resumeEdward Hill2020-08-221-9/+20
| | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Id997c71498d4cb7f59b87f641cf4a67ec3617bad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364117 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Dalboz: Fix HDMI retimer suspend / resumeEdward Hill2020-08-221-13/+21
| | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I2d91c848222d7b7b47c6b15e94ee9138441e4898 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364116 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Berknip: Fix HDMI retimer suspend / resumeEdward Hill2020-08-221-9/+19
| | | | | | | | | | | | BUG=b:165191082 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: If0619e61faa36e67e4e73c1cc59b296f6a039075 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364115 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Woomax: Fix HDMI retimer suspend / resumeEdward Hill2020-08-221-23/+22
| | | | | | | | | | | | BUG=b:163861706 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I8fda70cef671e3cdf14f6ea58e3890f82622237d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364114 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Morphius: Fix HDMI retimer suspend / resumeEdward Hill2020-08-221-23/+38
| | | | | | | | | | | | BUG=b:165191080 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I04ea831a2bfd684d13f211959acc52c511895f80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364113 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Ezkinil: Fix HDMI retimer suspend / resumeEdward Hill2020-08-224-40/+40
| | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I9eac47383695156ca0d222eb75f75492065720b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364112 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Zork: Workaround for bad ISL9241 CONTROL1 readSue Chen2020-08-223-5/+46
| | | | | | | | | | | | | | | | | | Sometimes CONTROL1 was read 0xFF03 for unknown reason when the state change from S0 to S3, but the second read will get the correct 0x0103. Retry CONTROL1 read before update learn mode to make sure write the correct value. BUG=b:163076059 b:163136699 BRANCH=none TEST=none Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Iec56dab838b0aa362c543cce74d64615faf40bfc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2362386 Tested-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* TCPMv2: Don't interrupt RX/TX Extended Chunked Msg sequenceSam Hurst2020-08-224-3/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delay sending a new message during the reception or transmitting of Chunked messages. BRANCH=none BUG=b:161836223 TEST=make -j buildall manual: Transmitted an extended message and verified that the sequence was not interrupted by attempting to send a VDM message. Without patch Chunked message request that was interrupted. 20-08-14 10:46:13.473 C1: RECV 9a9f/1 [0]00008c00 20-08-14 10:46:13.494 C1: RECV 9c9f/1 [0]00009400 20-08-14 10:46:13.516 C1: RECV 9e9f/1 [0]00009c00 20-08-14 10:46:13.535 C1: RECV 909f/1 [0]0000a400 Try to send VDM. MSG_TYPE is corrupted, was 0x1f, now 0x0f 20-08-14 10:46:13.563 C1: RECV 928f/1 [0]0000ac00 20-08-14 10:46:13.591 C1: RECV 948f/1 [0]0000b400 20-08-14 10:46:13.618 C1: RECV 968f/1 [0]0000bc00 20-08-14 10:46:13.645 C1: RECV 988f/1 [0]0000c400 20-08-14 10:46:13.674 C1: RECV 9a8f/1 [0]0000cc00 With patch. Chunked message request was not interrupted. 20-08-14 10:50:56.052 C1: RECV 9a9f/1 [0]00008c00 20-08-14 10:50:56.075 C1: RECV 9c9f/1 [0]00009400 20-08-14 10:50:56.093 C1: RECV 9e9f/1 [0]00009c00 20-08-14 10:50:56.114 C1: RECV 909f/1 [0]0000a400 Try to send VDM. Message delayed 20-08-14 10:50:56.134 C1: RECV 929f/1 [0]0000ac00 20-08-14 10:50:56.155 C1: RECV 949f/1 [0]0000b400 20-08-14 10:50:56.175 C1: RECV 969f/1 [0]0000bc00 20-08-14 10:50:56.195 C1: RECV 989f/1 [0]0000c400 20-08-14 10:50:56.216 C1: RECV 9a9f/1 [0]0000cc00 20-08-14 10:50:56.242 C1: RECV 0c90/0 Try to send VDM. Signed-off-by: Sam Hurst <shurst@google.com>wq Change-Id: I5475792ee9f272fe4964e27839e55e3409a6a799 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2357414
* config: cleanup TCPC driver optionsKeith Short2020-08-221-4/+1
| | | | | | | | | | | | | | | When CL:2343733 and CL:2304237 merged, config.h ended up with duplicated CONFIG options. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I264668c9990b76a0010265f4cb22e632cb785548 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2369471 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* usbc: remove PD_EVENT_SM in favor of task_wakeJett Rink2020-08-215-20/+17
| | | | | | | | | | | | | | | | We have used both methods of waking up the PD tasks to process the next state: PD_EVENT_SM and TASK_EVENT_WAKE. They effectively do the same thing and it is more straightforward to only have one way to wake the task up with the sole purpose of re-evaluating the current state. BRANCH=none BUG=none TEST=No regressions on GRL testing. Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I0fa79b82223e6b97eede4130480156949d79f365 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2363466 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Revert "volteer: Disable USB PD extended messages"Abe Levkoy2020-08-211-3/+0
| | | | | | | | | | | | | | | | | This reverts commit 3e09f177ef5021fe36b5306122439eed42fc059a. Space saved on BMI260 initialization file allows extended message support to build with ~5 KB of free flash, which should be sufficient for the time being. BUG=b:158572770 TEST=make buildall BRANCH=none Change-Id: I546374253fd80efcc7d582744b173d1bd1aa8383 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2369361 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* drawman: Disable auxiliary charger accessDevin Lu2020-08-211-14/+36
| | | | | | | | | | | | | | | Drawman don't have auxiliary charger on DB, this patch turns off i2c traffic on auxiliary charger base on board_get_charger_chip_count(). BUG=none BRANCH=none TEST=Make sure no i2c traffic on i2ctrace enable 4 0x30 to 0x36. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I08f4682093461f39f2b909ffc97345db5e3ccc27 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2367422 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* tcpc: Add TCPC reset as a low power eventKeith Short2020-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Some TCPCs do not immediately generate an CC_STATUS interrupt when waking from low power mode on a device connect. Add PD_EVENT_TCPC_RESET as a low power event to the type C state machine exits TC_LOW_POWER_MODE. The low power exit delay ensures the type C state machine gives the TCPC an opportunity to internally debounce the CC lines and report a CC_STATUS interrupt. BUG=b:165850054 BRANCH=none TEST=make buildall TEST=Verfiy connection of SRC and SNK devices on Volteer. Tested against TUSB422, PS8815, and RT1715 TCPCs. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I21f691d750ef569c02e8d00f528a4f2e6d3064be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2369369 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* COIL: remove master/slave instances from EC termsKeith Short2020-08-211-15/+26
| | | | | | | | | | | | | | | | | | | | Google is working to change its source code to use more inclusive language. To that end, replace the terms "master" and "slve" with more inclusive alternatives. For SPI description, follow terminology suggested by the open source hardware association. https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/ BUG=b:163885307 BRANCH=none TEST=Verify md output in gitiles. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib12ce61a79b44744fbf3fb6ff19df077e150139c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2358192 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* compare_build.sh: Add private directory handlingCraig Hesling2020-08-211-0/+12
| | | | | | | | | | | | | | | | This allows compare_build.sh to use private libs if available. BRANCH=none BUG=none TEST=# Ensure that you have an ec checkout that has a broken # public build, but working private build. ./compare_build.sh -p # This will only work if private was accessible Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Id5e2d1afe474e0175dbba2cddfd84de7c895a927 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2357870
* RT1715: Create driverEric Herrmann2020-08-214-0/+108
| | | | | | | | | | | | | | | Add driver for RT1715, it is a TCPCI rev1 TCPC supporting PD3.0 (except FRS), there are a few vendor-defined registers that need to be configured past the TCPCI ones. BUG=b:162617664 TEST=make buildall BRANCH=none Change-Id: Ie84610c8a1e17ea5874692ae9c383fa70d7dd486 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343733 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Dedede: Move PWM to board levelDiana Z2020-08-2112-27/+96
| | | | | | | | | | | | | | | | Move the PWM related defines and arrays into the board level, to allow customization of what PWM channels boards use (if they choose to use the PWM at all). BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id417a7be079511c17de9f2e5d03c729467435804 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2358899 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Puff: revert hack to set fw_configAndrew McRae2020-08-211-14/+0
| | | | | | | | | | | | | | | | | Earlier board versions did not always have the correct CBI settings, so a hack was added to correctly set the fw_config for those boards. This is no longer necessary, and should be removed before RO. BUG=b:165883533 TEST=Build and run on puff. BRANCH=puff Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I596f5b0f4c76a834e23e3c833f440308e5bb4b85 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2367425 Tested-by: Sam McNally <sammc@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* morphius: add ppc_id for ppc optionZick Wei2020-08-212-2/+6
| | | | | | | | | | | | | | | | | This pathc use external gpio as ppc id for different ppc: 1:nx20p3483 0:aoz1380 BUG=b:150278507 BRANCH=none TEST=make BOARD=morphius Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I32c26f86a35bd18bd23689a53ab2c44174a01e34 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2348739 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* drawcia: enable stylus chargingDevin Lu2020-08-212-1/+11
| | | | | | | | | | | | | | | Drawcia has garage stylus, this patch enables stylus charging when stylus present. BUG=b:163146414 BRANCH=none TEST=Make sure EN_PP5000_PEN turn on when stylus detected. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I53f181ae381a33a87d7c2c312f7528cddccf49e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2364344 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* trembyle: correctly pass USB-C1 HPD to the MST hubPeter Marheine2020-08-214-7/+38
| | | | | | | | | | | | | | | | | | | | | | | The RTD2141 MST hub on some daughterboard options requires the EC to drive its HPD input because HPD comes over USB-PD, but the MST hub then drives the AP's HPD input. The EC was incorrectly driving nothing, causing DP outputs on port C1 to not be detected. Because the MST's HPD input is connected to an IO expander on current hardware, configure the USB-C and Trembyle-specific HPD twiddling code to support regular or expander GPIOs. Experience says IO expanders tend to be too slow for reliable HPD, but this should allow some (possibly flaky) HPD support until hardware changes are completed to put the output directly on an EC GPIO. BUG=b:159051013,b:165622386 TEST=still builds (I have no v3 hardware to test against) BRANCH=None Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I9e041ab7c222927a11b8972920b7e978ab30d751 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2366456 Reviewed-by: Edward Hill <ecgh@chromium.org>
* gpio: add a gpio_or_ioex_get_level function to match the setterPeter Marheine2020-08-212-0/+18
| | | | | | | | | | | | | | Code that wants to work with either regular or IO expander GPIOs may also wish to read the current value; this function permits it. BUG=b:159051013,b:165622386 TEST=buildall BRANCH=None Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I677617621ae4964f568ad87512b372ce8a9830a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2366455 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Revert "util: add gen_bmi_config utility"stabilize-13421.53.B-masterstabilize-13421.42.B-masterKeith Short2020-08-214-308/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f137f2493db5b5ee27ffc784538b766d5192704d. Reason for revert: Compression of BMI260 config no longer needed. Original change's description: > util: add gen_bmi_config utility > > Add the gen_bmi_config utility used to generate a compressed version > of the configuration file required by the BMI260 IMU sensor. > > This is expected to be a temporary solution until the 8 KiB BMI > configuration file can be moved out of the EC code. > > BUG=b:160330682 > BRANCH=none > TEST=make utils > TEST=run "gen_bmi_config compress BMI260_main.tbin > bmi260_compressed.bin" > TEST=run "gen_bmi_config decrompress bmi260_compressed.bin > bmi260_uncompressed.bin", verify uncompressed file matches original > file. BUG=b:160330682 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2bfe8d7bef2a35f43b96cc0cd07209bef534ed63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354195 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* bmi260: back out support for compressed config fileKeith Short2020-08-212-175/+6
| | | | | | | | | | | | | | | | | Now that the BMI260 config file can be moved to the .init_rom section, the simple compression scheme is no longer needed. BUG=b:160330682 BRANCH=none TEST=make buildall TEST=Verify BMI260 operation on both volteer and volteer_tcpmv1 builds using "ectool motionsense lid_angle". Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I83bbaadcd3dade2d585b771b6b9ebae7e9fdc0cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354194 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* TCPMv2: SRC->SNK PR Swap enable AutoDischarge after VbusDenis Brockus2020-08-211-15/+37
| | | | | | | | | | | | | | | | | | | A debounce was added to allow for the TCPC to get a valid Vbus but AutoDischargeDisconnect was enabled as soon as we set for the debounce. Since Vbus had a good chance of not being valid, we would get a FAULT from the TCPC indicating an Auto Discharge Disconnect failure. BUG=b:165797061 BRANCH=none TEST=DUT-DUT PR_Swap Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I897d682e405d7f2fcda4b4a36a3c1b333e8f7913 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2365253 Tested-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: PR_Swap SRC->SNK should send PS_RDY in current AMSDenis Brockus2020-08-211-6/+16
| | | | | | | | | | | | | | | | | | The SRC->SNK PR_Swap is currently starting a new AMS for the SNK PS_RDY and this causes the partner to disconnect from the bus instead of continuing with the swap. BUG=b:165794652 BRANCH=none TEST=DUT-DUT PR_Swap Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Id953a9b6f78057777617d06f518eb17b061b6f92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2365057 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* TCPMv2: Do not send GetSnkCap if FRS is not enabledDenis Brockus2020-08-211-1/+10
| | | | | | | | | | | | | | | GetSnkCap is only needed for FastRoleSwap BUG=none BRANCH=none TEST=PR_Swap DUT-DUT testing Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I51973dfbfbfe855d1027c3b1cec35a2ba06a7b65 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2367283 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* dirinboz: add LED behaviorZick Wei2020-08-203-67/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | dirinboz have two charging leds on left side and right side. each side have two colors amber and white. The led behavior define as following: Charging led: led on with charging port active, other port is off. Charging: Amber. Discharging: Off. Battery Error: Blinking white (0.4 sec on, 0.4 sec off) Fuel < 10%: Blinking white on right side port (1 sec on, 1 sec off) Force idle for factory: Blinking amber (1 sec on, 1 sec off) System suspend with non-charging state: Blinking both side LED white (1 sec on, 1 sec off) BUG=none BRANCH=none TEST=make sure led behavior intended. make sure ectool led left white/amber/off/auto work correctly. make sure ectool led right white/amber/off/auto work correctly. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I3a182b1608554cf82fdb3b76917c01321d8d473d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2331983 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Zork: Add command to print temps periodicallyEdward Hill2020-08-204-6/+56
| | | | | | | | | | | BUG=b:162907613 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Iddbba7d7955f252cacf666528195bbfc7d9718e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2365633 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* bmi260: move BMI260 init file into .init.rom sectionKeith Short2020-08-205-19/+75
| | | | | | | | | | | | | | | | | | | | | Increases Volteer RO and RW flash spaces by 7088 bytes each. This is the net gain after including the init_rom layer. BUG=b:160330682 BRANCH=none TEST=make buildall TEST=On volteer run "ectool motionsense" and "ectool motionsense lid_angle". Verify both RO and RW images. TEST=Program RO image with predecessor CL:2311268. Program this CL into AP firmware image and verify EC software sync updates to RW image. TEST=Verify BMI260 operation with CONFIG_CHIP_INIT_ROM_REGION disabled using volteer_tcpmv1 board. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6849b6c9e96756266528b39ab5e53268dce2a13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311756 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>