From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D98FAC433DF for ; Thu, 16 Jul 2020 15:39:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90CB820825 for ; Thu, 16 Jul 2020 15:39:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fQFehsID" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729278AbgGPPjp (ORCPT ); Thu, 16 Jul 2020 11:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729422AbgGPPjY (ORCPT ); Thu, 16 Jul 2020 11:39:24 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CB05C061755 for ; Thu, 16 Jul 2020 08:39:24 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id a24so3861192pfc.10 for ; Thu, 16 Jul 2020 08:39:24 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yi1s8hLCI0RCiUfWmTLRQoY8wYRpDqwOFsfkKAMjhUw=; b=fQFehsIDo3cficVA6PISFARJwXN1tXHdBf7GQz/8cYREUZLtYfIJAauEhIJUj6ctHI zNlE4ehdseT8kUU14w3SRqmomFGqt0BWSSW9DVR0Oi78CvuL3T058Yl4OLgm4phsfx3j CNQ280cHQmZgaHk7KULfs1I/FWRE6StcT2HLvU6XzRRi7DLUe9pPJ/b1qHc6zIgV9sbs LLkYR2G9XZMK2CvUZQ4vZ2r6YQujjUBY5K71HFHTIbVukhhqAvkDtbBGF0wZUU51yLhj tvN9FiaFhNqpK1KmCl34qLUKPxbcpVCagZphw2pEBKTAQaed1RMa3iTPm7aSBNKjXuTI GWyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yi1s8hLCI0RCiUfWmTLRQoY8wYRpDqwOFsfkKAMjhUw=; b=KCh6XABOBwBZGG/kvA38VYx97ut5IZvde0K7zD/ndyZkb++igittSxYBwoiM02Pfes zoiEiCkH+WyqCpd+VPYW5mwVFMhBeT7MdV9Jzi6fcnYPEI7WPLXKVZ431HQ5YuEeokOu G8RcJLSPi9yIj7AtNOdzXBtdCaKkvY5kz9vXzW9YchuQjei0S0U9QdQ+ZcR7qogYkGg0 VgQT2uu6O6IjgC/6pCkWDt+7k2+5L3JskKMZsVCkeYouQjM3yE/8I/rsR3KdxsCOHVrJ r/GQUoGc7JnTfH5Ha67u1+UQE1spj7tB7yv584T+8bK/lnc41tabmT54PWqIrqMYM/Ze 3rvQ== X-Gm-Message-State: AOAM533RAcWIMVcSlH6hYQA0kRQlHriGj50zgy0TIX5uXmX3LA/THJhM 9TAl2wPOys0QLBoRJQjjHlXtYg== X-Google-Smtp-Source: ABdhPJybhffN3T48hqaV8obnExLi92YkFHiv4mvyPtccSztW49ZcRboQdT17d1OWfESzjnIOpYnifQ== X-Received: by 2002:a62:6285:: with SMTP id w127mr4088130pfb.12.1594913963378; Thu, 16 Jul 2020 08:39:23 -0700 (PDT) Received: from nagraj.local ([49.206.21.239]) by smtp.gmail.com with ESMTPSA id f14sm417056pjq.36.2020.07.16.08.39.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 08:39:22 -0700 (PDT) From: Sumit Semwal To: Thierry Reding , Sam Ravnborg , Rob Herring Cc: David Airlie , Daniel Vetter , Mauro Carvalho Chehab , "David S . Miller" , Rob Herring , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Sumit Semwal , Benni Steini Subject: [PATCH 2/2] drm: panel: Add tianma nt36672a panel driver Date: Thu, 16 Jul 2020 21:08:58 +0530 Message-Id: <20200716153858.526-3-sumit.semwal@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200716153858.526-1-sumit.semwal@linaro.org> References: <20200716153858.526-1-sumit.semwal@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some Poco F1 phones have an LCD panel from Tianma, model nt36672a, with a resolution of 1080x2246 that operates in DSI video mode. Add the drm panel driver for it. During testing, Benni Steini helped us fix the reset sequence timing (from 10ms to 20ms), to get the bootanimation to work on Android. Cc: Benni Steini Signed-off-by: Sumit Semwal --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 859 ++++++++++++++++++ 4 files changed, 878 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c diff --git a/MAINTAINERS b/MAINTAINERS index b4a43a9e7fbc..2d384e51353b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5544,6 +5544,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.txt F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR TIANMA NT36672A PANELS +M: Sumit Semwal +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/panel/tianma,nt36672a-panel.yaml +F: drivers/gpu/drm/panel/panel-tianma-nt36672a.c + DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 39055c1f0e2f..da9d74c1ec91 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -437,6 +437,17 @@ config DRM_PANEL_TPO_TD043MTEA1 Say Y here if you want to enable support for TPO TD043MTEA1 800x480 4.3" panel (found on the OMAP3 Pandora board). +config DRM_PANEL_TIANMA_FHD_NT36672A + tristate "TIANMA NT36672A panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Tianma NT36672A + panel. It is seen mostly in Xiaomi Poco F1 mobile phone. + The panel has a 1080x2246 resolution and uses 24 bit RGB per pixel. + It provides a MIPI DSI interface to the host. + config DRM_PANEL_TPO_TPG110 tristate "TPO TPG 800x400 panel" depends on OF && SPI && GPIOLIB diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index de74f282c433..303e44eb50fa 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o +obj-$(CONFIG_DRM_PANEL_TIANMA_FHD_NT36672A) += panel-tianma-nt36672a.o obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o diff --git a/drivers/gpu/drm/panel/panel-tianma-nt36672a.c b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c new file mode 100644 index 000000000000..166773612ad2 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c @@ -0,0 +1,859 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Linaro Ltd + * Author: Sumit Semwal + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include