This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: LCD panel doesn't work

Part Number: AM3358

Tool/software: Linux

Hi TI,

     I designed an AM3358 custom board that supports LVDS output。I enabled DRM driver and disabled fbdev driver in Kernel, modified the Dts file to suit my board.The board can boot up,however the 10.1' LCD doesn't work which is always black.I found some erros on kenel log:

    /--------------- kernel log ----------------------

[ 0.975237] [drm] Initialized
[ 0.979016] panel panel: found backlight
[ 0.983010] panel panel: GPIO lookup for consumer enable
[ 0.983016] panel panel: using device tree for GPIO lookup
[ 0.983043] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/panel[0]' - status

[ 0.983102] panel panel: found enable GPIO
[ 0.988011] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.994721] [drm] No driver support for vblank timestamp query.
[ 1.000795] tilcdc 4830e000.lcdc: No connectors reported connected with modes
[ 1.008004] [drm] Cannot find any crtc or sizes - going 1024x768
[ 1.022411] Console: switching to colour frame buffer device 128x48
[ 1.033532] tilcdc 4830e000.lcdc: fb0: frame buffer device

 After using modetest , I've got these messages:

/---------------------- modetest ---------------------------

root@am335x-evm:/sys# modetest

trying to open device 'i915'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...done
Encoders:
id crtc type possible crtcs possible clones
25 0 LVDS 0x00000001 0x00000000

Connectors:
id encoder status name size (mm) modes encoders
26 0 connected LVDS-1 0x0 0 25
props:
1 EDID:
flags: immutable blob
blobs:
value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
CRTCs:
id fb pos size
24 0 (0,0) (0x0)
0 0 0 0 0 0 0 0 0 flags: ; type:
props:

Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
23 0 0 0,0 0,0 0 0x00000001
formats: RG16 BG24 XB24
props:
5 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1

Frame buffers:
id size pitch

  Then I checked the weston log :

/------------------ weston log ------------------

root@am335x-evm:/sys# cat /var/log/weston.log
Date: 2017-06-28 UTC
[20:20:30.703] weston 1.11.0
http://wayland.freedesktop.org
Bug reports to: bugs.freedesktop.org/enter_bug.cgi
Build: 1.10.93-2-g2d825ed configure.ac: bump to version 1.11.0 for the official release (2016-05-31 17:10:40 -0700)
[20:20:30.704] OS: Linux, 4.9.28-geed43d1050, #3 PREEMPT Tue Nov 21 14:37:24 CST 2017, armv7l
[20:20:30.706] Using config file '/etc//weston.ini'
[20:20:30.710] Output repaint window is 7 ms maximum.
[20:20:30.713] Loading module '/usr/lib/weston/drm-backend.so'
[20:20:30.743] initializing drm backend
[20:20:30.777] using /dev/dri/card0
[20:20:30.786] Loading module '/usr/lib/weston/gl-renderer.so'
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
[20:20:30.908] warning: either no EGL_EXT_platform_base support or specific platform support; falling back to eglGetDisplay.
[20:20:30.971] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[20:20:30.971] Retrieving EGL client extension string failed.
[20:20:30.990] input device 'ti-tsc', /dev/input/event0 is tagged by udev as: Touchscreen
[20:20:30.990] input device 'ti-tsc', /dev/input/event0 is a touch device
[20:20:30.991] no available modes for LVDS-1
[20:20:30.991] No currently active connector found.
[20:20:30.991] failed to create output for /sys/devices/platform/ocp/4830e000.lcdc/drm/card0
[20:20:31.076] fatal: failed to create compositor backend

It looks like the kernel doesn't detect the panel when booting up,but I did find the panel node on the /sys/device/platform.

My question is why the kernel cannot detect the panel?

Below is my dts file:

/-------------------- dts file ----------------------------------

/*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* 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 "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include <dt-bindings/display/tda998x.h>
#include <dt-bindings/pwm/pwm.h>

/ {
model = "TI AM335x BeagleBone Black";
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

lcd_bl: backlight {
compatible = "pwm-backlight";
pwms = <&ecap0 0 5000000 0>; // 
brightness-levels = <0 51 53 56 62 75 101 152 200 255>; //
default-brightness-level = <8>;
};

panel {
compatible = "ti,tilcdc,panel";
// pinctrl-names = "default", "sleep";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_default>;
// pinctrl-1 = <&lcd_pins_sleep>;
backlight = <&lcd_bl>;
enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
status = "okay";
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <16>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
native-mode = <&timing0>;
timing0:1280x800p60 {
hactive = <1280>;
vactive = <800>;
hback-porch = <159>;
hfront-porch = <0>;
hsync-len = <0>;
vback-porch = <0>;
vfront-porch = <23>;
vsync-len = <0>;
clock-frequency = <71100000>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>; // DE mode high active
pixelclk-active = <1>; //
};
};
};
};

&ldo3_reg {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

&mmc1 {
vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins>;
bus-width = <8>;
status = "okay";
};

&cpu0_opp_table {
/*
* All PG 2.0 silicon may not support 1GHz but some of the early
* BeagleBone Blacks have PG 2.0 silicon which is guaranteed
* to support 1GHz OPP so enable it for PG 2.0 on this board.
*/
oppnitro@1000000000 {
opp-supported-hw = <0x06 0x0100>;
};
};

