Skip to contentSkip to conversation

ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp

PATCH In review stanley.miao 2 participants 3 messages Sep 8, 2008 – Sep 10, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp

For clarity, I re-send this request.

In RGB565 mode, red and blue color are filtered, so the picture on LCD looks green and dark.

Fix omapfb's problem on OMAP3430sdp.

---
 drivers/video/omap/lcd_2430sdp.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..3747e7d 100644

drivers/video/omap/lcd_2430sdp.c +5 -0
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -77,11 +82,19 @@ static int sdp2430_panel_enable(struct lcd_panel

*panel)
u8 ded_val, ded_reg;
u8 grp_val, grp_reg;

+
if (machine_is_omap_3430sdp()) {
ded_reg = TWL4030_VAUX3_DEDICATED;
ded_val = ENABLE_VAUX3_DEDICATED;
grp_reg = TWL4030_VAUX3_DEV_GRP;
grp_val = ENABLE_VAUX3_DEV_GRP;
+
+ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+ t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+ TWL4030_VPLL2_DEDICATED);
+ t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+ TWL4030_VPLL2_DEV_GRP);
+ }
} else {
ded_reg = TWL4030_VAUX2_DEDICATED;
ded_val = ENABLE_VAUX2_DEDICATED;
@@ -104,6 +117,11 @@ static void sdp2430_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(enable_gpio, 0); omap_set_gpio_dataout(backlight_gpio, 0);
+ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+ t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+ t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+ mdelay(4);
+ }
}

static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)

Signature · 1 line
1.5.6.3
#1 lore raw

Prune off a empty line.

Fix omapfb's problem on OMAP3430sdp.

---
 drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/video/omap/lcd_2430sdp.c
index 9af6cd0..b456e02 100644

drivers/video/omap/lcd_2430sdp.c +5 -0
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -82,6 +87,13 @@ static int sdp2430_panel_enable(struct lcd_panel

*panel)
ded_val = ENABLE_VAUX3_DEDICATED;
grp_reg = TWL4030_VAUX3_DEV_GRP;
grp_val = ENABLE_VAUX3_DEV_GRP;
+
+ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+ t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+ TWL4030_VPLL2_DEDICATED);
+ t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+ TWL4030_VPLL2_DEV_GRP);
+ }
} else {
ded_reg = TWL4030_VAUX2_DEDICATED;
ded_val = ENABLE_VAUX2_DEDICATED;
@@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel *panel)
{
omap_set_gpio_dataout(enable_gpio, 0); omap_set_gpio_dataout(backlight_gpio, 0);
+ if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+ t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+ t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+ mdelay(4);
+ }
}

static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)

Signature · 1 line
1.5.6.3
#2 lore raw
Quoted 3 lines · stanley.miao

Prune off a empty line.

Fix omapfb's problem on OMAP3430sdp.

Pushing today.

Tony

Quoted 60 lines
---
 drivers/video/omap/lcd_2430sdp.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
drivers/video/omap/lcd_2430sdp.c +12 -0
index 9af6cd0..b456e02 100644
@@ -23,6 +23,7 @@
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/delay.h>
 #include <linux/i2c/twl4030.h>
 
 #include <mach/gpio.h>
@@ -45,6 +46,10 @@ static unsigned enable_gpio;
 #define ENABLE_VAUX3_DEDICATED	0x03
 #define ENABLE_VAUX3_DEV_GRP	0x20
 
+#define ENABLE_VPLL2_DEDICATED          0x05
+#define ENABLE_VPLL2_DEV_GRP            0xE0
+#define TWL4030_VPLL2_DEV_GRP           0x33
+#define TWL4030_VPLL2_DEDICATED         0x36
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
 
@@ -82,6 +87,13 @@ static int sdp2430_panel_enable(struct lcd_panel
 *panel)
 		ded_val = ENABLE_VAUX3_DEDICATED;
 		grp_reg = TWL4030_VAUX3_DEV_GRP;
 		grp_val = ENABLE_VAUX3_DEV_GRP;
+
+		if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEDICATED,
+					TWL4030_VPLL2_DEDICATED);
+			t2_out(PM_RECEIVER, ENABLE_VPLL2_DEV_GRP,
+					TWL4030_VPLL2_DEV_GRP);
+		}
 	} else {
 		ded_reg = TWL4030_VAUX2_DEDICATED;
drivers/video/omap/lcd_2430sdp.c +5 -0
 		ded_val = ENABLE_VAUX2_DEDICATED;
@@ -104,6 +116,11 @@ static void sdp2430_panel_disable(struct lcd_panel
 *panel)
 {
 	omap_set_gpio_dataout(enable_gpio, 0);
 	omap_set_gpio_dataout(backlight_gpio, 0);
+	if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) {
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
+		t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
+		mdelay(4);
+	}
 }
 

static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)

Signature · 1 line
1.5.6.3