mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
channel: input 3rd nvt tp bringup
channel: 3rd djn panel with new NVT IC tp bringup add new nvt IC NT36525B Change-Id: I0790e687feb112fdcd3ed3a2339a8e0d578a1855 Signed-off-by: hujing3 <hujing3@lenovo.com> Reviewed-on: https://gerrit.mot.com/1286736 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wei Deng <dengwei1@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9ee258d23e
commit
573b779264
4 changed files with 44 additions and 6 deletions
|
|
@ -1184,12 +1184,14 @@ static int8_t nvt_ts_check_chip_ver_trim(void)
|
|||
NVT_LOG("This is NVT touch IC\n");
|
||||
#if NVT_TOUCH_FW
|
||||
if (list == 0) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36525B");
|
||||
} else if (list == 1) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36672A");
|
||||
} else if (list == 9) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36525");
|
||||
} else if (list == 10) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36870");
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36525");
|
||||
} else if (list == 11) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36870");
|
||||
} else if (list == 12) {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36676F");
|
||||
} else {
|
||||
snprintf(ts->product_id, sizeof(ts->product_id), "NT36772");
|
||||
|
|
@ -1270,6 +1272,8 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
|
|||
goto err_chipvertrim_failed;
|
||||
}
|
||||
|
||||
nvt_read_pid();
|
||||
|
||||
mutex_init(&ts->lock);
|
||||
|
||||
mutex_lock(&ts->lock);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#define I2C_BLDR_Address 0x01
|
||||
#define I2C_FW_Address 0x01
|
||||
#define I2C_HW_Address 0x62
|
||||
#define PANNEL_ID 0x6013
|
||||
|
||||
#if NVT_DEBUG
|
||||
#define NVT_LOG(fmt, args...) pr_err("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
|
||||
|
|
@ -83,8 +84,8 @@ extern const uint16_t gesture_key_array[];
|
|||
#endif
|
||||
#define BOOT_UPDATE_FIRMWARE 0
|
||||
#define BOOT_UPDATE_FIRMWARE_NAME "novatek_ts_fw.bin"
|
||||
|
||||
//---ESD Protect.---
|
||||
#define NT36525B_FIRMWARE_NAME "novatek_ts_fw_pid6013.bin"
|
||||
/* ---ESD Protect.--- */
|
||||
#define NVT_TOUCH_ESD_PROTECT 1
|
||||
#define NVT_TOUCH_ESD_CHECK_PERIOD 2000 /* ms */
|
||||
|
||||
|
|
|
|||
|
|
@ -982,7 +982,12 @@ void Boot_Update_Firmware(struct work_struct *work)
|
|||
int32_t ret = 0;
|
||||
|
||||
char firmware_name[256] = "";
|
||||
snprintf(firmware_name, sizeof(firmware_name), BOOT_UPDATE_FIRMWARE_NAME);
|
||||
NVT_LOG("enter %s start\n",__func__);
|
||||
if (ts->nvt_pid == PANNEL_ID) {
|
||||
snprintf(firmware_name, sizeof(firmware_name), NT36525B_FIRMWARE_NAME);
|
||||
} else {
|
||||
snprintf(firmware_name, sizeof(firmware_name), BOOT_UPDATE_FIRMWARE_NAME);
|
||||
}
|
||||
|
||||
// request bin file in "/etc/firmware"
|
||||
ret = update_firmware_request(firmware_name);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,32 @@ struct nvt_ts_mem_map {
|
|||
uint32_t RW_FLASH_DATA_ADDR;
|
||||
};
|
||||
|
||||
static const struct nvt_ts_mem_map NT36525B_memory_map = {
|
||||
.EVENT_BUF_ADDR = 0x21C00,
|
||||
.RAW_PIPE0_ADDR = 0x20000,
|
||||
.RAW_PIPE0_Q_ADDR = 0,
|
||||
.RAW_PIPE1_ADDR = 0x23000,
|
||||
.RAW_PIPE1_Q_ADDR = 0,
|
||||
.BASELINE_ADDR = 0x20BFC,
|
||||
.BASELINE_Q_ADDR = 0,
|
||||
.BASELINE_BTN_ADDR = 0x23BFC,
|
||||
.BASELINE_BTN_Q_ADDR = 0,
|
||||
.DIFF_PIPE0_ADDR = 0x206DC,
|
||||
.DIFF_PIPE0_Q_ADDR = 0,
|
||||
.DIFF_PIPE1_ADDR = 0x236DC,
|
||||
.DIFF_PIPE1_Q_ADDR = 0,
|
||||
.RAW_BTN_PIPE0_ADDR = 0x20510,
|
||||
.RAW_BTN_PIPE0_Q_ADDR = 0,
|
||||
.RAW_BTN_PIPE1_ADDR = 0x23510,
|
||||
.RAW_BTN_PIPE1_Q_ADDR = 0,
|
||||
.DIFF_BTN_PIPE0_ADDR = 0x20BF0,
|
||||
.DIFF_BTN_PIPE0_Q_ADDR = 0,
|
||||
.DIFF_BTN_PIPE1_ADDR = 0x23BF0,
|
||||
.DIFF_BTN_PIPE1_Q_ADDR = 0,
|
||||
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
|
||||
.RW_FLASH_DATA_ADDR = 0x24002,
|
||||
};
|
||||
|
||||
static const struct nvt_ts_mem_map NT36672A_memory_map = {
|
||||
.EVENT_BUF_ADDR = 0x21C00,
|
||||
.RAW_PIPE0_ADDR = 0x20000,
|
||||
|
|
@ -181,6 +207,8 @@ struct nvt_ts_trim_id_table {
|
|||
};
|
||||
|
||||
static const struct nvt_ts_trim_id_table trim_id_table[] = {
|
||||
{.id = {0x0B, 0xFF, 0xFF, 0x25, 0x65, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
|
||||
.mmap = &NT36525B_memory_map, .carrier_system = 0},
|
||||
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
|
||||
.mmap = &NT36672A_memory_map, .carrier_system = 0},
|
||||
{.id = {0x55, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
|
||||
|
|
|
|||
Loading…
Reference in a new issue