First stab at enabling TFP410 framer

31 views
Skip to first unread message

koen

unread,
May 8, 2008, 4:43:29 PM5/8/08
to Beagle Board
Hi,

You can find a first, untested stab at enabling the TFP410 framer (the
thing that drives the DVI-D port) at

http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-first-try.diff

This applies on top of the RTC patch. Comments, improvements and test
results welcome.

regards,

Koen

koen

unread,
May 8, 2008, 5:39:18 PM5/8/08
to Beagle Board


On 8 mei, 22:43, koen <koen.k...@gmail.com> wrote:
> Hi,
>
> You can find a first, untested stab at enabling the TFP410 framer (the
> thing that drives the DVI-D port) at
>
> http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-first-t...
>
> This applies on top of the RTC patch. Comments, improvements and test
> results welcome.

Bootlog:

<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>omapfb: configured for panel omap3beagle
<6>omapfb: DISPC version 3.0 initialized
<1>Unhandled fault: external abort on non-linefetch (0x1028) at
0xd80504a0
Internal error: : 1028 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.26-rc1-omap1 #1)
PC is at omap_dispc_enable_plane+0x44/0x6c
LR is at omap2_clk_enable+0x60/0xa0
pc : [<c0175900>] lr : [<c0036b7c>] psr: 60000013
sp : c7c1ddf0 ip : c03e3c80 fp : c7c1de0c
r10: 00000000 r9 : c7cc0200 r8 : c7cc0200
r7 : c7cc0204 r6 : c041b7f4 r5 : 00000001 r4 : 00000000
r3 : c0312414 r2 : 000000a0 r1 : d8050400 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 00c5387f Table: 80004018 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc7c1c2e0)
Stack: (0xc7c1ddf0 to 0xc7c1e000)
dde0: c7cc0204 c7c33000 c7c3325c
00000001
de00: c7c1de64 c7c1de10 c0174850 c01758c8 c7c1de48 c7ca8578 c7cc0224
c7c1de48
de20: 00000000 69ca8578 7265746e 006c616e 00000000 00000000 c7c1de74
c03e58e8
de40: c03e5990 c03f4174 c03f4174 c03f80d0 00000000 c0028404 c7c1de74
c7c1de68
de60: c0174c14 c0174340 c7c1de84 c7c1de78 c01774ac c0174bdc c7c1de94
c7c1de88
de80: c019b10c c01774a4 c7c1deb4 c7c1de98 c019a498 c019b0f8 c03e58e8
c03e5990
dea0: c03f4174 c03f4174 c7c1ded4 c7c1deb8 c019a594 c019a3d4 c7c1ded4
00000000
dec0: c7c1dedc c019a544 c7c1df04 c7c1ded8 c0199aec c019a550 c7c9f920
c7c037d8
dee0: c7c037d8 c03e5930 00000000 c03f4174 00000000 c7c9f920 c7c1df14
c7c1df08
df00: c019a2dc c0199aa4 c7c1df44 c7c1df18 c0199f8c c019a2c8 c03844b8
c03f4174
df20: 00000000 00000000 c03f4174 00000000 c0026e54 c7c1c000 c7c1df6c
c7c1df48
df40: c019a790 c0199ef0 00000000 00000000 00000000 c0026e54 c7c1c000
c0028404
df60: c7c1df7c c7c1df70 c019b398 c019a704 c7c1df8c c7c1df80 c001a754
c019b338
df80: c7c1dff4 c7c1df90 c0008948 c001a74c c004868c c0048304 00000000
00000000
dfa0: 00000000 c7c1dfb0 c002dac4 c0048674 00000000 00000000 c00088a4
c004ec40
dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
dfe0: 00000000 00000000 00000000 c7c1dff8 c004ec40 c00088b0 bf1148af
f960084f
Backtrace:
[<c01758bc>] (omap_dispc_enable_plane+0x0/0x6c) from [<c0174850>]
(omapfb_do_probe+0x51c/0x89c)
r6:00000001 r5:c7c3325c r4:c7c33000
[<c0174334>] (omapfb_do_probe+0x0/0x89c) from [<c0174c14>]
(omapfb_register_panel+0x44/0x58)
[<c0174bd0>] (omapfb_register_panel+0x0/0x58) from [<c01774ac>]
(omap3beagle_panel_probe+0x14/0x20)
[<c0177498>] (omap3beagle_panel_probe+0x0/0x20) from [<c019b10c>]
(platform_drv_probe+0x20/0x24)
[<c019b0ec>] (platform_drv_probe+0x0/0x24) from [<c019a498>]
(driver_probe_device+0xd0/0x17c)
[<c019a3c8>] (driver_probe_device+0x0/0x17c) from [<c019a594>]
(__driver_attach+0x50/0x74)
r7:c03f4174 r6:c03f4174 r5:c03e5990 r4:c03e58e8
[<c019a544>] (__driver_attach+0x0/0x74) from [<c0199aec>]
(bus_for_each_dev+0x54/0x88)
r6:c019a544 r5:c7c1dedc r4:00000000
[<c0199a98>] (bus_for_each_dev+0x0/0x88) from [<c019a2dc>]
(driver_attach+0x20/0x28)
r7:c7c9f920 r6:00000000 r5:c03f4174 r4:00000000
[<c019a2bc>] (driver_attach+0x0/0x28) from [<c0199f8c>] (bus_add_driver
+0xa8/0x218)
[<c0199ee4>] (bus_add_driver+0x0/0x218) from [<c019a790>]
(driver_register+0x98/0x120)
r8:c7c1c000 r7:c0026e54 r6:00000000 r5:c03f4174 r4:00000000
[<c019a6f8>] (driver_register+0x0/0x120) from [<c019b398>]
(platform_driver_register+0x6c/0x88)
[<c019b32c>] (platform_driver_register+0x0/0x88) from [<c001a754>]
(omap3beagle_panel_drv_init+0x14/0x1c)
[<c001a740>] (omap3beagle_panel_drv_init+0x0/0x1c) from [<c0008948>]
(kernel_init+0xa4/0x224)
[<c00088a4>] (kernel_init+0x0/0x224) from [<c004ec40>] (do_exit
+0x0/0x604)
Code: e59f302c e5961000 e7932104 e3a00000 (e7923001)
<4>---[ end trace da227214a82491b7 ]---
<0>Kernel panic - not syncing: Attempted to kill init!

