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.

AM3352: Supporting multiple touchscreens in a single .dts file

Part Number: AM3352

I am facing a replacement of a touchscreen panel to a deliverable product. We currently use the following fragments in our .dts file:

panel {
compatible = "ti,tilcdc,panel";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_default>;
status = "okay";
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <16>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
native-mode = <&timing0>;
timing0: 320x240 {
hactive = <320>;
vactive = <240>;
hback-porch = <70>;
hfront-porch = <18>;
hsync-len = <2>;
vback-porch = <13>;
vfront-porch = <10>;
vsync-len = <2>;
clock-frequency = <6400000>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};

&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;

status = "okay";
clock-frequency = <400000>;

edt-ft5406@38 {
status = "okay";
compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
pinctrl-names = "default";
pinctrl-0 = <&edt_ft5406_ts_pins>;

reg = <0x38>;
interrupt-parent = <&gpio3>;
interrupts = <21 0>;
touchscreen-size-x = <320>;
touchscreen-size-y = <240>;
};

};

We would like to also support a similar drop-in, goodix gt9xxx, part and have a single .dts file that will work for either configuration by adding the new information to the existing ic21 fragment as per the example below:

gt9xx@14 {
compatible = "goodix,gt9xx";
reg = <0x14>;
interrupt-parent = <&gpio>;
interrupts = <0 0>;
};

Is this a possibility?

  • Hello David,

    To confirm: You are looking for ways to support two different boards with two different peripherals using the same devicetree file? What version of Linux are you using?

    TI does something similar with our AM335x ICEv2 board. Depending on whether the jumpers are set to use PRU Ethernet or CPSW ethernet, the boot process will grab different devicetree files (am335x-icev2-prueth.dts or am335x-icev2.dts). So the same software can be copied to all boards, and then depending on hardware differences the uboot files at board/ti/am335x/board.c and include/configs/am335x_evm.h select which device tree to load.

    Regards,

    Nick

  • Thanks Nick.

    Yes, we have a design that is currently distributed and in production that uses a 240x320 Focal Touch cap touch device. We are having sourcing issues and would like to replace with an updated peripheral but have one deliverable code update that can support both devices. I'll look at the ICEv2 design and see if that method will work, however, we won't be able to modify (set jumpers) on the previously distributed units.

    The linux build is 4.1.13.

    I'll follow up with additional info after looking a the ICEv2 board design.

    Dave

  • Hello David,

    Apologies for the delayed response, looks like I was waiting for you to take a look at the ICEv2 boards and forgot to reply. Please note that Linux kernel 4.1 is too old for us to support on the forums. The Linux devicetree and uboot initialization format used in current AM335x SDK releases may be different from the devicetree and uboot process in your kernel 4.1 software. But as long as the AM335x ICEv2 board was released before the Linux Processor SDK 2.x releases (which used Linux kernel 4.1), you should still be able to use that as an example:

    http://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/02_00_00_00/index_FDS.html
    https://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/02_00_02_11/index_FDS.html

    Regards,

    Nick