From patchwork Sat May 24 05:41:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 4236631 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7E80EBF90B for ; Sat, 24 May 2014 05:49:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 296AB202E6 for ; Sat, 24 May 2014 05:49:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 977AC20121 for ; Sat, 24 May 2014 05:49:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750885AbaEXFtZ (ORCPT ); Sat, 24 May 2014 01:49:25 -0400 Received: from fallback5.mail.ru ([94.100.181.253]:40766 "EHLO fallback5.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbaEXFtY (ORCPT ); Sat, 24 May 2014 01:49:24 -0400 Received: from smtp19.mail.ru (smtp19.mail.ru [94.100.176.156]) by fallback5.mail.ru (mPOP.Fallback_MX) with ESMTP id 115F81184CE36 for ; Sat, 24 May 2014 09:43:47 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=M+lswzb44uWNVHjf68bf/wb8CvlbdA8qCK+O6n58VoI=; b=KshEe7NM1GxRcjRECm1JyE7P6DX9naXSvyFAafsHzXyxnuvH3Q+2v8aMBz94CAx86ZWvq8YPkBLaMO7vTobmbaLXy38NLd2JheGtGeeJu36/vDq2AtzIh3M0XlSX+R55+TnJiPqrqhvmTJ4VAzBANWKdcdzimMX8Zn8Bbxcm4pA=; Received: from [5.18.98.7] (port=33880 helo=shc.zet) by smtp19.mail.ru with esmtpa (envelope-from ) id 1Wo4hm-0005NM-48; Sat, 24 May 2014 09:41:14 +0400 From: Alexander Shiyan To: linux-fbdev@vger.kernel.org Cc: Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Arnd Bergmann , Alexander Shiyan Subject: [PATCH 1/2] video: clps711x: Add new Cirrus Logic CLPS711X framebuffer driver Date: Sat, 24 May 2014 09:41:09 +0400 Message-Id: <1400910069-15146-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.5.5 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Mras: Ok Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RDNS_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds support for the framebuffer available in the Cirrus Logic CLPS711X CPUs. FB features: - 1-2-4 bits per pixel. - Programmable panel size to a maximum of 1024x256 at 4 bps. - Relocatible Frame Buffer (SRAM or SDRAM). - Programmable refresh rates. - 16 gray scale values. This new driver is designed to usage with devicetree only. The driver have been tested with custom board equipped Cirrus Logic EP7312. Signed-off-by: Alexander Shiyan --- drivers/video/fbdev/Kconfig | 15 ++ drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/clps711x-fb.c | 393 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 409 insertions(+) create mode 100644 drivers/video/fbdev/clps711x-fb.c diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 59c98bf..c97b059 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -304,6 +304,7 @@ config FB_ACORN config FB_CLPS711X bool "CLPS711X LCD support" depends on (FB = y) && ARM && ARCH_CLPS711X + depends on !ARCH_MULTIPLATFORM select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -311,6 +312,20 @@ config FB_CLPS711X Say Y to enable the Framebuffer driver for the CLPS7111 and EP7212 processors. +config FB_CLPS711XDT + tristate "CLPS711X LCD support" + depends on FB && (ARCH_CLPS711X || COMPILE_TEST) + select BACKLIGHT_LCD_SUPPORT + select FB_MODE_HELPERS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select LCD_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y to enable the Framebuffer driver for the Cirrus Logic + CLPS711X CPUs. + config FB_SA1100 bool "SA-1100 LCD support" depends on (FB = y) && ARM && ARCH_SA1100 diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile index 0284f2a..102bded 100644 --- a/drivers/video/fbdev/Makefile +++ b/drivers/video/fbdev/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_FB_WMT_GE_ROPS) += wmt_ge_rops.o obj-$(CONFIG_FB_AMIGA) += amifb.o c2p_planar.o obj-$(CONFIG_FB_ARC) += arcfb.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o +obj-$(CONFIG_FB_CLPS711XDT) += clps711x-fb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o obj-$(CONFIG_FB_GRVGA) += grvga.o obj-$(CONFIG_FB_PM2) += pm2fb.o diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c new file mode 100644 index 0000000..8513c06 --- /dev/null +++ b/drivers/video/fbdev/clps711x-fb.c @@ -0,0 +1,393 @@ +/* + * Cirrus Logic CLPS711X FB driver + * + * Copyright (C) 2014 Alexander Shiyan + * Based on driver by Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include