summaryrefslogtreecommitdiff
path: root/board/hammer
Commit message (Collapse)AuthorAgeFilesLines
* hammer: Enable eel GMR functionSiyu Qin2021-09-071-1/+2
| | | | | | | | | | | | | | | Add eel to variants to enable GMR sensor for tablet mode function. BUG=b:199033321 TEST=make BRANCH=trogdor Signed-off-by: Siyu Qin <qinsiyu@huaqin.corp-partner.google.com> Change-Id: I5aeea9ec67f9f28b9e823876cf89a2dc8998f114 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3143406 Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* eel: initial commitTing Shen2021-08-112-1/+14
| | | | | | | | | | | | | | | | | Eel is the detachable keyboard (Hammer derivative) for Wormdingler project. BUG=b:195625351 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I01449f0058c857e52d5b40e7fb69d9474e3b18b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3084326 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* bland: add MICMUTE keyTing Shen2021-08-091-5/+1
| | | | | | | | | | | | | BUG=b:194460146 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I58aac61fab5c9b09623b98214dd8d9d9ee25c7c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073441 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* bland: initial commitTing Shen2021-08-022-0/+36
| | | | | | | | | | | | | | | Bland is the detachable keyboard (Hammer derivative) for MrBland project. BUG=b:194460146 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I6c315cca6856afca175ce864ece025222b1a2d69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3062678 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* keyboard: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-232-4/+2
| | | | | | | | | | | | | | | | | 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>
* star: update touchpad dimensionTing Shen2021-07-131-4/+2
| | | | | | | | | | | | | BUG=b:192912723 TEST=no "[1.305775 *** TP mismatch!]" when boot BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I131d87531a2c220ad2ae78dab1074e0e4d01c26a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3013017 Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* stm32: rename CONFIG_STM32_SPI1_MASTER to …CONTROLLERHarry Cutts2021-06-251-2/+2
| | | | | | | | | | | | | In line with OSHWA terminology. BUG=b:181607131 TEST=make -j BOARD=hammer BRANCH=none Change-Id: I6d212e60d5aceb8497f00520b693006cc1af2d45 Signed-off-by: Harry Cutts <hcutts@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2981123 Reviewed-by: caveh jalali <caveh@chromium.org>
* star: set up vivaldi keyboard layoutxuxinxiong2021-06-242-1/+4
| | | | | | | | | | | | | | This CL implements vivaldi function row config for star keyboard. BUG=b:191442721 BRANCH=Trogdor TEST=Make sure that all top row keys work correctly. Change-Id: I1683040c0bff48fc622ba5cfa649d2c0bef3f999 Signed-off-by: xuxinxiong <xuxinxiong@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2982281 Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* star: update touchpad logic dimensionTing Shen2021-06-161-2/+2
| | | | | | | | | | | | | | | BUG=b:190577105 TEST=none BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Id5ebb95dcabc91ccee2633f86a2694ad9289ecee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2965788 Tested-by: Xinxiong Xu <xuxinxiong@huaqin.corp-partner.google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* star: update touchpad fw size configTing Shen2021-06-091-1/+1
| | | | | | | | | | | | | | BUG=b:190577105 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1804aecd01459f9cb45dfba8fc99dab950a0db58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2948111 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* COIL: Rename MODULE_SPI_MASTER to MODULE_SPI_CONTROLLERCaveh Jalali2021-06-032-2/+2
| | | | | | | | | | | | | | | | This renames the MODULE_SPI_MASTER to MODULE_SPI_CONTROLLER. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I4d33f57fd82c5b57f111c12387113dc82cebe60b Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932466 Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Harry Cutts <hcutts@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* COIL: Rename CONFIG_SPI_MASTER to CONFIG_SPI_CONTROLLERCaveh Jalali2021-06-031-1/+1
| | | | | | | | | | | | | | | | This replaces the CONFIG_SPI_MASTERR config option with CONFIG_SPI_CONTROLLER. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I3c921085179294765baadf7074652978fe04a4ed Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932465 Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* zed: update touchpad parameterTing Shen2021-04-152-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update touchpad parameter for zed. There's no integer solution for CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y (calculation appended below), this CL also modified the runtime check in elan tp driver to allow rounding errors. Math details: Given dpi_y = 800, LOGICAL_MAX_Y = 1811, we want to find an integer PHYSICAL_MAX_Y such that dpi == 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y. The closest solution is 1) PHYSICAL_MAX_Y = 574, 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y = 801.3832 != dpi_y, or 2) PHYSICAL_MAX_Y = 575, 254 * LOGICAL_MAX_Y / PHYSICAL_MAX_Y = 799.9895 != dpi_y Both cannot pass our runtime verification. BUG=None TEST=No "TP mismatch" in ec console BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I9d0c54d029bb2f9e78114341a6246857b41937b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2825473 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* star: initial commitTing Shen2021-04-091-0/+11
| | | | | | | | | | | | | | | | Create initial commit for Homestar keyboard. BUG=b:183899273 BRANCH=trogdor TEST=bootable on Coachz/Zed Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ibed73189bd518b54e0205fe24255a4c3a0ae84fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816304 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* hammer: Add don boardShou-Chieh Hsu2021-03-051-2/+12
| | | | | | | | | | | | | | | | A close hammer derivative. BRANCH=kukui BUG=b:176570185 TEST=make BOARD=don Signed-off-by: Shou-Chieh Hsu <shouchieh@google.com> Change-Id: I8e3005ac07df1bb2dc6ef519a806fb093a1f7656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2735214 Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Shou-Chieh Hsu <shouchieh@chromium.org> Tested-by: Shou-Chieh Hsu <shouchieh@chromium.org>
* spi: Pass in spi_device as argument to spi_enable instead of portTom Hughes2021-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | Rather than passing in the port and iterating over the global spi_devices variable, pass in the specific spi_device that is being enabled/disabled. The spi_device_t struct has the port. This change makes the functions in spi.h more consistent since they now all take a spi_device_t*. This change is the first step in making the SPI configuration more dynamic. BRANCH=none BUG=b:177908650 TEST=git grep 'spi_enable(CONFIG' => no results TEST=make buildall TEST=Flash dragonclaw v0.2 and view console to verify FP sensor ID Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I64124e0ebcf898e88496acb77703b5f59ae931c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654081 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* touchpad_updater: implement 512 byte transferTing Shen2021-01-191-2/+7
| | | | | | | | | | | | | | | | | | | Migrate the touchpad probe/update logic from CL:2551939 to touchpad_updater. Also adjust the memory allocation on Zed to allow 512 byte packet. BUG=b:177250972 TEST=On coachz, update detachable fw and run `ec_touchpad_updater -p 504c -f 282.0_2.bin` BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Icc7cec1f500dca04d6cdec5b66c10bcce05b67bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637304 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTESYuval Peress2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used throughout. The issue is that the units don't match. In Zephyr the value is in KiB instead of bytes. This refactor simply renames CONFIG_FLASH_SIZE in platform/ec to include the unit (via _BYTES). BRANCH=none BUG=b:174873770 TEST=make buildall be generated by the build instead of per board Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* hammer: Fix moonball touchpad settingsChen-Tsung Hsieh2021-01-121-4/+4
| | | | | | | | | | | | | | Fix the dimensions to pass firmware test. BRANCH=kukui BUG=b:150335030 TEST=emerge-kukui chromeos-ec Change-Id: I10d186c01135afa9d6ec9bb9f437e1a57501a874 Signed-off-by: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2624367 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* COIL: Rename EC-EC comm config to be inclusiveDossym Nurmukhanov2020-12-121-1/+1
| | | | | | | | | | | | | Use server/client nomenclature instead BUG=none TEST=build and run on volteer BRANCH=none Signed-off-by: dossym@chromium.org Change-Id: I2cf4a82291134378ed21bbc068361f1be25e8176 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2587574 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* COIL: Use inclusive language for EC-EC communication codeDossym Nurmukhanov2020-12-122-9/+9
| | | | | | | | | | | | | Replace with server/client nomenclature BUG=none TEST=build and run on volteer BRANCH=none Signed-off-by: dossym@chromium.org Change-Id: I23fe7de9228a9611b49eef1362bf15159b25aab7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586038 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* COIL: Rename ec_ec_comm* files to inclusive languageDossym Nurmukhanov2020-12-121-1/+1
| | | | | | | | | | | | | Rename the files to server/client instead BUG=none TEST=Rebuild and run on volteer BRANCH=none Signed-off-by: dossym@chromium.org Change-Id: Ibcbdcddfab1b878ff48fc4cb76307efe6de4fac0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2586037 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* zed: update pidTing Shen2020-12-091-2/+1
| | | | | | | | | | | | | | | Update PID to the allocated one in cl/343451328. BUG=b:169651794 TEST=make BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I1135a62dbc3487b56549fe97661ca51ddbe052fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581030 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* usb_hid_keyboard: implement vivaldi top row featureTing Shen2020-11-271-0/+2
| | | | | | | | | | | | | | | | | | This CL implements a feature report defined in [1] that describes the keyboard's top row layout. [1] http://doc/1NTxSGv3WA2Vn4dlPLOcvKBvPytWOF0UAcIYQaFctTug BUG=b:171156337 TEST=Verify feature report content using test code in CL:2530156. BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I28a93f1b926d58602eb66d1b090e89384cb09f77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2522641 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* touchpad_elan: add support for CoachZ touchpadTing Shen2020-11-181-1/+1
| | | | | | | | | | | | | | | | Port probe / update logic from linux driver code (drivers/input/mouse/elan_i2c_i2c.c), and support different page size. BUG=b:169651794 TEST=flash fw successfully on Zed. BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I2aa7316219d235e28e446de13b0d24fe3c6dac15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537415 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* i2c_master: extend i2c_xfer_no_retry to also support large writestabilize-13605.B-masterTing Shen2020-11-171-1/+1
| | | | | | | | | | | | | | | | | This CL extends CONFIG_I2C_XFER_LARGE_READ to also support large (greater than 255 bytes) write. Related config name is also updated to reflect the behavior change, BUG=b:169651794 TEST=flash fw successfully on Zed. BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Icb889013da01f48708cd0227207561b8186bac63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537412 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* hammer: support vivaldi keyboardTing Shen2020-11-102-0/+27
| | | | | | | | | | | | | | | | | | | | This CL implements vivald function row config for hammer keyboard. If CONFIG_USB_HID_KEYBOARD_VIVALDI defined, STM32 HID keyboard now returns an extra 32-bit data represents the status of action keys. Additionally, if board_vivaldi_keybd_config returns a non-null pointer, driver will convert function keys to action key according to the given config. BUG=b:171156337 TEST=verify keycode is correct in `evtest` BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ide3289fd2c1bb8859a74e97134e6113441cfb967 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508848 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-051-1/+1
| | | | | | | | | | | | | Rename CONFIG_I2C_CONTROLLER and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zed: initial commitTing Shen2020-09-291-0/+12
| | | | | | | | | | | | | BUG=b:167884598 TEST=make BOARD=zed BRANCH=master Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I0b3542bff38756c07e5073672f0d485cd6a9d0c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428444 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* hammer: Add touchpad support for moonballChen-Tsung Hsieh2020-07-151-1/+7
| | | | | | | | | | | | | | | | | BRANCH=kukui BUG=b:150268720, b:151098124 TEST=make BOARD=moonball Flash into moonball, see the board boot: util/flash_ec --image /build/kukui/firmware/moonball/ec.bin Cq-Depend: chrome-internal:2743654 Signed-off-by: Chen-Tsung Hsieh <chentsung@google.com> Change-Id: I64d28a3c65977c6dd5307d86c6c20f728e785f82 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2102837 Tested-by: Chen-Tsung Hsieh <chentsung@chromium.org> Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* Charger: Add dynamic charger chip countDiana Z2020-07-111-1/+0
| | | | | | | | | | | | | | | | Different DB options may cause different numbers of charger chips to be present on the system. Remove constant count for charger chips, and instead always call into the overridable function to query the count. BRANCH=None BUG=b:155963446 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0e65b8af351ecabe6f7b823e0e56f1932cc280a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277833 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* hammer: Add moonball boardChen-Tsung Hsieh2020-03-161-1/+6
| | | | | | | | | | | | | | | | | A close hammer derivative. BRANCH=kukui BUG=b:150268720, b:151098124 TEST=make BOARD=moonball Flash into masterball, see the board boot: util/flash_ec --image /build/kukui/firmware/moonball/ec.bin Signed-off-by: Chen-Tsung Hsieh <chentsung@google.com> Change-Id: I015ea6ecaa76505df611935e7b81f819f9b9bbce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2094861 Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org> Tested-by: Chen-Tsung Hsieh <chentsung@chromium.org> Commit-Queue: Chen-Tsung Hsieh <chentsung@chromium.org>
* Charger: Convert boards to use new driver structureDiana Z2020-02-041-0/+14
| | | | | | | | | | | | | | | This commit removes the temporary common charger chip configuration and instead puts the configuration in each board. BRANCH=none BUG=b:147672225 TEST=builds, runs on waddledoo and octopus Change-Id: If81aef31e48c65999a87e202494f286716114bbb Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2031855 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* spi: add flags to spi configurationJett Rink2020-01-291-1/+1
| | | | | | | | | | | | | | | | Add flags field to stm and g chip usb spi configuration. This is unused for g chip, but added for consistency. BRANCH=none BUG=b:147353903 TEST=builds Change-Id: Ie2aa88ae09e8f6f4049ba13fe4565901c604b92c Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1995603 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Brian Nemec <bnemec@chromium.org>
* hatch_fp/nocturne_fp: Specify RSA_KEY_SIZE in RW and ROTom Hughes2020-01-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The rsa.h header can be included by any file, regardless of whether CONFIG_RSA is enabled. In that case we still want RSA_KEY_SIZE and CONFIG_RSA_EXPONENT_3 to be correct for the board. The following boards already set CONFIG_RSA_KEY_SIZE outside of RO/RW * kalista * endeavour * fizz * puff BRANCH=none BUG=b:144958737 TEST=make buildall -j TEST=diff build/<hatch_fp,nocturne_fp,hammeri,nucleo-h743zi>/ec.bin with and without the change => same Change-Id: I7e565e25b06b0d36e28ae32934b1f65b382e5b66 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1999606 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* board/hammer: Fix masterball touchpad settingsNicolas Boichat2019-10-181-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the dimensions, and also the size, and make sure that updating the FW actually works (it seems like increasing the timeout to 2000ms is needed). BRANCH=kukui BUG=b:140596094 TEST=Flash masterball, no warning in console on start TEST= Host: make TOUCHPAD_FW=S8648A-15H0_FW01.bin BOARD=masterball -j USE=updater_utils emerge-kukui -av ec-utils cros deploy $IP ec-utils DUT: usb_updater2 -d 18d1:503c -r; sleep 0.5; \ usb_updater2 -d 18d1:503c -s; usb_updater2 -d 18d1:503c ec.bin usb_updater2 -d 18d1:503c -p S8648A-15H0_FW01.bin Change-Id: Ia473ac420b42f52ad1639f950a3f08ff5d32df09 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1847512 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
* board/hammer: Add variant with backlight totally disabledNicolas Boichat2019-10-024-25/+34
| | | | | | | | | | | | | | | | | | | Some boards lack the external pull-up to indicate absence of keyboard backlight, so add a new HAS_BACKLIGHT define. Also, remove support for long deprecated early staff boards, and move backlight detection to RW only. BRANCH=none BUG=b:67722756 BUG=b:140596094 TEST=make BOARD=masterball -j Change-Id: I20d83ec9df64e2b00eed2ca540e4d302bbbee4d1 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1833034 Reviewed-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
* hammer: Finish renaming CONFIG_HALL_SENSOR to CONFIG_GMR_TABLET_MODENicolas Boichat2019-10-022-3/+3
| | | | | | | | | | | | | | | | 0beadf2ff "tablet_mode: Renaming for GMR sensor" missed part of the config name update (probably because the refactoring happened at the same time as the changes in hammer folder). BUG=b:139378190 BRANCH=none TEST=make buildall Change-Id: Ibb92cf12a2177630d31ad6a887cad6aa6f403b71 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1830540 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Philip Chen <philipchen@chromium.org>
* hammer: Use different KB scanning matrix for masterballNicolas Boichat2019-09-301-0/+26
| | | | | | | | | | | | | | ODM/OEM decided to change pinout. BRANCH=none BUG=b:140596094 TEST=make BOARD=masterball TEST=Check that there is not interrupt conflict in gpio.inc Change-Id: I45adaf77faecfb4fb99122abe146691c9c77098b Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1830539 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* tablet_mode: Renaming for GMR sensorPhilip Chen2019-09-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GMR sensors can be used to (1) detect clamshell/tablet mode (2) detect lid open/closed But hall sensors can only do (2). Therefore the naming related to "hall sensor" for tablet mode application is incorrect. This patch performs the following renaming to better reflect the reality: config: CONFIG_HALL_SENSOR -> CONFIG_GMR_TABLET_MODE CONFIG_HALL_SENSOR_CUSTOM -> CONFIG_GMR_TABLET_MODE_CUSTOM CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR -> CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR GPIO: HALL_SENSOR_GPIO_L -> GMR_TABLET_MODE_GPIO_L functions: hall_sensor_disable() -> gmr_tablet_switch_disable() hall_sensor_isr() -> gmr_tablet_switch_isr() hall_sensor_int() -> gmr_tablet_switch_init() variable: hall_sensor_at_360 -> gmr_sensor_at_360 BUG=b:139378190 BRANCH=none TEST=make buildall Change-Id: I28393d056ddd128d8ffafc16a1f9fefee5455ccc Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1757275 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* config: Merge CONFIG_CHARGER_V2 into CONFIG_CHARGERKeith Short2019-09-181-1/+0
| | | | | | | | | | | | | | | | For all boards that defined CONFIG_CHARGER, CONFIG_CHARGER_V2 is also defined. Remove references to CONFIG_CHARGER_V2 from board header files. Replace CONFIG_CHARGER_V2 in common C modules with CONFIG_CHARGER when appropriate. BUG=b:139699769 BRANCH=none TEST=make buildall -j Change-Id: I6b54baf4ad2406bbed629b6b272dad9ea6a81280 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1789420 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* hammer: Add magnemite boardNicolas Boichat2019-08-165-1/+34
| | | | | | | | | | | | | | | A close hammer derivative. BRANCH=none BUG=b:138968914 TEST=make BOARD=magnemite -j Flash into staff, see the board boot: util/flash_ec --board=magnemite --port=9000 Change-Id: Ibe5c3f4b0fb4a31d4667d5dc4d76a691b0e64e39 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741599 Reviewed-by: Yilun Lin <yllin@chromium.org>
* hammer: Add masterball boardNicolas Boichat2019-08-121-1/+12
| | | | | | | | | | | | | | | | A close hammer derivative. BRANCH=none BUG=b:138968914 TEST=make BOARD=masterball -j Flash into staff, see the board boot: util/flash_ec --board=masterball --port=9000 Change-Id: I9f8d897c23d0f53557c6d6789c33e5b776dca982 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741589 Reviewed-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
* hammer: Refactor config options to support more variantsNicolas Boichat2019-08-125-69/+108
| | | | | | | | | | | | | | | | | board.h is already quite difficult to read, and will become worse as we add more and more derivatives, let's refactor most of the variations into variants.h. BRANCH=none BUG=b:138968914 TEST=make buildall -j, see that there is no size change before and after the change. Change-Id: Ideb381d8d04c65c3e76eb3ab9353e1ce5cdee954 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1746352 Reviewed-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Yilun Lin <yllin@chromium.org>
* Remove __7b, __8b and __7bfDenis Brockus2019-07-201-1/+1
| | | | | | | | | | | | | | | | | | | The extentions were added to make the compiler perform most of the verification that the conversion was being done correctly to remove 8bit addressing as the standard I2C/SPI address type. Now that the compiler has verified the code, the extra extentions are being removed BUG=chromium:971296 BRANCH=none TEST=make buildall -j TEST=verify sensor functionality on arcada_ish Change-Id: I36894f8bb9daefb5b31b5e91577708f6f9af2a4f Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704792 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Use 7bit I2C/SPI slave addresses in ECDenis Brockus2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt for 7bit slave addresses in EC code. If 8bit is expected by a driver, make it local and show this in the naming. Use __7b, __7bf and __8b as name extensions for i2c/spi addresses used in the EC codebase. __7b indicates a 7bit address by itself. __7bf indicates a 7bit address with optional flags attached. __8b indicates a 8bit address by itself. Allow space for 10bit addresses, even though this is not currently being used by any of our attached devices. These extensions are for verification purposes only and will be removed in the last pass of this ticket. I want to make sure the variable names reflect the type to help eliminate future 7/8/7-flags confusion. BUG=chromium:971296 BRANCH=none TEST=make buildall -j Change-Id: I2fc3d1b52ce76184492b2aaff3060f486ca45f45 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699893 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* common: board_[read/write]_serial weak reference cleanupDenis Brockus2019-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | board_read_serial and board_write_serial were prototyped as weak and this made all instances, that included that prototype, weak as well. In order to not lose information from the prototype, default and override functions, I changed to use the override weak marker symbols. These functions defaulted for specific configurations as different functionality and used an #ifdef tree to do this. I made these a single definition for each function and used IS_ENABLED instead of the #ifdef tree. I also added a definition for the case that the configuration would not have produced a function. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Ie41c53f3a17d665358e46eefd3ded3066ee80a7d Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1631583 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* ec.tasklist: Consolidate duplicate commentsDaisuke Nojiri2019-04-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | | It's simply a bad idea to describe a macro in multiple locations. It'll make it hard to change. It'll be difficult to keep all locations in sync. This patch replaces the comment duplicated in all ec.tasklist with a pointer to the CONFIG_TASK_LIST definition. The macro will be described in a single place (just like all/most other macros). Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=buildall Change-Id: Id658b9d68e742e4334c692b804d9c98c8de21313 Reviewed-on: https://chromium-review.googlesource.com/1551579 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* common: replace 1 << digits, with BIT(digits)Gwendal Grignou2019-03-261-2/+2
| | | | | | | | | | | | | | | | Requested for linux integration, use BIT instead of 1 << First step replace bit operation with operand containing only digits. Fix an error in motion_lid try to set bit 31 of a signed integer. BUG=None BRANCH=None TEST=compile Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* tablet_mode: Introduce hall sensor specific handlingFurquan Shaikh2018-11-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change performs the following renaming: 1. CONFIG_TABLET_SWITCH -> CONFIG_HALL_SENSOR Indicates if a device has hall sensor 2. TABLET_MODE_GPIO_L -> HALL_SENSOR_GPIO_L Provides the interrupt line from hall sensor to EC. 3. tablet_mode_isr -> hall_sensor_isr Interrupt routine that gets control on hall sensor interrupt. 4. tablet_mode_init -> hall_sensor_init Init routine for initializing hall sensor interrupt. 5. tablet_switch_disable -> hall_sensor_disable Disable hall sensor interrupt and tablet mode sub-system. This is done to separate hall sensor interrupt from tablet mode handling. It is another step towards aligning tablet mode detection on EC with Chrome. Hall sensor interrupt occurs when the lid is in 360-degree flipped mode. If tablet mode is not already triggered by lid motion driver, then hall_sensor_isr will set tablet mode and take necessary actions to disable input peripherals. CQ-DEPEND=CL:1351518 BUG=b:120050761 BRANCH=octopus TEST=make -j buildall Change-Id: I5841f6875d538a624cb888bc048f252397ab457c Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1350469 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>