Adding touch screen driver to Wandboard, i2c device registra

Discussion of the PICO module, baseboard or peripherals

Adding touch screen driver to Wandboard, i2c device registra

Postby akash_savairam » Tue Jun 06, 2017 9:43 am

Hello Everyone, I am new here. After posting a query on stackoverflow, felt that this would be better place to post a wandboard-specific question.
First I must to tell you, I am not really from electronics background, I have very rough knowledge about Linux drivers, I2C, touch screens, etc. Hope I will get some help here.

Problem background


My Wandboard was previously working with Fusion 7 touch display worked with Prism touch screen driver, already provided by Wandboard.
As per my new requirement, I have got Ilitek touch screen which I am trying get it working with my Wandboard dual (i.MX6-Cortex-A9, Linux Kernel:3.0.35).

I got following Ilitek touch screen driver files under folder ilitek_limv3_0_9.
ilitek_lim.c ilitek.h ilitek_update.c ilitek_i2c.idc

I compiled the driver into Linux kernel as a built-in module, tried to run on the board but failed. The driver doesn't appear in /dev/input.
I debuged the kerenl code a bit, and found that the code doesn't reach to driver's 'probe' function, instead it fails in device binding (i2c device registration). Just then I come to know about Device tree.
I looked into following dts files (which I believe my Wandboard is using), putting little i2c configuration present in the files here.

imx6qdl.dtsi

Code: Select all
i2c1: i2c@021a0000 {
   #address-cells = <1>;
   #size-cells = <0>;
   compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
   reg = <0x021a0000 0x4000>;
   interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>;
   clocks = <&clks IMX6QDL_CLK_I2C1>;
   status = "disabled";
};

i2c2: i2c@021a4000 {
   #address-cells = <1>;
   #size-cells = <0>;
   compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
   reg = <0x021a4000 0x4000>;
   interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>;
   clocks = <&clks IMX6QDL_CLK_I2C2>;
   status = "disabled";
};

i2c3: i2c@021a8000 {
   #address-cells = <1>;
   #size-cells = <0>;
   compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
   reg = <0x021a8000 0x4000>;
   interrupts = <0 38 IRQ_TYPE_LEVEL_HIGH>;
   clocks = <&clks IMX6QDL_CLK_I2C3>;
   status = "disabled";
};


imx6qdl-wandboard.dtsi

Code: Select all
&hdmi {
   ddc-i2c-bus = <&i2c1>;
   status = "okay";
};

&i2c1 {
   clock-frequency = <100000>;
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_i2c1>;
   status = "okay";
};

&i2c2 {
   clock-frequency = <100000>;
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_i2c2>;
   status = "okay";

   codec: sgtl5000@0a {
      compatible = "fsl,sgtl5000";
      reg = <0x0a>;
      clocks = <&clks 201>;
      VDDA-supply = <&reg_2p5v>;
      VDDIO-supply = <&reg_3p3v>;
   };
};


I see dts note entry for sgtl5000 which is audio codec which then appears as /dev/input/event0. But I don't find any entry for 'prism' driver, which actually runs perfectly on the board. Neither dts files nor board-files have entry for 'prism' driver. But I am sure it's using 'device-tree' approach.

Questions

1. As my Wandboard works fine with 'prism' driver and touch device, why I don't see device node entry for 'prism' in dts files ?
2. Is there any other way for 'i2c device registration' other than 'device-tree' and 'earlier board-file' approach ?
3. How could I get past with ilitek touch driver not getting i2c-matched/registered problem ?

Thanks in advance.
akash_savairam
 
Posts: 1
Joined: Tue Jun 06, 2017 9:31 am

Return to Hardware and peripherals

Who is online

Users browsing this forum: No registered users and 3 guests