5 wire touchscreen setup

Hi

Does anyone know how to set up 5 wire touchscreen interface? I’ve copied this piece of code from the LCD4 dts file and changed the number of wires to 5 and the analog channels to 3.

`
tscadc {
compatible = “ti,ti-tscadc”;
reg = <0x44e0d000 0x1000>;

interrupt-parent = <&intc>;
interrupts = <16>;
ti,hwmods = “adc_tsc”;
status = “okay”;

tsc {
ti,wires = <5>;
ti,x-plate-resistance = <200>;
ti,steps-to-configure = <5>;
ti,wire-config = <0x00 0x11 0x22 0x33>;
};

adc {
/* ti,adc-channels = <4>; */
ti,adc-channels = <3>;
};
};

`

I hooked up the hardware as follows:
AIN0 ----- UL
AIN1 ----- UR

AIN2 ----- LL

AIN3 ----- LR

AIN4 ----- SENSE/Wiper

The AM335x TRM specifies AIN0 - AIN3 but does not say anything about the SENSE pin - have I connected it correctly?

This didn’t work! With the code and hardware set up as above, when I slide my finger from left to right the cursor moves from top right of the screen to lower left. Moving from bottom to top does not move the cursor. The cursor jumps a lot. When I run ts_calibrate, it just goes straight thru’ - I get no chance to touch the screen.

I tried switching the sense line and it seems slightly better when sense is connected to AIN0 - at least I can run ts_calibrate and it steps through the points normally but the values are rubbish.

Can anyone tell me :-

  1. Does 5 wire work in 3.8.13 kernel?
  2. Do I need to make further changes to the dts? Point me to directions please!
  3. Where is the sense connected if not to AIN4?

Regards,
James

Anyone???

Not me.

Gerald