From patchwork Sat Apr 7 07:06:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 10327751 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5C4AC6038F for ; Sat, 7 Apr 2018 07:07:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E7A7292DD for ; Sat, 7 Apr 2018 07:07:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 431042962C; Sat, 7 Apr 2018 07:07:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDFF62962D for ; Sat, 7 Apr 2018 07:07:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFC936E0A7; Sat, 7 Apr 2018 07:07:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90DF16E0A7; Sat, 7 Apr 2018 07:07:09 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D431C60A00; Sat, 7 Apr 2018 07:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523084828; bh=StoVcvLROHLsSaI6n4LLMA+RG0zapniaUa6CaCkoWF0=; h=From:To:Cc:Subject:Date:From; b=cuQqrXaQLq0UO9G1XITvGw3UnjEfaUXgOBbkKhgd6IDC8U42Mimnaw37s0cTyIKp8 c9mqRp5hKSZAdSDdWKGMGaTMv7iAh0KRPwa2nhND3MywN+Lhb7WIUgFlVYuTx286Xw OKJm6hD2h4lEFcEqKav4rUX5KQ57jgUIgP9EzOlA= Received: from abhinavk-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: abhinavk@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7ABAB60590; Sat, 7 Apr 2018 07:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523084826; bh=StoVcvLROHLsSaI6n4LLMA+RG0zapniaUa6CaCkoWF0=; h=From:To:Cc:Subject:Date:From; b=cZlCBqK0UuFRif9fpA6tS0J/g8vtVCbp0TcnGONn6FiEgXZjzY2QFcKPhx/uP4Zng DwB5jRWVgInKk35y0k5sVj7pCCZYp3q8Wl5a43Jml/K22/sHdSYzDl055SPmJDP3eH rOU6bPOQmAwPJgHp6o720gSKE4+LVVC8lh8mXvQk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7ABAB60590 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=abhinavk@codeaurora.org From: Abhinav Kumar To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Subject: [DPU PATCH 1/2] drm/panel: Add Truly Dual DSI video mode panel Date: Sat, 7 Apr 2018 00:06:52 -0700 Message-Id: <1523084813-858-1-git-send-email-abhinavk@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: manojavm@codeaurora.org, Abhinav Kumar , hoegsberg@google.com, chandanu@codeaurora.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Archit Taneja Add support for truly dual DSI video mode panel panel used in MSM reference platforms. Signed-off-by: Archit Taneja Signed-off-by: Abhinav Kumar --- .../bindings/display/truly,dual_wqxga.txt | 47 ++ drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-truly-dual-dsi.c | 530 +++++++++++++++++++++ 4 files changed, 585 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/truly,dual_wqxga.txt create mode 100644 drivers/gpu/drm/panel/panel-truly-dual-dsi.c diff --git a/Documentation/devicetree/bindings/display/truly,dual_wqxga.txt b/Documentation/devicetree/bindings/display/truly,dual_wqxga.txt new file mode 100644 index 0000000..a1b24c1 --- /dev/null +++ b/Documentation/devicetree/bindings/display/truly,dual_wqxga.txt @@ -0,0 +1,47 @@ +Truly model NT35597 1440x2560 DSI Panel + +Required properties: +- compatible: should be "truly,dual_wqxga" +- vdda-supply: phandle of the regulator that provides the supply voltage + Power IC supply +- lab-supply: phandle of the regulator that provides the supply voltage + for LCD bias +- ibb-supply: phandle of the regulator that provides the supply voltage + for LCD bias +- reset-gpios: phandle of gpio for reset line + This should be 8mA, gpio can be configured using mux, pinctrl, pinctrl-names +- mode-gpios: phandle of the gpio for choosing the mode of the display + for single DSI or Dual DSI +- display-timings: Node for the Panel timings +- link2: phandle to the secondary node of the panel + +Example: + + dsi@ae94000 { + panel@0 { + compatible = "truly,dual_wqxga"; + reg = <0>; + link2 = <&link2>; + vdda-supply = <&pm8998_l14>; + + pinctrl-names = "default", "suspend"; + pinctrl-0 = <&sde_dsi_active>; + pinctrl-1 = <&sde_dsi_suspend>; + + reset-gpios = <&tlmm 6 0>; + mode-gpios = <&tlmm 52 0>; + display-timings { + timing0: timing-0 { + clock-frequency = <268316138>; + hactive = <1440>; + vactive = <2560>; + hfront-porch = <200>; + hback-porch = <64>; + hsync-len = <32>; + vfront-porch = <8>; + vback-porch = <7>; + vsync-len = <1>; + }; + }; + }; + }; diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 988048e..a63c3f7 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -168,4 +168,11 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_TRULY_WQXGA + tristate "Truly WQXGA" + depends on OF + depends on DRM_MIPI_DSI + help + Say Y here if you want to enable support for Truly WQXGA Dual DSI + Video Mode panel endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 3d2a88d..64891f6 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_TRULY_WQXGA) += panel-truly-dual-dsi.o diff --git a/drivers/gpu/drm/panel/panel-truly-dual-dsi.c b/drivers/gpu/drm/panel/panel-truly-dual-dsi.c new file mode 100644 index 0000000..47891ee --- /dev/null +++ b/drivers/gpu/drm/panel/panel-truly-dual-dsi.c @@ -0,0 +1,530 @@ +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include + +#include