当前位置: 首页 > news >正文

em3288 linux_4.19 lvds+tp调试

一、显示配置
\rk3288_linux4.19\kernel\arch\arm\boot\dts\rk3288-evb-act8846.dtspanel {compatible ="simple-panel";backlight = <&backlight>;bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;enable-gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;enable-delay-ms = <1>;power-supply = <&vcc_lcd>;rockchip,data-mapping = "vesa"; //rgb  closerockchip,data-width = <24>;rockchip,output = "lvds";display-timings {native-mode = <&timing0>;timing0: timing0 {clock-frequency = <78000000>;hactive = <1280>;vactive = <800>;hback-porch = <100>;hfront-porch = <18>;vback-porch = <8>;vfront-porch = <6>;hsync-len = <10>;vsync-len = <2>;hsync-active = <0>;vsync-active = <0>;de-active = <0>;pixelclk-active = <0>;};};port {panel_in_lvds: endpoint {remote-endpoint = <&lvds_out_panel>;};};};	
.............................
&route_lvds {status = "okay";
};&lvds {status = "okay";ports {port@1 {reg = <1>;lvds_out_panel: endpoint {remote-endpoint = <&panel_in_lvds>;};};};
};&lvds_in_vopl {status = "okay";
};&lvds_in_vopb {status = "disabled";
};&backlight {
//	enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;pinctrl-names = "default";
//	pinctrl-0 = <&bl_en>;pwms = <&pwm1 0 1000000 PWM_POLARITY_INVERTED>;
};&pwm1 {status = "okay";
};
二、gt928 配置
\rk3288_linux4.19\kernel\arch\arm\boot\dts\rk3288-evb-act8846.dts&i2c4 {status = "okay";ts@02 {compatible = "goodix,gt9xx";reg = <0x5d>;touch-gpio = <&gpio8 RK_PB1 IRQ_TYPE_LEVEL_LOW>;reset-gpio = <&gpio7 RK_PA6 GPIO_ACTIVE_LOW>;max-x = <1280>;max-y = <800>;};
};
\rk3288_linux4.19\kernel\drivers\input\touchscreen\gt9xx\gt9xx.cstatic void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
{if (gtp_change_x2y)GTP_SWAP(x, y);
+        x = ts->abs_x_max - x; if (!bgt911 && !bgt970) {if (gtp_x_reverse)x = ts->abs_x_max - x;if (gtp_y_reverse)y = ts->abs_y_max - y;}..........................
static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id *id)
{s32 ret = -1;struct goodix_ts_data *ts;u16 version_info;struct device_node *np = client->dev.of_node;
+ //   enum of_gpio_flags rst_flags, pwr_flags;
+ 	enum of_gpio_flags rst_flags;u32 val;printk("%s() start\n", __func__);GTP_DEBUG_FUNC();//do NOT remove these logsGTP_INFO("GTP Driver Version: %s", GTP_DRIVER_VERSION);GTP_INFO("GTP I2C Address: 0x%02x", client->addr);i2c_connect_client = client;if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {GTP_ERROR("I2C check functionality failed.");return -ENODEV;}ts = kzalloc(sizeof(*ts), GFP_KERNEL);if (ts == NULL){GTP_ERROR("Alloc GFP_KERNEL memory failed.");return -ENOMEM;}memset(ts, 0, sizeof(*ts));if (!np) {dev_err(&client->dev, "no device tree\n");return -EINVAL;}
+    
+/*    if (of_property_read_u32(np, "tp-size", &val)) {dev_err(&client->dev, "no max-x defined\n");return -EINVAL;
+    } */
+if (val == 89) {m89or101 = TRUE;gtp_change_x2y = TRUE;gtp_x_reverse = FALSE;gtp_y_reverse = TRUE;} else if (val == 101) {m89or101 = FALSE;gtp_change_x2y = TRUE;gtp_x_reverse = TRUE;gtp_y_reverse = FALSE;} else if (val == 911) {m89or101 = FALSE;bgt911 = TRUE;gtp_change_x2y = TRUE;gtp_x_reverse = FALSE;gtp_y_reverse = TRUE;} else if (val == 9110) {m89or101 = FALSE;bgt9110 = TRUE;gtp_change_x2y = TRUE;gtp_x_reverse = TRUE;gtp_y_reverse = FALSE;} else if (val == 9111) {m89or101 = FALSE;bgt9111 = TRUE;gtp_change_x2y = TRUE;gtp_x_reverse = FALSE;gtp_y_reverse = FALSE;} else if (val == 970) {m89or101 = FALSE;bgt911 = FALSE;bgt970 = TRUE;gtp_change_x2y = FALSE;gtp_x_reverse = FALSE;gtp_y_reverse = TRUE;} else if (val == 910) {m89or101 = FALSE;bgt911 = FALSE;bgt970 = FALSE;bgt910 = TRUE;gtp_change_x2y = TRUE;gtp_x_reverse = FALSE;gtp_y_reverse = TRUE;}ts->tp_regulator = devm_regulator_get(&client->dev, "tp");if (IS_ERR(ts->tp_regulator)) {dev_err(&client->dev, "failed to get regulator, %ld\n",PTR_ERR(ts->tp_regulator));return PTR_ERR(ts->tp_regulator);}ret = regulator_enable(ts->tp_regulator);if (ret < 0)GTP_ERROR("failed to enable tp regulator\n");msleep(20);ts->irq_pin = of_get_named_gpio_flags(np, "touch-gpio", 0, (enum of_gpio_flags *)(&ts->irq_flags));ts->rst_pin = of_get_named_gpio_flags(np, "reset-gpio", 0, &rst_flags);+   //ts->pwr_pin = of_get_named_gpio_flags(np, "power-gpio", 0, &pwr_flags);//ts->tp_select_pin = of_get_named_gpio_flags(np, "tp-select-gpio", 0, &tp_select_flags);if (of_property_read_u32(np, "max-x", &val)) {dev_err(&client->dev, "no max-x defined\n");return -EINVAL;}//ts->abs_x_max = val;if (of_property_read_u32(np, "max-y", &val)) {dev_err(&client->dev, "no max-y defined\n");return -EINVAL;}//ts->abs_y_max = val;if (of_property_read_u32(np, "configfile-num", &val)) {ts->cfg_file_num = 0;} else {ts->cfg_file_num = val;}ts->pendown =PEN_RELEASE;ts->client = client;INIT_WORK(&ts->work, goodix_ts_work_func);ts->client = client;spin_lock_init(&ts->irq_lock);          // 2.6.39 later// ts->irq_lock = SPIN_LOCK_UNLOCKED;   // 2.6.39 & before
#if GTP_ESD_PROTECTts->clk_tick_cnt = 2 * HZ;      // HZ: clock ticks in 1 second generated by systemGTP_DEBUG("Clock ticks for an esd cycle: %d", ts->clk_tick_cnt);  spin_lock_init(&ts->esd_lock);// ts->esd_lock = SPIN_LOCK_UNLOCKED;
#endif

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

http://www.lryc.cn/news/105950.html

相关文章:

  • Linux 之 systemctl
  • 【技巧】通过 CMD 走代理下载 Vue
  • VSCode C/C++多文件编译配置
  • Autosar通信入门系列05-聊聊一帧Can/CanFD报文发送时间?
  • 【phaser微信抖音小游戏开发002】hello world!
  • 2023.07.29 驱动开发DAY6
  • 网工必须掌握的5种组网技术,你会了吗?
  • webpack中文文档
  • 【Linux指令篇】--- Linux常用指令汇总(克服指令繁杂问题)
  • 硬盘的分类
  • el-upload批量手动上传,并用form表单校验上传文件
  • 牛客网Verilog刷题——VL52
  • 4-7月预测价差方向准确率统计
  • 《Vue3+Typescript》一个简单的日历组件实现
  • 第一章 修学旅行
  • 如果你也能认识并使用这个低代码平台,那真的是泰酷辣——iVX低代码平台
  • uC-OS2 V2.93 STM32L476 移植:系统移植篇
  • gitee修改代码提交操作步骤说明
  • 物联网|可变参数的使用技巧|不一样的点灯实验|访问外设的寄存器|操作寄存器实现点灯|硬件编程的基本流程-学习笔记(11)
  • 30. 利用linprog 解决 生产决策问题(matlab程序)
  • 一百三十九、Kettle——Linux安装Kettle8.2
  • react路由在layout中的监听
  • Java反射(三)
  • ansible-playbook roles编写lnmp剧本
  • 相机可用性变化监听AvailabilityCallback流程分析
  • 使用Python多线程实现生产者消费者模型
  • Notepad++工具通过正则表达式批量替换内容
  • 从零构建深度学习推理框架-3 手写算子relu
  • 想做上位机,学C#还是QT?
  • Ansible —— playbook 剧本