From patchwork Thu Mar 4 09:21:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1684 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B13043F158 for ; Thu, 4 Mar 2021 10:22:06 +0100 (CET) Received: by mail-pl1-f197.google.com with SMTP id 17sf6664234plj.1 for ; Thu, 04 Mar 2021 01:22:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1614849725; cv=pass; d=google.com; s=arc-20160816; b=s4cBcbrfa7nmuRY0/RlxQqrBEjol5xRFdOSycRkbsgQXvltG7nDPFu3CrHEdRRkIcs mfBDUn/YckPlDEFzWS2Jc69cm0nVgx7GJm32/E5iNdOmLRuxGlz1l1I99adKIbPjaVDO v0s0jU8dPnBcOUrFKWPxISAhNPNUhQ3T1CdYfEqhVs/mR/J+uiwtNM/I36IvLQU51/ho PtMgSLMB5IEFH7mYOCi1w0m6wZNJRAQqyTsh9L2y0Cwcaou3UXNLLb69S8LLQrW/A32s fXmcSMtyno4DGChpdzsQB+w8kMKp5hgq2Jg2FEWKxgIjrR+V8SMlSmu3ZztUFQ7xbdMh 8jsw== 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=IRxaRVPHBskZeDV8zIQP4bYus+Pmu260DSGdrLh8NFc=; b=mFRRon1ShDs/v8HaSTt5fwfBZTIYHNU3bictS0op6PypfUAmhHIMXWKbHvRNRpN3Sg iLGW3Y16XVJGEAv9mrAoWWzKScH0na2rFBxtiK31LCRBygo+XDaWuLl2c84G3Wp6QwBc Z0X+bE+FoPnXw3WF8Lej7Q5kLJUrWlhC0/iiD39zZmqnJc2CvBPfNJ2vj25A29b+3T+S rMHyqjqWQZzN2rbdwzxMG1EFznpOkNJTlWYnZZLbKszr53NznMvoOjC2dc99WWp1XW+E bpCZ4YfJc54TzLPYMXkMLH5ZV4BAAPpmMY1DIT0Zzz6a/AQRsupCgigDHVOXnuIBu1Ai nYiw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cgwTfJm9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 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=IRxaRVPHBskZeDV8zIQP4bYus+Pmu260DSGdrLh8NFc=; b=bbXMJqCHCWjIEJ8AQXpWc8L3u+KSF3LYnC7926I9Q6NhZ4ijjkUZiYakNPIbedufBw X9brvqXT3jiTZsjKtG6yjCEieAv1j3/lgAQVUyZKZAOuHs9DfHJUCUwnLWWB+7RzvEOy IyFRrgRm1BxL20s7M0qEgLnGebRPY57eb4hY0= 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=IRxaRVPHBskZeDV8zIQP4bYus+Pmu260DSGdrLh8NFc=; b=dN9PLEuQoCUUFU/Y8Qj+KizHyFJ700hLb3CQxN8UyPmMsNXaC/+YDpdriPP7AhBKDS FQlpsSPAcLYgpcv6koRcN2+jD3PAROyK1LDPzT8l3YApdKDSD7i3kyuIImBoUSdixZZl vNsq/PLDhxpq9UIIpMdob9+Ltm55GAcAwReKiRPuuUtTMOyd5HSReKedt2w2qkr04rBc S47Ux4UOKAQfRE4NiSq4MR5X8jr45ibyocl0XW8b5/2uyFlXnHINIZxERxMHsM8rM0ZT s9CJqP0Cf8MX+US8WKVL9hhtNUdGhjY9ZJ4ok9CexWCMji4Wj3j4NCw9anRo0z9jUCNA rSsw== X-Gm-Message-State: AOAM531IQs9oyqSfiqV1OjZnJY/Ph3X971sr+16Uc6U+g8FEEI5ApSca SWOBZl8Nj4nElZWbwkxEo7nZ46Y+ X-Google-Smtp-Source: ABdhPJwkmOxYO/wzbMS90DnNhkTV/1Amwu0S6mXQ3k2NQCdTHOwvMKwLjFv2LBbGhX5UbJhwZacfTA== X-Received: by 2002:a63:4523:: with SMTP id s35mr2962832pga.263.1614849725272; Thu, 04 Mar 2021 01:22:05 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:903:1cd:: with SMTP id e13ls2611056plh.6.gmail; Thu, 04 Mar 2021 01:22:04 -0800 (PST) X-Received: by 2002:a17:90a:4d07:: with SMTP id c7mr3633027pjg.104.1614849724652; Thu, 04 Mar 2021 01:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614849724; cv=none; d=google.com; s=arc-20160816; b=I1/0OLlwgKx3JD/yFibsxWrQ4Q7/rT/614HZU4+RV89DY43gEACa+J6JNeNEkSt0HQ YPuj07Bx9fT0BC3+y4dmI/6OHBR0b137d2ll84VoXq9bVlC0+G7lPIInsgIrfERyJRg4 snOMnhkddqKCYqRMktsCacmmBU0LcXiALyYrtOuCfSGak2BwERgcl965Lan7SJvgm1b+ FdLchKY4CCu7YkGUVuocPveGoOF3K+YnwjbG7Jx8dIKmkhHljWwsklWcZFqBYyD0cAO4 dt81PhWSP7kYQFUFuZS1MS7OiF2pXeqktu9TJgm5kRro3lO8RtdlzZA6anp5Sv3Ei7cK J8FA== 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=ISniL6yTBWi042ZNWJ1+Npn/xauAJIi/V3jYqtdwgms=; b=Z/Wijsz5P4UZLxnkwxWElqqVThFXLyNqHCPW6TBoXn9SA1ZcBlZdW1eLxZ9ZgDZLN0 Y/6WwpGxziAsniFuN8ZBB/xD72qdsZywATryKZK/y7rolbiJtpHW5hbzGQI6avCyIQ/A gs+xaKbgezacQYWqPrMPiWlmLH9U8qP8xZ9GCyd97P6zd64CrblD6axyKf1fesch2KnV YjRRrQSGKPTOpboiqA+XRi+x0LEyVr0+NgZICQUe4NuR5CliocsQAqbN38AJn0Etcgx/ SxzSE256zMv1yvIQjyrUGZV4F/6KTN0TmlSeiO9K6YKBYyS4mnAJqTKlOQN/zEVhKWtj OzRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cgwTfJm9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id gi12sor3688934pjb.37.2021.03.04.01.22.04 for (Google Transport Security); Thu, 04 Mar 2021 01:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90a:71c3:: with SMTP id m3mr3590706pjs.186.1614849724321; Thu, 04 Mar 2021 01:22:04 -0800 (PST) Received: from ub-XPS-13-9350.domain.name ([103.161.30.228]) by smtp.gmail.com with ESMTPSA id 14sm27326981pfy.55.2021.03.04.01.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 01:22:03 -0800 (PST) From: Jagan Teki To: Rob Herring , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sam Ravnborg , Robert Foss Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v4 2/2] drm: bridge: Add Chipone ICN6211 MIPI-DSI to RGB bridge Date: Thu, 4 Mar 2021 14:51:33 +0530 Message-Id: <20210304092133.21717-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210304092133.21717-1-jagan@amarulasolutions.com> References: <20210304092133.21717-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=cgwTfJm9; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 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 to 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 Reviewed-by: Robert Foss --- Changes for v4: - added regulators - replace reset with EN - fixed warnings pointed by Robert Changes for v3: - updated the driver to inline with new drm bridge style MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 13 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/chipone-icn6211.c | 293 +++++++++++++++++++++++ 4 files changed, 308 insertions(+) create mode 100644 drivers/gpu/drm/bridge/chipone-icn6211.c diff --git a/MAINTAINERS b/MAINTAINERS index 065cbdc889d3..9c59402e51bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5533,6 +5533,7 @@ DRM DRIVER FOR CHIPONE ICN6211 MIPI-DSI to RGB CONVERTER BRIDGE M: Jagan Teki S: Maintained F: Documentation/devicetree/bindings/display/bridge/chipone,icn6211.yaml +F: drivers/gpu/drm/bridge/chipone-icn6211.c DRM DRIVER FOR FARADAY TVE200 TV ENCODER M: Linus Walleij diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index e4110d6ca7b3..330ee70ed746 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -27,6 +27,19 @@ 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 OF + select DRM_MIPI_DSI + select DRM_PANEL_BRIDGE + 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. + + If in doubt, say "N". + config DRM_CHRONTEL_CH7033 tristate "Chrontel CH7033 Video Encoder" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 86e7acc76f8d..3eb84b638988 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o +obj-$(CONFIG_DRM_CHIPONE_ICN6211) += chipone-icn6211.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.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..a6151db95586 --- /dev/null +++ b/drivers/gpu/drm/bridge/chipone-icn6211.c @@ -0,0 +1,293 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Amarula Solutions(India) + * Author: Jagan Teki + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include