summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gimble: configure thermal sensorScott Chao2021-07-232-9/+26
| | | | | | | | | | | BUG=b:194269214 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I70f93cea02a24876c06d8c2f54169a2290b432d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038422 Reviewed-by: caveh jalali <caveh@chromium.org>
* tablet_mode: Fix the race condition of setting the tablet modeWai-Hong Tam2021-07-2329-41/+54
| | | | | | | | | | | | | | | | | | | | | | | | | There are 2 tablet mode triggers: * Lid: when the lid angle close to 360 degree, either detected by a GMR sensor or by the angle computed by 2 motion sensors. * Base: when the detachable base is detached. These 2 triggers set the tablet mode status, which as a boolean, resulting a race condition. This CL fixes the race condition. Each trigger updates its own bit. The final tablet mode status is the OR of all bits. BRANCH=Trogdor BUG=b:193873098 TEST=Attached the base, checked tablet_mode enabled; detached the base, checked tablet_mode disabled; flip base to 360 degree, checked tablet_mode disabled; move the base out of the lid, checked tablet_mode disabled. Change-Id: Ia9d9d2d66c194796c1039cc8b746c8d1f28a4496 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044414 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* mushu: Remove PRL stringsWai-Hong Tam2021-07-231-0/+3
| | | | | | | | | | | | | | | Mushu is nearly out of flash on ToT, 40 bytes, so remove the PRL strings from the build. Set the default debug level to 2, so RX messages will show up in logs automatically if they are needed. BRANCH=None BUG=None TEST=Build on ToT, observe mushu has over ~700 bytes free flash. Change-Id: I79b428ea24c443f428d888f4ad890483e5a9f9fd Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3048524 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: herobrine: Unlink the board/baseboard C files in EC-OSWai-Hong Tam2021-07-236-16/+883
| | | | | | | | | | | | | | | Duplicate the baseboard-specific and board-specific C files to the Zephyr project src directory. So the Zephyr image can be built standalone and not depend on any EC-OS code. BRANCH=None BUG=b:193573005 TEST=Built the herobrine_npcx9 image successfully. Change-Id: I7940deccb0fe98f7c8e72ae21c4d170bcd96377f Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3046512 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: fix MKBP_HOST_EVENT_WAKEUP_MASKDawid Niedzwiecki2021-07-233-10/+26
| | | | | | | | | | | | | | | | | | MKBP_HOST_EVENT_WAKEUP_MASK is right-shifted by 1 bit, so adjust defining it in the dts. The bug is impacting the waking up DUT with a host event, e.g. EC_HOST_EVENT_RTC which is used during the firmware_EventLog test. BUG=b:193495066 BRANCH=none TEST=Suspend DUT with powerd_dbus_suspend, and make sure the EC command "hostevent set 0x0000000002000000" wakes up the board. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I253d0dc36cf216fe50a6473c3640fe906ef565e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3031542 Reviewed-by: Simon Glass <sjg@chromium.org>
* chip/mt_scp: move video encode/decode IRQ to group 8Tinghan Shen2021-07-231-6/+6
| | | | | | | | | | | | | | | | | The IRQ triggering frequency of video encode/decode IRQ is propotional to frame rate. Assign these IRQs with group 8 to prevent blocking IPI IRQ handler (group 7). BRANCH=none BUG=b:189300514 TEST=make BOARD=cherry_scp Change-Id: Iab7147fbecc02217656bef1493574461ad54cb29 Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3010781 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org> Tested-by: Tzung-Bi Shih <tzungbi@chromium.org>
* Revert "dirinboz: remove imu sensors"Zick Wei2021-07-234-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d7d8a72b24ba3f1b5845ac2d1fa61b032a2f5075. Reason for revert: CONFIG_LED_ONOFF_STATES accidentally delete last letter S. Original change's description: > dirinboz: remove imu sensors > > Dirinboz is a clamshell only device, not use imu sensors. > > BUG=b:174240357 > BRANCH=zork > TEST=can power on DUT normally. > > Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> > Change-Id: I56202d92da86b5da2919d3e285ce953f568aad5f > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017902 > Reviewed-by: Peter Marheine <pmarheine@chromium.org> > Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Bug: b:174240357 Change-Id: I4f2cbcc0c7931f22492c25a4ceb654da882b96cf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045864 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Zick Wei <zick.wei@quanta.corp-partner.google.com>
* Fennel: add the support for ICM42607wen zhang2021-07-233-1/+108
| | | | | | | | | | | | | | | | Bosh notice that BMI160 are going EOL, so we intend to import ICM42607 for Fennel BUG=b:194251601 BRANCH=kukui TEST=1.make BOARD=fennel 2.ectool motionsense can get the sensor data 3.rotate the DUT and check the direction of the frame Change-Id: I87e8b78078c2fe74246e2ce03d67315df7e9cab8 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045032 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* chip/mt_scp: fix 8195 IRQ default polarityTinghan Shen2021-07-233-3/+6
| | | | | | | | | | | | BRANCH=none BUG=b:189300514 TEST=video_decode_accelerator_tests test-25fps.h264 Change-Id: Ia6e777fe7a349586c676b6991643676019598d7a Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038014 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org>
* keyboard: Restore kb_scan testDaisuke Nojiri2021-07-232-9/+16
| | | | | | | | | | | | | | | kb_scan test was disabled due to crbug.com/976974. Since it's only partially broken, this CL enables the test and disables simulate_key_test. BUG=b:152931654 BRANCH=None TEST=make run-kb_scan Change-Id: I9496f34a320c81b113c241d6160091721a28a5de Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044404 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* keyboard: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-23117-168/+128
| | | | | | | | | | | | | | | | | Currently keyboard_scan_config is defined by each board using CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as __override hence removes CONFIG_KEYBOARD_BOARD_CONFIG. BUG=None BRANCH=None TEST=buildall Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403 Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* Homestar:BACKLIGHT:Remove CONFIG_BACKLIGHT_LIDtongjian2021-07-231-0/+8
| | | | | | | | | | | | | | | Because of the oled panel poweron timing, BL_DISABLE does not need to be controlled by ec. BUG=b:194197448 TEST=make -j BOARD=homestar Verify build on SIT board BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I1723f7def2c9358b137cfe813094b54a1a3974e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045418 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* dirinboz: remove imu sensorsZick Wei2021-07-234-132/+1
| | | | | | | | | | | | | | Dirinboz is a clamshell only device, not use imu sensors. BUG=b:174240357 BRANCH=zork TEST=can power on DUT normally. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I56202d92da86b5da2919d3e285ce953f568aad5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017902 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
* zephyr: Remove CONFIG options from allow listDino Li2021-07-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | Congratulations! The following options are now in Kconfig: CONFIG_HOSTCMD_REGULATOR CONFIG_SMBUS_PEC Config removed with './util/build_allowed.sh -u' Removing these CONFIG options from the allowed list: CONFIG_HOSTCMD_REGULATOR CONFIG_SMBUS_PEC BRANCH=none BUG=none TEST=buildall Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Ib12637f9e9d25db3af951a7a12989d334e6a1c5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045035 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable voltage regulatorDino Li2021-07-234-1/+6
| | | | | | | | | | | | | | | Fixed error of host commands (0x12c~0x130) for controlling voltage regulator. BUG=b:189855648 BRANCH=none TEST=Verified that no error on regulator host commands. (verified on both cros-ec and zephyr fw image) Change-Id: Ib7c5782e80262a38be0517181afbd78160847040 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3007380 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: add support for CONFIG_SMBUS_PECDino Li2021-07-232-0/+17
| | | | | | | | | | | | | Add Kconfig option to enable packet error checking of SMBus. BUG=b:189855648 BRANCH=none TEST=zmake testall Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Iec9f318aebed97f28e199054aae558bb8a500d52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045034 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: add support for CONFIG_HOSTCMD_REGULATORDino Li2021-07-232-0/+12
| | | | | | | | | | | | | Add Kconfig option to enable host command of voltage regulator control. BRANCH=none BUG=b:189855648 TEST=zmake testall Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I3cb8a875f8354f4223d31e2d54319f0fb2690b5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045033 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* genesis: update usb-a gpios, remove dead codeJeff Chase2021-07-233-73/+19
| | | | | | | | | | | | | | | | Genesis only has three USB-A ports so update GPIOs and power handling. Also remove unused thermal table. BRANCH=puff BUG=b:192008266 TEST=boot; charge phone on each USB port, monitor GPIOs Change-Id: Ie3e5991f41caffa0b0a55adfd293e03befa80ce5 Signed-off-by: Jeff Chase <jnchase@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3045536 Reviewed-by: Joe Tessler <jrt@chromium.org> Commit-Queue: Joe Tessler <jrt@chromium.org>
* gimble: fix GPIOE1 gpio configurationScott Chao2021-07-221-1/+0
| | | | | | | | | | | BUG=b:194269211 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I8182d04cf283753dbf388a4fb30a3983fc0fe557 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038421 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* gimble: add tcpc0 resetScott Chao2021-07-222-9/+13
| | | | | | | | | | | BUG=b:194260437 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I35b8261aa486548f20a9d991f94008656c0c006b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034795 Reviewed-by: caveh jalali <caveh@chromium.org>
* gimble: enable CONFIG_BRINGUP during bringupScott Chao2021-07-221-0/+3
| | | | | | | | | | | BUG=b:192286098 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ibcd487331e70644da2b0aeb635acc05098dd8a69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038081 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: i2c: protect physical portDino Li2021-07-225-0/+71
| | | | | | | | | | | | | | | | | | If i2c devices are connected to the same port, they should use the same mutex_lock() index. So the new transaction won't break the ongoing transaction. BRANCH=none BUG=b:189855648 TEST=Enable CONFIG_SMBUS_PEC and voltage regulator function on asurada. No i2c transaction is broken. Change-Id: Ib848e3c2e60b99ce66ad5fd2fc7095f90820a15d Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3010920 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* brya: Remove pd_snk_is_vbus_providedCaveh Jalali2021-07-221-5/+0
| | | | | | | | | | | | | | | | The pd_snk_is_vbus_provided() function is only used when CONFIG_USB_PD_VBUS_DETECT_PPC is enabled. brya uses CONFIG_USB_PD_VBUS_DETECT_TCPC instead. BRANCH=none BUG=none TEST=buildall passses Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: If5a93025d6e870deb46717863c61c3d34be0283a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044413 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* zephyr: Remove NPCX dependency from shim/src/espi.cYuval Peress2021-07-227-6/+153
| | | | | | | | | | | | | | | | Allow building the zephyr/shim/src/espi.c for other SOCs by adding inline functions to abstract away these concepts. Each SOC should then implement these under the zephyr/shim/chip/<soc> specific directory. BRANCH=none BUG=b:189954415 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I776bd65326b509ada3b271177ae727a32d4f96da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044400 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* taeko: replace board name to "Taeko"stabilize-14106.B-mainamber.chen2021-07-2210-23/+23
| | | | | | | | | | | BUG=b:193377622 BRANCH=main TEST=make BOARD=taeko Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: Ic0fd57ed60ca6872adda3d626b2ca4012d840444 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3040938 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* ppc/nx20p348x: Initialize device control regCaveh Jalali2021-07-221-0/+5
| | | | | | | | | | | | | | | | This initializes the Device Control Register (0x0b) to its power-on reset value. This chip is not connected to the system reset signal, so we need to explicitly set registers to their power-on reset value so we start from the same configuration when we reboot as we do on system power on. BRANCH=none BUG=b:193211352 TEST=charging from another chromebook is reliable now Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I82ce3fd624091b89668a682cb8748af171552d72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044412
* ppc/nx20p348x: Disable VBUS discharge in sink modeCaveh Jalali2021-07-221-4/+26
| | | | | | | | | | | | | | | | | This explicitly disables VBUS discharge when entering sink mode. According to the vendor, keeping VBUS discharge enabled can cause some noise and that explains some of the instability we had observed when charging from another chromebook and 5V3A charger. BRANCH=none BUG=b:193211352 TEST=charging from another chromebook is reliable now Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I117dd3f7f9efddce00f903c2b290fa85c6052c5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044411 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* cappy2:initial ECwangganxiang2021-07-227-824/+259
| | | | | | | | | | | | | | | create Cappy2 BUG=b:191718716 BRANCH=Keeby TEST=make BOARD=cappy2 pass Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com> Change-Id: Id374b76eb020d429c5281ed6e9b7d1d7050c62d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3020642 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Homestar:LED:Modify the behavior of the LED to always be off in dischargingtongjian2021-07-221-15/+2
| | | | | | | | | | | | | BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on DVT board BRANCH=Trogdor Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I3063ca561726c9a33a1ecd1b5f69d96d94576f52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3043762 Reviewed-by: Wenchao Han <hanwenchao@huaqin.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* util: Add volteer relevant pathsAbe Levkoy2021-07-221-0/+15
| | | | | | | | | | | | | | | | List relevant commits when constructing volteer branch merge commit messages. BUG=none TEST=none BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ibac403353a40055798323b20a9333c757ec305c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044138 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org> Tested-by: Zhuohao Lee <zhuohao@chromium.org>
* flash_fp_mcu: Fix nocturne/nami kernelnextCraig Hesling2021-07-221-11/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nocturne and Nami are legacy kernel v4.4 devices. The spidev char device naming changed between their v4.4 and newer v5.4. Since these devices have a kernelnext build+tests, we need an alternative configuration that uses the new spidev name. This is achieved by allowing for specific alt configs that match the full platform name, like "nami-kernelnext". If a config is not provided for the full platform name, it will fallback to using the normal base config name, like "nami". BRANCH=none BUG=b:194004525 TEST=# Run the following commands on a nocturne, nocturne-kernelnext, # nami, nami-kernelnext, and hatch setups. # # Note, you get a kernelnext setup by flashing the base platform # device with an xbuddy line similar to # xbuddy://remote/nami-kernelnext/latest-dev/test scp util/flash_fp_mcu ${DUT_HOSTNAME}:/usr/local/bin/flash_fp_mcu ssh ${DUT_HOSTNAME} flash_fp_mcu --hello # Check that full platform name and base name was identified # correctly. # Check that it succeeded. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ib2ad991291639ef33799abb4bc3379c1659f754d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3035686 Reviewed-by: Jora Jacobi <jora@google.com>
* gimble: downspeed tcpc i2c speedScott Chao2021-07-221-1/+9
| | | | | | | | | | | BUG=b:194260437 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I6e5c34a5c2bc14316fa55c80c8c3de5140aa692e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034793 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* gimble: correct i2c port assignmentScott Chao2021-07-221-2/+2
| | | | | | | | | | | BUG=b:194260437 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Idfb2ae1391de15e20a8731d13a6f79a3da8c3e18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034792 Reviewed-by: caveh jalali <caveh@chromium.org>
* Guybrush: Enable CONFIG_BACKLIGHT_LIDDiana Z2021-07-211-0/+5
| | | | | | | | | | | | | | | | | Guybrush has the GPIO set up for backlight disable, but doesn't have the config set and so we're not compiling in the code to actually disable backlight on lid close. BRANCH=None BUG=b:194326578 TEST=on guybrush, open and boot to confirm backlight is on. Close with the system in S0 and confirm it goes off Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: If707525d9f4bb98a577f75e7017beae03638726c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044410 Reviewed-by: Rob Barnes <robbarnes@google.com> Commit-Queue: Rob Barnes <robbarnes@google.com>
* Guybrush: Add EC_ENTERING_RW signalDiana Z2021-07-212-1/+2
| | | | | | | | | | | | | | | | | Add this signal as it is present on more recent board versions. This should be fine on older board versions since it was a TP pin previously. BRANCH=None BUG=b:194320972 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I839027fecaac8d47992ae262f334c88c8a7311a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044406 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Commit-Queue: Rob Barnes <robbarnes@google.com> Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* guybrush: Use correct index for tmp112 SOCRob Barnes2021-07-213-3/+3
| | | | | | | | | | | | | | | This change fixes a bug where ADC_TEMP_SENSOR_SOC index was used in for the TMP112 SOC instead of TMP112_SOC BUG=b:176994331 BRANCH=None TEST=Check output of temps Change-Id: Ic27e38f5d4dfee3b270fe8490787575cf4cc7568 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3002883 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: herobrine: Switch to use BMI260 sensor driverWai-Hong Tam2021-07-213-13/+13
| | | | | | | | | | | | | Switch the base accel/gyro sensor from BMI160 to BMI260. BRANCH=None BUG=b:194194887 TEST=Built the herobrine_npcx9 image successfully. Change-Id: I459e58a76acc9a5c986f08de711c0227adca63c3 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042987 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: motionsense: Add default value of default-rangeWai-Hong Tam2021-07-214-0/+12
| | | | | | | | | | | | | | | | The default range is a chip-specific property. The same motionsense chip use the same setting and rarely changes. Add the value as the default property. So the project dts can neglect this property. Easy to switch chip without bothering to change this property. BRANCH=None BUG=b:194194887 TEST=Built the delbin and hayato images successfully. Change-Id: I856f0b93af67974f29800551f7da779b43facc55 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042986 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: motionsense: Add default value of i2c-spi-addr-flagsWai-Hong Tam2021-07-213-3/+3
| | | | | | | | | | | | | | | Make the property consistent across different sensors: * not required * default to a common I2C address BRANCH=None BUG=b:194194887 TEST=Built the delbin and hayato images successfully. Change-Id: I7784176e6d09e883b9ef957311aba610d3e69597 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042985 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: test: drivers: Move headers to include/ directoryYuval Peress2021-07-213-1/+1
| | | | | | | | | | | | | | Declutter the test directory and follow existing established pattern of src/ and include/ directories. BRANCH=none BUG=none TEST=zmake configure --test zephyr/test/drivers Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I5daf54a950d6fb830414da0b55a8d85732cffa4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3043364 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* it83xx: pwm: fix wrong index of pwm_channelsDino Li2021-07-211-3/+3
| | | | | | | | | | | | | BRANCH=none BUG=b:194047863 TEST=On spherion, no keyboard backlight blinking. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I847291268720bf12ca98b3e38e29a556ec038cd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3043075 Tested-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* common/build.mk: drop duplicate rules.Eric Yilun Lin2021-07-211-4/+0
| | | | | | | | | | | | | | | | The rule has been added in the Makefile.rules already. BUG=none TEST=make don't complain BRANCH=none Change-Id: I7af66c23ff8cad775e89330d5d1849a4aa91069e Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999361 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* storo: add 2nd accel source KX022mike2021-07-212-0/+43
| | | | | | | | | | | | | | | | | Add 2nd lid accel source KX022 BUG=b:188373186 BRANCH=dedede TEST=make BOARD=storo 1. Set CBI SSFC 0x11 and use command "ectool motionsense" for sensor kx022 2. test factory test pass Signed-off-by: mike <mike5@huaqin.corp-partner.google.com> Change-Id: Ibba58d53cf6fbfa35ba0c8e7fe73d4ebfdb9e7c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3037288 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* storo: remove base sensor of clamshell boardMike Lee2021-07-212-12/+48
| | | | | | | | | | | | | | | according to OEM request, we will remove base sensor for clamshell baord in DVT2 state. BUG=b:193314277 BRANCH=dedede TEST=make BOARD=storo pass, and test rework board OK. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: Iefc965f468529e48c521c600f3edd98fabb1cdff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3016494 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* herobrine_npcx9: Switch to use BMI260 sensor driverWai-Hong Tam2021-07-213-15/+15
| | | | | | | | | | | | | Switch the base accel/gyro sensor from BMI160 to BMI260. BRANCH=None BUG=b:194194887 TEST=Built the herobrine_npcx9 image successfully. Change-Id: I45b5ba072a787ae53f5f5158701dd61cb0c0410f Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3042984 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* cleanup: Fix Dynapack stringDevin Lu2021-07-2124-69/+69
| | | | | | | | | | | | | | | The naming string should be DYNAPACK. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I32f2498d4e51a83bd323d313a862622b6e69967d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038017 Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* redrix: Configure Motion SensorsDevin Lu2021-07-214-44/+33
| | | | | | | | | | | | | | | Regarding the lid accelerometer, change to Bosch BMA253 and remove the interrupt pin. And the base accelerometer changed to LSM6DSLU. BUG=b:193744971 BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I2db5f981e86217ce1cf8e207c40040493071f5d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3037286 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* redrix: Add FAN2 supportDevin Lu2021-07-214-48/+36
| | | | | | | | | | | BUG=b:193487913 BRANCH=none TEST=make BOARD=redrix Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I213e7f05783d784a138e908493fd1262e9b4fc3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023744 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* redrix: Add battery configurationDevin Lu2021-07-212-53/+20
| | | | | | | | | | | | | | | | [Simply copy from: https://crrev.com/c/1971511] Add Dynapack CosMX battery configuration. The battery was the same as Jinlon. BUG=b:190797341 BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I6aedb010c2d3300ee12ebe0b4be5d99c874aac9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023512 Reviewed-by: caveh jalali <caveh@chromium.org>
* redrix: Implement ledsDevin Lu2021-07-215-108/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply copy from: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/board/jinlon/led.c |1. Add some macro changes and change C0 charging led to left side.| |2. Add a LED task to replace the hook task.| 1. Redrix has the same design as Jinlon, there are two set charging leds on system (right side and left side), each side has two colors amber and white. 2. Redrix has a power led to indicate power state suspend/off. The led behavior define as following: 1. Charging led: led on with charging port active, other port is off. Charging: Amber. Discharging: Off. Battery Error: Blinking white (0.5 sec on, 0.5 sec off) Fuel < 10%: Blinking white on right side port (1 sec on, 1 sec off) Force idle for factory: Blinking amber (1 sec on, 1 sec off) 2. Power led: System is S0: White System is suspend/S0ix: Blinking white (1 sec on, 1 sec off) System is S5: Off BUG=b:193945754 BRANCH=none TEST=Cherry-picked this patch to Jinlon and Verified as following: make sure led behavior intended. make sure ectool led power white/off/auto work correctly. make sure ectool led left white/amber/off/auto work correctly. make sure ectool led right white/amber/off/auto work correctly. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: If05c9e2750ca3afcbcfaf51ce495d0f03d1fa756 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023511 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>