summaryrefslogtreecommitdiff
path: root/driver
Commit message (Collapse)AuthorAgeFilesLines
* bq2589x: update driverstabilize-6996.BVincent Palatin2015-04-212-9/+51
| | | | | | | | | | | | | | | | | | | | | | | Update the BQ2589x charger driver to configure properly the boost used as a VBUS 5V source. Define the bits used for I2C registers configuration. Return success in unused charger callbacks to avoid blocking the charge state machine. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:38603 TEST=On Ryu P4 reworked with BQ25892, plug a C-A receptacle adapter and see the 5V VBUS coming up, un-plug it and see VBUS going away, try several PD/type-C charger and check the selected current limit. Change-Id: I24b832b6d130ff6dfda1ce47f5e445d65279fa7d Reviewed-on: https://chromium-review.googlesource.com/266063 Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
* lsm6ds0: Cache ODR and range on EC.Aseda Aboagye2015-04-202-20/+26
| | | | | | | | | | | | | | | | | | | | | | For the driver functions get_range and get_data_rate, each call would end up executing an i2c transaction even if the value had not changed. Therefore, I modified the lsm6ds0 driver to cache the output data rate as well as the range. This prevents unecessary i2c transactions from occuring. BUG=chromium:476226 TEST=Flashed EC on samus and verified that the accelrange and accelrate commands still worked and that the sensors were functional. TEST=Verified Double Tap still worked. TEST=make -j buildall tests BRANCH=none Change-Id: Ie432979266dc4e4892978005de5d1df62cc0654f Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/265933 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* charger: add TI BQ2589x charger driverVincent Palatin2015-04-023-0/+362
| | | | | | | | | | | | | | | | | | Driver for Texas Instrument bq25890/bq25892/bq25895 battery charger chip. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:38603 TEST=On a modified board with BQ25892, charge a 1S battery and check ADC values. Change-Id: I536c6b58438464a63ad3d3536b9bb84ff35920e8 Reviewed-on: https://chromium-review.googlesource.com/263458 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
* Skip the battery device name reading on BQ27742Vincent Palatin2015-03-261-0/+6
| | | | | | | | | | | | | | | | | | | | Contrary to the BQ2751 and BQ27741 it is sharing code with, BQ27742 does not have a "device name" register. So we need to skip the I2C reads else the battery_device_name() function returns an I2C error and the charge code retries until the end-of-time to read it hogging the CPU. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:38401 TEST=run on Ryu P4 and verify that we are no longer seeing 20ms of I2C transactions every 100ms on the battery I2C bus. Change-Id: I961af54017f661ee928058b346a42b7206ad8217 Reviewed-on: https://chromium-review.googlesource.com/262449 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
* charger: bq24773: Fix read input current errorstabilize-6912.Bjames_chao2015-03-241-2/+2
| | | | | | | | | | | | | | | | | | | 'ectool chargestate show' shows the wrong input current since the function charger_get_input_current() uses REG8_TO_CURRENT. BUG=None TEST=Use 'ectool chargestate show' or UART command 'charger' check the input current value. BRANCH=None Signed-off-by: james_chao <james_chao@asus.com> Change-Id: I29229ea1ef22811035b500c7a33fedee6562db35 Reviewed-on: https://chromium-review.googlesource.com/259842 Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-by: Divya Jyothi <divya.jyothi@intel.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Divya Jyothi <divya.jyothi@intel.com> Commit-Queue: Shawn N <shawnn@chromium.org>
* charger: Add support for bq24770james_chao2015-03-243-27/+108
| | | | | | | | | | | | | | | | Add support for bq24770 (smbus) in the bq24773 (i2c) driver. BUG=None TEST=Use the UART command "charger" and check the charger information. BRANCH=None Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ie5f5af60e93aa73d9ef68115af36a8d28f6d6c2b Reviewed-on: https://chromium-review.googlesource.com/259870 Reviewed-by: BoChao Jhan <james_chao@asus.com> Reviewed-by: Divya Jyothi <divya.jyothi@intel.com> Commit-Queue: Divya Jyothi <divya.jyothi@intel.com> Tested-by: Divya Jyothi <divya.jyothi@intel.com>
* pi3usb9281: Always set reserved control bitsShawn Nematbakhsh2015-03-042-10/+14
| | | | | | | | | | | | | | | | Bits 1 and 3 of the control register are read 1, write 1, but RO firmware may have zero'd these bits. Therefore, always set the bits high, ignoring the read value. TEST=Manual on Samus. Starting from .90 RO, flash new RW and verify BC1.2 charger detection is working. BUG=chrome-os-partner:37241 BRANCH=Samus Change-Id: I2f71718f74e50fe9b664dbe3da1578ee4c995136 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/254880 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Producer/Consumer: Convert USART and USB Stream driversAnton Staaf2015-03-021-8/+18
| | | | | | | | | | | | | | | | | | | | | | | Previously the USART and USB Stream drivers exposed in_stream and out_stream interfaces, which don't allow for sharing their queues easily. This change converts these drivers over to the producer/consumer model and updates the two uses. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Verify that the discovery echo functionality is unchanged. Change-Id: I29f043ab1712373f638e1621378df98647d736cf Reviewed-on: https://chromium-review.googlesource.com/252820 Trybot-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
* pi3usb9281: Fix handling of REG_CONTROL (02H) reserved bitsShawn Nematbakhsh2015-02-052-15/+22
| | | | | | | | | | | | | | | | | REG_CONTROL has two sets of reserved bits: - Bits 5 thru 7 are read x, write 0. - Bits 1 and 3 have undocumented function and should not be changed from read value. BUG=chrome-os-partner:36360 TEST=Manual on Samus. Cold boot unit and insert 2.4A charger. Verify that charger is correctly detected. BRANCH=Samus Change-Id: I240d352817910eda404b72be13e2c913a4b76079 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/246560 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus: automatically recover from charge circuit failuresstabilize-6752.BAlec Berg2015-02-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occasionally the charge circuit on samus gets wedged and will not charge. This change detects when the charge circuit has failed and automatically recovers from it. It uses the BQ PROCHOT warning to detect the failure by setting PROCHOT to trigger when the BQ thinks input current is higher than the input current limit. When the failure is detected, the EC disables charging and tells PD MCU to disable CHARGE_EN, then a couple seconds later, it re-enables charging. This CL also adds more communication between EC and PD for the EC to be able to set the charge state for the PD. Valid charge states are: No charging allowed, 5V charging only, and max charging. The EC uses this as such: - When the EC gets AC present interrupt, it sets off a deferred function to change charge state to max charging after some delay to give time for the charge circuit to settle down. - When the EC gets AC disconnect interrupt, it disables charging briefly, enables learn mode, and then sets 5V charging allowed. This allows for the same starting conditions in the charge circuit for every AC attach. - When the EC detects a wedged charge circuit, it disables charging and waits a few seconds before re-enabling 5V only charging. Additionally, this change moves the charging cutoff in S3/S5/G3 when the battery is full to the EC. With the added control for the EC to set the PD charging state, it is more convenient for the EC to manage cutting off charging when battery is full. BUG=chrome-os-partner:36081 BRANCH=samus TEST=test the basics: - connect/disconnect zinger a bunch of times - connect and disconnect two zingers in different order - connect two zingers and charge override between the two test the automatic charge wedge recover: - wedge the charge circuit by setting charger voltage under battery voltage: "charger voltage 7000" - wait a few seconds for the system to recover and check it is charging with "battery" command test full battery charge cutoff: - added console command to change battery soc in board/samus/extpower.c: static int cmd_battfake(int argc, char **argv) { char *e; battery_soc = strtoi(argv[1], &e, 10); batt_soc_change(); return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(battfake, cmd_battfake, "", "", NULL); - in S0, tested "battfake 100" does not disable charging. - in G3, tested "battfake 100" disables charging and "battfake 99" re-enables charging. - set "battfake 100" and tested transitioning to S0 enables charging and transitioning to S5 disables charging. - attached two chargers and used charge override to select active port. then toggled "battfake 100" to "battfake 99" back and forth and verified charge override port is still the same. test third-party 12V charger: - plug in a bunch of times and make sure we stay at 5V for 500ms and then transition to 12V test with no battery: - tested five different units with no battery and just zinger. 3/5 boot, while the other 2 don't. But, the 2 that don't boot without battery also can't boot w/o battery when this CL is reverted, so I don't think this change is causing the problem, I think there is an electrical limitation. test with EVT zinger: - EVT zingers (P2 - C2) negotiate very quickly after connection, which can cause INA problems w/o this CL. Tested an EVT zinger with samus and did a bunch of connections and disconnections and verified that we always wait at 5V for 500ms and that we don't wedge the INA circuit on connect. test backwards compatibility: - test new PD with old EC and make sure we can charge with zinger. (note that if the charge circuit wedges, we won't be able to unwedge it). - test old PD with new EC and make sure we can charge with zinger. Change-Id: I7703b7a2ab1209d7f559b265b03517e79c74b16a Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/245253 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
* mcdp28x0: Move structure definitions to ec_commands.hShawn Nematbakhsh2015-01-312-16/+1
| | | | | | | | | | | | | | mcdp_info is a logging payload, so related structures need to be moved to the public include file. BUG=chrome-os-partner:35935 TEST=make buildall -j BRANCH=Samus Change-Id: Idb939db884821fa85faafbfe643e713f5bcdbc59 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/244780 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* ryu: Implement charging profileVic Yang2015-01-292-0/+216
| | | | | | | | | | | | | | | This allows us to charge at a faster rate. BRANCH=Ryu BUG=None TEST=Charge Ryu P3 in S5 and check charging current. Change-Id: If8fbaa42d34df45f3d4db35ba50031c511b0c7af Signed-off-by: Vic Yang <victoryang@google.com> Reviewed-on: https://chromium-review.googlesource.com/242666 Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org>
* ectool: parse accessory logs for dingdong & hohoTodd Broch2015-01-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Todd Broch <tbroch@chromium.org> BUG=chrome-os-partner:35935 TEST=manual # With dingdong in C0 & hoho in C1 # Enter GFU mode for dingdong & hoho ectool --name cros_pd pdsetmode 0 0x18d1 1 1 ectool --name cros_pd pdsetmode 1 0x18d1 1 1 # read logs ectool --name cros_pd pdlog 2015-01-26 14:36:54.787 P0 SRC 2015-01-26 14:36:54.780 P1 SRC 2015-01-26 14:36:53.680 P0 DP mode enabled 2015-01-26 14:36:53.375 P1 HDMI Codec: family:000e chipid:0001 irom:1.0.0 fw:0.0.0 2015-01-26 14:36:53.771 P1 DP mode enabled # remove hoho & plug in zinger instead ectool --name cros_pd pdlog 2015-01-26 14:44:36.991 P1 SNK Charger Type-C 5153mV max 5000mV / 3000mA 2015-01-26 14:44:37.011 P1 SNK Charger PD 5021mV max 20000mV / 3000mA 2015-01-26 14:44:37.116 P1 SNK Charger PD 20211mV max 20000mV / 3000mA Change-Id: I0289cfd1d43ef1a22123b437bc8df86920fbf1a7 Reviewed-on: https://chromium-review.googlesource.com/243375 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
* bq24773: turn off prochot warningAlec Berg2015-01-262-3/+7
| | | | | | | | | | | | | | | | | | | | | | Turn off prochot warning on bq24773 by default because our battery can always supply enough power for the whole system so we don't need to throttle the CPU if the BQ senses too much input current. BUG=chrome-os-partner:34885 BRANCH=samus TEST=force BQ into it's prochot condition on samus by setting the charging voltage temporarily below the battery voltage, which causes INA to turn off and the BQ to think IADP is > 4.1A. in this condition PROCHOT is normally asserted and CPU slows down, but with this patch PROCHOT is not asserted and the CPU does not slow down. Change-Id: I658dbe568b7bfe94944ef90d6d59656a0683c8a0 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243231 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Sameer Nanda <snanda@chromium.org>
* samus: modify fast charging profile to avoid charge problemsAlec Berg2015-01-261-29/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several modifications to samus fast charging to fix bug where charging circuit stops charging the battery. - Fix bug: if we have a bad temperature reading, fast charging should ignore it. - Change the fast charging high temperature profile to set a charging voltage equal to the maximum of 8.3V and the current battery voltage. - Divide the normal temperature profile into two phases, low voltage charging and high voltage charging. Once we transition to second phase, don't allow it to go back to phase 1 unless AC is removed. On samus, we have to make sure we never command the BQ to a charging voltage that is below the present battery voltage or else the INA will lose power and we will not be able to charge the battery until AC is disconnected. This also changes charge_state_v2 so that the fast charging profile override is called even when AC is disconnected to avoid jumps in temperature as seen by the fast charging code. Also changes the voltage threshold for transitioning from phase 1 to phase 2 of normal temp charging so that the transition is taken a little earlier to match the desired profile slightly better. BUG=chrome-os-partner:35491 BRANCH=samus TEST=Added custom console command to be able to directly control the battery temperature that charger_profile_override() uses: static int command_chgtemp(int argc, char **argv) { char *e; if (argc < 2) return EC_ERROR_PARAM_COUNT; chg_temp = strtoi(argv[1], &e, 10); if (*e) return EC_ERROR_PARAM1; return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(chgtemp, command_chgtemp, "", "", NULL); Using this command, I jumped back and forth between all three temperature fast charging regions and made sure that (1) we never set a charging voltage below the present battery voltage and (2) we never stop charging the battery. I ran this test at low battery and high battery percentage and with low load (G3) and high load (S0 with webgl aquarium). Change-Id: I035603a4ab48a156ab43f8c93f21200c4b664aab Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243143 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
* samus: add battery cutoffAlec Berg2015-01-241-0/+24
| | | | | | | | | | | | | | Add battery cutoff to samus. BUG=chrome-os-partner:35744 BRANCH=samus TEST=tested "cutoff" console command cuts off battery and "ectool batterycutoff" from host cuts off battery Change-Id: I88194c9c601594dee144933cabef5b1dc536ab0d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/242830 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* bq27541: report battery present stateVic Yang2015-01-241-2/+12
| | | | | | | | | | | | | | | | The battery driver is not reporting battery present state, and as a result, is_present flag always remain NOT_SURE. Fix it. BRANCH=Ryu BUG=None TEST=On Ryu, 'chgstate' and see 'is_present = YES'. Change-Id: I84bedc390158797bf1e67e612d0bb3f526292dfa Signed-off-by: Vic Yang <victoryang@google.com> Reviewed-on: https://chromium-review.googlesource.com/242970 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
* driver: BQ27621 scaling bug fixMyles Watson2015-01-241-2/+2
| | | | | | | | | | | | | | Design capacity and Design Energy need to be multiplied by the scaling factor. BUG=None TEST=Manual test with hadoken without charging enabled. Observed the battery level decreasing. BRANCH=NONE Change-Id: Icb5f74766c2416128277df4fe1bb00fc7307f5e5 Signed-off-by: Myles Watson <mylesgw@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/242890 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* pi3usb9281: Lock access to MUX GPIO while in useShawn Nematbakhsh2015-01-211-0/+14
| | | | | | | | | | | | | | | Lock access to the MUX GPIO to prevent other tasks from toggling away from our active chip while in use. BUG=chrome-os-partner:35567 TEST=Manual on samus_pd. Boot system, verify that no "write failed" print is seen. Also verify that charger detection functions as expected. BRANCH=Samus Change-Id: Ica02b8fbd8f9ee04f6389ce0b0e5bd58104ff698 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/242125 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus: Add scale factor to account for ALS attenuationBill Richardson2015-01-212-6/+11
| | | | | | | | | | | | | | | | | | | | | | | This adds a sensor-specific attentuation factor, which will be applied to the ALS raw sensor readings on the EC. This is to account for the attenutation due to glass, tinting, etc. BUG=chrome-os-partner:34590 BRANCH=ToT,Samus TEST=manual In a root shell, run this: cd /sys/bus/acpi/drivers/acpi_als/ACPI0008:00/iio:device1 while true; do cat in_illuminance_raw; sleep 1 ;done Shine a flashlight on the ALS. Note that the readings are 5X higher than they were before this CL. Change-Id: I2a53872ecb5fab62e5f443d43588a26d3d7e697f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/241191 Reviewed-by: Bryan Freed <bfreed@chromium.org>
* pi3usb9281: Accept alternate device idShawn Nematbakhsh2015-01-182-1/+5
| | | | | | | | | | | | | | | | PI3USB9281A is compatible with our existing driver but has a different device ID. BUG=chrome-os-partner:35567 TEST=Manual on samus_pd. Verify that "invalid ID 0x18" prints are not seen on console. BRANCH=Samus Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I275ed50fcbcb3c2e385292408be6de51055903fb Reviewed-on: https://chromium-review.googlesource.com/241764 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
* battery: Add support for TI's BQ27621_g1 fuel gauge.Myles Watson2014-12-312-0/+755
| | | | | | | | | | | | | | | | | | | | | define CONFIG_CMD_BATDEBUG to enable console commands. If the battery is larger than 6Ah or smaller than 150mAh, scale the parameters transparently to the user using macros. BUG=chrome-os-partner:34477 BRANCH=none TEST=Custom console commands for the fuel gauge I also used a Logic16 from Saleae and the fuel gauge on hadoken. Signed-off-by: Myles Watson <mylesgw@chromium.org> Change-Id: I959d51c3188336e4ad0983528ad7e53a2955a764 Reviewed-on: https://chromium-review.googlesource.com/234285 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Myles Watson <mylesgw@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Myles Watson <mylesgw@chromium.org>
* accel: fix accel bug where if no new data, it uses wrong dataAlec Berg2014-12-301-3/+3
| | | | | | | | | | | | | | | | Fix accelerometer bug in which, if there is no new data from the lsm6ds0 accel, it will use the old ajusted xyz instead of the old raw xyz. BUG=chrome-os-partner:34952 BRANCH=samus TEST=add printf to case where it uses old data and sample faster then ODR to read wrong data. Change-Id: If0a6bbdec71d84567eae107aca6f1d0ab754919a Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/237664 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
* pd: hoho: mcdp28x0 serial driver.Todd Broch2014-12-233-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add initial serial driver for mdcp2850 dp->hdmi converter. Driver implements 'get information' (cmd:0x40) to provide rudimentary method to test mcdp for functionality and assert GPIO if successful. Future CLs may expose more serial functionality if necessary. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:34122 TEST=manual, when compiles with #define MCDP_DEBUG see successful serial communication and result from get info. buf:[00]0x04 [01]0x40 [02]0x00 [03]0xbc ... buf:[00]0x0f [01]0x40 [02]0x00 [03]0x0e [04]0x00 [05]0x01 [06]0x01 [07]0x00 [08]0x00 [09]0x00 [10]0x00 [11]0x00 [12]0x00 [13]0x00 family:000e chipid:0001 irom:1.0.0 fw:0.0.0 Change-Id: I35f9d9b0437633d1bd6a6c9fa14413bedb12f5c2 Reviewed-on: https://chromium-review.googlesource.com/235930 Trybot-Ready: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
* samus: set BQ voltage to battery voltage when AC disconnectedAlec Berg2014-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | Set charge state machine voltage to just above the battery voltage when AC is disconnected. Also send new current before sending new voltage to charger when there is a change. These changes reduce input current spikes caused by current inrush into the battery and thereby decrease chance of overcurrenting power supply on connect. BUG=chrome-os-partner:33862 BRANCH=samus TEST=load onto samus instrumented with input current probe. when AC is attached note that initial current spike is much lower with this change. Change-Id: I7760cd2b709c6b3536cf2a9449bb1f46800ce10a Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/237245 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
* pi3usb9281: Limit DCP port to 500mA charge currentShawn Nematbakhsh2014-12-191-1/+1
| | | | | | | | | | | | | | | According to specification, a DCP port is only required to provide 500mA @ 4.75V, though actual supply limit can vary upward significantly. Set the current limit on DCP ports to 500mA to reflect this reality. BUG=chrome-os-partner:32003 TEST=None BRANCH=Samus Change-Id: I46e25b44baaa41ddf173880e52d7485d952ebf23 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/236772 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus_pd: Open USB data switches in UFP modeShawn Nematbakhsh2014-12-092-1/+15
| | | | | | | | | | | | | | | | Samus USB ports can't actually act as UFPs, so open switches when in UFP mode. BUG=chrome-os-partner:32003 TEST=Manual on Samus. Connect two Samus units, run `pd 1 swap data`, verify that switches are opened on switch to UFP. Unplug samus and connect a USB 2.0 device instead, verify that ports are again closed. BRANCH=samus Change-Id: I9e1ca58089caf29e419698c8426bf8b72500833a Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233711 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* motion: Add decoding for MOTION_CMD_DUMP v1 commandGwendal Grignou2014-11-182-39/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MOTIONSENSE_CMD_DUMP is deprecated, replaced with MOTIONSENSE_CMD_GET_DATA Also use vector_3_t instead of x,y,z ectool motionsense commands only work with newer firmware, to handle a dynamic number of sensors. - The host sends the number of sensor it has allocated space for. - If 0, the EC just sends the number of sensors available - Otherwise returns sensor information up to the limit imposed by the host. Remove MOTIONSENSE_GET_STATUS: not needed. It is only useful for LPC, to guarantee atomicity of the data. Remove MOTIONSENSE_GET_DATA: not needed since we increase the version number of MOTIONSENSE command. BUG=chrome-os-partner:31071,chromium:430792 BRANCH=ToT TEST=Compile. On a firmware that support the new command: /usr/sbin/ectool --name=cros_sh motionsense Motion sensing active Sensor 0: 92 15 1030 Sensor 1: -94 -63 718 /usr/sbin/ectool --name=cros_sh motionsense active 0 On a machine with older firmware (samus), check these functions are not working anymore. Change-Id: I64b62afff96670fb93457760d43d4e64e26e029f Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226880 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus_pd: add host command to get type-c port power infoAlec Berg2014-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Get type-c port power info including power role, charger type, and charging info. Also added host command to get number of type-c ports. Also adds new charging suppliers for pericom identified chargers including DCP, CDP, SDP, proprietary, and other chargers. Priority of these for charging is set in samus board file. BUG=chrome-os-partner:32650 BRANCH=samus TEST=run 'ectool --name=cros_pd usbpdpower' and verify correct status with minimuffin, zinger, and type-C to type-A adapter. Change-Id: I1dabbe7de4185a23df5684a5ea9a2d944f1f6ff5 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223523 Tested-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Samus: Split motion sense and lid angleGwendal Grignou2014-10-291-3/+3
| | | | | | | | | | | | | | | Split motion_sense.c. Translate the accel data in the Android coordinate right away. BUG=chrome-os-partner:32002 BRANCH=ToT TEST=On samus, check lid angle are still correct. Change-Id: If743e25245dc1ce4cdacb8a4d5af22616c4a79e4 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/225486 Reviewed-by: Sheng-liang Song <ssl@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus: new algorithm for tmp006 object temperatureBill Richardson2014-10-222-207/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original algorithm is given in the TMP006 User's Guide (SBOU107.pdf). The algorithm we previously implemented is that, plus some additional and completely undocumented massaging of the Tdie and Vobj registers. The original meaning of that hack is now lost in the mists of time, thanks to our email retention policy. This CL introduces a new algorithm variant, but at least this time the details are in the bug report. It's essentially the same as the User's Guide algorithm, except that we apply one-stage FIR filters to the Tdie input and the Tobj output. There are five new parameters: d0, d1, ds, e0, e1. Refer to tmp006_read_object_temp_k() in ec/driver/temp_sensor/tmp006.c to see how these new parameters are applied. CAUTION: The tmp006 sensor algorithm is mostly math and magic numbers. The spreadsheet attached to the bug report has six sheets with wildly varying values for those parameters. Since the correct parameter values haven't yet been determined for Samus, all I can be sure of with this CL is that it seems to work and isn't any worse than the old one. Oh, and note that the EC's 't6cal' console command has been disabled until/unless we add support for floating point IO. Use ectool from the host to get and set the params instead. BUG=chrome-os-partner:32260 BRANCH=ToT,Samus TEST=manual After booting, look at the sensor values using ectool: localhost ~ # ectool temps all 0: 312 1: 314 2: 313 Sensor 3 not calibrated 4: 311 Sensor 5 not calibrated 6: 305 Sensor 7 not calibrated 8: 306 Sensor 9 not calibrated 10: 307 Sensor 11 not calibrated 12: 312 Sensor 13 not calibrated localhost ~ # localhost ~ # ectool tempsinfo all 0: 0 PECI 1: 1 ECInternal 2: 1 I2C-Charger-Die 3: 2 I2C-Charger-Object 4: 1 I2C-CPU-Die 5: 2 I2C-CPU-Object 6: 1 I2C-Left C-Die 7: 2 I2C-Left C-Object 8: 1 I2C-Right C-Die 9: 2 I2C-Right C-Object 10: 1 I2C-Right D-Die 11: 2 I2C-Right D-Object 12: 1 I2C-Left D-Die 13: 2 I2C-Left D-Object EC result 2 (ERROR) ... localhost ~ # There are six tmp006 object temps that need calibrating. The index used for the calibration is for the tmp006 objects, not the 3,5,7,.. numbers reported for all temp sensors. See the current values with tmp006cal: localhost ~ # /tmp/ectool tmp006cal 5 algorithm: 1 params: s0 0.000000e+00 a1 1.750000e-03 a2 -1.678000e-05 b0 -2.940000e-05 b1 -5.700000e-07 b2 4.630000e-09 c2 1.340000e+01 d0 2.000000e-01 d1 8.000000e-01 ds 1.480000e-04 e0 1.000000e-01 e1 9.000000e-01 localhost ~ # If the s0 param is zero, this sensor is uncalibrated. The params are entered in the order in which they're displayed You can change any or all of the parameters. Skip the ones you don't want to update by specifying '-' for its position. (Note: throw in an extra '--' first so that ectool doesn't think that negative numbers are command options). For example, to change s0 and b0: localhost ~ # ectool -- tmp006cal 5 1.0 - - -3.0 localhost ~ # localhost ~ # ectool tmp006cal 5 algorithm: 1 params: s0 1.000000e+00 a1 1.750000e-03 a2 -1.678000e-05 b0 -3.000000e+00 b1 -5.700000e-07 b2 4.630000e-09 c2 1.340000e+01 d0 2.000000e-01 d1 8.000000e-01 ds 1.480000e-04 e0 1.000000e-01 e1 9.000000e-01 localhost ~ # Now sensor 13 (tmp006 object index 5) is calibrated: localhost ~ # ectool temps all 0: 310 1: 315 2: 313 Sensor 3 not calibrated 4: 310 Sensor 5 not calibrated 6: 305 Sensor 7 not calibrated 8: 307 Sensor 9 not calibrated 10: 307 Sensor 11 not calibrated 12: 312 13: 313 Change-Id: I61b5da486f5e053a028c533ca9e00b9a82a91615 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224409 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Extend INA231 driver to support INA219 on PlanktonVic Yang2014-10-184-131/+153
| | | | | | | | | | | | | | | The register format of INA231 and INA219 are very much alike. In our use case, we only need to use different coversion coefficient. BRANCH=None BUG=chrome-os-partner:32764 TEST='ina 0' on Plankton V2. TEST=Build twinkie. Change-Id: I9c8e21e30ed844566793dcc1221f865400c3d90d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223370 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* pi3usb9281: Add function for translating registers to current limitShawn Nematbakhsh2014-10-102-0/+25
| | | | | | | | | | | | | | Decode Pericom registers to current limits. BUG=chrome-os-partner:32003 TEST=Manual on samus_pd. Insert 1A Apple charger, verify current limit is correctly detected as 1A. BRANCH=samus Change-Id: I310d9f22cef80e97c1734e6a56f0034ebe01df31 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/222638 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Disable LEARN option during charger initMohammed Habibulla2014-10-105-1/+35
| | | | | | | | | | | | | | | When charger is initialized disable the LEARN option i.e. reenable charging on AC power BUG=chrome-os-partner:32320 TEST=set DUT to discharge on AC and then reflash EC. Ensure that charging begins again. BRANCH=none Change-Id: I3e83db27ab49548d5491548fa624899865c11bfb Signed-off-by: Mohammed Habibulla <moch@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/222644 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* samus: support sensor at different power state.Sheng-Liang Song2014-10-082-7/+8
| | | | | | | | | | | | | | | | | | | | | Design Goals: 1. Every time the AP boots, the same default sensor settings are configured. 2. If the AP goes to suspend (S3) and wakes back up (S0), then the AP sensor settings will be restored. 3. In S3 and in S5, only sample specific sensors that are needed. BUG=chrome-os-partner:32368 BRANCH=ToT TEST=Verified on Samus. Verified suspend and resume logic with EC console messages. - Test Case0: close lid & open lid - Test Case1: powerd_dbus_suspend Change-Id: I553c53e63ecfcb39d5e649a7189aa6ea02589471 Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220371 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Plankton: Add console command to reset USB hubVic Yang2014-09-233-0/+103
| | | | | | | | | | | | | This command resets the USB hub through the IO expander. BUG=None TEST=Reset the hub on Plankton. BRANCH=None Change-Id: Ia77a1e326adc6aba65438534158a4c461479727a Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/218758 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus: enabled fast charging for EVT ATL cellsAlec Berg2014-09-231-19/+51
| | | | | | | | | | | | | | | | | Enable fast charging with profile designed for ATL cells that will be used in EVT. BUG=chrome-os-partner:23776 BRANCH=none TEST=Took detailed charging/discharging data and verified that the actual profile matches the desired profile and that the fast charging profile is actually faster than the standard. See bug report for more info and data collected. Change-Id: Ic11ab89e48afb73987b8013abf8b0564e1138156 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/212980 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Add support for BQ27742 battery gauge chipVic Yang2014-09-171-5/+24
| | | | | | | | | | | | | | | | This reuses most of the existing BQ27541 driver, but changed necessary parts to make it work. BUG=none TEST=Boot on Ryu. See battery charging. BRANCH=factory-ryu-6212.B Change-Id: I3a7325a821c81f84396bcc328036b6a5e7749a2e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/217198 Reviewed-by: Alec Berg <alecaberg@chromium.org> (cherry picked from commit f44593e20bf61a2243d7baaae901c912ca798d75) Reviewed-on: https://chromium-review.googlesource.com/218413
* EC: smart battery using smbus APISheng-Liang Song2014-09-031-2/+21
| | | | | | | | | | | | | | | | Ref: Common Smart Battery System Inferface Specification v8.0. Ref: http://smbus.org/specs/smbus20.pdf - Enable smbus read/write APIs with compile options BUG=chrome-os-partner:30930 BRANCH=ToT,glimmer TEST=Verified with LGC & Simplo firmware update. Change-Id: I3f4bb23147f22365adb378c2e39c40d5ba100889 Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209906 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* EC: Add smart battery firmware update driverSheng-Liang Song2014-09-033-1/+386
| | | | | | | | | | | | | | | | | | | | Ref: Common Smart Battery System Inferface Specification v8.0. - Added 2 new AP->EC Command APIs EC_CMD_SB_FW_UPDATE, EC_CMD_ENTERING_MODE - Implemented common smart battery update drivers. BUG=chrome-os-partner:24741 CQ-DEPEND=CL:210032 CQ-DEPEND=CL:210033 CQ-DEPEND=CL:215720 BRANCH=ToT,glimmer TEST=Verified on LGC & Simplo smart battery Change-Id: Ice6e60b1b04762217ae7613356d6925777c06abf Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/205323 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* EC: clean up i2c_read_stringSheng-Liang Song2014-08-291-1/+1
| | | | | | | | | | | | | | | | - Removed duplicate (similar) i2c_read_string functions. - Kept one generic (weak) copy in common/i2c.c. - TBD: Need support start/stop flags for STM32 family devices BUG=chrome-os-partner:23569 BRANCH=ToT TEST=Verified with smart battery firmware update application on glimmer. Passed LGC & Simplo Battery. Change-Id: I6d9446c60b6a36aef9a6179242c081084199c8e2 Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209866 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* samus: added gyro support for lsm6ds0Sheng-Liang Song2014-08-264-302/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | Changed motion_sense task to assume sensors are unpowered in G3 and re-initialize sensors every time coming out of G3. Added EC command line test utils as well. Fixed some bug during unit tests. BUG=chrome-os-partner:27313,27320 BRANCH=ToT TEST=Verified on Samus. Tested with accel EC CLIs accelread, accelrange, accelrate, accelres Tested accelcalib, a ACCEL calibration util, and it succeeded. Tested sysfs interface: cd /sys/bus/iio/devices/iio:device1 cat in_accel_*_gyro_raw Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Change-Id: I5752b00c03e1942c790ea4f28610fda83fa2dcbc Reviewed-on: https://chromium-review.googlesource.com/211484 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Refactor accel / gyro driver to accomodate various configurationsShawn Nematbakhsh2014-08-195-193/+207
| | | | | | | | | | | | | | | | | | | Previously our accel / gyro drivers assumed that we had exactly two of each identical part in the system. Some systems may have different configurations, so allow this to be specified at the board-level. Note that our motion_sense algorithm currently assumes that we have one accelerometer in the lid and one in the base -- we'll need to fix that in another CL. BUG=chrome-os-partner:27320 TEST=Compile-only. Tested in future Samus commit. BRANCH=None. Change-Id: I1fae1f6c578fedebe78b473a5d66a5794ccaae00 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/212321 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* pd: Print warning before flash erase if on PD powerVic Yang2014-08-141-0/+8
| | | | | | | | | | | | | | | | | During flash erase operation, read is stalled and thus interrupt might be serviced later. This can cause PD communication to fail and thus the board reboots if there is no battery. Print a warning message in this case. BUG=chrome-os-partner:31127,chrome-os-partner:31207,chrome-os-partner:31362 TEST=Boot Ryu, on software sync, see warning message before board reboots. BRANCH=None Change-Id: If327a4f533fd2dfa83f92531148bd52ace927e03 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/212264 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* pi3usb9281: Implement driver for Pericom USB switchDominic Chen2014-08-133-0/+265
| | | | | | | | | | | BRANCH=none BUG=none TEST=verify that usb switch funcitons Change-Id: Ie897a2ae94042abefbb349d30dfa183caaec9ed0 Signed-off-by: Dominic Chen <ddchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209846 Reviewed-by: Vic Yang <victoryang@chromium.org>
* samus: ryu: fix charge state machine init of input currentstabilize-6146.BAlec Berg2014-08-121-9/+4
| | | | | | | | | | | | | | | | | | | | | | Currently charge state machine resets input current limit to default every time AC is connected. Problem is by the time charge state machine gets around to setting input current, it could have already been set by successful PD negotiation, and this ends up overriding that value. This fix has the state machine store desired input current limit, as determined from PD negotation or any other place, and send last desired input current limit on AC connect. BUG=chrome-os-partner:24461 BRANCH=none TEST=load on samus, test toggling between "pd 0 dev 5" and "pd 0 dev 20", and test plugging and unplugging zinger numerous times, and verify charger command always gives the expected input current limit based on PD negotiation. Change-Id: I18d8acc9e2085739e783c9c70c682d46bcce7fdb Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/211639 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* samus: ryu: set input current limit based on PD negotiationAlec Berg2014-08-091-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set input current limit based on the max current from the PD negotiation. For samus, this information is passed to the EC as a host command. For ryu, the max current is set directly following a negotiation. CONFIG_CHARGER_INPUT_CURRENT is now just the default limit, but after a successful PD negotiation, the limit can be raised. Note, for now the input current limit for samus is set to 2/3 of the value negotiated for. This is due to hardware problems measuring input current on p2b boards. BUG=chrome-os-partner:28532, chrome-os-partner:24461 BRANCH=none TEST=tested on a samus. Verified input current limit using "charger" console command from EC. Input current limit after a reboot is 512. When zinger is plugged in, it jumps to the appropriate value (currently 1280mA), and when the negotiation is changed using the "pd 0 dev 5" command on the PD console, the input current limit is adjusted to match (2000mA). Change-Id: Iab9186a0f9814655e3240217a9baf4a38f15f84d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/211023 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* battery: fix BQ27541/BQ27741 gas gauge driverVincent Palatin2014-07-291-6/+21
| | | | | | | | | | | | | | | | | | | | | | Update the code to be compatible with charge v2 expectations : never return EC_ERROR_UNIMPLEMENTED for battery information else the charge code continuously tries to read them again. Fix the State Of Charge reading : on BQ27741 the gas gauge gets confused if we do a 16-bit I2C read while a 8-bit read works perfectly. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=run a Ryu connected to a Kirby battery and check the output of the "battery" command. Change-Id: Ic1d6128dc02efa47662fa5ca5b9e5de62420ebe8 Reviewed-on: https://chromium-review.googlesource.com/207273 Reviewed-by: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org>
* ryu: Kick battery out of disconnect state when AC is attachedstabilize-6092.BVic Yang2014-07-251-0/+49
| | | | | | | | | | | | | | | | Like Samus, the battery can be placed into a disconnect state. This CL implements the necessary function to determine if it is so and kick it out of this state when possible. BUG=chrome-os-partner:30633 TEST=Put a battery in this state. Plug in AC. Verify the battery is revived. BRANCH=None Change-Id: I074a72a2efe3844cbdfb0eda16a25fd8d1755a9b Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/209634 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* samus: Kick battery out of disconnect state when AC is attachedShawn Nematbakhsh2014-07-231-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Samus battery can be placed into a disconnect state by asserting a disconnect input signal. In this state, the battery will not function until a charging current is applied. This patch adds detection of the disconnect state. If a battery in disconnect state is found, a current is force-applied to the battery to kick it out of disconnect. BRANCH=None TEST=Manual on Samus. 1. Put battery into disconnect state 2. Pull AC, then reattach AC 3. Verify "found battery in disconnect state" is seen on the EC console. 4. Pull AC and verify that EC console is still accessable Also verify that battery gets out of reset state: 1. Pull AC 2. Issue "i2cxfer w16 0 0x16 0x0 0x12" command on EC console 3. Re-attach AC 4. Pull AC and verify that EC console is still accessable BUG=chrome-os-partner:29465 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ib4268887fb483094ac4e641749200268160d3014 Reviewed-on: https://chromium-review.googlesource.com/209013 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Alec Berg <alecaberg@chromium.org> Tested-by: Alec Berg <alecaberg@chromium.org>