summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zmake: Resolve coreboot_sdk_root pathAaron Massey2023-05-121-1/+2
| | | | | | | | | | | | | | | | | The COREBOOT_SDK_ROOT environment variable is not resolved. Resolve the COREBOOT_SDK_ROOT environment variable to an absolute path. BUG=b:268050548 TEST=CQ TEST=fwsdk: bazel build //platform/rules_cros_firmware/cros_firmware:herobrine_ec Change-Id: Ib5e053531dfce1a13e2840d8968ae559d425cf89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4529215 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* common: move chip agnostic trng code from stm32 to commonDavid Cross2023-05-125-71/+97
| | | | | | | | | | | | | | | | | | | | | Making this change causes common trng functions to move memory locations. This change only affects fingerprint (FPMCU) boards BUG=b:280889889 TEST=make BOARD=bloonchipper, CONFIG_CMD_RAND enabled in board.h ALLOW_CONFIG=1 ./util/compare_build.sh -b all => All boards match, except the following Fingerprint boards: bloonchipper dartmonkey hatch_fp nami_fp nocturne_fp nucleo-dartmonkey Change-Id: I4dbb5e255be0f61eb7b446af4565bea487c08e52 Signed-off-by: David Cross <davidmcross@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507892 Reviewed-by: Bobby Casey <bobbycasey@google.com>
* kingler: add usbc testEric Yilun Lin2023-05-1212-78/+358
| | | | | | | | | | | | | | This CL adds the initial USB-C tests on kingler BUG=b:272664811 TEST=twister -ci zephyr/test Change-Id: I14395ce84442f40e6fd05f7c14a2814fb24ebb9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4483240 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* rt1718s: integrate board src enable functionsEric Yilun Lin2023-05-125-42/+41
| | | | | | | | | | | | | | | | | Integrate the source enable functions into the driver. Also, reorder the TCPCI call and the board hook call to ensure the board hook is called later in case that the GPIO config auto-reload clobbers the GPIO values. BUG=b:276661970 TEST=test voltorb C1 source/sink Change-Id: Ifff3ae116c088f13ee5e7eec3418810a35ead884 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4522688 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* Uldren: modify rotate matrixmick_hsiao2023-05-121-4/+4
| | | | | | | | | | | | | | | modift rotate matrix to let motionsensor works corretly BUG=b:281487225 TEST=watch -n 1 ectool motionsense, all data are correctly as expected Change-Id: I13032d7c9eb46695eb281be9cc3f0125dcde85a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4515843 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Mick Hsiao <mick_hsiao@compal.corp-partner.google.com> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>
* joxer: Allow alternate rotation parameters for JoxerScott Chao2023-05-124-0/+67
| | | | | | | | | | | | | | This will allow joxer to load different rotation matrix according to cbi. BUG=b:282054731 TEST=make sure joxer rotate correctly Change-Id: I03aa376f05f8f68cbabacf897915cb54d6b80ab7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4486659 Commit-Queue: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
* starmie: implement base detectionwangganxiang2023-05-124-5/+168
| | | | | | | | | | | | | | Change the judgment mode to interrupt. BUG=b:281643319 TEST=`ectool mkbpget switches` Change-Id: I974cd46ed187fefc3989a0072bc93fe556fd425b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516960 Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Tested-by: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com> Commit-Queue: Ganxiang Wang <wangganxiang@huaqin.corp-partner.google.com>
* winterhold: Enable CHARGER_MAINTAIN_VBAT Configjohnwc_yeh2023-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | Prevents charger from requesting minimum voltage when AC is off and battery is not present. LOW_COVERAGE_REASON=no unit tests for skyrim yet, b/247151116 BUG=b:269679145 TEST=test on winterhold, AC only after cold reboot the last time of the charger 0x15(Max System Voltage) not fill in 0x15=0800(2.048V) Change-Id: I716f43adab716823c68f3a1f8a7accfa1ead05db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506107 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: JohnWC Yeh <johnwc_yeh@compal.corp-partner.google.com>
* chgstv2: Change battery near full depends on display SOCwen zhang2023-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The battery_near_full is used to set PWR_STATE_DISCHARGE_FULL and PWR_STATE_CHARGE_NEAR_FULL and these two states are used to set LED behaviors. We should change battery_near_full to depend on display SOC because LED bahaviors are already depends on display SOC. There is an exception, isl9241.c also checks charge_get_state() == PWR_STATE_CHARGE_NEAR_FULL in function isl9241_restart_charge_voltage_when_full. With this change, this feature will depend on the battery display SOC rather than RSOC. The display SOC is bigger than RSOC ~3% when the battery is BATTERY_LEVEL_NEAR_FULL(default 97%) so this feature may be 3% ahead of schedule. The 3% difference should have no harm for this feature. BUG=b:278512388 TEST=1.verify LED behavior on voltorb 2.no "E: Node with matching prop not found" on voltorb Change-Id: I87f555571e22cbcdd0e8e0a201f76e3de8204ebe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4478776 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Commit-Queue: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Tested-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
* battery: Deprecate CONFIG_BATTERY_LEVEL_NEAR_FULLwen zhang2023-05-1127-52/+49
| | | | | | | | | | | | | | | | | | Atlas, coral, corori, eve, morphius, primus, and rammus are setting CONFIG_BATTERY_LEVEL_NEAR_FULL to custom values. This causes their LEDs show 'full' while the display battery percentages are still < 100%. We'll make these boards define CONFIG_BATT_HOST_FULL_FACTOR, instead. And fix LED dts for some zephyr projects. BUG=b:280818345 TEST=build pass Change-Id: I98f97798ea99cc812671d5b31d64e92d55a1e05a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4523043 Commit-Queue: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Tested-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Hades: Fast forward DSW_PWROK to PCH_PWROKDaisuke Nojiri2023-05-112-1/+2
| | | | | | | | | | | | | | | | On urgent shutdown, it's required for PCH_PWROK to drop while PCH's voltages are still above 95%. This CL adds a dedicated interrupt handler for DSW_PWROK to reduce the latency. BUG=b:279918234 TEST=On Agah. The latency improved from 1.5 ms to 127 us. Change-Id: I5d0b1ab880f8d7ec6af89e3d9b230541c75d57ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520131 Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
* Agah: Fast forward DSW_PWROK to PCH_PWROKDaisuke Nojiri2023-05-112-1/+2
| | | | | | | | | | | | | | | | On urgent shutdown, it's required for PCH_PWROK to drop while PCH's voltages are still above 95%. This CL adds a dedicated interrupt handler for DSW_PWROK to reduce the latency. BUG=b:279918234 TEST=On Agah. The latency improved from 1.5 ms to 127 us. Change-Id: I004d11789bc94eb91f1f0df440bc5532bcb67a4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518229 Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tarun Tuli <taruntuli@google.com>
* panic_output: Do not use ccprintf to induce stack overflowRob Barnes2023-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The console command to induce a stack overflow crash uses ccprintf, which acquires a mutex lock internally. The exception handler aborts the thread (shell_uart) when the stack overflow is detected, but the mutex is not released. This causes system safe mode to deadlock. Switch to panic_printf to avoid this deadlock. A more robust long term fix may be to change Zephyr internals to release mutexes on aborted threads. LOW_COVERAGE_REASON=Swapping single function call BUG=b:278792557 TEST=Able to start system safe mode after a stack overflow on skyrim Change-Id: Ib7b50487d27e77fdd5b6cec5176060074868dca3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4504115 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com> Tested-by: Rob Barnes <robbarnes@google.com>
* flash_ec: Fix shellcheck warning SC2009Bobby Casey2023-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The error was: Hook script "cros lint ${PRESUBMIT_FILES}" failed with code 1: In util/flash_ec line 854: if ps -o cmd= "${pid}" | grep -qE "(servod|/sbin/init)"; then ^ SC2009 (info): Consider using pgrep instead of grepping ps output. Unfortunately, per this thread crrev.com/c/3864978/4/util/flash_ec#857 it seems like the ps / grep solution is our best bet so shellcheck exclusion was added. BRANCH=none BUG=b:242127759 TEST=util/flash_ec --board=dartmonkey --image build/dartmonkey/ec.bin Change-Id: I271384dae6d0edd9a84546883b799a5a8fe64207 Signed-off-by: Bobby Casey <bobbycasey@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3864978 Reviewed-by: Josie Nordrum <josienordrum@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Uldren: update fw configmick_hsiao2023-05-113-63/+25
| | | | | | | | | | | | | | | Update cbi config to let DB works, Also remove fan code, because uldren doesn't have fan design BUG=b:273159459 TEST=DB can charge and read usb Change-Id: I9da2c3fd7eedc44cfcaad89d32c393cc528feff2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4522690 Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Mick Hsiao <mick_hsiao@compal.corp-partner.google.com> Reviewed-by: Shou-Chieh Hsu <shouchieh@chromium.org>
* octopus: Enable system safe mode panic recoveryRob Barnes2023-05-111-0/+3
| | | | | | | | | | | | | | System safe mode allows the EC to recover from some types of panics which allows the OS to collect more data about the panic. BUG=b:268342532 TEST=Pass safe mode tast test on bloog Change-Id: Iecbe84b9229fdae8c069de12c56361580cd9cb04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4479495 Tested-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* zephyr/test: Increase timeoutJeremy Bettis2023-05-111-0/+1
| | | | | | | | | | | | | | | | | This test is timing out on gitlab, increase timeout to 6m. https://gitlab.com/zephyr-ec/ec/-/jobs/4264180403 BUG=None TEST=None Change-Id: I5a18e20091825f649d29b29950644f1121b90ed6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4523022 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Al Semjonovs <asemjonovs@google.com>
* myst: add bringup configsBoris Mittelberg2023-05-111-0/+5
| | | | | | | | | | | | | | | Add configs for BRINGUP and SYSTEM_UNLOCKED BUG=b:281691329 TEST=zmake build myst Change-Id: Ib84c1bb98b614cda05848291feb362e6f62fffb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4521338 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Robert Zieba <robertzieba@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* charger: Move charger_state_v2.h into charge_state.hSimon Glass2023-05-11128-356/+337
| | | | | | | | | | | | | | | | | | | | We don't have a v1 anymore, so the name makes no sense. Move it into the existing file. Include charge_state.h instead of v2, doing this in the same change to avoid build errors. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: Ic3e3adc45e4d002c2cd5ba8aa65e24686e01d628 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516191 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: test: Avoid using charger_state as a variableSimon Glass2023-05-113-21/+21
| | | | | | | | | | | | | | | | We have enum charge_state_v2 and used to have enum charge_state. Try to avoid using charger_state in the source except as an enum. This makes no functional change. BUG=b:218332694 TEST=CQ Change-Id: I3e53843799b7a6258cf636c11df47389b8d98123 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516190 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* host_command_pd: Avoid using charger_state as a variableSimon Glass2023-05-111-3/+3
| | | | | | | | | | | | | | | We have enum charge_state_v2 and used to have enum charge_state. Try to avoid using charger_state in the source except as an enum. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: I68e4eb3112a32be00819f74c51ea744d148a88d5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516189 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* charger: Rename charge_get_state() to led_pwr_get_state()Simon Glass2023-05-1175-101/+101
| | | | | | | | | | | | | | | | | | We have a new 'charge state' in struct charge_state_data as part of the charge_state_v2.h file. This is confusing. Rename this function to match the enum it is referencing. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: I7f08dd4fb11e2939e0ef779018c1e3206ebc8d20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516188 Commit-Queue: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* charger: Rename enum charge_state to led_pwr_stateSimon Glass2023-05-1114-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | This name is confusing, since its members start with PWR_ and the comment for enum charge_state_v2 says that these values are only used to control the LEDs, with one not-quite-correct exception, whatever that might be. We could rename it to power_state, but that is already fairly widely used as a variable in the code base. Also it seems better to match the enum PWR_ prefix. Future work may rename the members too. Rename the charge_state enum. This makes no functional change. BUG=b:218332694 TEST=make buildall Change-Id: If8a7cc73dcfb4c1e89984e57fc55e432416e8aec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516187 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* boxy: remove barreljack related codearthur.lin2023-05-113-65/+4
| | | | | | | | | | | | | | | Remove barreljack related code. Default use type-c port0 as power source for bring up. BUG=none TEST=make -j BOARD=boxy TEST=flash boxy ec on dibbi, and it can power on by type-c AC only Change-Id: I92ca1a1fdd8dd2c5eeeba02f217771ddbbe792e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4505786 Commit-Queue: Arthur Lin <arthur.lin@lcfc.corp-partner.google.com> Tested-by: Arthur Lin <arthur.lin@lcfc.corp-partner.google.com> Reviewed-by: Derek Huang <derekhuang@google.com>
* boxy: Enable VBUS ADCjimmy.wu2023-05-113-14/+14
| | | | | | | | | | | | | | Enable VBUS ADC following dibbi. BUG=b:271941405 TEST=make -j BOARD=boxy Change-Id: I60c3d09ab3af37ce6c8f6a623ddea04311530628 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4508971 Tested-by: Jimmy Wu <jimmy.wu@lcfc.corp-partner.google.com> Reviewed-by: Derek Huang <derekhuang@google.com> Tested-by: Arthur Lin <arthur.lin@lcfc.corp-partner.google.com> Commit-Queue: Jimmy Wu <jimmy.wu@lcfc.corp-partner.google.com>
* corsola: do not reset TCPC if no battery connectedEric Yilun Lin2023-05-111-3/+12
| | | | | | | | | | | | | | | | The RT1718S controls the EN_SNK pin to the PPC. When the TCPC is reset without battery connected, this might cause the brown-out of the system due to the PPC stops sinking. BUG=b:276661970 TEST=reset EC without battery, and it first boots due to the soft-reset, and brown-out and then second boots with power-on flag. Change-Id: I79453e3625c8510818a78552c674b8887505dcb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506109 Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* rt1718s: do not software reset TCPC with batteryEric Yilun Lin2023-05-111-0/+6
| | | | | | | | | | | | | | | | | | The RT1718S controls the EN_SNK pin to the PPC. When the TCPC is reset without battery connected, this might cause the brown-out of the system due to the PPC stops sinking. BUG=b:276661970 TEST=reset EC without battery, and it first boots due to the soft-reset, and brown-out and then second boots with power-on flag. BRANCH=none Change-Id: Icc9696a5085ab502a451a9740271e16e06bd53b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4506108 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com> Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
* voltorb: enable MFG FUNCTION to read battery cell voltageSiyu Qin2023-05-111-0/+1
| | | | | | | | | | | | | | | Enable macro CONFIG_PLATFORM_EC_SMART_BATTERY_OPTIONAL_MFG_FUNC, so that ectool can read battery cell voltage. BUG=b:281805616 TEST=use "ectool i2cxfer 1 0xb 2 0x3d" can read cell voltage Change-Id: Id446d44ef4b4ad98a7a55837e9c7428c763adf9b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520742 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Tested-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com>
* yavilla: Limit C1 current with low power chargerTommy Chung2023-05-112-0/+22
| | | | | | | | | | | | | | | | This follows CL:4379827 to solve C1 OCPC voltage drop with low power charger (5V). BUG=none TEST=make sure that yavilla c2c charging will not brownout on C1 port. Change-Id: I603bec0c8bcc3da7e934b8d88d791e2245ef7793 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520738 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: Devin Lu <devin.lu@quantatw.com> Commit-Queue: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
* zephyr: test: Test keyboard_8042.c console commandsTristan Honscheid2023-05-117-2/+267
| | | | | | | | | | | | | | | | Add tests for the `8042` set of console commands in `keyboard_8042.c`, covers about 100 new lines. BUG=b:281691908 TEST=./twister -s drivers/drivers.keyboard_8042 Change-Id: I1e28e0258305d0e1d17571346fcdca8f19102cb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520583 Commit-Queue: Peter Marheine <pmarheine@chromium.org> Tested-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com> Auto-Submit: Tristan Honscheid <honscheid@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* safe_mode: Remove schedule_system_safe_mode_timeoutRob Barnes2023-05-113-23/+2
| | | | | | | | | | | | | | | Zephyr and CrOS EC can use the same method for scheduling the safe mode timeout, so there's no need to have an overridden task. BUG=None TEST=Safe mode starts and timesout on skyrim Change-Id: I57b296223ec86cf47110a00f3f021e8a8a30ead3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4519103 Tested-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Rob Barnes <robbarnes@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com>
* safe_mode: Shorten stringsRob Barnes2023-05-112-10/+11
| | | | | | | | | | | | | | | | Many old boards are out of flash space, which makes porting safe mode to older boards difficult. To make this process smoother shorten strings so less flash space is needed. BUG=None TEST=Safe mode runs Change-Id: I0934f1a477b01e7c8f71241844ac0eefa093c5ea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4519102 Commit-Queue: Rob Barnes <robbarnes@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Rob Barnes <robbarnes@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com>
* power/x86: Add dedicated interrupt handler for pwrokDaisuke Nojiri2023-05-112-0/+32
| | | | | | | | | | | | | | | | On urgent shutdown, it's required for PCH_PWROK to drop while PCH's voltages are still above 95%. This CL adds a dedicated interrupt handler for DSW_PWROK to reduce the latency. BUG=b:279918234 TEST=Build Agah. Change-Id: I933913fc86c0636b3fed362ddc14712903531e84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4519341 Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* charger: Drop charge_state_v1.hSimon Glass2023-05-101-69/+0
| | | | | | | | | | | | | | This does not appear to be used anymore. Drop it to avoid confusion. This makes no functional change. BUG=b:218332694 TEST=CQ Change-Id: I56e76372a86f27397576a64153b0aa0ad993341a Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516186 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* util: preupload: make filename argument optionalFabio Baltieri2023-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | The filename argument is meant to take ${PRESUBMIT_FILES} from the presubmit config, but the file list can be empty if the commit only contains deleted files. Change the argument nargs value from "+" to "*" to allow running the scripts with no arguments, they become a noop in this case instead of failing with: check_cprints.py: error: the following arguments are required: filename BUG=none TEST=repo upload on a patch with only deleted files Change-Id: Id77c745651fd30d4a005f2b0decada9a72c50592 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518770 Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gitlab: Use checkout_at_date for depot_toolsJeremy Bettis2023-05-101-2/+2
| | | | | | | | | | | | | | | | The git clone for depot_tools keeps getting 500 errors. Switch from git clone to checkout_at_date, both to keep depot_tools sync'd with the ec revision, and also because checkout_at_date already handles retries. BUG=None TEST=None Change-Id: I662ecfddca18c23ff32a4e3e571009bc574d4708 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4521521 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* board/hyperdebug: Gpio monitoring verifies that list is sameJes B. Klinke2023-05-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | The HyperDebug board can watch for edges on a set of pins, like a logic analyzer. It will buffer such events, for later retrieval by OpenTitanTool. The current logic depends on the list of signals at the time of retrieval is exactly identical to the list given at start of monitoring. This was almost verified, in that there were checks for pins being left our, or new pins being added to the list, but no check for the order of the given names. This CL adds a check that the order is the same. BUG=b:281857275 TEST=tast run - gscdevboard.Ti50EcReset TEST=Manual invocations of opentitantool to trigger error Change-Id: Ifcd9b96a319aff94b073ca758224045a5b1d67d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4518234 Reviewed-by: Jett Rink <jettrink@chromium.org> Tested-by: Jes Klinke <jbk@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org>
* zephyr: drop empty dt-bindings cros_kb_raw header filesFabio Baltieri2023-05-103-25/+0
| | | | | | | | | | | | | These have never been used anywhere, no point keeping them. BUG=b:274443029 TEST=zmake compare-builds -a Change-Id: I4efd83b955fec04c0decf4564b9b3574b0d270eb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4403977 Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
* markarth: Modify LED behavior to meet SPEC.Logan_Liao2023-05-101-3/+3
| | | | | | | | | | | | | | | | Base on SPEC, modify LED behavior when suspend without charge. Suspend(discharge) : Amber on 1 second, off 3 second. BUG=b:281566886 b:281566507 TEST=test LED behavior meet SPEC. Change-Id: I7ea9612dce41ac0e51bc68481750f5278727ab3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4520276 Reviewed-by: Chao Gui <chaogui@google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Commit-Queue: Chao Gui <chaogui@google.com>
* octopus: Undef CONFIG_CMD_MMAPINFORob Barnes2023-05-101-0/+1
| | | | | | | | | | | | | | Undef CONFIG_CMD_MMAPINFO on octopus boards that are running out of flash. BUG=b:268342532 TEST=Build Change-Id: I60765716ac19c6b087322d443d02b659e31a7472 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4507753 Commit-Queue: Rob Barnes <robbarnes@google.com> Tested-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* octopus: Undef CONFIG_CMD_MDRob Barnes2023-05-101-0/+1
| | | | | | | | | | | | | | Undef CONFIG_CMD_MD on octopus boards that are running out of flash. BUG=b:268342532 TEST=Build Change-Id: I457b640a1cf837001898aec11ff7896a8cea9b75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4504946 Tested-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* octopus: Undef CONFIG_CMD_MFALLOWRob Barnes2023-05-101-0/+1
| | | | | | | | | | | | | | | | Undef CONFIG_CMD_MFALLOW on octopus boards that are running out of flash. BUG=b:268342532 TEST=Build Change-Id: I9dbbd578e8c89e9ee4460b90d6bd48a677b1de8e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4504940 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com> Tested-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* octopus: Undef CONFIG_CMD_ACCELSPOOFRob Barnes2023-05-101-0/+3
| | | | | | | | | | | | | | | Undef CONFIG_CMD_ACCELSPOOF on octopus boards that are running out of flash. BUG=b:268342532 TEST=Build Change-Id: I6a3c16718b500d0f53d83e11e454c9b7129fef8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4500241 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Rob Barnes <robbarnes@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com> Tested-by: Rob Barnes <robbarnes@google.com>
* crystaldrift: modify battery configurationfirmware-fpmcu-helipilot-releaseTang Qijun2023-05-101-5/+5
| | | | | | | | | | | | | | Under Battery mode Press power and refresh key, system reboot failure for battery_get_disconnect_state is BATTERY_DISCONNECTED BUG=b:274211459 TEST=Under Battery mode Press power and refresh key, reboot succeed Change-Id: I9020a15d20ceb22bffa2b9189ffc7d6b96759ae2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4515502 Commit-Queue: Chao Gui <chaogui@google.com> Tested-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Reviewed-by: Chao Gui <chaogui@google.com>
* omnigul: Add condition use Accel and Gyro by FWCONFIG.Logan_Liao2023-05-103-4/+22
| | | | | | | | | | | | | | | | | | | This patch add FW config to deceide enable Accel and Gyro or not. BUG=b:280001153 TEST=ectool motionsense show sensor 0: 0 0 0 sensor 1: 0 0 0 sensor 2: 0 0 0 Change-Id: Id040713b20e415f52f2feb1f9320a3affa94711b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4487062 Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Kyle Lin <kylelinck@google.com> Code-Coverage: Kyle Lin <kylelinck@google.com> Reviewed-by: Kyle Lin <kylelinck@google.com> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
* myst: move all CBI fields to board-level filesBoris Mittelberg2023-05-103-36/+23
| | | | | | | | | | | | | moving the PPC interrupt handler to be under program/myst/myst BUG=b:281645793 BRANCH=none TEST=zmake build myst Change-Id: Ia4a5daab6d280f2f8116486378925b4432a58731 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516860 Reviewed-by: Diana Z <dzigterman@chromium.org>
* myst: add daughter board configsBoris Mittelberg2023-05-1010-49/+155
| | | | | | | | | | | | | | | | | Adding devicetree for SKU A and SKU B BUG=b:275610001 BRANCH=none TEST=zmake build myst LOW_COVERAGE_REASON=this is still part of the initial image Change-Id: I5997ca139b26664e6215782c61b9bbe57262ac74 Signed-off-by: Boris Mittelberg <bmbm@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4492007 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Robert Zieba <robertzieba@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* yaviks: Limit C1 current with low power chargerDevin Lu2023-05-102-0/+22
| | | | | | | | | | | | | | | | | | | Yaviks C1 port is OCPC (One Charger IC Per Type-C) architecture, The charging current is controlled by increasing Vsys. However, the charger SM5803 is not limit current while Vsys increasing, we can see the voltage drops to ~3.48V to cause C1 port brownout with low power charger (5V). To avoid C1 port brownout at low power charger connected. Limit charge current to 2A. BUG=b:261102000 TEST=Left battery ~50% with sink device. Toggle 10 times power role swap. Yaviks c2c charging is not brownout on C1 port. Change-Id: I361eda581d3611e176c75804131b3a17343d85c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4379827 Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Devin Lu <devin.lu@quantatw.com>
* markarth: Modify VBUS monitor from TCPC.Logan_Liao2023-05-101-0/+4
| | | | | | | | | | | | | | | | | | Due to ISL9241 have 200~300mv tolerance, cause 5V test item fail(read 4.4V, measure 4.6V). This patch modify to TCPC monitor Vbus. BUG=b:278988137 BRANCH=skyrim TEST=test monitor VBUS from TCPC success. Change-Id: I53d1fe92595ff65b5a00434c0dc20e638d0ae85c Signed-off-by: Logan_Liao <Logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4486661 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Tested-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Commit-Queue: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com>
* taranza: Implement LED behaviorYu-An Chen2023-05-104-98/+46
| | | | | | | | | | | | | | | | | | | Power led behavior: S0 - white S3 - off S5 - off BUG=b:278167979 TEST=make BOARD=taranza Change-Id: Idf3e81e162dfb043ded54b003a72948f44929a93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4516817 Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Auto-Submit: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Commit-Queue: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>