summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gelarshie: Initial EC imagefactory-strongbad-13963.B-mainpengjunhao52022-03-1610-0/+1750
| | | | | | | | | | | | | | | | | | | | | | Copy the Coachz reference board EC files into a new directory name for the gelarshie variant. Changed the pmic LN9310 and remove WLC. TCPC and BC 1.2 use the same i2c bus. BUG=b:222177599 TEST=cros_update_firmware -b strongbad chromeos-firmwareupdate --manifest Signed-off-by: pengjunhao5 <pengjunhao5@huaqin.corp-partner.google.com> Change-Id: I239b54a5da2e36eb8b821459bb3d9c1de369ee07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3515495 Reviewed-by: Kenny Pan <kennypan@google.com> Commit-Queue: Kenny Pan <kennypan@google.com> (cherry picked from commit c2fb5b67c31ca6ce5911b62b01c2b1a23304da60) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3524782 Tested-by: Kenny Pan <kennypan@google.com> Auto-Submit: Kenny Pan <kennypan@google.com> Reviewed-by: Knox Chiou <knoxchiou@chromium.org> Commit-Queue: Knox Chiou <knoxchiou@chromium.org>
* Clear OWNERS for factory/firmware branchBrian Norris2021-09-107-24/+0
| | | | | | | | | | | | BUG=none TEST=none Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155110 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* star: update touchpad fw size configTing Shen2021-07-141-1/+1
| | | | | | | | | | | | | | | | | | | BUG=b:190577105 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1804aecd01459f9cb45dfba8fc99dab950a0db58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948111 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> (cherry picked from commit f2f9b534389a672ef9a3f5353b49922150dab1d3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023763 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Jian-Jia Su <jjsu@chromium.org> Tested-by: Jian-Jia Su <jjsu@chromium.org>
* pazquel: Initial EC imageYunlong Jia2021-06-248-0/+1157
| | | | | | | | | | | | | | | | | | | | Create the initial EC image for the pazquel variant by copying the trogdor reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:187232137 BRANCH=Trogdor TEST=make BOARD=pazquel Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com> Change-Id: Ic898116fc93a3ac51d50f34b24c13c33a452a25f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2939856 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> (cherry picked from commit 55c1abf9ce1754cf93505400bf9b4c7c57eb03cb) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2984741
* hayato: Modify HS Detector threshold of PS8743 setting valueMichael5 Chen12021-05-105-14/+34
| | | | | | | | | | | | | | | Modify HS detector threshold setting (0x3C) to 0x60 for USB-C C1 port signal quality. BUG=b:177980418 BRANCH=asurada TEST=manual Run command "ectool i2cread 8 4 0x20 0x3c" to check register value. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I97b6bb16e7c5298ff42e35d936e0f9e60ec3b730 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845564 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* fingerprint: Add test that reads hwidKevin Shelton2021-05-0811-2/+50
| | | | | | | | | | | | | | | | | | | | | BUG=b:157576189 BRANCH=none TEST=make buildall -j, Using dragonclaw v0.2 and servo_micro: ./test/run_device_test.py -t fpsensor_hw --flasher=servo_micro, Using icetower and servo_micro: ./test/run_device_test.py -t fpsensor_wh --flasher=servo_micro --board dartmonkey; note: the testrunner hung after printing Test "fpsensor_hw": PASSED, but this hang seems unrelated Cq-Depend: chromium:2872432 Change-Id: I2a3b31776cd40d7f0b422f4845869953b8f07249 Signed-off-by: Kevin Shelton <kmshelton@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2314101 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* NX20P348x: Only check sink bit for sink_enable errorDiana Z2021-05-071-1/+1
| | | | | | | | | | | | | | | | | | | When a port is sourcing (ex. to a dongle), running sink disable on the port will currently return failure because the 5VSRC bit is set. However, sinking has been successfully disabled. Reflect this in the error return by only checking the specific sinking bit in the status register. BRANCH=None BUG=b:187220141 TEST=on guybrush, plug and unplug AC on C0 with a dongle on C1. Verify no failures to disable sinking are present. Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I529d33b41dc4bc55f7c647742c70832a125fd367 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2877866 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* giblab: Add hayato and it8xxx2_evbSimon Glass2021-05-071-1/+12
| | | | | | | | | | | | | | | | These two boards were missed from gitlab config. Add them. BUG=b:178731498 BRANCH=none TEST=try on gitlab https://gitlab.com/zephyr-ec/ec/-/pipelines/299402335 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: If8994aec61ab93969fca2b1e132e2eb64a90c177 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2880420 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Add posix-ecSimon Glass2021-05-071-2/+8
| | | | | | | | | | | | | | Add this board so we get coverage on gitlab. BUG=b:178731498 BRANCH=none TEST=try on gitlab https://gitlab.com/zephyr-ec/ec/-/pipelines/299319312 Change-Id: I27dab970650d5e705d0f04f5b0e9096b0ae25cec Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2817962 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* Reland "zephyr: zmake: Ensure all output is produced"Simon Glass2021-05-071-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 5bc4134337bdabd601159bce047306c73f13e8f8. Reason for revert: Seeing if this can be landed now I removed test_filter_debug() from this CL, since it has already been submitted with a full check of the output. Original change's description: > Revert "zephyr: zmake: Ensure all output is produced" > > This reverts commit ee4257735632f5453b9377f9f60f5c68f6917537. > > Reason for revert: depends on CL:2807486, which is responsible for CQ > failures (crbug.com/1198472). > > BUG=chromium:1198472 > BRANCH=none > TEST=pytest zephyr/zmake/test > > Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> > Change-Id: I5face75f3e59858b68a0b6e77d5c5b1a9881008a > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2823547 > Reviewed-by: Sonny Rao <sonnyrao@chromium.org> BUG=b:184298184, chromium:1198472 BRANCH=none TEST=(cd zephyr/zmake/; python3 -m pytest tests/*.py -v -k test_filter) Change-Id: I0a02d32234d871ba45833eaaab0e979b28257ca8 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2841023 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zmake: Add a helper function for test filenamesSimon Glass2021-05-071-16/+16
| | | | | | | | | | | | | Create a new function to reduce the amount of duplicated code. BUG=b:184298184 BRANCH=none TEST=(cd zephyr/zmake/; python3 -m pytest tests/*.py -v -k test_filter) Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I51124fa47eb298112bd9b2b06018d8f14b9968ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2880415 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* fingerprint: Support flash_ec in dev test runnerKevin Shelton2021-05-071-6/+22
| | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:151105339 TEST=with a dragonclaw rev 0.2: ./test/run_device_tests.py --flasher=servo_micro (flash_write_protect failed and the test runner hung after printing the test status, but this seems unrelated; all of the other tests looked to pass), ./test/run_device_tests.py and ./test/run_device_tests.py --flasher=jtrace (both get as far as executing flash_jlink.py, so the argument logic should be ok). Signed-off-by: Kevin Shelton <kmshelton@chromium.org> Change-Id: I0d41fb2fa4170292dd5a1212c601cf059ce2ee7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2872432 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org>
* mancomb: Pull eSPI RST# high to disableRob Barnes2021-05-071-1/+3
| | | | | | | | | | | | | | | eSPI RST# is asserted during S0ix but eSPI is not reinitialized during resume. eSPI RST# isn't actually needed because PLTRST# is used during initialization. BUG=b:186135022, b:186470159 TEST=No espi errors on guybrush. Builds for mancomb. BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I1d1b3c28c3f3661452e841f3293234a9337070ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855634 Reviewed-by: Diana Z <dzigterman@chromium.org>
* ln9310: check software workaround is in place for every power-upJohn Crossley2021-05-072-1/+31
| | | | | | | | | | | | | | | | | | | | | | Current software sets some registers only during initial powering of LN9310 (when battery is plugged in). If LN9310 was reset for any reason and then a system power on was attempted (power button press), then LN9310 would attempt a startup without the workaround (bad idea). This change adds a check before every LN9310 enable/disable event and re-initializes LN9310 if a reset has occurred . BRANCH=Trogdor BUG=b:185308433 TEST=Should not break the current boot flow, i.e. power-up and power-down (using long-press of the power button) should function Change-Id: I98c08f50bfd48e09776033eac64658f6e27fb58f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876869 Reviewed-by: John Crossley <crossley@lionsemi.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: John Crossley <crossley@lionsemi.corp-partner.google.com> Tested-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
* Specify type for forward-declared enumsTom Hughes2021-05-067-5/+32
| | | | | | | | | | | | | C++ does not allow enums to be forward declared unless they have a type. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6fcdedc81f2b60a44b750554939e60552a4c6a77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740567 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* util: Add explicit castsTom Hughes2021-05-0613-61/+77
| | | | | | | | | | | | | | When compiling with C++, the implicit casting that is performed in C is disallowed. Add casts in preparation for C++ compatibility. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5c25440819428db65225c772c1c5115a735db58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* blipper: don't disable charger adc in hibernate.qinwentao2021-05-061-1/+1
| | | | | | | | | | | | | | | Fix AC not detect issue when charger in hibernate. BRANCH=dedede BUG=b:186717219 TEST=make -j BOARD=blipper Signed-off-by: jesen <wangganxiang@huaqin.corp-partner.google.com> Change-Id: Ic3103bae090c77d93bd49dda1af9cf2c2945e604 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2859343 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
* ln9310: Stronger workaround to prevent SCOUT overvoltage at startupJohn Crossley2021-05-064-38/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improved workaround (compared to the previous 2520279) moves the CFLY precharge step out of the ln9310's internal startup sequence and implements it using I2C commands sent by the EC just before the I2C command that triggers the ln9310 startup. The workaround additionally modifies the ln9310's internal startup sequence to use the precharged CFLY capacitors as decoupling of an internal node during the startup sequence which should help prevent an OV glitch from appearing on the LN9310 output even if the internal level shifter on SW1 glitches and pulls up on the C1PA/B nodes. BRANCH=Trogdor BUG=b:185308433 TEST=Should not break the current boot flow, i.e. power-up and power-down (using long-press of the power button) should function similar to before this change. Testing the efficacy at preventing the SCOUT overvoltage glitch must be done with LN9310 parts screened out at wafer test that have a higher likelihood of exhibiting the glitch at the SCOUT output. With these parts, startup should be observed with a scope probe monitoring LN9310 SCOUT for overvoltagee. Change-Id: I216991f950196225cabbbfdaa2333f1650f7f4fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2837531 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: John Crossley <crossley@lionsemi.corp-partner.google.com> Commit-Queue: John Crossley <crossley@lionsemi.corp-partner.google.com>
* zephyr: Fix flash region offsets and sizesKeith Short2021-05-061-4/+4
| | | | | | | | | | | | | | | | | | | | | The flash region offsets and sizes were swapped when reading from binman.dtsi. This caused the flashrom on the AP from read only half of the flash when using "flashrom -p ec -r /tmp/zephyr.bin". This also broke the firmware_SoftwareSync FAFT test. BUG=b:184343587 BRANCH=none TEST=test_that -b volteer $DUT firmware_SoftwareSync Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I080b48d75e21ed9dc3fb8fe34998fc1a33bbb609 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876176 Commit-Queue: Yuval Peress <peress@chromium.org> Commit-Queue: Wai-Hong Tam <waihong@google.com> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* common: lid angle calculation: Exclude any measurement over 1.1gGwendal Grignou2021-05-061-1/+1
| | | | | | | | | | | | | | | | | When a given axis is reporting 1.1g or over, it means the device is moving. The constant representing the limit was not set properly. BUG=b:187338766 TEST=unittests. BRANCH=none Signed-off-by: Gwendal Grignou <gwendal@google.com> Change-Id: I36e38b5d7957ecaccc2c4e088d9aa506af6a2315 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875484 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org>
* lazor: Fix compilation warningWai-Hong Tam2021-05-065-2/+16
| | | | | | | | | | | | | | It fixes the compilation warning: warning: implicit declaration of function 'board_is_clamshell'. BRANCH=None BUG=None TEST=Built Chromium EC and Zephyr EC. Checked no warning. Change-Id: I3278cd29853ff8882b36a32ed95fd0c81f0b8491 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876172 Reviewed-by: Keith Short <keithshort@chromium.org>
* Makefile: Update C++ compile commandTom Hughes2021-05-052-3/+5
| | | | | | | | | | | | | | | | | | Update cmd_cxx_to_host to match current cmd_c_to_host. Switch HOSTCXX to clang++ to match "CXX" in Makefile.toolchain (and the toolchain that we use in the rest of Chrome OS). Add "-std=gnu++17" to match the C++ standard that we use in the rest of Chrome OS. Followup commits will make use of these changes. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5878ae64dc5ac76db22b3c331915b191a00f4257 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2872429 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* Mancomb: Increase LPM exit debounceDiana Z2021-05-051-0/+2
| | | | | | | | | | | | | | | With the default exit LPM debounce of 25 ms, the NCT3807 may not correctly register a new connection. Make the debounce longer to ensure our initial connection state is more reliable. BRANCH=None BUG=b:183182447 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I83c90e2cfe1c6ac19aaa90c721b47b85e1d553b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2842243 Reviewed-by: Rob Barnes <robbarnes@google.com>
* run_device_tests: remove -n flag from dut-control cmdJosie Nordrum2021-05-051-10/+7
| | | | | | | | | | | | | | | | | | | Removed the servo board name flag from dut-control command in run_device_tests.py. This flag is needed when there are many servos connected with servods running. Grepped platform/ec directory to remove all uses of this flag. BRANCH=None BUG=None TEST=ran AES test on dartmonkey with servo micro and jlink attached ./test/run_device_tests.py -b dartmonkey -t aes Signed-off-by: Josie Nordrum <JosieNordrum@google.com> Change-Id: I97bf3cd4c524a2b5fb292d255cde57a8b65fcdc4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2689320 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Josie Nordrum <josienordrum@google.com> Tested-by: Josie Nordrum <josienordrum@google.com>
* I/O Expander: Add CCG6XX driverVijay Hiremath2021-05-055-0/+179
| | | | | | | | | | | | | | | Cypress CCGXXF PD has built-in I/O Expander, added driver to enable GPIO functionality. BUG=none BRANCH=none TEST=Tested on ADLRVP, ioexget & ioexset works as expected Change-Id: I8503178703ad166ac77e96d1990133c88169d23a Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853143 Tested-by: Svyatoslav Paliy <svpaliy@gmail.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* volet: Initial EC imageSheng-Liang Pan2021-05-059-0/+1551
| | | | | | | | | | | | | | | | | | Create the initial EC image for the volet variant by copying the voxel reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:186334008 BRANCH=None TEST=make BOARD=volet Change-Id: I97cee656f4f12785110297afb323d2feac2b48d1 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2866925 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* touchpad_elan: ignore unknown ic_typeTing Shen2021-05-051-7/+3
| | | | | | | | | | | | | | | | | | | | | | | Unknown ic_type is not a fatal error, it only affects fw update, but not other usual touchpad functions. We can ignore this error to keep touchpad working. BUG=none TEST=EC able to ignore the unknown ic type error [1.299220 elan_tp_init: ic_type:1500.] [1.299820 elan_tp_init: iap_version:0204.] [1.299976 unknown ic_type: 21] [1.302292 max=3282/1793 width=82/76 adj=0 dpi=800/800] [1.302570 *** TP mismatch!] [1.303245 elan_tp_init:0] BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ic0471989bb669482deee973c0e4495a65f6928f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2874947 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* touchpad_elan: add ic type 0x15 supportTing Shen2021-05-051-1/+2
| | | | | | | | | | | | | | | Sync the elan_get_fwinfo function from kernel v5.12 to ec codebase. BUG=b:183899273 TEST=no "unknown ic_type: 21" in ec console BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I0499d2666151448a504d1759d1ee6c3f5376a97a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2874946 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* cret: Implement motion sensor setting MB LSM6DSOjohnwc_yeh2021-05-053-18/+18
| | | | | | | | | | | | | | | | | | | Implement motion sensor setting on MB side and sensor board side. Change MB LSM6DSM to LSM6DSO. The sensor of model: 1.MB: LSM6DSOTR 2.Sensor board: LIS2DE12TR BUG=b:184504094 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I002feb39026c132834a7e18af67348f5a1082c08 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2835260 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Guybrush: Correct temperature indexesDiana Z2021-05-051-3/+3
| | | | | | | | | | | | | | | | | | | The temp_sensor index should indicate the "index among the same kind of sensors." In the case of thermistors, this will be directly used as the ADC index to read from. Note that this is a no-op for guybrush, because the adc_channel indexes already aligned with the temp_sensors indexes. BRANCH=None BUG=b:187183867 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia316a8985271cfc2af070ad351a0aba94703dc2a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870539 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Mancomb: Correct temperature indexesDiana Z2021-05-051-3/+3
| | | | | | | | | | | | | | | | The temp_sensor index should indicate the "index among the same kind of sensors". In the case of thermistors, this will be directly used as the ADC index to read from. BRANCH=None BUG=b:187183867 TEST=on mancomb, verify temperature sensor readings are reasonable Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I3c3f340abc72649f22c96031d79d554b01d6a097 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870538 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* voema: add voema_npcx796fc build targetBen Chen2021-05-053-0/+16
| | | | | | | | | | | | | | supports npcx796fc build target to switch npce796fc/797fc chip select. BUG=b:187096310 BRANCH=none TEST=make buildall, workable on the re-worked Board. Change-Id: I0c6eff0a4ba11ff7dc07333f8230d3df34f21d64 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870885 Reviewed-by: YH Lin <yueherngl@chromium.org>
* test: motionsense fifo: Fix time unitsYuval Peress2021-05-051-19/+19
| | | | | | | | | | | | | Convert time units in the test from ns to us BRANCH=none BUG=none TEST=make run-motion_sense_fifo Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I345ce43945d2bcd743347296430d76c2992a953a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871056 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* Cret: Removed PD port 1 configuration and modified HDMI gpio settingJosh Tsai2021-05-054-142/+13
| | | | | | | | | | | | | | | | | | | Due to cret only support a USB PD port 0 on MB side, so remove the PD port 1 configuration in board layer. Also change the GPIOF5 and GPIO92 to HDMI function. BUG=b:186393859,b:185009499 BRANCH=dedede TEST=DUT can power on, and HDMI function is normal. Signed-off-by: Josh Tsai <Josh_Tsai@compal.corp-partner.google.com> Change-Id: I477a157aeb9115fa5b827a1412f0862c480207d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870892 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Tested-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
* pirika: Sync EC GPIO and LED setting with galticAlex1 Kao2021-05-054-104/+164
| | | | | | | | | | | | | | | Sync EC GPIO and LED setting with galtic BUG=b:186704225 BRANCH=none TEST=BOARD=pirika and pirette Change-Id: Iedaa7cecfed7e2734fcb8e719e04588d65319018 Signed-off-by: Alex1 Kao <alex1_kao@pegatron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2866028 Reviewed-by: Kirk Wang <kirk_wang@pegatron.corp-partner.google.com> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org>
* pirika: Config the EC battery setting.Kirk Wang2021-05-052-270/+27
| | | | | | | | | | | | | | | | | Config the EC battery setting depend on battery spec. BUG=b:186665315 BRANCH=none TEST=BOARD=pirika and pirette 1. Check battery found on EC log. 2. Check battery cutoff function on EC console. 3. Check battery charging FET status when battery full. Signed-off-by: Kirk Wang <kirk_wang@pegatron.corp-partner.google.com> Change-Id: I504ce2249d59a57d9f7301d0bf1021c498aa24d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2858299 Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org>
* brya: Modify lid and base accel standard refOwen_Ou2021-05-051-5/+5
| | | | | | | | | | | | | | | | Modify lid_standard_ref and base_lid_standard_ref xyz axis. BUG=b:184779333 BRANCH=none TEST=Use'watch -n 0.1 ectool motionsense'keep look xyz axis change. Signed-off-by: Owen_Ou <Owen_Ou@compal.corp-partner.google.com> Change-Id: Ifca138e3af5d65ccfc69052e59f5746e7e364c54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2848058 Tested-by: Owen Ou <owen_ou@compal.corp-partner.google.com> Auto-Submit: Owen Ou <owen_ou@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: Add motionsense lid angleOwen_Ou2021-05-051-0/+3
| | | | | | | | | | | | | | | | | Add brya ectool motionsense lid_angle BUG=b:184779333 BRANCH=none TEST=Use 'ectool motionsense lid_angle' have value. Signed-off-by: Owen_Ou <Owen_Ou@compal.corp-partner.google.com> Change-Id: I21b50f341460c458a03c393e9d9fc9caa9ed371a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2848240 Tested-by: Owen Ou <owen_ou@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Auto-Submit: Owen Ou <owen_ou@compal.corp-partner.google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* common: motionsense fifo: Reset the initialized bits after commitYuval Peress2021-05-042-2/+13
| | | | | | | | | | | | | | | | | | | | | Previously once we had one sample from a sensor, we considered the fifo initialized. Meaning we would use our computed next timestamp to spread the timestamps. This was causing issues with some devices that ended up causing the timestamps to run ahead. Reset next_timestamp_initialized back to 0 after each commit. This will allow repeated timestamps but only if a driver stages/commits the same timestamp twice. Staging the same timestamp with only a single commit will still work as before (which is the expected path). BRANCH=none BUG=b:168335284 TEST=make run-motion_sense_fifo Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ib7c566f69d7c1e4e898050b67105555dd05376e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2871055 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* util/ectool: Add constTom Hughes2021-05-041-1/+1
| | | | | | | | | | | BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id2726e28678066f46fe7437d4e66916d05ffdf47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870386 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util/ectool: Use UINT32_MAX instead of -1Tom Hughes2021-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | When compiling with C++, the conversion from "int" to "unsigned int" generates a compiler error: util/ectool.cc:5545:19: error: constant expression evaluates to -1 which cannot be narrowed to type 'uint32_t' (aka 'unsigned int') [-Wc++11-narrowing] .number_data = -1, ^~ BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If810a0f68cfdf09c3ca44a7e9233006cad188e39 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870385 Reviewed-by: Diana Z <dzigterman@chromium.org>
* include/ec_commands.h: Move extern "C" after headersTom Hughes2021-05-041-4/+4
| | | | | | | | | | | | | | | | | The headers that ec_commands.h include have C++ templates in them, which must have C++ linkage when using C++: /usr/bin/../include/c++/v1/cstddef:56:1: error: templates must have C++ linkage BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ic535d90fa7861ac291c85f6c26dda4368c7b4ee9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2869428 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Coachz: generate locked imagehanwenchao2021-05-041-9/+1
| | | | | | | | | | | | | | | | | Remove bringup configs to generate locked image for production. BRANCH=trogdor BUG=b:183687793 TEST=build Signed-off-by: hanwenchao <hanwenchao@huaqin.corp-partner.google.com> Change-Id: I369d4d8e6d55e34e43dd4218aaed9a25ef845e49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2859349 Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Philip Chen <philipchen@chromium.org>
* zephyr: Add Port80 Kconfig optionJun Lin2021-05-043-0/+20
| | | | | | | | | | | | | | | | | | | Add the new config CONFIG_PORT80_4_BYTE option to the Zephyr Kconfig tree. BRANCH=none BUG=b:184872297 TEST=New config option is in Zephyr menuconfig. TEST="BOARD="npcx9_evb make"; the checker doesn't complain the missing of new config option. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ifa5d91cb315f85d452996a47f9f715fe16f49b51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2866029 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Raul E Rangel <rrangel@chromium.org>
* copano: Fine tune Keyboard backlight PWM frequencyJacky Wang2021-05-041-1/+1
| | | | | | | | | | | | | | | | Fine tune Keyboard backlight PWM frequency from 2.4kHz to 10kHz BUG=b:187096314 BRANCH=firmware-volteer-13672.B TEST=make BOARD=drobit 1. Verified pass by EE team. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ia3a05b5d8138f3961b7d9c0133da735ae7da1a94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870888 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* Guybrush: Add AEC batteryMatt_Wang2021-05-042-1/+28
| | | | | | | | | | | | | | | | Add a new battery for proto 0 support BUG=b:182847979 BRANCH=none TEST=make BOARD=guybrush Signed-off-by: Matt_Wang <Matt_Wang@compal.corp-partner.google.com> Change-Id: If359fcb262cc6232f496de62a59a604b5cee723a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2866027 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Matt Wang <matt_wang@compal.corp-partner.google.com> Auto-Submit: Matt Wang <matt_wang@compal.corp-partner.google.com>
* Guybrush: Increase LPM exit debounceDiana Z2021-05-041-0/+2
| | | | | | | | | | | | | | | | With the default exit LPM debounce of 25 ms, the NCT3807 may not correctly register a new connection. Make the debounce longer to ensure our initial connection state is more reliable. BRANCH=None BUG=b:183182447 TEST=on guybrush, confirm system is able to detect chargers in time reliably in order to auto power on Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id53d1278425cf6ffea3476f6623eff388f3a9c09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785195 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Pirika: Modify Charger and TCPC configurations.Kirk Wang2021-05-045-165/+246
| | | | | | | | | | | | | | | Base on schematics, update charger IC and TCPC setting. BUG=b:186613739 BRANCH=none TEST=make BOARD=pirika Signed-off-by: Kirk Wang <kirk_wang@pegatron.corp-partner.google.com> Change-Id: I3659a8f7b693f730e6cffc79edf9fe583779bb12 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2856061 Reviewed-by: Alex1 Kao <alex1_kao@pegatron.corp-partner.google.com> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org>
* Port80: allow to accept 4-byte Port80 codeJun Lin2021-05-042-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | The original Port80 implementation assumes that the Port80 code is only 2-byte wide and is less than 0x100. In the recent AMD chipset (CEZANNE), AP will send a 4-byte Port80 code via a single PUT_IOWR_SHORT eSPI transaction in PSP. This CL adds a config option to allow the Port80 to print 4-byte code when the config is defined. BRANCH=none BUG=b:184872297 TEST=build the image with "#define CONFIG_PORT80_4_BYTE"; connect npcx9_evb to the eSPI host emulator; the host sends a PUT_IOWR_SHORT transaction to IO address 0x80 with 4 bytes of code "0xEEE20400"; the EC console shows: Port 80 writes: eee20400 <--new Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I3b93d9fc41e1875bb628a15c58231005e9555cfd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2858296 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Raul E Rangel <rrangel@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com>
* util/ectool: Fix compiler warningTom Hughes2021-05-041-1/+3
| | | | | | | | | | | | | | | | | When compiling with C++, the original code generates the following error: error: initializer-string for char array is too long .buf = "0123456789abcdef0123456789ABCDEF" BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ibf599d72d6c9308f10131edfb5a796a416574e6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864517 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>