mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
Add IC type of GT9615
TP: Add IC type of GT9615(Marseille). Change-Id: If78eb28e317424b37b86c7677b38b01c35035465 Signed-off-by: Wenge Zhu <zhuwg1@motorola.com> Reviewed-on: https://gerrit.mot.com/2786221 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
75e9ee177b
commit
08a0bce0e5
7 changed files with 43 additions and 9 deletions
|
|
@ -40,16 +40,20 @@
|
|||
#define ISP_RAM_ADDR_BRA 0x18400
|
||||
#define ISP_RAM_ADDR_BRB 0x57000
|
||||
#define ISP_RAM_ADDR_BRD 0x23800
|
||||
#define ISP_RAM_ADDR_MAR 0x3B800
|
||||
#define HW_REG_CPU_RUN_FROM 0x10000
|
||||
#define FLASH_CMD_REG_BRA 0x10400
|
||||
#define FLASH_CMD_REG_BRB 0x13400
|
||||
#define FLASH_CMD_REG_BRD 0x12400
|
||||
#define FLASH_CMD_REG_MAR 0x10174
|
||||
#define HW_REG_ISP_BUFFER_BRA 0x10410
|
||||
#define HW_REG_ISP_BUFFER_BRB 0x13410
|
||||
#define HW_REG_ISP_BUFFER_BRD 0x12410
|
||||
#define HW_REG_ISP_BUFFER_MAR 0x12400
|
||||
#define CONFIG_DATA_ADDR_BRA 0x3E000
|
||||
#define CONFIG_DATA_ADDR_BRB 0x40000
|
||||
#define CONFIG_DATA_ADDR_BRD 0x3E000
|
||||
#define CONFIG_DATA_ADDR_MAR 0x3F000
|
||||
|
||||
#define HOLD_CPU_REG_W 0x0002
|
||||
#define HOLD_CPU_REG_R 0x2000
|
||||
|
|
@ -131,6 +135,19 @@ struct update_info_t update_brd = {
|
|||
ENABLE_MISCTL_BRD,
|
||||
};
|
||||
|
||||
/* Marseille update info */
|
||||
struct update_info_t update_mar = {
|
||||
FW_HEADER_SIZE,
|
||||
FW_SUBSYS_INFO_OFFSET,
|
||||
ISP_RAM_ADDR_MAR,
|
||||
FLASH_CMD_REG_MAR,
|
||||
HW_REG_ISP_BUFFER_MAR,
|
||||
CONFIG_DATA_ADDR_MAR,
|
||||
MISCTL_REG_BRD,
|
||||
WATCH_DOG_REG_BRD,
|
||||
ENABLE_MISCTL_BRD,
|
||||
};
|
||||
|
||||
enum compare_status {
|
||||
COMPARE_EQUAL = 0,
|
||||
COMPARE_NOCODE,
|
||||
|
|
@ -484,7 +501,8 @@ static int goodix_update_prepare(struct fw_update_ctrl *fwu_ctrl)
|
|||
|
||||
/* enable misctl clock */
|
||||
if (fwu_ctrl->core_data->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
fwu_ctrl->core_data->bus->ic_type == IC_TYPE_NOTTINGHAM)
|
||||
fwu_ctrl->core_data->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
fwu_ctrl->core_data->bus->ic_type == IC_TYPE_MARSEILLE)
|
||||
hw_ops->write(cd, misctl_reg, (u8 *)&enable_misctl_val, 4);
|
||||
else
|
||||
hw_ops->write(cd, misctl_reg, (u8 *)&enable_misctl_val, 1);
|
||||
|
|
@ -1202,6 +1220,8 @@ int goodix_fw_update_init(struct goodix_ts_core *core_data)
|
|||
core_data->update_ctrl.update_info = &update_bra;
|
||||
else if (core_data->bus->ic_type == IC_TYPE_BERLIN_B)
|
||||
core_data->update_ctrl.update_info = &update_brb;
|
||||
else if (core_data->bus->ic_type == IC_TYPE_MARSEILLE)
|
||||
core_data->update_ctrl.update_info = &update_mar;
|
||||
else
|
||||
core_data->update_ctrl.update_info = &update_brd;
|
||||
|
||||
|
|
|
|||
|
|
@ -1585,7 +1585,8 @@ static int brl_get_capacitance_data(struct goodix_ts_core *cd,
|
|||
}
|
||||
|
||||
if (cd->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM)
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
cd->bus->ic_type == IC_TYPE_MARSEILLE)
|
||||
return brld_get_cap_data(cd, info);
|
||||
|
||||
/* disable irq & close esd */
|
||||
|
|
|
|||
|
|
@ -208,6 +208,7 @@ static const struct of_device_id i2c_matchs[] = {
|
|||
{.compatible = "goodix,brl-b",},
|
||||
{.compatible = "goodix,brl-d",},
|
||||
{.compatible = "goodix,nottingham",},
|
||||
{.compatible = "goodix,marseille",},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, i2c_matchs);
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ static const struct of_device_id spi_matchs[] = {
|
|||
{.compatible = "goodix,brl-b",},
|
||||
{.compatible = "goodix,brl-d",},
|
||||
{.compatible = "goodix,nottingham",},
|
||||
{.compatible = "goodix,marseille",},
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#define GOODIX_CORE_DRIVER_NAME "goodix_ts"
|
||||
#define GOODIX_PEN_DRIVER_NAME "goodix_ts,pen"
|
||||
#define GOODIX_DRIVER_VERSION "v1.3.13"
|
||||
#define GOODIX_DRIVER_VERSION "v1.3.14"
|
||||
#define GOODIX_MAX_TOUCH 10
|
||||
#define GOODIX_MAX_KEY 10
|
||||
#define GOODIX_PEN_MAX_PRESSURE 4096
|
||||
|
|
@ -117,7 +117,8 @@ enum IC_TYPE_ID {
|
|||
IC_TYPE_BERLIN_A,
|
||||
IC_TYPE_BERLIN_B,
|
||||
IC_TYPE_BERLIN_D,
|
||||
IC_TYPE_NOTTINGHAM
|
||||
IC_TYPE_NOTTINGHAM,
|
||||
IC_TYPE_MARSEILLE
|
||||
};
|
||||
|
||||
/* SUB-ID
|
||||
|
|
|
|||
|
|
@ -1495,7 +1495,8 @@ static int goodix_cap_test_prepare(struct goodix_ts_test *ts_test)
|
|||
|
||||
/* switch rawdata mode */
|
||||
if (ts_test->ts->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM) {
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_MARSEILLE) {
|
||||
temp_cmd.cmd = 0x90;
|
||||
temp_cmd.data[0] = 0x81;
|
||||
temp_cmd.len = 5;
|
||||
|
|
@ -1532,7 +1533,8 @@ static int goodix_poll_rawdata(struct goodix_ts_test *ts_test, u8 data_type, u8
|
|||
int retry;
|
||||
|
||||
if (ts_test->ts->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM)
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_MARSEILLE)
|
||||
flag_addr = ts_test->ts->ic_info.misc.frame_data_addr;
|
||||
|
||||
if (data_type == GTP_MUTUAL_RAW) {
|
||||
|
|
@ -1563,7 +1565,8 @@ static int goodix_poll_rawdata(struct goodix_ts_test *ts_test, u8 data_type, u8
|
|||
|
||||
frame_buf = kzalloc(FRAME_DATA_MAX_SIZE, GFP_KERNEL);
|
||||
if (cd->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM) {
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
cd->bus->ic_type == IC_TYPE_MARSEILLE) {
|
||||
ret = ts_test_read(ts_test, flag_addr, frame_buf, FRAME_DATA_MAX_SIZE);
|
||||
if (ret < 0)
|
||||
goto free_exit;
|
||||
|
|
@ -1611,7 +1614,8 @@ static int goodix_cache_rawdata(struct goodix_ts_test *ts_test)
|
|||
u32 flag_addr = ts_test->ts->ic_info.misc.touch_data_addr;
|
||||
|
||||
if (ts_test->ts->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM)
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
ts_test->ts->bus->ic_type == IC_TYPE_MARSEILLE)
|
||||
flag_addr = ts_test->ts->ic_info.misc.frame_data_addr;
|
||||
|
||||
for (i = 0; i < DISCARD_FRAMES; i++) {
|
||||
|
|
@ -1717,7 +1721,8 @@ static int goodix_cache_noisedata(struct goodix_ts_test *ts_test)
|
|||
u32 flag_addr = ts_test->ts->ic_info.misc.touch_data_addr;
|
||||
|
||||
if (cd->bus->ic_type == IC_TYPE_BERLIN_D ||
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM) {
|
||||
cd->bus->ic_type == IC_TYPE_NOTTINGHAM ||
|
||||
cd->bus->ic_type == IC_TYPE_MARSEILLE) {
|
||||
flag_addr = ts_test->ts->ic_info.misc.frame_data_addr;
|
||||
temp_cmd.cmd = 0x90;
|
||||
temp_cmd.data[0] = 0x82;
|
||||
|
|
|
|||
|
|
@ -273,6 +273,11 @@ int goodix_get_ic_type(struct device_node *node,
|
|||
bus_inf->ic_type = IC_TYPE_NOTTINGHAM;
|
||||
return 0;
|
||||
}
|
||||
if (strstr(ic_name, "marseille")) {
|
||||
ts_info("ic type is marseille");
|
||||
bus_inf->ic_type = IC_TYPE_MARSEILLE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ts_err("unsupported ic type %s", ic_name);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue