Hello,
I have been trying to get an LCD panel going connected to my BBB.
Building the kernel with my own device tree file I can get the kernel and
rootfs up and fbv an image to the display.
The kernel is based on the 4.4.38 and patches as identified on
RobertCNelson's wiki, all seems to be OK.
All boots fine and when connecting HDMI I can blit bmp's to the frame
buffer. I then decided to connect the LCD panel (5" 480x800) and I could
also send a bitmap to the frame buffer although I was getting an issue
sometimes about a timeout waiting for the lcd.
The dts has the following in:
/{
panel {
compatible = "ti,tilcdc,panel";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_default>;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <32>;
fdd = <0x80>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
800x480p62 {
clock-frequency = <30000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <39>;
hback-porch = <39>;
hsync-len = <47>;
vback-porch = <29>;
vfront-porch = <13>;
vsync-len = <2>;
hsync-active = <1>;
vsync-active = <1>;
};
};
};
};
&am33xx_pinmux {
pinctrl-names = "default";
lcd_pins_default: lcd_pins_default {
pinctrl-single,pins = <
0xa0 0x00 /* lcd_data0.lcd_data0,
OUTPUT | MODE0 */
0xa4 0x00 /* lcd_data1.lcd_data1,
OUTPUT | MODE0 */
0xa8 0x00 /* lcd_data2.lcd_data2,
OUTPUT | MODE0 */
0xac 0x00 /* lcd_data3.lcd_data3,
OUTPUT | MODE0 */
0xb0 0x00 /* lcd_data4.lcd_data4,
OUTPUT | MODE0 */
0xb4 0x00 /* lcd_data5.lcd_data5,
OUTPUT | MODE0 */
0xb8 0x00 /* lcd_data6.lcd_data6,
OUTPUT | MODE0 */
0xbc 0x00 /* lcd_data7.lcd_data7,
OUTPUT | MODE0 */
0xc0 0x00 /* lcd_data8.lcd_data8,
OUTPUT | MODE0 */
0xc4 0x00 /* lcd_data9.lcd_data9,
OUTPUT | MODE0 */
0xc8 0x00 /* lcd_data10.lcd_data10,
OUTPUT | MODE0 */
0xcc 0x00 /* lcd_data11.lcd_data11,
OUTPUT | MODE0 */
0xd0 0x00 /* lcd_data12.lcd_data12,
OUTPUT | MODE0 */
0xd4 0x00 /* lcd_data13.lcd_data13,
OUTPUT | MODE0 */
0xd8 0x00 /* lcd_data14.lcd_data14,
OUTPUT | MODE0 */
0xdc 0x00 /* lcd_data15.lcd_data15,
OUTPUT | MODE0 */
0xe0 0x00 /* lcd_vsync.lcd_vsync,
OUTPUT | MODE0 */
0xe4 0x00 /* lcd_hsync.lcd_hsync,
OUTPUT | MODE0 */
0xe8 0x00 /* lcd_pclk.lcd_pclk,
OUTPUT | MODE0 */
0xec 0x00 /*
lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
>;
};
};
&lcdc {
pinctrl-names = "default";
pinctrl-0 = <&lcd_pins_default>;
status = "okay";
display-timings {
800x480p62 {
clock-frequency = <30000000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <39>;
hback-porch = <39>;
hsync-len = <47>;
vback-porch = <29>;
vfront-porch = <13>;
vsync-len = <2>;
hsync-active = <0>;
vsync-active = <0>;
bpp = <16>;
};
};
};
&tscadc {
status = "okay";
tsc {
ti,wires = <4>;
ti,x-plate-resistance = <200>;
ti,coordinate-readouts = <5>;
ti,wire-config = <0x00 0x11 0x22 0x33>;
};
adc {
ti,adc-channels = <4 5 6 7>;
};
};
A bit of digging seemed to show that I needed to define the fb, which I
have done.
fb {
compatible = "ti,am33xx-tilcdc";
reg = <0x4830e000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <36>;
ti,hwmods = "lcdc";
};
Since updating the dts file I now get a warning at boot:
[ 7.403547] ------------[ cut here ]------------
[ 7.408226] WARNING: CPU: 0 PID: 100 at
arch/arm/mach-omap2/omap_hwmod.c:2107 _enable+0x201/0x210()
[ 7.417307] omap_hwmod: lcdc: enabled state can only be entered from
initialized, idle, or disabled state
[ 7.426910] Modules linked in: ti_am335x_tsc(+) omap_rng(+) rng_core
btusb btrtl btintel btbcm snd_soc_davinci_mcasp(+) snd_soc_edma
snd_soc_omap snd_soc_core snd_pcm_dmaengine bluetooth snd_pcm snd_timer snd
soundcore spi_omap2_mcspi(+) st_pressure_i2c st_pressure inv_mpu6050_i2c
st_sensors inv_mpu6050 evdev st_sensors_i2c industrialio_triggered_buffer
kfifo_buf industrialio ti_am335x_tscadc leds_gpio tilcdc(+) uio_pdrv_genirq
uio pwm_bl
[ 7.466139] CPU: 0 PID: 100 Comm: udevd Not tainted 4.4.36+ #10
[ 7.472079] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 7.478234] [<c0013e45>] (unwind_backtrace) from [<c0011e79>]
(show_stack+0x11/0x14)
[ 7.486023] [<c0011e79>] (show_stack) from [<c002c765>]
(warn_slowpath_common+0x69/0x8c)
[ 7.494153] [<c002c765>] (warn_slowpath_common) from [<c002c7b7>]
(warn_slowpath_fmt+0x2f/0x44)
[ 7.502890] [<c002c7b7>] (warn_slowpath_fmt) from [<c0022339>]
(_enable+0x201/0x210)
[ 7.510669] [<c0022339>] (_enable) from [<c00227c5>]
(omap_hwmod_enable+0x15/0x20)
[ 7.518275] [<c00227c5>] (omap_hwmod_enable) from [<c0023407>]
(omap_device_enable+0x2b/0x5c)
[ 7.526838] [<c0023407>] (omap_device_enable) from [<c0023449>]
(_od_runtime_resume+0x11/0x20)
[ 7.535492] [<c0023449>] (_od_runtime_resume) from [<c03149eb>]
(rpm_callback+0x7b/0x8c)
[ 7.543621] [<c03149eb>] (rpm_callback) from [<c031555f>]
(rpm_resume+0x2ab/0x44c)
[ 7.551225] [<c031555f>] (rpm_resume) from [<c0315743>]
(__pm_runtime_resume+0x43/0x54)
[ 7.559307] [<c0315743>] (__pm_runtime_resume) from [<bf818129>]
(tilcdc_load+0x1c0/0x4b4 [tilcdc])
[ 7.568411] [<bf818129>] (tilcdc_load [tilcdc]) from [<c02f78c1>]
(drm_dev_register+0x75/0x7c)
[ 7.577065] [<c02f78c1>] (drm_dev_register) from [<c02f8ad9>]
(drm_platform_init+0x35/0xa8)
[ 7.585462] [<c02f8ad9>] (drm_platform_init) from [<bf8184cd>]
(tilcdc_pdev_probe+0x58/0x78 [tilcdc])
[ 7.594734] [<bf8184cd>] (tilcdc_pdev_probe [tilcdc]) from [<c03102e7>]
(platform_drv_probe+0x37/0x78)
[ 7.604092] [<c03102e7>] (platform_drv_probe) from [<c030edfd>]
(driver_probe_device+0x189/0x334)
[ 7.613006] [<c030edfd>] (driver_probe_device) from [<c030eff9>]
(__driver_attach+0x51/0x54)
[ 7.621483] [<c030eff9>] (__driver_attach) from [<c030d663>]
(bus_for_each_dev+0x4b/0x74)
[ 7.629699] [<c030d663>] (bus_for_each_dev) from [<c030e50b>]
(bus_add_driver+0x14b/0x1bc)
[ 7.638002] [<c030e50b>] (bus_add_driver) from [<c030f599>]
(driver_register+0x39/0x8c)
[ 7.646049] [<c030f599>] (driver_register) from [<bf81d065>]
(init_module+0x34/0x3f [tilcdc])
[ 7.654622] [<bf81d065>] (init_module [tilcdc]) from [<c000955b>]
(do_one_initcall+0x9b/0x198)
[ 7.663274] [<c000955b>] (do_one_initcall) from [<c00cab51>]
(do_init_module+0x4d/0x30c)
[ 7.671413] [<c00cab51>] (do_init_module) from [<c007882d>]
(load_module+0x1621/0x1a04)
[ 7.679455] [<c007882d>] (load_module) from [<c0078dd7>]
(SyS_finit_module+0x77/0x9c)
[ 7.687322] [<c0078dd7>] (SyS_finit_module) from [<c000e981>]
(ret_fast_syscall+0x1/0x52)
[ 7.695531] ---[ end trace 1b7d2ae8f41317af ]---
I am wondering if I am using the correct way of driving the LCD ?
I cannot find any documentation in the kernel for the tilcdc and frame
buffer, that seemed to be depricated in 3.1x kernels.
If there is a new-er better way to drive the LCD still having an fb dev
node so I can ultimately use Qt to drive the display I would love to know
how.
Thanks
Marc
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/3658bb78-caaa-449c-b513-1686264e67f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.