From patchwork Wed Jan 9 13:53:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 155068 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp732632jaa; Wed, 9 Jan 2019 05:53:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN4DKYUX/eSMf2kJANRfZJ0wbhBUrTPVWUaA+003ufjvNoo0orDbaOh4mo1Y9pmbg9pOmtsT X-Received: by 2002:a62:7c47:: with SMTP id x68mr6119875pfc.209.1547042024452; Wed, 09 Jan 2019 05:53:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547042024; cv=none; d=google.com; s=arc-20160816; b=WGHLnys/qElH5dgLGK0cOcD7sK0LoWlQFDBkBuCP/gy9LtUGRrUXhLrFp2hOAt7gR2 QiKLp+5RPvbSiYEhtgbkwrBN13uLnw732ZFC5LLlVuYBd+GuDPPKkKiZoz9MjxifvkUI zFpqXIXLjKpM0sYZCd4p7i2c8t6KXdpzSDAx7UvN0CsZxWX1t4q7/5kujqtDpC0HhyQ4 cr08C4DmsoVYr0hCd74avvWZOgZ2FIUhpDXWXmmGLrtxiS2HvOoOrdvLiLy6YFD4uw1+ /hP/yR8LsUcHuRe+ZA8zAZ6lljB+7nbvbl6Ask2SwLlaIRz5PRDnZs2jAf+yBJWwYlLJ LIsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:to:from:delivered-to; bh=4g/+a130QVwQQlm5lHh7e3aDzsN967AL3vv/P1+lcqA=; b=m/ii+viDV12w9jmcAuReMQOaneATn//P6/a2/ffFoQmb3HleS7rGewNeWHhwUMgGJu qHd7CH6C05vFwPpg+H6OHa+wjIvRadtydwS8xQNPgc7UfG/qA1aUR7foRNfPg/HFm86L wmiUfyXpEMGAQvRpDYF/dmnclmUyqFGQktFZ/HLwI13y24Y8LJq5Nmvwy+Tn1QwYjmWN 5xmCJPZIQKuAK7+t7EVxvQ8nrM8wzCGr8BKoRgTjNZXWJQdhInkfzmA4MBjSlP5HMgo1 Ex4mzFi+WJrZBI90sQs3CQTQHWh6olS4PhbQoo80NCT7Jq1MWaKTHPZAw/7WI3FRAwww G16g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id d12si5011070pln.340.2019.01.09.05.53.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 05:53:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D3CA892DB; Wed, 9 Jan 2019 13:53:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 39F2689C8F for ; Wed, 9 Jan 2019 13:53:40 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id i26so5718294lfc.0 for ; Wed, 09 Jan 2019 05:53:40 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=Oi+cURRfz/1WAZvjgnZJPNhuUhMnn0ZPPEUAscqRtV0=; b=Ou2/imQi7lCgOpLQ6Ul3rKwVLr8KwFphWLlRhWXcbSFLpda/o4lgKL2SoAbiFbzXf/ WYCpBKPmRQnxHWpYaCc/Qt12Oyd8Dm1VPD6nEDvd+t0c0Y3KYwYZRw/4la2731stWA+R HiFcCrlP6p+0fJLXakBENPg8mzXk7iLFqdFQjniF/n3A0pihTnvb9pBRfEVNUN5QGsID kus9ovftthC5vbd8kKztErxtBcqmBU1fl0AFpyRUxuKz/HGWVnzblALoNv1ml3VF4B/N iUEpdVFH5fEhjQd02IYUVIfV5i6oRcv8Vej25Lsrg/+GnKiWSLdD/q0fu8rof68yp+mB njXg== X-Gm-Message-State: AJcUukfbd36hMiLpT9X7EqrVxQ4NQgg3NVHJRDnWasDAjk+l51oOSRUD jyMiPQPi2W53+MbqrSOT+kiGNQ== X-Received: by 2002:a19:5154:: with SMTP id f81mr3743918lfb.96.1547042018221; Wed, 09 Jan 2019 05:53:38 -0800 (PST) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id q8-v6sm15052633lji.69.2019.01.09.05.53.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Jan 2019 05:53:36 -0800 (PST) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH v6] drm/panel: Add a driver for the TPO TPG110 Date: Wed, 9 Jan 2019 14:53:31 +0100 Message-Id: <20190109135331.14895-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The TPO (Toppoly) TPG110 is a pretty generic display driver similar in vein to the Ilitek 93xx devices. It is not a panel per se but a driver used with several low-cost noname panels. This is used on the Nomadik NHK15 combined with a OSD OSD057VA01CT display for WVGA 800x480. The driver is pretty minimalistic right now but can be extended to handle non-default polarities, gamma correction etc. The driver is based on the baked-in code in drivers/video/fbdev/amba-clcd-nomadik.c which will be decomissioned once this us upstream. Acked-by: Sam Ravnborg Signed-off-by: Linus Walleij --- ChangeLog v5->v6: - Collected Sam's ACK. ChangeLog v4->v5: - Assign proper bus_flags. - This is now the only remaining patch. ChangeLog v3->v4: - Tag on the SPI_3WIRE_HIZ flag to the SPI slave mode. ChangeLog v2->v3: - Rewrite as an SPI child device. --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tpo-tpg110.c | 511 +++++++++++++++++++++++ 4 files changed, 529 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tpo-tpg110.c diff --git a/MAINTAINERS b/MAINTAINERS index 32d444476a90..e177473d5417 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4909,6 +4909,13 @@ DRM DRIVER FOR TDFX VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/tdfx/ +DRM DRIVER FOR TPO TPG110 PANELS +M: Linus Walleij +T: git git://anongit.freedesktop.org/drm/drm-misc +S: Maintained +F: drivers/gpu/drm/panel/panel-tpo-tpg110.c +F: Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt + DRM DRIVER FOR USB DISPLAYLINK VIDEO ADAPTERS M: Dave Airlie R: Sean Paul diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3f3537719beb..e3821180b6cd 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -204,6 +204,16 @@ 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_TPO_TPG110 + tristate "TPO TPG 800x400 panel" + depends on OF && SPI && GPIOLIB + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y here if you want to enable support for TPO TPG110 + 400CH LTPS TFT LCD Single Chip Digital Driver for up to + 800x400 LCD panels. + config DRM_PANEL_TRULY_NT35597_WQXGA tristate "Truly WQXGA" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 4396658a7996..cd14ca39c6e0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -21,4 +21,5 @@ 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_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o diff --git a/drivers/gpu/drm/panel/panel-tpo-tpg110.c b/drivers/gpu/drm/panel/panel-tpo-tpg110.c new file mode 100644 index 000000000000..d7c3541fdf28 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c @@ -0,0 +1,511 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Panel driver for the TPO TPG110 400CH LTPS TFT LCD Single Chip + * Digital Driver. + * + * This chip drives a TFT LCD, so it does not know what kind of + * display is actually connected to it, so the width and height of that + * display needs to be supplied from the machine configuration. + * + * Author: + * Linus Walleij + */ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include