Using the Touch Controller with I2C

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the Touch Controller with I2C

Jump to solution
1,863 Views
cjej1004
Contributor II

Hi

I'm developing a device using imx6ul, but I am going to change from using ADC to using I2C because touch input value keeps getting distorted.
I was using the imx6ul evk and device tree configuration the same way when using the ADC method (see below)

tsc: tsc @ 02040000 {
compatible = "fsl, imx6ul-tsc";
reg = <0x02040000 0x4000>, <0x0219c000 0x4000>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
clocks = <& clks IMX6UL_CLK_IPG>,
<& clks IMX6UL_CLK_ADC2>;
clock-names = "tsc", "adc";
status = "disabled";
};

pinctrl_tsc: tscgrp {
fsl, pins = <
MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0
MX6UL_PAD_GPIO1_IO02__GPIO1_IO02 0xb0
MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0xb0
>;
};

& tsc {
pinctrl-names = "default";
pinctrl-0 = <& pinctrl_tsc>;
status = "okay";
xnur-gpio = <& gpio1 3 0>;
measure_delay_time = <0xffff>;
pre_charge_time = <0xfff>;
};

Currently I do not use I2C2 in other modules, but I want to connect the touch controller to I2C2_SCL and I2C2_SDA, but I do not know how to modify the dts file

i2c0 = & i2c1;
i2c1 = & i2c2;
i2c2 = & i2c3;
i2c3 = & i2c4;

i2c2: i2c @ 021a4000 {
# address-cells = <1>;
# size-cells = <0>;
compatible = "fsl, imx6ul-i2c & quot ;," fsl, imx21-i2c & quot ;;
reg = & lt; 0x021a4000 0x4000 & gt;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
clocks = <& clks IMX6UL_CLK_I2C2>;
status = "disabled";
};

pinctrl_i2c2: i2c2grp {
fsl, pins = <
MX6UL_PAD_GPIO1_IO00__I2C2_SCL 0x4001b8b1
MX6UL_PAD_GPIO1_IO01__I2C2_SDA 0x4001b8b1
>;
};


& i2c3 {
clock-frequency = & lt; 100000 & gt ;;
pinctrl-names = "default";
pinctrl-0 = <& pinctrl_i2c2>;
status = "okay";

tsc2007: tsc2007 @ 48 {
compatible = "ti, tcs2007 & quot ;;
reg = <0x48>;
interrupt-parent = <???>;
interrupts = <???>;
gpios = <??? ??? GPIO_ACTIVE_LOW>;
ti, x-plate-ohms = & lt; 180 & gt ;;
linux, wakeup;
};
};

Can I use I2C interrupts without a separate interrupt pin for touch interrupts?
I don't know how to put the question mark part of tsc2007.
Please help me.

Labels (1)
1 Solution
1,610 Views
igorpadykov
NXP Employee
NXP Employee

Hi ellie

one can look at i.MX6UL tsc2007 example in

imx6ul-tx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,610 Views
cjej1004
Contributor II

Hi igor

Thank you so much for the example link.
I will be very grateful for your kindness.

Best regards
ellie

0 Kudos
1,611 Views
igorpadykov
NXP Employee
NXP Employee

Hi ellie

one can look at i.MX6UL tsc2007 example in

imx6ul-tx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------