From patchwork Sun Feb 13 01:12:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maurus Cuelenaere X-Patchwork-Id: 552531 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1D1Ca5J017725 for ; Sun, 13 Feb 2011 01:12:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753414Ab1BMBMg (ORCPT ); Sat, 12 Feb 2011 20:12:36 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:37534 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753363Ab1BMBMe (ORCPT ); Sat, 12 Feb 2011 20:12:34 -0500 Received: by eye27 with SMTP id 27so1864637eye.19 for ; Sat, 12 Feb 2011 17:12:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=qwbTuasiwyNjeeRzYV73qbZI/uBg8t0eVwIotzs/QWE=; b=Ec6JjpyMJvOk7AZ2OgDBYFGNzD1se8V6YTKxKuoPZORrp53jnpcd/c54o927CEN833 +s6+CD+V3RcEJIYbsJzZCbW4/cNZuXr8g7sHhI3gIWtz2gNvIMxTBpyz2+OIZYW7MwHm 8i7zLLQEFaISV9cMP+ZjL86yvPylVTz5RADFo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; b=isq04LDdCElA+Ez4R8dVB1gVigDwPmuXpQ1FrrxjTrXYljtdbLKoev1b3qtXvq+Qlf joCzMXDiX6ZulyG5g2douVMnvJhjr0GfylC6pcE5CKxA5fWI7lxO/FulB6AMy6xJgzSr +Le2Z+W9IcSMRctFJ4c4x7toUZrCAiL/8KNBc= Received: by 10.213.4.203 with SMTP id 11mr2233310ebs.61.1297559552580; Sat, 12 Feb 2011 17:12:32 -0800 (PST) Received: from [192.168.1.105] (178-116-160-131.access.telenet.be [178.116.160.131]) by mx.google.com with ESMTPS id u1sm978543eeh.16.2011.02.12.17.12.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Feb 2011 17:12:32 -0800 (PST) Message-ID: <4D572FFE.2070405@gmail.com> Date: Sun, 13 Feb 2011 02:12:30 +0100 From: Maurus Cuelenaere User-Agent: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: linux-fbdev@vger.kernel.org Subject: Question wrt custom LCD controller protocol Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 13 Feb 2011 01:12:36 +0000 (UTC) diff --git a/arch/mips/include/asm/mach-jz4740/jz4740_fb.h b/arch/mips/include/asm/mach-jz4740/jz4740_fb.h index 6a50e6f..18af90e 100644 --- a/arch/mips/include/asm/mach-jz4740/jz4740_fb.h +++ b/arch/mips/include/asm/mach-jz4740/jz4740_fb.h @@ -30,8 +30,17 @@ enum jz4740_fb_lcd_type { JZ_LCD_TYPE_DUAL_COLOR_STN = 10, JZ_LCD_TYPE_DUAL_MONOCHROME_STN = 11, JZ_LCD_TYPE_8BIT_SERIAL = 12, + + JZ_SLCD_TYPE_PARALLEL_8_BIT = 1 | (1 << 5), + JZ_SLCD_TYPE_PARALLEL_16_BIT = 0 | (1 << 5), + JZ_SLCD_TYPE_PARALLEL_18_BIT = 2 | (1 << 5), + JZ_SLCD_TYPE_SERIAL_8_BIT = 1 | (3 << 5), + JZ_SLCD_TYPE_SERIAL_16_BIT = 0 | (3 << 5), + JZ_SLCD_TYPE_SERIAL_18_BIT = 2 | (3 << 5), }; +#define JZ4740_FB_IS_SLCD_TYPE(type) ((type) & (1 << 5)) +#define JZ4740_FB_IS_SLCD_SERIAL_TYPE(type) ((type) & (2 << 5)) #define JZ4740_FB_SPECIAL_TFT_CONFIG(start, stop) (((start) << 16) | (stop)) /* @@ -62,6 +71,20 @@ struct jz4740_fb_platform_data { unsigned pixclk_falling_edge:1; unsigned date_enable_active_low:1; + unsigned chip_select_active_low:1; + unsigned register_select_active_low:1; }; +struct platform_device; + +extern void jz4740_fb_slcd_disable_transfer(struct platform_device *pdev); +extern void jz4740_fb_slcd_enable_transfer(struct platform_device *pdev); +extern void jz4740_fb_slcd_send_cmd_data(struct platform_device *pdev, + unsigned int cmd, unsigned int data); +extern void jz4740_fb_slcd_send_cmd(struct platform_device *pdev, + unsigned int cmd); + #endif diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig index 3e7141f..cc6f9f2 100644 --- a/arch/mips/jz4740/Kconfig +++ b/arch/mips/jz4740/Kconfig @@ -6,6 +6,9 @@ choice config JZ4740_QI_LB60 bool "Qi Hardware Ben NanoNote" +config JZ4740_ONDAVX747 + bool "Onda VX747" + endchoice config HAVE_PWM diff --git a/arch/mips/jz4740/Makefile b/arch/mips/jz4740/Makefile index a604eae..2d6512c 100644 --- a/arch/mips/jz4740/Makefile +++ b/arch/mips/jz4740/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_DEBUG_FS) += clock-debugfs.o # board specific support obj-$(CONFIG_JZ4740_QI_LB60) += board-qi_lb60.o +obj-$(CONFIG_JZ4740_ONDAVX747) += board-ondavx747.o # PM support diff --git a/arch/mips/jz4740/board-ondavx747.c b/arch/mips/jz4740/board-ondavx747.c new file mode 100644 index 0000000..1baa931 --- /dev/null +++ b/arch/mips/jz4740/board-ondavx747.c @@ -0,0 +1,263 @@ +/* + * linux/arch/mips/jz4740/board-ondavx747.c + * + * Onda VX747 board support + * + * Copyright (c) 2010 Maurus Cuelenaere + * based on board-qi_lb60.c + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 or later + * as published by the Free Software Foundation. + */ + +#include +#include +#include + +#include