Initial commit: Linux kernel 4.19 for Unplugged OS

This commit is contained in:
ziv committed 2025-10-06 13:52:42 +00:00
commit d30235b04c
80519 files changed
+35800681

No files matched your search

@@ -0,0 +1,47 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
u8 GT9110P_4020_V1_GROUP0[] = {
0x00, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x35, 0x30, 0x01, 0xC8, 0x32, 0x08,
0x6E, 0x5A, 0x03, 0x04, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x11, 0x00, 0x18,
0x1A, 0x1D, 0x14, 0x95, 0x35, 0xFF, 0x26, 0x28, 0x31, 0x0D, 0x00, 0x00,
0x00, 0x21, 0x03, 0x2C, 0x15, 0x16, 0x18, 0x00, 0x01, 0x03, 0x46, 0x46,
0x2B, 0x4C, 0x10, 0x17, 0x36, 0x94, 0xC5, 0x02, 0x08, 0x00, 0x00, 0x00,
0xA6, 0x19, 0x00, 0x96, 0x1D, 0x88, 0x86, 0x23, 0x00, 0x7A, 0x29, 0x00,
0x70, 0x31, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x48, 0xFB,
0x00, 0x20, 0x00, 0x00, 0x5D, 0x0A, 0x00, 0x88, 0x43, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x1D,
0x08, 0x07, 0x1C, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11,
0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01,
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
0x1B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20,
0x1F, 0x1E, 0x1D, 0x1C, 0xD1, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 GT9110P_4020_V1_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 GT9110P_4020_V1_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 GT9110P_4020_V1_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 GT9110P_4020_V1_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 GT9110P_4020_V1_GROUP5[] = {0};
struct ctp_cfg GT9110P_4020_V1_CFG = {
.lens = {CFG_GROUP_LEN(GT9110P_4020_V1_GROUP0),
CFG_GROUP_LEN(GT9110P_4020_V1_GROUP1),
CFG_GROUP_LEN(GT9110P_4020_V1_GROUP2),
CFG_GROUP_LEN(GT9110P_4020_V1_GROUP3),
CFG_GROUP_LEN(GT9110P_4020_V1_GROUP4),
CFG_GROUP_LEN(GT9110P_4020_V1_GROUP5)},
.info = {GT9110P_4020_V1_GROUP0, GT9110P_4020_V1_GROUP1,
GT9110P_4020_V1_GROUP2, GT9110P_4020_V1_GROUP3,
GT9110P_4020_V1_GROUP4, GT9110P_4020_V1_GROUP5} };
@@ -0,0 +1,47 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
u8 GT9110P_4020_V2_GROUP0[] = {
0x00, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x35, 0x30, 0x01, 0xC8, 0x32, 0x08,
0x6E, 0x5A, 0x03, 0x04, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x11, 0x00, 0x18,
0x1A, 0x1D, 0x14, 0x95, 0x35, 0xFF, 0x26, 0x28, 0x31, 0x0D, 0x00, 0x00,
0x00, 0x21, 0x03, 0x2C, 0x15, 0x16, 0x18, 0x00, 0x01, 0x03, 0x46, 0x46,
0x2B, 0x4C, 0x10, 0x17, 0x36, 0x94, 0xC5, 0x02, 0x08, 0x00, 0x00, 0x00,
0xA6, 0x19, 0x00, 0x96, 0x1D, 0x88, 0x86, 0x23, 0x00, 0x7A, 0x29, 0x00,
0x70, 0x31, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x48, 0xFB,
0x00, 0x20, 0x00, 0x00, 0x5D, 0x0A, 0x00, 0x88, 0x43, 0x05, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x1D,
0x08, 0x07, 0x1C, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11,
0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01,
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x0E, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x15, 0x16, 0x17, 0x18, 0x19,
0x1B, 0x2A, 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20,
0x1F, 0x1E, 0x1D, 0x1C, 0xD1, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 GT9110P_4020_V2_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 GT9110P_4020_V2_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 GT9110P_4020_V2_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 GT9110P_4020_V2_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 GT9110P_4020_V2_GROUP5[] = {0};
struct ctp_cfg GT9110P_4020_V2_CFG = {
.lens = {CFG_GROUP_LEN(GT9110P_4020_V2_GROUP0),
CFG_GROUP_LEN(GT9110P_4020_V2_GROUP1),
CFG_GROUP_LEN(GT9110P_4020_V2_GROUP2),
CFG_GROUP_LEN(GT9110P_4020_V2_GROUP3),
CFG_GROUP_LEN(GT9110P_4020_V2_GROUP4),
CFG_GROUP_LEN(GT9110P_4020_V2_GROUP5)},
.info = {GT9110P_4020_V2_GROUP0, GT9110P_4020_V2_GROUP1,
GT9110P_4020_V2_GROUP2, GT9110P_4020_V2_GROUP3,
GT9110P_4020_V2_GROUP4, GT9110P_4020_V2_GROUP5} };
@@ -0,0 +1,50 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
/* ***************************PART2:TODO */
/* define********************************** */
/* STEP_1(REQUIRED):Change config table. */
u8 GT9110P_DZ_GROUP0[] = {
0x00, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x75, 0x00, 0x01, 0x08, 0x28, 0x0F,
0x50, 0x32, 0x03, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x17,
0x19, 0x1D, 0x14, 0x94, 0x34, 0xFF, 0x1F, 0x21, 0x35, 0x11, 0x00, 0x00,
0x01, 0xBA, 0x03, 0x24, 0x16, 0x18, 0x1A, 0x90, 0x83, 0x03, 0x6E, 0x50,
0x28, 0x54, 0x00, 0x14, 0x2D, 0x94, 0xC5, 0x02, 0x07, 0x00, 0x00, 0x04,
0x99, 0x15, 0x00, 0x8C, 0x19, 0x00, 0x81, 0x1E, 0x00, 0x7A, 0x23, 0x00,
0x74, 0x29, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x1D, 0x1C, 0x1B,
0x1A, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x01, 0x02,
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1B,
0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0xFF, 0xFF, 0xD9, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 GT9110P_DZ_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 GT9110P_DZ_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 GT9110P_DZ_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 GT9110P_DZ_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 GT9110P_DZ_GROUP5[] = {0};
struct ctp_cfg GT9110P_DZ_CFG = {
.lens = {CFG_GROUP_LEN(GT9110P_DZ_GROUP0),
CFG_GROUP_LEN(GT9110P_DZ_GROUP1),
CFG_GROUP_LEN(GT9110P_DZ_GROUP2),
CFG_GROUP_LEN(GT9110P_DZ_GROUP3),
CFG_GROUP_LEN(GT9110P_DZ_GROUP4),
CFG_GROUP_LEN(GT9110P_DZ_GROUP5)},
.info = {GT9110P_DZ_GROUP0, GT9110P_DZ_GROUP1, GT9110P_DZ_GROUP2,
GT9110P_DZ_GROUP3, GT9110P_DZ_GROUP4, GT9110P_DZ_GROUP5} };
@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
u8 GT9110P_SX_GROUP0[] = {
0x00, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x35, 0x10, 0x01, 0x0A, 0x32, 0x0F,
0x50, 0x3C, 0x03, 0x04, 0x00, 0x00, 0x08, 0x00, 0x24, 0x00, 0x06, 0x18,
0x1A, 0x1D, 0x14, 0x95, 0x35, 0xFF, 0x37, 0x39, 0x12, 0x0C, 0x00, 0x00,
0x00, 0xBB, 0x02, 0x2C, 0x14, 0x15, 0x17, 0x00, 0x03, 0x03, 0x50, 0x3C,
0x2B, 0x4A, 0x30, 0x28, 0x5A, 0x94, 0xC5, 0x02, 0x07, 0x00, 0x00, 0x04,
0x8C, 0x2B, 0x00, 0x83, 0x33, 0xAA, 0x7C, 0x3C, 0x55, 0x76, 0x46, 0x00,
0x72, 0x53, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x0A, 0x0A, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x00, 0x01,
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x2A, 0x29, 0x28, 0x27, 0x26,
0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x19,
0x18, 0x17, 0x16, 0x15, 0xBD, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 GT9110P_SX_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 GT9110P_SX_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 GT9110P_SX_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 GT9110P_SX_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 GT9110P_SX_GROUP5[] = {0};
struct ctp_cfg GT9110P_SX_CFG = {
.lens = {CFG_GROUP_LEN(GT9110P_SX_GROUP0),
CFG_GROUP_LEN(GT9110P_SX_GROUP1),
CFG_GROUP_LEN(GT9110P_SX_GROUP2),
CFG_GROUP_LEN(GT9110P_SX_GROUP3),
CFG_GROUP_LEN(GT9110P_SX_GROUP4),
CFG_GROUP_LEN(GT9110P_SX_GROUP5)},
.info = {GT9110P_SX_GROUP0, GT9110P_SX_GROUP1, GT9110P_SX_GROUP2,
GT9110P_SX_GROUP3, GT9110P_SX_GROUP4, GT9110P_SX_GROUP5} };
@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
u8 LF808_9110P_GROUP0[] = {
0x65, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x35, 0x20, 0x01, 0xC8, 0x28, 0x0F,
0x55, 0x3C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x05, 0x17,
0x19, 0x1E, 0x14, 0x95, 0x35, 0xFF, 0x25, 0x23, 0xD3, 0x07, 0x00, 0x00,
0x00, 0x9A, 0x03, 0x2C, 0x18, 0x1A, 0x1C, 0x80, 0x81, 0x02, 0x96, 0x64,
0xC3, 0x4A, 0x00, 0x1E, 0x50, 0x94, 0xD5, 0x02, 0x07, 0x00, 0x00, 0x04,
0x86, 0x21, 0x00, 0x71, 0x28, 0x00, 0x5F, 0x31, 0x00, 0x52, 0x3B, 0x00,
0x46, 0x48, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x55, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x15, 0x16,
0x17, 0x18, 0x19, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x14, 0x13, 0x12, 0x11, 0x10,
0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04,
0x03, 0x02, 0x01, 0x00, 0x45, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 LF808_9110P_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 LF808_9110P_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 LF808_9110P_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 LF808_9110P_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 LF808_9110P_GROUP5[] = {0};
struct ctp_cfg LF808_9110P_CFG = {
.lens = {CFG_GROUP_LEN(LF808_9110P_GROUP0),
CFG_GROUP_LEN(LF808_9110P_GROUP1),
CFG_GROUP_LEN(LF808_9110P_GROUP2),
CFG_GROUP_LEN(LF808_9110P_GROUP3),
CFG_GROUP_LEN(LF808_9110P_GROUP4),
CFG_GROUP_LEN(LF808_9110P_GROUP5)},
.info = {LF808_9110P_GROUP0, LF808_9110P_GROUP1, LF808_9110P_GROUP2,
LF808_9110P_GROUP3, LF808_9110P_GROUP4, LF808_9110P_GROUP5} };
@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
u8 LS103_9110P_GROUP0[] = {
0x00, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x35, 0x00, 0x11, 0x11, 0x32, 0x08,
0x55, 0x32, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x18,
0x1A, 0x1E, 0x14, 0x95, 0x15, 0xFF, 0x4D, 0x00, 0x31, 0x0D, 0x00, 0x00,
0x00, 0x03, 0x03, 0x1C, 0x18, 0x1A, 0x1E, 0x92, 0x83, 0x03, 0x50, 0x3C,
0x14, 0x4F, 0x00, 0x3C, 0x78, 0x94, 0xC5, 0x02, 0x07, 0x00, 0x00, 0x04,
0x86, 0x40, 0x00, 0x78, 0x4A, 0x00, 0x6E, 0x55, 0x00, 0x64, 0x61, 0x00,
0x5E, 0x70, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x55, 0x03, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, 0x16,
0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A,
0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x01,
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
0x27, 0x28, 0x29, 0x2A, 0xA9, 0x01};
/* TODO puts your group2 config info here,if need. */
u8 LS103_9110P_GROUP1[] = {0};
/* TODO puts your group3 config info here,if need. */
u8 LS103_9110P_GROUP2[] = {0};
/* TODO: define your config for Sensor_ID == 3 here, if needed */
u8 LS103_9110P_GROUP3[] = {0};
/* TODO: define your config for Sensor_ID == 4 here, if needed */
u8 LS103_9110P_GROUP4[] = {0};
/* TODO: define your config for Sensor_ID == 5 here, if needed */
u8 LS103_9110P_GROUP5[] = {0};
struct ctp_cfg LS103_9110P_CFG = {
.lens = {CFG_GROUP_LEN(LS103_9110P_GROUP0),
CFG_GROUP_LEN(LS103_9110P_GROUP1),
CFG_GROUP_LEN(LS103_9110P_GROUP2),
CFG_GROUP_LEN(LS103_9110P_GROUP3),
CFG_GROUP_LEN(LS103_9110P_GROUP4),
CFG_GROUP_LEN(LS103_9110P_GROUP5)},
.info = {LS103_9110P_GROUP0, LS103_9110P_GROUP1, LS103_9110P_GROUP2,
LS103_9110P_GROUP3, LS103_9110P_GROUP4, LS103_9110P_GROUP5} };
@@ -0,0 +1,111 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#ifndef _GT9XX_CONFIG_H_
#define _GT9XX_CONFIG_H_
/* ***************************PART2:TODO */
/* define********************************** */
/* STEP_1(REQUIRED):Change config table. */
#define CTP_CFG_GROUP0 \
{ \
0x00, 0x20, 0x03, 0x00, 0x05, 0x0A, 0x35, 0x62, 0x01, 0xC1, \
0x28, 0x03, 0x32, 0x28, 0x03, 0x05, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x04, 0x16, 0x19, 0x1E, 0x14, 0x95, \
0x35, 0xFF, 0x34, 0x36, 0xAC, 0x13, 0x33, 0x33, 0x00, \
0xA3, 0x04, 0x10, 0x01, 0x96, 0x0A, 0x28, 0x28, 0x0F, \
0x19, 0x19, 0x50, 0x00, 0x00, 0x24, 0x41, 0x94, 0xD0, \
0x03, 0x00, 0x00, 0x00, 0x04, 0xA2, 0x26, 0x00, 0x96, \
0x2B, 0x00, 0x8D, 0x30, 0x00, 0x86, 0x36, 0x00, 0x80, \
0x3D, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, \
0x00, 0x20, 0x1E, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, \
0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, \
0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x00, 0x01, 0x02, \
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, \
0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, \
0x15, 0x16, 0x17, 0x18, 0x19, 0x1B, 0x1C, 0x1D, 0x1E, \
0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \
0x28, 0x29, 0x2A, 0xF8, 0x01 \
}
#define GTP_CFG_GROUP0_CHARGER \
{ \
}
/* TODO puts your group2 config info here,if need. */
#define CTP_CFG_GROUP1 \
{ \
0x58, 0xB0, 0x04, 0x80, 0x07, 0x0A, 0x75, 0x20, 0x01, 0xC8, \
0x23, 0x08, 0x6E, 0x50, 0x03, 0x04, 0x00, 0x00, 0x00, \
0x00, 0x11, 0x11, 0x00, 0x18, 0x1A, 0x1E, 0x14, 0x95, \
0x35, 0xFF, 0x32, 0x34, 0x31, 0x0D, 0x00, 0x00, 0x00, \
0x21, 0x03, 0x2C, 0x1A, 0x1C, 0x1F, 0x90, 0x80, 0x03, \
0x50, 0x64, 0x28, 0x40, 0x00, 0x20, 0x41, 0x94, 0xC5, \
0x02, 0x08, 0x00, 0x00, 0x04, 0x9B, 0x22, 0x00, 0x90, \
0x27, 0x00, 0x86, 0x2D, 0x00, 0x7E, 0x34, 0x00, 0x77, \
0x3C, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, \
0x48, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, \
0x08, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, \
0x06, 0x1D, 0x08, 0x07, 0x1C, 0x09, 0x0A, 0x0B, 0x0C, \
0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, \
0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01, 0x02, \
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, \
0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, \
0x15, 0x16, 0x17, 0x18, 0x19, 0x1B, 0x2A, 0x29, 0x28, \
0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, 0x1F, \
0x1E, 0x1D, 0x1C, 0x89, 0x01 \
}
/* TODO puts your group2 config info here,if need. */
#define GTP_CFG_GROUP1_CHARGER \
{ \
}
/* TODO puts your group3 config info here,if need. */
#define CTP_CFG_GROUP2 \
{ \
}
/* TODO puts your group3 config info here,if need. */
#define GTP_CFG_GROUP2_CHARGER \
{ \
}
/* TODO: define your config for Sensor_ID == 3 here, if needed */
#define CTP_CFG_GROUP3 \
{ \
}
/* TODO puts your group3 config info here,if need. */
#define GTP_CFG_GROUP3_CHARGER \
{ \
}
/* TODO: define your config for Sensor_ID == 4 here, if needed */
#define CTP_CFG_GROUP4 \
{ \
}
/* TODO puts your group4 config info here,if need. */
#define GTP_CFG_GROUP4_CHARGER \
{ \
}
/* TODO: define your config for Sensor_ID == 5 here, if needed */
#define CTP_CFG_GROUP5 \
{ \
}
/* TODO puts your group5 config info here,if need. */
#define GTP_CFG_GROUP5_CHARGER \
{ \
}
#endif /* _GT1X_CONFIG_H_ */
@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#ifndef GT9XX_LIST_H
#define GT9XX_LIST_H
typedef unsigned char u8;
#define CFG_GROUP_LEN(p_cfg_grp) (ARRAY_SIZE(p_cfg_grp) / sizeof(p_cfg_grp[0]))
#include "GT9110P_4020_V1.h"
#include "GT9110P_4020_V2.h"
#include "GT9110P_DZ.h"
#include "GT9110P_SX.h"
#include "gt9xx_mid.h"
struct mid_cfg_data project_cfg_data[] = {
{"GT9110P_4020_V1", &GT9110P_4020_V1_CFG},
{"GT9110P_4020_V2", &GT9110P_4020_V2_CFG},
{"GT9110P_DZ", &GT9110P_DZ_CFG},
{"GT9110P_SX", &GT9110P_SX_CFG},
};
#endif
@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#ifndef GT9XX_MID_H
#define GT9XX_MID_H
struct ctp_cfg {
unsigned char lens[6];
unsigned char *info[6];
};
struct mid_cfg_data {
char name[32];
struct ctp_cfg *cfg;
};
#endif
@@ -0,0 +1,379 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#ifndef TPD_CUSTOM_GT9XX_H__
#define TPD_CUSTOM_GT9XX_H__
#include <linux/hrtimer.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <linux/bitops.h>
#include <linux/byteorder/generic.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h>
#endif
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/jiffies.h>
#include <linux/proc_fs.h>
#include <linux/uaccess.h>
/* Pre-defined definition */
#define UPDATE_FUNCTIONS
#define TPD_POWER_SOURCE_CUSTOM
#define GTP_CONFIG_MIN_LENGTH 186
#define GTP_CONFIG_MAX_LENGTH 240
#define GTP_INFO_ON 0
#define GTP_ERROR_ON 0
#ifdef CONFIG_GTP_DEBUG_ON
#define GTP_DEBUG_ON 0
#else
#define GTP_DEBUG_ON 0
#endif
#ifdef CONFIG_GTP_DEBUG_ARRAY_ON
#define GTP_DEBUG_ARRAY_ON 1
#else
#define GTP_DEBUG_ARRAY_ON 0
#endif
#ifdef CONFIG_GTP_DEBUG_FUNC_ON
#define GTP_DEBUG_FUNC_ON 1
#else
#define GTP_DEBUG_FUNC_ON 0
#endif
#define CFG_GROUP_LEN(p_cfg_grp) (ARRAY_SIZE(p_cfg_grp) / sizeof(p_cfg_grp[0]))
#if (defined(CONFIG_GTP_ESD_PROTECT) || defined(CONFIG_GTP_COMPATIBLE_MODE))
extern void force_reset_guitar(void);
#endif
/* STEP_3(optional):Custom set some config by themself,if need. */
#ifdef CONFIG_GTP_CUSTOM_CFG
#define GTP_MAX_HEIGHT 1920
#define GTP_MAX_WIDTH 1080
#define GTP_INT_TRIGGER 0 /* 0:Rising 1:Falling */
#else
#define GTP_MAX_HEIGHT 1280
#define GTP_MAX_WIDTH 800
#define GTP_INT_TRIGGER 1
#endif
#define GTP_MAX_TOUCH 5
#define VELOCITY_CUSTOM
#define TPD_VELOCITY_CUSTOM_X 15
#define TPD_VELOCITY_CUSTOM_Y 15
#define GTP_RST_GPIO 0
#define GTP_IRQ_GPIO 1
/* STEP_4(optional):If this project have touch key,Set touch key config. */
#ifdef CONFIG_GTP_HAVE_TOUCH_KEY
#define TPD_KEY_COUNT 4
#define TPD_KEYS \
{ \
KEY_BACK, KEY_HOMEPAGE, KEY_MENU, KEY_SEARCH \
}
#define GTP_KEY_TAB \
{ \
KEY_MENU, KEY_HOMEPAGE, KEY_BACK, KEY_SEND \
}
#endif
/* ***************************PART3:OTHER */
/* define********************************* */
#define GTP_DRIVER_VERSION "V2.6<2016/07/28>"
#define GTP_I2C_NAME "Goodix-TS"
#define GT91XX_CONFIG_PROC_FILE "gt9xx_config"
#define GTP_POLL_TIME 10
#define GTP_ADDR_LENGTH 2
#define GTP_CONFIG_MIN_LENGTH 186
#define GTP_CONFIG_MAX_LENGTH 240
#define FAIL 0
#define SUCCESS 1
#define SWITCH_OFF 0
#define SWITCH_ON 1
/* ******************** For GT9XXF Start ***********************/
#if defined(CONFIG_GTP_COMPATIBLE_MODE) || defined(CONFIG_GTP_HOTKNOT)
enum chip_type_t {
CHIP_TYPE_GT9 = 0,
CHIP_TYPE_GT9F = 1,
};
#endif
#define GTP_REG_MATRIX_DRVNUM 0x8069
#define GTP_REG_MATRIX_SENNUM 0x806A
#define GTP_REG_RQST 0x8043
#define GTP_REG_BAK_REF 0x99D0
#define GTP_REG_MAIN_CLK 0x8020
#define GTP_REG_CHIP_TYPE 0x8000
#define GTP_REG_HAVE_KEY 0x804E
#define GTP_REG_HN_STATE 0xAB10
#define GTP_FL_FW_BURN 0x00
#define GTP_FL_ESD_RECOVERY 0x01
#define GTP_FL_READ_REPAIR 0x02
#define GTP_BAK_REF_SEND 0
#define GTP_BAK_REF_STORE 1
#define CFG_LOC_DRVA_NUM 29
#define CFG_LOC_DRVB_NUM 30
#define CFG_LOC_SENS_NUM 31
#define GTP_CHK_FW_MAX 1000
#define GTP_CHK_FS_MNT_MAX 300
#define GTP_BAK_REF_PATH "/data/gtp_ref.bin"
#define GTP_MAIN_CLK_PATH "/data/gtp_clk.bin"
#define GTP_RQST_CONFIG 0x01
#define GTP_RQST_BAK_REF 0x02
#define GTP_RQST_RESET 0x03
#define GTP_RQST_MAIN_CLOCK 0x04
#define GTP_RQST_HOTKNOT_CODE 0x20
#define GTP_RQST_RESPONDED 0x00
#define GTP_RQST_IDLE 0xFF
#define HN_DEVICE_PAIRED 0x80
#define HN_MASTER_DEPARTED 0x40
#define HN_SLAVE_DEPARTED 0x20
#define HN_MASTER_SEND 0x10
#define HN_SLAVE_RECEIVED 0x08
/* ******************** For GT9XXF End ***********************/
/* Register define */
#define GTP_READ_COOR_ADDR 0x814E
#define GTP_REG_SLEEP 0x8040
#define GTP_REG_SENSOR_ID 0x814A
#define GTP_REG_CONFIG_DATA 0x8047
#define GTP_REG_VERSION 0x8140
#define GTP_REG_HW_INFO 0x4220
#define GTP_REG_REFRESH_RATE 0x8056
#define RESOLUTION_LOC 3
#define TRIGGER_LOC 8
#define GTP_DMA_MAX_TRANSACTION_LENGTH 255 /* for DMA mode */
#define GTP_DMA_MAX_I2C_TRANSFER_SIZE \
(GTP_DMA_MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH)
#define MAX_TRANSACTION_LENGTH 8
#define TPD_I2C_NUMBER 0
#define I2C_MASTER_CLOCK 300
#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - GTP_ADDR_LENGTH)
#define TPD_MAX_RESET_COUNT 3
#define TPD_CALIBRATION_MATRIX \
{ \
962, 0, 0, 0, 1600, 0, 0, 0 \
}
#define TPD_RESET_ISSUE_WORKAROUND
#define TPD_HAVE_CALIBRATION
#define TPD_NO_GPIO
#define TPD_RESET_ISSUE_WORKAROUND
#ifdef CONFIG_GTP_WARP_X_ON
#define TPD_WARP_X(x_max, x) (x_max - 1 - x)
#else
#define TPD_WARP_X(x_max, x) x
#endif
#ifdef CONFIG_GTP_WARP_Y_ON
#define TPD_WARP_Y(y_max, y) (y_max - 1 - y)
#else
#define TPD_WARP_Y(y_max, y) y
#endif
/* Log define */
/* #define GTP_INFO(fmt, arg...) pr_info("<<-GTP-INFO->> "fmt"\n", */
/* ##arg) */
/* #define GTP_ERROR(fmt, arg...) pr_debug("<<-GTP-ERROR->> "fmt"\n", */
/* ##arg) */
#define GTP_DEBUG(fmt, arg...) \
do { \
if (GTP_DEBUG_ON) \
pr_debug("<<-GTP-DEBUG->> [%d]" fmt "\n", __LINE__, \
##arg); \
} while (0)
#define GTP_ERROR(fmt, arg...) \
do { \
if (GTP_ERROR_ON) \
pr_debug("<<-GTP-ERROR->> " fmt "\n", ##arg); \
} while (0)
#define GTP_INFO(fmt, arg...) \
do { \
if (GTP_INFO_ON) \
pr_info("<<-GTP-INFO->> " fmt "\n", ##arg); \
} while (0)
#define GTP_DEBUG_ARRAY(array, num) \
do { \
s32 i; \
u8 *a = array; \
if (GTP_DEBUG_ARRAY_ON) { \
pr_debug("<<-GTP-DEBUG-ARRAY->>\n"); \
for (i = 0; i < (num); i++) { \
pr_debug("%02x ", (a)[i]); \
if ((i + 1) % 10 == 0) \
pr_debug("\n"); \
} \
pr_debug("\n"); \
} \
} while (0)
#define GTP_DEBUG_FUNC() \
do { \
if (GTP_DEBUG_FUNC_ON) \
pr_debug("<<-GTP-FUNC->> Func:%s@Line:%d\n", __func__, \
__LINE__); \
} while (0)
#define GTP_SWAP(x, y) \
do { \
typeof(x) z = x; \
x = y; \
y = z; \
} while (0)
/* ****************************PART4:UPDATE */
/* define******************************* */
/* Error no */
#define ERROR_NO_FILE 2 /* ENOENT */
#define ERROR_FILE_READ 23 /* ENFILE */
#define ERROR_FILE_TYPE 21 /* EISDIR */
#define ERROR_GPIO_REQUEST 4 /* EINTR */
#define ERROR_I2C_TRANSFER 5 /* EIO */
#define ERROR_NO_RESPONSE 16 /* EBUSY */
#define ERROR_TIMEOUT 110 /* ETIMEDOUT */
#define UPDATE_FUNCTIONS
extern u16 show_len;
extern u16 total_len;
extern u8 gtp_rawdiff_mode;
extern u8 gtp_loading_fw;
extern int tpd_halt;
extern s32 gtp_init_panel(struct i2c_client *client);
extern void gtp_reset_guitar(struct i2c_client *client, s32 ms);
extern void gtp_int_sync(s32 ms);
extern u8 gup_init_update_proc(struct i2c_client *client);
extern u8 gup_init_fw_proc(struct i2c_client *client);
extern s32 gtp_i2c_read(struct i2c_client *client, u8 *buf, s32 len);
extern s32 gtp_i2c_write(struct i2c_client *client, u8 *buf, s32 len);
extern int i2c_write_bytes(struct i2c_client *client, u16 addr, u8 *txbuf,
int len);
extern int i2c_read_bytes(struct i2c_client *client, u16 addr, u8 *rxbuf,
int len);
extern s32 gtp_i2c_read_dbl_check(struct i2c_client *client, u16 addr,
u8 *rxbuf, int len);
extern void gtp_gpio_output(int gpio_type, int level);
extern void gtp_gpio_input(int gpio_type);
extern void gtp_irq_enable(void);
extern void gtp_irq_disable(void);
extern struct i2c_client *i2c_client_point;
#ifdef UPDATE_FUNCTIONS
extern s32 gup_enter_update_mode(struct i2c_client *client);
extern void gup_leave_update_mode(void);
extern s32 gup_update_proc(void *dir);
#endif
extern u8 gtp_updating_fw;
#ifdef CONFIG_GTP_HOTKNOT
u8 *gup_load_calibration_from_file(char *filepath);
s32 gup_load_calibration(u8 *firmware, s32 length, u8 need_check);
extern s32 gup_load_hotknot_fw(void);
extern s32 gup_load_authorization_fw(void);
extern s32 gup_recovery_touch(void);
extern s32 gup_load_touch_fw(char *filepath);
extern u8 gtp_hotknot_enabled;
extern u8 wait_hotknot_state;
extern u8 got_hotknot_state;
extern u8 got_hotknot_extra_state;
extern u8 hotknot_paired_flag;
extern wait_queue_head_t bp_waiter;
#endif
#ifdef CONFIG_GTP_ESD_PROTECT
extern void gtp_esd_switch(struct i2c_client *client, s32 on);
#endif
extern struct tpd_device *tpd;
#ifdef VELOCITY_CUSTOM
extern int tpd_v_magnify_x;
extern int tpd_v_magnify_y;
#endif
#ifdef CONFIG_GTP_SUPPORT_I2C_DMA
s32 i2c_dma_write(struct i2c_client *client, u16 addr, u8 *txbuf, s32 len);
s32 i2c_dma_read(struct i2c_client *client, u16 addr, u8 *rxbuf, s32 len);
#endif
#ifdef CONFIG_GTP_CHARGER_DETECT
extern bool upmu_is_chr_det(void);
extern bool upmu_get_pchr_chrdet(void);
#endif
#ifdef CONFIG_GTP_CREATE_WR_NODE
extern s32 init_wr_node(struct i2c_client *);
extern void uninit_wr_node(void);
#endif
extern u8 gup_check_fs_mounted(char *path_name);
extern u8 gup_clk_calibration(void);
extern s32 gup_fw_download_proc(void *dir, u8 dwn_mode);
void gtp_get_chip_type(struct i2c_client *client);
extern u8 cfg_len;
extern u8 gtp_resetting;
#if defined(CONFIG_GTP_COMPATIBLE_MODE) || defined(CONFIG_GTP_HOTKNOT)
extern u8 gtp_fw_startup(struct i2c_client *client);
extern unsigned char gtp_touch_fw[];
extern enum chip_type_t gtp_chip_type;
#endif
#ifdef CONFIG_GTP_COMPATIBLE_MODE
extern u8 rqst_processing;
s32 gup_load_touch_fw(char *filepath);
s32 gup_fw_download_proc(void *dir, u8 dwn_mode);
#endif
#ifdef CONFIG_GTP_GESTURE_WAKEUP
#define GESTURE_MAX_POINT_COUNT 64
enum doze_t {
DOZE_DISABLED = 0,
DOZE_ENABLED = 1,
DOZE_WAKEUP = 2,
};
#pragma pack(1)
struct gesture_data {
int enabled;
enum doze_t doze_status;
u8 ic_msg[6]; /*from the first byte */
u8 gestures[4];
u8 data[3 + GESTURE_MAX_POINT_COUNT * 4 +
80]; /*80 bytes for extra data */
};
#pragma pack()
extern struct gesture_data gesture_data;
extern s32 gesture_event_handler(struct input_dev *dev);
extern s8 gtp_enter_doze(void);
extern s32 gtp_extents_init(void);
extern void gtp_extents_exit(void);
#endif
/*****************************End of Part III********************************/
#endif /* TPD_CUSTOM_GT9XX_H__ */