Commit | Line | Data |
---|---|---|
03e11104 RQ |
1 | /* |
2 | * linux/arch/arm/mach-omap2/board-rx51-video.c | |
3 | * | |
4 | * Copyright (C) 2010 Nokia | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License version 2 as | |
8 | * published by the Free Software Foundation. | |
9 | */ | |
10 | ||
11 | #include <linux/kernel.h> | |
12 | #include <linux/init.h> | |
13 | #include <linux/platform_device.h> | |
14 | #include <linux/gpio.h> | |
15 | #include <linux/spi/spi.h> | |
16 | #include <linux/mm.h> | |
03e11104 | 17 | #include <asm/mach-types.h> |
a0b38cc4 | 18 | #include <video/omapdss.h> |
3c803f40 AT |
19 | #include <video/omap-panel-data.h> |
20 | ||
2203747c | 21 | #include <linux/platform_data/spi-omap2-mcspi.h> |
03e11104 | 22 | |
b76c8b19 | 23 | #include "soc.h" |
0a6f98c9 | 24 | #include "board-rx51.h" |
04aeae77 | 25 | |
03e11104 RQ |
26 | #include "mux.h" |
27 | ||
28 | #define RX51_LCD_RESET_GPIO 90 | |
29 | ||
30 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) | |
31 | ||
3c803f40 AT |
32 | static struct panel_acx565akm_data lcd_data = { |
33 | .reset_gpio = RX51_LCD_RESET_GPIO, | |
34 | }; | |
03e11104 RQ |
35 | |
36 | static struct omap_dss_device rx51_lcd_device = { | |
37 | .name = "lcd", | |
38 | .driver_name = "panel-acx565akm", | |
39 | .type = OMAP_DISPLAY_TYPE_SDI, | |
40 | .phy.sdi.datapairs = 2, | |
3c803f40 | 41 | .data = &lcd_data, |
03e11104 RQ |
42 | }; |
43 | ||
60d24eed S |
44 | static struct omap_dss_device rx51_tv_device = { |
45 | .name = "tv", | |
46 | .type = OMAP_DISPLAY_TYPE_VENC, | |
47 | .driver_name = "venc", | |
48 | .phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE, | |
60d24eed S |
49 | }; |
50 | ||
03e11104 RQ |
51 | static struct omap_dss_device *rx51_dss_devices[] = { |
52 | &rx51_lcd_device, | |
60d24eed | 53 | &rx51_tv_device, |
03e11104 RQ |
54 | }; |
55 | ||
56 | static struct omap_dss_board_info rx51_dss_board_info = { | |
57 | .num_devices = ARRAY_SIZE(rx51_dss_devices), | |
58 | .devices = rx51_dss_devices, | |
59 | .default_device = &rx51_lcd_device, | |
60 | }; | |
61 | ||
03e11104 RQ |
62 | static int __init rx51_video_init(void) |
63 | { | |
64 | if (!machine_is_nokia_rx51()) | |
65 | return 0; | |
66 | ||
67 | if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { | |
68 | pr_err("%s cannot configure MUX for LCD RESET\n", __func__); | |
69 | return 0; | |
70 | } | |
71 | ||
d5e13227 | 72 | omap_display_init(&rx51_dss_board_info); |
3c803f40 | 73 | |
03e11104 RQ |
74 | return 0; |
75 | } | |
76 | ||
b76c8b19 | 77 | omap_subsys_initcall(rx51_video_init); |
03e11104 | 78 | #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ |