summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* osiris: Remove unused sensorfactory-firmware-ti50-guc-14778.B-mainfactory-14778.B-mainYu-An Chen2022-05-055-150/+2
| | | | | | | | | | | | | Remove motion sensor task and configuration BUG=b:224423318 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I3a222620acaa26bcdcc0e5d4403fb04c63477cb8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627370 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* TCPMv2: Request partner's revision information in src/snk startupJameson Thies2022-05-045-6/+189
| | | | | | | | | | | | | | | | | | | | | Adding features from the USB PD 3.1 revision of the specification requires us to know the difference between USB PD Rev 3.0 and USB PD Rev 3.1 devices. But, the message header only has 2 bits for revision and only provides the major revision. To determine a devices minor revision, TCPMv2 will need to send a Get_Revision command and store the Revision response which has major/minor revision/version information. This CL adds support for sending Get_Revision, and receiving Revision. BUG=b:214087135 TEST=Checked that the PE state was correctly holding the Revision response from a USB PD Rev 3.1 partner, and also checked that the stored RMDO value was 0 for a USB PD Rev 3.0 partner. BRANCH=none Signed-off-by: Jameson Thies <jthies@google.com> Change-Id: I99f10c15750c3a1fee1d8bad89b0c4a0b0a6b2ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607054 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* osiris: Remove GPIO_ID_1_EC_KB_BL_ENYu-An Chen2022-05-041-2/+0
| | | | | | | | | | | | | Remove GPIO_ID_1_EC_KB_BL_EN due to outdated BUG=b:224423318 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I380d03da1f8a93259a015746ea77062d2e4ad423 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627371 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* volmar: undefine unnecessary PD configBoris Mittelberg2022-05-041-2/+0
| | | | | | | | | | | | | Volmar doesn't support USB4, so this config is not needed. BUG=b:231458203 BRANCH=none TEST=make -j BOARD=volmar Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I77e98cb856077ffe448db06b72f843d419e7a31b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628190 Reviewed-by: Prashant Malani <pmalani@chromium.org>
* taniks: undefine unnecessary PD configBoris Mittelberg2022-05-041-3/+1
| | | | | | | | | | | | | Taniks doesn't support USB4, so this config is not needed. BUG=b:231457091 BRANCH=none TEST=make -j BOARD=taniks Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I1c996e8de5e614d1edb70764c0b545bad34529b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628191 Reviewed-by: Prashant Malani <pmalani@chromium.org>
* TCPMv2: Verify data role in incoming messagesDiana Z2022-05-041-0/+23
| | | | | | | | | | | | | | | | | | We're required to exeute Error Recovery when we see a partner set the data role bit we believe ourselves to have. The spec gives no specific state this should be performed from, so centralize it to the PRL RX. BRANCH=None BUG=b:155418161,b:228478468 TEST=with a normal charger, verify connection completes successfully. With bad apple charger connection, verify error recovery is performed Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I82071d01ece105dbfc483446995e7f423bd9804e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602225 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Michał Barnaś <barnas@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Lazor: Reduce flash usageDiana Z2022-05-041-0/+3
| | | | | | | | | | | | | | | Lazor has less than 100 bytes free flash on ToT. Reduce the flash usage by compiling out the higher-level PD debug strings. BRANCH=None BUG=None TEST=build and observe lazor now has 700 bytes free flash Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I9bbc5bb13dfc9ba020903c9966edcb0714e7b516 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627804 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* zephyr: drivers: Add test for uart host commandsTomasz Michalec2022-05-042-0/+232
| | | | | | | | | | | | | | | | Test CONSOLE_READ and CONSOLE_SNAPSHOT host commands if correct content of buffer is returned in read next and read recent variants. BUG=b:229935172 BRANCH=none TEST=zmake -D test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I90af94c0851fc7311236beeba8108e36e53c49c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310859 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: Fix duplicated output in EC_CMD_CONSOLE_READTomasz Michalec2022-05-041-5/+21
| | | | | | | | | | | | | | | | | | | | | | | Zephyr and CrEC implementation of EC_CMD_CONSOLE_READ is different. CrEC allows to read the UART buffer upto character written before EC_CMD_CONSOLE_SNAPSHOT host command. Also an index for CONSOLE_READ_NEXT and CONSOLE_READ_RECENT subcommands is separated. This CL changes Zephyr implementation to match CrEC. BUG=b:229935172 TEST=zmake testall TEST=check if /var/log/cros_ec.log has correct content and messages are not duplicated BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I5256b45d04ff8d3994bcbaf2722bacc1f37d73b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3613912 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* PRL test: Correct received data and power rolesDiana Z2022-05-041-4/+16
| | | | | | | | | | | | | | | Simulated partner messages should contain the opposite data and power roles to our own unless they're specifically testing error handling for data role mismatch. BRANCH=None BUG=b:155418161 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I38879eb5e2caf9833d6efa8cd0d36f9363a80fe5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612213 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* prism: Update LED mappingDevin Lu2022-05-041-64/+70
| | | | | | | | | | | | | | This patch fixes the Key-LED mapping for Vell. BUG=b:227512417 BRANCH=none TEST=On Vell, run ectool --device 18d1:5022 rgbkbd <key> <color> Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ieec408883d3a3e3fe381a29e374a48210e06f66a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615955 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* burnet: Add more 44W batteriesDevin Lu2022-05-042-0/+90
| | | | | | | | | | | | | | | | This patch adds battery parameter as following: 1. DynaPack CosMX 44Wh 2. DynaPack ATL 44Wh 3. Simplo HIGHPOWER 44Wh BUG=b:231377901, b:231378635, b:231378985 BRANCH=firmware-kukui-12573.B TEST=make sure battery charging, battery cutoff works. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Iffa28caca72a38e6f2fae2470405ac2b439c9885 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626852 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* crota: add battery supportPeter Chi2022-05-042-32/+330
| | | | | | | | | | | | BUG=b:229938038 BRANCH=none TEST=make -j BOARD=crota TEST=check "cutoff" in EC console Change-Id: I0584ee5f2d8d694cbca9436babcc813f1a1bb894 Signed-off-by: Peter Chi <peter_chi@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3588128 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* ap_pwrseq: Re-arrange signal handling in power state G3S5Li Feng2022-05-043-40/+37
| | | | | | | | | | | | | | | | | | Move SLP_SUS_L checking to chipset specific file because not all have SLP_SUS_L signal. BUG=none BRANCH=none TEST=build nivviks; flash, power on successfully; test AP shutdown, system enter S5 then G3; then press power button to bring system back to S0 and AP is running. Signed-off-by: Li Feng <li1.feng@intel.com> Change-Id: I580b19499f472a199319359a251ba19a66b4838a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3622494 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* osiris: Remove unused pwm and update LED behaviorYu-An Chen2022-05-044-113/+63
| | | | | | | | | | | | Remove unused pwm and update LED behavior BUG=b:229352299 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I675c6742fee51a2f109860a4cd382e173031dd76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607469 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* Felwinter : Fix bc12 interrupt eventLeila Lin2022-05-041-2/+2
| | | | | | | | | | | | | | | | | This patch fix bc12 interrupt event to the right task id. BUG=b:226315400 BRANCH=none TEST=Type power_supply_info and check information is correct. Change-Id: I4a0a0c2f925444d7246183f5f4a16c6b7688e55d Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615963 Reviewed-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com>
* Felwinter : Correct temp_fan_off setting to make fan control normally.Logan_Liao2022-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | Atfer enter OS : DPTF control. Before OS : thermal control base on temps sensor linear control. Thermal control work abnormally because temp_fan_off is 0 in Felwinter. This patch modifies temp_fan_off value that make thermal control properly. BUG=b:229665979 BRANCH=none TEST=test Felwinter thermal control function normal. Change-Id: Icf421d1bed50bb03e344a270e277cbc09b022f6c Signed-off-by: Logan_Liao <logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615964 Commit-Queue: Logan Liao <logan_liao@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
* osiris: Modify USB type-c configurationYu-An Chen2022-05-045-317/+45
| | | | | | | | | | | | | | | | Change C0 TCPM to PS8815 Change C1 PPC to syv682x Change C0 usb_mux to PS8815 Remove C2 function Remove intel BB retime BUG=b:224423318 BRANCH=none TEST=make BOARD=osiris Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I21492e5a4e792d4305c4a0e1bbf28f47907e61d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3601919 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* test: Correct tcpci emulator init data rolesAaron Massey2022-05-045-13/+13
| | | | | | | | | | | | | | | | | | | | The tcpci emulators were associating the wrong initial data role with a particular power role during initialization. This resulted in a datarole mismatch errors being propagated as failing assertions when the TCPM attempted error recovery from a datarole mismatch. Correct initial dataroles to their corresponding initial power roles and move tcpci emulator test initialization code to before fixtures for proper state setup between tests within the same suite. BRANCH=none BUG=b:230656752 TEST=zmake test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I1d1e8e5a0e87ab7d172fd1dfadd6df878fab5f24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621797 Reviewed-by: Diana Z <dzigterman@chromium.org>
* test: add tests for motion sense fifo read host commandYuval Peress2022-05-033-0/+81
| | | | | | | | | | | BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ib354e2f1832fde80d5ec38ad54091bbd342cf85b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621800 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* test: add tests for motion sense fifo info host commandYuval Peress2022-05-033-0/+31
| | | | | | | | | | | BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: If9d372a33d095d6a5d8708758271042ea18ab0fc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621799 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* test: add tests for motion sense fifo flush host commandYuval Peress2022-05-033-0/+55
| | | | | | | | | | | BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I69416df51b69b79b714c7a6529b65c638c237c75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621798 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* PRL old Test: Correct data and power roles in messagesDiana Z2022-05-031-15/+30
| | | | | | | | | | | | | | | The PRL old test sends all simulated messages as its own data and power role, which would be a violation of the specification. BRANCH=None BUG=b:155418161 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I097aca2eca3c648ab9045517b6e22aab346fa595 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612212 Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
* CTVPD: Fix unit test Discovery simulationDiana Z2022-05-031-1/+1
| | | | | | | | | | | | | | | | The CTVPD unit test sends DiscoverIdentity to itself, but was sending as a Source/UFP with no data role swap. Correct the header to be Source/DFP. BRANCH=None BUG=b:155418161 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I73c217374faa6334e5539e37a5278393bd7c5376 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612211 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* TCPMv2: Define an ErrorRecovery request interface for CTVPDsDiana Z2022-05-031-0/+11
| | | | | | | | | | | | | | | | The PE or PRL may have reason to request that the TC begin error recovery. Define an interface for them to use, just like the one for the DRP state machine. BRANCH=None BUG=b:155418161 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I466c9f1db80b2c8bd9d32a04a8021771042cd693 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612210 Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
* zephyr:test: Add BIST test casesAl Semjonovs2022-05-031-0/+56
| | | | | | | | | | | | | | Add test cases to cover BIST scenarios BUG=b:231243718 BRANCH=NONE TEST=zmake test test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I96868884327043a8c5c12980d21a7d4289b1546e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621801 Commit-Queue: Aaron Massey <aaronmassey@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* test: Abstract PD power role init with DRP emulAaron Massey2022-05-033-15/+35
| | | | | | | | | | | | | | | | | During initialization, the DRP tcpci emulator requires setting the power role and data role as source and DFP, respectively. To reduce cognitive load on USB integration test writers abstract drp tcpci emulator initialization with respect to a particular role. BRANCH=none BUG=b:230656752 TEST=zmake test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: Ia063de355d8279aa3d2c21e7dfcf963530566977 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621796 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Disable optimization in drivers test covJeremy Bettis2022-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | If coverage is enabled, disable optimization. This doesn't really matter in the chroot, but with gcc it causes much better results. The default optimization seems to remove most return statements from the coverage, but does not remove them in the herobrine build, so those lines appear as uncovered. BRANCH=None BUG=b:190519131 TEST=zmake test -c in docker image & chroot Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I0b316f0033b5a24c8820861c63fb4599da14c436 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621870 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* galtic: Modify board active charge port setting.stabilize-14771.B-mainJacky Wang2022-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | If the charge port does not change, we don’t need to stop the charge IC. BUG=b:229953914 BRANCH=firmware-dedede-13606.B TEST=make BOARD=galtic 1. system battery cutoff (Run command ectool batterycutoff) 2. wait about 5 min 3. Plug-AC on TypeC port1. 4. Run ectool battery and check present current. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I8afeee2974752aa891c54662a9341c53c651148a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621595 Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Ivan Chen <yulunchen@google.com> Reviewed-by: Ivan Chen <yulunchen@google.com>
* pazquel: System shutdown set backlight brightness to 0Tang Qijun2022-05-031-1/+11
| | | | | | | | | | | | | | | | | | System shutdown needs to set the backlight brightness to 0; Otherwise, the next time you turn on the computer, some lcd will appear white screen. BUG=b:223336174 BRANCH=trogdor TEST=After modification, the white screen phenomenon disappears, and the boot process is displayed normally Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: If89a38135dc37e2009e8525b082cc1e5c7f9684d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607470 Reviewed-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org>
* duck: allow 512 byte usb packet.Ting Shen2022-05-032-2/+7
| | | | | | | | | | | | | | | | | | Adjust the memory allocation for Duck to allow 512 byte packet over USB. Also added a board-level config for similar boards in the future. BUG=b:228930533 TEST=verify ec_touchpad_updater works: `ec_touchpad_updater -v 18d1 -p 505b -f 301.0_1.0.bin` BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ie56c21ad9117724e819584f9d71f8f9cb385a810 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3622496 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* moli: modify config fields of barrel-jack powerElsie Shih2022-05-031-2/+2
| | | | | | | | | | BUG=b:215806030 TEST=make BOARD=moli Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com> Change-Id: I9351e6eebc43cd84999bc3674bde0f7bd7714d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621594 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* crota: Configure LED behaviorPeter Chi2022-05-034-93/+66
| | | | | | | | | | | BUG=b:229935118 BRANCH=None TEST=make -j BOARD=crota Signed-off-by: Peter Chi <peter_chi@wistron.corp-partner.google.com> Change-Id: I49529350cde85fbd0ae045e396d4bc97735bc3a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3596380 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* crota: remove ALS sensor and color light sensorPeter Chi2022-05-032-109/+1
| | | | | | | | | | | | | | Crota don't have ALS sensor and color light sensor, so remove it. BUG=b:229948419 BRANCH=None TEST=make -j BOARD=primus Signed-off-by: Peter Chi <peter_chi@wistron.corp-partner.google.com> Change-Id: If45cfb0b00be69b526e6ff9aabade4385d9229fc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3599650 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* ec_commands: Add a const for the MCHP MEC IO rangeDustin L. Howett2022-05-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | Some devices that use the CrOS EC only offer the eight I/O ports required by the Microchip MEC series embedded controller chip via ACPI or another mechanism. While this constant is not used in the ec code itself, we should provide documentation of this fact. BUG=none BRANCH=none TEST=Built successfully Signed-off-by: Dustin L. Howett <dustin@howett.net> Change-Id: Ie99fb029334f1f35197be87185d1e842b7bbf4fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3460548 Reviewed-by: Prashant Malani <pmalani@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org> Tested-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* TCPMv2: Support Data Reset as DFP, recipientAbe Levkoy2022-05-031-0/+70
| | | | | | | | | | | | | | Support receiving Data_Reset as DFP. BUG=b:141363146 TEST=Observe Data Resets from voxel (UFP) to lindar (DFP) with each as VCONN Source. BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ibe747dbc04cea0d787b3471627b940f1405ee8be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871058 Reviewed-by: Diana Z <dzigterman@chromium.org>
* test: fix flaky testYuval Peress2022-05-031-6/+0
| | | | | | | | | | | | | | | | | Remove check for value that's not being deep copied. It's possible to do this with fff but it requires a custom handler to do the deep copy. This might be worth exploring once we enable C++ with lambdas which will make the custom handlers much easier. BRANCH=none BUG=none TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: If454281440fdc3f5f55d7243301c512de870076f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3621871 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* test: Remove unused header from usb testAaron Massey2022-05-031-1/+0
| | | | | | | | | | | | | | | | The DRP partner emulator is not used in the attach src and snk USBC integration tests. Remove the unused header. BRANCH=none BUG=none TEST=zmake test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I594016acdee17233b887c5a463bc0943ba67e9cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3617681 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: isl923x: Remove ramp test in initSam Hurst2022-05-021-21/+11
| | | | | | | | | | | | | | | | | The driver disables input regulation on initialization until other tasks such as USB-C, charger_manager, etc. have had time to gather information about the state of the connected charger. Because of this no voltage ramping occurs and the test is unnecessary. BUG=b:224616537 BRANCH=none TEST=make -j runtests zmake testall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I84e68ecd13b5f8ef4dfe140e3ed040e5368925cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612208 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* ISL923x: Disable input regulation in driver initSam Hurst2022-05-021-4/+8
| | | | | | | | | | | | | | | | Disable input regulation until other tasks such as USB-C, charger_manager, etc. have had time to gather information about the state of the connected charger. BUG=b:224616537 BRANCH=none TEST=make -j runtests Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ibc03ddaeb3eb699115b535947c4a917b0255ddb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3609108 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* TCMPV2: Add state to send Status extended messagesJameson Thies2022-05-026-4/+121
| | | | | | | | | | | | | | | | | | | | When a USB PD partner sends a Get_Status message, the EC should respond with a Status message. This CL adds the Status message response and creates a new function in usb_pd_dpm which will be used to build the Status Data Block (SDB). BUG=b:227236917 TEST=triggered Status message and saw that it correctly sent data from a modified dpm_get_status_msg function on a twinkie. BRANCH=None Signed-off-by: Jameson Thies <jthies@google.com> Change-Id: Ifafa6e9ee7d9a62ef75e5c9e96606ffba64c98b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602226 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Jameson Thies <jthies@google.com> Tested-by: Jameson Thies <jthies@google.com>
* TCPMv2: Enable Data Reset on VoxelAbe Levkoy2022-05-021-0/+1
| | | | | | | | | | | | | | Perform Data Reset during mode entry and exit. Support receiving Data Reset as DFP. BUG=b:209628496,b:209624473,b:209625351 TEST=Enter and exit modes with Godzilla Creek. BRANCH=none Change-Id: Ib65025fb99fc08a0feb37fc18a1397eb3475a3de Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2869425 Reviewed-by: Diana Z <dzigterman@chromium.org>
* lid_switch: Move LID_DEBOUNCE_US to public headerJack Rosenthal2022-05-026-6/+5
| | | | | | | | | | | | | | | | | | Make this symbol available to emulation tests that depend on the debounce time. This also lets us clean up some duplicate definitions in the board files too. BUG=b:228370390 BRANCH=none TEST=CQ Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I014e81733c2d196b214127bd49485bab7d02a613 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615484 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* nipperkin: Set DC prochot current thresh at initJon Murphy2022-05-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | Nipperkin devices are spiking current frequently exceeding the 4 A threshold for over current prochot assertion on the ISL. Testing shows that setting the current threshold limit to ~6 A will minimize the impact to the user. Care should be taken not to exceed this value on Nipperkin devices as the battery will cutoff if sustained current is >= 6A for a duration of 10 mS. Keeping the current threshold below 6A gives the device a chance to assert prochot and avoid a DC cutoff. BUG=b:216489130 TEST=Boot, verify that the ISL dc prochot threshold register is set to 5.888 A BRANCH=guybrush Signed-off-by: Jon Murphy <jpmurphy@google.com> Change-Id: I7ed388ab535dad228c40fbe5bcb108679d985418 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3600625 Reviewed-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Clean up Data Reset slightlyAbe Levkoy2022-05-022-14/+16
| | | | | | | | | | | | | Remove stale TODOs. Convert #ifdef to IS_ENABLED. BUG=b:141363146 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ic43b5452491f69da7f7974ebb25e3aaf98ae5fbe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3611618 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Taniks: Remove resume/suspend hooks for RGB keyboardDaisuke Nojiri2022-05-021-19/+2
| | | | | | | | | | | | | | | This patch removes resume/suspend hooks for RGB keyboard because it is now controled by the keyboard backlight module. BUG=b:226215987 BRANCH=None TEST=Run 'ectool rgbkbd pwmsetkblight' on Taniks. TEST=Control brightness by Alt+F6/F7 on Taniks. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I20a788d86d351ebdcbede85e85e160b22bbb3d76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615853 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* Vell: Enable backlight control via RGB keyboardDaisuke Nojiri2022-05-022-1/+2
| | | | | | | | | | | BUG=b:227512417 BRANCH=None TEST=ectool rgbkbd on Vell Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I481cb3fb4c615b81e63b671a1f8f61d263dd5691 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615852 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* RGBKBD: Move initialization to keyboard backlightDaisuke Nojiri2022-05-025-91/+35
| | | | | | | | | | | | | | | This patch removes initialization code for RGB keyboard and let keyboard backlight module handle it. This patch also removes RGB keyboard integration from pwm.c since it's not used or needed. BUG=b:226215987, b:228525798, 223465912 BRANCH=None TEST=ectool rgbkbd, pwmsetkblight, pwmgetkblight on Vell & Taniks Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I01fa445f802607106f2f4a0a8e1469ab759c604b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615851 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* Zephyr: Add CONFIG_FANS to config_chip.h scopeDiana Z2022-05-023-1/+17
| | | | | | | | | | | | | | | Multiple files need access to CONFIG_FANS in order to ascertain whether the fans are a supported feature. Add this to the config_chip.h logic and add a default Kconfig option of 1 for it. BRANCH=None BUG=b:230694498 TEST=on skyrim, ensure ectool pwmgetnumfans now returns 1 Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I926ab8682fa1c76039ceb610edaf2d9ca98b0a24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615030 Reviewed-by: Keith Short <keithshort@chromium.org>
* nissa: Set the debounce time for exiting LPMAndrew McRae2022-05-022-0/+2
| | | | | | | | | | | | | | | Set a larger debounce time for exiting TCPC Low Power Mode for the raa489000 TCPC used for Nivviks. BUG=b:229646727 TEST=zmake build nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I27214d061c54a934adaed8541c658605a6debbab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3616434 Reviewed-by: Peter Marheine <pmarheine@chromium.org>