Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp278614ybi; Fri, 24 May 2019 03:47:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrU7PsvUmbs7pUJuzBxgZ36//nPd6Q2M+IPcWlZppjvGYoTyUvfadqWyrafcUuZE2sMStl X-Received: by 2002:a17:902:728f:: with SMTP id d15mr31407709pll.167.1558694825903; Fri, 24 May 2019 03:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558694825; cv=none; d=google.com; s=arc-20160816; b=cRVXOhLgyAHY5py0d5aUFGiywc2P/jOMIHGOvQarEQzkTLNU1F/iwVeKDYH7hQfcv2 2M0PbkdF+42dtHazLpiT7TAD7+nJbu+4T9Ik2ooKnuLLJhepj1k+IUNLarB0W38wekvl NfrHG/CoEOKxGn4Aoz5c9ELq/49iqw2kWD2GJTwiDLmHAPmtnDYhiMQej1sG1mBsg8Dd u9xQ2kljfNJAQXAojce0QHQWYMk/eOQ3mqvIdvZ8SsnIn69sQnZoKVoiRKrxM3QK7y8j XlAj0tziH2UC0W6dhpRIeGnKt3Z2jeNjcql/MvVvSssvobxaye52nyjudAxhS+oJjQPx gIIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=dAen3rCW5SDiJAxxvHbuboWmIg4IHATSwqUujxohLwF3DnmxFAxxIpkdCe4oFbQ3xi tcNZpw9Rf6wIWamBlHfLD7eAAEqh3X2M+74AXq87/flyVz8UNdvryKhwwMcFUkeOfpcL xXDPuFabWnx/H3Hf+yyY5Qlo1RiDmHDuRRJFVegUZKF4BavFldeJiM2Y2iGhHK4qDLgQ sVWhUYmxsnZdm0kWZ6Yz55bzvjdKeUMC8salwpYullEmVznNbMPdR2j/f08ATLjmxQo/ wUBXwlo7uFGs+SAQSfsi4tPK9tg8swo/xxfBNOyqODIeW9aICzd4Ot4RI680132K1lbu eQHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OyifHJAO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si3358316pgk.139.2019.05.24.03.46.49; Fri, 24 May 2019 03:47:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OyifHJAO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390803AbfEXKn7 (ORCPT + 99 others); Fri, 24 May 2019 06:43:59 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44661 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390578AbfEXKn6 (ORCPT ); Fri, 24 May 2019 06:43:58 -0400 Received: by mail-pf1-f195.google.com with SMTP id g9so5089411pfo.11 for ; Fri, 24 May 2019 03:43:58 -0700 (PDT) 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:content-transfer-encoding; bh=Bq5JeR/itXRFWJkFBy/4tSREROqi+e79H6/1fNsKbVM=; b=OyifHJAO2FY1I6WMV5KWMz4fEKUQ5ksubmjH/U8znuzy2iQ40wQwxbzcoCgrPSjNqP UmHNJaiDFOdp0ycz0rXeRxoWHEsSi3zTE00HERGPtcpyteh8cFWNlBv7MWc/Esuibd95 bM4Jg6ykMobiJdLIlTq44XJJbby9O4wz+2fXI= 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=Bq5JeR/itXRFWJkFBy/4tSREROqi+e79H6/1fNsKbVM=; b=bniNfyVVT9dUBjo6+aXuB8lf4n4XkwpbpulnzHq10PKIZD67HXuu84eqRHD9+3VwxC b/RurqrOG90HVcbTqaCSHRlGqOS4x2esKTpNpejdcgQgOzYHQRMnll/8+pJ8Mb6m3YLz MrWJ04bpSe4klArRHlCOjdIEE4mpizDKQzgtvQlY3Z1BhCu9Dq38eS2OD6YfvJddOs6+ D80GAUPiwGmXmb+Up+a8LH6qAVC5VRydI2w8cripa66XY96agZipJ4xoxdbsvpBxy11/ x1JUKxi7gUX5Mj7feHa1VEuM6lchkRtzOpiRFYt1kU44HOL1TywY2tFW15DtDP9GIUTW LwTg== X-Gm-Message-State: APjAAAWmIPl0oJ9Mm4+++tiqs0BdXqrEIsj2obgD7MX+XpWsh+ZAvPsC 3ze+tkV1u3cbbI91n9c1ulSj1Q== 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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