Skip to content

Commit

Permalink
duos 8inch 800x1280 display add TP driver
Browse files Browse the repository at this point in the history
modify in loadsystemko.sh
when you need to install the gt9xx TP driver
  • Loading branch information
carbonfix committed May 20, 2024
1 parent 5d8e680 commit e0a7273
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
status = "okay";
};

&i2c4 {
status = "okay";

gt9xx: gt9xx@14 {
compatible = "goodix,gt9xx";
reg = <0x14>;
goodix,irq-gpio = <&porta 18 0>;
goodix,rst-gpio = <&porta 19 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};

&spi3 {
status = "okay";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ int cvi_board_init(void)
// LED
PINMUX_CONFIG(IIC0_SDA, XGPIOA_29);

// I2C4
//PINMUX_CONFIG(VIVO_D1, IIC4_SCL);
//PINMUX_CONFIG(VIVO_D0, IIC4_SDA);
// I2C4 for TP
PINMUX_CONFIG(VIVO_D1, IIC4_SCL);
PINMUX_CONFIG(VIVO_D0, IIC4_SDA);

// SPI3
PINMUX_CONFIG(VIVO_D8, SPI3_SDO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
status = "okay";
};

&i2c4 {
status = "okay";

gt9xx: gt9xx@14 {
compatible = "goodix,gt9xx";
reg = <0x14>;
goodix,irq-gpio = <&porta 18 0>;
goodix,rst-gpio = <&porta 19 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};

&spi3 {
status = "okay";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ int cvi_board_init(void)
// LED
PINMUX_CONFIG(IIC0_SDA, XGPIOA_29);

// I2C4
//PINMUX_CONFIG(VIVO_D1, IIC4_SCL);
//PINMUX_CONFIG(VIVO_D0, IIC4_SDA);
// I2C4 for TP
PINMUX_CONFIG(VIVO_D1, IIC4_SCL);
PINMUX_CONFIG(VIVO_D0, IIC4_SDA);

// SPI3
PINMUX_CONFIG(VIVO_D8, SPI3_SDO);
Expand Down
2 changes: 2 additions & 0 deletions device/milkv-duos-sd/overlay/mnt/system/ko/loadsystemko.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ insmod /mnt/system/ko/cvi_vc_driver.ko MaxVencChnNum=9 MaxVdecChnNum=9
#insmod /mnt/system/ko/cv181x_rtc.ko
insmod /mnt/system/ko/cv181x_ive.ko

#insmod /mnt/system/ko/3rd/gt9xx.ko

echo 3 > /proc/sys/vm/drop_caches
dmesg -n 4

Expand Down
7 changes: 5 additions & 2 deletions osdrv/extdrv/tp/ts_gt9xx/gt9xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,22 @@
#ifdef CONFIG_OF
#include <linux/of_gpio.h>
#include <linux/regulator/consumer.h>
#define GTP_CONFIG_OF
#endif

#ifdef CONFIG_FB
#include <linux/notifier.h>
#include <linux/fb.h>
#endif

#ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h>
#endif

//***************************PART1:ON/OFF define*******************************
#define GTP_CUSTOM_CFG 1
#define GTP_CUSTOM_CFG 0
#define GTP_CHANGE_X2Y 0 //swap x y
#define GTP_DRIVER_SEND_CFG 1 //driver send config
#define GTP_DRIVER_SEND_CFG 0 //driver send config
#define GTP_HAVE_TOUCH_KEY 0
#define GTP_POWER_CTRL_SLEEP 0 //power off when suspend
#define GTP_ICS_SLOT_REPORT 0 // slot protocol
Expand Down

0 comments on commit e0a7273

Please sign in to comment.