patrykk / linux-udoo

Udoo Linux Kernel
Other
29 stars 6 forks source link

LVDS 15inch (only backlight) #22

Open gondorf opened 8 years ago

gondorf commented 8 years ago

I was working on getting my 15 inch LVDS panel compatible with the latest version of Arch Linux ARM a few months ago, and finally got a chance to work on it again recently.

I followed your directions to make, build, and install the kernel with the configuration file udoo_quad_defconfig. I am booting from imx6q-udoo-15lvds.dtb with the updated Image.

Everything appears to be working fine (connected through serial). However, I am only getting the backlight on my 15 inch panel--no penguin or prompt to login.

Is there anything that jumps out to you that I am missing? Do I need to configure any command arguments before the kernel boots? Am I missing something in my config file?

Thanks so much for doing this repo and for the help!

patrykk commented 8 years ago

did you load backlight-gpio module?

patrykk commented 8 years ago

Please supply me a your config file, dmesg and env print from uboot.

gondorf commented 8 years ago

config.txt

dmesg.txt

(I renamed imx6q-udoo-15lvds.dtb to imx6q-udoo.dtb. Also, instead of uImage in your instructions, I named it zImage.) envPrint.txt

patrykk commented 8 years ago

did you test Xorg server with /dev/fb2 for vivante? and please paste lsmod.

patrykk commented 8 years ago

I have seen that you use imx6q-udoo.dtb in uboot. Did you copy imx6q-udoo-15lvds.dtb to imx6q-udoo.dtb ?

gondorf commented 8 years ago

I copied imx6q-udoo-15lvds.dtb to imx6q-udoo.dtb.

lsmod.txt

Also, if I try compiling and installing the other UDOO kernel repository: https://github.com/UDOOboard/linux_kernel I get some output on the LVDS display (the penguin and a glitched prompt) but USB, and a lot of other drivers don't work.

patrykk commented 8 years ago

could you test it with Xorg server and dev/fb2 ? Probably you have default graphic output on /dev/fb0 so you have to remove from command line support for hdmi and from kernel or change output to /dev/fb2. Usually I don't use output from console on dev/fb2, only from Xorg server.

gondorf commented 8 years ago

I currently don't have Xorg installed, so do you know how could I output just the console to the LVDS screen?

patrykk commented 8 years ago

try remove from kernel hdmi support and configure only LVDS in kernel command line.

patrykk commented 8 years ago

could you test it ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7350-linux/samples/bmptoraw.c with /dev/fb2 ?

gondorf commented 8 years ago

When I test bmptoraw.c with /dev/fb2, I get "cat: write error: No such device" when I do the command "cat image.raw > /dev/fb2" as root.

gondorf commented 8 years ago

I just recompiled the kernel with:

CONFIG_FB_MXC_HDMI=n
CONFIG_SND_SOC_IMX_HDMI=n

but I'm still getting the same problem.

Does this look okay?

[    0.255833] backlight supply power not found, using dummy regulator
[    0.255894] /backlight: arguments longer than property
[    0.255904] of_pwm_get(): can't parse "pwms" property
[    0.255918] pwm-backlight backlight: unable to request PWM, trying legacy API
[    0.257399] MIPI DSI driver module loaded
[    0.257820] mxc_sdc_fb fb@0: NO mxc display driver found!
[    0.257913] mxc_sdc_fb fb@1: registered mxc display driver ldb
patrykk commented 8 years ago

Hi, I have to investigate it. Please supply again : "uname -a" "lsmod"
cat /proc/iomem dmesg. cat //sys/class/graphics/fb0/modes cat //sys/class/graphics/fb1/modes cat //sys/class/graphics/fb2/modes cat //sys/class/graphics/fb0/name cat //sys/class/graphics/fb1/name cat //sys/class/graphics/fb2/name cat //sys/class/backlight/backlight_lcd/bl_power cat //sys/class/backlight/backlight_lcd/brightness cat //sys/class/backlight/backlight_lcd/actual_brightness

gondorf commented 8 years ago

"uname -a"

Linux alarm 4.2.0-g6c65afd #1 SMP PREEMPT Wed Dec 30 01:16:31 UTC 2015 armv7l GNU/Linux 

"lsmod"

