Difference between revisions of "DESK-MP1-L/Peripherals/Touchscreen"

From DAVE Developer's Wiki
Jump to: navigation, search
Line 28: Line 28:
 
...
 
...
 
...
 
...
soc {
+
/ {
 
     ...
 
     ...
 
     ...
 
     ...

Revision as of 13:24, 1 August 2023

History
Version Issue Date Notes
X.Y.Z 01/08/2023 DESK-MP1-L-1.0.0 release



Touchscreen[edit | edit source]

The screen supplied with the kit has a capacitive touchscreen, it is connected to the board via the USB OTG port

Are present also an i2c port (J20) for use other touchscreen eg. Ilitek i2c touchscreen, the driver ILI210X are already present on kernel, compatible with ili210x, ili2117, ili2120, ili251x

For add ilitek i2c touscreen add ilitek@41 node on kernel devicetree:

...
...
/ {
    ...
    ...
    i2cmux{
    ...
    ...
        i2c@0{
            ...
            ...
                ilitek@41 {
                    compatible = "ilitek,ili251x";
                    reg = <0x41>;
                    interrupt-parent = <&gpiod>;
                    interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
                    vin-supply = <&touch_vdd>;
                    ilitek,irq-gpio = <&gpiod 15 GPIO_ACTIVE_LOW>;
                    ilitek,reset-gpio = <&gpiod 14 GPIO_ACTIVE_LOW>;
                    ilitek,name = "ilitek_i2c";
                    touchscreen-size-x = <16384>;
                    touchscreen-size-y = <9600>;
                };
            ...
            ...
        };
        ...
        ...
    };
    ...
    ...
};
...
...

Calibration[edit | edit source]

Calibration is not necessary as it is a capacitive and non-resistive touch screen which does require calibration.

In any case if you use the tslib API you need to calibrate with ts_calibrate and then with ts_test check that the touscreen works correctly.