Enable LCD4 adding .dts to Kernel source v3.1x ?

362 views
Skip to first unread message

Cedric Malitte

unread,
Aug 2, 2014, 2:50:24 AM8/2/14
to beagl...@googlegroups.com
Hi,

I compiled the 3.13 and 3.15 kernel using Robert tools, and I saw this hoping to get LCD4 cape support: http://www.spinics.net/lists/linux-omap/msg109735.html

I applied the patch against the kernel tree, but nothing happened at boot after a rebuild, I mean screen stayed black.

A quick look in the kernel tree dirs and the am335x-bone-display-cape.dts has not been compiled.
So I tried to ass it to Makefile, rebuild and got a fatal error from DTC.

I'm not very used to DT, so if someone could have a look at this file and tell me what can be wrong, I'll try to rebuild it.

/*
 * Copyright (C) 2014 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.
 *
 * This DTS adds supports for display capes using LCD interface for display
 * and GPIO or PWM interface for backlight controls.
 */
&am33xx_pinmux {
bbcape_backlight_pins: bbcape_backlight_pins {
pinctrl-single,pins = <
0x48  (PIN_OUTPUT | MUX_MODE7) /* gpmc_a[2].GPIO1[18] (backlight control) */
>;
};
bbcape_lcd_pins: bbcape_lcd_pins {
pinctrl-single,pins = <
0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
0xe0 (PIN_OUTPUT | MUX_MODE0) /* lcd_vsync.lcd_vsync */
0xe4 (PIN_OUTPUT | MUX_MODE0) /* lcd_hsync.lcd_hsync */
0xe8 (PIN_OUTPUT | MUX_MODE0) /* lcd_pclk.lcd_pclk */
0xec (PIN_OUTPUT | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en (lcd_en) */
0x1a4 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* mcasp0_fsr.gpio3[19] (lcd_disen) */
>;
};
bbcape_touchscreen_pins: bbcape_touchscreen_pins {
pinctrl-single,pins = <
0x184 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* uart1_txd.gpio0[15] (enter) */
0x40  (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a0.gpio1[16] (left) */
0x44  (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a1.gpio1[17] (right) */
0x4c  (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_a3.gpio1[19] (up) */
0x198 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* mcasp0_axr0.gpio3[16] (down) */
>;
};
};

/ {
backlight {
status = "okay";
compatible = "gpio-backlight";
pinctrl-names = "default";
pinctrl-0 = <&bbcape_backlight_pins>;
gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
default-on;
};
panel {
status = "okay";
compatible = "ti,tilcdc,panel";
pinctrl-names = "default";
pinctrl-0 = <&bbcape_lcd_pins>;
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>;
/* www.newhavendisplay.com/app_notes/OTA5180A.pdf */
timing0: 480x272 {
clock-frequency = <9200000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <8>;
hback-porch = <47>;
hsync-len = <41>;
vback-porch = <2>;
vfront-porch = <3>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
};
}; 

Thanks 

Cedric. 

John Syn

unread,
Aug 2, 2014, 3:21:56 PM8/2/14
to beagl...@googlegroups.com

From: Cedric Malitte <cedric....@gmail.com>
Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Date: Friday, August 1, 2014 at 11:50 PM
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Subject: [beagleboard] Enable LCD4 adding .dts to Kernel source v3.1x ?

Hi,

I compiled the 3.13 and 3.15 kernel using Robert tools, and I saw this hoping to get LCD4 cape support: http://www.spinics.net/lists/linux-omap/msg109735.html

I applied the patch against the kernel tree, but nothing happened at boot after a rebuild, I mean screen stayed black.

A quick look in the kernel tree dirs and the am335x-bone-display-cape.dts has not been compiled.
So I tried to ass it to Makefile, rebuild and got a fatal error from DTC.
It shouldn’t be compiled. Looking at the link you provided, the patch is included in the am335x-boneblack.dts file so when this DT gets compiled, it will have support for your LCD. Make sure you copy the new am335x-boneblack.dts to your dtbs folder on your SDCard. 

Regards,
John
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cédric Malitte

unread,
Aug 2, 2014, 4:57:16 PM8/2/14
to beagl...@googlegroups.com
Thanks John,

That's what I realized this morning when looking back at the code.

But I wasn't aware of the need to copy  the dts file to the sdcard.

Will give it a try later when back home.
Regards 

Cédric Malitte
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/wAcTyHqLfwg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

John Syn

unread,
Aug 2, 2014, 8:57:36 PM8/2/14
to beagl...@googlegroups.com

From: Cédric Malitte <cedric....@gmail.com>
Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Date: Saturday, August 2, 2014 at 1:57 PM
To: "beagl...@googlegroups.com" <beagl...@googlegroups.com>
Subject: Re: [beagleboard] Enable LCD4 adding .dts to Kernel source v3.1x ?

Thanks John,

That's what I realized this morning when looking back at the code.

But I wasn't aware of the need to copy  the dts file to the sdcard.
As a general rule, after building a new kernel, you should do the following from the deploy folder:

sudo tar xvpf 3.15.6-bone5-firmware.tar.gz -C /media/rootfs/firmware/
sudo tar xvpf 3.15.6-bone5-modules.tar.gz -C /media/rootfs/
tar xvpf 3.15.6-bone5-dtbs.tar.gz -C /media/BOOT/
cp 3.15.6-bone5.zImage /media/BOOT/zImage

Remember to change the kernel version above to match kernel version you are building. I recommend you add the above into a script in your deploy folder called update.sh, make it executable. Each time you update the kernel, then just run:
./update.sh

Regards,
John

Cedric Malitte

unread,
Aug 2, 2014, 10:27:30 PM8/2/14
to beagl...@googlegroups.com
John,

Screen still black and not detected ;(

DT is something really new to me, but I'm learning mostly at night while kids sleeping !

I'd really like to have the LCD back and running with kernel versions supporting SGX and this will happen ! Just a matter of time....

I found this, and might try it: http://www.thing-printer.com/converting-device-tree-overlays-kernel-3-12/ even if this looks like a step back.

Anyway back to compiling, testing and learning from my errors ! 

Cheers,

Cedric 

Cedric Malitte

unread,
Aug 3, 2014, 2:25:29 PM8/3/14
to beagl...@googlegroups.com
Ok,
so I did a rebuild on the kernel, sent the file to the SD, booted on SD.

Still black screen of death.
I have panel.10 in /sys/devices, so I assume the dts is taken into account.
No /dev/fb0 is showing and in dmesg I have:
[    2.416178] tilcdc 4830e000.lcdc: no encoders/connectors found
[    2.422298] tilcdc 4830e000.lcdc: failed to initialize mode setting

I really don't know what to do next...

Cedric

Cedric Malitte

unread,
Aug 4, 2014, 2:31:41 AM8/4/14
to beagl...@googlegroups.com
Ok,

so after playing in dts and in kernel config, I finally managed to get backlight.
So now screen is white instead of black !!

I had to disable pwm examples in dts because of overlaping pin config.

Still digging.

Cedric

Cédric Malitte

unread,
Aug 4, 2014, 2:13:06 PM8/4/14
to beagl...@googlegroups.com
I'm happy ;)

Went to bed late last night with a tought and this morning at work I tried something that led to a working LCD4 cape on v3.15 kernel !

I got to enable touchscreen but now I think it will be a bit easier as I learned a bit more on dt

Regards

Cédric Malitte
--

stef...@gmail.com

unread,
Aug 15, 2014, 1:03:03 PM8/15/14
to beagl...@googlegroups.com
Hi Cedric,

I'm trying to make a LCD4 to work with this 3.15 kernel but I have no luck.
Can you tell me what changes did you make?

Thanks!

Regards,
Razvan

Cedric Malitte

unread,
Aug 18, 2014, 5:53:53 PM8/18/14
to beagl...@googlegroups.com
Hi,

I added a few things to the dts and a few options to kernel

see the files included.

regards,

Cedric


--
patch-3.15-lcd4.patch
am335x-bone-display-cape.dts
defconfig

stef...@gmail.com

unread,
Aug 19, 2014, 3:03:52 PM8/19/14
to beagl...@googlegroups.com
Hi Cedric,
Thank you very much for the infos you sent me. I will take a look at them and see what happens

Regards,
Razvan

stef...@gmail.com

unread,
Aug 19, 2014, 3:26:04 PM8/19/14
to beagl...@googlegroups.com
Hi Cedric,

Can you tell me what changes did you make to the kernel?

Regards,
Razvan

On Tuesday, August 19, 2014 12:53:53 AM UTC+3, Cedric Malitte wrote:

Cédric Malitte

unread,
Aug 19, 2014, 4:06:22 PM8/19/14
to beagl...@googlegroups.com
Hi,

Kernel changes should be in defconfig.
I enabled a few things, but you should try with kernel config from Roberts tree first.

What I did:
Build the kerne
Patch 
Rebuild 
Sgx compile
Rebuild
Install


Cédric Malitte

stef...@gmail.com

unread,
Aug 19, 2014, 5:24:55 PM8/19/14
to beagl...@googlegroups.com
Hi,
The defconfig file is in binary format and I don't exactly know what to do with it.
SGX I thought is for 3D graphics and I never build it

Regards,
Razvan

Moscowbob

unread,
Aug 20, 2014, 3:05:48 AM8/20/14
to beagl...@googlegroups.com
Hi All,

It works fine with Robert's 3.15 kernel. However, the lcd4 is very dim - how do you adjust the brightness?

Lcd also works with 3.16 and 3.17 kernels but omaplfb does not load 


Thanks
Rob

Cédric Malitte

unread,
Aug 20, 2014, 2:41:56 PM8/20/14
to beagl...@googlegroups.com
Sorry, 
Something bad happened when I transfered it from VM

For backlight, make sure you have selected in kernel config gpio backlight, the way it is in dts, the backlight is on or off.

I did not have trouble with dim screen.

I did built sgx because I need it, but it's not mandatory for the lcd ;)

Cédric Malitte

mahajanr...@gmail.com

unread,
Feb 16, 2015, 7:40:12 AM2/16/15
to beagl...@googlegroups.com
Hi Cedric,

can you tell me how your applying patch i am new to device tree.
can you tell me i am using this LCD paneel
http://www.aliexpress.com/store/product/4-3-inch-40PIN-TFT-LCD-Screen-with-Touch-Panel-OTA5180A-Drive-IC-480-272-RGB/224898_1899445212.html
but its not working as per this i changes in .dts file
but LCD is not working.

Please give me details.

thanks

Cedric Malitte

unread,
Feb 16, 2015, 12:37:47 PM2/16/15
to beagl...@googlegroups.com
Hi,


This is also a 24bit rgb lcd panel.

If you want to enable your panel in linux, it will depend on your kernel version.
If you have the 3.8.13, the one that came on the BBB , you will just have to enalbe the bb-view dts in the config files as a starting point.

For other kernels, I think bb-view is enabled at some point, but I'm not using those displays.
I use the 4D systems cape displays because they are 16 bits, so it saves me a few pins on the BBB.

Regards.


--

mahajanr...@gmail.com

unread,
Feb 17, 2015, 12:58:07 AM2/17/15
to beagl...@googlegroups.com
HI Cedric,

Thanks for your prompt reply.
I am not using BB-view cape i only used

4.3 inch 40PIN TFT LCD Screen with Touch Panel OTA5180A Drive IC 480*272 RGB interface.

I am using 3.8.13-bone68 kernel.but i am not understand how to enable the bb-view dts in the config files as a starting point.
That file not having with me.
Please tell me how to proceed


thanks


On Saturday, August 2, 2014 at 12:20:24 PM UTC+5:30, Cedric Malitte wrote:

Rahul Mahajan

unread,
Feb 17, 2015, 2:33:53 PM2/17/15
to beagl...@googlegroups.com
HI Cedric,

Thanks for your prompt reply.
I am using 3.8.13-bone68 kernel.but i am not understand how to enable
the bb-view dts in the config files as a starting point.
That file not having with me.
Please tell me how to proceed

thanks

Cedric Malitte

unread,
Feb 17, 2015, 3:10:13 PM2/17/15
to beagl...@googlegroups.com, mahajanr...@gmail.com
Hi,

I'm not very familiar with the cape manager, but you should get a look at http://www.embest-tech.com/community/index.php?topic=2845.0

I am using kernels 3.1x that do not have the cape manager, so I play with the dts files and rebuild a kernel each time.

I told you about the BB-View because your LCD seems to be using 24bits.
If you hookup your lcd the same way the BB-View is done, you should be able to get something.

Can't help more than that.
Reply all
Reply to author
Forward
0 new messages