Module                  Size  Used by
rt2800usb              14884  0
rt2x00usb              11374  1 rt2800usb
rt2800lib              77995  1 rt2800usb
rt2x00lib              44073  3 rt2x00usb,rt2800lib,rt2800usb
crc_ccitt               1752  1 rt2800lib
btusb                  27783  0
btrtl                   4494  1 btusb
btbcm                   6742  1 btusb
btintel                 1911  1 btusb
bluetooth             318425  5 btbcm,btrtl,btusb,btintel
ahci_imx                6925  0
libahci_platform        8591  1 ahci_imx
ci_hdrc_imx             5406  0
ci_hdrc                27276  1 ci_hdrc_imx
libahci                28679  2 ahci_imx,libahci_platform
mxc_v4l2_capture       25055  0
ipu_bg_overlay_sdc      5406  1 mxc_v4l2_capture
udc_core               10024  1 ci_hdrc
ipu_still               2480  1 mxc_v4l2_capture
libata                187432  3 ahci_imx,libahci,libahci_platform
ipu_prp_enc             6052  1 mxc_v4l2_capture
ipu_csi_enc             3725  1 mxc_v4l2_capture
ipu_fg_overlay_sdc      6299  1 mxc_v4l2_capture
ehci_hcd               43909  1 ci_hdrc
scsi_mod              174683  1 libata
ov5640_camera_mipi     23803  0
evbug                   2078  0
v4l2_int_device         3121  2 ov5640_camera_mipi,mxc_v4l2_capture
usbmisc_imx             6509  1 ci_hdrc_imx
usbcore               183274  5 btusb,rt2x00usb,rt2800usb,ehci_hcd,ci_hdrc
usb_common              3514  3 udc_core,usbcore,ci_hdrc
ipv6                  316217  22

cat /proc/iomem

00110000-00111fff : /soc/dma-apbh@00110000
00130000-00133fff : galcore register region
00134000-00137fff : galcore register region
00905000-0093ffff : 905000.sram
02028000-0202bfff : /soc/aips-bus@02000000/spba-bus@02000000/ssi@02028000
0209c000-0209ffff : /soc/aips-bus@02000000/gpio@0209c000
020a0000-020a3fff : /soc/aips-bus@02000000/gpio@020a0000
020a4000-020a7fff : /soc/aips-bus@02000000/gpio@020a4000
020a8000-020abfff : /soc/aips-bus@02000000/gpio@020a8000
020ac000-020affff : /soc/aips-bus@02000000/gpio@020ac000
020b0000-020b3fff : /soc/aips-bus@02000000/gpio@020b0000
020b4000-020b7fff : /soc/aips-bus@02000000/gpio@020b4000
020bc000-020bffff : /soc/aips-bus@02000000/wdog@020bc000
020c9000-020c9fff : /soc/aips-bus@02000000/usbphy@020c9000
020ca000-020cafff : /soc/aips-bus@02000000/usbphy@020ca000
020cc034-020cc08b : /soc/aips-bus@02000000/snvs@020cc000/snvs-rtc-lp@34
020e0000-020e3fff : /soc/aips-bus@02000000/iomuxc@020e0000
020ec000-020effff : /soc/aips-bus@02000000/sdma@020ec000
02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
   02184000-021841ff : /soc/aips-bus@02100000/usb@02184000
02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
   02184200-021843ff : /soc/aips-bus@02100000/usb@02184200
02184800-021849ff : /soc/aips-bus@02100000/usbmisc@02184800
02188000-0218bfff : /soc/aips-bus@02100000/ethernet@02188000
02198000-0219bfff : mmc0
021a4000-021a7fff : /soc/aips-bus@02100000/i2c@021a4000
021a8000-021abfff : /soc/aips-bus@02100000/i2c@021a8000
021b8000-021bbfff : /soc/aips-bus@02100000/weim@021b8000
021d8000-021dbfff : /soc/aips-bus@02100000/audmux@021d8000
021e4000-021e7fff : /soc/aips-bus@02100000/vdoa@021e4000
021e8000-021ebfff : /soc/aips-bus@02100000/serial@021e8000
021f0000-021f3fff : /soc/aips-bus@02100000/serial@021f0000
02200000-02203fff : /soc/sata@02200000
02204000-02207fff : galcore register region
02400000-027fffff : 2400000.ipu
02800000-02bfffff : 2800000.ipu
10000000-4fffffff : System RAM
   10008000-10722bff : Kernel code
   1075c000-107f1293 : Kernel data

dmesg. dmesg.txt

cat //sys/class/graphics/fb0/modes

U:1366x768p-55

cat //sys/class/graphics/fb1/modes

U:240x320p-60

cat //sys/class/graphics/fb2/modes

no such file or directory

cat //sys/class/graphics/fb0/name

DISP3 BG

cat //sys/class/graphics/fb1/name

