From patchwork Thu Mar 21 13:59:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 188 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A00BD3F9B9 for ; Thu, 21 Mar 2019 15:00:39 +0100 (CET) Received: by mail-pg1-f198.google.com with SMTP id f6sf5584727pgo.15 for ; Thu, 21 Mar 2019 07:00:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1553176838; cv=pass; d=google.com; s=arc-20160816; b=rCMPix1XxyRVY1pCD3YoDwMJrk1bvJKhTkcJO+QU9hKfT5WTCZrr7xZ1uIomsaFA6C K5C2goBW9ZLDZvio041P6lecd3LYlHETXZt92SdbHUWT/h8fNm9C3RTn73TpEZFyLdQY gHyfqa0uidFQ+FcDLheNTuN8MNm/LClC24YIoX5T8roJD2xo9LR8ZzuuPCVTF9ZeVq+W mDeKXgMablHFWB00sMXNAkB3MXvlA+nNG4VQGlGs4Dxjnpu3PDth9JnYQS8H3OQToGXA WHfg//4dR10cHYxV5PR0qo7d/zMFtAO3kHhOMx6Oi4V6DCCdMe62OeziWaNiCEgz6XtI 9k7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ERb3cyYL7Th+oQxVddJpOMgYmnSPo2rnJ/O+pWP30MU=; b=pctljkgwBk3YStgFMvd+4SUhBGuCYNItlIorxbC2E9IOi2GgtjGE+kWd1+4P7SrpJX YKYh7oXomSx9vKuuiUv28Nqp4kk8gWyUKbPGI6oVPx0EqyoqBJlRPf5iJvbWEtOXEXtp jjZxDhs6/YhS15S5i2BTmr6DJyhOuZWW/l7lL/5EvQfXuKUhErCTEWBkF0uXEnKh1Xe9 MbjWb5EtKoCLJri7Y0ngqhRrmhhsoHFWPQ4xu9z7S6WOVV/uN2/Dd8CKE34Xu8EC8WvB L7aKoY2UO2kMdjTB2k10gh6tUBvhQgNkGkbLjlXyKCinPBl+cdPnAPolCZCzbZfADLrV 4ulA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BWW28I9s; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ERb3cyYL7Th+oQxVddJpOMgYmnSPo2rnJ/O+pWP30MU=; b=F7owRmlQyinM/yBMDQb5ffR86GlEWuKsASRJ3fivCMfLLVZOzsn2u1/aOHacZ22NUJ Eqqo5CRKip8qAue8pionfRDY0YVasIihx8m8DSV49BMXb1npfqQrpPu0WwWxus4QmOJc EaMHRFFtUw3lICyYwkGbCkkPWFLXDjqcUwuy4= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=ERb3cyYL7Th+oQxVddJpOMgYmnSPo2rnJ/O+pWP30MU=; b=FUESPSo0oR8qDAAPeZ9vamTk6eYUzT4ysX77N6Hyn9OxCi1HieZLsiXv/OhWIPSreU z4kg0Rmy+K2KlnlmJEKETxqOI60/+Ddg6St7pyrUtIAPz3AxsWo3t0ZFnCa/gtYBl+qx aqXVw/Kw8SEoAF2ZTmHZ/gyWusKQ9K6IKsdHZDE1ICGXoPeaAZYPW5U32fOw8hCFizCw lqB5rYZeq15Yf4+S5g9aopP/bD5RY4uaA/8KEh5jgChgTqiUhWD8wFA2Fx0ZaZw+5A4p z14MVYMZQS5Q+Dk7GPYM8+3koVC7MGb5cwhmeH305RavPfesiITfsS64NkRZHlfFygPg M2ZQ== X-Gm-Message-State: APjAAAWH5HOfW9ysmmDHFxwlGfYqdsdB5X2pihQmoA78vPDGgyAgVyRH 8UVMcBrGtR31/ZRcIpf8PLFOjH3f X-Google-Smtp-Source: APXvYqxMt2wZSsiI5MxwxUmA37zxitHf1FW+HWbHUAlw+1PFYoh3DQ/gEfPNTk7PjDG/BiPN552iqg== X-Received: by 2002:a62:b508:: with SMTP id y8mr3502565pfe.140.1553176838332; Thu, 21 Mar 2019 07:00:38 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1f03:: with SMTP id f3ls2369562pff.2.gmail; Thu, 21 Mar 2019 07:00:38 -0700 (PDT) X-Received: by 2002:a62:1882:: with SMTP id 124mr3476053pfy.101.1553176837837; Thu, 21 Mar 2019 07:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553176837; cv=none; d=google.com; s=arc-20160816; b=cufuDA/kNAY+2f56OI+QvXYKWVkIUXvHwa+//h36Y13dJ+Q/YGctSLpJ3OHS4p/6ee AtYbQVjhb+lDLbkndkNYZatTk9K4AaYMeWynNPk0DE5g/ujJNiJgiTrARxaHPN5KwKXb OxxDWjFAq4PaTfA16ELxTvt9kr/zkmkF8rTLj7FSX8LN5BWK7UNTW9dLvhFIOor0OA+6 kLqB+NMBGrrunLl3oB9rfKTtnRHKU7BJXkdnM6mtP4kl0kkmGy1ELW05mfOp64EBA6aM xL5LRLimlRP0GCNbRW2I/dcCOBRgqJh4u2d5LblVU3AC9FhTiFsR7X69IR5MQypKnx+k YdOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3gXGdlDzdRXtDwr4Q13yZTOX7irOoHmFxBuPaaIRyEg=; b=Cc5DyqoE4LRh59z3kwCjVOXf3jeHoBP/AoFiFUJ+Cp+jrk0bDr4kZN6XMCqrRz47BF ulQT4Gx8avpcoERB1UsvffmjET708bUm5ki+MeBi+f5hQDYGcVPz368dz8T70gMNkClM UU8HfbpYrGM6zdJ+mgwXeZE4OqwL8eh58obRuLH8D0WGf8QbgASqU7XHLOL2s1O9RzUy SAQ+Z1bPGEU17evDfjjSAJTwKwsTC47SAV5y7Q6XnENqMkYRU/liXCZ75jS+n9IZpQgD IUu7cq0HeeDAugi1CvBJg4hIEItF6bYHtwXIXN3Z6nnpN3D80R+8douGuLJ9w+3EvfDc vKow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BWW28I9s; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i35sor6975805plg.40.2019.03.21.07.00.37 for (Google Transport Security); Thu, 21 Mar 2019 07:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:9b98:: with SMTP id y24mr3706457plp.167.1553176837101; Thu, 21 Mar 2019 07:00:37 -0700 (PDT) Received: from localhost.localdomain ([49.206.202.234]) by smtp.gmail.com with ESMTPSA id i126sm7985158pfc.101.2019.03.21.07.00.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 07:00:36 -0700 (PDT) From: Jagan Teki To: Thierry Reding , David Airlie , Daniel Vetter , Sam Ravnborg , Rob Herring , Mark Rutland Cc: Michael Trimarchi , Ryan Pannell , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, devicetree@vger.kernel.org, Jagan Teki Subject: [PATCH v2 4/4] drm/panel: Add Novatek NT35596 panel driver Date: Thu, 21 Mar 2019 19:29:55 +0530 Message-Id: <20190321135955.25661-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190321135955.25661-1-jagan@amarulasolutions.com> References: <20190321135955.25661-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BWW28I9s; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Novatek NT35596 is a single-chip IC solution for small or medium-sized LTPS TFT LCD panels. NT35596 provides several system interfaces like MIPI/SPI/I2C. Currently added support for Microtech MTF050FHDI-03 is 1080x1920, 4-lane MIPI DSI LCD panel which has inbuilt NT35596 IC chip. NT35596 support several regulators on the chip, among those only 4 regulators like VCI, VDDI/DVDD, AVDD, AVEE are used for power-on sequence. This driver added code for 3-regulator based power-on sequence as of now since MTF050FHDI-03 panel support it. This power-on sequence may be moved to panel_desc in future, if any new panel would come up with other type of sequence. Signed-off-by: Jagan Teki --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-novatek-nt35596.c | 895 ++++++++++++++++++ 4 files changed, 915 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt35596.c diff --git a/MAINTAINERS b/MAINTAINERS index a6d18acda78a..4de80222cffb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4922,6 +4922,12 @@ S: Maintained F: drivers/gpu/drm/tinydrm/hx8357d.c F: Documentation/devicetree/bindings/display/himax,hx8357d.txt +DRM DRIVER FOR NOVATEK NT35596 MIPI-DSI LCD PANELS +M: Jagan Teki +S: Maintained +F: drivers/gpu/drm/panel/panel-novatek-nt35596.c +F: Documentation/devicetree/bindings/display/panel/novatek,nt35596.txt + DRM DRIVER FOR INTEL I810 VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/i810/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 5c2c7e8e6ade..c39aaf40445c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -119,6 +119,19 @@ config DRM_PANEL_LG_LG4573 Say Y here if you want to enable support for LG4573 RGB panel. To compile this driver as a module, choose M here. +config DRM_PANEL_NOVATEK_NT35596 + tristate "Novatek NT35596 panel driver" + 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 Novatek NT35596 + panel controller driver. + + Novatek NT35596 is a single-chip IC solution for small or medium + sized LTPS TFT LCD panels. NT35596 provides several system interfaces + like MIPI/SPI/I2C. + config DRM_PANEL_OLIMEX_LCD_OLINUXINO tristate "Olimex LCD-OLinuXino panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 3a853ea5cff9..05bc93348345 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35596) += panel-novatek-nt35596.o obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35596.c b/drivers/gpu/drm/panel/panel-novatek-nt35596.c new file mode 100644 index 000000000000..433508330321 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt35596.c @@ -0,0 +1,895 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include