notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.85k stars 496 forks source link

dual ili9341 - cannot register backlight device #481

Closed x3n0n-dev closed 6 years ago

x3n0n-dev commented 6 years ago

HI guys, i have some problems with my dual ili9341 configuration. i downloaded latest stretch lite version from raspian website, created a dts file copying one of the solution provided for a similar issue

/*
* Device Tree overlay for 2x ili9341 2.2"
*
*/

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

    fragment@0 {
        target = <&spi0>;
        __overlay__ {
            status = "okay";

            spidev@0{
                status = "disabled";
            };

            spidev@1{
                status = "disabled";
            };
        };
    };

    fragment@1 {
        target = <&spi0>;
        __overlay__ {
            /* needed to avoid dtc warning */
            #address-cells = <1>;
            #size-cells = <0>;

            cat9341@0{
                compatible = "ilitek,ili9341";
                reg = <0>;

                spi-max-frequency = <32000000>;
                rotate = <0>;
                bgr;
                fps = <50>;
                buswidth = <8>;
                reset-gpios = <&gpio 25 0>;
                dc-gpios = <&gpio 24 0>;
                led-gpios = <&gpio 12 1>;
                debug = <0>;
            };

            cat9341@1{
                compatible = "ilitek,ili9341";
                reg = <1>;

                spi-max-frequency = <32000000>;
                rotate = <0>;
                bgr;
                fps = <50>;
                buswidth = <8>;
                reset-gpios = <&gpio 23 0>;
                dc-gpios = <&gpio 18 0>;
                led-gpios = <&gpio 13 1>;
                debug = <0>;
            };
        };
    };
};`

compiled with

sudo dtc -@ -I dts -O dtb -o /boot/overlays/dual-ili9341.dtbo ili9341.dts and i modified /boot/config.txt adding ad the very bottom

dtoverlay=dual-ili9341

i'm sure the wiring is correct : 3.3v miso mosi sclk

are in common

c0 for one screen and c01 for the other

25 24 12

23 18 13

i've been trying for 3 days now and i simply cannot make them work.

i suppose it's something linked to led-gpios .

when i try executing dmesg this is what i get

[    4.589928] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    4.604245] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
[    4.605140] fbtft_of_value: buswidth = 8
[    4.605156] fbtft_of_value: debug = 0
[    4.605162] fbtft_of_value: rotate = 0
[    4.605174] fbtft_of_value: fps = 50
[    4.614365] fb_ili9341: module is from the staging directory, the quality is unknown, you have been warned.
[    4.968852] graphics fb1: fb_ili9341 frame buffer, 240x320, 150 KiB video memory, 16 KiB DMA buffer memory, fps=50, spi0.1 at 32 MHz
[    4.969001] fbtft_of_value: buswidth = 8
[    4.969009] fbtft_of_value: debug = 0
[    4.969015] fbtft_of_value: rotate = 0
[    4.969021] fbtft_of_value: fps = 50

...

   5.288309] fb_ili9341 spi0.0: cannot register backlight device (-17)
[    5.288715] graphics fb2: fb_ili9341 frame buffer, 240x320, 150 KiB video me$

and that's probably the point . what can i do to solve the problem ?

i found something on https://github.com/notro/fbtft/wiki/How-it-works but my linux knowledge is not deep enough to understand what i should do to solve this.

any hint?

ty for the support and sorry for my terrible english which is not my main language

x3n0n-dev commented 6 years ago

found issue 280. moved there