DISP3 FG

cat //sys/class/graphics/fb2/name

no such file or directory

cat //sys/class/backlight/backlight_lcd/bl_power

0

cat //sys/class/backlight/backlight_lcd/brightness

1

cat //sys/class/backlight/backlight_lcd/actual_brightness

1
patrykk commented 8 years ago

backlight looks ok, I'll try change dtsi files with next release.

patrykk commented 8 years ago

I tested it with my udoo. Howto show console on 7inch screen:

dmesg | grep -i command [ 0.000000] Kernel command line: console=ttymxc1,115200 root=/dev/sda1 rw fec.disable_giga=1 mem=1024M video=mxcfb0:dev=ldb,LDB-WVGA,if=RGB666,bpp=32 panic=10

[ 0.315069] mxc_sdc_fb fb@0: registered mxc display driver ldb [ 0.380781] Console: switching to colour frame buffer device 100x30 [ 0.405085] ldb 2000000.aips-bus:ldb@020e0008: LVDS channel1 is not online [ 0.405096] mxc_sdc_fb fb@1: NO mxc display driver found! [ 0.405792] imx-sdma 20ec000.sdma: no iram assigned, using external mem [ 0.406138] imx-sdma 20ec000.sdma: loaded firmware 1.1

Xorg works too.

patrykk commented 8 years ago

In your command line I found: video=mxcfb1:dev=ldb,DB-WXGA,if=RGB24,bpp=32

"DB-WXGA" - probably typo, or try LDB-WVGA "RGB24" - try RGB666 "mxcfb1" - try mxcfb0

regards,

gondorf commented 8 years ago

I still have nothing on my screen (below is output of dmesg | grep -i command):

[alarm@alarm ~]$ dmesg | grep -i command
[    0.000000] Kernel command line: console=ttymxc1,115200,115200 root=/dev/mmcblk0p1 rw rootwait fbmem=24M video=mxcfb0:dev=ldb,LDB-WVGA,if=RGB666,bpp=32

I got the other parameters from this page: http://elinux.org/UDOO_setup_lvds_panels

patrykk commented 8 years ago

I don't have any possibility to reproduce problem because I don't have a 15 inch panel.

gondorf commented 8 years ago

Okay.

Have you confirmed that the seven inch panel works with the latest Arch Linux ARM distribution and your kernel? http://archlinuxarm.org/platforms/armv7/freescale/udoo

That way I can hopefully narrow down this issue and verify if this is an issue with the kernel or something with the Arch Linux ARM distribution/uboot.

patrykk commented 8 years ago

Yes, I use arch linux on my udoo quad and 7inch panel, and it works.

patrykk commented 8 years ago

btw. you use kernel with 5.0.11.33433(p7.1/3), please remember that you have to update you userland packages. With arch linux you could try branch use 5.0.11 p4.4.

my packages: imx-gpu-viv-g2d 5.0.11.p7.1-1 imx-gpu-viv-g2d-samples 5.0.11.p7.1-1 imx-gpu-viv-samples 5.0.11.p7.1-1 imx-gpu-viv-x11 5.0.11.p7.1-1 xf86-video-imx-viv 3.10.53_1.1.0-1

btw. I don't support legacy vivante 4.x.xx driver.

gondorf commented 8 years ago

Okay, thanks for the help! I'll probably keep messing with it.

By the way, I just got the linux_kernel working lvds working with Arch from the other repo: https://github.com/UDOOboard/linux_kernel

The text is kind of glitched on the screen making it hard to read, but it appears to be working :)

gondorf commented 8 years ago

Okay, fixed the glitched text by changing the kernel command line arguments.

patrykk commented 8 years ago

Did you test 4.x too ?

gondorf commented 8 years ago

Not yet, I'm using their 3.14 branch. I'll have to try some of the other kernels out once I get Xorg to work somehow (encountering some annoying driver errors). Ideally, I'd like to just have some sort of patch that I could apply to the Arch Linux ARM PKGBUILD or make a PKGBUILD of this kernel that would enable LVDS/other features, so I could be always be using the latest/greatest kernel with the features I want.

patrykk commented 8 years ago

Could you test 4.x with dts file from 3.14 and try run LVDS ? I'll do that. :)

gondorf commented 8 years ago

I tried to compile the 4.4 kernel, and the build fails -- I get "fatal error: uapi/linux/oom.h: No such file or directory."

Also, I think it would be helpful if you provided a suggested config file that you use for your repo.

patrykk commented 8 years ago

could you share whole log? I dont know why but there is a file:

