启动 log 是这样的:
[ 1.104468] i2c /dev entries driver
[ 1.228881] Goodix-TS 0-0014: ID 911, version: 1060
[ 1.234417] Goodix-TS 0-0014: Direct firmware load for goodix_911_cfg.bin failed with error -2
我的显示屏分辨率是 1024*600,
所以我想把触摸长宽也跳到这个分辨率.
据说是要在文件系统建立 /lib/firmware/goodix_911_cfg.bin, 驱动启动的时候加载这个触摸固件,
但是网上无论如何都没有搜索到这个固件,
这个是厂家提供的吗?我应该找谁要?
离线
离线
https://patchwork.kernel.org/patch/6915171/
On the host:
- modify some fields from goodix_911_cfg (e.g. change resolution of
x/y axes, maximum reported touch points, switch X,Y axes). For more
details check datasheet for format of Configuration Registers.
- run tools/touch-goodix-generate-fw.sh on the modified script to
obtain a valid config (it needs to recompute the checksum, set
Config_Fresh to 1 and generate the binary config firmware image):
$ ./tools/touch-goodix-generate-fw.sh goodix_911_cfg
- copy goodix_911_cfg.bin on the target in /lib/firmware
- when the goodix driver is initialized it will read the new config
firmware from /lib/firmware/goodix_911_cfg.bin and write it to the
device
- check that the new firmware was actually written to the device by
reading the config again on the target from
/sys/class/input/input4/device/dump_config. Also check that Config_Fresh
has been reset to 0. You can also check if the functionality changed
in the config has actually changed (reported resolution for x/y has
changed, x,y axis are switched, etc.)
diff --git a/tools/touch-goodix-generate-fw.sh b/tools/touch-goodix-generate-fw.sh
new file mode 100755
index 0000000..0efe2e1
--- /dev/null
+++ b/tools/touch-goodix-generate-fw.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+if [[ $# -lt 1 ]]; then
+ echo "$0 fw_filename"
+ exit 1
+fi
+
+file_in="$1"
+file_out_bin=${file_in}.bin
+
+print_val ()
+{
+ val="$1"
+ printf "0x%.2x" "$val" | xxd -r -p >> ${file_out_bin}
+}
+
+rm -f ${file_out_bin}
+
+size=`cat ${file_in} | wc -w`
+
+checksum=0
+i=1
+for val in `cat ${file_in}`; do
+ val="0x$val"
+ if [[ $i == $size ]]; then
+ # Config_Fresh
+ print_val 0x01
+ elif [[ $i == $((size-1)) ]]; then
+ # Config_Chksum
+ checksum=$(( (~ checksum + 1) & 0xFF))
+ print_val $checksum
+ else
+ checksum=$((checksum + val))
+ print_val $val
+ fi
+ i=$((i+1))
+done
+
+echo "Wrote ${file_out_bin}"
离线
加载固件是通用的做法,还有种简单的方法是买汇顶的产测工具,直接固化参数,不用加载固件了
请问哪里下载固件,哪里下载量产工具呢?
离线
要淘宝上的买啊,有了产测工具,你想用固件就用固件,想固化就固化
你的淘宝店有吗?
离线
没得,直接上淘宝搜汇顶产测工具
谢谢,我这就去淘宝搜搜
离线