Hi,
I need to add a touchscreen driver on my i.mx6. I'm using Yocto and the kernel version is 3.10.
My touchscreen works with i2c communication and I'm tryng to add the parameters in my dts file (imx6q-qmx6.dts), but I'm with some doubts on the configurations. I don't know if the way of declare the variables is correct. The irq e rst pins can be declared with the GPIO number or I need to use another way?
See below the code that I added on dts file.
i2c@3 {
clock-frequency = <400000>;
tsc@24 {
compatible = "cy,cyttsp5_i2c_adapter";
reg = <0x24>;
/* GPIO 38, high-to-low edge triggered */
interrupts = <6 2>;
interrupt-parent = <&gpio2>;
cy,adapter_id = "cyttsp5_i2c_adapter";
cy,core {
cy,name = "cyttsp5_core";
cy,id = "main_ttsp_core";
cy,irq_gpio = <&gpio6>;
cy,rst_gpio = <&gpio4>;
cy,hid_desc_register = <1>;
/* CY_CORE_FLAG_WAKE_ON_GESTURE */
cy,flags = <1>;
cy,mt {
cy,name = "cyttsp5_mt";
cy,inp_dev_name = "cyttsp5_mt";
/* CY_MT_FLAG_FLIP | CY_MT_FLAG_INV_X | CY_MT_FLAG_INV_Y */
cy,flags = <0x38>;
cy,abs =
/* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
<0x35 0 880 0 0
/* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
0x36 0 1280 0 0
/* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
0x3a 0 255 0 0
/* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
0xffff 0 255 0 0
/* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
0x39 0 15 0 0
/* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
0x30 0 255 0 0
/* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
0x31 0 255 0 0
/* ABS_MT_ORIENTATION, -128, 127, 0, 0 */
0x34 0xfffffed7 127 0 0
/* ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0 */
0x37 0 1 0 0>;
};
cy,btn {
cy,name = "cyttsp5_btn";
cy,inp_dev_name = "cyttsp5_btn";
};
cy,proximity {
cy,name = "cyttsp5_proximity";
cy,inp_dev_name = "cyttsp5_proximity";
cy,abs =
/* ABS_DISTANCE, CY_PROXIMITY_MIN_VAL, CY_PROXIMITY_MAX_VAL, 0, 0 */
<0x19 0 1 0 0>;
};
};
};
Thanks
Hi Mauricio
one can look at example of sabresd egalax touchscreen :
egalax_ts, i2c2
linux-2.6-imx.git - Freescale i.MX Linux Tree
linux-2.6-imx.git - Freescale i.MX Linux Tree
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------