koen

unread,
May 9, 2008, 1:12:50 PM5/9/08
to Beagle Board


On 8 mei, 22:43, koen <koen.k...@gmail.com> wrote:
> Hi,
>
> You can find a first, untested stab at enabling the TFP410 framer (the
> thing that drives the DVI-D port) at
>
> http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-first-t...
>
> This applies on top of the RTC patch. Comments, improvements and test
> results welcome.

I now have

http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-second-try.diff

(still applies on top of the rtc patch)

Which gives me this in the bootlog:

omapfb: configured for panel omap3beagle
coherent allocation too big (requested 0x240000 mask 0xffffffff)
omapfb omapfb: unable to allocate FB DMA memory
omapfb omapfb: controller initialization failed (-12)

So, no more scary crash, but an allocation failure. Any hints how to
go from here?

regards,

Koen

patch pasted below, beware of whitespace damage:

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
omap2/board-omap3beagle.c
index 0c0cbfc..c992cc7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -63,12 +63,23 @@ static struct platform_device
omap3_beagle_twl4030rtc_device = {
.id = -1,
};

+static struct platform_device omap3_beagle_lcd_device = {
+ .name = "omap3beagle_lcd",
+ .id = -1,
+};
+
+static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
+ .ctrl_name = "internal",
+};
+
static struct omap_board_config_kernel omap3_beagle_config[]
__initdata = {
{ OMAP_TAG_UART, &omap3_beagle_uart_config },
{ OMAP_TAG_MMC, &omap3beagle_mmc_config },
+ { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
};

static struct platform_device *omap3_beagle_devices[] __initdata = {
+ &omap3_beagle_lcd_device,
#ifdef CONFIG_RTC_DRV_TWL4030
&omap3_beagle_twl4030rtc_device,
#endif
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile
index cad6a68..fe7ee5d 100644
--- a/drivers/video/omap/Makefile
+++ b/drivers/video/omap/Makefile
@@ -32,6 +32,7 @@ objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o
objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o
objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o
objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o
+objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o
objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o

omapfb-objs := $(objs-yy)
diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/
lcd_omap3beagle.c
new file mode 100644
index 0000000..89d9371
--- /dev/null
+++ b/drivers/video/omap/lcd_omap3beagle.c
@@ -0,0 +1,141 @@
+/*
+ * LCD panel support for the TI OMAP3 Beagle board
+ *
+ * Author: Koen Kooi <ko...@openembedded.org>
+ *
+ * Derived from drivers/video/omap/lcd-omap3evm.c
+ *
+ * This program is free software; you can redistribute it and/or
modify it
+ * under the terms of the GNU General Public License as published by
the
+ * Free Software Foundation; either version 2 of the License, or (at
your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
along
+ * with this program; if not, write to the Free Software Foundation,
Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/i2c/twl4030.h>
+
+#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/omapfb.h>
+#include <asm/mach-types.h>
+
+#define LCD_PANEL_ENABLE_GPIO 170
+
+#define LCD_XRES 1024
+#define LCD_YRES 768
+#define LCD_PIXCLOCK_MAX 65000 /* in kHz */
+#define LCD_PIXCLOCK_MIN 65000 /* in kHz */
+
+#define ENABLE_VDAC_DEDICATED 0x03
+#define ENABLE_VDAC_DEV_GRP 0x20
+#define ENABLE_VPLL2_DEDICATED 0x05
+#define ENABLE_VPLL2_DEV_GRP 0xE0
+
+static int omap3beagle_panel_init(struct lcd_panel *panel,
+ struct omapfb_device *fbdev)
+{
+ omap_request_gpio(LCD_PANEL_ENABLE_GPIO);
+
+ return 0;
+}
+
+static void omap3beagle_panel_cleanup(struct lcd_panel *panel)
+{
+}
+
+static int omap3beagle_panel_enable(struct lcd_panel *panel)
+{
+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
+ return 0;
+}
+
+static void omap3beagle_panel_disable(struct lcd_panel *panel)
+{
+ omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
+}
+
+static unsigned long omap3beagle_panel_get_caps(struct lcd_panel
*panel)
+{
+ return 0;
+}
+
+struct lcd_panel omap3beagle_panel = {
+ .name = "omap3beagle",
+ .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
+ OMAP_LCDC_INV_HSYNC,
+
+ .bpp = 24,
+ .data_lines = 24,
+ .x_res = LCD_XRES,
+ .y_res = LCD_YRES,
+ .hsw = 3, /* hsync_len (4) - 1 */
+ .hfp = 3, /* right_margin (4) - 1 */
+ .hbp = 39, /* left_margin (40) - 1 */
+ .vsw = 1, /* vsync_len (2) - 1 */
+ .vfp = 2, /* lower_margin */
+ .vbp = 7, /* upper_margin (8) - 1 */
+
+ .pixel_clock = LCD_PIXCLOCK_MAX,
+
+ .init = omap3beagle_panel_init,
+ .cleanup = omap3beagle_panel_cleanup,
+ .enable = omap3beagle_panel_enable,
+ .disable = omap3beagle_panel_disable,
+ .get_caps = omap3beagle_panel_get_caps,
+};
+
+static int omap3beagle_panel_probe(struct platform_device *pdev)
+{
+ omapfb_register_panel(&omap3beagle_panel);
+ return 0;
+}
+
+static int omap3beagle_panel_remove(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static int omap3beagle_panel_suspend(struct platform_device *pdev,
+ pm_message_t mesg)
+{
+ return 0;
+}
+
+static int omap3beagle_panel_resume(struct platform_device *pdev)
+{
+ return 0;
+}
+
+struct platform_driver omap3beagle_panel_driver = {
+ .probe = omap3beagle_panel_probe,
+ .remove = omap3beagle_panel_remove,
+ .suspend = omap3beagle_panel_suspend,
+ .resume = omap3beagle_panel_resume,
+ .driver = {
+ .name = "omap3beagle_lcd",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init omap3beagle_panel_drv_init(void)
+{
+ return platform_driver_register(&omap3beagle_panel_driver);
+}
+
+static void __exit omap3beagle_panel_drv_exit(void)
+{
+ platform_driver_unregister(&omap3beagle_panel_driver);
+}
+
+module_init(omap3beagle_panel_drv_init);
+module_exit(omap3beagle_panel_drv_exit);

koen

unread,
May 9, 2008, 2:11:34 PM5/9/08
to Beagle Board


On 9 mei, 19:12, koen <koen.k...@gmail.com> wrote:
> On 8 mei, 22:43, koen <koen.k...@gmail.com> wrote:
>
> > Hi,
>
> > You can find a first, untested stab at enabling the TFP410 framer (the
> > thing that drives the DVI-D port) at
>
> >http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-first-t...
>
> > This applies on top of the RTC patch. Comments, improvements and test
> > results welcome.
>
> I now have

http://amethyst.openembedded.net/~koen/beagleboard/beagle-dvi-third-try.diff

> (still applies on top of the rtc patch)

If the TWL doesn't crash I can sometimes get this:

http://amethyst.openembedded.net/~koen/beagleboard/2.6.26rc1-dvi-sign-of-life.jpg

progress :)
Reply all
Reply to author
Forward
0 new messages