summaryrefslogtreecommitdiff
path: root/board
Commit message (Collapse)AuthorAgeFilesLines
* asurada: fix incorrect sensor nameTing Shen2020-06-021-2/+2
| | | | | | | | | | | | | | | | | Rename incorrect "Lid Mag" to "Base Mag", and "Gyro" to "Base Gyro" for consistency. BUG=None TEST=`accelinfo` BRANCH=None Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Id9072f038cf5e484679e9d6b64249f008dcce274 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2226094 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* asurada: update base sensor rotate matrixTing Shen2020-06-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | Update rotate matrix based on our assembled unit. BUG=b:150341271 TEST=manually: 1) board laying on a table: Current data 0: 253 6 8343 2) left edge of the device toward the ground: Current data 0: 8022 448 681 3) bottom edge toward the ground: Current data 0: -103 8255 763 BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Idae526c2fbc238ea555c98f3e1747ecbf932afa7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224762 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* voxel: Initial EC imageDavid Wu2020-06-029-0/+1237
| | | | | | | | | | | | | | | | | | Create the initial EC image for the voxel variant by copying the volteer reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.0.2). BUG=b:157879197 BRANCH=none TEST=make BOARD=voxel Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com> Change-Id: I93a9c897df25c5700ac4f321510745b104cdb41b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224681 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
* Waddledee: Remove 5V input limit for board rev 1Diana Z2020-06-012-5/+4
| | | | | | | | | | | | | | | Removes 5V input limit for board revision 1, while keeping it in place for revision 0 for now. BRANCH=None BUG=b:153594748 TEST=on waddledee rev 0, ensure 5V is requested when a charger is plugged in Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id7aa6e4ce5e7746ec531725ea7ba5d2599fecdfc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2222962 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* test: Add test for flash write protectionTom Hughes2020-05-304-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test demonstrates the inconsistency between STM32H743 (dartmonkey) and STM32F412 (bloonchipper). BRANCH=none BUG=b:155897971 TEST=On bloonchipper after flashing flash_write_protect.bin test: * Enable HW WP: dut-control fw_wp_en:on * Reboot to RO: reboot ro * Enable flash protection: runtest 1 => PASS * Reboot to RO: reboot ro * Try to disable flash protection: runtest 2 => FAIL TEST=On dartmonkey after flashing flash_write_protect.bin test: * Enable HW WP: dut-control fw_wp_en:on * Reboot to RO: reboot ro * Enable flash protection: runtest 1 => PASS * Reboot to RO: reboot ro * Try to disable flash protection: runtest 2 => PASS Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6eb69257f84f79a6609984efbdad7dd37803c8f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209419 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* test: Add flash_physical testTom Hughes2020-05-304-0/+4
| | | | | | | | | | | | | | | | | | | | | This test is intended to be used for testing the physical layer flash APIs. BRANCH=none BUG=b:155897971 TEST=On dragonclaw v0.2 with Segger J-Trace and servo micro connected: ./test/run_device_tests.py -t flash_physical => PASS TEST=On dragontalon with servo micro connected: > runtest => PASS Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ifd3c30da5f42ff84e77a7292cd2a7c88e8c594dd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2220734 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Waddledee: Set up C1 interrupt line for board rev 1Diana Z2020-05-302-5/+15
| | | | | | | | | | | | | | | The C1 interrupt line is swapped between board versions 0 and 1. Track which line is correct for the board version in a variable. Note that this commit would not allow the pen charging line to output correctly. BRANCH=None BUG=b:153684907 TEST=on waddledee version 0, ensure C1 still works Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie07052b8b27c219505da5f463d6846a18b08e6a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2220450 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* waddledee/waddledoo: Mark BC1.2 as always poweredAseda Aboagye2020-05-292-0/+4
| | | | | | | | | | | | | | | | | | | | This commit enables the PI3USB9201_ALWAYS_POWERED flag for the PI3USB9201 BC1.2 chip. In these designs, these parts are always powered so there's no need to explicitly enable a 5V rail. This was causing Type-A ports to turn on whenever a charger was plugged in. BUG=b:151688130, b:150814620 BRANCH=None TEST=Build and flash waddledoo, verify that Type-A ports are not powered when a charger is plugged in in S5/G3. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ic478c59e96854633a34f510e9494b908ab01ed7c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2219271 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* baseboard/kukui: move bitbang stability fix to common codeTing Shen2020-05-291-74/+0
| | | | | | | | | | | | | | | | | | All Kukui boards with bitbang enabled should have this board_battery_compensate_params() to make sure host side does not receiving bad data. BUG=b:156998242 TEST=make BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I3cd6ec521fd9d7b6b985ba15f96f694fd9095cb8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2219711 Reviewed-by: Fei Shao <fshao@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* bc12: create bc12 driver structureTing Shen2020-05-292-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support linking multiple bc12 drivers into ec binary, we have to remove the common symbols in drivers. This CL creates a bc12_drv structure to hold the original driver-specific usb_charger_* functions, and implements common usb_charger_* functions which whill dispatch the function call based on the information in bc12_drv table. Also add a CONFIG_BC12_SINGLE_DRIVER and enabled by default for backward compatibility. If CONFIG_BC12_SINGLE_DRIVER is defined, a default bc12_drv array with proper size and content will be created for the board. BUG=b:155611686 TEST=1) make buildall. 2) verify single driver mode on krane (rt946x) and juniper (pi3usb9201). 3) verify multiple driver works on asurada, see CL:2189624 for example usage. 4) verify single driver multi chip on blooglet. BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I8a96eda47c94aeb6cc150b498cfa1a6eefcc4a5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2187080 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* asurada: enable bmi160/bmm150Ting Shen2020-05-293-3/+117
| | | | | | | | | | | | | | | | | Enable bmi160/bmi150 accel/gyro/mag sensor on base. BUG=b:150341271 TEST=1) `accelrate 1 25000` to start gyro 2) Verify `accelread 0` (accel), `accelread 1` (gyro) outputs some reasonable number. BRANCH=none Change-Id: I8475ea18f0df507cd8e437d2a055217fddcad0b7 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2160335 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Lazor: Rename GPIO USB_A_CDP_ILIM_ENWai-Hong Tam2020-05-291-1/+1
| | | | | | | | | | | | | | The netname was recently changed in the schematic, to reflect the active-high signal. Do the same change on EC side. BRANCH=None BUG=b:156965411 TEST=Build successfully. Change-Id: Idc69f35cb8233894c61284e10dbe81b54366c207 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2219680 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* berknip: implement LED behaviorZick Wei2020-05-283-41/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | berknip 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: I84937e40c893b5db4e5c1e2999da9232c989adb5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2212005 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Bobba: New sku id 27 for Sparky360 (no pen)Sue2020-05-281-2/+6
| | | | | | | | | | | | | | | Add sku id 27 in board_is_convertible to enable convertible function. BUG=b:144747473 BRANCH=firmware-octopus-11297.B TEST=make buildall Change-Id: Ie739199426823efffbbf8918db16797209f05535 Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217606 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* kappa: implement battery_get_vendor_param to return oemdataTing Shen2020-05-282-0/+22
| | | | | | | | | | | | | | | | | | | | | | Kappa has a script (CL:*661617) that needs access of a non-standard SBS command for supplier and manufacture information. Implement a customized vendor param to expose this data to host. Since battery_get_vendor_param can only return 4 bytes at once, the command 0x70 is split into 16 separate calls (0x70~0x7F) to mimic the read string operation. Commands outside this range are rejected. BUG=b:155936029 TEST=1) `ectool batteryparam get <reg>`, where reg=0x70~0x7F 2) in ec console: `battparam <reg>`, where reg=0x70~0x7F BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1ee505f7473711b15b2c1029261956c4bf1bea5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215091 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* morphius: add thermal ic power on/offZick Wei2020-05-281-0/+1
| | | | | | | | | | | | | | This CL add CONFIG_TEMP_SENSOR_POWER_GPIO for morphius prevent EC read thermal IC when system power off. BUG=b:154189125 BRANCH=none TEST=check EC log without "I2C9 unwedge failed, SCL is held low". Change-Id: Ie3d3a87704c62e62ee4d0407d9b83b78094ac51f Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2190103 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Puff: Increase I2C bus speed to 400KHzAndrew McRae2020-05-281-5/+5
| | | | | | | | | | | | | BUG=b:157554433 TEST=Run on Puff BRANCH=none Change-Id: I9566dd8bc59b6a508ab2a98d08ffcc2708c121e0 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217601 Reviewed-by: Jett Rink <jettrink@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* Puff: Clear the PD saved state if TCPC is resetAndrew McRae2020-05-281-0/+4
| | | | | | | | | | | | | | | | After a reset of the TCPC, clear the saved PD state from BBRAM. BUG=b:155145509 TEST=Build and boot puff. BRANCH=none Change-Id: I4e7af5ecb9b12d9b1fd93a7a2c72be91789f0c85 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2206524 Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* test: Add scratchpad testTom Hughes2020-05-274-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time the test runs it should pass. After rebooting, the test should then fail because the scratchpad register is already set. BRANCH=none BUG=b:157059753 TEST=Build and flash bloonchipper On console: > runtest => PASS > reboot > runtest => PASS, which is WRONG TEST=Build and flash dartmonkey On console: > runtest => PASS > reboot > runtest => FAILS, which is CORRECT Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I348d723d8083ecd0d9f5535785c8049f284a00b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209189 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* terrador: Initial EC imageDavid Wu2020-05-279-0/+1237
| | | | | | | | | | | | | | | | | | Create the initial EC image for the terrador variant by copying the volteer reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.0.2). BUG=b:156435028 BRANCH=none TEST=make BOARD=terrador Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com> Change-Id: If1740fa8c2a3d298f8aa7c4a0d9c35deaa48e2ea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215397 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Extend the tcpci register dump.Andrew McRae2020-05-272-2/+2
| | | | | | | | | | | | | | | | | Extend the tcpci register dump command to allow chip specific register dumps to be displayed. BUG=b:157206143 TEST=Display ANX3447 registers on Puff. BRANCH=none Change-Id: Ib2bf1adcbe3bce75ff54c36c4306b17356eae96f Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208344 Tested-by: Andrew McRae <amcrae@chromium.org> Auto-Submit: Andrew McRae <amcrae@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org>
* servo_v4: clear SrcCap on CHG port disconnectedEric Yilun Lin2020-05-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Currently, when CHG port's PD disconnected from the servo-v4, it still holds the SourceCap information. This CL clears the SourceCap when the PD disconnection event is found. BUG=b:157261654 TEST=plug charger: > ada_srccaps 0: 5000mV/3000mA 1: 9000mV/3000mA 2: 15000mV/3000mA 3: 20000mV/2250mA unplug charger: > ada_srccaps # print nothing. BRANCH=servo_v4 Change-Id: Ia91c97d6baa5e796c909893dac9abe0e6bc7ebad Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215393 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* servo_v4: use PD_PREFER_HIGH_VOLTAGE for PDO selection logicEric Yilun Lin2020-05-271-0/+9
| | | | | | | | | | | | | | | | | | | | Define PDO selection logic for SourceCap PDO collection. On a 45W PD charger, it might provide PDOs with 15V/3A and 20V/2.25A. In this case, pd_find_pdo_index() would always prefer 15V/3A rather than 20V/2.25A and such that the 20V PDO will be disappeared when servo-v4 advertise the SrcCap. We define PD_PREFER_HIGH_VOLTAGE so that all the PDOs could be advertised by servo-v4. BUG=b:147021699 TEST=plug treeya 45W charger, and see servo-v4 advertise 20V/2.25A PDO BRANCH=servo-v4 Change-Id: I3bd071161679bae98be17fd6b53a24e258d9c15c Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2215391 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* jslrvp_ite: increase the chipset task stackSooraj Govindan2020-05-271-1/+1
| | | | | | | | | | | | | | | | | | Overflow happens when chipset_task calls CPRINTS("PD:S3->S0") in pd_chipset_resume(). Increase the stack size of CHIPSET task, to fix this. BUG=b:157452300 BRANCH=none TEST=no more overflow after increasing the stack on jslrvp Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I96cb2482a4951dbc6422ee4400b9469007922321 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2216092 Tested-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* kukui: pull up SPI1_NSS (CS_L).Eric Yilun Lin2020-05-257-7/+7
| | | | | | | | | | | | | | | | There is no pull-up at AP side, so we should pull it up at EC side to prevent EC SPI controller is starved waitting for AP SPI commands. BUG=b:156047546 TEST=make buildall; krane is booted. BRANCH=kukui Change-Id: I81f4aefb5e96f968cfbf5189b1f80e1e82f2d3ae Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2214460 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* test: Add on-device MPU unit testTom Hughes2020-05-224-0/+4
| | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:151105339, b:155229277 TEST=make BOARD=bloonchipper test-mpu -j && \ ./util/flash_jlink.py --board bloonchipper \ --image ./build/bloonchipper/mpu/mpu.bin => On console: "runtest" => All tests pass, except last which correctly panics: Data access violation, mfar = 20000000 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I1c759f50da5075b1e9027cdba253d8c06843be5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2202852 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* Puff: Use direct input for recovery button.Andrew McRae2020-05-223-25/+40
| | | | | | | | | | | | | | | | Use second input for dedicated recovery button, except for Puff version 1, which will still only use the H1 recovery button input. BUG=b:157005674 TEST=Confirm recovery button still works on Puff. BRANCH=none Change-Id: Ib4cb9ec360f56fc19ddd80ee291f779fbee5c4e4 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208338 Commit-Queue: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Trembyle: Adjust fan speeds and tempsEdward Hill2020-05-211-11/+11
| | | | | | | | | | | | | Reduce fan speeds and increase temperature limits. BUG=b:154938623 BRANCH=none TEST=check fan speed Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ic0411eb621246ecc60afa77045d284a200128cba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2210832 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* berknip: add redriver TUSB544 and PS8743Zick Wei2020-05-212-157/+104
| | | | | | | | | | | | | | | | berknip use TUSB544 on opt1 DB and PS8743 on opt3 DB. BUG=b:148757952 BRANCH=none TEST=verify on berknip opt1 and opt3 USB C1 port can work. Change-Id: Ic065c7bd9c575cd42e24512ff02548e8e07b1011 Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2183575 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Trembyle: Power off PS8811 retimer in S3Edward Hill2020-05-211-2/+2
| | | | | | | | | | | BUG=b:156696798 BRANCH=none TEST=USB-A still works Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I5d15c99925956583f2382f1ea8a2d91ea8196e92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209659 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Trogdor: Fix the current limitation of USB Type-A portWai-Hong Tam2020-05-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ILIM pin of the load switch is through a MOFET to EC GPIO. When EC outputs this GPIO High, it closes the MOFET and applies impedance (28.7K || 41.2K) to the ILIM pin. The load switch limits the CDP current: 1413-1626 mA. When EC outputs this GPIO Low, it opens the MOFET and applies impedance (28.7K) to the ILIM pin. The load switch limits the SDP current: 825-989 mA. The original GPIO default to Low was wrong that actually limits the SDP current. Should make it default to High, to limit the CDP current. BRANCH=None BUG=b:156965411 TEST=Applied a load to the USB Type-A port and checked it can source ~5V @ 1.5A. Change-Id: I1d8d52d1a82b5f837bc1a2de544425c8f2aff759 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2211958 Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* TCPMv2: Only include PD3.0 functionality when CONFIG_USB_PD_REV30Sam Hurst2020-05-214-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The TCPMv2 stack defaults to PD2.0 functionality. Defining CONFIG_USB_PD_REV30 enables PD3.0 functionality. BUG=b:155879504 BRANCH=none TEST=make -j buildall Manual tests: passed FAFT_PD running on kohaku Before patch: *** 18624 bytes in flash and 29216 bytes in RAM on kohaku RO **** *** 18544 bytes in flash and 29216 bytes in RAM on kohaku RW **** After patch: *** 23320 bytes in flash and 30336 bytes in RAM on kohaku RO **** *** 23228 bytes in flash and 30336 bytes in RAM on kohaku RW **** Flash savings of 4696 bytest Ram savings of 1120 Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I082cf62617a91b487d2d3567afd5e340bd52258c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2184547 Reviewed-by: Jett Rink <jettrink@chromium.org>
* volteer: correct lid g-sensor orientationKeith Short2020-05-211-3/+3
| | | | | | | | | | | | | | Correc the lid g-sensor orientation to match the latest boards. BUG=b:157001290, b:157018535 BRANCH=none TEST=make buildall TEST=Verify lid angle using "ectool motionsense lid_angle" Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I661e5aa7542371ba7d05944be965f22cb6fd4277 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209025 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* waddledoo: Add rotation matrices for sensorsAseda Aboagye2020-05-211-3/+16
| | | | | | | | | | | | | | | | | | | This commit adds the needed rotation matrices for the sensors to place the measurements into the standard reference frame. BUG=b:155253629 BRANCH=None TEST=Build and flash waddledoo. Compare accel readings against released chromebooks and verify that they match in orientation and sign. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I6d1cb3ed674d71b083eef5e44e972794108701a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2210826 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* Waddledoo: configure ECH1_PACKET_MODEDiana Z2020-05-211-8/+9
| | | | | | | | | | | | | | This GPIO will be used to communicate with the cr50 when we enable EFS2. BRANCH=None BUG=b:156785199 TEST=make -j buildall, boots on waddledoo Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia960e1ad6ddd83338570cae133697ed5d4f61597 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2210864 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledee: configure ECH1_PACKET_MODEDiana Z2020-05-211-0/+1
| | | | | | | | | | | | | | This GPIO will be used for communication with the cr50 when EFS2 is enabled. BRANCH=None BUG=b:156785198 TEST=make -j buildall, waddledee boots Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia1193bf61995ec0f1892a753570f28eaba64ab26 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2210863 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* nightfury : blink charge led on low batteryYongBeum.Ha2020-05-201-2/+3
| | | | | | | | | | | | | | need to blink charge led to notify user that battery is low. BUG=b:156972095 BRANCH=firmware-hatch-12672.B TEST=make -j BOARD=nightfury Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Change-Id: I76f984c8d78c5e19e4ee1e8a158e1773982ca1c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2206942 Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
* Mushu : correct the GPU power leakage.loganliao2020-05-201-2/+0
| | | | | | | | | | | | | | | | | | | GPIO60 and GPIOC2 are reserved for GPU overheat function but not used currently. It causes the GPU leakage because these two pins keep high when AP off. GPIO60 and GPIOC2 config nothing at present before we know what to do. BUG=b:156962942 BRANCH=none TEST=HW measure no leakage when MUSHU Board AP off. Change-Id: If3d31c519d678b5dff321cfcdbd2a4a750836a35 Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2206519 Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* Mushu : Hibernate fail correct.loganliao2020-05-201-3/+2
| | | | | | | | | | | | | | | | | The GPIO02 config the PSL_IN first, it cause hibernate fail. According to the Mushu circuit, It is unneeded to config PSL_IN on GPIO02. BUG=b:156986654 BRANCH=none TEST=console type hibernate and hibernate success after ap power off. Change-Id: If1d1b32f9104647174f2f56c5d3a56c7e43e2b78 Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2206943 Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* asurada rev0: Set GPM input level to 1.8V.Tony Lin2020-05-201-0/+3
| | | | | | | | | | | | | | BUG=b:155138760 TEST=make sure `gpioget AC_PRESENT` == 1 BRANCH=none Change-Id: I8b204e7834872c26c04e4ef890168aadfece49e8 Signed-off-by: Tony Lin <tonycwlin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2182113 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* asurada: Enable PWM channel 0 control for power LED on sub-board.Ayo Wu2020-05-202-0/+10
| | | | | | | | | | | | | | | | | Also, reduce the power led brightness by adjusting PWM. BUG=none TEST=make BOARD=asurada -j flash_ec TEST=pwmduty 0 -1 to disable power LED BRANCH=none Signed-off-by: Ayo Wu <ayowu@chromium.org> Change-Id: I64cfba1bdd42abcca872bad75e7d0ebec82d1347 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2178697 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* PD: Remove unnecessary PDCMD taskDiana Z2020-05-2068-68/+0
| | | | | | | | | | | | | | | | | | | The PDCMD task is only pulling interrupts from the TCPCs on most boards, which is unnecessary since the PD_INT tasks handle this job now. Remove it from any boards using the PD_INT command which are not using the older CONFIG_HOSTCMD_PD functionality (ex. samus, oak). Located boards using: find -name "ec.tasklist" | xargs grep -l PD_INT | xargs grep PDCMD BRANCH=None BUG=b:154959596 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I29be8ab1d7a2616603fb55236aed4329ed8654f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208221 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* PD: Pull EC_CMD_PD_HOST_EVENT_STATUS into common codeDiana Z2020-05-201-35/+0
| | | | | | | | | | | | | | | | This command is unrelated to the PDCMD task and can be safely pulled into the common PD host command code. After this commit, most boards using the PD_INT tasks may safely remove the PDCMD task from their boards. BRANCH=None BUG=b:154959596 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2915acd5398a5dc7da2e6daff1e213fc8dfbadc8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208220 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Ezkinil: Setting input current limit to 95%Sue2020-05-201-0/+15
| | | | | | | | | | | | | | Setting lower input current limit to make sure safety confirm test pass. BUG=b:156962946 BRANCH=none TEST=make buildall Change-Id: I3afa3c70076fcff319e47c08901616916c0a467b Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2172276 Reviewed-by: Edward Hill <ecgh@chromium.org>
* cortex-m: provide a function to set IRQ priorityPeter Marheine2020-05-191-12/+2
| | | | | | | | | | | | | | | | On Puff we need to increase some IRQ priorities to meet strict timing requirements. To support that, provide a function encapsulating the bit manipulations to adjust the priority of a single IRQ and update task.c to take advantage of it. BUG=None BRANCH=None TEST=Still builds. Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I9534f5733db48b9650a55f30e5209918a5eb24b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2192456 Reviewed-by: Andrew McRae <amcrae@chromium.org>
* Mushu : Fan1 rpm config.loganliao2020-05-181-5/+5
| | | | | | | | | | | | | | | | | | Follow the thermal team test, modify parameter that max/min Fan1 rpm and start/end temperature for Fan1. BUG=b:152011093 BRANCH=none TEST=make BOARD=mushu. Thermal team test result. Change-Id: If6f923fb35badbddf902ac32b41b6f25a1acda31 Signed-off-by: loganliao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2203572 Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* Lazor: Correct the lid g-sensor's matrix configurationWai-Hong Tam2020-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lid g-sensor placement is like: +------------------+ | | | +----+ | | | | | | |O | | O is the pin 1 marker, | +----+ | which faces to the user. +------------------+ / / / / / / / / +------------------+ The sensor's coordinate system is: x <-----+ /| / | v v z y The standard reference frame is: y ^ | | +-----> x / / v z So the matrix contributing to the standard reference frame should be: { { -1, 0, 0}, { 0, -1, 0}, { 0, 0, 1} } BRANCH=None BUG=b:155853349 TEST=Used 'accelinfo on' command to check the g-sensor's values. Change-Id: I98aa49665659374d0fda0d8a3c7622ec5f9a27bc Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2202164 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Lazor: Change the lid accel sensor driverWai-Hong Tam2020-05-162-10/+10
| | | | | | | | | | | | | | Change the driver from KX022 to BMA253. BRANCH=None BUG=b:155853349 TEST=Build the lazor image and check the lid accel sensor info. Change-Id: I945173dfa0592adbfc4ff16ebe203a92515c5f29 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2200067 Reviewed-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* Trogdor: Remove triggering AP cold reset over a hostcommandWai-Hong Tam2020-05-162-2/+0
| | | | | | | | | | | | | | | This route hasn't been used. Remove it. That makes the chipset_reset() do the same thing for all requests. BRANCH=None BUG=b:119261783 TEST=Ran the command "ectool apreset" in userspace; returned error: EC result 1 (INVALID_COMMAND) Change-Id: I8cb8b0df508ab0cbcebafed528c2204f6210cbf7 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2204581 Reviewed-by: Julius Werner <jwerner@chromium.org>
* Trogdor: Enable debug features for USB PDWai-Hong Tam2020-05-162-0/+2
| | | | | | | | | | | | | | | Enable the I2C trace and TCPCI dump, which are useful for debugging USB Type-C related issues. TCPCI dump has no performance impact. It can still be enabled on production. BRANCH=None BUG=b:146075455 TEST=Tried the console commands i2ctrace and tcpci_dump. Change-Id: I2f39c8fb91db2a853eb4b9d5d159d5e137b3b087 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2204580 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>