PCM052: How to add STMPE touchscreen in kernel 3.13?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PCM052: How to add STMPE touchscreen in kernel 3.13?

ソリューションへジャンプ
5,423件の閲覧回数
mpfgregory
Contributor III

In kernel 3.13 the STMPE touchscreen device needs to be defined in the DTB. I already have I2C running (the RTC works fine). But I don't know how to make the touchscreen work. I have added the following entry to /arch/arm/boot/dts/vf610-pcm-952.dtsi:

&i2c2 {

    stmpe811: gpio-expander@41 {

        compatible = "st,stmpe811";

        #address-cells = <1>;

        #size-cells = <0>;

        reg = <0x41>;

        interrupts = <0 1>;

        interrupt-parent = <&gpio2>;

        interrupt-controller;

        /*irq-over-gpio;

        irq-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;*/

        id = <0>;

        blocks = <0x5>;

        irq-trigger = <0x1>;

        stmpegpio: stmpe-gpio {

            compatible = "stmpe,gpio";

            reg = <0>;

            gpio-controller;

            #gpio-cells = <2>;

            gpio,norequest-mask = <0xf3>;/*0xf0 does not work*/

        };

        stmpe610-ts {

            compatible = "stmpe,ts";

            reg = <0>;

            ts,sample-time = <4>;

            ts,mod-12b = <1>;

            ts,ref-sel = <0>;

            ts,adc-freq = <1>;

            ts,ave-ctrl = <3>;

            ts,touch-det-delay = <3>;

            ts,settling = <3>;

            ts,fraction-z = <6>;

            ts,i-drive = <0>;

        };

    };

};

By default there is only an entry: /* TODO Touch */, so I guess Timesys is working on it.

I have taken this definition form the AM335X BSP. I've changed the interrupt entries to match the FSL syntax (the AM335X interrupt entries are commented out). The interrupt CPU pin is PTB10, also known as GPIO32, or GPIO 0 of the second bank, therefore:

        interrupts = <0 1>;

        interrupt-parent = <&gpio2>;

The kernel ouputs the following messages:

stmpe-i2c 0-0041: failed to read regs 0x0: -22                            
stmpe-i2c: probe of 0-0041 failed with error -22                          
i2c i2c-0: IMX I2C adapter registered                                     

i2c /dev entries driver

What's going wrong here? Is this related to the interrupt, or is there a general I2C problem?

Best regards

Michael

ラベル(2)
0 件の賞賛
返信
1 解決策
4,219件の閲覧回数
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
4,220件の閲覧回数
CommunityBot
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!
0 件の賞賛
返信
4,225件の閲覧回数
catalincrenguta
Contributor I

Hello,

I own a Phytec Phycore Rapid Development Kit with 7" Touchscreen Display and I'm having the same problems using stmpe811 with vybrid pcm052 under linux v3.13 (linux-timesys). By looking at the schematics, I need to use a GPIO pin (ie. VF610_PAD_PTB10__GPIO_32 ) to generate interrupts. Like mpfgregory‌ said, VF610_PAD_PTB10_GPIO_32 is the first GPIO of the second GPIO bank, so I'm unsure whether my .dts is correctly written.

Need to mention here that the hardware(devkit, display, touchscreen) works without issues in linux v3.0 provided by timesyssupport‌ (which uses platform data).

mpfgregory‌, have you got any answers from Phytec regarding this issue? Thanks.

My vf610-pcm052.dts looks like this:

&i2c2 {
 clock-frequency = <100000>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_i2c2>;
 status = "okay";
 
 stmpe811: stmpe811@41 {
    compatible = "st,stmpe811";
    reg = <0x41>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_stmpe_ts>;
    #address-cells = <1>;
    #size-cells = <0>;
    interrupts = <32 IRQ_TYPE_LEVEL_LOW>;
    interrupt-parent = <&gpio2>;
    interrupt-controller;
    id = <0>;
    blocks = <0x05>;
    irq-trigger = <0x01>;
 };
};

&iomuxc {
    vf610-phycore {
       pinctrl_stmpe_ts: stmpe-tsgrp {
          fsl,pins = <
             VF610_PAD_PTB10__GPIO_32 0x42
          >;
       };
   /* other pinctrl groups */
   };
};‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

On vybrid:

root@pcm052:~# dmesg | grep stmpe
[ 0.432506] stmpe-i2c 0-0041: stmpe811 detected, chip id: 0x811
[ 0.440528] stmpe-i2c 0-0041: failed to request IRQ: -22
[ 0.446375] stmpe-i2c: probe of 0-0041 failed with error -22
0 件の賞賛
返信
4,225件の閲覧回数
mpfgregory
Contributor III

Dear Catalin,

I was not able to solve this, but I couldn't spend much time on it back then. Our final product uses an egalax touchscreen, so at that point I gave up support for the development board. I think I called Phytec, but I don't remember the answer. I've also switched from Timesys factory with 3.13 kernel to Yocto with Toradex 4.0 kernel. This works really well. Toradex is doing a good job with the Colibri BSP. They also have a very recent u-boot with splash screen support.

Best regards

Michael

0 件の賞賛
返信
4,225件の閲覧回数
catalincrenguta
Contributor I

Thanks a lot for your reply, Michael. I just emailed Phytec to support me on this issue. I will post here if I eventually solve this issue regarding the touchscreen driver on pcm052 using linux v3.13.

Best regards,

Catalin

0 件の賞賛
返信
4,225件の閲覧回数
timesyssupport
Senior Contributor II

Hello Michael,

The Phytec PCM052 3.13 kernel is maintained by Phytec - they leveraged our Vybrid Tower 3.13 kernel to port support for the phyCORE hardware you are working with.

Phytec has not yet enabled this touchscreen in the 3.13 kernel - I am not immediately aware of plans to update this kernel, so I would suggest for the faster answer, contacting your Phytec FAE to determine availability.

Regards,

Timesys Support

4,225件の閲覧回数
mpfgregory
Contributor III

Thanks, I'll check with Phytec.

0 件の賞賛
返信
4,225件の閲覧回数
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport​ can you  able to  help here?

0 件の賞賛
返信