Jump to content

Recommended Posts

Posted

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

Posted

It's possible but I can only give you a hint since I never try this to make it work. You need to do two things, enable LCD in u-boot and add this to Banana device tree.

 

At least you know what you need to look for.

Posted

Ok, I'm searching. 

Is there a difference between enabling LCD in u-boot and in script.bin?

I was using the modifications from banana_pi_5lcd.fex to generate a new script.bin. But the LCD doesn't turn on. I'm still on HDMI. 

Posted

Yes, those are different areas. Forget about .fex when you are using Vanilla kernel. FEX settings are used in old 3.4 kernel and enabling in .fex and loading touch driver is usually enough.

Posted

Thanks Igor. I'm watching. I think, I got much to read and learn now.

Posted

Final question to this topic.

Enabling LCD in u-boot, means to change the dts or to change the config and rebuild the u-boot?

Posted

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.

Posted

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

Posted

Little update:

Found out, that driver modul edt-ft5x06 isn't compiled to my build of kernel. One reason why it doesn't work.

$ modprope edt-ft5x06

Returns:

modprobe: FATAL: Module edt-ft5x06 not found.

How can I activate this driver in menuconfig of my kernel?

 

Yours,

Martin

Posted

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.

Posted

Got three messages in boot up now:

OF: /soc@01c00000/i2c@01c2b800/edt-ft5x06@38: could not get #gpio-cells for /clocks/cpu@01c20054
edt_ft5x06 2-0038: Failed to request GPIO wake pin, error -22
edt_ft5x06: probe of 2-0038 failed with error -22

Any ideas?

Posted

After deleting 

wake-gpios = <7 7 GPIO_ACTIVE_LOW>;

the touch works.

But why? I saw in the old fex files, PH7 was also declared as wake up pin.

 

Can somebody please help me to explain this?

 

Yours,

Martin

Posted

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.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines