summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab: Only run CI in main and coverage branchesstabilize-quickfix-14909.132.B-mainJeremy Bettis2022-09-281-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/+/3922455 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
* prism: rgbkbd: Add rgb keyboard type fieldstabilize-14909.100.B-mainrelease-R104-14909.B-mainParth Malkan2022-07-251-2/+5
| | | | | | | | | | | | | | | | | | rgbkbd_type describes number of zones and LEDs supported. BRANCH=none BUG=b:232134905 TEST=make -j buildall Cq-Depend: chromium:3784556 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Idf4b9081e6510dcdbd4301d9d855aba2fe7e7499 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3732805 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit fa3766d2e4a13c228caf88c122eb6dfc30bd1818) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3784557 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org>
* rgbkbd: Add get_config subcommand to rgbkbd host commandParth Malkan2022-07-254-0/+34
| | | | | | | | | | | | | | | | | | | | Add a response struct to rgbkbd host command and add GET_CONFIG as a subcommand. This is used to return RGB keyboard type (number of zones and LEDs) to the host. BRANCH=none BUG=b:232134905 TEST=Test on Taniks and Vell using ectool rgbkbd getconfig command Cq-Depend: chromium:3784557, chromium:3784558 Cq-Depend: chromium:3784560 Change-Id: Ie5b18ed3be141f2a91326ff2a121649296ea1161 Signed-off-by: Parth Malkan <parthmalkan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3732802 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> (cherry picked from commit 0fedae4fe40f63ceca8467a8b3603a32d2cae7ef) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3784556 Reviewed-by: YH Lin <yueherngl@chromium.org>
* taniks: rgbkbd: Add rgb keyboard type fieldParth Malkan2022-07-251-2/+5
| | | | | | | | | | | | | | | | | | rgbkbd_type describes number of zones and LEDs supported. BRANCH=none BUG=b:232134905 TEST=make -j buildall Cq-Depend: chromium:3784556 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I3fa2ebede9aa077661199072480d28a65e5d1206 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3733669 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit 7c733a4c9ebef218365c2c084259f94dea7aaedc) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3784558 Reviewed-by: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org>
* osiris: rgbkbd: Add rgb keyboard type fieldParth Malkan2022-07-251-1/+3
| | | | | | | | | | | | | | | | | | rgbkbd_type describes number of zones and LEDs supported. BRANCH=none BUG=b:232134905 TEST=make -j buildall Cq-Depend: chromium:3784556 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I400f38f45469874f8ea9bf75f45135e3baa21764 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3733668 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit 7be23fa82e8bad96b0e6473f25b0f39273575ce3) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3784560 Tested-by: YH Lin <yueherngl@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org>
* nereid: vbus measurement using charger ic ADCDeepti Deshatty2022-06-091-15/+12
| | | | | | | | | | | | | | implement pd_check_vbus_level() to measure vbus precisely using SM5803 vbus ADC similar to the CL:2406342 BUG=b:231419461 BRANCH=main TEST=USBC dock is detected on Nereid port1 Change-Id: If418017256d0c34c683f1d84fb46423184cc7fa0 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670785 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* docs/fingerprint: Clean up formatting in fingerprint-factory-quick-guide.mdTom Hughes2022-06-091-27/+26
| | | | | | | | | | | | BRANCH=none BUG=b:234772776 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0a107a379367712d79a959dc40b4e6b215be8c00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687544 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Andrea Grandi <agrandi@google.com>
* assert.h: Remove unnecessary externTom Hughes2022-06-091-3/+3
| | | | | | | | | | | | | | | | | | | | Functions in C are extern by default; it's not necessary in a header file. The extern combined with noreturn causes a compiler error when building with C++: ./builtin/assert.h:33:8: error: an attribute list cannot appear here extern noreturn void panic_assert_fail(const char *msg, const char *func, ^~~~~~~~ BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I7a2a86e57569bc90bb1ab93d5703217eabc042a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691957 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* kblight: Initialize on AP startupDaisuke Nojiri2022-06-081-0/+6
| | | | | | | | | | | | | | | | This patch makes keyboard backlight module initialize on chipset startup instead of on reset. This will prevent LED drivers from being accessed before they're powered. BUG=b:233323599 BRANCH=None TEST=Taniks Change-Id: Ia57acdd57663c7bfa0dc3117cbc9ab6191d34c45 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3693054 Reviewed-by: Parth Malkan <parthmalkan@google.com> Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
* Revert "zephyr: defconfig: default to LEGACY_INCLUDE_PATH=n"Yuval Peress2022-06-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4e012fd31e03507c4b254e49825e0dfbf263a375. Reason for revert: Causes build issues in generated files Original change's description: > zephyr: defconfig: default to LEGACY_INCLUDE_PATH=n > > Now that the code base compiles with LEGACY_INCLUDE_PATH=n, turn the > option to no by default so that we won't add any more non prefixed > include. > > BRANCH=none > BUG=none > TEST=cq dry run > > Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> > Change-Id: Ie95e79e659e755de869c8512d0bdfdc9523e1afa > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3637580 > Reviewed-by: Yuval Peress <peress@google.com> Bug: none Change-Id: I7541df82a963b81d983510cda58bb3a78c8156d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3683927 Commit-Queue: Al Semjonovs <asemjonovs@google.com> Tested-by: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Auto-Submit: Yuval Peress <peress@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* docs/fingerprint: Run mdformatTom Hughes2022-06-082-6/+6
| | | | | | | | | | | BRANCH=none BUG=none TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I20caf005a0692d7e1d89528c87bb49b7743b8199 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3696148 Reviewed-by: Andrea Grandi <agrandi@google.com>
* osiris: Update gpio configYu-An Chen2022-06-081-1/+1
| | | | | | | | | | | | | | | | | Set GPIO73 as input to prevent I/O pin leakage current. BUG=b:235020065 BRANCH=none TEST=HW team confirmed IO voltage as expected Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I7dd1d22a4635fd55dc803c7e025ec0b3fd52c156 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3678879 Auto-Submit: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com> Tested-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
* docs/fingerprint: Add links to info on fuzz testingTom Hughes2022-06-081-0/+7
| | | | | | | | | | | | BRANCH=none BUG=none TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I91ca1ee518dc701b1cf49f5c5149841af8a2c2df Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3696147 Reviewed-by: Andrea Grandi <agrandi@google.com> Reviewed-by: Firas Sammoura <fsammoura@google.com>
* Makefile: Use cxx-name variable instead of hardcoding compilerfactory-guybrush-14908.B-mainTom Hughes2022-06-081-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Icd8bfd8d6f8d6091e1bfef36b3e45b030f8f9d9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3681938 Reviewed-by: Edward Hill <ecgh@chromium.org>
* zephyr test: Improve SYV682x test namingAbe Levkoy2022-06-082-23/+27
| | | | | | | | | | | | | | | | The UUT for this test is the SYV682x device driver, which works for part versions A, B, and C. The (emulated) part in the devicetree is an SYV682C, but the majority of the driver interface is unaffected by the specific part. Update file, suite, and variable names to reflect this. BUG=b:234886404 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I8024239d4f4b4aa0793ea9b1e5a4b9df126a4009 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689799 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* zephyr test: Use fixture for SYV682x testAbe Levkoy2022-06-081-131/+166
| | | | | | | | | | | | | | Convert ZTEST to ZTEST_F. Move repeated definitions to fixture/setup function. BUG=b:234886404 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I419c57b120ec7a17a4d70c746f75ab3d3d665225 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689798 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr test: Format ppc_syv682c.cAbe Levkoy2022-06-081-145/+148
| | | | | | | | | | | | | Run clang-format on this test. BUG=b:234886404 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Id111469a400bf60a48b8e0492db9c373ced97d11 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689797 Reviewed-by: Yuval Peress <peress@google.com>
* steelix: config led behaviourwen zhang2022-06-083-34/+126
| | | | | | | | | | | | | | Config the battery/power LED behaviour according to the LED SPEC BUG=b:232050545 TEST=ectool led [battery/power] {color} BRANCH=none Change-Id: I47903c3682d1ecc84a56d93b4b14e59a5eeff272 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3690197 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
* steelix: modify motionsense rotation matrixwen zhang2022-06-082-0/+18
| | | | | | | | | | | | | | | The rotation matrix of steelix is different from reference board inherit the motionsense_kingler.dts and modify its rotation matrix BUG=b:232050545 TEST=rotate the DUT and check the direction of the frame BRANCH=none Change-Id: Iccb02a51487564a66dd22f23dcecf5a5493498f0 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686720 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* steelix: enable tablet modewen zhang2022-06-081-1/+1
| | | | | | | | | | | | | | | Kingler enabled the tablet mode, steelix is the variant and inherit its config, we should configure the GPIO for steelix BUG=b:232050545 TEST=EC reports tablet mode when the DUT is folded over BRANCH=none Change-Id: I4ae928ef6683355f602b03a724be00023807ffed Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3694919 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* kingler: enable tablet modewen zhang2022-06-083-1/+9
| | | | | | | | | | | | | | Enable tablet mode interrupt and events BUG=b:203739613 TEST=EC reports tablet mode when the DUT is folded over BRANCH=none Change-Id: I5a7845ce20ff1f383b2238b8905fca7df850aa31 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3694918 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
* corsola: Enable type c sbu in svdm_dp_post_configlschyi2022-06-081-0/+3
| | | | | | | | | | | | | | | | | | Corsola platform overrides the svdm_dp_post_config but not enable the sbu in it. Enable the type c sbu settings in svdm_dp_post_config so that external display is available. BUG=b:208372205 TEST=manually test with inserting a type c display, then check the SBU register is set enabled and external display is functioning. BRANCH=none Signed-off-by: lschyi <lschyi@google.com> Change-Id: I02096a04966e0bb4f7f1bb42df6bac904043ea8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3694922 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org>
* kingler: Set up USB C1 SBU protection with TCPM SBUlschyi2022-06-082-6/+1
| | | | | | | | | | | | | | | | | The USB C1 SBU line in kingler is provided by TCPM module, enable it in the configuration and remove setting it from tcpc board init function. BUG=b:208372205 TEST=manually test with inserting a type c display, then check the SBU register is set enabled and external display is functioning. BRANCH=none Change-Id: I69189e19d3151181655b9290eed7d19e1c318e4f Signed-off-by: lschyi <lschyi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682601 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org>
* rt1718s: Implement set_sbulschyi2022-06-081-0/+19
| | | | | | | | | | | | | | | | | | The rt1718s can enable the SBU protection and control in the SBU_CTRL register. Implement the set_sbu function to make projects set the SBU line protection and function within the application. BUG=b:208372205 TEST=manually test with inserting a type c display, then check the SBU register is set enabled and external display is functioning. BRANCH=none Change-Id: I13f3881ddbb3b70f04e8ea88fcb51b1cf37fd517 Signed-off-by: lschyi <lschyi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682600 Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Sung-Chi Li <lschyi@chromium.org>
* zephyr: steelix: drop unused power-on configwen zhang2022-06-081-1/+4
| | | | | | | | | | | | | | Steelix only uses D2, drop the workaround config for H1 BUG=b:234572040 TEST=verify the GPIO state after sysjump rw BRANCH=none Change-Id: I4eed76ead983b6e818ca2d29add86d8c1db3cb98 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3694921 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* corsola: drop duplicated configEric Yilun Lin2022-06-081-1/+0
| | | | | | | | | | | | | | | | The config was defined twice. BUG=none TEST=zmake BRANCH=none Change-Id: I5947c8a59b103d18e3dc83f5bd327f6645120efb Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686968 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* Zephyr: fix SOC Kconfig typoJosh Tsai2022-06-081-1/+1
| | | | | | | | | | | | | | | When we config the AP_X86_AMD, it should select the AP_X86 instead of AP_x86. BUG=b:234402115 BRANCH=none TEST=Skyrim can boot normally Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: Id6bbcae21170fe483139842e1b55ee85a9c17c41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3690044 Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* include/host_command.h: Fix C++ compilation errorTom Hughes2022-06-081-1/+1
| | | | | | | | | | | | | | | | | | include/host_command.h:277:41: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] __attribute__((section(".rodata.hcmds."EXPANDSTR(0x0000, command)))) \ ^ BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I7428c6bf5fa6aa0c9440ae44d665f7d744d23c00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691834 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* fpsensor: Use correct return typeTom Hughes2022-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes the following compilation error when building with C++: common/fpsensor/fpsensor.cc:766:11: error: cannot initialize return object of type 'enum ec_error_list' with an rvalue of type 'int' return 0; ^ BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b fp => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib76eed91413fb856ff31501261edc8251c4149da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691833 Reviewed-by: Patryk Duda <patrykd@google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* fpsensor: Use correct return typeTom Hughes2022-06-081-1/+1
| | | | | | | | | | | | | | | | | | | Fixes the following compile error when building with C++: common/fpsensor/fpsensor.cc:373:9: error: cannot initialize return object of type 'enum ec_status' with an lvalue of type 'int' return ret; ^~~ BRANCH=none BUG=b:234181908 TEST=make buildall -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I8672a32ed08fdc3cab241fc714ed4fa813f1b16c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691832 Reviewed-by: Patryk Duda <patrykd@google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* include/console.h: Use _STATIC_ASSERT for C++ compatibilityTom Hughes2022-06-081-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I92ffb946b6b0cc6953fc12b7221267b5bf3abc91 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689785 Reviewed-by: Diana Z <dzigterman@chromium.org>
* RGBKBD: Set scale per keyDaisuke Nojiri2022-06-0710-117/+217
| | | | | | | | | | | | | | | | | Currently, rgbkbd_set_scale can only set a scale of all keys. This patch makes it set a scale of an individual key. rgbkbd_reset_scale will replace the previous rgbkbd_set_scale. BUG=b:233986174, b:234530397 BRANCH=None TEST=Run ectool rgbkbd scale on Vell. TEST=Run ectool rgbkbd scale on Taniks. TEST=Run rgb all, demo, reset, scale, command in EC console. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I34e6b3e41c40510eca148fcf879e8caaf57317be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689778 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* beadrix: Update retimer of daughter boardTeddy Shih2022-06-071-0/+89
| | | | | | | | | | | | | | Update retimer of daughter board to tune signals according measurement. BRANCH=main BUG=b:235182557 TEST=on beadrix, validated by beadrix working on USB and DP functions. Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com> Change-Id: I47e1c7854892aef5ebb3c4f7576a4fa2cb621e03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3690203 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Ivan Chen <yulunchen@google.com>
* RGBKBD: Add demo sub-command to EC_CMD_RGBKBDDaisuke Nojiri2022-06-075-28/+53
| | | | | | | | | | | BUG=None BRANCH=None TEST=Vell Change-Id: Ie486b9ae6731622882b21d5273f79280770bbd17 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3657839 Reviewed-by: Parth Malkan <parthmalkan@google.com>
* ccgxxf: Add firmware version info in TCPCI dump commandVijay Hiremath2022-06-072-1/+22
| | | | | | | | | | | | | | | CCGXXF follows standard TCPCI spec registers however firmware version and build ID are vendor specific hence added a custom TCPCI dump register function. BUG=none BRANCH=none TEST=Tested on MTLRVP, correct firmware version is printed Change-Id: I8f9bf43756c607f8c5ebae4524dcf1e1d1ef43ab Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3669971 Reviewed-by: Diana Z <dzigterman@chromium.org>
* osiris: Update KYBL_EN output typeYu-An Chen2022-06-071-1/+1
| | | | | | | | | | | | | | Set KYBL_EN(GPIOA7) to GPIO_OUT_LOW from GPIO_ODR_LOW. BUG=b:233323599 BRANCH=none TEST=build pass Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I1964a76984d417dfe9c3db5a0374edb243cdc039 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3692486 Commit-Queue: Parth Malkan <parthmalkan@google.com> Reviewed-by: Parth Malkan <parthmalkan@google.com>
* lazor: Setup volume buttons for lazor onlyKnox Chiou2022-06-073-0/+12
| | | | | | | | | | | | | | | | | Lazor/limozeen share the same firmware, setup volume buttons for lazor only. BUG=b:234175434 BRANCH=trogdor TEST=emerge-trogdor chromeos-ec & ectool mkbpget buttons on lazor. Cq-Depend: chromium:3674845 Signed-off-by: Knox Chiou <knoxchiou@google.com> Change-Id: I648235491d6edda0d2cc30650fb3481abfdad2e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685754 Tested-by: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* mkbp_info: Provide run time check volume buttons functionKnox Chiou2022-06-072-3/+35
| | | | | | | | | | | | | | | | | Define a volume button override function for board specific usage, so the devices whom share the firmware could config volume buttons by run time. BUG=b:234175434 BRANCH=trogdor TEST=emerge-trogdor chromeos-ec & ectool mkbpget buttons on lazor. Signed-off-by: Knox Chiou <knoxchiou@google.com> Change-Id: I18cd25c25183f8149650ed2302a476242b2680e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674845 Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr:test: LED driver code coverageAl Semjonovs2022-06-0710-2/+414
| | | | | | | | | | | | | Tests to add coverage to LED driver code BUG=b:233607287 BRANCH=NONE TEST=zmake test test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I4da19d221e07709988e2cd72a11411575a349be2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3664636 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: Don't convert paths to relative in infoJeremy Bettis2022-06-071-13/+1
| | | | | | | | | | | | | | | | | The CQ recipe will now convert absolute paths to relative paths as needed, so leave the paths as absolute in the lcov file. BRANCH=None BUG=b:231639771 TEST=Ran script by hand Cq-Depend: chromium:3683588 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I1461d935ae42ad09d3617ea506911cf5b5acbb00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3684370 Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: LED: Make legacy and DT configs mutually exclusiveParth Malkan2022-06-071-0/+1
| | | | | | | | | | | | | | Make configs PLATFORM_EC_LED_COMMON and PLATFORM_EC_LED_DT mutually exclusive. BRANCH=None BUG=b:227798487 TEST=zmake build --all Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Iaf34d6691662e354edfd1617644b979a1bc973cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685749 Reviewed-by: Keith Short <keithshort@chromium.org>
* Skyrim: Adjust tuning for C1Diana Z2022-06-071-3/+54
| | | | | | | | | | | | | | C1 requires a different setting for the equalization register. BRANCH=None BUG=b:230694492 TEST=on skyrim, plug peripherals into C1 and ensure the correct registers are observed Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0ebfef466ad141cdf511b031ecd3ff9a6e88bf9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689784 Reviewed-by: Robert Zieba <robertzieba@google.com>
* ANX7483: Add EQ tuning interfaceDiana Z2022-06-073-0/+66
| | | | | | | | | | | | | | Add an API which may be used to adjust the EQ settings of pins on the retimer individually. BRANCH=None BUG=b:230694492 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I26ddb01cb3d84ef074545d05a5836ad6e385ed92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3689783 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* clock-stm32f4: Fix minimal time the RTC alarm can be set forPatryk Duda2022-06-073-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, SET_RTC_MATCH_DELAY was set to 120 us which was way too small to setup RTC alarm properly. As a result, watchdog could reset FPMCU while it was in deep sleep (also known as STOP mode in STM32 documentation) with no additional information (because interrupts were disabled in __idle() and the core was sleeping). The problem ocurred when number of microseconds provided to set_rtc_alarm() was between 120 - 125 (typically a value slightly smaller than HOOK_TICK_INTERVAL is provided), so the probability was very low. New value was found by running this code on STM32F4 (placed in chip/stm32/clock-f.c) +volatile uint32_t int_received; + static void __rtc_alarm_irq(void) { + int_received++; + rtc_alarm_irq(); } DECLARE_IRQ(STM32_IRQ_RTC_ALARM, __rtc_alarm_irq, 1); +static int measure_rtc_setup(int argc, char** argv) +{ + struct rtc_time_reg rtc0; + + for (int us = 180; us <= 200; us++) { + int_received = 0; + for (int i = 0; i < 100000; i++) { + set_rtc_alarm(0, us, &rtc0, 0); + usleep(1000); + } + ccprints("%d us - %d received", us, int_received); + } + + return EC_SUCCESS; +} + +DECLARE_CONSOLE_COMMAND(measure_rtc, measure_rtc_setup, "", ""); The code adds 'measure_rtc' console command which is setting RTC alarm and waits 1 ms for interrupt to be triggered. In this code we are testing range from 180us to 200us, 100k times. Results from 120us to 200us, 1k times: [6.667189 120 us - 0 received] [7.680241 121 us - 0 received] [8.693295 122 us - 0 received] [9.706348 123 us - 0 received] [10.719404 124 us - 0 received] [11.732460 125 us - 466 received] [12.745519 126 us - 953 received] [13.758578 127 us - 952 received] [14.771637 128 us - 952 received] [15.784697 129 us - 953 received] [16.797757 130 us - 955 received] ... [67.450714 180 us - 950 received] [68.463772 181 us - 954 received] [69.476831 182 us - 961 received] [70.489890 183 us - 941 received] [71.502949 184 us - 950 received] [72.516008 185 us - 941 received] [73.529068 186 us - 957 received] [74.542128 187 us - 956 received] [75.555187 188 us - 1000 received] [76.568248 189 us - 1000 received] [77.581310 190 us - 1000 received] [78.594371 191 us - 1000 received] [79.607431 192 us - 1000 received] [80.620493 193 us - 1000 received] [81.633554 194 us - 1000 received] [82.646615 195 us - 1000 received] [83.659676 196 us - 1000 received] [84.672737 197 us - 1000 received] [85.685798 198 us - 1000 received] [86.698859 199 us - 1000 received] [87.711920 200 us - 1000 received] We see that with setting RTC alarm to 120us we are guaranteed to not receive an interrupt. Starting from 188us we receive all interrupts. Results from 180us to 200us, 100k times: [107.697820 180 us - 95144 received] [208.997886 181 us - 95250 received] [310.297953 182 us - 95259 received] [411.598017 183 us - 95167 received] [512.898079 184 us - 95245 received] [614.198148 185 us - 95149 received] [715.498217 186 us - 95166 received] [816.798283 187 us - 95235 received] [918.098345 188 us - 100000 received] [1019.398414 189 us - 100000 received] [1120.698484 190 us - 100000 received] [1221.998555 191 us - 100000 received] [1323.298622 192 us - 100000 received] [1424.598695 193 us - 100000 received] [1525.898759 194 us - 100000 received] [1627.198827 195 us - 100000 received] [1728.498897 196 us - 100000 received] [1829.798961 197 us - 100000 received] [1931.099025 198 us - 100000 received] [2032.399095 199 us - 100000 received] [2133.699164 200 us - 100000 received] Again, we see that starting from 188us all interrupts are received. The new value was set to 200us, so we have 12us of safe margin. BUG=b:200828093 BRANCH=none TEST=Set HOOK_TICK_INTERVAL in chip/stm32/config_chip.h to value that is a sum of STOP_MODE_LATENCY, PLL_LOCK_LATENCY and SET_RTC_MATCH_DELAY and value between 50us to 100us (to give enough time to do context switches). For SET_RTC_MATCH_DELAY equal to 120us, good value is 400. For 200us, the value should be 450. Compile bloonchipper and flash it on dragonclaw development board. Make sure that there are no reboots caused by watchdog. TEST=./test/run_device_tests.py --board bloonchipper \ --flasher servo_micro --tests stm32f_rtc Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ica2036c142ac7fd792c6365b97cb39fab656d227 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3688190 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* zephyr: move Adlrvp USB mux configuration into the DTSTomasz Michalec2022-06-034-116/+31
| | | | | | | | | | | | | | | | | | | Move the Adlrvp board USB mux configuration into the devicetree. Remove USBC_PORT_Cx_BB_RETIMER_I2C_ADDR from zephyr/shim/include/config_chip.h since there is no platform in Zephyr that use these defines. BUG=b:229411952 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I95b9fdf665c9e7aa56dae65116d6d0030e9549d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607991 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: move Brya USB mux configuration into the DTSTomasz Michalec2022-06-032-3/+27
| | | | | | | | | | | | | | | | Move the Brya board USB mux configuration into the devicetree. BUG=b:229411952 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I4a388caca7833391b76bb4261b64f30cf3b26ecc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607990 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: Extend JHL8040R DTS node to support USB-C mux configurationTomasz Michalec2022-06-0312-96/+152
| | | | | | | | | | | | | | | | | | | JHL8040R is BB retimer. Add necessary changes to make it possible to configure BB retimer as USB-C mux using a devicetree. Add code to generate bb_controls array with entry for every BB retimer in USB-C muxes chain. Align adlrvp and brya DTS to new banding of JHL8040R. BUG=b:229411952 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I339f09d5f259dea88c9a783290744162a94d9559 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607989 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: move Nissa USB mux configuration into the DTSTomasz Michalec2022-06-039-65/+63
| | | | | | | | | | | | | | | | | Move Nissa boards (Nivviks, Craask, and Nereid) USB mux configuration into the devicetree. BUG=b:227757117 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I988603bcc847ce9aae4fd0b86506659066577832 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3593790 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: Add ANX7483 USB-C mux DTS configurationTomasz Michalec2022-06-033-0/+50
| | | | | | | | | | | | | | | | Add necessary changes to make it possible to configure an ANX7483 USB-C mux using a devicetree. BUG=b:227757117 TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I3ecc3dc66d2269905b19f7b1db44db5d8ca6df3c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3593789 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: Add choice for TUSB type in KconfigTomasz Michalec2022-06-035-12/+34
| | | | | | | | | | | | | | | | | TUSB1064 USB-C mux driver can work only with one TUSB type at the same time. Allowed types are TUSB1064. TUSB1044, and TUSB546. It makes sense to introduce PLATFORM_EC_USB_MUX_TUSB_TYPE in Kconfig.usb_mux BUG=none TEST=zmake testall BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I7bc583811bce718451d137f09dbe5f20be963f3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579120 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>