From patchwork Fri Apr 27 04:52:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Donghwa Lee X-Patchwork-Id: 155379 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 173D7B6EEB for ; Fri, 27 Apr 2012 14:52:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4A2B28324; Fri, 27 Apr 2012 06:52:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ktp4zu2fMwWN; Fri, 27 Apr 2012 06:52:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 766982810A; Fri, 27 Apr 2012 06:52:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BA812810A for ; Fri, 27 Apr 2012 06:52:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Grjf+fKFZ-6G for ; Fri, 27 Apr 2012 06:52:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by theia.denx.de (Postfix) with ESMTP id 144AD280FF for ; Fri, 27 Apr 2012 06:52:30 +0200 (CEST) Received: from epcpsbgm2.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M3400FZLG7BOX80@mailout3.samsung.com> for u-boot@lists.denx.de; Fri, 27 Apr 2012 13:52:27 +0900 (KST) X-AuditID: cbfee61b-b7c1cae000004793-32-4f9a260b00ef Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 4D.41.18323.B062A9F4; Fri, 27 Apr 2012 13:52:27 +0900 (KST) Received: from [165.213.219.92] by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M3400EWJG7EBA40@mmp1.samsung.com> for u-boot@lists.denx.de; Fri, 27 Apr 2012 13:52:27 +0900 (KST) Message-id: <4F9A260A.3080208@samsung.com> Date: Fri, 27 Apr 2012 13:52:26 +0900 From: Donghwa Lee User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-version: 1.0 To: u-boot@lists.denx.de, mk7.kang@samsung.com, Anatolij Gustschin , Kyungmin Park , Donghwa Lee X-Brightmail-Tracker: AAAAAA== X-TM-AS-MML: No Subject: [U-Boot] [PATCH] LCD: support another s6e8ax0 panel type X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Kyungmin Park Acked-by: Minkyu Kang --- 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)