summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* nissa: Allow setting OCPC per-projectAndrew McRae2022-07-207-1/+6
| | | | | | | | | | | | | | Some boards may not have multiple type-C ports, so allow setting OCPC on a per-project basis. BUG=b:239506664 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Iedb212b1540502c7d0c05d30fbe15a97415fc3bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775784 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* run_device_tests.py: Refactor main() into smaller functionsAndrea Grandi2022-07-201-95/+103
| | | | | | | | | | | | | | | | | | | | | | | Pylint reports several errors in the main() function, which has grown over time to include many lines: R0914: Too many local variables (21/15) (too-many-locals) R0912: Too many branches (18/12) (too-many-branches) R0915: Too many statements (84/50) (too-many-statements) Break down the function into smaller ones that are within the guidelines recommended by the linter. BUG=b:239100048 TEST=cros lint test/run_device_tests.py TEST=./test/run_device_tests.py --flasher=jtrace --remote=localhost \ --jlink_port=19020 --board dartmonkey => PASS BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I77d4ddd20b102894428ef6999f4f2ead53ce6d44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766499 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* run_device_tests.py: Update disabled linter optionsAndrea Grandi2022-07-201-4/+2
| | | | | | | | | | | | | | | | | | The latest version of Pylint introduced new checkers that are flagging errors in lines of code where Pylint errors had already been disabled. Update pylint disable directives to suppress import errors. Explicitly set check=False (default value) so subprocess-run-check is no longer required. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I6d2dd2f1660cb34f2bff0a1ed073825b80f5da6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766498 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* run_device_tests.py: Disable pylint error broad-exceptAndrea Grandi2022-07-201-2/+2
| | | | | | | | | | | | | | | | | | Pylint reports an error when generic exception are used: W0703: Catching too general exception Exception (broad-except) This is intentional since we want to ensure all failures in these operations are ignored to avoid disruptions. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: Id413d4f46626afa805c734b9abcad931852a471e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766497 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* run_device_tests.py: Add missing docstringsAndrea Grandi2022-07-201-1/+6
| | | | | | | | | | | | | | | | Pylint reports several missing docstring errors: C0116: Missing function or method docstring (missing-function-docstring) Add documentation where required. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I006cd21faf3e149b8fb76a49e644afd16db316e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766496 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* run_device_tests.py: Simplify code using dataclassAndrea Grandi2022-07-201-58/+36
| | | | | | | | | | | | | | | | | | | | | Pylint reports the following error in the declarations of BoardConfig and TestConfig: R0903: Too few public methods (0/2) (too-few-public-methods) Simplify their declarations using dataclass. Also suppress R0902: too-many-instance-attributes for TestConfig. BUG=b:239100048 TEST=cros lint test/run_device_tests.py TEST=./test/run_device_tests.py --flasher=jtrace --remote=localhost \ --jlink_port=19020 --board dartmonkey => PASS BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: Iba406667546e172e55e30c0044e06419c1d5595c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766495 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* moli: modify LED behaviorElsie Shih2022-07-202-16/+38
| | | | | | | | | | | | | | | | - Follow Moli GPIO Table_20220531.xlsx to modify the GPIO. - Add GPIO_LED_BLUE_CONTROL / GPIO_LED_ORANGE_CONTROL to control LED on/off. - Modify LED behavior and add duty cycle for pulsing. BUG=b:238010311 BRANCH=none TEST=make BOARD=moli Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com> Change-Id: Ic838483c43e201c1ee1d8e619759be027cc99133 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3715186 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* pujjo: Correct hotkey function definejimmy.wu2022-07-201-3/+3
| | | | | | | | | | | | | Correct hotkey function define. BUG=b:239511837 TEST=zmake build pujjo BRANCH=none Signed-off-by: jimmy.wu <jimmy.wu@lcfc.corp-partner.google.com> Change-Id: I727a86145ceec1a2d74e8aa520f4b280d0ad3b24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771324 Reviewed-by: Andrew McRae <amcrae@google.com>
* Joxer: add batteries supportScott Chao2022-07-207-2/+289
| | | | | | | | | | | BRANCH=none BUG=b:239502723 TEST=zmake build joxer Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I13243a7ee7112064d6a416303e0dacd9ca09303f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3769710 Reviewed-by: Andrew McRae <amcrae@google.com>
* Joxer: reduce battery I2C frequency to 50 kHzScott Chao2022-07-201-1/+1
| | | | | | | | | | | | | Follow CL:3721954 to reduce battery I2C frquency. BUG=b:239502723 BRANCH=none TEST=make sure EC can read battery info and battery can be charged. Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ic1dcf4961cd623bcb91907bf01d3728f979ce7e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3775783 Reviewed-by: Andrew McRae <amcrae@google.com>
* nissa: Rearrange projects into sub-directoriesAndrew McRae2022-07-2068-69/+63
| | | | | | | | | | | | | | Rearrange the projects into separate sub-directories to improve clarity and separation. BUG=none TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I14c3324760d195807f831bd72bdbc129fe76912b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771363 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* osiris: Update thermal policyYu-An Chen2022-07-203-10/+158
| | | | | | | | | | | | | | | | This CL updated fan control policy to step control. Each fan has its own control table, and the number of steps can be different between two fans. BUG=b:234545460 BRANCH=none TEST=Thermal team verified thermal policy is expected. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I2572868974947beade5e6f83610130d9110814ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3760804 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zmake: Pass USER_CACHE_DIR to cmakeAbe Levkoy2022-07-191-0/+3
| | | | | | | | | | | | | | | | When invoking cmake, set USER_CACHE_DIR to build/zephyr/user-cache. Thereby prevent the Zephyr cmake logic from choosing its own location based on the environment and ensure that deleting build/ deletes the cache. BUG=b:239619222 TEST=zmake -D configure test-drivers; observe cache dir output BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I6baccd61d18c17c843336c5dc0435645b44c0ef4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773321 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* evoker: Initial EC imageYu-An Chen2022-07-199-0/+724
| | | | | | | | | | | | | | | | Create the initial Zephyr EC image for the evoker variant by copying the herobrine reference board EC files. More changes will be added later. BUG=b:238571507 TEST=zmake build evoker BRANCH=none Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: Id469d14e3859a2f3c3ba70bd9b5c32b15ea70fd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763023 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* zephyr: Delete ghost projectJack Rosenthal2022-07-192-10/+0
| | | | | | | | | | | | | | | | | Ghost is forced to use legacy EC, and this build is out of date with the configs for the legacy EC build. Delete this as to not cause any confusion. BUG=b:232148718 BRANCH=none TEST=zmake configure -a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5d273fc6767d438fd44b8c8dfcfee29b24f69004 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773636 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* cq: Exclude build dir from coverageJeremy Bettis2022-07-191-1/+17
| | | | | | | | | | | | | | | | | | | The build dir contains a number of generated files, that creates some inconsistent results in the coverage reports. Because of this, and also because those files are generated and don't matter, exclude them from the coverage report. BRANCH=None BUG=b:213374060 TEST=Ran commands in README.md Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ie1da42c3cc14faa917d2f0deca6c7acc9a9b7751 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773934 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* util: Delete kconfiglib.pyJeremy Bettis2022-07-191-7462/+0
| | | | | | | | | | | | | | | | | | The missing code has been applied to the ebuild, so this copy is no longer needed. BRANCH=None BUG=b:238773780 FIXED=b:238773780 TEST=util/run_tests.sh Cq-Depend: chromium:3763390 Change-Id: I4f774c5ca4f2ae67eac07be06f06fee93fe1dbb3 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3760659 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Remove DT_GPIO_LABEL_BY_IDX usageAaron Massey2022-07-191-2/+2
| | | | | | | | | | | | | | | | | | | | | Zephyr upstream deprecated the DT_GPIO_LABEL_BY_IDX macro used by downstream UNUSED_GPIO_CONFIG_BY_IDX macro causing a CQ build failure and blocking Zephyr downstreaming. Replace use of DT_GPIO_LABEL_BY_IDX with DT_GPIO_CTLR_BY_IDX. Note: This change also includes a switch from using DT_LABEL to DEVICE_DT_NAME which is less likely to be deprecated and evaluates to the same result if a LABEL property is present. BRANCH=none BUG=b:239447869 TEST=zmake test build -a # With breaking commit in downstreamed Zephyr Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I8af3f21dbf5b8ab05cd1c1d9cfc483fa3c25b850 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773935 Reviewed-by: Tristan Honscheid <honscheid@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>