summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-0598-106/+106
| | | | | | | | | | | | | Rename CONFIG_I2C_CONTROLLER and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* COIL: Rename local i2c variables in stm32f4Diana Z2020-11-051-36/+36
| | | | | | | | | | | | | | Rename local i2c variables and related comments to the new controller/peripheral naming scheme. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ibb6a2bdfe47824be6412d999e6c4eb0303e6b421 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518658 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* COIL: Rename CONFIG_BOARD_I2C_ADDR_FLAGSDiana Z2020-11-053-23/+23
| | | | | | | | | | | | | Rename CONFIG_BOARD_I2C_ADDR_FLAGS and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I45d4945b5c1fa26c72d233fb9def4d9bdee1c9c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518657 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Trogdor: Request 5V when AP is off and battery is fullWai-Hong Tam2020-11-052-0/+44
| | | | | | | | | | | | | | | | | | | | | The charger is not efficient on buck mode when the operating current is low. It happens when AP is off and battery is full. Request the external adapter to a lower voltage, 5V. The charger will switch to boost mode that has a better efficiency. BRANCH=None BUG=b:170794007 TEST=Charged the battery to full. Checked it requesting 20V when AP is ON, and requesting 5V when AP is OFF. TEST=Discharged the battery to not full. Checked it requesting 20V no matter AP is ON or OFF. Change-Id: Ifa333fccb40e7ebb2461c396be392c4ccc2d4320 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518326 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* TCPMv2: Correct PE_VDM_Response name stringAbe Levkoy2020-11-051-1/+1
| | | | | | | | | | | | | | PE_VDM_RESPONSE isn't a superstate. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I3450f4eb0d12bd71187932b453bbb7ebeade7f48 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2517780 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* voema: remove board ID 0 checksKeith Short2020-11-052-26/+6
| | | | | | | | | | | | | | Board ID 0 checks were only used on the volteer reference board. BUG=b:149858568 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Id55e4ca49aa584afe0ba74aec65cba0ef5c51ec9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519964 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* drobit: remove board ID 0 checksKeith Short2020-11-052-26/+6
| | | | | | | | | | | | | | Board ID 0 checks were only used on the volteer reference board. BUG=b:149858568 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ib295f480b9645f9149f5ea1aad2fe06e45692219 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519963 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* boldar: remove board ID 0 checksKeith Short2020-11-052-26/+6
| | | | | | | | | | | | | | Board ID 0 checks were only used on the volteer reference board. BUG=b:149858568 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I96b6dd4e48ef4d8febb5ec31fc7d4c18ad365063 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519962 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: remove support for boards with board ID 0Keith Short2020-11-052-26/+6
| | | | | | | | | | | | BUG=b:149858568 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic639d4afad9133f510731b0efd9ec22cdae141cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519961 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* SM5803: Raise allowable charging failures per minuteDiana Z2020-11-051-1/+1
| | | | | | | | | | | | | | | | | When drawlat suspends, it reliably triggers an OV_VBAT condition if its battery is full. To accommodate suspend stress testing, raise the ceiling of allowable charging failures per minute. BRANCH=None BUG=b:172240263 TEST=on drawlat, run 100 suspend stress cycles and observe the unit is still consuming power from the AC adapter at the end Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I8b3925d254ad69ac6657322403dfe355296ed7c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519409 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr/test/base32: specify board in makelistJett Rink2020-11-051-0/+1
| | | | | | | | | | | | | | | | Instead of specifying the board on the command line to build the base32 test. Specify it in Cmakelist instead. BRANCH=none BUG=none TEST=build and run base32 without passing board on commandline Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I8e7defa48cc285de1e1f32919b3e576698603e78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519240 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* cleanup: fix pgio -> gpio typoJett Rink2020-11-051-1/+1
| | | | | | | | | | BRANCH=none BUG=none TEST=none Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Ifcf440bd642f89f3c2b6e23f9944dc651e14fdf3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519241
* woomax: Enable CONFIG_KEYBOARD_VIVALDIEdward Hill2020-11-041-0/+1
| | | | | | | | | | | | | | | | The issue with F9/F10 in tablet mode has not been fixed, but that is lower priority than functional top row keys, so re-enable Vivaldi keyboard layout for Woomax. BUG=b:156200330 b:164207227 BRANCH=zork TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Iad7158fde2af0837de5352ff5791306bb7eb78c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519399 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* motion_sense: set sensor data rate to 0, when sensors are being powered offMike Lee2020-11-041-1/+3
| | | | | | | | | | | | | | | | | when sensors are being powered off, we should set sensor data rate to 0, to prevent the motion sense task from being unable to enter the idle state because the collect rate is not equal to 0. BUG=b:170703322 BRANCH=master TEST=make buildall pass, and test cerise power consumption meet spec in DC S5 state Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: Iae66f87aee1889b460fd598b1962be658c74ddab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505392 Reviewed-by: Cheng-Hao Yang <chenghaoyang@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* tcpmv2: Move "Allow_List" print to USBPD channelKeith Short2020-11-041-1/+3
| | | | | | | | | | | | | | | | | Move the allow_list not found message from the CONSOLE to the USBPD channel. This allows the message to be disabled during tests. BUG=none BRANCH=none TEST=make buildall TEST=Run "chan 0" and connect a charger that isn't in the allow list to volteer. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I395a701ee955200ad183dcb7da64d662d3611a4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518730 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* ADLP-RVP: Config to enable TBTPoornima Tom2020-11-032-0/+13
| | | | | | | | | | | | BRANCH=None BUG=b:171409539 TEST=Able to enter TBT mode Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I81fb01ac9e537ded25cfffc8a9691c173ed41a49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2490900 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* test: fix stm32_rtc compilation errorDawid Niedzwiecki2020-11-031-1/+1
| | | | | | | | | | | | | | | After the atomic functions change, there is a compilation error of test-stm32_rtc. Remove volatile qualifier, because it is not needed for atomic functions - 'rtc_fired' is changed only by them. BUG=b:172079887 BRANCH=none TEST=make BOARD=bloonchipper test-stm32f_rtc Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I38c48697b0ce1b639dcf767d939bb8dcf1215f79 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2512205 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* dooly: update volume down gpioZick Wei2020-11-033-6/+1
| | | | | | | | | | | | | | | | In previous CL:2504123, we replace volume down button gpio after EC get board version from CBI, which is too late for interrupt initial, so we fix volume down button on GPIO93. BUG=b:172034756 BRANCH=puff TEST=verify volume down button work on board version 2. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Ib9deae601a00efc8df456bd6c382e4e0d95ea2a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2513413 Commit-Queue: Andrew McRae <amcrae@chromium.org> Reviewed-by: Andrew McRae <amcrae@chromium.org>
* util/getversion.sh: Fix no VCSID logicCraig Hesling2020-11-031-1/+2
| | | | | | | | | | | | | | | | BRANCH=none BUG=b:168613053 TEST=./util/compare_build.sh # This forces a static version TEST=BOARD=bloonchipper CR50_DEV=blah ./util/getversion.sh TEST=BOARD=bloonchipper CR50_DEV=blah CR50_SQA=1 ./util/getversion.sh TEST=BOARD=cr50 CRYPTO_TEST=1 ./util/getversion.sh TEST=mv .git .gitnomore && ./util/getversion.sh; mv .gitnomore .git TEST=mv .git .gitnomore && VCSID=0.0.1-r1519-9b368af6a4943b90941471d0bdf7e7208788f898 ./util/getversion.sh; mv .gitnomore .git Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I0d1621b5facabf5769ea382c77cdd096d87cbc01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2412389 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* util/getversion.sh: Make input env vars more explicitCraig Hesling2020-11-031-0/+7
| | | | | | | | | | | | | | | | | This also makes cros lint (shellcheck) happy. This doesn't change any of the current usages of these variables. BRANCH=none BUG=b:168613053 TEST=./util/compare_build.sh # This forces a static version TEST=BOARD=bloonchipper CR50_DEV=blah ./util/getversion.sh TEST=BOARD=bloonchipper CR50_DEV=blah CR50_SQA=1 ./util/getversion.sh TEST=BOARD=cr50 CRYPTO_TEST=1 ./util/getversion.sh Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I4ad34b4a9d0c8823568ddfecd50f87f55666c902 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2404474 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* zephyr: punt implementing some task functionsJack Rosenthal2020-11-031-0/+21
| | | | | | | | | | | | | | | | This makes it so that we have to ifdef out less tasks code when shimming, adding runtime warnings about the code we are skipping. BUG=b:171741620 BRANCH=none TEST=compile power sequencing code, observe warnings Change-Id: I5e6686d00c04654afe458eef2690d8f6c5bd6639 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2503787 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* drobit: Remove ALS function dependent on schematic.Michael5 Chen2020-11-034-113/+2
| | | | | | | | | | | | | | Remove ALS function dependent on schematic. BUG=b:172129778 BRANCH=firmware-volteer-13521.B TEST=make BOARD=drobit Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: If24cb9fdc6583417f23c3451c668979c09cafeb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2513405 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* OCPC: Average and filter resistance calculationsAseda Aboagye2020-11-031-5/+59
| | | | | | | | | | | | | | | | | | | | | It's been seen that the resistance calculations can vary quite a bit during the charging cycle. In order to reduce this variance, this CL has the OCPC module take the running mean and use that at the combined resistance value. Additionally, values that are outside of a 6 standard deviation window are discarded. BUG=b:170974274 BRANCH=None TEST=Build and flash waddledee, enable OCPC debug logging and plot combined resistance over time as DUT charges in suspend. Verify that combined resistance does not vary significantly. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I2ccb9ccbc0b98455e78249d47f8692828f1a15e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508853 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* genvif: Output to .xml pathAbe Levkoy2020-11-033-3/+3
| | | | | | | | | | | | | | | The currently generated format is XML. The GRL C2 software requires the the filename end in .xml to successfully use it. Output to a file with this name. BUG=b:170646602 TEST=make buildall BRANCH=none Change-Id: I54dbfaef1bc76be58a0007039da659562f97e372 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2514902 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* sm5803: Use average registers for ADCAseda Aboagye2020-11-032-6/+10
| | | | | | | | | | | | | | | | | In order to help reduce variance when calculating resistance, this commit uses the average ADC registers for the SM5803. BUG=b:170974274 BRANCH=None TEST=Build and flash waddledee, verify that ADC values still make sense. Change-Id: Ic3450c538c391f82d1bc63ab3cd25e9a59c1d348 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508852 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* OCPC: Calculate resistance in suspendAseda Aboagye2020-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | Currently our resistance calculations are only made when the system is charging in S5 or lower. We can perform these calculations when the system is in suspend as well since the power consumption is low. Additionally, it's very possible that a user may not charge in G3 for a very long time if at all. BUG=b:170975872 BRANCH=None TEST=Build and flash waddledoo, suspend DUT, charge from sub board, verify that resistance is being calculated. Change-Id: I882eae0014f5c7986e5997872f4a9e004f82ee9d Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508851 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* Trogdor: Apply PD to sensors' interrupts before entering hibernateWai-Hong Tam2020-11-024-0/+36
| | | | | | | | | | | | | | | | Sensors are unpowered in hibernate. Apply PD to the interrupt lines such that they don't float. Don't need to remove the PD as they will be restored to the gpio.inc configs before the interrupts are enabled. BRANCH=None BUG=b:169595541 TEST=Triggered EC hibernate, woke up, and verified sensors working. Change-Id: I18819700d454fbbc16b28f65dad9533d97aa7d4c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511805 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Limozeen: Lid accel sensor not stuffed, apply PD to its interruptWai-Hong Tam2020-11-021-1/+3
| | | | | | | | | | | | | | | Lid accel sensor is not stuffed on Limozeen. Apply PD to its interrupt to avoid it float. BRANCH=None BUG=b:169595541 TEST=Built the image without error. Change-Id: Id9839247ee6c8bb0122eb96103d604e7beb210b1 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511806 Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* woomax: Update EC thermal table.Michael5 Chen2020-11-021-1/+2
| | | | | | | | | | | | | | | | Modify EC fan RPM value on fan table level 7 and 8. BUG=b:171025573 BRANCH=firmware-zork-13434.B TEST=make BOARD=woomax 1. Check temperature and fan rpm value. Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I9f7df18e163c61d0d6d470e1686de52b04814eee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2513411 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* tcpmv2: extended unlocked exception to battery removalJett Rink2020-11-021-1/+1
| | | | | | | | | | | | | | | | When the battery is removed and that is also tied to write protect, allow EFS2 device to get a higher power contract even if the EC-CR50 communication failed. BRANCH=none BUG=b:168521645 TEST=morphius is able to boot to recovery screen with battery unplugged Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Idcc80beeb0364264adcb21e2eaf2c44e366460f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2493104 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Replace I2C_GET_ADDR with I2C_STRIP_FLAGSYuval Peress2020-11-0224-45/+42
| | | | | | | | | | | | | | | | | The new I2C_STRIP_FLAGS macro was added to avoid conflict with Zephyr's macro. This CL performs the migration to that new API. BRANCH=none BUG=b:172067439 TEST=make runtests -j and built for various boards: eve, volteer, arcada_ish, atlas, hatch, kohaku, nocturne, samus, and scarlet Change-Id: I0583b647435db96ec268f186252b367bdc4118a6 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511097 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* asurada: enable polling mode for lid accelTing Shen2020-11-021-1/+4
| | | | | | | | | | | | | | | | | | Lid accel interrupt doesn't work in rev0/1 boards, temporarily enable polling mode for it. BUG=b:171931139 TEST=1) see sensor value updating when `accelinfo on` 2) tablet mode enter/exit triggers correctly BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ib7a7afc2f06f382b6afc599aba6b8ac5689b2981 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508206 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@chromium.org>
* Kukui: initial a new models kakadu of ec.wen zhang2020-11-026-202/+207
| | | | | | | | | | | | | | | Copy from krane, which is a model from Kukui. Modified for building pass. It will need to be revised later. BUG=b:171763111 BRANCH=master TEST=make -j BOARD=kakadu Change-Id: I87fcf8c8e3bd4fa669e0bcb7fbb9d125a9926cdb Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2501801 Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org>
* atomic: rename atomic_read_clear to atomic_clearDawid Niedzwiecki2020-11-0233-48/+42
| | | | | | | | | | | | | | | | | Rename atomic_read_clear to atomic_clear to be consistent with the rest of the atomic functions, which return the previous value of the variable. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I2588971bd7687879a28ec637cf5f6c3d27d393f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2505143 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* delbin: Configure EC fan control table.Michael5 Chen2020-11-021-2/+2
| | | | | | | | | | | | | Configure EC fan control table by thermal request. BUG=b:168958222 BRANCH=firmware-volteer-13521.B TEST=make BOARD=delbin Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I7526c8cf4bb05c41d36f9bc7205e38856f14f750 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2491576 Reviewed-by: Keith Short <keithshort@chromium.org>
* shuboz: Initial EC imageMichael5 Chen2020-11-028-0/+1292
| | | | | | | | | | | | | | | | | | Create the initial EC image for the shuboz variant by copying the dalboz reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.2.0). BUG=b:172021093 BRANCH=none TEST=make BOARD=shuboz Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I636a0e5c9b72cc67e7d751d9233a2fb8b2f60691 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2507360 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* System: shutdown chipset before enter hibernateSue Chen2020-11-023-15/+28
| | | | | | | | | | | | | | | | | Pressing Alt + h + Volume Up cannot enter hibernate on lazor. The DUT would boot up immediately. To ensure the KB hibernate successfully, the AP needs fully shutdown before hibernating. BUG=b:171731177 BRANCH=none TEST=Pressing Alt+h+VolumeUp can enter hibernate in S0, and can wake up by plugging AC, pressing power button. make buildall -j2 Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I3c09c0d339ebbaab33635a283fd57bac61ebf08f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2497371 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* flash_fp_mcu: Remove trailing spaceCraig Hesling2020-10-311-1/+1
| | | | | | | | | | | | | No functional change. BRANCH=none BUG=none TEST=none Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iccee7262549ca3355d5cb1c9d19fa484c99612e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2513130 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
* flash_fp_mcu: Add comment about zork pwr enable gpioCraig Hesling2020-10-311-1/+2
| | | | | | | | | | | | | No functional change. BRANCH=none BUG=none TEST=Tested manual pwr cycling on a Zork variant. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I3420746d97f169ad252180876fc0b739210b2779 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2513129 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
* intelrvp: Keep PPC specific code generic in baseboardVijay Hiremath2020-10-313-1/+7
| | | | | | | | | | | | BUG=none BRANCH=none TEST=PPC interrupt is invoked on ADL-RVP Change-Id: Ib41be079d0d5731627193d15b66bb9949bd2722f Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508156 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Trogdor: Configure OE_L and SEL of DP muxes to prevent leakageWai-Hong Tam2020-10-315-8/+10
| | | | | | | | | | | | | | | | | | | | | The OE_L has external pull-up. It is actually an open-drain output. Configuring it to push-pull has leakage through the pull-up to an unpowered rail during EC hibernate. Also configure SEL to output low if OE_L is deasserted. The SEL has no meaning if the muxes are disabled. When EC hibernate, the muxing ICs are unpowered. Outputing low prevents leakage through the muxing ICs. BRANCH=None BUG=b:169595541 TEST=Plugged a HDMI monitor to port-0 and port-1; checked the DP mux settings correctly. Change-Id: Icf0e81172626c09bc556756f1bcdddb83f45ac68 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508864 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Trogdor: Define the NC strap and output it lowWai-Hong Tam2020-10-314-0/+12
| | | | | | | | | | | | | Define the NC strap and output it low for power saving. BRANCH=None BUG=b:169595541 TEST=Built the images and booted fine. Change-Id: Ic2f1a098218403c3bff534b921b385ba893a83cf Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508863 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* npcx: Explicitly disable alt-function for unused pinsWai-Hong Tam2020-10-311-2/+5
| | | | | | | | | | | | | | Make the unused pins as GPIO and disable any alt-function. BRANCH=None BUG=b:169595541 TEST=make buildall -j Change-Id: I6b7c16dd68654b38c8a12654207438315fe86c2c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508862 Reviewed-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* COIL: Rename SLEEP_MASK_I2C_PERIPHERALDiana Z2020-10-315-9/+9
| | | | | | | | | | | | | Rename SLEEP_MASK_I2C_PERIPHERAL and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Idaeefda102c603a38f128d820ed1f647069eaeea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511094 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* COIL: Rename CONFIG_HOSTCMD_I2C_ADDR_FLAGSDiana Z2020-10-318-32/+32
| | | | | | | | | | | | | Rename for CONFIG_HOSTCMD_I2C_ADDR_FLAGS and surrounding comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I49dc12753957da7baa1bb387e212d75c75e81d86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511093 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* COIL: Re-name local variables and references in i2c-stm32f0.cDiana Z2020-10-311-18/+18
| | | | | | | | | | | | | | Re-name i2c references to terms controller/peripheral BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2afa76596890bd9d7e0c51cced76b0f7cc76257b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2493114 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* SYV682X: Handle CC OVP eventsEric Herrmann2020-10-311-3/+12
| | | | | | | | | | | | | | | Handle VBAT OVP events by resetting the syv682x and calling the pd handler. BUG=b:171156342 TEST=On Volteer, check that there is a successful PD re-negotiation after shorting VCONN to 20V. BRANCH=none Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Change-Id: Id7b9d3087aa8fcb17b4eda12c644ac3c5cbe3bc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2504482 Reviewed-by: Keith Short <keithshort@chromium.org>
* common/mock: Make sure mocks are only in the test buildTom Hughes2020-10-3116-1/+64
| | | | | | | | | | | BRANCH=none BUG=b:171370392 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I1517a7080bd4853918ffc7127d44e1955d925789 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2510455 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* TCPMv2: Hard Reset to only disable ADD if Vbus dropsDenis Brockus2020-10-301-3/+4
| | | | | | | | | | | | | | | | | | If the sourcing partner does not leave Safe5V on Hard Reset then AutoDischargeDisconnect should not be disabled. BUG=b:170325888 BRANCH=zork TEST=SuzyQ should work Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ie191b0529b1f33bdaca09643b5a44af034935539 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2509977 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* TCPMv2: Add allow_list for partners that didn't set UP but should haveDenis Brockus2020-10-302-6/+12
| | | | | | | | | | | | | | | | | | Added three additional monitors and renamed the defines to tell what the PID is. BUG=b:171013724 BRANCH=zork TEST=connect new devices and make sure they source us Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Iaf18d6aaad40ff5ac8d8bb57bc2568a9256712bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2509974 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>