ls include/uapi/linux/oom.h include/uapi/linux/oom.h

Could you check your local repo ?

patrykk commented 8 years ago

Hi, please pull repo and execute: make udoo_quad_defconfig, then compile kernel 4.4.x

patrykk commented 8 years ago

It looks like a problem with IPU. I have to updated it and then we will make new tests.

gondorf commented 8 years ago

I just compiled and installed 4.4 and have only the backlight again.

patrykk commented 8 years ago

http://www.udoo.org/forum/threads/vivante-5-0-11-p4-5-problems.3394/#post-16580 .

patrykk commented 8 years ago

Hi, Could you change resolution in a dts file from 1366x768 to 1360x768. It should work. Vpeter suggested it.

gondorf commented 8 years ago

I think the black bar on the side could potentially annoy me too much to permanently switch, but I'll give it a try.

gondorf commented 8 years ago

Okay, just tried it and still getting same problem.

/*
 * Copyright 2013 Freescale Semiconductor, Inc.
 * Copyright 2015 Aidilab, Srl.
 *
 * Author: Fabio Estevam <fabio.estevam@freescale.com>
 * Author: Ettore Chimenti <ettore.chimenti@udoo.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

/dts-v1/;
#include "imx6q.dtsi"
#include "imx6qdl-udoo.dtsi"

/ {
    model = "Udoo i.MX6 Quad Board";
    compatible = "udoo,imx6q-udoo", "fsl,imx6q";    

    aliases {
        mxcfb1 = &mxcfb2;
    };

        regulators {
        reg_lcd0_pwr: regulator@6 {
            status = "okay";
        };
        };

    backlight_lcd {
        status = "okay";
    };

    mxcfb2: fb@1 {
        compatible = "fsl,mxc_sdc_fb";
        disp_dev = "ldb";
                default_bpp = <32>;
        interface_pix_fmt = "RGB24";
        mode_str ="";
        int_clk = <0>;
        late_init = <1>;
        status = "okay";
    };
};

&ldb {
        status = "okay";
        lvds-channel@0 {        
            status = "okay";
        crtc = "ipu1-di1";
            fsl,data-width = <24>;
            display-timings {
                native-mode = <&timing1>;
                timing1: 1360x768 {
                        clock-frequency = <76000000>;
                        hactive = <1360>;
                        vactive = <768>;
                        hback-porch = <220>;
                        hfront-porch = <40>;
                        vback-porch = <21>;
                        vfront-porch = <7>;
                        hsync-len = <60>;
                        vsync-len = <10>;
                };
            };
        };
};

&sata {
    status = "okay";
};
gondorf commented 8 years ago

Here are some dmesg if that's helpful... dmesg44.txt dmesg314.txt

vpeter4 commented 8 years ago

Try with video=mxcfb0:dev=ldb,1360x768M@60,if=RGB24,bpp=32

gondorf commented 8 years ago

Gave that a shot but still had no luck.

patrykk commented 8 years ago

vpeter4: could you test the kernel ?

vpeter4 commented 8 years ago

The problem is that I only have openelec running and using two vivante versions (3.10.17-1.0.2 and 5.0.11.p4.5). For this kernel I would need to adjust whole build environment.

Can someone post bootable sd card image which I could try? And replace only dtb/kernel with mine.

patrykk commented 8 years ago

Hi, Could you test kernel 4.2 with 5.0.11.p4.4 ?

patrykk commented 8 years ago

btw. I'll make branch 4.4 with 4.5 too. :)

gondorf commented 8 years ago

vpeter4:

Here's what I've been using...

http://archlinuxarm.org/platforms/armv7/freescale/udoo

vpeter4 commented 8 years ago

Sorry but I'm not familiar with Arch and which packages needs to install. When I'm done with debugging my systemd boot problem I have I will build my image with this kernel and required libraries. But can't tell any eta. Sorry. Only quick tests are possible for me to do right now.

gondorf commented 8 years ago

No problem. By the way, that Arch installation instructions should build a system that drops you into a console where you can just log into with username: alarm and password: alarm. It may already have all the packages included that you need to test the kernel, but it's been a few months so I don't remember.

patrykk commented 8 years ago

Hi, could you check branch 4.4-5.0.11.p7.3. I updated IPU driver.

gondorf commented 8 years ago

I compiled/installed and my kernel hanged at usbcore.

patrykk commented 8 years ago

4.4-5.0.11.p7.3 branch ? :> strange.

patrykk commented 8 years ago

YEs, I could confirm that. Its a problem with mmc.