summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Skyrim: Set up BMA422 interruptsDiana Z2023-04-2412-21/+58
| | | | | | | | | | | | | | | | | | The BMA422 sensor provides interrupts. Enable these for all skyrim variants using this chip for more accurate readings when the ODR is changing frequently. BRANCH=skyrim BUG=b:278156424 TEST=on frostflow, ensure factory tablet test passes Change-Id: Iafabd8ccf04cd4df970d6f0c1f77195ba340f76a Signed-off-by: Diana Z <dzigterman@chromium.org> Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4460851 Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Chao Gui <chaogui@google.com> Commit-Queue: Chao Gui <chaogui@google.com>
* boxy: Initial EC imagekevin3.yang2023-04-2412-0/+1497
| | | | | | | | | | | | | | | | | | | Create the initial EC image for the boxy variant by copying the waddledee 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:277529068 BRANCH=None TEST=make BOARD=boxy Change-Id: I8ab2faee3be0acf4cafaafd1c01d63593f04f5d6 Signed-off-by: kevin3.yang <kevin3.yang@lcfc.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4444450 Tested-by: Derek Huang <derekhuang@google.com> Reviewed-by: Derek Huang <derekhuang@google.com> Commit-Queue: Derek Huang <derekhuang@google.com>
* Revert "Xivu: Implement LED behavior for RSOC"JohnWC Yeh2023-04-241-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 28052e2944fe30729d584cb2d900c39073399cd0. Reason for revert: Already change the node depends on display SOC Original change's description: > Xivu: Implement LED behavior for RSOC > > The EC modifies the raw battery level to a 'Display' > level that is then sent to the AP. > Battery Display 0-94%:Amber > Battery Low Display 0-10% > The Display values map to raw values as: > Display Raw > 10 13 > 11 14 > 94 91 > 95 92 > > BUG=b:237224850 > BRANCH=none > TEST=zmake build xivu > > Change-Id: I28417287710057ac7f37d932251d9e8dc392dfd2 > Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4100346 > Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> > Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> > Reviewed-by: Andrew McRae <amcrae@google.com> Bug: b:237224850 Change-Id: I4159020e389af538fe4953aa86538e6d11d1c27e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4461253 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com> Commit-Queue: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com>
* zephyr: it8xxx2: Add the baseboard of it82202ax and it82202ax-512Tim Lin2023-04-245-1/+115
| | | | | | | | | | | | | | | | Add the baseboard of it82202ax and it82202ax-512. BRANCH=none BUG=none TEST=zmake build roach --clobber TEST=Change zephyr_board(program/roach/BUILD.py) to the following chip variant: zephyr_board="it82202ax" or zephyr_board="it82202ax-512" Change-Id: I22980d1705dde081fde8805c545e3d82de77eb26 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4128256 Reviewed-by: Keith Short <keithshort@chromium.org>
* yavilla: Placate watchdog after receiving dp_attentionTommy Chung2023-04-241-0/+10
| | | | | | | | | | | | | | | This follows CL:4388314 to fix watchdog reset when HPD issued in short time by some peripheral display docks. BUG=none BRANCH=none TEST=make sure system won't reset under condition described above. Change-Id: Ief318cb7e9037d5b9c083af9cd2f794638aab247 Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4458711 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Devin Lu <devin.lu@quantatw.com>
* nissa: implement test for preventing buck-boost on SM5803Peter Marheine2023-04-244-13/+28
| | | | | | | | | | | | | | | | | With the SM5803 emulator landed, this uses the required functionality to test the board implementation of pd_is_valid_input_voltage(). The emulator is modified to explicitly cast dt_flags for the interrupt GPIO, because not doing so causes a warning (promoted to error) if using EC GPIO flags that lie outside the 16-bit range supported by gpio_dt_spec. BUG=b:267959470 TEST=twister -T zephyr/test/nissa BRANCH=nissa Change-Id: I7192cce5e7e3f08a148cddbf71d68b901d93dc2d Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4458507 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* screebo: Initial Zephyr EC imagewen zhang2023-04-2310-0/+406
| | | | | | | | | | | | | | | | | Create the initial Zephyr EC image for the screebo variant based on the rex reference board. More changes will be added later. BUG=b:276814951 BRANCH=none TEST=zmake build screebo Change-Id: I5a3f921b01bf35976c01de26acd23a2248eaea6c Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4416520 Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com>
* frostflow: Add CONFIG_USB_PD_STARTUP_DELAY_MSLeila Lin2023-04-221-0/+2
| | | | | | | | | | | | | | | | | Add a delay time to wait for battery wake up, which can avoid the situation of not being able to power on after cutoff. BRANCH=skyrim BUG=b:274648350 TEST=on frostflow, dut can power on after cutoff Change-Id: I450889fc2c1bcebb526c833d5b0c066e153ef798 Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4461172 Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Commit-Queue: Chao Gui <chaogui@google.com> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Chao Gui <chaogui@google.com>
* Hades: Add LED_3_L and LED_4_LDavid Huang2023-04-222-11/+19
| | | | | | | | | | | | | Add LED_3_L and LED_4_L for hades. BUG=b:272815816 BRANCH=None TEST=make BOARD=hades Change-Id: I6b075ccacab773e0a0272caf3f9381ed1258d455 Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4456034 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* ec: Add another #line directive for usb_common.cJeremy Bettis2023-04-221-0/+6
| | | | | | | | | | | | | | | | | | | To workaround pre-processor glitch in common/usb_common.c add a #line directive. BRANCH=None BUG=b:272518464 TEST=make -j$(nproc) -C zephyr -f Makefile.cq twister_host COVERAGE=y TEST=./util/find_non_exec_lines.py twister-out-host/coverage.info Change-Id: I43216871dc2998cd89c945871b15f012ced97bf8 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4461055 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* zmake: Set ninja path explicitly in testsJeremy Bettis2023-04-211-2/+8
| | | | | | | | | | | | | | | | The golden file logging tests expect ninja to be in /usr/bin/ninja, but on gitlab it has moved. BRANCH=None BUG=b:248508087, b:273639386 TEST=run_tests.sh Change-Id: I3da9587ac504c8fc89f8d414f96225ef89a23aa2 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459595 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Add test to 100% cover bmi_set_gyro_offsetJeremy Bettis2023-04-211-0/+52
| | | | | | | | | | | | | | | | | | | Call set_offset with extreme values to exercise the clipping code. BRANCH=None BUG=b:278607671 TEST=./twister -T zephyr/test/drivers/ --coverage -s drivers.default \ -- --test=bmi160::test_bmi_gyr_set_offset_min_max &&\ lcov --list-full-path -l twister-out/coverage.info | \ awk '/accelgyro_bmi_common.c/ {print $2, $3}' Change-Id: I3c3ca9ea638e6bb45e3d737019f34d71831a855e Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4454188 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* Hades: Rename USB-C2 USB-C1Daisuke Nojiri2023-04-215-36/+36
| | | | | | | | | | | | | | This CL renames USB-C2 USB-C1 to reflect the schematics names. There is no functionality change. BUG=b:272821227 BRANCH=None TEST=make BOARD=Hades Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ibaba57dd6d9570ad9f0b5a14ed4dc5cdddb8d3af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455300 Reviewed-by: Tarun Tuli <taruntuli@google.com>
* cq: Run zmake tests with coverageJeremy Bettis2023-04-211-0/+5
| | | | | | | | | | | | | | | | | If building for coverage, run the zmake tests with coverage enabled also. They don't get uploaded to gerrit or code search, because coverage.py json isn't one of the supported formats. BRANCH=None BUG=None TEST=None Change-Id: Ibdd12c05fb24034ce69b31f0cd61b56a3d81cb6f Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459597 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* ec: Add another #line directiveJeremy Bettis2023-04-211-0/+6
| | | | | | | | | | | | | | | | | | To workaround pre-processor glitch in common/usbc/usbc_task.c add a #line directive. BRANCH=None BUG=b:272518464 TEST=zmake build --coverage -a && \ ./util/find_non_exec_lines.py build/zephyr/all_builds.info Change-Id: I9241756d54a980f603312ba2526c69ca655a4a0e Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4456115 Commit-Queue: Yuval Peress <peress@google.com> Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* cq: Run hosts tests with the cros host compilerJeremy Bettis2023-04-211-0/+12
| | | | | | | | | | | | | | | | | | | In addition to the default x86_64-pc-linux-gnu- compiler, also build and run tests with the x86_64-cros-linux-gnu- toolchain. BRANCH=None BUG=None TEST=Ran with crrev/c/4439569 and it broke TEST=CQ Change-Id: I23b51e97b1205179ea3aecea686ed53eeb60f0ac Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459084 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yi Chou <yich@google.com> Commit-Queue: Yi Chou <yich@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* whiterun: Adjust CPU fan thermal parametersKornel Dulęba2023-04-211-3/+3
| | | | | | | | | | | | | | | | | | | | The difference between temp_fan_off and temp_fan_max was set to 6°C. Consequently, a one-degree difference in CPU temperature would cause a significant change in fan RPM. This results in noticeable noise variations when the CPU is subjected to a specific load. To alleviate this issue, decrease the temp_fan_off by 4°C, which, in turn, reduces the steepness of the temperature-to-RPM relationship. BUG=b:276577324 BRANCH=none TEST=Run webGL aquarium with various number of fish Change-Id: I72ec924e61a68e61a9c7f9721b7df15d18aaa2ee Signed-off-by: Kornel Dulęba <korneld@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4427797 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Radoslaw Biernacki <biernacki@google.com>
* winterhold: Implement custom fan duty adjustment logicKornel Dulęba2023-04-213-0/+85
| | | | | | | | | | | | | | | | | | | | | | | It's strongly based on the existing logic from zephyr/shim/src/fan.c. The main difference is that the fan duty is changed less aggressively, in order to avoid fan oscillation. This is done by implementing a "grace period" functionality. After the duty is change the controller will wait for a few ticks, depending on how big the change was. This is a quick fix, at some point it should be replaced by a PID type of algorithm. BUG=b:276577324 BRANCH=none TEST=Verify that the fan doesn't ramp up and down all the time under various scenarios, e.g. watching multiple videos on youtube. Co-developed-by: Radosław Biernacki <biernacki@google.com> Change-Id: I893a7802df8f5271fe1a253272fdcc3149bdf178 Signed-off-by: Kornel Dulęba <korneld@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4423153 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Radoslaw Biernacki <biernacki@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* myst: CBI add storage bitBoris Mittelberg2023-04-211-0/+18
| | | | | | | | | | | | | Align CBI bits according to SKU list BUG=b:275631095 BRANCH=none TEST=zmake build myst Change-Id: Iacc541533a0b2bfccc8d768d80c5eeff81b44d50 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455744 Reviewed-by: Diana Z <dzigterman@chromium.org>
* ec: Add another #line directiveJeremy Bettis2023-04-211-0/+6
| | | | | | | | | | | | | | | | | | To workaround pre-processor glitch in keyboard_raw.c add a #line directive. BRANCH=None BUG=b:272518464 TEST=zmake build --coverage -a && \ ./util/find_non_exec_lines.py build/zephyr/all_builds.info Change-Id: Iee4c642d8a35ec00d3e3efb97a7b10ae56806f58 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4450228 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Al Semjonovs <asemjonovs@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* Revert "Reland "Use third_party boringssl for AES""Jonathon Murphy2023-04-2110-61/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0164feeebaad4abc7deb510c57ca0707dd2babb1. Reason for revert: Breaks postsubmit b/279174496 Original change's description: > Reland "Use third_party boringssl for AES" > > This is a reland of commit 6fa9cc0c7484be908010a6acdd6547d686234e34 > > Original change's description: > > Use third_party boringssl for AES > > > > The original boringssl copy is not maintainable in the long term. > > We should build it from the upstream version. > > > > BUG=b:248508087, b:273639386 > > TEST=make runhosttests -j > > TEST=make buildall -j > > BRANCH=none > > > > Signed-off-by: Yi Chou <yich@google.com> > > Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087 > > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Signed-off-by: Yi Chou <yich@google.com> > Cq-Depend: chromium:4439330 > Change-Id: Ic22faafacaf331a1376d094a37c6efe271326d0b > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439569 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> Bug: b:248508087, b:273639386 Change-Id: I5cfb826bff10df55bbadf76c6cc2062bc761a6d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4456117 Commit-Queue: Jonathon Murphy <jpmurphy@google.com> Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Auto-Submit: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Tested-by: Jonathon Murphy <jpmurphy@google.com> Owners-Override: Jonathon Murphy <jpmurphy@google.com>
* Revert "Reland "tree: Remove the stale boringssl AES code""Jonathon Murphy2023-04-2116-0/+3747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e03009c0dccc4ae9683d3b7d761e900b3cf2c46. Reason for revert: Breaks postsubmit b/279174496 Original change's description: > Reland "tree: Remove the stale boringssl AES code" > > This is a reland of commit 1eb725490d0e7ff726b9edcf11579080a412a02f > > Original change's description: > > tree: Remove the stale boringssl AES code > > > > BUG=b:248508087, b:273639386 > > TEST=make runhosttests -j > > TEST=make buildall -j > > BRANCH=none > > > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > > Signed-off-by: Yi Chou <yich@google.com> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Signed-off-by: Yi Chou <yich@google.com> > Change-Id: Ifca00792d0568ed767a1c9aea4953eb7a93c1c92 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439570 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> Bug: b:248508087, b:273639386 Change-Id: I4c44cdd75a9cc38e3e0e688d91f2a64b908ae61d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459598 Tested-by: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Auto-Submit: Jonathon Murphy <jpmurphy@google.com> Owners-Override: Jonathon Murphy <jpmurphy@google.com>
* Revert "Reland "fpsensor: Use OPENSSL_cleanse instead of always_memset""Jonathon Murphy2023-04-213-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32316a1137042220e533166e097a23b12d5ce91c. Reason for revert: Breaks postsubmit b/279174496 Original change's description: > Reland "fpsensor: Use OPENSSL_cleanse instead of always_memset" > > This is a reland of commit 848e5a749e7cd6d02a2b31ee275470ba68cbe43d > > Original change's description: > > fpsensor: Use OPENSSL_cleanse instead of always_memset > > > > BUG=b:248508087, b:273639386 > > TEST=make runhosttests -j > > TEST=make buildall -j > > BRANCH=none > > > > Change-Id: If26578b31d768875bd4b85cdce8a6365e181685a > > Signed-off-by: Yi Chou <yich@google.com> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387995 > > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: I2a818345996e4a9f545ad7eefbdaf6a7e4497795 > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439434 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> Bug: b:248508087, b:273639386 Change-Id: I8d34bb643c6d7c3be2ef1719c7b6ffae387a36b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459599 Auto-Submit: Jonathon Murphy <jpmurphy@google.com> Tested-by: Jonathon Murphy <jpmurphy@google.com> Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Owners-Override: Jonathon Murphy <jpmurphy@google.com>
* zephyr: Add support for board override of fan duty adjustment logicKornel Dulęba2023-04-213-52/+83
| | | | | | | | | | | | | | | | | | | The generic logic has proven to not work well on whiterun. In order to mitigate that, while not affecting everyone else, a custom fan duty adjustment logic needs to be implemented. The behavior is controlled with CONFIG_CUSTOM_FAN_DUTY_CONTROL, which will be enabled on whiterun in a another patch. Some structs has been moved to the fan header, so that they can be accessed from the custom logic. BUG=b:276577324 BRANCH=none TEST=make try_build_boards Change-Id: Iff31b6526be83b8b0165c4490bafe26f131e6c84 Signed-off-by: Kornel Dulęba <korneld@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4423152 Reviewed-by: Keith Short <keithshort@chromium.org>
* Reland "fpsensor: Use OPENSSL_cleanse instead of always_memset"Yi Chou2023-04-213-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 848e5a749e7cd6d02a2b31ee275470ba68cbe43d Original change's description: > fpsensor: Use OPENSSL_cleanse instead of always_memset > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: If26578b31d768875bd4b85cdce8a6365e181685a > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4387995 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Change-Id: I2a818345996e4a9f545ad7eefbdaf6a7e4497795 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439434 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Reland "tree: Remove the stale boringssl AES code"Yi Chou2023-04-2116-3747/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 1eb725490d0e7ff726b9edcf11579080a412a02f Original change's description: > tree: Remove the stale boringssl AES code > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Signed-off-by: Yi Chou <yich@google.com> Change-Id: Ifca00792d0568ed767a1c9aea4953eb7a93c1c92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439570 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Reland "Use third_party boringssl for AES"Yi Chou2023-04-2110-21/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 6fa9cc0c7484be908010a6acdd6547d686234e34 Original change's description: > Use third_party boringssl for AES > > The original boringssl copy is not maintainable in the long term. > We should build it from the upstream version. > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Signed-off-by: Yi Chou <yich@google.com> > Change-Id: I3ead1244c3c839590281e20e5c4828242933d1f2 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3925087 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Signed-off-by: Yi Chou <yich@google.com> Cq-Depend: chromium:4439330 Change-Id: Ic22faafacaf331a1376d094a37c6efe271326d0b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439569 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* beadrix: Support POW-TECH batterygavin.lee2023-04-212-0/+30
| | | | | | | | | | | | | | | | | Add second source battery POW-TECH SG20JL1C2S5900-P1P BUG=b:273842037 TEST=emerge-dedede chromeos-ec , read battery info via EC console BRANCH=none Signed-off-by: Owen Yang <owen.yang@ecs.corp-partner.google.com > Change-Id: I0a7a5fbb0c64713f75d0449954c1a9b97ffdacb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4349273 Tested-by: Owen Yang <owen.yang@ecs.corp-partner.google.com> Reviewed-by: Ivan Chen <yulunchen@google.com> Commit-Queue: Ivan Chen <yulunchen@google.com> Reviewed-by: Owen Yang <owen.yang@ecs.corp-partner.google.com>
* zephyr: test: Set up OCPC test project and check console commandsTristan Honscheid2023-04-2110-1/+492
| | | | | | | | | | | | | | | | | | | Add a new test binary that has a Nissa-style Kconfig and devicetree, complete with chargers. Use this configuration to run OCPC (common/ocpc.c) and test this module, which has never previously been used in our tests. This CL contains tests for ocpc.c's console commands. BRANCH=None BUG=b:276805061 TEST=./twister -T zephyr/test/ocpc Change-Id: I34dbe1abcae98d8ca9aa9613dddf3b4ba2838792 Signed-off-by: Tristan Honscheid <honscheid@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4438529 Commit-Queue: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Taranza: Create initial EC imageYu-An Chen2023-04-2111-1/+958
| | | | | | | | | | | | | | | | | Create the initial EC image for the taranza variant by copying the dibbi board EC files. More changes will be added later. BUG=b:277664211 BRANCH=none TEST=make BOARD=taranza Change-Id: I5b085ed96117e268fe0e5b30d0e5eb4cb7ae522a Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4410551 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* zephyr: led: Change the node depends on display SOCwen zhang2023-04-211-1/+2
| | | | | | | | | | | | | | | | This change makes the zephyr shim led driver use the display SoC for the LED node that depends on battery level, so that the charge LED and the display SoC work synchronously. BUG=b:278512388 BRANCH=none TEST=./twister -T zephyr/test/drivers/ -s drivers.led_driver Change-Id: I82a9e6a18486fb806f49855fbb5773bd7176929a Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4430138 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com>
* gitlab: Use repo to clone boringsslYi Chou2023-04-211-6/+27
| | | | | | | | | | | | | | Since we are clone the repo with "repo" command, we don't need to clone it again. BRANCH=None BUG=b:248508087, b:273639386 TEST=yaml validator, run repo_clone_at_data locally Change-Id: I08e8413382b8151bebecc90362fb7f31342c01e8 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4453523 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: bc12 shim: Remove compat guardstabilize-15432.B-mainKeith Short2023-04-211-7/+0
| | | | | | | | | | | | | | | The CONFIG_PLATFORM_EC_USB_CHARGER option already guards the bc12.c shim from compiling. A check that a BC1.2 driver is enabled is not required. BUG=none BRANCH=none TEST=zmake compare-builds -a TEST=./twister Change-Id: I1c9598b81a4eb4f96cfc85ef21ecc313db65a8a7 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426808 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* Reland "zephyr/tests: emulator and tests for sm5803"Peter Marheine2023-04-2015-7/+1665
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit fd2415cda6a261b92390aad04829f46f33ffc9e6, with sleeps in test_lpm increased from 4 to 10 seconds. This seems to fix the flakiness that was observed, verified with no failures over 8 CQ builds. Original change's description: > zephyr/tests: emulator and tests for sm5803 > > This implements an emulator and some tests for the SM5803 charger. The > current tests do not exercise the driver as comprehensively as intended, > but those will be added in a later change. > > One discovered bug in the driver is fixed, where some interrupts were > disabled immediately after being enabled. > > BUG=b:242544165 > TEST=twister -ciC -s drivers/drivers.sm5803 > BRANCH=nissa > > Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c > Signed-off-by: Peter Marheine <pmarheine@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087 > Reviewed-by: Tristan Honscheid <honscheid@google.com> BUG=b:242544165,b:278890420 TEST=`bb add chromeos/cq/firmware-zephyr-cov-cq -commit https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4451846` 8 times, verified success for all builds. Change-Id: Ifd0d486a45be2242023e6efba6457e7907aaedd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4451846 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Tested-by: Peter Marheine <pmarheine@chromium.org>
* charger: Disambiguate charger command outputDaisuke Nojiri2023-04-201-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | The values of the charger console command output are not clearly explained. This CL reformats the output as follows: Name: ISL9241 Option: (0x2830004) Man id: 0x0049 Dev id: 0x000e I_dptf: disabled Limits ( min max step) chg_voltage: 8760 mV ( 64 - 18304, 8) chg_current: 4336 mA ( 8 - 12280, 8) input_current: 4512 mA ( 8 - 12280, 8) BUG=b:278898714 BRANCH=None TEST=See above (on Vell). Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ide4b448d15b5066c43cec9e8aadf1ffdb1afe7f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4447187 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* corsola: merge pd_power_supply_* functionsTing Shen2023-04-207-102/+86
| | | | | | | | | | | | | | | | | | pd_power_supply_* functions are almost identical between krabby and kingler. Since the krabby version is already tested, merge them to reduce test code implementation effort. BUG=b:272664811 TEST=1) ./twister 2) zmake compare-builds krabby kingler BRANCH=none Change-Id: If00c8576589ae657447a7adfb18c46907f47538c Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439254 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* rollback: Add support for entropy from RNG for rollbackaddentPatryk Duda2023-04-201-5/+17
| | | | | | | | | | | | | | | | | | | | | | If 'rollbackaddent' is called without any arguments we can add entropy from RNG. This is useful for testing and debugging purposes. BUG=b:277029648 BRANCH=none TEST=Compile firmware or bloonchipper. Use 'rollbackaddent' command without any arguments to add randomness to rollback. Check if the secret was changed using 'rollbackinfo' command. TEST=./test/run_device_tests.py -b bloonchipper -t rollback.* Test "rollback_region0": PASSED Test "rollback_region1": PASSED Test "rollback_entropy": PASSED Change-Id: I0da2df8825d915eaf92364ec07f596b7638a64fd Signed-off-by: Patryk Duda <pdk@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4381923 Tested-by: Patryk Duda <patrykd@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com>
* Dibbi: Add CONFIG_EMULATED_SYSRQmick_hsiao2023-04-201-0/+1
| | | | | | | | | | | | | | | Add CONFIG_EMULATED_SYSRQ to let the EC pass the button state to the AP BUG=b:273720621 BRANCH=none TEST=get pass for the test item firmware_DevMode with the change of EC Change-Id: I27d7cba0d1fe30b89679f0b33ae5e5d5fef8144f Signed-off-by: mick_hsiao <mick_hsiao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4444453 Reviewed-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Reka Norman <rekanorman@chromium.org>
* hammer: Add jewel boardstabilize-15429.B-mainlschyi2023-04-203-0/+12
| | | | | | | | | | | | | | | Add the Hammer derivative base jewel board. BUG=b:278138283 TEST=make BOARD=jewel BRANCH=none Change-Id: I506d619b95149041a2ee8f8997032252d359c9d4 Signed-off-by: lschyi <lschyi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4444451 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org>
* rex: Update GPIOsCaveh Jalali2023-04-208-99/+122
| | | | | | | | | | | | | | | | | | | | | | Regenerate rex GPIO definitions from spreadsheet+arbitrage. gpio.csv and generated.dtsi are purely auto-generated. rex.dtsi contains overrides to generated.dtsi to correct the cases that the automated process doesn't handle correctly, yet. the workflow is: 1. run arbitrage to generate gpio.csv 2. run util/pinmap/pinmap/pinmap to generate generated.dtsi BRANCH=none BUG=b:276384581 TEST=42/45 passes on suite:faft_ec (no worse than before) Change-Id: Ia43fe20f2c7e422902deb107b39814cf499b2790 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4392209 Reviewed-by: Yuval Peress <peress@google.com>
* retimer: Use common console command for all RetimersVijay Hiremath2023-04-199-165/+169
| | | | | | | | | | | | | | BUG=b:278138274 BRANCH=none TEST=Tested on ADL-RVP, retimer console command works ./twister -T zephyr/test/drivers ./twister -T zephyr/test/drivers -s drivers.default ./firmware_builder.py --metrics /tmp/tmp_pc1rc15 build Change-Id: Idaec9b41f550ad6aafa34400e95ebf00b9c11348 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426790 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* rex: Shuffle GPIOs for easier reviewCaveh Jalali2023-04-192-50/+19
| | | | | | | | | | | | | | | | The next round of auto generated GPIOs includes updates for overrides currently in rex.dtsi, so move them over so changes are easier to review. BRANCH=none BUG=b:276384581 TEST=rex boots Change-Id: Ibdc3bd94e6cf7134169bee75e406b7a105820fbe Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4392208 Reviewed-by: Madhu 🌱 <mparuchuri@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* ec: Add another #line directiveJeremy Bettis2023-04-191-0/+6
| | | | | | | | | | | | | | | | | | | To workaround pre-processor glitch in motion_lid.c add a #line directive. BRANCH=None BUG=b:272518464 TEST=zmake build --coverage -a && \ ./util/find_non_exec_lines.py build/zephyr/all_builds.info Change-Id: I6e35ec1eb2ad4b90e09b082bb3439b4910fecf94 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4447188 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Al Semjonovs <asemjonovs@google.com>
* Revert "zephyr/tests: emulator and tests for sm5803"Aaron Massey2023-04-1915-1665/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd2415cda6a261b92390aad04829f46f33ffc9e6. Reason for revert: http://b/278890420 - test was flakily blocking CQ Original change's description: > zephyr/tests: emulator and tests for sm5803 > > This implements an emulator and some tests for the SM5803 charger. The > current tests do not exercise the driver as comprehensively as intended, > but those will be added in a later change. > > One discovered bug in the driver is fixed, where some interrupts were > disabled immediately after being enabled. > > BUG=b:242544165 > TEST=twister -ciC -s drivers/drivers.sm5803 > BRANCH=nissa > > Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c > Signed-off-by: Peter Marheine <pmarheine@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087 > Reviewed-by: Tristan Honscheid <honscheid@google.com> Bug: b:242544165 Change-Id: I315d36d1e08035f13d847ea1a21756ee3790216e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4448966 Commit-Queue: Aaron Massey <aaronmassey@google.com> Tested-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: make console buffer logging depend on non-minimal loggingPeter Marheine2023-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | The console buffer log backend depends on CONFIG_LOG_OUTPUT, which only does something if logging is enabled and not in minimal mode. Without this dependency, enabling this backend while in minimal mode causes a link-time error because symbols enabled by CONFIG_LOG_OUTPUT are absent. When in minimal mode log backends are ignored completely anyway, so this change also helps prevent accidental misconfiguration because it doesn't make sense to enable a log backend that will never be used. BUG=b:265781350 TEST=zmake build -a BRANCH=none Change-Id: Ib0722102963b44484f07a779b2bbbde72b29b743 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4445346 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
* zephyr/tests: emulator and tests for sm5803Peter Marheine2023-04-1915-7/+1665
| | | | | | | | | | | | | | | | | | This implements an emulator and some tests for the SM5803 charger. The current tests do not exercise the driver as comprehensively as intended, but those will be added in a later change. One discovered bug in the driver is fixed, where some interrupts were disabled immediately after being enabled. BUG=b:242544165 TEST=twister -ciC -s drivers/drivers.sm5803 BRANCH=nissa Change-Id: I9fc6abd26cd1b2e0cbc05b8e45cf94fc83abd08c Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290087 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* nissa: implement tests for project common.cPeter Marheine2023-04-1910-3/+255
| | | | | | | | | | | | | | | | | | | This file contains some utility functions that are fairly straightforward to test, but requires more complex build configuration than the existing sub_board tests because it requires the charger code be built in. The SM5803 input voltage checks are not fully tested because the isl923x driver does not implement get_battery_cells(); testing that will require a SM5803 emulator. BUG=b:267959470 TEST=./twister -T zephyr/test/nissa BRANCH=nissa Change-Id: Ic89f8f84b1889cfb4fe588fdd7c6f06a817e76c1 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4402420 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* gitlab: Fix yamlJeremy Bettis2023-04-181-5/+5
| | | | | | | | | | | | | | | | Colons and \w are not allowed in yaml and must be quoted and escaped. BRANCH=None BUG=b:248508087, b:273639386 TEST=yaml validator on gitlab Change-Id: I46ecd711f17f1635e11086083a5afdae24fc295f Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4443072 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: LED: Reformated led-pins bindingsJason Yuan2023-04-1827-593/+565
| | | | | | | | | | | | | | | | | | This CL formats the led-pins devicetree to be more intuitive as part of the LED driver overhaul. led-policy and led driver logic is unmodified in this CL and will be added later. BUG=b:228868616 TEST=twister, power LED verified on Villager, Lazor, Skyrim, Xivu BRANCH=none Change-Id: Ia688e872811199447d1e0b11a5533fd8478d2935 Signed-off-by: Jason Yuan <jasonyuan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426805 Commit-Queue: Wai-Hong Tam <waihong@google.com> Auto-Submit: zhi cheng yuan <jasonyuan@chromium.org> Tested-by: zhi cheng yuan <jasonyuan@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* board/hyperdebug: Implement flash extensionsJes B. Klinke2023-04-183-185/+238
| | | | | | | | | | | | | | Allow dual and quad-lane SPI operations. BUG=b:273601311 TEST=HyperDebug able to flash 16MB in 31 seconds Change-Id: I0243154085d018e123053f22c4a3a9d3b5a853d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4346953 Reviewed-by: Brian Nemec <bnemec@google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org> Tested-by: Jes Klinke <jbk@chromium.org>