BBB tilcdc driver for custom lcd panel

I have been using a custom LCD display on a beaglebone black running a 3.8 kernel using the DA8xx framebuffer.

I am now trying a new kernel with the TILCDC DRM driver. So I have built a new kernel with the TILCDC driver enabled and have disabled DA8xx framebuffer support.

I have modified my device tree to include the following.

panel {
compatible = “ti,tilcdc,panel”;
pinctrl-names = “default”;
pinctrl-0 = <&lcd_pins_s0>;
status = “okay”;

panel-info {
bpp = <16>;
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
fdd = <0x80>;
sync-edge = <1>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
invert-pxl-clk;
};
display-timings {
native-mode = <&timing0>;
timing0: 480x800 {
bpp = <16>;
clock-frequency = <28000000>;
hactive = <480>;
vactive = <800>;
hfront-porch = <1>;
hback-porch = <20>;
hsync-len = <1>;
vback-porch = <11>;
vfront-porch = <9>;
vsync-len = <10>;
hsync-active = <1>;
vsync-active = <1>;
};
};

};

The display timings and pinmux settings are the working values from the DA8xx framebuffer.
On booting the kernel I get the following snippets.

[ 1.273229] [drm] Initialized drm 1.1.0 20060810
[ 1.784763] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.791771] [drm] No driver support for vblank timestamp query.

[ 1.805890] tilcdc 4830e000.lcdc: fb0: frame buffer device

[ 1.811792] tilcdc 4830e000.lcdc: registered panic notifier
[ 1.817647] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0

running fbset gives me the following info

mode “480x800”
geometry 480 800 480 800 16
timings 0 0 0 0 0 0 0
accel true
rgba 5/11,6/5,5/0,0/0
endmode

Obviously the timings are wrong.

I have the following listed in /sys/class/drm

lrwxrwxrwx 1 root root 0 Jan 16 07:17 card0 → …/…/devices/ocp.3/4830e000.lcdc/drm/card0/
lrwxrwxrwx 1 root root 0 Jan 16 07:17 card0-LVDS-1 → …/…/devices/ocp.3/4830e000.lcdc/drm/card0/card0-LVDS-1/
lrwxrwxrwx 1 root root 0 Jan 16 07:17 controlD64 → …/…/devices/ocp.3/4830e000.lcdc/drm/controlD64/

further more.

cat /sys/class/drm/card0-LVDS-1/status

connected

cat /sys/class/drm/card0-LVDS-1/enabled

disabled

My problem is that it is not enabled.
I am assuming I need to pass some sort of “video=” to the kernel from uboot, but I have no idea what.
Is there some other configuration I am missing ?

Has anyone else got this driver to work with an LCD panel ?

many thanks
Ben

OK looks like I forgot to enable console framebuffer support.
I now have signals at least, although no display - ts_calibrate and my Qt app do not display, but that may be down to the LCD controller initialisation, although that has not changed.
I will have to compare the LCD drive signals from the 2 kernels to make sure they are correct and double check my LCD controller initialisation.

I still get all 0’s though from fbset, which looks like a bug somewhere, or something has not been implemented.

Hi Ben,

I am also trying to enable a TFT lcd. I have done all the configurations in the .dts and inserted the cape.
I could see the /dev/fb0 getting created and doing fbset shows the timings all 0s.

Were you successful in having some display shown on the lcd. If yes, how did you manage to do that?

Regards,
Ashwin