From: Donghwa Lee <dh09.lee@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] LCD: support another s6e8ax0 panel type
Date: Fri, 27 Apr 2012 13:52:26 +0900 [thread overview]
Message-ID: <4F9A260A.3080208@samsung.com> (raw)
s6e8ax0 panel has many panel of types. This patch support another panel
on TIZEN lunchbox board(HWREVISION 2). This panel has reversed panel
display type. So, I had added necessary command.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/include/asm/arch-exynos/mipi_dsim.h | 1 +
board/samsung/trats/trats.c | 8 ++++++++
drivers/video/s6e8ax0.c | 17 ++++++++++++++++-
3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
index ef6a3d1..9a7cbeb 100644
--- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
+++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
@@ -329,6 +329,7 @@ struct mipi_dsim_lcd_device {
char *name;
int id;
int bus_id;
+ int reverse_panel;
struct mipi_dsim_device *master;
void *platform_data;
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 9d75b8f..4a314c0 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -54,6 +54,11 @@ u32 get_board_rev(void)
static void check_hw_revision(void);
+static int hwrevision(int rev)
+{
+ return (board_rev & 0xf) == rev;
+}
+
int board_init(void)
{
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
@@ -505,6 +510,9 @@ vidinfo_t panel_info = {
void init_panel_info(vidinfo_t *vid)
{
+ if (hwrevision(2))
+ mipi_lcd_device.reverse_panel = 1;
+
strcpy(s6e8ax0_platform_data.lcd_panel_name, mipi_lcd_device.name);
s6e8ax0_platform_data.lcd_power = lcd_power;
s6e8ax0_platform_data.mipi_power = mipi_power;
diff --git a/drivers/video/s6e8ax0.c b/drivers/video/s6e8ax0.c
index 02c5ccf..176c518 100644
--- a/drivers/video/s6e8ax0.c
+++ b/drivers/video/s6e8ax0.c
@@ -28,6 +28,7 @@
static void s6e8ax0_panel_cond(struct mipi_dsim_device *dsim_dev)
{
struct mipi_dsim_master_ops *ops = dsim_dev->master_ops;
+ int reverse = dsim_dev->dsim_lcd_dev->reverse_panel;
const unsigned char data_to_send[] = {
0xf8, 0x3d, 0x35, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x4c,
0x6e, 0x10, 0x27, 0x7d, 0x3f, 0x10, 0x00, 0x00, 0x20,
@@ -36,8 +37,22 @@ static void s6e8ax0_panel_cond(struct mipi_dsim_device *dsim_dev)
0xff, 0xff, 0xc8
};
- ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
+ const unsigned char data_to_send_reverse[] = {
+ 0xf8, 0x19, 0x35, 0x00, 0x00, 0x00, 0x93, 0x00, 0x3c,
+ 0x7d, 0x08, 0x27, 0x7d, 0x3f, 0x00, 0x00, 0x00, 0x20,
+ 0x04, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x08, 0x08,
+ 0x23, 0x23, 0xc0, 0xc1, 0x01, 0x41, 0xc1, 0x00, 0xc1,
+ 0xf6, 0xf6, 0xc1
+ };
+
+ if (reverse) {
+ ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
+ (unsigned int)data_to_send_reverse,
+ ARRAY_SIZE(data_to_send_reverse));
+ } else {
+ ops->cmd_write(dsim_dev, MIPI_DSI_DCS_LONG_WRITE,
(unsigned int)data_to_send, ARRAY_SIZE(data_to_send));
+ }
}
static void s6e8ax0_display_cond(struct mipi_dsim_device *dsim_dev)
--
1.7.4.1
next reply other threads:[~2012-04-27 4:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 4:52 Donghwa Lee [this message]
2012-05-02 7:50 ` [U-Boot] [PATCH] LCD: support another s6e8ax0 panel type Minkyu Kang
2012-05-24 20:41 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F9A260A.3080208@samsung.com \
--to=dh09.lee@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.