From patchwork Thu Sep 20 02:55:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 10606813 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3F05161F for ; Thu, 20 Sep 2018 02:55:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91CF12BC98 for ; Thu, 20 Sep 2018 02:55:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84EC32BCC5; Thu, 20 Sep 2018 02:55:53 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A50C2BCC5 for ; Thu, 20 Sep 2018 02:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732856AbeITIgx (ORCPT ); Thu, 20 Sep 2018 04:36:53 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46358 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732415AbeITIgw (ORCPT ); Thu, 20 Sep 2018 04:36:52 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6F25F60C4F; Thu, 20 Sep 2018 02:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537412148; bh=1nqTjw1myLxCi2+7UnPTp11pltT+g8CfM2SgYClMx6Q=; h=From:To:Cc:Subject:Date:From; b=l//UUIPut0cnMqDGQc03RMlV5GHsLJUNcvEKUdfTz/JY0QtairtJrJ0n/4N80t+oX ngJSMlHgCDcB7cAbQzKkn+Pnqy2iD3pF3BJj4HaeRkW3ISAMu+GFNiPXA/AoekM5Hn a/UIUJL1IwX+ktiFipKvFPlRYsFJbUe/OH7iRNsc= 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 7A832607C6; Thu, 20 Sep 2018 02:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537412146; bh=1nqTjw1myLxCi2+7UnPTp11pltT+g8CfM2SgYClMx6Q=; h=From:To:Cc:Subject:Date:From; b=P1j3xRz7rs6UuO6iG46tLjyNECYrReEIr1nJdLDeYZWTpMQJ47COw7gZIckbzgieT QeAHGbtrXXBoHUDpnQBJNrR3lfKiTY3MlsW8YMd0jkMu7UX3iY0MEhB7DBcYG5/Hgw YoW3+ySdlMhe1LmJWehrRxkciOT69zZ5wvuEM8rk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7A832607C6 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 Cc: "abhinavk@codeaurora.org" , linux-arm-msm@vger.kernel.org, robdclark@gmail.com, seanpaul@chromium.org, nganji@codeaurora.org, chandanu@codeaurora.org, hoegsberg@google.com, architt@codeaurora.org, thierry.reding@gmail.com, robh@kernel.org, p.zabel@pengutronix.de, linus.walleij@linaro.org, bjorn.andersson@linaro.org Subject: [PATCH v7 1/2] drm/panel: Add support for Truly NT35597 panel driver Date: Wed, 19 Sep 2018 19:55:39 -0700 Message-Id: <1537412140-5252-1-git-send-email-abhinavk@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "abhinavk@codeaurora.org" Add support for Truly NT35597 panel driver used in MSM reference platforms. This panel driver supports both single DSI and dual DSI modes. However, this patch series adds support only for dual DSI mode. Changes in v7: - Make the panel commands, name and mode as const - Configure the reset pin as active low in the device tree and adjust the reset sequence - Remove the macros to call the functions - Fix return conditions in the panel prepare call - Change the compatible string to have only the panel driver and the resolution details Signed-off-by: Archit Taneja Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-truly-nt35597.c | 706 ++++++++++++++++++++++++++++ 3 files changed, 715 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-truly-nt35597.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6020c30..7ae74c2 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -186,4 +186,12 @@ 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_NT35597_WQXGA + tristate "Truly WQXGA" + depends on OF + depends on DRM_MIPI_DSI + select VIDEOMODE_HELPERS + help + Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI + Video Mode panel endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 5ccaaa9..80fd19f 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -19,3 +19,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_NT35597_WQXGA) += panel-truly-nt35597.o diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c new file mode 100644 index 0000000..a070d0f --- /dev/null +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c @@ -0,0 +1,706 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include