Touch Driver Banana Pi


Recommended Posts

Good Morning,

 

I'm using  the 5" LCD of LeMaker designed for Banana Pi. For some reason I changed from legacy Kernel to vanilla kernel. But now in the vanilla kernel touch screen driver isn't available anymore. In legacy kernel it the ft5x_ts module.

Is there an other way to make my Display working with touch again?

 

Displays: http://wiki.lemaker.org/BananaPro/Pi:LCD_Module

 

 

Martin

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Hi,

 

after getting the LCD - Display working, I now try to get touch working.

In sun7i-a20-bananapi.dts, I added:

&i2c3 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c3_pins_a>;
        edt: edt-ft5x06@38 {
                        compatible = "edt,edt-ft5x06";
                        reg = <0x38>;
                        interrupt-parent = <&pio>;
                        interrupts = <7 9 IRQ_TYPE_EDGE_FALLING>;
                        wake-gpios = <7 7 GPIO_ACTIVE_LOW>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&edt_ft5x06_pins>;
                        touchscreen-size-x = <800>;
                        touchscreen-size-y = <480>;
                        touchscreen-inverted-x;
                        touchscreen-swapped-x-y;
        };
};

directly after

&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins_a>;
status = "okay";
};

also added:

    edt_ft5x06_pins: edt_ft5x06_pins@0 {
            allwinner,pins = "PH7", "PH9";
            allwinner,function = "gpio_out";
            allwinner,drive = <SUN4I_PINCTRL_40_MA>;
            allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
    }; 

after 

led_pins_bananapi: led_pins@0 {
    allwinner,pins = "PH24";
    allwinner,function = "gpio_out";
    allwinner,drive = <SUN4I_PINCTRL_10_MA>;
    allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};

But unfortunately, touch doesn't work.

Any ideas, what went wrong? Maybe not the correct registers or something...

Got this from a patch: https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sunxi-next/bananapipro_lemaker_lcd.patch.disabled

But patch is for Bananapi pro

 

Hope to get some help.

Link to post
Share on other sites

I've been testing a bit arround and find out, that my entries of DTS File aren't in the platform devicetree. I think it must be there in 

/sys/devices/platform/soc@01c00000 

but there are only 

1c2ac00.i2c and 1c2b400.i2c

Any Ideas? 

 

I think there is a problem with the driver or something, so it's couldn't be loaded. Could it be, that is an option to be activated in Kernel config?

 

Yours,

Martin

Link to post
Share on other sites

After searching arround, I saw, that edt-ft5x06 wasn't compiled. 

First I added

CONFIG_TOUCHSCREEN_EDT_FT5X06=m

to Bananapi_defconfig. But that doesn't help. 

In Kconfig at /drivers/touchscreen/ I saw, that there must be a menu point in menuconfig.

And there it is: 

menuconfig > Device Drivers > Input Device Support > Touchscreens > EDT FocalTech FT5x06 I2C Touchscreen support

Set it to [*] (means compile as kernel modul)

Now, at

/sys/devices/platform/soc@01c00000 

there is a node for the I²C3

1c2b800.i2c

Thats a beginning.

But touch still doesn't work.

Link to post
Share on other sites

You had a good idea.

 

PH7 = 7 * 32 + 7 = gpio231. Correct?

 

With

 echo 231 > /sys/class/gpio/export

I get the gpio231 and can use it. 

So, if my calc wasn't wrong, PH7 isn't used by anything.

 

Is it possible, that 7 7 isn't PH7?

wake-gpios = <7 7 GPIO_ACTIVE_LOW>;

Maybe there must be another declaration to make it right.

Link to post
Share on other sites
Guest
This topic is now closed to further replies.