This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4378: resistive touch screen setup

Part Number: AM4378
Other Parts Discussed in Thread: SYSBIOS, AM4372,

Tool/software: Linux

hi

we have a custom board and we are trying to connect a resistive touch screen to ACD0.

out linux kernel is 4.3.0.5

here is the quick schematic:

here is the section in the dts file (which is purely a guess, i have never set this up before):

&tscadc {
status = "okay";
compatible = "ti,am3359-tscadc";
tsc {
ti,wires = <4>;
ti,x-plate-resistance = <600>;
ti,coordinate-readouts = <5>;
ti,wire-config = <0x00 0x13 0x21 0x32>;
ti,charge-delay = <0x700>;
ti,alt_pins_conf;
};

adc {
ti,adc-channels = <0 1 2 3>;
ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
ti,chan-step-avg = <16 2 4 8>;
};
};

our touch screen is an elpa, here is the datsheet:

touchscreen.pdf

when the kernel loads i see

[ 14.923063] input: ti-tsc as /devices/platform/44000000.ocp/44e0d000.tscadc/TI-am335x-tsc/input/input1

but when the matrix program loads there is no reaction to a touch event and since i have never calibrated the touch screen i would imagine that would be one of the first things it does but it doesn't. when i touch the panel nothing happens.

help?

  • Please post to which ADC input each TS wire is connected - XL, XR, YU, YD.
  • according to the datasheet the connector is as:

    so we have

    ADC0 -> X-Left

    ADC1 -> Y-Down

    ADC2 -> X-Right

    ADC3 -> Y-Up

  • (Nick edits in blue)

    cobsonchael said:
    out linux kernel is 4.3.0.5

    I strongly advise moving to a better supported kernel.  For example, moving to 4.4.x should be a very small delta but would at least put you on an LTS kernel.  Better yet, move to a newer LTS kernel like 4.9 or 4.14.  TI just released the final Linux SDK based on kernel 4.14 (Processor SDK Linux 5.03).  The next release due in July will move to kernel 4.19. Please note that TI no longer supports questions about Linux 4.3x or Linux 4.4.x on the forums because those versions of Linux are too old.

    cobsonchael said:
    ti,wire-config = <0x00 0x13 0x21 0x32>;

    You mentioned this corresponds to the following wire configuration:

    • X+ => AIN0
    • Y- => AIN1
    • X- => AIN2
    • Y+ => AIN3

    There's an issue though...  The hardware is not fully orthogonal.  AIN1 and AIN2 can be driven high or low.  However, AIN0 can only drive high, and AIN3 can only drive low.  So not every combination of inputs is possible.

    The best tested and supported configuration would be:

    • X+ => AIN0
    • X- => AIN1
    • Y+ => AIN2
    • Y- => AIN3

    That would correspond to 

    ti,wire-config = <0x00 0x11 0x22 0x33>;

    Are you able to change to that configuration?  Alternatively, I think your current setup could work if you reversed what you are calling Y+ and Y-.  In other words, if you try changing your wire config to this:

    ti,wire-config = <0x00 0x12 0x21 0x33>;

    The reason for this is that when determining the Y coordinate, we drive Y+ high and Y- low.  However, your original configuration had Y+ on AIN3 which can only be driven low.  So if we simply reverse the definition, now you can make a measurement, though you will be "upside down".  I think that can be handled by the software, though that's yet another thing to consider.  That's why changing the wiring is the preferred option.

    Brad & Nick

  • i appreciate the feedback. i have never set up a touch screen before so this helps.

    so we are likely going to do another run of this board and fix some stuff

    do you agree, based on the datasheet for the touchscreen that
    X+ = XL
    X- = XR
    Y+ = YU
    Y- = YD
    ?

    if we were to make changes according to this info you gave me we should set up the connection as:

    AIN0 -> X+ = XL = connector 1
    AIN1 -> X- = XR = connector 3
    AIN2 -> Y+ = YU = connector 4
    AIN3 -> Y- = YD = connector 2

    in addition, when the wire-config gets fixed does my software setup look correct for getting the drivers to load and for the touchscreen to work? right now i get no activity from it at all from what i can tell. is there a way to determine if the touch screen is actually up and running and registering touches (even if the coordinates are wrong)?
  • i did set up some code using ioctl and i did verify there are responses to touches but it only registers at the very bottom of the touch panel.
  • cobsonchael said:
    do you agree, based on the datasheet for the touchscreen that
    X+ = XL
    X- = XR
    Y+ = YU
    Y- = YD

    That is my interpretation as well.

    cobsonchael said:
    if we were to make changes according to this info you gave me we should set up the connection as:

    AIN0 -> X+ = XL = connector 1
    AIN1 -> X- = XR = connector 3
    AIN2 -> Y+ = YU = connector 4
    AIN3 -> Y- = YD = connector 2

    Right.  Hopefully this is something someone can wire up as a test run before committing to a full board spin.  Looks like I was expecting though!

    cobsonchael said:
    in addition, when the wire-config gets fixed does my software setup look correct for getting the drivers to load and for the touchscreen to work? right now i get no activity from it at all from what i can tell. is there a way to determine if the touch screen is actually up and running and registering touches (even if the coordinates are wrong)?

    I think the underlying libraries have changed in the time since I last looked at this.  It used to be based on tslib which had a test application called tstest.  I just had a quick look at the software manifest for the SDK and didn't see either of these listed.  It looks like evtest is bundled, so that's likely a good starting point, e.g.:

    evtest /dev/input/touchscreen0

    When you touch the screen you should see it outputting data (hopefully!).

  • Quick check, when you say "our linux kernel is 4.3.0.5" do you mean you are using Linux Processor SDK 4.03.00.05? (which uses Linux 4.9.69?)

    Regards,
    Nick
  • my bad, i might have been a little out of it when i started this post (new dad)

    our SDk is 4.3.0.5, the linux kernel is 4.9.69

    we are going to try and pull up the pins on the connector and run lines to test points to correct the connector layout issue

  • cobsonchael said:
    our SDk is 4.3.0.5, the linux kernel is 4.9.69

    That's much better!  Ok, glad to hear it.  Congrats on the baby.  :-)

  • ok, we made the hadrware change to our board and now, according to my ioctl code, i am getting touch events everywhere on the screen. unfortunately the matrix application isn't registering any of my touch presses. when i run weston_calibrator it did register touches when i touched the targets but when that was done it still doesn't register in matrix.

    the output of evtest is (touching 4 points on the screen):
    root@am437x-evm:~# evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0: matrix_keypad0
    /dev/input/event1: ti-tsc
    Select the device event number [0-1]: 1
    Input driver version is 1.0.1
    Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
    Input device name: "ti-tsc"
    Supported events:
    Event type 0 (EV_SYN)
    Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
    Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
    Value 4095
    Min 0
    Max 4095
    Event code 1 (ABS_Y)
    Value 2485
    Min 0
    Max 4095
    Event code 24 (ABS_PRESSURE)
    Value 0
    Min 0
    Max 4095
    Properties:
    Testing ... (interrupt to exit)
    Event: time 1556032501.260775, type 3 (EV_ABS), code 0 (ABS_X), value 3540
    Event: time 1556032501.260775, type 3 (EV_ABS), code 1 (ABS_Y), value 2798
    Event: time 1556032501.260775, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 84
    Event: time 1556032501.260775, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    Event: time 1556032501.260775, -------------- SYN_REPORT ------------
    Event: time 1556032501.262775, type 3 (EV_ABS), code 0 (ABS_X), value 3539
    Event: time 1556032501.262775, type 3 (EV_ABS), code 1 (ABS_Y), value 2793
    Event: time 1556032501.262775, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 109
    Event: time 1556032501.262775, -------------- SYN_REPORT ------------
    Event: time 1556032501.264823, type 3 (EV_ABS), code 0 (ABS_X), value 3545
    Event: time 1556032501.264823, type 3 (EV_ABS), code 1 (ABS_Y), value 2798
    Event: time 1556032501.264823, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 97
    Event: time 1556032501.264823, -------------- SYN_REPORT ------------
    Event: time 1556032501.266870, type 3 (EV_ABS), code 0 (ABS_X), value 3547
    Event: time 1556032501.266870, type 3 (EV_ABS), code 1 (ABS_Y), value 2800
    Event: time 1556032501.266870, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 86
    Event: time 1556032501.266870, -------------- SYN_REPORT ------------
    Event: time 1556032501.268928, type 3 (EV_ABS), code 0 (ABS_X), value 3546
    Event: time 1556032501.268928, type 3 (EV_ABS), code 1 (ABS_Y), value 2807
    Event: time 1556032501.268928, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 91
    Event: time 1556032501.268928, -------------- SYN_REPORT ------------
    Event: time 1556032501.270977, type 3 (EV_ABS), code 0 (ABS_X), value 3544
    Event: time 1556032501.270977, type 3 (EV_ABS), code 1 (ABS_Y), value 2813
    Event: time 1556032501.270977, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 98
    Event: time 1556032501.270977, -------------- SYN_REPORT ------------
    Event: time 1556032501.273036, type 3 (EV_ABS), code 0 (ABS_X), value 3543
    Event: time 1556032501.273036, type 3 (EV_ABS), code 1 (ABS_Y), value 2815
    Event: time 1556032501.273036, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 103
    Event: time 1556032501.273036, -------------- SYN_REPORT ------------
    Event: time 1556032501.275085, type 3 (EV_ABS), code 0 (ABS_X), value 3542
    Event: time 1556032501.275085, type 3 (EV_ABS), code 1 (ABS_Y), value 2817
    Event: time 1556032501.275085, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 104
    Event: time 1556032501.275085, -------------- SYN_REPORT ------------
    Event: time 1556032501.277205, type 3 (EV_ABS), code 0 (ABS_X), value 3541
    Event: time 1556032501.277205, type 3 (EV_ABS), code 1 (ABS_Y), value 2820
    Event: time 1556032501.277205, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 105
    Event: time 1556032501.277205, -------------- SYN_REPORT ------------
    Event: time 1556032501.279212, type 3 (EV_ABS), code 1 (ABS_Y), value 2823
    Event: time 1556032501.279212, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 106
    Event: time 1556032501.279212, -------------- SYN_REPORT ------------
    Event: time 1556032501.281257, type 3 (EV_ABS), code 0 (ABS_X), value 3540
    Event: time 1556032501.281257, type 3 (EV_ABS), code 1 (ABS_Y), value 2824
    Event: time 1556032501.281257, -------------- SYN_REPORT ------------
    Event: time 1556032501.283315, type 3 (EV_ABS), code 1 (ABS_Y), value 2826
    Event: time 1556032501.283315, -------------- SYN_REPORT ------------
    Event: time 1556032501.285363, type 3 (EV_ABS), code 1 (ABS_Y), value 2827
    Event: time 1556032501.285363, -------------- SYN_REPORT ------------
    Event: time 1556032501.287415, type 3 (EV_ABS), code 1 (ABS_Y), value 2829
    Event: time 1556032501.287415, -------------- SYN_REPORT ------------
    Event: time 1556032501.289455, type 3 (EV_ABS), code 1 (ABS_Y), value 2831
    Event: time 1556032501.289455, -------------- SYN_REPORT ------------
    Event: time 1556032501.291521, type 3 (EV_ABS), code 0 (ABS_X), value 3541
    Event: time 1556032501.291521, type 3 (EV_ABS), code 1 (ABS_Y), value 2832
    Event: time 1556032501.291521, -------------- SYN_REPORT ------------
    Event: time 1556032501.293575, type 3 (EV_ABS), code 0 (ABS_X), value 3540
    Event: time 1556032501.293575, type 3 (EV_ABS), code 1 (ABS_Y), value 2834
    Event: time 1556032501.293575, -------------- SYN_REPORT ------------
    Event: time 1556032501.295620, type 3 (EV_ABS), code 1 (ABS_Y), value 2836
    Event: time 1556032501.295620, -------------- SYN_REPORT ------------
    Event: time 1556032501.297676, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 105
    Event: time 1556032501.297676, -------------- SYN_REPORT ------------
    Event: time 1556032501.509121, >>>>>>>>>>>>>> SYN_DROPPED <<<<<<<<<<<<
    Event: time 1556032501.509121, -------------- SYN_REPORT ------------
    Event: time 1556032501.509759, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
    Event: time 1556032501.509759, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
    Event: time 1556032501.509759, -------------- SYN_REPORT ------------
    Event: time 1556032510.975411, type 3 (EV_ABS), code 0 (ABS_X), value 566
    Event: time 1556032510.975411, type 3 (EV_ABS), code 1 (ABS_Y), value 859
    Event: time 1556032510.975411, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 266
    Event: time 1556032510.975411, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
    Event: time 1556032510.975411, -------------- SYN_REPORT ------------
    Event: time 1556032510.977418, type 3 (EV_ABS), code 0 (ABS_X), value 559
    Event: time 1556032510.977418, type 3 (EV_ABS), code 1 (ABS_Y), value 854
    Event: time 1556032510.977418, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 289
    Event: time 1556032510.977418, -------------- SYN_REPORT ------------
    Event: time 1556032510.979472, type 3 (EV_ABS), code 0 (ABS_X), value 561
    Event: time 1556032510.979472, type 3 (EV_ABS), code 1 (ABS_Y), value 860
    Event: time 1556032510.979472, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 283
    Event: time 1556032510.979472, -------------- SYN_REPORT ------------
    Event: time 1556032510.981515, type 3 (EV_ABS), code 0 (ABS_X), value 556
    Event: time 1556032510.981515, type 3 (EV_ABS), code 1 (ABS_Y), value 870
    Event: time 1556032510.981515, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 282
    Event: time 1556032510.981515, -------------- SYN_REPORT ------------
    Event: time 1556032510.983575, type 3 (EV_ABS), code 0 (ABS_X), value 552
    Event: time 1556032510.983575, type 3 (EV_ABS), code 1 (ABS_Y), value 887
    Event: time 1556032510.983575, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 281
    Event: time 1556032510.983575, -------------- SYN_REPORT ------------
    Event: time 1556032510.985624, type 3 (EV_ABS), code 0 (ABS_X), value 551
    Event: time 1556032510.985624, type 3 (EV_ABS), code 1 (ABS_Y), value 892
    Event: time 1556032510.985624, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 280
    Event: time 1556032510.985624, -------------- SYN_REPORT ------------
    Event: time 1556032510.987703, type 3 (EV_ABS), code 0 (ABS_X), value 548
    Event: time 1556032510.987703, type 3 (EV_ABS), code 1 (ABS_Y), value 898
    Event: time 1556032510.987703, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 279
    Event: time 1556032510.987703, -------------- SYN_REPORT ------------
    Event: time 1556032510.989753, type 3 (EV_ABS), code 0 (ABS_X), value 547
    Event: time 1556032510.989753, type 3 (EV_ABS), code 1 (ABS_Y), value 901
    Event: time 1556032510.989753, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 278
    Event: time 1556032510.989753, -------------- SYN_REPORT ------------
    Event: time 1556032510.991802, type 3 (EV_ABS), code 0 (ABS_X), value 546
    Event: time 1556032510.991802, type 3 (EV_ABS), code 1 (ABS_Y), value 904
    Event: time 1556032510.991802, -------------- SYN_REPORT ------------
    Event: time 1556032510.993854, type 3 (EV_ABS), code 0 (ABS_X), value 545
    Event: time 1556032510.993854, type 3 (EV_ABS), code 1 (ABS_Y), value 906
    Event: time 1556032510.993854, -------------- SYN_REPORT ------------
    Event: time 1556032510.995906, type 3 (EV_ABS), code 0 (ABS_X), value 544
    Event: time 1556032510.995906, type 3 (EV_ABS), code 1 (ABS_Y), value 909
    Event: time 1556032510.995906, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 277
    Event: time 1556032510.995906, -------------- SYN_REPORT ------------
    Event: time 1556032510.997955, type 3 (EV_ABS), code 0 (ABS_X), value 543
    Event: time 1556032510.997955, type 3 (EV_ABS), code 1 (ABS_Y), value 913
    Event: time 1556032510.997955, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 276
    Event: time 1556032510.997955, -------------- SYN_REPORT ------------
    Event: time 1556032511.000004, type 3 (EV_ABS), code 0 (ABS_X), value 541
    Event: time 1556032511.000004, type 3 (EV_ABS), code 1 (ABS_Y), value 916
    Event: time 1556032511.000004, -------------- SYN_REPORT ------------
    Event: time 1556032511.002054, type 3 (EV_ABS), code 0 (ABS_X), value 539
    Event: time 1556032511.002054, type 3 (EV_ABS), code 1 (ABS_Y), value 918
    Event: time 1556032511.002054, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 275
    Event: time 1556032511.002054, -------------- SYN_REPORT ------------
    Event: time 1556032511.004091, type 3 (EV_ABS), code 0 (ABS_X), value 537
    Event: time 1556032511.004091, type 3 (EV_ABS), code 1 (ABS_Y), value 923
    Event: time 1556032511.004091, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 273
    Event: time 1556032511.004091, -------------- SYN_REPORT ------------
    Event: time 1556032511.006149, type 3 (EV_ABS), code 0 (ABS_X), value 535
    Event: time 1556032511.006149, type 3 (EV_ABS), code 1 (ABS_Y), value 925
    Event: time 1556032511.006149, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 272
    Event: time 1556032511.006149, -------------- SYN_REPORT ------------
    Event: time 1556032511.305597, >>>>>>>>>>>>>> SYN_DROPPED <<<<<<<<<<<<
    Event: time 1556032511.305597, -------------- SYN_REPORT ------------
    Event: time 1556032511.307645, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.307645, -------------- SYN_REPORT ------------
    Event: time 1556032511.309692, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.309692, -------------- SYN_REPORT ------------
    Event: time 1556032511.311744, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.311744, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.311744, -------------- SYN_REPORT ------------
    Event: time 1556032511.313827, type 3 (EV_ABS), code 1 (ABS_Y), value 2534
    Event: time 1556032511.313827, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.313827, -------------- SYN_REPORT ------------
    Event: time 1556032511.315874, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.315874, -------------- SYN_REPORT ------------
    Event: time 1556032511.317940, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.317940, -------------- SYN_REPORT ------------
    Event: time 1556032511.319988, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.319988, -------------- SYN_REPORT ------------
    Event: time 1556032511.322019, type 3 (EV_ABS), code 1 (ABS_Y), value 2476
    Event: time 1556032511.322019, -------------- SYN_REPORT ------------
    Event: time 1556032511.324067, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.324067, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.324067, -------------- SYN_REPORT ------------
    Event: time 1556032511.326132, type 3 (EV_ABS), code 1 (ABS_Y), value 2480
    Event: time 1556032511.326132, -------------- SYN_REPORT ------------
    Event: time 1556032511.328165, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.328165, -------------- SYN_REPORT ------------
    Event: time 1556032511.330213, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.330213, -------------- SYN_REPORT ------------
    Event: time 1556032511.332266, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.332266, -------------- SYN_REPORT ------------
    Event: time 1556032511.334319, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.334319, -------------- SYN_REPORT ------------
    Event: time 1556032511.336356, type 3 (EV_ABS), code 1 (ABS_Y), value 2488
    Event: time 1556032511.336356, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.336356, -------------- SYN_REPORT ------------
    Event: time 1556032511.338408, type 3 (EV_ABS), code 1 (ABS_Y), value 2474
    Event: time 1556032511.338408, -------------- SYN_REPORT ------------
    Event: time 1556032511.340452, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.340452, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.340452, -------------- SYN_REPORT ------------
    Event: time 1556032511.342499, type 3 (EV_ABS), code 1 (ABS_Y), value 2468
    Event: time 1556032511.342499, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.342499, -------------- SYN_REPORT ------------
    Event: time 1556032511.344549, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.344549, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.344549, -------------- SYN_REPORT ------------
    Event: time 1556032511.346595, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.346595, -------------- SYN_REPORT ------------
    Event: time 1556032511.348648, type 3 (EV_ABS), code 1 (ABS_Y), value 2485
    Event: time 1556032511.348648, -------------- SYN_REPORT ------------
    Event: time 1556032511.649760, >>>>>>>>>>>>>> SYN_DROPPED <<<<<<<<<<<<
    Event: time 1556032511.649760, type 3 (EV_ABS), code 1 (ABS_Y), value 2475
    Event: time 1556032511.649760, -------------- SYN_REPORT ------------
    Event: time 1556032511.651821, type 3 (EV_ABS), code 1 (ABS_Y), value 2476
    Event: time 1556032511.651821, -------------- SYN_REPORT ------------
    Event: time 1556032511.653864, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.653864, -------------- SYN_REPORT ------------
    Event: time 1556032511.655906, type 3 (EV_ABS), code 1 (ABS_Y), value 2468
    Event: time 1556032511.655906, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.655906, -------------- SYN_REPORT ------------
    Event: time 1556032511.657946, type 3 (EV_ABS), code 1 (ABS_Y), value 2476
    Event: time 1556032511.657946, -------------- SYN_REPORT ------------
    Event: time 1556032511.659989, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.659989, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.659989, -------------- SYN_REPORT ------------
    Event: time 1556032511.662060, type 3 (EV_ABS), code 1 (ABS_Y), value 2480
    Event: time 1556032511.662060, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.662060, -------------- SYN_REPORT ------------
    Event: time 1556032511.664092, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.664092, -------------- SYN_REPORT ------------
    Event: time 1556032511.666138, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.666138, -------------- SYN_REPORT ------------
    Event: time 1556032511.668202, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.668202, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.668202, -------------- SYN_REPORT ------------
    Event: time 1556032511.670239, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.670239, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.670239, -------------- SYN_REPORT ------------
    Event: time 1556032511.672278, type 3 (EV_ABS), code 1 (ABS_Y), value 2471
    Event: time 1556032511.672278, -------------- SYN_REPORT ------------
    Event: time 1556032511.674328, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.674328, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.674328, -------------- SYN_REPORT ------------
    Event: time 1556032511.678437, type 3 (EV_ABS), code 1 (ABS_Y), value 2474
    Event: time 1556032511.678437, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.678437, -------------- SYN_REPORT ------------
    Event: time 1556032511.680483, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.680483, -------------- SYN_REPORT ------------
    Event: time 1556032511.682503, type 3 (EV_ABS), code 1 (ABS_Y), value 2470
    Event: time 1556032511.682503, -------------- SYN_REPORT ------------
    Event: time 1556032511.684562, type 3 (EV_ABS), code 1 (ABS_Y), value 2471
    Event: time 1556032511.684562, -------------- SYN_REPORT ------------
    Event: time 1556032511.686624, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.686624, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.686624, -------------- SYN_REPORT ------------
    Event: time 1556032511.688651, type 3 (EV_ABS), code 1 (ABS_Y), value 2474
    Event: time 1556032511.688651, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.688651, -------------- SYN_REPORT ------------
    Event: time 1556032511.690718, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.690718, -------------- SYN_REPORT ------------
    Event: time 1556032511.692751, type 3 (EV_ABS), code 1 (ABS_Y), value 2475
    Event: time 1556032511.692751, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.692751, -------------- SYN_REPORT ------------
    Event: time 1556032511.928568, >>>>>>>>>>>>>> SYN_DROPPED <<<<<<<<<<<<
    Event: time 1556032511.928568, -------------- SYN_REPORT ------------
    Event: time 1556032511.930610, type 3 (EV_ABS), code 1 (ABS_Y), value 2475
    Event: time 1556032511.930610, -------------- SYN_REPORT ------------
    Event: time 1556032511.932674, type 3 (EV_ABS), code 1 (ABS_Y), value 2482
    Event: time 1556032511.932674, -------------- SYN_REPORT ------------
    Event: time 1556032511.934702, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.934702, -------------- SYN_REPORT ------------
    Event: time 1556032511.936755, type 3 (EV_ABS), code 1 (ABS_Y), value 2480
    Event: time 1556032511.936755, -------------- SYN_REPORT ------------
    Event: time 1556032511.940873, type 3 (EV_ABS), code 1 (ABS_Y), value 2508
    Event: time 1556032511.940873, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.940873, -------------- SYN_REPORT ------------
    Event: time 1556032511.942918, type 3 (EV_ABS), code 1 (ABS_Y), value 2476
    Event: time 1556032511.942918, -------------- SYN_REPORT ------------
    Event: time 1556032511.944965, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.944965, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.944965, -------------- SYN_REPORT ------------
    Event: time 1556032511.947016, type 3 (EV_ABS), code 1 (ABS_Y), value 2480
    Event: time 1556032511.947016, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.947016, -------------- SYN_REPORT ------------
    Event: time 1556032511.949075, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.949075, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.949075, -------------- SYN_REPORT ------------
    Event: time 1556032511.951131, type 3 (EV_ABS), code 1 (ABS_Y), value 2478
    Event: time 1556032511.951131, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.951131, -------------- SYN_REPORT ------------
    Event: time 1556032511.953154, type 3 (EV_ABS), code 1 (ABS_Y), value 2474
    Event: time 1556032511.953154, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.953154, -------------- SYN_REPORT ------------
    Event: time 1556032511.955216, type 3 (EV_ABS), code 1 (ABS_Y), value 2482
    Event: time 1556032511.955216, -------------- SYN_REPORT ------------
    Event: time 1556032511.957245, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.957245, -------------- SYN_REPORT ------------
    Event: time 1556032511.959299, type 3 (EV_ABS), code 1 (ABS_Y), value 2481
    Event: time 1556032511.959299, -------------- SYN_REPORT ------------
    Event: time 1556032511.963416, type 3 (EV_ABS), code 1 (ABS_Y), value 2509
    Event: time 1556032511.963416, -------------- SYN_REPORT ------------
    Event: time 1556032511.965461, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.965461, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.965461, -------------- SYN_REPORT ------------
    Event: time 1556032511.967511, type 3 (EV_ABS), code 1 (ABS_Y), value 2481
    Event: time 1556032511.967511, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.967511, -------------- SYN_REPORT ------------
    Event: time 1556032511.969558, type 3 (EV_ABS), code 1 (ABS_Y), value 2480
    Event: time 1556032511.969558, -------------- SYN_REPORT ------------
    Event: time 1556032511.971620, type 3 (EV_ABS), code 1 (ABS_Y), value 2481
    Event: time 1556032511.971620, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.971620, -------------- SYN_REPORT ------------
    Event: time 1556032511.973665, type 3 (EV_ABS), code 1 (ABS_Y), value 2479
    Event: time 1556032511.973665, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.973665, -------------- SYN_REPORT ------------
    Event: time 1556032511.975691, type 3 (EV_ABS), code 1 (ABS_Y), value 2477
    Event: time 1556032511.975691, -------------- SYN_REPORT ------------
    Event: time 1556032511.977752, type 3 (EV_ABS), code 1 (ABS_Y), value 2483
    Event: time 1556032511.977752, -------------- SYN_REPORT ------------
    Event: time 1556032511.981878, type 3 (EV_ABS), code 1 (ABS_Y), value 2513
    Event: time 1556032511.981878, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032511.981878, -------------- SYN_REPORT ------------
    Event: time 1556032511.983919, type 3 (EV_ABS), code 1 (ABS_Y), value 2475
    Event: time 1556032511.983919, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 169
    Event: time 1556032511.983919, -------------- SYN_REPORT ------------
    Event: time 1556032511.985967, type 3 (EV_ABS), code 1 (ABS_Y), value 2481
    Event: time 1556032511.985967, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 170
    Event: time 1556032512.217480, >>>>>>>>>>>>>> SYN_DROPPED <<<<<<<<<<<<
    Event: time 1556032512.217480, -------------- SYN_REPORT ------------
    Event: time 1556032512.219519, type 3 (EV_ABS), code 0 (ABS_X), value 541
    Event: time 1556032512.219519, type 3 (EV_ABS), code 1 (ABS_Y), value 2728
    Event: time 1556032512.219519, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 234
    Event: time 1556032512.219519, -------------- SYN_REPORT ------------
    Event: time 1556032512.221567, type 3 (EV_ABS), code 0 (ABS_X), value 543
    Event: time 1556032512.221567, type 3 (EV_ABS), code 1 (ABS_Y), value 2726
    Event: time 1556032512.221567, -------------- SYN_REPORT ------------
    Event: time 1556032512.223622, type 3 (EV_ABS), code 1 (ABS_Y), value 2724
    Event: time 1556032512.223622, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 233
    Event: time 1556032512.223622, -------------- SYN_REPORT ------------
    Event: time 1556032512.225668, type 3 (EV_ABS), code 0 (ABS_X), value 545
    Event: time 1556032512.225668, type 3 (EV_ABS), code 1 (ABS_Y), value 2721
    Event: time 1556032512.225668, -------------- SYN_REPORT ------------
    Event: time 1556032512.227699, type 3 (EV_ABS), code 0 (ABS_X), value 547
    Event: time 1556032512.227699, type 3 (EV_ABS), code 1 (ABS_Y), value 2719
    Event: time 1556032512.227699, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 232
    Event: time 1556032512.227699, -------------- SYN_REPORT ------------
    Event: time 1556032512.229763, type 3 (EV_ABS), code 0 (ABS_X), value 548
    Event: time 1556032512.229763, type 3 (EV_ABS), code 1 (ABS_Y), value 2716
    Event: time 1556032512.229763, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 231
    Event: time 1556032512.229763, -------------- SYN_REPORT ------------
    Event: time 1556032512.231790, type 3 (EV_ABS), code 0 (ABS_X), value 550
    Event: time 1556032512.231790, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 230
    Event: time 1556032512.231790, -------------- SYN_REPORT ------------
    Event: time 1556032512.233860, type 3 (EV_ABS), code 0 (ABS_X), value 551
    Event: time 1556032512.233860, type 3 (EV_ABS), code 1 (ABS_Y), value 2713
    Event: time 1556032512.233860, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 229
    Event: time 1556032512.233860, -------------- SYN_REPORT ------------
    Event: time 1556032512.235901, type 3 (EV_ABS), code 0 (ABS_X), value 553
    Event: time 1556032512.235901, type 3 (EV_ABS), code 1 (ABS_Y), value 2712
    Event: time 1556032512.235901, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 228
    Event: time 1556032512.235901, -------------- SYN_REPORT ------------
    Event: time 1556032512.237937, type 3 (EV_ABS), code 0 (ABS_X), value 555
    Event: time 1556032512.237937, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 227
    Event: time 1556032512.237937, -------------- SYN_REPORT ------------
    Event: time 1556032512.240002, type 3 (EV_ABS), code 1 (ABS_Y), value 2710
    Event: time 1556032512.240002, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 224
    Event: time 1556032512.240002, -------------- SYN_REPORT ------------
    Event: time 1556032512.242035, type 3 (EV_ABS), code 0 (ABS_X), value 557
    Event: time 1556032512.242035, type 3 (EV_ABS), code 1 (ABS_Y), value 2708
    Event: time 1556032512.242035, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 220
    Event: time 1556032512.242035, -------------- SYN_REPORT ------------
    Event: time 1556032512.244084, type 3 (EV_ABS), code 0 (ABS_X), value 560
    Event: time 1556032512.244084, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 210
    Event: time 1556032512.244084, -------------- SYN_REPORT ------------
    Event: time 1556032512.246136, type 3 (EV_ABS), code 0 (ABS_X), value 2099
    Event: time 1556032512.246136, type 3 (EV_ABS), code 1 (ABS_Y), value 2667
    Event: time 1556032512.246136, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 220
    Event: time 1556032512.246136, -------------- SYN_REPORT ------------
    Event: time 1556032512.246671, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
    Event: time 1556032512.246671, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
    Event: time 1556032512.246671, -------------- SYN_REPORT ------------


    the output of the calibrator was:
    root@am437x-evm:~# weston-calibrator
    could not load cursor 'dnd-move'
    could not load cursor 'dnd-copy'
    could not load cursor 'dnd-none'
    Calibration values: -1.044096 -0.021588 1048.812988 -0.016084 -1.128152 642.111572

    what is my next step?
  • Since I can't see where you're touching on the screen as you do this evtest, can you please do the following:

    1. Touch upper left corner of the screen.
    2. Provide ONE "representative" output coordinate value and post it, e.g. X=2099, Y=2667, Z=220 (Z being pressure).
    3. Repeat for upper right, lower left, lower right corners.

    Basically I want to know the exact relationship between corners of your screen and the reported coordinates. If there is mirroring, rotation, etc. that can be too much to overcome with calibration.
  • ok

    fyi when i run "ps" there is not a matrix process. is it possible this is some kind of wallpaper?

    upper Left
    (this thing is dumping out data for 44s before i cancelled it. something isn't right, almost all of it ABS_Y data)
    -------------- SYN_REPORT ------------
    Event: time 1556036669.682258, type 3 (EV_ABS), code 0 (ABS_X), value 3884
    Event: time 1556036669.682258, type 3 (EV_ABS), code 1 (ABS_Y), value 3549
    Event: time 1556036669.682258, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 59

    upper Right
    (same giant dump of data)
    -------------- SYN_REPORT ------------
    Event: time 1556037102.500596, type 3 (EV_ABS), code 0 (ABS_X), value 217
    Event: time 1556037102.500596, type 3 (EV_ABS), code 1 (ABS_Y), value 3547
    Event: time 1556037102.500596, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 238

    lower left
    (same giant dump of data)
    -------------- SYN_REPORT ------------
    Event: time 1556037233.294737, type 3 (EV_ABS), code 0 (ABS_X), value 3875
    Event: time 1556037233.294737, type 3 (EV_ABS), code 1 (ABS_Y), value 300
    Event: time 1556037233.294737, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 117

    lower right
    (same giant dump of data, this one stopped on it's own after 3s)
    -------------- SYN_REPORT ------------
    Event: time 1556037336.631966, type 3 (EV_ABS), code 0 (ABS_X), value 270
    Event: time 1556037336.631966, type 3 (EV_ABS), code 1 (ABS_Y), value 490
    Event: time 1556037336.631966, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 316



    it seems when i get the giant data outputs i can sometimes get it to stop by tapping the middle of screen quickly, but not always

    i always thought upper left in the display was 0,0 but this is showing the lower right as 0,0 it would seem
  • The numbers start out high in the upper left and are low in the lower right. This makes sense based on how the voltages get applied, but numerically it looks like your touchscreen is rotated 180 degrees. Back in the pre-Weston days when we were using TsLib, we had to explicitly state that the touchscreen needed to have 180 degree rotation. It sounds like the Weston calibration might figure this out. I'm not positive to be honest.

    Here's my thought for starters... Please run these commands:

    rm /etc/udev/rules.d/ws-calibrate.rules
    rm /run/media/mmcblk0p1/ws-calibrate.rules
    reboot

    When the device reboots, it should go through the calibration again. See how things are behaving afterward. Also, please post the contents of one of those newly creates "rules" files.
  • it did indeed go through calibration again but the matrix screen does not change when i touch it.

    ws-calibrate.rules:
    root@am437x-evm:~# cat /etc/udev/rules.d/ws-calibrate.rules
    SUBSYSTEM=="input", ENV{WL_CALIBRATION}="-1.032016 0.031554 1033.080322 -0.078230 -1.076745 678.386169"
  • Are you planning to use Weston in your end product, or is that just an interim step? If you won't be using Weston, then we'd be better off switch to TsLib now rather than later...

    Also, do you happen to have an AM335x EVM? That's probably the best point of comparison with respect to resistive touchscreen. I've turned my desk over trying to find my AM335x EVM, though it seems that someone may have "borrowed" it. I wanted to compare the ws-calibrate.rules from that board as it also has a similarly rotated touchscreen (from the perspective of resistive touch).
  • i'll be honest with you - we are so new to making a linux project we didn't even know what weston was until i tried to run Qt and it bombed because weston wasn't running. we are having a 3rd party handle our graphics for this product so we will see what they saw we need and don't need to run their product.

    we use this touch screen on another product that we have based on the 6748 with SYSBIOS and a touch controller. the calibration numbers we use for that product are:

    #define TSC_A_CONST 0.1616379F
    #define TSC_B_CONST -44.0790486F
    #define TSC_C_CONST -0.2607733F
    #define TSC_D_CONST 1046.0061035F

  • i actually did find a evm3358-sk-lcd kit that we got from another company. i made a boot card and calibrated the touchscreen. here are the constants:

    root@am335x-evm:~# cat /etc/udev/rules.d/ws-calibrate.rules
    SUBSYSTEM=="input", ENV{WL_CALIBRATION}="-1.024413 0.034021 482.770844 -0.102811 -1.000275 311.421997"
  • FYI, I was out of the office today. I will try to respond tomorrow.

  • i appreciate the heads up

    i just found out that our graphics setup will not use weston it will use something called DRM
  • cobsonchael said:
    i just found out that our graphics setup will not use weston it will use something called DRM

    That changes things substantially.  A different touch framework (TsLib) is used for non-Weston applications.  You will need to rebuild your filesystem to remove Weston (Wayland):

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Overview_Building_the_SDK.html#common-variations-no-sgx-x11-etc

    There's a different calibration function (ts_calibrate) that gets used in that case, and a different calibration file (pointercal).  More info is available here:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/How_to_Guides_Target.html#how-to-recalibrate-the-touchscreen

    There's correspondingly a program called ts_test that lets you draw on the screen while it dumps out coordinate data.

    I think you'll also need to add the following line to /etc/profile.d/qt-env.sh:

    QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=180

    Once you get to a point where you have the SDK rebuilt without Wayland, then try out some of these items and provide an update.

    Best regards,
    Brad

  • sorry i've been away from this project for a few days

    do i need to disable sgx? i would imagine not

    from what i understand i need to add to local.conf:

    PACKAGECONFIG_remove="wayland-egl"

    DISTRO_FEATURES_remove = "wayland"

    do i need to do anything with x11?

  • cobsonchael said:
    do i need to disable sgx? i would imagine not

    The thread post mentions AM4378.  If that's what you're using in your end-product and you want to leverage the GPU, then there's nothing to be done.  If you were using AM4372 in your end product (no GPU) then it would be very important to also specify:

    MACHINE_FEATURES_remove="sgx"

    PACKAGECONFIG_remove="wayland-egl"

    cobsonchael said:

    from what i understand i need to add to local.conf:

    PACKAGECONFIG_remove="wayland-egl"

    DISTRO_FEATURES_remove = "wayland"

    It should be sufficient to specify only this one:

    DISTRO_FEATURES_remove = "wayland"

  • cobsonchael said:
    do i need to do anything with x11?

    In general most people prefer Wayland over the legacy X11.  There are a few people that still require X11 and so that section is there for those cases.  If you needed X11, you would likely know it.  That being the case, there's nothing you need to do, i.e. X11 is disabled by default.

  • ok thanks for that.

    fyi we haven't really had anything to do with yocto since our training back in march 2018 so i'm rather lost on the whole yocto thing right now. i have a feeling this isn't the right forum to ask basic questions to understand how it works but it's going to take me a while to understand what i am doing and why.

    is there a good source that i can look at that is basically "yocto for dummies" or something like that?
  • cobsonchael said:
    is there a good source that i can look at that is basically "yocto for dummies" or something like that?

    I recommend this training:

    https://training.ti.com/customizing-yocto-for-production-series

    The training itself consists of a combination of slides and command line demonstration.  The overall flow closely follows this wiki page which was co-developed with the training:

    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Getting_Started_with_Openembedded

    If you've done some of this before, perhaps the wiki page alone is sufficient, though if you're looking for some more detailed discussion to go with it, watch the video.  And don't be too hard on the presenter (it's me!).  ;-)

  • so here's the pickle - i got yocto to the point where i can build the rootfs file system with the command to remove wayland. unfortunately we have a requirement (due to us not having a RTC crystal) that a linux kernel file needs to be changed to get us to be able to boot. so when i use the yocto rootfs our board will not boot. so how do i go about making the kernel change in the yocto space so i can boot? or is there a way to remove weston/wayland in the sdk board support kernel files so i can skip yocto for this portion? (next board rev will have a RTC crystal so we don't need to alter kernel after this board but we won't get the next board spin until we have all the hardware figured out one way or another)
  • After you untar your new file system onto the SD card you just need to manually overwrite the dtb with your custom dtb. The RTC detail is comprehended there. If you have a custom u-boot you can copy that too.

  • unfortunately it has nothing to do with the dtb or u-boot

    we have to change:

    arch/arm/mach-omap2/omap_hwmod_43xx_data.c

    to remove these lines of code

    int __init am43xx_hwmod_init(void)
    {
    int ret;

    omap_hwmod_am43xx_reg();
    omap_hwmod_init();
    ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);

    -> if (!ret && of_machine_is_compatible("ti,am4372"))
    -> ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);

    return ret;
    }

    so it is actually a kernel change

  • What was the initial issue that led you to make that change? Are you sure that's correct? Is this related to not having a 32k clock connected to the RTC? Do you actually keep RTC_PORZ asserted all the time, or is RTC_PORZ connected to PORZ?
  • For example, if you don't have an external 32k clock connected then you can edit this node in the dts:

    &rtc {
    clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
    clock-names = "ext-clk", "int-clk";
    status = "okay";
    };

    The clocks are optional so you can configure like this:

    &rtc {
    clocks = <&clk_32768_ck>;
    clock-names = "int-clk";
    status = "okay";
    };

    I wonder if you made that hwmod change when perhaps the above change would be sufficient.

    Best regards,
    Brad
  • there are a couple of e2e posts that drove us (colleague and i) to make that change:

    e2e.ti.com/.../2926082

    e2e.ti.com/.../791785

    i can try your change and see if it works
  • i tried your inclusion for the DTS file and it made no difference so apparently those kernel changes are required to boot the board.

    is it possible to disable weston by disabling the startup scripts in the kernel (so i don't have to go through yocto to do it)
  • cobsonchael said:
    i tried your inclusion for the DTS file and it made no difference so apparently those kernel changes are required to boot the board.

    is it possible to disable weston by disabling the startup scripts in the kernel (so i don't have to go through yocto to do it)

    You need to rebuild the file system.  The underlying programs are built differently depending on the back-end.  You can manually copy/paste your updated zImage over the top same as I expect you have done with the original file system.

  • here's what i did:

    i made your change to the DTS file. i took out the "disabled" status

    i undid the changes to the kernel

    i rebuilt the kernel in the board support directory using this script:
    file="/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/arch/arm/boot/zImage"

    cd /home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- distclean
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am437x-evm_defconfig
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- zImage


    if [ -f "$file" ]
    then
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- modules
    echo "Build Success!"
    else
    echo "Build Failed!"
    fi

    i rebuilt the dtb files using this script:
    file="/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/arch/arm/boot/dts/am437x-UTI.dtb"

    cd /home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am437x-evm_defconfig
    make ARCH=arm CROSS_COMPILE=/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am437x-UTI.dtb
    if [ -f "$file" ];
    then
    cd arch/arm/boot/dts/
    cp am437x-UTI.dtb /tftpboot/
    cp am437x-UTI.dts /home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/u-boot-2017.01+gitAUTOINC+c68ed086bd-gc68ed086bd/arch/arm/dts/
    cp am437x-UTI.dtb /home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/u-boot-2017.01+gitAUTOINC+c68ed086bd-gc68ed086bd/arch/arm/dts/
    ls -l /tftpboot/ | grep am437x-UTI.dtb
    else
    echo "File Did not Build"
    fi

    i deployed the dtb files and installed the kernel on the SDCard:
    dtb_file="/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/arch/arm/boot/dts/am437x-UTI.dtb"
    kernel_file="/home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/arch/arm/boot/zImage"
    kernel_dest_dir="/media/michael_j/rootfs/boot/"

    cp "$dtb_file" "$kernel_dest_dir"


    cp "$kernel_file" "$kernel_dest_dir"

    cd /home/ULTRATEC/michael_j/ti-processor-sdk-linux-am437x-evm-04.03.00.05/board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae/
    make ARCH=arm INSTALL_MOD_PATH="$kernel_dest_dir" modules_install

    i do a sync and umount

    insert the SDCard, power up the board, board never gets past "Loading Kernel..."

    re-comment out those lines in the kernel, recompile the kernel, re-deploy the kernel, it boots up

    in addition with those settings in the DTS file i get a TON of errors in my boot log



    but this is a problem that has already been solved on this board and won't be a problem on the next (as the next board will have a RTC crystal)

    so for now:

    is it possible to disable weston by disabling the startup scripts in the kernel (so i don't have to go through yocto to do it)
  • You have to rebuild Yocto. One of the outputs of the Yocto build will be a new root file system. Once you get to that point you can:

    1. Run the create-sdcard.sh script.
    2. Bail after the file system partitioning is complete.
    3. Copy your newly generated MLO and u-boot.img to the boot partition.
    4. Untar your file system to the rootfs.
    5. Overwrite the dtb and zImage in your file system using your customized versions.
    6. Unmount/eject.
    7. Now your board should boot using your customized dtb/zImage, but without Wayland/Weston support, and with tslib support for the touchscreen.

    That last point on tslib is important. Besides losing Weston, you also lose the software that does the calibration. That was why we paused to do this in the first place.
  • ok so how do i go about editing the kernel in yocto so i can make the changes required for my board to boot?


    in the meantime i ran weston-flower and i found that the inputs are all inverted. if he flower shows up on the upper left i touched in the lower right and moved my finger around. the flower moved when i did and it went down when i went up and it went left when i went right, etc.

    is it possible i have my XL and XR backwards with the X+ and X- and same with YU and YD? is it possible that XR is X+ and YD is Y+?
  • cobsonchael said:
    is it possible i have my XL and XR backwards with the X+ and X- and same with YU and YD? is it possible that XR is X+ and YD is Y+?

    Well, good question!  I expect that flip-flopping your XL/XR connections and your YU/YD connections will indeed fix your issue (i.e. that would be a "hardware rotation" of your touchscreen).  As I'm thinking about this, I think it would be a great thing to do, especially if you haven't solidified your design yet.  I expect things will work properly (after a recalibration) if you make that change.  I'm pretty sure that would completely avoid the 180 degree software rotation needed for the touchscreen.  Assuming it works, I think that will be the new suggested hookup!!!

  • Hello,
    I am marking this thread resolved. Feel free to reply if you need to continue the discussion.

    Brad, thank you for the awesome support!

    Regards,
    Nick
  • cobsonchael -- I'd love to hear if you were able to successfully flip-flop those connections for "hardware rotation". Hopefully with that in place things start working properly for you. You may still have some work to do later when you remove Wayland, but hopefully you're on the path to success!
  • finally got back to working on this

    so as you said at the start:

    Brad Griffis said:
    cobsonchael -- There's an issue though...  The hardware is not fully orthogonal.  AIN1 and AIN2 can be driven high or low.  However, AIN0 can only drive high, and AIN3 can only drive low.  So not every combination of inputs is possible.

    so switching the connections was a failure. my calibration numbers are ugly. i think we were right to begin with for the translation of up/down/left/right to +/- and by switching them i disabled them like when it was hooked up wrong to begin with. i think the drivers and the touch panel are opposite where it considers 0,0. i don't suppose there is a driver option that alters this? when it was hooked up where it was working (only backwards) i tried playing around with the wire-config option but that didn't make any difference.

    so i will have to try an disable weston to be able to rotate the touchscreen in the drivers, is that right?

  • cobsonchael said:
    so i will have to try an disable weston to be able to rotate the touchscreen in the drivers, is that right?

    You shouldn't have to.  Do you have this file in your file system:

    root@am335x-evm:~# cat /etc/profile.d/qt_env.sh
    #!/bin/sh

    ### QT Environment Variables ###
    export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=180"
    export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
    export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
    export QT_QPA_EGLFS_INTEGRATION=none
    export QT_WAYLAND_SHELL_INTEGRATION=xdg-shell-v5

    I'm wondering if either this is the thing you're missing, or maybe even the opposite that the presence of the highlighted variable is rotating the screen when you don't actually need any rotation at all!

    Whatever it is (present or not), edit the file to do the opposite.  Either use # to comment out the line, or add the line if it isn't there, delete the calibration, and then reboot, recalibrate, and see if it is any better...

  • so here is something i don't understand

    i take out the SDCard, i put it in my computer, i navigate to rootfs/etc/profile.d/qt_env.sh and i open the file, edit it, save it, eject it, put it in my board, boot it up, do a cat, and the line i entered was not there. i take it out and put it in the PC again and the line is there. in the board, cat says it isn't there. in the PC text editor says it is

    huh?
  • Not sure about your computer issue!  Use vi to do it directly on your target.

    What do you see when you simply echo this variable from your target:

    root@am335x-evm:~# echo $QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS

    rotate=180

    And what do you see when you cat the file like I showed in my previous post?

  • i changed it using vi

    when i cat i get:

    root@am437x-evm:~# cat /etc/profile.d/qt_env.sh
    #!/bin/sh

    ### QT Environment Variables ###
    export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="rotate=180"
    export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
    export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
    export QT_QPA_EGLFS_INTEGRATION=none


    when i echo i get:

    root@am437x-evm:~# echo $QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS
    rotate=180


    when i calibrate and run flower nothing is different. it still runs in opposite directions and i have to start on an opposite end to start it.
  • For clarity, what did that file look like to begin with? Did it not exist and you added it? Or did you just add that one line?
  • it looked like i showed minus the rotate 180 line, so:

    #!/bin/sh

    ### QT Environment Variables ###
    export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
    export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
    export QT_QPA_EGLFS_INTEGRATION=none
  • Which app is it that you're trying? There's one in the Matrix Gui that I use. If you go under the "Touch" folder the app is called "Interaction". Does that seem to work any better? The environment variable I mentioned has "QT" in the name, so I suspect it only applies to Qt apps.
  • we don't have the matrix loaded. i've been using weston-flower. i'll try and get it loaded so i can try other things
  • so i went to /usr/share/qt5/examples/quick/touchinteraction and ran ./touchinteraction which gave me the menu for games/touch demos. the menu was only accessible from the inverse side of the screen (as usual) and the demo i picked was also only accessible from the opposite side of the screen. i tried taking out the "rotate=180" and rebooting and reran the demo and it was still like that (verified with the echo command).

    my system appears to be rather stubborn

  • cobsonchael said:

    finally got back to working on this

    so as you said at the start:

    Brad Griffis
    cobsonchael -- There's an issue though...  The hardware is not fully orthogonal.  AIN1 and AIN2 can be driven high or low.  However, AIN0 can only drive high, and AIN3 can only drive low.  So not every combination of inputs is possible.

    so switching the connections was a failure. my calibration numbers are ugly. i think we were right to begin with for the translation of up/down/left/right to +/- and by switching them i disabled them like when it was hooked up wrong to begin with. i think the drivers and the touch panel are opposite where it considers 0,0. i don't suppose there is a driver option that alters this? when it was hooked up where it was working (only backwards) i tried playing around with the wire-config option but that didn't make any difference.

    so i will have to try an disable weston to be able to rotate the touchscreen in the drivers, is that right?

    I think you misunderstood what I wanted you to do.  I just wanted you to swap the wires, i.e.do NOT change any software correspondingly.  I still want everything driven exactly the way it's driven now, but swapping the X+/X- and Y+/Y-. wires.  I think that will give you a hardware fix to this rotation issue that we just can't seem to correctly solve in software! (Surely there's a way to do this in software, but I'm struggling to find it right now!)