From patchwork Fri May 24 10:43:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 434 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 554AA3F066 for ; Fri, 24 May 2019 12:44:00 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id l16sf6576202pfb.23 for ; Fri, 24 May 2019 03:44:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1558694638; cv=pass; d=google.com; s=arc-20160816; b=w/BAoVQvbwigIFWzb3WDPU+M9/JCv8F/rF/HnIbIZ55wTTpNL/TmNc3f9OFZlA273J 1D37RJUlaTBTBACsDlpCC0naLJ38ZEMQr8nms40i4w6FQ/x73g+Bv+9prf68/P4DJar+ 4/1mFSWsz5HWcN79WTI/yVV81v4e2pXeK4L6Cr2rzW3OzHv2KUQPvimXCExQIud49fgN v6ryXm7sUEnsvP7gSv6+U3lv9Qf0r4wVoQB3gVlbLUfScP9/ZntU853fk3o2ODEdzDU7 Qvj5ds20ix1XkjtdIBgcpeMJi1hV2EChfKvD69Uoki0GOYgFT2qRCyckF15rAKtzVWff 1a7g== 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=PLdYkbPsT+z0bWsuaD612RW8nkQ5/8/5G4x+QAazgdQ=; b=RuDsnlHiCR6KMKDJ0ZczxRvKatwPcBSuz4NY9QKWDjwSKbt71gVScqm0BSfFiq0lEP uNCfcDvgUoTwGLB0Z+iVv1TPiAa6Xb7PPZOSnSz5PEAxrecJ+r/gjQny2MvFG8cNgDZ4 EPbprB6EsZRpkYq9sqinmNsKYBVUXrYJrugrm5+M3toxQc71iKAx2DFIdsrWOB9B1oGF jtaYrHZ/eSiEjKoVqtGNXNH7Te1E9XSvLgaVj9c4Xy1mHZfPnlMYOO4dnwRT4iXDq7Wg 3AnZlNhGqBqvaz6tVg9RrvCfkxd8gc9K6NjSZv1mhY4ALjDJwKUlOX6Xq8FGE750IGMW vHMw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OyifHJAO; 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=PLdYkbPsT+z0bWsuaD612RW8nkQ5/8/5G4x+QAazgdQ=; b=rXhHUNklhSh4nKCvqU65ZE41ekQS4qy9QeKNN2m9gLlhURAik2JRqNeJR2EhUTZQVo 1Vvq641orSBVhMG8BA5paLKR0uYm9HrKAQ7QjTZKKPDbWqEh4qraZn9w93fUOReEbR3f Yf4XGFcm0KCvnXyHeulVylZbfZJLHJOq6QygA= 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=PLdYkbPsT+z0bWsuaD612RW8nkQ5/8/5G4x+QAazgdQ=; b=nbLMb1Vp7NIUGO4Cq1xyof63kHg5DrHpQv+7qdOno907kTtwxzDnP0EmoZ5Ov7g0o2 i/4TsbvUXuXC0LvHylbA5ijDhihYzMzcICBvxACu8J5LGjXUxuM5EK4SaJHtG1ExX5mx QszgQWsb8OimDzeAJbdCq0e87TMZ8FuG1IKYKnZkzRnoffo6dbnHyW0pD7EFz6a4B3Pt W8JxocJJ0okMkMU3NqFMejMuTpfpBtSuDKczTjB5i8kf7dko32F5JK9RUpl/JweL8HTc hEWAj7CUwtTijF6V1KO2p+gpBpclXSYmMkS3i1AVorREXk4MGzdi3FOfEVaE/44epFX/ 2oFQ== X-Gm-Message-State: APjAAAU5k+4AN2fg3lLbglqvB/j/QIPMpUK0CGZErfQ4D5YBLDA5BzLf JKv4Iz4dcsbLG81qzi71dh+CwxDh X-Google-Smtp-Source: APXvYqxCxPdpUleDcodZfdyZ0MLUE0SJyj0bDUVerj3j/HLJ5MzOPEcq/A6gB+LtW4YG9cfJ5UfBKw== X-Received: by 2002:a17:902:6bc4:: with SMTP id m4mr29103151plt.266.1558694638757; Fri, 24 May 2019 03:43:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:b605:: with SMTP id b5ls2219017pls.12.gmail; Fri, 24 May 2019 03:43:58 -0700 (PDT) X-Received: by 2002:a17:90a:cb0a:: with SMTP id z10mr8285994pjt.101.1558694638363; Fri, 24 May 2019 03:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558694638; cv=none; d=google.com; s=arc-20160816; b=vGlb4fO2RzcjaXM+C92R5hb7SSQ6jJdpbBfXCVANH606trZc+gXlalelLKXVyUFC3i AX1CLuasVFYcWdQfYpBHKGxS1wZQy/PNmZ9jlM0sM852CkeNZuwZfquOPAiUxzwuXqgx N+G9wgs6tJ4WTfaG+FZqBsLO4qNsvjoxF9zYhoF3cZCfdcOjlfPNP9PO0oWXiByGGknI xOKSor0le+fIMgRCq3wVVWSGZONJF+dKxmnpxpZ60u6tKKYtjcbTej19/ZjDbFDoeRKb n5nCVO0QQXT61qPIiE3r31/f97EOesVDSI8OTmpE8a0Ia/UT6/e6sf7POV96wx+amBo4 j63g== 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=Bq5JeR/itXRFWJkFBy/4tSREROqi+e79H6/1fNsKbVM=; b=eVPQRqz6DpEL0CmZT+PmFAZmS8xl3cOjdShEQiEPdnmI3wo00LXmSlnv0wgPqnU4rd q4S2FPDAjIl7xjd8hYqtsL/DCaHm3AGFzSJk3mrDvC8g03pNrMZIOHsjMB9qw65hLbmh xCnD3rGBCmPmVuh7UYkZUc0dggWdtwREmhesnnVmOZpcUhOetOiaLMxrHdaiMG9VRnKo FodCC9mrZXPSFIi5nyjpNmtPKcG1tSdeZqmkD1tzjt4LBcJuX/9I0L+FTNfBaRWoFSdL Crp/XmpSozuzIi2HRuVj6mrGQwhIue22s2nKhf6O2k3JwrR98GlgbQheUBXnDz2Xkvmg 6SAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OyifHJAO; 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 r18sor183951pgg.5.2019.05.24.03.43.58 for (Google Transport Security); Fri, 24 May 2019 03:43:58 -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:a63:dc09:: with SMTP id s9mr63725852pgg.425.1558694637934; Fri, 24 May 2019 03:43:57 -0700 (PDT) Received: from localhost.localdomain ([183.82.227.60]) by smtp.gmail.com with ESMTPSA id h11sm2303416pfn.170.2019.05.24.03.43.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 03:43:57 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Laurent Pinchart , Chen-Yu Tsai , Maxime Ripard , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Michael Trimarchi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 5/6] drm/bridge: Add Chipone ICN6211 MIPI-DSI/RGB converter bridge Date: Fri, 24 May 2019 16:13:16 +0530 Message-Id: <20190524104317.20287-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190524104317.20287-1-jagan@amarulasolutions.com> References: <20190524104317.20287-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=OyifHJAO; 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: , ICN6211 is MIPI-DSI/RGB converter bridge from chipone. It has a flexible configuration of MIPI DSI signal input and produce RGB565, RGB666, RGB888 output format. Add bridge driver for it. Signed-off-by: Jagan Teki --- Note: - drm_panel_bridge_add seems not working or incompatible as per driver setup. any inputs on this would be great. MAINTAINERS | 6 + drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/chipone-icn6211.c | 344 +++++++++++++++++++++++ 4 files changed, 361 insertions(+) create mode 100644 drivers/gpu/drm/bridge/chipone-icn6211.c diff --git a/MAINTAINERS b/MAINTAINERS index 4cc30c360fda..97ffb265bedc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4991,6 +4991,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc S: Maintained F: drivers/gpu/drm/bochs/ +DRM DRIVER FOR CHIPONE ICN6211 MIPI-DSI to RGB CONVERTOR BRIDGE +M: Jagan Teki +S: Maintained +F: drivers/gpu/drm/bridge/chipone-icn6211.c +F: Documentation/devicetree/bindings/display/bridge/chipone,icn6211.txt + DRM DRIVER FOR FARADAY TVE200 TV ENCODER M: Linus Walleij T: git git://anongit.freedesktop.org/drm/drm-misc diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 3dff9997f5e3..2e06be1aaca3 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -36,6 +36,16 @@ config DRM_CDNS_DSI Support Cadence DPI to DSI bridge. This is an internal bridge and is meant to be directly embedded in a SoC. +config DRM_CHIPONE_ICN6211 + tristate "Chipone ICN6211 MIPI-DSI/RGB converter bridge" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + help + ICN6211 is MIPI-DSI/RGB converter bridge from chipone. + It has a flexible configuration of MIPI DSI signal input + and produce RGB565, RGB666, RGB888 output format. + config DRM_DUMB_VGA_DAC tristate "Dumb VGA DAC Bridge support" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 4934fcf5a6f8..541fdccad10b 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o +obj-$(CONFIG_DRM_CHIPONE_ICN6211) += chipone-icn6211.o obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c new file mode 100644 index 000000000000..76edda52dc57 --- /dev/null +++ b/drivers/gpu/drm/bridge/chipone-icn6211.c @@ -0,0 +1,344 @@ +// 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 +#include + +#include