Changes between Version 23 and Version 24 of ventana/LVDS


Ignore:
Timestamp:
10/13/2021 08:18:56 PM (10 months ago)
Author:
Tim Harvey
Comment:

added screen rotation example

Legend:

Unmodified
Added
Removed
Modified
  • ventana/LVDS

    v23 v24  
    824824While the code changes can be fairly simple, determining the timings can be complicated and involves translating timings from the manufacturers datasheet to the display timings that Linux drivers need.
    825825
     826=== Handling Screen rotation
     827As an example let's assume you have a touchscreen display using an edt-ft5x06 touch controller and your screen's display 0,0 agrees with the touch input 0,0 both in the top-right corner of the display (determined with evtest) but you want to rotate your screen 90deg clockwise to put it in 'portrait mode'. This would cause the x/y coordinates to be wrong requiring some mapping in the Linux input subsystem. This scenario would require us to
     828
     829dt fragment:
     830{{{
     831&i2c3 {
     832        clock-frequency = <100000>;
     833        pinctrl-names = "default";
     834        pinctrl-0 = <&pinctrl_i2c3>;
     835        status = "okay";
     836
     837        touchscreen: touchscreen@38 {
     838                compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
     839                pinctrl-names = "default";
     840                pinctrl-0 = <&pinctrl_touch>;
     841                reg = <0x38>;
     842                interrupt-parent = <&gpio7>;
     843                interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
     844                touchscreen-swapped-x-y;
     845                touchscreen-inverted-y;
     846                touchscreen-size-x = <1024>;
     847                touchscreen-size-y = <600>;
     848        };
     849};
     850
     851&iomuxc {
     852        pinctrl_touch: touchgrp {
     853                fsl,pins = <
     854                        MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b0
     855                >;
     856        };
     857};
     858}}}
     859
     860Again, use the 'evdev' application to determine where the touch sensor's 0,0 coordinate is and make it match the display's 0,0. Hint, run 'evdev /dev/input/event0 | grep ABS_X' to show only the X coordinate then switch to the Y coordinate to help understand the mapping.
     861
    826862=== Determining Display Timing values
    827863