From patchwork Tue Jan 27 10:50:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 5716041 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C95A9F1D6 for ; Tue, 27 Jan 2015 10:51:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEB73201FE for ; Tue, 27 Jan 2015 10:51:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E76A5201EC for ; Tue, 27 Jan 2015 10:51:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991AbbA0KvS (ORCPT ); Tue, 27 Jan 2015 05:51:18 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:35776 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755987AbbA0KvO (ORCPT ); Tue, 27 Jan 2015 05:51:14 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t0RApDmL020510; Tue, 27 Jan 2015 04:51:13 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t0RApCTb016201; Tue, 27 Jan 2015 04:51:12 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 27 Jan 2015 04:51:12 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t0RAoqLh013652; Tue, 27 Jan 2015 04:51:11 -0600 From: Tomi Valkeinen To: , CC: Tomi Valkeinen Subject: [PATCH 14/14] OMAPDSS: DPI: DRA7xx support Date: Tue, 27 Jan 2015 12:50:42 +0200 Message-ID: <1422355842-11234-15-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1422355842-11234-1-git-send-email-tomi.valkeinen@ti.com> References: <1422355842-11234-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Add support for DRA7xx DPI output. DRA7xx has three DPI outputs, each of which gets its input from a DISPC channel. However, DRA72x has only one video PLL, and DRA74x has two video PLLs. In both cases the video PLLs need to be shared between multiple outputs. The driver doesn't handle this at the moment. Also, DRA7xx requires configuring CONTROL module bits to route the clock from the PLL to the used DISPC channel. Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/omap2/dss/dpi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c index 9a2f8c3b102d..f83e7b030249 100644 --- a/drivers/video/fbdev/omap2/dss/dpi.c +++ b/drivers/video/fbdev/omap2/dss/dpi.c @@ -106,6 +106,17 @@ static struct dss_pll *dpi_get_pll(enum omap_channel channel) return NULL; } + case OMAPDSS_VER_DRA7xx: + switch (channel) { + case OMAP_DSS_CHANNEL_LCD: + case OMAP_DSS_CHANNEL_LCD2: + return dss_pll_find("video0"); + case OMAP_DSS_CHANNEL_LCD3: + return dss_pll_find("video1"); + default: + return NULL; + } + default: return NULL; } @@ -590,6 +601,10 @@ static void dpi_init_pll(struct dpi_data *dpi) if (!pll) return; + /* On DRA7 we need to set a mux to use the PLL */ + if (omapdss_get_version() == OMAPDSS_VER_DRA7xx) + dss_ctrl_pll_set_control_mux(pll->id, dpi->output.dispc_channel); + if (dpi_verify_dsi_pll(pll)) { DSSWARN("DSI PLL not operational\n"); return; @@ -615,6 +630,17 @@ static enum omap_channel dpi_get_channel(int port_num) case OMAPDSS_VER_AM43xx: return OMAP_DSS_CHANNEL_LCD; + case OMAPDSS_VER_DRA7xx: + switch (port_num) { + case 2: + return OMAP_DSS_CHANNEL_LCD3; + case 1: + return OMAP_DSS_CHANNEL_LCD2; + case 0: + default: + return OMAP_DSS_CHANNEL_LCD; + } + case OMAPDSS_VER_OMAP4430_ES1: case OMAPDSS_VER_OMAP4430_ES2: case OMAPDSS_VER_OMAP4: