From patchwork Mon Aug 29 09:35:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 74886 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1539023qga; Mon, 29 Aug 2016 02:36:58 -0700 (PDT) X-Received: by 10.66.229.39 with SMTP id sn7mr6585728pac.80.1472463418868; Mon, 29 Aug 2016 02:36:58 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id c69si38329680pfj.224.2016.08.29.02.36.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 02:36:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1beIys-0000Ew-2n; Mon, 29 Aug 2016 09:35:50 +0000 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1beIyk-00085Q-5y for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2016 09:35:44 +0000 Received: by mail-lf0-x231.google.com with SMTP id f93so96610910lfi.2 for ; Mon, 29 Aug 2016 02:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=xUD2ZdayZOorbyopS4W0AZS8pqv7+vfWIVX27PBtHAA=; b=PcHlrYnOAFYtGjAbRI4sH9cBzxzVQKBxMfQpLzbHcrlc5DKsP5rnFa7EcekR7yvSPr ad1LxdJT54L2Q+d2UQ4LBSvyxeZoRQmGbXVA8gt6haAxf3J263Eh32m1Edv6zCJHYIl7 L4Nb9NDdzvo8yLhl843/yKqJB8QTGXqK0wNIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xUD2ZdayZOorbyopS4W0AZS8pqv7+vfWIVX27PBtHAA=; b=Jqa3k4Q32s0NE1HPH3xERgBiElrI36uxbJOMvM9KpHAsblYuyPKlqVgXpxIvCF2FKl NUKUtGDWuLBSIdZc4wX2re13AHlO9dJ+YTG0OEMNMXj4dTajNkumcislktgpnnw1uMno EQi9m2Y5aK0l8iaDqcvTD4qoszgg2skocx0mEk4mEWpZvjI4moVbfxCt3xxnrrAuWfy2 3VEzlCG48xxc3U0Z7I9H25pGGPJfd5gbrhv/fXkF3p7v3xAr6wuAKrZuSTkBpPzha6gt S0xihrJbPoaRhgdKvS/VCr4Cb8PHB8jm0ulc4pRrJnJpCvf404XMeebN70yD/FojxS/I YJyA== X-Gm-Message-State: AE9vXwO35cyvWWlVe0zngcXhfyL2QEfrfAU7Drjbc6v5GSpsOxFRPzi4AQbBMheW5W30yzcP X-Received: by 10.25.210.80 with SMTP id j77mr4651628lfg.139.1472463319473; Mon, 29 Aug 2016 02:35:19 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 21sm6334020ljf.7.2016.08.29.02.35.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 02:35:18 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: integrator: move CP CLCD display to DTS Date: Mon, 29 Aug 2016 11:35:16 +0200 Message-Id: <1472463316-9556-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160829_023542_700029_CCE3843B X-CRM114-Status: GOOD ( 16.72 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:231 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , Russell King , Arnd Bergmann MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The Integrator/CP CLCD VGA display can now be registered fully from the device tree. Delete the board file code and add the display definition to the DTS. Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Actually include the hunk deleting the boardfile code as well. --- arch/arm/boot/dts/integratorcp.dts | 37 ++++++++++++++++++++- arch/arm/mach-integrator/integrator_cp.c | 57 -------------------------------- 2 files changed, 36 insertions(+), 58 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts index 371173ec63fd..915203b4083f 100644 --- a/arch/arm/boot/dts/integratorcp.dts +++ b/arch/arm/boot/dts/integratorcp.dts @@ -249,7 +249,42 @@ reg = <0xC0000000 0x1000>; interrupts = <22>; clocks = <&auxosc>, <&pclk>; - clock-names = "clcd", "apb_pclk"; + clock-names = "clcdclk", "apb_pclk"; + + port { + /* + * The VGA connected is implemented with a + * THS8134A triple DAC that can be run in 24bit + * or 16bit RGB mode. + */ + clcd_pads: endpoint { + remote-endpoint = <&clcd_panel>; + arm,pl11x,tft-r0g0b0-pads = <1 7 13>; + }; + }; + + panel { + compatible = "panel-dpi"; + + port { + clcd_panel: endpoint { + remote-endpoint = <&clcd_pads>; + }; + }; + + /* Standard 640x480 VGA timings */ + panel-timing { + clock-frequency = <25175000>; + hactive = <640>; + hback-porch = <48>; + hfront-porch = <16>; + hsync-len = <96>; + vactive = <480>; + vback-porch = <33>; + vfront-porch = <10>; + vsync-len = <2>; + }; + }; }; }; }; diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 825298349bf5..a9e3cb511fcb 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include @@ -42,8 +40,6 @@ /* Base address to the CP controller */ static void __iomem *intcp_con_base; -#define INTCP_PA_CLCD_BASE 0xc0000000 - /* * Logical Physical * f1000000 10000000 Core module registers @@ -121,57 +117,6 @@ static struct mmci_platform_data mmc_data = { .gpio_cd = -1, }; -/* - * CLCD support - */ -/* - * Ensure VGA is selected. - */ -static void cp_clcd_enable(struct clcd_fb *fb) -{ - struct fb_var_screeninfo *var = &fb->fb.var; - u32 val = CM_CTRL_STATIC1 | CM_CTRL_STATIC2 - | CM_CTRL_LCDEN0 | CM_CTRL_LCDEN1; - - if (var->bits_per_pixel <= 8 || - (var->bits_per_pixel == 16 && var->green.length == 5)) - /* Pseudocolor, RGB555, BGR555 */ - val |= CM_CTRL_LCDMUXSEL_VGA555_TFT555; - else if (fb->fb.var.bits_per_pixel <= 16) - /* truecolor RGB565 */ - val |= CM_CTRL_LCDMUXSEL_VGA565_TFT555; - else - val = 0; /* no idea for this, don't trust the docs */ - - cm_control(CM_CTRL_LCDMUXSEL_MASK| - CM_CTRL_LCDEN0| - CM_CTRL_LCDEN1| - CM_CTRL_STATIC1| - CM_CTRL_STATIC2| - CM_CTRL_STATIC| - CM_CTRL_n24BITEN, val); -} - -static int cp_clcd_setup(struct clcd_fb *fb) -{ - fb->panel = versatile_clcd_get_panel("VGA"); - if (!fb->panel) - return -EINVAL; - - return versatile_clcd_setup_dma(fb, SZ_1M); -} - -static struct clcd_board clcd_data = { - .name = "Integrator/CP", - .caps = CLCD_CAP_5551 | CLCD_CAP_RGB565 | CLCD_CAP_888, - .check = clcdfb_check, - .decode = clcdfb_decode, - .enable = cp_clcd_enable, - .setup = cp_clcd_setup, - .mmap = versatile_clcd_mmap_dma, - .remove = versatile_clcd_remove_dma, -}; - #define REFCOUNTER (__io_address(INTEGRATOR_HDR_BASE) + 0x28) static u64 notrace intcp_read_sched_clock(void) @@ -209,8 +154,6 @@ static struct of_dev_auxdata intcp_auxdata_lookup[] __initdata = { "mmci", &mmc_data), OF_DEV_AUXDATA("arm,primecell", INTEGRATOR_CP_AACI_BASE, "aaci", &mmc_data), - OF_DEV_AUXDATA("arm,primecell", INTCP_PA_CLCD_BASE, - "clcd", &clcd_data), { /* sentinel */ }, };