summaryrefslogtreecommitdiff
path: root/extra/touchpad_updater
Commit message (Collapse)AuthorAgeFilesLines
* fix ChromiumOS authors and whitespace warningsMary Ruthven2022-09-132-2/+2
| | | | | | | | | | | BUG=none TEST=none Change-Id: I61b0b0106a43f723ec3bc805eb190aef00bbd05b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3894391 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* extra/touchpad_updater: Various fixups (cross-compile, new chip)Nicolas Boichat2019-11-152-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a few issues in touchpad_updater, that is used only for early bringup by Elan: - Fix Makefile to correctly cross-compile - Add support for 0x10 IC - Improve debugging - Remove manual fragmentation of USB bulk packets (this is not required and actually breaks large transactions) - Add timeout to libusb_bulk_transfer calls. BRANCH=kukui BUG=b:142333653 TEST=emerge-kukui -v ec-devutils && \ scp /build/kukui/usr/sbin/ec_touchpad_updater $IP:/usr/local/sbin Ping-pong between 2 images: ec_touchpad_updater -p 0x503c -f S8648A-15H0_FW01.bin ec_touchpad_updater -p 0x503c -f S8648A-15H0_FWB1.bin Change-Id: I78a8064002504ba4db15e202e516e7a2399bf648 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1906393 Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
* i2c: support large reading in i2c_xfer()Chun-Ta Lin2017-12-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There might be more than one place that will use very similar codes in CL:542716 (usb_i2c.c). To avoid unnecessary duplication of code, we fold the logic into i2c_xfer(). With config enabled (illustrated in this CL), i2c_xfer() will support large reading. An early prototype of potential usage is demostrated in CL:781300. BRANCH=none TEST=For CONFIG_I2C_XFER_LARGE_READ: With proprietary software on slave: ./touchpad_updater -d TEST=For usb_i2c regression: ./touchpad_updater still works (where the reading is less than 255) TEST=For generic EC regression test: On poppy EC (With CONFIG_I2C_XFER_LARGE_READ defined) (1) Prevent override of update /usr/share/vboot/bin/set_gbb_flags.sh 0xa39 (2) flashrom -p ec -w ec_binary_contains_this_CL.bin (3) ectool reboot_ec cold (4) "ectool version" verified that both RO/RW/Build info is local. (5) Test with a type-C DP dongle on DELL 2408WFP. (6) Plug-in type-C charger and external display still works. (7) Confirmed that battery is charging. (7) "ectool battery" reads same data (for fixed field) as before. (8) "ectool usbpdpower", confirmed charger info displayed as before. (9) "ectool usbpd 0", confirmed content exactly as before. (10) For Gyro. Verify under Arc++ Using App: com.gamma.bubblelevel, works the same as before. (11) For Accelerometers. Verify under Arc++ Using App: com.innoventions.sensorkinetics, small movement's charts looks as expected. TEST=For generic EC regression test: On Caroline EC (Without CONFIG_I2C_XFER_LARGE_READ defined). Details in CL:810332 BUG=b:63993891 Change-Id: I654868945fa535e784800177d54eb2d9803f5249 Signed-off-by: Chun-Ta Lin <itspeter@google.com> Reviewed-on: https://chromium-review.googlesource.com/788479 Commit-Ready: Chun-ta Lin <itspeter@chromium.org> Tested-by: Chun-ta Lin <itspeter@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* hammer: enable large block reading on usb i2c passthru.Chun-Ta Lin2017-11-241-15/+58
| | | | | | | | | | | | | | | | | | | | | | | | Originally, i2c passthru is limited to use I2C_XFER_SINGLE flag where it can only read at most 255 bytes at a time. For application that requires larger i2c bus reading, we change the flag setting and the command protocol. TEST=old ./touchpad_updater still works (previous protocol) TEST=new ./touchpad_updater can get more than 500 bytes per transaction TEST=Debug message only print when -d assigned. ./touchpad_updater -d TEST=Manually change #define CONFIG_USB_I2C_MAX_READ_COUNT (1024 - 6) to #define CONFIG_USB_I2C_MAX_READ_COUNT (1024 - 4) and trigger POWER_OF_TWO assertion. BRANCH=none BUG=b:35587174, b:63993891 Change-Id: Id75b11ea49ba89bab8e18af24d47219030c778c5 Signed-off-by: Chun-Ta Lin <itspeter@google.com> Reviewed-on: https://chromium-review.googlesource.com/542716 Commit-Ready: Chun-ta Lin <itspeter@chromium.org> Tested-by: Chun-ta Lin <itspeter@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* Hammer : Add multi-ic support in touchpad_updaterKT Liao2017-08-311-11/+44
| | | | | | | | | | | | | | | | | | | | Elan has shipped other AVL IC in Chromebook recently. And it will support hammer project "charger" Original code use constant definition for FW page count. Unfortunatlly new IC's page count is different. I add a code to judge IC first, and then get the correct page count before FW updating Signed-off-by: KT Liao <kt.liao@emc.com.tw> BRANCH=none BUG=None TEST=Execute fw updating in hammer system Change-Id: Ibdd9f7c0b61118950d8e751b7bbaaefeaaa3fb27 Reviewed-on: https://chromium-review.googlesource.com/620451 Commit-Ready: Chun-ta Lin <itspeter@chromium.org> Tested-by: KT Liao <kt.liao@emc.com.tw> Reviewed-by: Chun-ta Lin <itspeter@chromium.org>
* hammer: prepare and update the trackpad firmwareChun-Ta Lin2017-06-221-22/+168
| | | | | | | | | | | | | | | Implement the necessary bits for updating the trackpad firmware over I2C, primarily following the protocol from open source driver. BRANCH=none BUG=b:35587174 TEST=Manually update firmware and confirmed reported FW version changed. Change-Id: Ice5098269803f524de0b6a853f5a98f28382a7fb Reviewed-on: https://chromium-review.googlesource.com/532765 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Chun-ta Lin <itspeter@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* hammer: initial commit for trackpad firmware updaterChun-Ta Lin2017-06-092-0/+426
Tool to update the trackpad firmware over USB. Primarily borrowed from extra/usb_console/usb_console.c BRANCH=none BUG=b:35587174 TEST=Manually executed with hammer Change-Id: Icad951d2478a3e231f293e11fb461eaae20e5042 Reviewed-on: https://chromium-review.googlesource.com/525192 Commit-Ready: Chun-ta Lin <itspeter@chromium.org> Tested-by: Chun-ta Lin <itspeter@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>