diff options
| author | Koen Kooi <koen@openembedded.org> | 2009-09-22 19:46:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 10:39:49 -0400 |
| commit | 27969ccc2840c42bfbe4f55d08f0c7ec254d4e93 (patch) | |
| tree | e3a9debb1829bfa22054eee13230eddc51230b4e | |
| parent | 2a8729c47a9dfe5c8ba55883b86b719b33e6e099 (diff) | |
omapfb: add support for the OMAP3 Beagle DVI output
The default resolution is 1024x768@24bit
This version addresses the comments from Felipe Balbi adn Arun Edarath
Fixed-by: Felipe Contreras <felipe.contreras@gmail.com>
Fixed-by: Steve Sakoman <steve@sakoman.com>
Fixed-by: Jarkko Nikula <jarkko.nikula@gmail.com>
Fixed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Koen Kooi <koen@openembedded.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | arch/arm/configs/omap3_beagle_defconfig | 47 | ||||
| -rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
| -rw-r--r-- | drivers/video/omap/lcd_omap3beagle.c | 130 |
3 files changed, 177 insertions, 1 deletions
diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig index 51c0fa8897cd..357d4021e2d0 100644 --- a/arch/arm/configs/omap3_beagle_defconfig +++ b/arch/arm/configs/omap3_beagle_defconfig | |||
| @@ -778,7 +778,33 @@ CONFIG_DAB=y | |||
| 778 | # | 778 | # |
| 779 | # CONFIG_VGASTATE is not set | 779 | # CONFIG_VGASTATE is not set |
| 780 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 780 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
| 781 | # CONFIG_FB is not set | 781 | CONFIG_FB=y |
| 782 | # CONFIG_FIRMWARE_EDID is not set | ||
| 783 | # CONFIG_FB_DDC is not set | ||
| 784 | CONFIG_FB_CFB_FILLRECT=y | ||
| 785 | CONFIG_FB_CFB_COPYAREA=y | ||
| 786 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
| 787 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
| 788 | # CONFIG_FB_SYS_FILLRECT is not set | ||
| 789 | # CONFIG_FB_SYS_COPYAREA is not set | ||
| 790 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
| 791 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
| 792 | # CONFIG_FB_SYS_FOPS is not set | ||
| 793 | # CONFIG_FB_SVGALIB is not set | ||
| 794 | # CONFIG_FB_MACMODES is not set | ||
| 795 | # CONFIG_FB_BACKLIGHT is not set | ||
| 796 | # CONFIG_FB_MODE_HELPERS is not set | ||
| 797 | # CONFIG_FB_TILEBLITTING is not set | ||
| 798 | |||
| 799 | # | ||
| 800 | # Frame buffer hardware drivers | ||
| 801 | # | ||
| 802 | # CONFIG_FB_S1D13XXX is not set | ||
| 803 | # CONFIG_FB_VIRTUAL is not set | ||
| 804 | CONFIG_FB_OMAP=y | ||
| 805 | # CONFIG_FB_OMAP_LCDC_EXTERNAL is not set | ||
| 806 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set | ||
| 807 | CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2 | ||
| 782 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 808 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
| 783 | 809 | ||
| 784 | # | 810 | # |
| @@ -791,6 +817,25 @@ CONFIG_DAB=y | |||
| 791 | # | 817 | # |
| 792 | # CONFIG_VGA_CONSOLE is not set | 818 | # CONFIG_VGA_CONSOLE is not set |
| 793 | CONFIG_DUMMY_CONSOLE=y | 819 | CONFIG_DUMMY_CONSOLE=y |
| 820 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
| 821 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
| 822 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | ||
| 823 | CONFIG_FONTS=y | ||
| 824 | CONFIG_FONT_8x8=y | ||
| 825 | CONFIG_FONT_8x16=y | ||
| 826 | # CONFIG_FONT_6x11 is not set | ||
| 827 | # CONFIG_FONT_7x14 is not set | ||
| 828 | # CONFIG_FONT_PEARL_8x8 is not set | ||
| 829 | # CONFIG_FONT_ACORN_8x8 is not set | ||
| 830 | # CONFIG_FONT_MINI_4x6 is not set | ||
| 831 | # CONFIG_FONT_SUN8x16 is not set | ||
| 832 | # CONFIG_FONT_SUN12x22 is not set | ||
| 833 | # CONFIG_FONT_10x18 is not set | ||
| 834 | # CONFIG_LOGO is not set | ||
| 835 | |||
| 836 | # | ||
| 837 | # Sound | ||
| 838 | # | ||
| 794 | # CONFIG_SOUND is not set | 839 | # CONFIG_SOUND is not set |
| 795 | # CONFIG_HID_SUPPORT is not set | 840 | # CONFIG_HID_SUPPORT is not set |
| 796 | CONFIG_USB_SUPPORT=y | 841 | CONFIG_USB_SUPPORT=y |
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 4345157b23ef..9ff1815bed67 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
| @@ -31,6 +31,7 @@ objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o | |||
| 31 | objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o | 31 | objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o |
| 32 | objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o | 32 | objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o |
| 33 | objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o | 33 | objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o |
| 34 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o | ||
| 34 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o | 35 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o |
| 35 | 36 | ||
| 36 | omapfb-objs := $(objs-yy) | 37 | 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 000000000000..4011910123bf --- /dev/null +++ b/drivers/video/omap/lcd_omap3beagle.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* | ||
| 2 | * LCD panel support for the TI OMAP3 Beagle board | ||
| 3 | * | ||
| 4 | * Author: Koen Kooi <koen@openembedded.org> | ||
| 5 | * | ||
| 6 | * Derived from drivers/video/omap/lcd-omap3evm.c | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | * This program is distributed in the hope that it will be useful, but | ||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License along | ||
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 20 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include <linux/module.h> | ||
| 24 | #include <linux/platform_device.h> | ||
| 25 | #include <linux/gpio.h> | ||
| 26 | #include <linux/i2c/twl4030.h> | ||
| 27 | |||
| 28 | #include <mach/mux.h> | ||
| 29 | #include <mach/omapfb.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | |||
| 32 | #define LCD_PANEL_ENABLE_GPIO 170 | ||
| 33 | |||
| 34 | static int omap3beagle_panel_init(struct lcd_panel *panel, | ||
| 35 | struct omapfb_device *fbdev) | ||
| 36 | { | ||
| 37 | gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable"); | ||
| 38 | return 0; | ||
| 39 | } | ||
| 40 | |||
| 41 | static void omap3beagle_panel_cleanup(struct lcd_panel *panel) | ||
| 42 | { | ||
| 43 | gpio_free(LCD_PANEL_ENABLE_GPIO); | ||
| 44 | } | ||
| 45 | |||
| 46 | static int omap3beagle_panel_enable(struct lcd_panel *panel) | ||
| 47 | { | ||
| 48 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1); | ||
| 49 | return 0; | ||
| 50 | } | ||
| 51 | |||
| 52 | static void omap3beagle_panel_disable(struct lcd_panel *panel) | ||
| 53 | { | ||
| 54 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0); | ||
| 55 | } | ||
| 56 | |||
| 57 | static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel) | ||
| 58 | { | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | struct lcd_panel omap3beagle_panel = { | ||
| 63 | .name = "omap3beagle", | ||
| 64 | .config = OMAP_LCDC_PANEL_TFT, | ||
| 65 | |||
| 66 | .bpp = 16, | ||
| 67 | .data_lines = 24, | ||
| 68 | .x_res = 1024, | ||
| 69 | .y_res = 768, | ||
| 70 | .hsw = 3, /* hsync_len (4) - 1 */ | ||
| 71 | .hfp = 3, /* right_margin (4) - 1 */ | ||
| 72 | .hbp = 39, /* left_margin (40) - 1 */ | ||
| 73 | .vsw = 1, /* vsync_len (2) - 1 */ | ||
| 74 | .vfp = 2, /* lower_margin */ | ||
| 75 | .vbp = 7, /* upper_margin (8) - 1 */ | ||
| 76 | |||
| 77 | .pixel_clock = 64000, | ||
| 78 | |||
| 79 | .init = omap3beagle_panel_init, | ||
| 80 | .cleanup = omap3beagle_panel_cleanup, | ||
| 81 | .enable = omap3beagle_panel_enable, | ||
| 82 | .disable = omap3beagle_panel_disable, | ||
| 83 | .get_caps = omap3beagle_panel_get_caps, | ||
| 84 | }; | ||
| 85 | |||
| 86 | static int omap3beagle_panel_probe(struct platform_device *pdev) | ||
| 87 | { | ||
| 88 | omapfb_register_panel(&omap3beagle_panel); | ||
| 89 | return 0; | ||
| 90 | } | ||
| 91 | |||
| 92 | static int omap3beagle_panel_remove(struct platform_device *pdev) | ||
| 93 | { | ||
| 94 | return 0; | ||
| 95 | } | ||
| 96 | |||
| 97 | static int omap3beagle_panel_suspend(struct platform_device *pdev, | ||
| 98 | pm_message_t mesg) | ||
| 99 | { | ||
| 100 | return 0; | ||
| 101 | } | ||
| 102 | |||
| 103 | static int omap3beagle_panel_resume(struct platform_device *pdev) | ||
| 104 | { | ||
| 105 | return 0; | ||
| 106 | } | ||
| 107 | |||
| 108 | struct platform_driver omap3beagle_panel_driver = { | ||
| 109 | .probe = omap3beagle_panel_probe, | ||
| 110 | .remove = omap3beagle_panel_remove, | ||
| 111 | .suspend = omap3beagle_panel_suspend, | ||
| 112 | .resume = omap3beagle_panel_resume, | ||
| 113 | .driver = { | ||
| 114 | .name = "omap3beagle_lcd", | ||
| 115 | .owner = THIS_MODULE, | ||
| 116 | }, | ||
| 117 | }; | ||
| 118 | |||
| 119 | static int __init omap3beagle_panel_drv_init(void) | ||
| 120 | { | ||
| 121 | return platform_driver_register(&omap3beagle_panel_driver); | ||
| 122 | } | ||
| 123 | |||
| 124 | static void __exit omap3beagle_panel_drv_exit(void) | ||
| 125 | { | ||
| 126 | platform_driver_unregister(&omap3beagle_panel_driver); | ||
| 127 | } | ||
| 128 | |||
| 129 | module_init(omap3beagle_panel_drv_init); | ||
| 130 | module_exit(omap3beagle_panel_drv_exit); | ||