&am33xx_pinmux {

lcd_pins_default: lcd_pins_default {

pinctrl-single,pins = <
// AM33XX_IOPAD(0x890, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpio2_2 lcd_backlight enable control */
AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */
AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */
AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */
AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
>;
};

lcd_pins_sleep: lcd_pins_sleep {
pinctrl-single,pins = <
// AM33XX_IOPAD(0x890, PULL_DISABLE | MUX_MODE7) /* gpio2_2 lcd_backlight enable control */
AM33XX_IOPAD(0x8a0, PULL_DISABLE | MUX_MODE7) /* lcd_data0.lcd_data0 */
AM33XX_IOPAD(0x8a4, PULL_DISABLE | MUX_MODE7) /* lcd_data1.lcd_data1 */
AM33XX_IOPAD(0x8a8, PULL_DISABLE | MUX_MODE7) /* lcd_data2.lcd_data2 */
AM33XX_IOPAD(0x8ac, PULL_DISABLE | MUX_MODE7) /* lcd_data3.lcd_data3 */
AM33XX_IOPAD(0x8b0, PULL_DISABLE | MUX_MODE7) /* lcd_data4.lcd_data4 */
AM33XX_IOPAD(0x8b4, PULL_DISABLE | MUX_MODE7) /* lcd_data5.lcd_data5 */
AM33XX_IOPAD(0x8b8, PULL_DISABLE | MUX_MODE7) /* lcd_data6.lcd_data6 */
AM33XX_IOPAD(0x8bc, PULL_DISABLE | MUX_MODE7) /* lcd_data7.lcd_data7 */
AM33XX_IOPAD(0x8c0, PULL_DISABLE | MUX_MODE7) /* lcd_data8.lcd_data8 */
AM33XX_IOPAD(0x8c4, PULL_DISABLE | MUX_MODE7) /* lcd_data9.lcd_data9 */
AM33XX_IOPAD(0x8c8, PULL_DISABLE | MUX_MODE7) /* lcd_data10.lcd_data10 */
AM33XX_IOPAD(0x8cc, PULL_DISABLE | MUX_MODE7) /* lcd_data11.lcd_data11 */
AM33XX_IOPAD(0x8d0, PULL_DISABLE | MUX_MODE7) /* lcd_data12.lcd_data12 */
AM33XX_IOPAD(0x8d4, PULL_DISABLE | MUX_MODE7) /* lcd_data13.lcd_data13 */
AM33XX_IOPAD(0x8d8, PULL_DISABLE | MUX_MODE7) /* lcd_data14.lcd_data14 */
AM33XX_IOPAD(0x8dc, PULL_DISABLE | MUX_MODE7) /* lcd_data15.lcd_data15 */
AM33XX_IOPAD(0x8e0, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_vsync.lcd_vsync */
AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_hsync.lcd_hsync */
AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_pclk.lcd_pclk */
AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7) /* lcd_ac_bias_en.lcd_ac_bias_en */
>;
};

ecap0_pins: backlight_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x964, MUX_MODE0) /* (C18)eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
>;
};

backlight_ctrl_pin:backlight_ctrl_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x890, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpio2_2 lcd_backlight enable control */
>;
};

mcasp0_pins: mcasp0_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
>;
};
};

&lcdc {
status = "okay";

/* If you want to get 24 bit RGB and 16 BGR mode instead of
* current 16 bit RGB and 24 BGR modes, set the propety
* below to "crossed" and uncomment the video-ports -property
* in tda19988 node.
*/
blue-and-red-wiring = "straight";

};

&rtc {
system-power-controller;
};

&mcasp0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};

&sgx {
status = "okay";
};

&epwmss0 {
status = "okay";

ecap0: ecap@48300100 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ecap0_pins>;
};
};

&tscadc {
status = "okay";
tsc {
ti,wires = <4>;
ti,x-plate-resistance = <235>;
ti,coordinate-readouts = <5>;
ti,wire-config = <0x00 0x11 0x22 0x33>;
ti,charge-delay = <0x400>;
};
adc {
ti,adc-channels = <4 5 6 7>;
};

};

/ {
clk_mcasp0_fixed: clk_mcasp0_fixed {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24576000>;
};

clk_mcasp0: clk_mcasp0 {
#clock-cells = <0>;
compatible = "gpio-gate-clock";
clocks = <&clk_mcasp0_fixed>;
enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
};

};

SDK version: ti-processor-sdk-linux-am335x-evm-04.00.00.04

Another question: Is it true that the kernel use the the display-timings values from EDID instead of  the device tree as someone mentioned on the forum? 

Any help would be greatly appreciated!