diff options
author | Jason Kridner <jdk@ti.com> | 2011-09-16 17:41:44 -0400 |
---|---|---|
committer | Jason Kridner <jdk@ti.com> | 2011-09-16 18:05:46 -0400 |
commit | 45e03ef35f7391a950a0b230088ce05f1b383d01 (patch) | |
tree | 3ce7d104736657057d15fb009d79e88c6f536fff /recipes-kernel | |
parent | c6251231c603256eff6ccd0181c20bb182f9e03b (diff) | |
download | meta-ti-45e03ef35f7391a950a0b230088ce05f1b383d01.tar.gz |
linux-3.0: added bbtoys ulcd support
Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: John Weber <rjohnweber@gmail.com>
Cc: Roger Monk <r-monk@ti.com>
Cc: Joel A Fernandes <agnel.joel@gmail.com>
Cc: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-kernel')
7 files changed, 282 insertions, 336 deletions
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0001-OMAP_VOUT-Fix-build-break-caused-by-update_mode-remo.patch b/recipes-kernel/linux/linux-3.0/ulcd/0001-OMAP_VOUT-Fix-build-break-caused-by-update_mode-remo.patch new file mode 100644 index 00000000..71b9d317 --- /dev/null +++ b/recipes-kernel/linux/linux-3.0/ulcd/0001-OMAP_VOUT-Fix-build-break-caused-by-update_mode-remo.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 47282736d78c31ba07a83748b3d8f7a1510e082e Mon Sep 17 00:00:00 2001 | ||
2 | From: archit taneja <archit@ti.com> | ||
3 | Date: Fri, 5 Aug 2011 07:19:21 +0000 | ||
4 | Subject: [PATCH 1/2] OMAP_VOUT: Fix build break caused by update_mode removal in DSS2 | ||
5 | |||
6 | The DSS2 driver does not support the configuration of the update_mode of a | ||
7 | panel anymore. Remove the setting of update_mode done in omap_vout_probe(). | ||
8 | Ignore configuration of TE since omap_vout driver doesn't support manual update | ||
9 | displays anyway. | ||
10 | |||
11 | Signed-off-by: Archit Taneja <archit@ti.com> | ||
12 | Tested-by: Koen Kooi <koen@dominion.thruhere.net> | ||
13 | Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> | ||
14 | --- | ||
15 | drivers/media/video/omap/omap_vout.c | 13 ------------- | ||
16 | 1 files changed, 0 insertions(+), 13 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c | ||
19 | index 4d07c58..d17d6b6 100644 | ||
20 | --- a/drivers/media/video/omap/omap_vout.c | ||
21 | +++ b/drivers/media/video/omap/omap_vout.c | ||
22 | @@ -2557,19 +2557,6 @@ static int __init omap_vout_probe(struct platform_device *pdev) | ||
23 | "'%s' Display already enabled\n", | ||
24 | def_display->name); | ||
25 | } | ||
26 | - /* set the update mode */ | ||
27 | - if (def_display->caps & | ||
28 | - OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) { | ||
29 | - if (dssdrv->enable_te) | ||
30 | - dssdrv->enable_te(def_display, 0); | ||
31 | - if (dssdrv->set_update_mode) | ||
32 | - dssdrv->set_update_mode(def_display, | ||
33 | - OMAP_DSS_UPDATE_MANUAL); | ||
34 | - } else { | ||
35 | - if (dssdrv->set_update_mode) | ||
36 | - dssdrv->set_update_mode(def_display, | ||
37 | - OMAP_DSS_UPDATE_AUTO); | ||
38 | - } | ||
39 | } | ||
40 | } | ||
41 | |||
42 | -- | ||
43 | 1.7.4.1 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0001-omap2-displays-Add-support-for-ThreeFiveCorp-S9700-D.patch b/recipes-kernel/linux/linux-3.0/ulcd/0001-omap2-displays-Add-support-for-ThreeFiveCorp-S9700-D.patch deleted file mode 100644 index 926398d1..00000000 --- a/recipes-kernel/linux/linux-3.0/ulcd/0001-omap2-displays-Add-support-for-ThreeFiveCorp-S9700-D.patch +++ /dev/null | |||
@@ -1,170 +0,0 @@ | |||
1 | From 364e5e30ff9257f1bac68d7f30f3e7f51e8b1bfc Mon Sep 17 00:00:00 2001 | ||
2 | From: Roger Monk <r-monk@ti.com> | ||
3 | Date: Wed, 10 Aug 2011 16:54:34 +0200 | ||
4 | Subject: [PATCH 1/4] omap2-displays: Add support for ThreeFiveCorp S9700 Display | ||
5 | |||
6 | * Add support for s9700rtwv35tr01b display panel | ||
7 | * This is used on BeagleBoardToys ULCD/-lite daugtercards | ||
8 | |||
9 | Signed-off-by: Roger Monk <r-monk@ti.com> | ||
10 | --- | ||
11 | drivers/video/omap2/displays/Kconfig | 6 + | ||
12 | drivers/video/omap2/displays/Makefile | 1 + | ||
13 | .../omap2/displays/panel-tfc-s9700rtwv35tr01b.c | 118 ++++++++++++++++++++ | ||
14 | 3 files changed, 125 insertions(+), 0 deletions(-) | ||
15 | create mode 100644 drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
16 | |||
17 | diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig | ||
18 | index 609a280..f8be2a8 100644 | ||
19 | --- a/drivers/video/omap2/displays/Kconfig | ||
20 | +++ b/drivers/video/omap2/displays/Kconfig | ||
21 | @@ -30,6 +30,12 @@ config PANEL_NEC_NL8048HL11_01B | ||
22 | This NEC NL8048HL11-01B panel is TFT LCD | ||
23 | used in the Zoom2/3/3630 sdp boards. | ||
24 | |||
25 | +config PANEL_TFCS9700RTWV35TR01B | ||
26 | + tristate "TFC S9700RTWV35TR01B" | ||
27 | + depends on OMAP2_DSS | ||
28 | + help | ||
29 | + LCD Panel used on BeagleboardToys 800x480 LCD Expansion Module | ||
30 | + | ||
31 | config PANEL_TAAL | ||
32 | tristate "Taal DSI Panel" | ||
33 | depends on OMAP2_DSS_DSI | ||
34 | diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile | ||
35 | index 0f601ab..8abdf50 100644 | ||
36 | --- a/drivers/video/omap2/displays/Makefile | ||
37 | +++ b/drivers/video/omap2/displays/Makefile | ||
38 | @@ -5,4 +5,5 @@ obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o | ||
39 | |||
40 | obj-$(CONFIG_PANEL_TAAL) += panel-taal.o | ||
41 | obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o | ||
42 | +obj-$(CONFIG_PANEL_TFCS9700RTWV35TR01B) += panel-tfc-s9700rtwv35tr01b.o | ||
43 | obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o | ||
44 | diff --git a/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c b/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
45 | new file mode 100644 | ||
46 | index 0000000..c2a1a19 | ||
47 | --- /dev/null | ||
48 | +++ b/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
49 | @@ -0,0 +1,118 @@ | ||
50 | +/* | ||
51 | + * LCD panel driver for TFC S9700RTWV35TR-01B | ||
52 | + * | ||
53 | + * Copyright (C) 2011 Texas Instruments Inc | ||
54 | + * Author: Roger Monk <r-monk@ti.com> | ||
55 | + * From Original by : Vaibhav Hiremath <hvaibhav@ti.com> | ||
56 | + * | ||
57 | + * This program is free software; you can redistribute it and/or modify it | ||
58 | + * under the terms of the GNU General Public License version 2 as published by | ||
59 | + * the Free Software Foundation. | ||
60 | + * | ||
61 | + * This program is distributed in the hope that it will be useful, but WITHOUT | ||
62 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
63 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
64 | + * more details. | ||
65 | + * | ||
66 | + * You should have received a copy of the GNU General Public License along with | ||
67 | + * this program. If not, see <http://www.gnu.org/licenses/>. | ||
68 | + */ | ||
69 | + | ||
70 | +#include <linux/module.h> | ||
71 | +#include <linux/delay.h> | ||
72 | +#include <linux/device.h> | ||
73 | +#include <linux/err.h> | ||
74 | + | ||
75 | +#include <video/omapdss.h> | ||
76 | + | ||
77 | +static struct omap_video_timings tfc_timings = { | ||
78 | + .x_res = 800, | ||
79 | + .y_res = 480, | ||
80 | + | ||
81 | + .pixel_clock = 30000, | ||
82 | + | ||
83 | + .hsw = 49, | ||
84 | + .hfp = 41, | ||
85 | + .hbp = 40, | ||
86 | + | ||
87 | + .vsw = 4, | ||
88 | + .vfp = 14, | ||
89 | + .vbp = 29, | ||
90 | +}; | ||
91 | + | ||
92 | +static int tfc_panel_probe(struct omap_dss_device *dssdev) | ||
93 | +{ | ||
94 | + dssdev->panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | | ||
95 | + OMAP_DSS_LCD_IHS; // | OMAP_DSS_LCD_IEO; - TODO check this - doesn't work with this enabled | ||
96 | + dssdev->panel.acb = 0x0; | ||
97 | + dssdev->panel.timings = tfc_timings; | ||
98 | + | ||
99 | + return 0; | ||
100 | +} | ||
101 | + | ||
102 | +static void tfc_panel_remove(struct omap_dss_device *dssdev) | ||
103 | +{ | ||
104 | +} | ||
105 | + | ||
106 | +static int tfc_panel_enable(struct omap_dss_device *dssdev) | ||
107 | +{ | ||
108 | + int r = 0; | ||
109 | + | ||
110 | + /* wait couple of vsyncs until enabling the LCD */ | ||
111 | + msleep(50); | ||
112 | + | ||
113 | + if (dssdev->platform_enable) | ||
114 | + r = dssdev->platform_enable(dssdev); | ||
115 | + | ||
116 | + return r; | ||
117 | +} | ||
118 | + | ||
119 | +static void tfc_panel_disable(struct omap_dss_device *dssdev) | ||
120 | +{ | ||
121 | + if (dssdev->platform_disable) | ||
122 | + dssdev->platform_disable(dssdev); | ||
123 | + | ||
124 | + /* wait at least 5 vsyncs after disabling the LCD */ | ||
125 | + | ||
126 | + msleep(100); | ||
127 | +} | ||
128 | + | ||
129 | +static int tfc_panel_suspend(struct omap_dss_device *dssdev) | ||
130 | +{ | ||
131 | + tfc_panel_disable(dssdev); | ||
132 | + return 0; | ||
133 | +} | ||
134 | + | ||
135 | +static int tfc_panel_resume(struct omap_dss_device *dssdev) | ||
136 | +{ | ||
137 | + return tfc_panel_enable(dssdev); | ||
138 | +} | ||
139 | + | ||
140 | +static struct omap_dss_driver tfc_s9700_driver = { | ||
141 | + .probe = tfc_panel_probe, | ||
142 | + .remove = tfc_panel_remove, | ||
143 | + | ||
144 | + .enable = tfc_panel_enable, | ||
145 | + .disable = tfc_panel_disable, | ||
146 | + .suspend = tfc_panel_suspend, | ||
147 | + .resume = tfc_panel_resume, | ||
148 | + | ||
149 | + .driver = { | ||
150 | + .name = "tfc_s9700_panel", | ||
151 | + .owner = THIS_MODULE, | ||
152 | + }, | ||
153 | +}; | ||
154 | + | ||
155 | +static int __init tfc_panel_drv_init(void) | ||
156 | +{ | ||
157 | + return omap_dss_register_driver(&tfc_s9700_driver); | ||
158 | +} | ||
159 | + | ||
160 | +static void __exit tfc_panel_drv_exit(void) | ||
161 | +{ | ||
162 | + omap_dss_unregister_driver(&tfc_s9700_driver); | ||
163 | +} | ||
164 | + | ||
165 | +module_init(tfc_panel_drv_init); | ||
166 | +module_exit(tfc_panel_drv_exit); | ||
167 | +MODULE_LICENSE("GPL"); | ||
168 | -- | ||
169 | 1.6.6.1 | ||
170 | |||
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0002-WIP-omap-beagleboard-add-bbtoys-ulcd-lite-support.patch b/recipes-kernel/linux/linux-3.0/ulcd/0002-WIP-omap-beagleboard-add-bbtoys-ulcd-lite-support.patch new file mode 100644 index 00000000..d6aace3c --- /dev/null +++ b/recipes-kernel/linux/linux-3.0/ulcd/0002-WIP-omap-beagleboard-add-bbtoys-ulcd-lite-support.patch | |||
@@ -0,0 +1,235 @@ | |||
1 | From 2ced51c12594c56d15b5376a5ff72aedddf41b6a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jdk@ti.com> | ||
3 | Date: Mon, 12 Sep 2011 10:28:14 -0400 | ||
4 | Subject: [PATCH 2/2] WIP: omap: beagleboard: add bbtoys ulcd-lite support | ||
5 | |||
6 | Added support for the BeagleBoardToys ULCD-Lite. | ||
7 | * Added ThreeFiveCorp s9700rtwv35tr-01b panel to | ||
8 | panel-generic-dpi driver. | ||
9 | * Added TSC2007 and LCD panel to board file. | ||
10 | |||
11 | Relied heavily on the TSC2007 integration work done by | ||
12 | John Weber and panel timings from Roger Monk. | ||
13 | |||
14 | Signed-off-by: Jason Kridner <jdk@ti.com> | ||
15 | Cc: John Weber <rjohnweber@gmail.com> | ||
16 | Cc: Roger Monk <r-monk@ti.com> | ||
17 | Cc: Joel A Fernandes <agnel.joel@gmail.com> | ||
18 | Cc: Koen Kooi <koen@dominion.thruhere.net> | ||
19 | --- | ||
20 | arch/arm/mach-omap2/board-omap3beagle.c | 112 ++++++++++++++++++++++ | ||
21 | drivers/video/omap2/displays/panel-generic-dpi.c | 25 +++++ | ||
22 | 2 files changed, 137 insertions(+), 0 deletions(-) | ||
23 | |||
24 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
25 | index 9712099..8c0d1a3 100644 | ||
26 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
27 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
28 | @@ -35,6 +35,7 @@ | ||
29 | #include <linux/i2c/twl.h> | ||
30 | #include <linux/netdevice.h> | ||
31 | #include <linux/if_ether.h> | ||
32 | +#include <linux/i2c/tsc2007.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <asm/mach-types.h> | ||
36 | @@ -87,11 +88,15 @@ static struct { | ||
37 | int usb_pwr_level; | ||
38 | int reset_gpio; | ||
39 | int usr_button_gpio; | ||
40 | + char *lcd_driver_name; | ||
41 | + int lcd_pwren; | ||
42 | } beagle_config = { | ||
43 | .mmc1_gpio_wp = -EINVAL, | ||
44 | .usb_pwr_level = GPIOF_OUT_INIT_LOW, | ||
45 | .reset_gpio = 129, | ||
46 | .usr_button_gpio = 4, | ||
47 | + .lcd_driver_name = "", | ||
48 | + .lcd_pwren = 156 | ||
49 | }; | ||
50 | |||
51 | /* | ||
52 | @@ -477,9 +482,53 @@ static struct omap_dss_device beagle_tv_device = { | ||
53 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
54 | }; | ||
55 | |||
56 | +static int beagle_enable_lcd(struct omap_dss_device *dssdev) | ||
57 | +{ | ||
58 | + if (gpio_is_valid(beagle_config.lcd_pwren)) { | ||
59 | + printk(KERN_INFO "%s: Enabling LCD\n", __FUNCTION__); | ||
60 | + gpio_set_value(beagle_config.lcd_pwren, 0); | ||
61 | + } else { | ||
62 | + printk(KERN_INFO "%s: Invalid LCD enable GPIO: %d\n", | ||
63 | + __FUNCTION__, beagle_config.lcd_pwren); | ||
64 | + } | ||
65 | + | ||
66 | + return 0; | ||
67 | +} | ||
68 | + | ||
69 | +static void beagle_disable_lcd(struct omap_dss_device *dssdev) | ||
70 | +{ | ||
71 | + if (gpio_is_valid(beagle_config.lcd_pwren)) { | ||
72 | + printk(KERN_INFO "%s: Disabling LCD\n", __FUNCTION__); | ||
73 | + gpio_set_value(beagle_config.lcd_pwren, 1); | ||
74 | + } else { | ||
75 | + printk(KERN_INFO "%s: Invalid LCD enable GPIO: %d\n", | ||
76 | + __FUNCTION__, beagle_config.lcd_pwren); | ||
77 | + } | ||
78 | + | ||
79 | + return; | ||
80 | +} | ||
81 | + | ||
82 | +static struct panel_generic_dpi_data lcd_panel = { | ||
83 | + .name = "tfc_s9700rtwv35tr-01b", | ||
84 | + .platform_enable = beagle_enable_lcd, | ||
85 | + .platform_disable = beagle_disable_lcd, | ||
86 | +}; | ||
87 | + | ||
88 | +static struct omap_dss_device beagle_lcd_device = { | ||
89 | + .type = OMAP_DISPLAY_TYPE_DPI, | ||
90 | + .name = "lcd", | ||
91 | + .driver_name = "generic_dpi_panel", | ||
92 | + .phy.dpi.data_lines = 24, | ||
93 | + .platform_enable = beagle_enable_lcd, | ||
94 | + .platform_disable = beagle_disable_lcd, | ||
95 | + .reset_gpio = -EINVAL, | ||
96 | + .data = &lcd_panel, | ||
97 | +}; | ||
98 | + | ||
99 | static struct omap_dss_device *beagle_dss_devices[] = { | ||
100 | &beagle_dvi_device, | ||
101 | &beagle_tv_device, | ||
102 | + &beagle_lcd_device, | ||
103 | }; | ||
104 | |||
105 | static struct omap_dss_board_info beagle_dss_data = { | ||
106 | @@ -496,6 +545,11 @@ static void __init beagle_display_init(void) | ||
107 | "DVI reset"); | ||
108 | if (r < 0) | ||
109 | printk(KERN_ERR "Unable to get DVI reset GPIO\n"); | ||
110 | + | ||
111 | + r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, | ||
112 | + "LCD power"); | ||
113 | + if (r < 0) | ||
114 | + printk(KERN_ERR "Unable to get LCD power enable GPIO\n"); | ||
115 | } | ||
116 | |||
117 | #include "sdram-micron-mt46h32m32lf-6.h" | ||
118 | @@ -654,6 +708,53 @@ static struct i2c_board_info __initdata beagle_i2c2_zippy[] = { | ||
119 | static struct i2c_board_info __initdata beagle_i2c2_zippy[] = {}; | ||
120 | #endif | ||
121 | |||
122 | +#if defined(CONFIG_INPUT_TOUCHSCREEN) && \ | ||
123 | + defined(CONFIG_TOUCHSCREEN_TSC2007) | ||
124 | +/* Touchscreen */ | ||
125 | +#define OMAP3BEAGLE_TSC2007_GPIO 157 | ||
126 | +static int omap3beagle_tsc2007_get_pendown_state(void) | ||
127 | +{ | ||
128 | + return !gpio_get_value(OMAP3BEAGLE_TSC2007_GPIO); | ||
129 | +} | ||
130 | + | ||
131 | +static int omap3beagle_tsc2007_init(void) | ||
132 | +{ | ||
133 | + int gpio = OMAP3BEAGLE_TSC2007_GPIO; | ||
134 | + int ret = 0; | ||
135 | + printk(KERN_WARNING "TSC2007_init started"); | ||
136 | + ret = gpio_request(gpio, "tsc2007_pen_down"); | ||
137 | + if (ret < 0) { | ||
138 | + printk(KERN_ERR "Failed to request GPIO %d for " | ||
139 | + "tsc2007 pen down IRQ\n", gpio); | ||
140 | + return ret; | ||
141 | + } | ||
142 | + | ||
143 | + omap_mux_init_gpio(OMAP3BEAGLE_TSC2007_GPIO, OMAP_PIN_INPUT_PULLUP); | ||
144 | + gpio_direction_input(gpio); | ||
145 | + | ||
146 | + irq_set_irq_type(OMAP_GPIO_IRQ(OMAP3BEAGLE_TSC2007_GPIO), IRQ_TYPE_EDGE_FALLING); | ||
147 | + | ||
148 | + return ret; | ||
149 | +} | ||
150 | + | ||
151 | +static struct tsc2007_platform_data tsc2007_info = { | ||
152 | + .model = 2007, | ||
153 | + .x_plate_ohms = 180, | ||
154 | + .get_pendown_state = omap3beagle_tsc2007_get_pendown_state, | ||
155 | + .init_platform_hw = omap3beagle_tsc2007_init, | ||
156 | +}; | ||
157 | + | ||
158 | +static struct i2c_board_info __initdata beagle_i2c2_bbtoys_ulcd[] = { | ||
159 | + { | ||
160 | + I2C_BOARD_INFO("tsc2007", 0x48), | ||
161 | + .irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_TSC2007_GPIO), | ||
162 | + .platform_data = &tsc2007_info, | ||
163 | + }, | ||
164 | +}; | ||
165 | +#else | ||
166 | +static struct i2c_board_info __initdata beagle_i2c2_bbtoys_ulcd[] = {}; | ||
167 | +#endif | ||
168 | + | ||
169 | static int __init omap3_beagle_i2c_init(void) | ||
170 | { | ||
171 | omap3_pmic_get_config(&beagle_twldata, | ||
172 | @@ -823,6 +924,10 @@ static void __init omap3_beagle_init(void) | ||
173 | |||
174 | gpio_buttons[0].gpio = beagle_config.usr_button_gpio; | ||
175 | |||
176 | + /* TODO: set lcd_driver_name by command line or device tree */ | ||
177 | + beagle_config.lcd_driver_name = "tfc_s9700rtwv35tr-01b", | ||
178 | + lcd_panel.name = beagle_config.lcd_driver_name; | ||
179 | + | ||
180 | platform_add_devices(omap3_beagle_devices, | ||
181 | ARRAY_SIZE(omap3_beagle_devices)); | ||
182 | omap_display_init(&beagle_dss_data); | ||
183 | @@ -898,6 +1003,13 @@ static void __init omap3_beagle_init(void) | ||
184 | platform_device_register(&omap_vwlan_device); | ||
185 | } | ||
186 | |||
187 | + if(!strcmp(expansionboard_name, "bbtoys-ulcd")) | ||
188 | + { | ||
189 | + printk(KERN_INFO "Beagle expansionboard: registering bbtoys-ulcd\n"); | ||
190 | + omap_register_i2c_bus(2, 400, beagle_i2c2_bbtoys_ulcd, | ||
191 | + ARRAY_SIZE(beagle_i2c2_bbtoys_ulcd)); | ||
192 | + } | ||
193 | + | ||
194 | usb_musb_init(NULL); | ||
195 | usbhs_init(&usbhs_bdata); | ||
196 | omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions, | ||
197 | diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c | ||
198 | index 9c90f75..82c1ac3 100644 | ||
199 | --- a/drivers/video/omap2/displays/panel-generic-dpi.c | ||
200 | +++ b/drivers/video/omap2/displays/panel-generic-dpi.c | ||
201 | @@ -232,6 +232,31 @@ static struct panel_config generic_dpi_panels[] = { | ||
202 | .power_off_delay = 0, | ||
203 | .name = "powertip_ph480272t", | ||
204 | }, | ||
205 | + | ||
206 | + /* ThreeFiveCorp S9700RTWV35TR-01B */ | ||
207 | + { | ||
208 | + { | ||
209 | + .x_res = 800, | ||
210 | + .y_res = 480, | ||
211 | + | ||
212 | + .pixel_clock = 30000, | ||
213 | + | ||
214 | + .hsw = 49, | ||
215 | + .hfp = 41, | ||
216 | + .hbp = 40, | ||
217 | + | ||
218 | + .vsw = 4, | ||
219 | + .vfp = 14, | ||
220 | + .vbp = 29, | ||
221 | + }, | ||
222 | + .acbi = 0x0, | ||
223 | + .acb = 0x0, | ||
224 | + .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | | ||
225 | + OMAP_DSS_LCD_IHS, // | OMAP_DSS_LCD_IEO; - TODO check this - doesn't work with this enabled | ||
226 | + .power_on_delay = 50, | ||
227 | + .power_off_delay = 100, | ||
228 | + .name = "tfc_s9700rtwv35tr-01b", | ||
229 | + }, | ||
230 | }; | ||
231 | |||
232 | struct panel_drv_data { | ||
233 | -- | ||
234 | 1.7.4.1 | ||
235 | |||
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0002-omap3-beagle-added-lcd-driver.patch b/recipes-kernel/linux/linux-3.0/ulcd/0002-omap3-beagle-added-lcd-driver.patch deleted file mode 100644 index a0d3b3c1..00000000 --- a/recipes-kernel/linux/linux-3.0/ulcd/0002-omap3-beagle-added-lcd-driver.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From 6b0587615fd0099261d049be17f12eae9f92ae85 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Kridner <jkridner@beagleboard.org> | ||
3 | Date: Fri, 5 Aug 2011 18:07:09 +0000 | ||
4 | Subject: [PATCH 2/4] omap3: beagle: added lcd driver | ||
5 | |||
6 | This enables the tfc_s9700_panel by default. Needs to be extended to | ||
7 | redefine the driver name at boot time. | ||
8 | --- | ||
9 | arch/arm/mach-omap2/board-omap3beagle.c | 25 +++++++++++++++++++++++++ | ||
10 | 1 files changed, 25 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
13 | index 5e1d9f9..b525a5e 100644 | ||
14 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
15 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
16 | @@ -84,11 +84,13 @@ static struct { | ||
17 | int usb_pwr_level; | ||
18 | int reset_gpio; | ||
19 | int usr_button_gpio; | ||
20 | + char *lcd_driver_name; | ||
21 | } beagle_config = { | ||
22 | .mmc1_gpio_wp = -EINVAL, | ||
23 | .usb_pwr_level = GPIOF_OUT_INIT_LOW, | ||
24 | .reset_gpio = 129, | ||
25 | .usr_button_gpio = 4, | ||
26 | + .lcd_driver_name = "", | ||
27 | }; | ||
28 | |||
29 | static struct gpio omap3_beagle_rev_gpios[] __initdata = { | ||
30 | @@ -387,9 +389,28 @@ static struct omap_dss_device beagle_tv_device = { | ||
31 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
32 | }; | ||
33 | |||
34 | +static int beagle_enable_lcd(struct omap_dss_device *dssdev) | ||
35 | +{ | ||
36 | + return 0; | ||
37 | +} | ||
38 | + | ||
39 | +static int beagle_disable_lcd(struct omap_dss_device *dssdev) | ||
40 | +{ | ||
41 | +} | ||
42 | + | ||
43 | +static struct omap_dss_device beagle_lcd_device = { | ||
44 | + .name = "lcd", | ||
45 | + .driver_name = "", | ||
46 | + .type = OMAP_DISPLAY_TYPE_DPI, | ||
47 | + .phy.dpi.data_lines = 24, | ||
48 | + .platform_enable = beagle_enable_lcd, | ||
49 | + .platform_disable = beagle_disable_lcd, | ||
50 | +}; | ||
51 | + | ||
52 | static struct omap_dss_device *beagle_dss_devices[] = { | ||
53 | &beagle_dvi_device, | ||
54 | &beagle_tv_device, | ||
55 | + &beagle_lcd_device, | ||
56 | }; | ||
57 | |||
58 | static struct omap_dss_board_info beagle_dss_data = { | ||
59 | @@ -733,6 +754,10 @@ static void __init omap3_beagle_init(void) | ||
60 | |||
61 | gpio_buttons[0].gpio = beagle_config.usr_button_gpio; | ||
62 | |||
63 | + /* TODO: set lcd_driver_name by command line or device tree */ | ||
64 | + beagle_config.lcd_driver_name = "tfc_s9700_panel"; | ||
65 | + beagle_lcd_device.driver_name = beagle_config.lcd_driver_name; | ||
66 | + | ||
67 | platform_add_devices(omap3_beagle_devices, | ||
68 | ARRAY_SIZE(omap3_beagle_devices)); | ||
69 | omap_display_init(&beagle_dss_data); | ||
70 | -- | ||
71 | 1.6.6.1 | ||
72 | |||
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0003-lcd-Set-LCD-power-enable-GPIO-in-board-file.patch b/recipes-kernel/linux/linux-3.0/ulcd/0003-lcd-Set-LCD-power-enable-GPIO-in-board-file.patch deleted file mode 100644 index ccc510f0..00000000 --- a/recipes-kernel/linux/linux-3.0/ulcd/0003-lcd-Set-LCD-power-enable-GPIO-in-board-file.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 4b175ec2e08d1fa4a0bbaeb79ee2381164572fba Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <agnel.joel@gmail.com> | ||
3 | Date: Thu, 18 Aug 2011 16:19:40 -0500 | ||
4 | Subject: [PATCH 3/4] lcd: Set LCD power-enable GPIO in board file | ||
5 | |||
6 | With this, the ULCD-lite display works with the 3.0 kernel | ||
7 | |||
8 | v2 changes: | ||
9 | Fixed the beagle_config structure | ||
10 | |||
11 | Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> | ||
12 | --- | ||
13 | arch/arm/mach-omap2/board-omap3beagle.c | 7 +++++++ | ||
14 | 1 files changed, 7 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
17 | index b525a5e..6b0afda 100644 | ||
18 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
19 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
20 | @@ -85,12 +85,14 @@ static struct { | ||
21 | int reset_gpio; | ||
22 | int usr_button_gpio; | ||
23 | char *lcd_driver_name; | ||
24 | + int lcd_pwren; | ||
25 | } beagle_config = { | ||
26 | .mmc1_gpio_wp = -EINVAL, | ||
27 | .usb_pwr_level = GPIOF_OUT_INIT_LOW, | ||
28 | .reset_gpio = 129, | ||
29 | .usr_button_gpio = 4, | ||
30 | .lcd_driver_name = "", | ||
31 | + .lcd_pwren = 156 | ||
32 | }; | ||
33 | |||
34 | static struct gpio omap3_beagle_rev_gpios[] __initdata = { | ||
35 | @@ -423,6 +425,11 @@ static void __init beagle_display_init(void) | ||
36 | { | ||
37 | int r; | ||
38 | |||
39 | + r = gpio_request_one(beagle_config.lcd_pwren, GPIOF_OUT_INIT_LOW, | ||
40 | + "LCD power"); | ||
41 | + if (r < 0) | ||
42 | + printk(KERN_ERR "Unable to get LCD power enable GPIO\n"); | ||
43 | + | ||
44 | r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW, | ||
45 | "DVI reset"); | ||
46 | if (r < 0) | ||
47 | -- | ||
48 | 1.6.6.1 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-3.0/ulcd/0004-Make-fbset-show-correct-timing-values.patch b/recipes-kernel/linux/linux-3.0/ulcd/0004-Make-fbset-show-correct-timing-values.patch deleted file mode 100644 index fb37e96a..00000000 --- a/recipes-kernel/linux/linux-3.0/ulcd/0004-Make-fbset-show-correct-timing-values.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 1d70480dca0c7648f5f51fad5ffb0e191212615a Mon Sep 17 00:00:00 2001 | ||
2 | From: Joel A Fernandes <agnel.joel@gmail.com> | ||
3 | Date: Wed, 17 Aug 2011 00:28:49 -0500 | ||
4 | Subject: [PATCH 4/4] Make fbset show correct timing values | ||
5 | |||
6 | Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> | ||
7 | Cc: "Monk, Roger" <r-monk@ti.com> | ||
8 | --- | ||
9 | .../omap2/displays/panel-tfc-s9700rtwv35tr01b.c | 8 +++++++- | ||
10 | 1 files changed, 7 insertions(+), 1 deletions(-) | ||
11 | |||
12 | diff --git a/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c b/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
13 | index c2a1a19..6afd4e3 100644 | ||
14 | --- a/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
15 | +++ b/drivers/video/omap2/displays/panel-tfc-s9700rtwv35tr01b.c | ||
16 | @@ -88,6 +88,12 @@ static int tfc_panel_resume(struct omap_dss_device *dssdev) | ||
17 | return tfc_panel_enable(dssdev); | ||
18 | } | ||
19 | |||
20 | +static void tfc_panel_get_timings(struct omap_dss_device *dssdev, | ||
21 | + struct omap_video_timings *timings) | ||
22 | +{ | ||
23 | + *timings = dssdev->panel.timings; | ||
24 | +} | ||
25 | + | ||
26 | static struct omap_dss_driver tfc_s9700_driver = { | ||
27 | .probe = tfc_panel_probe, | ||
28 | .remove = tfc_panel_remove, | ||
29 | @@ -96,7 +102,7 @@ static struct omap_dss_driver tfc_s9700_driver = { | ||
30 | .disable = tfc_panel_disable, | ||
31 | .suspend = tfc_panel_suspend, | ||
32 | .resume = tfc_panel_resume, | ||
33 | - | ||
34 | + .get_timings = tfc_panel_get_timings, | ||
35 | .driver = { | ||
36 | .name = "tfc_s9700_panel", | ||
37 | .owner = THIS_MODULE, | ||
38 | -- | ||
39 | 1.6.6.1 | ||
40 | |||
diff --git a/recipes-kernel/linux/linux_3.0.bb b/recipes-kernel/linux/linux_3.0.bb index dd531abd..40e7ea5e 100644 --- a/recipes-kernel/linux/linux_3.0.bb +++ b/recipes-kernel/linux/linux_3.0.bb | |||
@@ -10,7 +10,7 @@ PV = "3.0.4" | |||
10 | SRCREV_pn-${PN} = "04aa37b5f943920017ad094e776cd5514b1a9246" | 10 | SRCREV_pn-${PN} = "04aa37b5f943920017ad094e776cd5514b1a9246" |
11 | 11 | ||
12 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc | 12 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc |
13 | MACHINE_KERNEL_PR_append = "b" | 13 | MACHINE_KERNEL_PR_append = "c" |
14 | 14 | ||
15 | FILESPATH =. "${FILE_DIRNAME}/linux-3.0:${FILE_DIRNAME}/linux-3.0/${MACHINE}:" | 15 | FILESPATH =. "${FILE_DIRNAME}/linux-3.0:${FILE_DIRNAME}/linux-3.0/${MACHINE}:" |
16 | 16 | ||
@@ -210,10 +210,8 @@ SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-3.0.y.git | |||
210 | \ | 210 | \ |
211 | file://sgx/0001-ARM-L2-Add-and-export-outer_clean_all.patch \ | 211 | file://sgx/0001-ARM-L2-Add-and-export-outer_clean_all.patch \ |
212 | \ | 212 | \ |
213 | file://ulcd/0001-omap2-displays-Add-support-for-ThreeFiveCorp-S9700-D.patch \ | 213 | file://ulcd/0001-OMAP_VOUT-Fix-build-break-caused-by-update_mode-remo.patch \ |
214 | file://ulcd/0002-omap3-beagle-added-lcd-driver.patch \ | 214 | file://ulcd/0002-WIP-omap-beagleboard-add-bbtoys-ulcd-lite-support.patch \ |
215 | file://ulcd/0003-lcd-Set-LCD-power-enable-GPIO-in-board-file.patch \ | ||
216 | file://ulcd/0004-Make-fbset-show-correct-timing-values.patch \ | ||
217 | \ | 215 | \ |
218 | file://omap4/0001-OMAP-Fix-linking-error-in-twl-common.c-for-OMAP2-3-4.patch \ | 216 | file://omap4/0001-OMAP-Fix-linking-error-in-twl-common.c-for-OMAP2-3-4.patch \ |
219 | \ | 217 | \ |