summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* zephyr: LED: Convert hard-coded led_color enum to use DTstabilize-14682.B-mainParth Malkan2022-04-093-6/+17
| | | | | | | | | | | | | | Generate led_color enum by using values defined in devicetree instead of using hard-coded values. BRANCH=none BUG=b:227798487 TEST=zmake build lazor, flash and test LEDs Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Ib92867194c9e5aaa5e114dd08d6ce187a2f9b300 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579991 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* ectool/battery: Print discharging after the currentDaisuke Nojiri2022-04-091-3/+6
| | | | | | | | | | | | | | | | | | | Currently, battery command prints the charge & discharge current without a sign. This patch makes the command print 'discharging' after the current value for clarification. localhost ~ # ectool battery ... Present current 782 mA (discharging) BUG=b:227275730, b:213130539 BRANCH=None TEST=On Atlas. See above Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ic1c87c721d128eaf25021c077aa6daa18f197fd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577987 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: shim: drop task_get_zephyr_tidFabio Baltieri2022-04-082-17/+0
| | | | | | | | | | | | | The function does not seem to be used anymore, let's drop it. BRANCH=none BUG=none TEST=zmake -j8 testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: If2db5bab9fca864904ef08ab2b65bf1f9aca2680 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578703 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: shim: decouple syswork support data from task_ctx_dataFabio Baltieri2022-04-081-37/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an alternative implementation of: ff45017216 Zephyr: Create sysworkq entry in task shim The original one was adding a full new task context structure for the sysworkq task, but that was not making any use of the "struct k_thread" field, which takes quite a bit of RAM. This version splits out the base data on a separate structure and uses that for the sysworkq handling. Additionally it moves the timer structures on a separate array to avoid structure padding (struct k_timer ends up with an int64_t). Net saving on RAM is 232 bytes on brya and 192 bytes on nereid, the difference is mainly due to the FPU registers. BRANCH=none BUG=b:223044986 TEST=build and run on brya TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: If2b3a53875900c26f2357a08ff3f9beb7c63c5e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575153 Reviewed-by: Diana Z <dzigterman@chromium.org>
* drive/charger/isl9421: Fix race condition with discharge_on_acRobert Zieba2022-04-081-13/+38
| | | | | | | | | | | | | | | | | | | | There is a race condition with `learn_mode`. This variable is read and then discharge_on_ac is disabled if it is not set. However it's possible for isl9241_discharge_on_ac to get called after the branch is taken but before discharge_on_ac is disabled. This can cause factory USB charging tests to fail as discharge_on_ac is disabled improperly. This commit protects the read and branch on `learn_mode` with a mutex to prevent the above from happening. BUG=b:214341758 BRANCH=guybrush TEST=Ran USB left charge test 2000 times Change-Id: I64cd63fb2761e2d01b3b384d580ab3597870425f Signed-off-by: Robert Zieba <robertzieba@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579624 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* test: add test for fifo popYuval Peress2022-04-081-0/+53
| | | | | | | | | | | | | | | | | | Test the case where the entry being removed has fewer than 2 entries in the fifo. This would trigger us to look at other sensors to see if timestamp spreading is still needed. The test verifies that the correct sample is at the head of the sensor data and that the timestamps were spread. BRANCH=none BUG=b:224614211 TEST=make run-motion_sense_fifo -j Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I5771247722d0e2cc4b1765d9da2b6d66e649303d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575698 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* ec: Exclude kb_scan test from coverageJeremy Bettis2022-04-081-1/+2
| | | | | | | | | | | | | | | | Even though this test doesn't flake when I run it locally, it does flake on gitlab. BRANCH=None BUG=b:228321906 TEST=Nope Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I4c659f3c7c90faaa6b2c693a66ea4fafc7468597 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578298 Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* ec: Exclude kb_scan_strict test from coverageJeremy Bettis2022-04-081-1/+1
| | | | | | | | | | | | | | | | | Even though this test doesn't flake when I run it locally, it does flake on gitlab. BRANCH=None BUG=b:228344537 TEST=Nope Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I120701e24b9169a9be979eb4c0c1310ad471c0f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578297 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* ec: Exclude flash test from coverageJeremy Bettis2022-04-081-1/+1
| | | | | | | | | | | | | | | | | | Even though this test doesn't flake when I run it locally, it does flake on gitlab. BRANCH=None BUG=b:228371835 TEST=Nope Change-Id: I7b9007815c7ce078f980a4eaf097dc857cea8f8a Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578296 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Sam Hurst <shurst@google.com>
* zephyr:test: Add PR_Swap test caseAl Semjonovs2022-04-081-0/+37
| | | | | | | | | | | | | Send PR Swap request and validate PR is swapped. BUG=b:225177659 BRANCH=NONE TEST=zmake test test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ifba307778275cd766fbd6be3233878d1ed4627d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3551357 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr:test: Add VCONN_Swap test caseAl Semjonovs2022-04-082-0/+142
| | | | | | | | | | | | | | Initiate a VConn Swap and validate the partner VConn state changes. BUG=b:223449319 BRANCH=NONE TEST=zmake test test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Id17b9e627003c8d67de0190f4d13b3b59bbf9835 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3555430 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: Lazor: Add brightness range color prop to DTParth Malkan2022-04-082-0/+4
| | | | | | | | | | | | | | | | | | | | Add br-color prop to DT required by generic set/get brightness range functions BUG=b:227755556, b:194430340 BRANCH=none TEST=On Lazor in both gpio and pwm LED configurations - ectool led battery query -> Amber and Blue are set - ectool led battery amber -> Sets Amber LED - ectool led battery blue -> Sets Blue LED - ectool led battery off -> Turns off LED - ectool led battery auto -> Sets Blue LED (w/o charger) Cq-Depend: chromium:3576899 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Idd86c525e9e2c5d79c1888ce6c2bc787da64117d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3576900 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: LED: Convert brightness range func to use DTParth Malkan2022-04-086-20/+109
| | | | | | | | | | | | | | | | | | | | | LED set/get brightness range funcs are used in ectool for LED testing. This patch converts the implementation to be generic and leverage dt. BUG=b:227755556, b:194430340 BRANCH=none TEST=On Lazor in both gpio and pwm LED configurations - ectool led battery query -> Amber and Blue are set - ectool led battery amber -> Sets Amber LED - ectool led battery blue -> Sets Blue LED - ectool led battery off -> Turns off LED - ectool led battery auto -> Sets Blue LED (w/o charger) Cq-Depend: chromium:3576900, chromium:3578053 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I4830837202f80db662b4341d41c82c9cc2e70d3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3576899 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: villager: Add brightness range color prop to DTParth Malkan2022-04-081-0/+2
| | | | | | | | | | | | | | | | Add br-color prop to DT required by generic set/get brightness range functions BUG=b:224397235 BRANCH=none TEST=zmake build villager Cq-Depend: chromium:3576899 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Ie82ac0fec1d4bc6ab64ef27d384f79b6a5846fc3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578053 Tested-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* battery: Current rate must be positive.Andrew McRae2022-04-081-1/+6
| | | | | | | | | | | | | | | ACPI disallows a negative current rate. Use the absolute rate, and rely on the flags to indicate charging or discharging. BUG=b:227275730 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I90e05ccd39442aa8e65e06cf7848d05a32879742 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577321 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Revert "ectool: Allow a negative value for battery charge rate"Andrew McRae2022-04-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cd70889abfe59865efa29ce47bd1bff11dbb9acd. Reason for revert: ACPI disallows negative rate values Original change's description: > ectool: Allow a negative value for battery charge rate > > A negative value indicates the battery is discharging, so > allow ectool to display it. > > BUG=b:227275730 > TEST=cros deploy dut1 ec-utils > BRANCH=none > > Signed-off-by: Andrew McRae <amcrae@google.com> > Change-Id: I17191691d5e0eb29180cfed39b9991fa48797930 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3555952 > Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Bug: b:227275730 Change-Id: I48913d7947fe1ded0ac45b79a0525427f5cf80d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577320 Auto-Submit: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com> Tested-by: Andrew McRae <amcrae@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* nereid: Enable ADC power signalsBernardo Perez Priego2022-04-083-23/+50
| | | | | | | | | | | | | | | | This will bind ADC power signals with ITE VCMP driver instances. BUG=b:227108147 TEST=Nereid sequences to S0 successfully BRANCH=none Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com> Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ic35f36c7dcba92625f9e633c537e942cd8dd8e4a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3504427 Tested-by: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* nissa: Fix init priority of base orientation checkAndrew McRae2022-04-081-6/+3
| | | | | | | | | | | | | | | The FW_CONFIG bits are not available until after the I2C bus is initialised, so ensure that the base orientation check is done after that. BUG=b:226486185 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ia9d38a206f909a89d51f8e182e32d65b6ef2f14f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577319 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Set I2C5_1 pins to be low voltage.Andrew McRae2022-04-081-0/+12
| | | | | | | | | | | | | | Set the sub-board type C I2C bus to be low voltage. This is done for all boards, since the pin is 3.3V tolerant. BUG=b:227695901 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I8475a4762c4da8d675a6dfc9b44baaeea6d39e53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577312 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Enable Nirwen fan supportAndrew McRae2022-04-085-2/+82
| | | | | | | | | | | | | | Enable Nirwen fan support, gated by FW_CONFIG fan flag. BUG=b:227531207 TEST=zmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Idfe7978d70e29260ef1eaf7091791dec2e2d874d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3574434 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* test/run_device_tests.py: Add private testsAndrea Grandi2022-04-086-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the list of tests is hard-coded in the Python script. Add ability to fetch additional tests from the private folder, if available. This is a reland of commit b97ba790690d1ee86c001ef0a82be5897645ae2f BRANCH=none BUG=b:226385185 TEST=cros lint test/run_device_tests.py TEST=make V=1 run-<private_test> TEST=test/run_device_tests.py --flasher=jtrace --remote=localhost --board=dartmonkey TEST=test/run_device_tests.py --flasher=jtrace --remote=localhost --board=dartmonkey --tests=<private_test> Cq-Depend: chrome-internal:4650299, chrome-internal:4650281, chrome-internal:4650279 Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I67866ced27414d495bfad5eff9825cf68c8c22cf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3562041 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Feels: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com> Feels: Bobby Casey <bobbycasey@google.com>
* zephyr: convert PLATFORM_EC_I2C to a helper symbolKeith Short2022-04-0814-21/+21
| | | | | | | | | | | | | | Convert CONFIG_PLATFORM_EC_I2C to a helper symbol that is automatically enabled if the Zephyr CONFIG_I2C option is enabled. BUG=b:217926701 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5aab26b0dea609a706b07ed752503f7432848136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575084 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: cleanup I2C Kconfig dependenciesKeith Short2022-04-082-7/+5
| | | | | | | | | | | | | | Change or remove dependencies on the EC specific CONFIG_PLATFORM_EC_I2C option. When applicable, use CONFIG_I2C instead. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I51da4990f8c47a290b0808169081f9adc7adee3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575083 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: cleanup dependencies for I2C configsKeith Short2022-04-081-8/+4
| | | | | | | | | | | | | | Use the if/endif block to set the dependency for all I2C configs. Delete redundant "default n" designations BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I8d73b21d90bcb1ee5ffd20f9203d8765faa865d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575082 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Move all I2C configs into a separate fileKeith Short2022-04-083-106/+94
| | | | | | | | | | | | | Move the I2C related Kconfigs to a separate file. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic5518c7209217e88677a8818d3793ddc58c2d41f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575081 Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: hoglin: Enable TCS3400 Light sensorSam Hurst2022-04-072-1/+105
| | | | | | | | | | | BUG=b:204193571 TEST=zmake configure -b hoglin BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I6f28e205cb596915a4127a5b47bdfb7501891091 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575696 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: herobrine: Enable TCS3400 Light sensorSam Hurst2022-04-072-1/+104
| | | | | | | | | | | BUG=b:204193571 TEST=zmake configure -b herobrine BRANCH=main Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I20e69d48ef7735ff3978518bb7dd682a93b7e9af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575695 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: it8xxx2_evb: convert the named-pwm node to pwm-ledsFabio Baltieri2022-04-071-14/+9
| | | | | | | | | | | | | | Convert the PWM test node in it8xxx2_evb.dts to use the generic Zephyr pwm-leds binding. BRANCH=none BUG=b:217741090 TEST=zmake build it8xxx2_evb Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I2b79ec25e53dfa84c464a1e2ef7261dd4109c78d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3569766 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: Fix Kconfig.charger charge_state_v2 helpAaron Massey2022-04-071-3/+3
| | | | | | | | | | | | | | | | | The menuconfig PLATFORM_EC_CHARGER help section implies that enabling the PLATFORM_EC_CHARGER option compiles charge_state_v2 code. Correct the help text to move "enables compilation of charge_state_v2 code" to the appropriate Kconfig sub-option. BRANCH=none BUG=b:216366887 TEST=zmake testall Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I740990525f6b05da9e68293b0a09e27c21e62871 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3576665 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* Felwinter : Remove CONFIG_CMD_POWERINDEBUG.Logan_Liao2022-04-071-0/+3
| | | | | | | | | | | | | | | | | | This patch undefine CONFIG_CMD_POWERINDEBUG for final firmware candidate. BUG=b:224516847 BRANCH=none TEST=make BOARD=fewinter success. Change-Id: I3baef8938cd3a058cfdc1e8a8f1fca6793a8156f Signed-off-by: Logan_Liao <logan_Liao@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573427 Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Reviewed-by: Logan Liao <logan_liao@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com> Tested-by: Boris Mittelberg <bmbm@google.com>
* zephyr: shim: tasks: use the Zephyr cfg/data conventionFabio Baltieri2022-04-071-70/+60
| | | | | | | | | | | | | | | | Zephyr task shim code has a conventional pair of const/non const data structures, but these are oddly named. Change the structure reference variables to the more conventional *cfg and *data, as it's commonly used in the Zephyr driver model. BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I6af3585899d1245014ee387aa2eb3da5339af271 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572082 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* BB Retimer: Add CONFIG_USBC_RETIMER_INTEL_BB_VPRO_CAPABLESugnan Prabhu S2022-04-075-4/+26
| | | | | | | | | | | | | | | | Add config to enable host support for vPro. S0ix issue is observed on connecting vPro dock to host without vPro capability. BB Retimer handling for vPro dock needs to be enabled only for vPro capable host. BRANCH=None BUG=b:220805370 TEST=Verify S0ix transition is working without any wakes on redrix and voxel when vpro dock is connected. Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com> Change-Id: I77a8a44b0073b5defd5c59471c4bf1c706795d8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3551382 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* dedede: Update pp3300_a_pgood when lostAseda Aboagye2022-04-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | Recently, we made a change that would cause the PP3300_A_PGOOD to follow that of the enable, but it failed to update the local variable. This can cause us to assert DSW_PWROK which can violate the Intel PDG requirement which may lead to RTC corruption. This commit simply updates the local variable in step with the logic that was recently added. BUG=b:218596390 BRANCH=firmware-dedede-13606.B TEST=Build and flash magolor, boot to S0, suspend to S0ix, issue `apshutdown` on EC console, verify that DUT shuts down to S5 and that DSW_PWROK isn't asserted durng this process. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I420b6e0d29b17bc07b02b3598ec5c099afecfa57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3576652 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* ec: Add sleep to emulated ztests for tasksJeremy Bettis2022-04-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | Sometimes the tasks don't finish starting until the test is done. There are several tasks that are included in all tests even if they don't use them, such as the console task, and those often don't even start until the end of the test. This causes the number of covered lines in gcov to change from run to run. Add a sleep before printing Pass, as that is when the util/run_host_test kills the test. BRANCH=None BUG=b:213374060 TEST=Ran accel_cal 50 times Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I36a8b2e0812adbbb158c439aea867e1b5bc960d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573692 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* mt_scp: set decoder capture buffer format to MM21Yunfei Dong2022-04-071-3/+2
| | | | | | | | | | | | | | | | | In order to reduce latency, need to enable vp8/h264/vp9 default capture buffer format type to MM21. BRANCH=none BUG=b:227452337 TEST=build cherry_scp pass Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Change-Id: Ib0e0b90f04c8df93fb7eade3ac02f48f0e7d577b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573430 Reviewed-by: Steve Cho <stevecho@chromium.org> Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Tested-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Commit-Queue: Miguel Casas-Sanchez <mcasas@chromium.org>
* landia: Porting battery led behavior for firmware spec.Hank Xie2022-04-071-7/+45
| | | | | | | | | | | | | | | | | This patch changes the battery led behavior to meet firmware spec, and keeps the old behavior of lantis. BUG=b:227121467 BRANCH=dedede TEST=On landia. Set CBI and make sure the battery led works normally. Signed-off-by: Hank Xie <hank.xie@quanta.corp-partner.google.com> Change-Id: I5d1d50f3f6d408d220810df85ad61575ff21f32b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3552483 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: skyrim: convert PWM LED to cros-ec,pwm-ledsFabio Baltieri2022-04-075-101/+54
| | | | | | | | | | | | | | Skyrim LED should be able to use the cros-ec,pwm-leds driver and save some board specific code. BRANCH=none BUG=b:217741090 TEST=zmake build skyrim Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I5c192e62a780c2fc7d5f699d2f68d07cbd6ba341 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3569762 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: eliminate PLATFORM_EC_USB_A_PORT_COUNT configDawid Niedzwiecki2022-04-079-18/+5
| | | | | | | | | | | | | | | | | | | | The USB-A port count can be get from cros-ec,usba-port-enable-pins node, namely from a number of defined "enable-pins" pins. Remove the PLATFORM_EC_USB_A_PORT_COUNT config and define USB_PORT_COUNT based on DTS. This shouldn't affect the output binary, it just simplifies the configuration process. BUG=b:227472576 TEST=zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I887993af7b4dae300708099f35cfe58181e14162 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3569772 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* rt1718s/bc12: fix typoTing Shen2022-04-071-1/+1
| | | | | | | | | | | | | BUG=none TEST=manually BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Iaf26700de1b94b245196f24699a40c2c90513b76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575704 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* nissa: Allow alternate rotation parameters for nivviksAndrew McRae2022-04-075-3/+78
| | | | | | | | | | | | | | | | If the FW_CONFIG indicates an inverted form factor, switch the rotation parameters to an alternate set. This is to support different form factors for nivviks. BUG=b:226486185 TEST=zmake build nivviks; flash run, adjust CBI, check screen BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Cq-Depend: chromium:3561599 Change-Id: I92f26f16962bee250fe57651d2ffa499877dac9e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3563383 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: npcx: fix hook typeEric Yilun Lin2022-04-071-2/+2
| | | | | | | | | | | | | | | | The hook type was wrong at CL:3518465. Fix this accordingly. BUG=b:223800037, b:226295577 TEST=kingler shutdown properly BRANCH=none Change-Id: Idd22411bc57ad655c00190df9392fa4a5d8b218b Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3574428 Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com>
* villager: add PANASONIC AP19A5K batteryben chen2022-04-071-1/+4
| | | | | | | | | | | | | supports panasonic ap19a5k battery BRANCH=None BUG=b:224888442 TEST=Built the villager, herobrine, and hoglin images. Change-Id: I7883977c3f2448a9d01c12d71975e98d9f92160a Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3574366 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* pi3usb9201: set DCP current limit 1500mAEric Yilun Lin2022-04-071-11/+1
| | | | | | | | | | | | | | | | | We follow the BC1.2 specification, so the ramping is not necessary for DCP. We set DCP limit as USB_CHARGER_MAX_CURR_MA (fixed 1500mA). BUG=b:211363424 TEST=on kingler, ectool usbpdpower 0; see DCP limit 1500mA BRANCH=none Change-Id: I3b80dc7113dd0e77e2d16ca797ff0eff0b595444 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573808 Tested-by: Parker Lin <parkerlin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* villager: Add LED dts filesParth Malkan2022-04-074-0/+123
| | | | | | | | | | | | | | | | | led_villager.dts file is used to define villager LED policy. gpio_led_villager.dts file is used to define gpio pins and colors supported. BUG=b:224397235 TEST=buildall (zmake build -a) BRANCH=none Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Ie2979b4a5c3f526611429e5e16f4aa88f072210c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3552384 Tested-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
* zephyr: battery: Add PANASONIC AP19A5K batteryben chen2022-04-072-0/+60
| | | | | | | | | | | | | | Add PANASONIC AP19A5K battery. It is based on the information given in the board/bobba/battery.c. BRANCH=None BUG=b:224888442 TEST=zmake testall is PASS Change-Id: I7e2c6304377e9a94def3b5a22b2b51ae71a631ad Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573429 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* gimble: fix unused gpio pinWill Tsai2022-04-071-1/+1
| | | | | | | | | | | | | | Move gpio82 to Unused Pins. BUG=b:216734502 TEST=make -j BOARD=gimble BRANCH=none Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I8581691c68132a2f4019989c2d1f1b576d502e70 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3574714 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: reorganize project filesAl Semjonovs2022-04-0713-414/+332
| | | | | | | | | | | | | | Move brya from boards/arm/brya to project/brya. BUG=b:226574243 BRANCH=NONE TEST=zmake build brya Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I3506f081d995d09739a7bd54d5308dedbb8c5b09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572182 Reviewed-by: Sam Hurst <shurst@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: shim: turn THREAD_MAX_NAME_LEN default down to 16Fabio Baltieri2022-04-061-0/+3
| | | | | | | | | | | | | | | | | | | This has been done for nereid already in crrev.com/c/3544745 down to 12 bytes, other platforms may use PD_INT_SHARED which needs 14, setting a 16 character as EC config default so we can accommodate any thread name currently defined in shimmed_task_id.h and save 16 bytes per thread. Saves 352 bytes on Brya, name length is validated in k_thread_name_set, so worst case scenario the requested name gets truncated. BRANCH=none BUG=b:226324598 TEST=kernel stacks on brya Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I11ee792cfd880192d461f15a7a7b5a168543e9cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572083 Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: mchp: Add zephyr Kconfig and CMakeListsmartin yan2022-04-066-1/+99
| | | | | | | | | | | | | Add zephyr Kconfig and CMakeLists to support shim layer code BUG=none BRANCH=main TEST=zmake testall and make buildall -j$(nproc) Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I248ad8289b40e1d5a921f0b0eecf1d00dbfb8e24 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3563498 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ec: Delete /dev/shm/EC_persist_* before testsJeremy Bettis2022-04-062-1/+6
| | | | | | | | | | | | | | | | | | Some tests (specifically flash) leave /dev/shm/EC_persist_* files on the disk and the behavior of the test changes when they exist. To get a consistent test, remove the corresponding files before running a host test. BRANCH=None BUG=b:213374060 TEST=Ran flash test 50 times Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I27a92adee1b181fdedf0b75bdd19a39e27bfa6af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572892 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>