summaryrefslogtreecommitdiff
path: root/board/hammer
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-01-13 17:22:10 +0800
committerCommit Bot <commit-bot@chromium.org>2021-01-19 10:12:49 +0000
commit409116ad8d07b5607e2643350d42b2e5f239d2d0 (patch)
tree39cc3d488fa30280ce013be785999501d517b758 /board/hammer
parent06da8cbc7593528981c14ae23dd4b2748bd66b89 (diff)
downloadchrome-ec-409116ad8d07b5607e2643350d42b2e5f239d2d0.tar.gz
touchpad_updater: implement 512 byte transfer
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>
Diffstat (limited to 'board/hammer')
-rw-r--r--board/hammer/board.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h
index 15928b7ca4..d9e4236481 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -91,8 +91,8 @@
#define CONFIG_USB_UPDATE
#undef CONFIG_UPDATE_PDU_SIZE
-#ifdef BOARD_WAND
-/* Wand does not have enough space to fit 4k PDU. */
+#if defined(BOARD_WAND) || defined(BOARD_ZED)
+/* Wand/Zed does not have enough space to fit 4k PDU. */
#define CONFIG_UPDATE_PDU_SIZE 2048
#else
#define CONFIG_UPDATE_PDU_SIZE 4096
@@ -175,7 +175,12 @@
* buffer size have to be power of two.
*/
#undef CONFIG_USB_I2C_MAX_WRITE_COUNT
+#ifdef BOARD_ZED
+/* Zed requires 516 byte per packet for touchpad update */
+#define CONFIG_USB_I2C_MAX_WRITE_COUNT (1024 - 4) /* 4 is maximum header size */
+#else
#define CONFIG_USB_I2C_MAX_WRITE_COUNT (128 - 4) /* 4 is maximum header size */
+#endif
#undef CONFIG_USB_I2C_MAX_READ_COUNT
#define CONFIG_USB_I2C_MAX_READ_COUNT (1024 - 6) /* 6 is maximum header size */