summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab: Only run CI in main and coverage branchesfactory-foobar-15000.B-mainJeremy Bettis2022-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | This workflow rule will prevent this CI config from running unless the branch name is "main" or "coverage". It will have to be cherry-picked into all the other branches to make them stop running sadly. BRANCH=None BUG=b:244766499 TEST=Used yaml validator at https://gitlab.com/zephyr-ec/ec/-/ci/editor?branch_name=main&tab=2 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I536de3e3fdbca1c48505e61de5737f865bd0e233 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872545 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> (cherry picked from commit 15612bc4af40cb2a824ff2590508df29f27fbf56) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891673
* nissa: Enable CDP as the default USB-A charging modestabilize-14998.B-mainAndrew McRae2022-07-231-0/+1
| | | | | | | | | | | | | | Enable CDP as the default USB-A charging mode. BUG=b:239874346 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I2305fb92f43dbf6401305d70c8edfcc18d7bdcdc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779831 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: usba: Allow setting of USBA default charge modeAndrew McRae2022-07-232-0/+33
| | | | | | | | | | | | | | Add Kconfig options to allow USB-A port power charging mode default to be configured. BUG=b:239874346 TEST=zmake testall; zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I98d0527da655653df62685fd61c49c22b2c43eaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3782122 Reviewed-by: Sam Hurst <shurst@google.com>
* docs/ide-support.md: Use env variable for external chroot pathAndrea Grandi2022-07-221-1/+1
| | | | | | | | | | | | | | | | | Python script that runs inside the chroot is executed passing the absolute path of ChromeOS repository outside the chroot. Update the example to use the env variable $EXTERNAL_TRUNK_PATH. BRANCH=none BUG=none TEST=viewed in gitiles Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I16501d4890e9d1bbadfa9d7f19e11b9aa909f7e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3783264 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* zephyr: Upload zephyr test results to ResultDBAl Semjonovs2022-07-221-0/+160
| | | | | | | | | | | | | | | | Script to parse twister.json test results and upload them to ResultDB using rdb CLI BUG=None BRANCH=NONE TEST=rdb stream -new -realm chromium:public -- ./zephyr/zephyr_to_resultdb.py --results=twister-out/twister.json --upload=True Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I85917f644a5d669b43c144dc0ebdc8005e8a64e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3781451 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: bindigs: ensure binding file names are consistentFabio Baltieri2022-07-2218-12/+12
| | | | | | | | | | | | | | | Zephyr DTS bindings are normally named to match their compatible strings. Rename few bindings that were misnamed in the EC bindings directory. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I789c6fea96cda0d0fb4b697574ed7037097f6b1e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779901 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* zephyr: shim: leds: Use 'period' from PWM spec inplace of 'pwm-frequency'Madhurima Paruchuri2022-07-222-15/+6
| | | | | | | | | | | | | Update driver to use 'period' from PWM spec inplace of 'pwm-frequency' BUG=b:230093078 BRANCH=none TEST=zmake testall Signed-off-by: Madhurima Paruchuri <mparuchuri@google.com> Change-Id: I609619010d15a74bc3952d10788f5ef77ad877e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3777837 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: Add wrapper script for calling twisterTristan Honscheid2022-07-224-1/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a wrapper script that helps invoke twister with the correct configuration and defaults for running EC tests. Developers can simply run `./twister` from `src/platform/ec` to run all Twister-compatible EC tests, or specify specific tests to run by adding `-T path/to/testroot` arguments. Other CLI args are passed straight through to Twister. This CL also adds a testcase.yaml file to the `math` test, allowing it to be run through Twister: ``` cd $CROS_WORKON_SRCROOT/src/platform/ec ./twister (or) ./twister -T zephyr/test/math ``` Twister's output directories, `twister-out` and `twister-out.N` have been added to the `.gitignore`. The `firmware_builder.py` CQ script now also calls Twister and can merge in coverage reports. BRANCH=None BUG=None TEST=./twister Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: If6ff10ffb76655912c96a66aec28d12dcebd1764 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773766 Reviewed-by: Yuval Peress <peress@google.com>
* vell: Update fan table version 4Devin Lu2022-07-221-2/+2
| | | | | | | | | | | | | BUG=b:216026302 BRANCH=none TEST=Thermal team verified thermal policy is expected. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I084c758bb6a6380b08bb11c62a76af6cf3b61916 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3782348 Tested-by: Devin Lu <devin.lu@quantatw.com> Commit-Queue: Devin Lu <devin.lu@quantatw.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Nissa/Craask: Fix rotation parameters for base accelgyroSue Chen2022-07-223-0/+48
| | | | | | | | | | | | | Base accelgyro orientation is different after board ver2. BUG=none BRANCH=none TEST=base accel raw data on both ver1 and ver2 dut are the same. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I0b37de560cc5da52ca193751f5fc0803ec4a0846 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775279 Reviewed-by: Andrew McRae <amcrae@google.com>
* mt8195/mt_scp: enable mt8195 inner racing modeXiaoyong Lu2022-07-221-2/+2
| | | | | | | | | | | | | | enable inner racing mode in mt8195 platform. BUG=b:209531198 TEST=cts/gts test pass Signed-off-by: Xiaoyong Lu <xiaoyong.lu@mediatek.corp-partner.google.com> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Change-Id: Ie58827559cb144d7ef63545d3c4ff2bbb70db609 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3261922 Commit-Queue: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
* kingler: set VBUS ON/OFF delayEric Yilun Lin2022-07-221-0/+2
| | | | | | | | | | | | | | | Adjust the VBUS turn on/off delay by the measured result. BUG=b:237045114 TEST=The on/off delay is reflected in the scope result BRANCH=none Change-Id: I0f768eed95b5285b9b6abafd49d80538005757d7 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3768130 Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* pujjo: Remove second type-c port/charger code.jimmy.wu2022-07-226-91/+3
| | | | | | | | | | | | | | | Disable GPIO I2c function for hdmi pin. Remove type-c port1, second charger code. BUG=b:239653512 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Change-Id: I87ddb8d8df18d70363349f06bf986da8f14c65cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775788 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: add batteries into vendor-prefixes.txtScott Chao2022-07-227-20/+21
| | | | | | | | | | | | | | | This will avoid build warning due to new batteries. Also modify battery .yaml naming. Change Vendor_Manuf,Device.yaml to Vendor,Manuf_Device.yaml BRANCH=none BUG=b:239502723 TEST=zmake build joxer Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I8534b8f4170dfff3b58869d39b15aaf71d2217a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778934 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: run a single task for USB chargersPeter Marheine2022-07-222-4/+2
| | | | | | | | | | | | | | | This saves about 1400 bytes of RAM on Nereid. BUG=b:226411332 TEST=BC1.2 messages still appear on Nereid console when chargers are plugged or unplugged from either USB-C port. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I85d6d8419bc894b3bbedf43c0ab5e78336c402d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778909 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* docs/ide-support.md: Explicitly mark commands in chrootAndrea Grandi2022-07-221-3/+6
| | | | | | | | | | | | | | | | | Some bash commands must be executed inside (or outside) the chroot. Explicitly specify this in the instructions to configure the IDE. BRANCH=none BUG=none TEST=viewed in gitiles Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I0e7a8210fe8d87ac69b8197d9ea0b1b00578c5fc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3781449 Commit-Queue: Firas Sammoura <fsammoura@google.com> Reviewed-by: Firas Sammoura <fsammoura@google.com> Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* sm5803: disable GPADCs when in LPMPeter Marheine2022-07-2211-140/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's safe to disable the GPADCs when the SM5803 is not active and very dangerous to disable them when it is active, but they consume about 7mW of power that we want to save. Add support for disabling GPADCs, taking care to never disable them when the charger is active. This requires changes to users that inspect the VBUS voltage, because analog VBUS readings (as used by the USB-C state machine to detect when a source is connected) do not update when the VBUS GPADC is disabled (as happens when the charger goes to runtime LPM). sm5803_get_vbus_voltage is changed to return an error if the VBUS ADC is disabled and a new function is added to use an alternate path if necessary, which is now adopted by all users of the SM5803. BUG=b:237697900 TEST=Idle chargers now disable GPADCs when in runtime LPM (i2c read_byte I2C_SUB_USB_C1_TCPC 0x31 1 => 0) on Nereid, and VBUS detection still works following CC detection (which did not work when ADCs were disabled without any further changes). BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I40ba9b80e5503b240cdf67025a2c33817a337adb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3750543 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* sm5803: prevent use when PD max voltage exceeds 15VPeter Marheine2022-07-211-0/+7
| | | | | | | | | | | | | | | | | Silicon Mitus have recommended that VBUS never exceed 15V on boards using the SM5803 because spikes from a nominal 20V VBUS may damage the charger, even when there is a protection device in front of it. To prevent accidental misconfiguration, make it a compile-time error to enable the SM5803 driver if VBUS greater than 15V is permitted in device policy. BUG=b:230712704 TEST=build fails if CONFIG_SM5803=y and PD_MAX_VOLTAGE_MV > 15000 BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ie4438f1793700b4dfd2eb6f53440c8ad785f4c3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778901 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* dedede: limit PD voltage to 15V for boards with SM5803Peter Marheine2022-07-2131-1/+30
| | | | | | | | | | | | | | | | | | | | | | Silicon Mitus have stated that the SM5803 may be damaged by voltage spikes on VBUS in excess of 20V, and recommended that VBUS above 15V not be used to prevent damage. Although dedede configures the max PD power to 45W which will usually result in 15V@3A maximum, 20V@2.25A is also a valid choice that would be dangerous. Boards that do not use the SM5803 are unchanged, but the setting must now be specified for each board because it is not uniform across all dedede boards. BUG=b:230712704 TEST=make buildall BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I5b2359fc2720ef0b5a7f2480ff67e0e821c378ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778900 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* ide-support: Add page summary at the topAndrea Grandi2022-07-211-0/+2
| | | | | | | | | | | | | | | Add a short sentence at the beginning of the document to explain its purpose. BRANCH=none BUG=none TEST=Checked in Gitiles Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I31135439b60811dcfe24ae570c396cf25fbd46e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3761218 Reviewed-by: Firas Sammoura <fsammoura@google.com> Commit-Queue: Firas Sammoura <fsammoura@google.com>
* docs/ide-support.md: Add instructions for CrOS IDEAndrea Grandi2022-07-211-0/+43
| | | | | | | | | | | | | | | | | | | | Add instructions to manually configure platform/ec with the CrOS IDE extension for VSCode. BRANCH=none BUG=b:236389226 TEST=viewed in gitiles Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I924d65fdb06cfd8cb931727194987bf9480ae9a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3758783 Reviewed-by: Craig Hesling <hesling@chromium.org> Tested-by: Andrea Grandi <agrandi@google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com> Commit-Queue: Andrea Grandi <agrandi@google.com> Auto-Submit: Andrea Grandi <agrandi@google.com> Reviewed-by: Firas Sammoura <fsammoura@google.com>
* docs/ide-support.md: Rephrase explanation of RO/RWAndrea Grandi2022-07-211-4/+4
| | | | | | | | | | | | | | | Explanation of RO/RW is not clear to new team members. Rephrase as suggested in https://crrev.com/c/3758783 BRANCH=none BUG=none TEST=viewed in gitiles Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I6418e53542de746885ceab29591d0342ab2ab5d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780774 Reviewed-by: Firas Sammoura <fsammoura@google.com> Commit-Queue: Firas Sammoura <fsammoura@google.com>
* zephyr: thermistor: add /omit-if-no-ref/ to thermistor nodesFabio Baltieri2022-07-211-5/+4
| | | | | | | | | | | | | | | | | | DTS supports a /omit-if-no-ref/ feature to flag nodes that can be discarded if not referenced, and should be used in dts "libraries". This causes the corresponding node to be discarded from the aggregated zephyr.dts file, and reducing the amount of entries in devicetree-unfixed.h as well. BUG=none BRANCH=none TEST=cq dry run TEST=grep thermistor build/zephyr/brya/build-ro/zephyr/zephyr.dts Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ibd0f0f3e26a0e245723763c402e718b5e0badd17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3776918 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* cpp: update headers to better support C++Yuval Peress2022-07-212-6/+22
| | | | | | | | | | | | | | | | | - Add extern "C" to console.h - Add extern "C" to host_command.h - Update BUILD_HOST_COMMAND since C++ requires fields to be initialized in order BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I88e185346de653811b1ae9250631269b5e7e00d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3758785 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* joxer: configure i2c address of bma422Will Tsai2022-07-211-0/+1
| | | | | | | | | | | | | Configure the address from the default value(0x18) to the demand value(0x19). BRANCH=none BUG=b:239773587 TEST=zmake build joxer Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: Ifb40f595f02bd11e18af955b726e0799fba1faf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778910 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: remove obsolete TODOPeter Marheine2022-07-211-1/+0
| | | | | | | | | | | | | | | USB retimers are configured as needed now, so the TODO to configure them was obsolete. BUG=b:216085548 TEST=builds BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Iab3b73d7fbbe0c991fef8c60bd325b764f0aad29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778908 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* nirwen: Use LF clock for fanAndrew McRae2022-07-212-0/+2
| | | | | | | | | | | | | | Use low frequency clock for fan so that fan PWM works consistently regardless of power state. BUG=none TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ib5304276e9ed752d77e63f930034c2964dfcba6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778904 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nerwin: support battery ap19b8mDavid Huang2022-07-213-0/+58
| | | | | | | | | | | | | | Support battery ap19b8m for nerwin. BUG=b:239366024, b:239682988 TEST=zmake build nivviks; flash run, found battery ap19b8m. BRANCH=none Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I0ad722139140eb49b04c4d7842a2436b3de273fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778920 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* banshee: workaround for enter recovery modeJosh Tsai2022-07-211-1/+12
| | | | | | | | | | | | | | | | | Add the delay time before checking the boot key to avoid the ghost key to affect entering the recovery mode BRANCH=none BUG=b:238683420 TEST=manually triggering recovery on banshee id2 Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: I04ccba80ef9ff43754a700f63933d6f173f7b15e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759838 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Jeremy Lin <poseng@google.com>
* agah: update charger settingZick Wei2022-07-212-0/+4
| | | | | | | | | | | | | | Set charger ACProchot to 7.68A for default 150W adapter. BUG=b:238157096 BRANCH=none TEST=read back ACProchot setting through I2C is intended. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I080f09ea5cfdb2f08262e97cc56929d87f9b7344 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763027 Reviewed-by: caveh jalali <caveh@chromium.org>
* banshee: configure the correct location of the refresh keyJosh Tsai2022-07-214-4/+38
| | | | | | | | | | | | | | | | | We change the refresh key from T3 to T2, so need to configure the correct location of the refresh key on different board id. BRANCH=none BUG=b:231265647 TEST=manually triggering recovery on banshee id1 and id2 TEST=evtest check all key is correct Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: Ie01c572c824b6c42d3c515ed14365a3e7c083cdb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759823 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* nissa: only configure hdmi-en-odl if neededPeter Marheine2022-07-211-5/+26
| | | | | | | | | | | | | | | | Boards since nereid v2 don't connect the hdmi-en-odl GPIO to the sub-board, so in those configurations we can skip configuring or controlling the GPIO in order to save about 5 mW when the AP is on. BUG=b:233024993,b:237717730 TEST=When board version is set to 2 in CBI, the sb_4 GPIO does not ever change state on a nereid with HDMI sub-board. BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I231e304dc01c2ed02b3dd103e2173c464a7ce208 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3778918 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: Use low freq clock for keyboard backlightrelease-R105-14989.B-mainAndrew McRae2022-07-203-3/+6
| | | | | | | | | | | | | | | Use low frequency clock for keyboard backlight so that PWM clock does not get turned off when power management turns off the main clocks. BUG=b:230427574 TEST=zmake build nivviks; flash & run on Nirwen BRANCH=none Change-Id: I48bfe4cfaf2095b2b208a0ff6161cd868e6b31f4 Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775276 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* docs: zephyr: LEDsParth Malkan2022-07-202-1/+224
| | | | | | | | | | | | | | Add a Zephyr doc for setting up LEDs on a board. BRANCH=none BUG=b:222105941 TEST=Browse in Gerrit TEST=Reviewers Change-Id: If92586ed51593d51f7b786e076db0718fa3e31ff Signed-off-by: Parth Malkan <parthmalkan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3677553 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: test: drivers: Simplify build rulesYuval Peress2022-07-206-68/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace the complicated library mechanism with a more native cmake construct. The idea of having separate libraries works great in theory but it really wasn't working well. For this to properly work one of the following would need to happen: 1. The cros ec would need to be compiled as a library adding the include path with PUBLIC visibility. Test libraries can then link to the cros ec library. 2. The cros ec headers would be added directly to zephyr using zephyr_include_directories. The downside of this approach is that it adds the chromium headers at the same level as Zephyr's (which are visible at the system like <> include brackets). BRANCH=none BUG=none TEST=zmake test test-drivers* Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Iefbab4c4745f6ce4c0a8dc61018db9554c204434 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774764 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: Set fan count from fw_config fan flagMoises Garcia2022-07-203-0/+73
| | | | | | | | | | | | | | | | | | | | | | Currently, when there is no fan, EC reports fan stalled. Read FW_CONFIG fan absent/present flag an set fan_count accordingly. BRANCH=NONE BUG=b:234765697 TEST=Tried the 4 different combinations in SKUA2 BOARD_VERSION >=3 && FW_CONFIG[10]=1 -> Fan is on BOARD_VERSION >=3 && FW_CONFIG[10]=0 -> Fan is off BOARD_VERSION <3 && FW_CONFIG[10]=1 -> Fan is on BOARD_VERSION <3 && FW_CONFIG[10]=0 -> Fan is on Change-Id: If4681c9f97c2a4a4c6b200bd1acccd89111f7abf Signed-off-by: Moises Garcia <moisesgarcia@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3756743 Commit-Queue: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Jonathon Murphy <jpmurphy@google.com>
* test: math: support twister buildsYuval Peress2022-07-203-3/+8
| | | | | | | | | | | | | | Add support for twister builds via a symlink to the native_posix overlay and a testcase.yaml BRANCH=none BUG=none TEST=Run twister with -T zephyr/test/math Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I80467a6fa6005bdab655e93eaaf68c47a0b324d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774888 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* Zephyr: Add AP mux control testDiana Z2022-07-205-0/+118
| | | | | | | | | | | | | | | Add a unit test to exercise the new command to allow the AP to set muxes, and verify we notify the AP of their sets completing. BRANCH=None BUG=b:234839764 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I27ba90bfcb3a79479560a392e848ebc684459557 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3768919 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* Zephyr: Add utilities for mux set and event clearDiana Z2022-07-202-0/+49
| | | | | | | | | | | | | | Add utilities to allow tests to clear port events and set muxes using the TYPEC_CONTROL host command. BRANCH=None BUG=b:234839764 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I28af3cbff7b045f41b7af4b282cdae1f03811524 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774147 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* ec: Set default jobs to number of processorsJeremy Bettis2022-07-201-1/+1
| | | | | | | | | | | | | | | | | | In util/compare_build.sh, it runs make -j with no argument by default. Change that to use the current machine's number of processors instead. BRANCH=None BUG=b:239199935 TEST=./util/compare_build.sh -b all Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I700e7bc9b892ca4b928f0d162cfa6cd44f5f7c62 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773937 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* ec: Fix kconfig_check usage in makefileJeremy Bettis2022-07-203-4/+18
| | | | | | | | | | | | | | | | | | BRANCH=None BUG=b:239199935 TEST=make -j$(nproc) buildall && echo SUCCESS TEST=git commit --allow-empty ./util/compare_build.sh -b dartmonkey ./util/compare_build.sh -b all Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I845ca84920af1ca33457b79fe2a3892867ed693c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3767853 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Sub-divide TYPEC_CONTROL UtilityDiana Z2022-07-203-24/+36
| | | | | | | | | | | | | | | | Sub-divide out the TYPEC_CONTROL utility on a per-subcommand basis. This will ensure we can still type check arguments, while not creating a massive argument list for a one-size-fits-all utility. BRANCH=None BUG=b:234839764 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I85b39da986a88fe30c1928a3d17855858db81ec8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3768918 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* pujjo: Correct GPIO settings for HDMI hpd functionjimmy.wu2022-07-201-2/+2
| | | | | | | | | | | | | Correct GPIO settings for HDMI hpd function. BUG=b:239653512 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Change-Id: I30dc3901e866c30ccbea7a57b23bb769323eb7a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775277 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: bindings: drop cros-kb-raw-controller.yamlFabio Baltieri2022-07-205-12/+4
| | | | | | | | | | | | | This is empty now, no sense keeping it around. BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I585008317dab45e0df8755f2d1f4a406ffb5aaff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763912 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: cros_kb_raw: drop the label propertyFabio Baltieri2022-07-204-7/+0
| | | | | | | | | | | | | | Seems like this is unused. BRANCH=none BUG=b:239165779 TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I059f388fe3301f6d7f48fdbe9cfdb6cb1c5b7ec8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763911 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* kingler: rename en_pp5000_usb_a0_vbus_xEric Yilun Lin2022-07-202-2/+2
| | | | | | | | | | | | | | | | | The FAFT config corsola.json requires the name to be en_pp5000_usb_a0_vbus. BUG=b:214325092 TEST=pass firmware_ECUsbPorts BRANCH=none Change-Id: Id8a17f8d5b7183a529297f15df3a086c5050e434 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771681 Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com>
* chip/mt_scp: add define to support inner racing modeXiaoyong Lu2022-07-201-0/+1
| | | | | | | | | | | | | | | | Add define to support inner racing in scp: VDEC_CAP_INNER_RACING BIT(17). BUG=b:209531198 TEST=cts/gts test pass Signed-off-by: Xiaoyong Lu <xiaoyong.lu@mediatek.corp-partner.google.com> Change-Id: I292645a7d976c7a88fae831ae38cd47dad1c7aaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771682 Tested-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Commit-Queue: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
* zephyr: tests: Run test_ps8815_set_cc before tasksTomasz Michalec2022-07-201-1/+4
| | | | | | | | | | | | | | | | | The test_ps8815_set_cc except delay on the role control register change. During delay the PD task can run and change expected state. To prevent that whole test is run before tasks. BUG=b:239513456 TEST=zmake -D test test-drivers BRANCH=None Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ic51da7210543917737e316433a32e4837160c214 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773856 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: tests: Call PS8xxx init before each testTomasz Michalec2022-07-201-0/+2
| | | | | | | | | | | | | | | | | Product ID in PS8xxx driver is cached on init. To effectively change product ID, test has to call init function after setting product ID in emulator. BUG=b:239513456 TEST=zmake -D test test-drivers BRANCH=None Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I7f8f6663102146e23edc5672900291997ab08c09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773855 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Yuval Peress <peress@google.com>
* nissa: reduce max PD voltage on SM5803 to 15VPeter Marheine2022-07-202-0/+2
| | | | | | | | | | | | | | | | | | | Silicon Mitus have stated that VBUS transients at nominal 20V can damage the SM5803 and recommended that the maximum VBUS voltage be limited to 15V to prevent damage. BUG=b:230712704 TEST=Nereid negotiates 15V even when connected to a 60W charger that supports 20V supply. BRANCH=none Change-Id: I8bcfc6fcd9b33d1c1d56b858b28bf61a6ccf998b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3774857 Commit-Queue: Andrew McRae <amcrae@google.com> Commit-Queue: Peter Marheine <pmarheine@chromium.org> Tested-by: Peter Marheine <pmarheine@chromium.org> Auto-Submit: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com>