From patchwork Thu Jun 21 18:49:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 139561 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2437969lji; Thu, 21 Jun 2018 11:53:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJARsHGnszaHZRQj/C42/CnRvbXTieChw97GGxpbhXs+36PHgBAyHFTX1Hqe/veh8WXfXjv X-Received: by 2002:a63:2ac4:: with SMTP id q187-v6mr24081113pgq.333.1529607201273; Thu, 21 Jun 2018 11:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529607201; cv=none; d=google.com; s=arc-20160816; b=k29rNNhFrJVGdcsRhiz4Mo8Js+Ynqc27mmC0kHgSWKtoPzUDfQO1dxJFzjh4l3tbYZ MTGqk8GyFTWxJ0114NpxFkMir2tD3tieIxLfnvW7U0h+yExOQF9y6OOy3GMF8QYkJFAN GYd0SfZwiAoov2so69AnNKxSP2rEOF4/FysT38uRVB5itWpBOtvoqQ3Wm/CBJApVpWk1 2N2aPV+ZdJu21/SppglWw/8qS/zFry1dM3Ok7x4me5B+Yr1Ry2ktrJ+eCen8pq6wwUhO HvO0pHfGv44PS9xgN1cV09Hi03jHmRBu7OV9DIkaTGc0rM1MMKLZXHB7FXgEKpXBxRm1 UYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:delivered-to:arc-authentication-results; bh=T2vCTd9rZQIfWL7o88AMV2TPJ/TkNTpT65LpaMWYtL8=; b=dbdgKADkwXGucCcg7/r9YmagHlYjdb5LcP0WG1ENdxaA5PMl+HNP1ok2a+1NSoms0o GF4Ip4XOah2LFUHzdFxLSK6u4uA1PiNS6p66TKit9IG/LHzX0J2wZ9mBEAb6Ja1wJ6in lH85P49LybugGjo9PPWJ6DmSaaG9mOYPBYjv3P3I1lrigAxc4DoOc9glPtaDTCSG3SOY gbS1ZNu6BzQEe/om65EHH8DG2YFSvPiCXzBFQFA+e2V+VWHHpXwdKZtPwOvOuf5mK1md g9ZsgiZaha1B4fFBLLMkYQkNmUYD1dci/mDacrj/9Gj0euWog5f+3ppNEOWg73URg1UQ S1bg== 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 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id p6-v6si5651376pfl.279.2018.06.21.11.53.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 11:53:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 1AF736E92F; Thu, 21 Jun 2018 18:52:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id B26146E2E2 for ; Thu, 21 Jun 2018 18:52:47 +0000 (UTC) Received: by mail-lf0-x243.google.com with SMTP id x13-v6so5788562lff.10 for ; Thu, 21 Jun 2018 11:52:47 -0700 (PDT) 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; bh=IZ6hoUfJ5CSVthihuxeuNhFTaWTASfXW0G4UXBAAmIA=; b=Mp3YuxKOusKgvCM+5J1bpLNSqvb3qCP0EqSdZEkN7CU7yice0gtC6nBnFk4yzTd00c OcLywsizkO4nKggaQIRrSCnR8Hsvkw7MDJ6bETlIhaQV7q+HmZb93Mdt+nuQxlwCvYME tKIHjQZRT7T8xm/fYtEvmwKV7yyZNNExfy3RNYTLZd1hmDjDYvuS17XGt3oon4cdPOCE 7eyCmafPHfFIJKhZguJTYnvFHgAxV7RlXx+954JWzKBNutJTWuZqJCv90ta9FOk/MvCo oK2pre3GI+lT081VrmzIJao7PDq1bCNyRC4Kmz2t3+ODrH4LBaywIDjbrEoCricroU3Z bkOw== X-Gm-Message-State: APt69E0mgUdudkktD8G0KNtOi3K691SkJ1wpvJ47iGuN3b5crwj+rdBU mziZgeVxEUv3WMyQ7c1u4Gx6bg== X-Received: by 2002:a19:9355:: with SMTP id v82-v6mr5305870lfd.26.1529607165787; Thu, 21 Jun 2018 11:52:45 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id s5-v6sm977793ljj.93.2018.06.21.11.52.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 11:52:44 -0700 (PDT) From: Linus Walleij To: Thierry Reding , dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/panel: Add a driver for the TPO TPG110 Date: Thu, 21 Jun 2018 20:49:42 +0200 Message-Id: <20180621184942.26087-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621184942.26087-1-linus.walleij@linaro.org> References: <20180621184942.26087-1-linus.walleij@linaro.org> 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: , MIME-Version: 1.0 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. The device tree bindings already exist in: Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt Signed-off-by: Linus Walleij --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tpo-tpg110.c | 525 +++++++++++++++++++++++ 4 files changed, 543 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tpo-tpg110.c diff --git a/MAINTAINERS b/MAINTAINERS index 9d5eeff51b5f..8767a572a56f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4612,6 +4612,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 S: Odd Fixes diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 25682ff3449a..ad946de3a72d 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -177,4 +177,14 @@ 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 && 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. + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f26efc11d746..5136643162cc 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -18,3 +18,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_TPO_TPG110) += panel-tpo-tpg110.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..e2a4a5dc517a --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c @@ -0,0 +1,525 @@ +// 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