From patchwork Mon Jun 21 07:24:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12333959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9680BC48BE5 for ; Mon, 21 Jun 2021 07:27:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5989660FDA for ; Mon, 21 Jun 2021 07:27:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5989660FDA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nuEP8IBZZLFWEy277aeQFnjJQYLwW+7tcY5SNQD5GgU=; b=IH7Y8CgLL/0JeN lxMWYaGTBqIegS3g2tUiel704MhqM60SqFoMgmykUmRKj4wMXk1D5HMiocUbdqIJV3i+Qmf9myIHL dIbuocvXAMhYspNC3f/i/0CZokFToaZV8s1vTr92Flh6qNlYhgklx2sfeRZ1NnilSWJQeUaXnUHU3 jRCfozkmpF5e05ggnIdW9MXzvKSugkwhzMACztxyASnY0fys22q4YdqM1Nso6b1p9DJ5TFAI+YdJC RYgTqn8gK/Hq9NPGDNyLDGv9yqZpv9SU1ndj25E+hRn1a3UNEQCpaVpOXMqZdyslgIpVY/Aga2XkN HT03qJE7HzDmApaDLuyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvEJD-002U1w-Aj; Mon, 21 Jun 2021 07:25:27 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvEIg-002Tmh-Il for linux-arm-kernel@lists.infradead.org; Mon, 21 Jun 2021 07:25:01 +0000 Received: by mail-pj1-x102a.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso9713353pjb.4 for ; Mon, 21 Jun 2021 00:24:54 -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=kuphqV+Qz4uHQQTA/MdDnxW8V4FGlAndZNWK24EZ8pQ=; b=U3Hcv5TGTpiMvFH0P1XseFrogLxnazjGtuzdMGY70SMQNZxkXUBme55IXN0uqvbCso rIcMwctFfGSJEnmGykzYA1GQ7cLR62wDOVAE1VaAV08ILk+19HEhcc+sRrYgY2dLl1oH NABIxEmWLIYcJ6WOfPRhMOW7R0nv3JnWV4BfQ= 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=kuphqV+Qz4uHQQTA/MdDnxW8V4FGlAndZNWK24EZ8pQ=; b=mxIbvBcR7HDbaN1UVVFjfIirXMciUD0MNdW2pm9kNFvNQwL54hxBq7pVh74oSx0gi1 BXnnpgfsmtWuRBYm5JgN86Keo2qLdRJsXIK/LaC8ua1mxj08e6k54nz/sjx/5sMJj0jU BYtQrd/t3JrOBbJVbgRUTQKnYVAo4HvqIr7F2+eZBge7XqYFfOxlAJpDVPVD6/Ru7DNi mYU1ELepvcMkLXiHK0DVGs13eLK3PGdYj66nuISIKQxhTEGclAAYTP35pGtjaD8sOwnY c10asibZv1ztcAg8RKkBRctWBgyyFJ5jjlbFk5OaVd8v6ty4EY+aNtl5O9Sk2TzooOaw BPeg== X-Gm-Message-State: AOAM533mQjKwJWCtIPbMcNLOjcvj4HzwG7JeAIU50JnuGszqx5tc1I2l xP2nMz5sLsQD/F0jdpiBl3MZjA== X-Google-Smtp-Source: ABdhPJzTUQO3lvq4P4w8HOABmqpf01NJ72O9fl+f+CbKcofmGCr40LoOEU+GtbaLDhhYfYz/+Ox5Iw== X-Received: by 2002:a17:90a:7c4b:: with SMTP id e11mr37089013pjl.73.1624260293983; Mon, 21 Jun 2021 00:24:53 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a884:139:e97f:a55d:7f66]) by smtp.gmail.com with ESMTPSA id 21sm13951294pfh.103.2021.06.21.00.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 00:24:53 -0700 (PDT) From: Jagan Teki To: Peng Fan , Shawn Guo , Sascha Hauer , Tomasz Figa , Fancy Fang Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , linux-amarula@amarulasolutions.com, Anthony Brandon , Francis Laniel , Matteo Lisi , Milco Pratesi , Jagan Teki , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart Subject: [RFC PATCH 2/9] drm: bridge: Add Samsung SEC MIPI DSIM bridge driver Date: Mon, 21 Jun 2021 12:54:17 +0530 Message-Id: <20210621072424.111733-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210621072424.111733-1-jagan@amarulasolutions.com> References: <20210621072424.111733-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_002454_725743_5275A65B X-CRM114-Status: GOOD ( 20.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Samsung SEC MIPI DSIM Bridge controller is MIPI DSI bridge available in NXP's i.MX8M Mini and Nano Processors. Add bridge driver for it. Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: Laurent Pinchart Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/Kconfig | 15 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/sec-dsim.c | 1535 +++++++++++++++++++++++++++++ 3 files changed, 1551 insertions(+) create mode 100644 drivers/gpu/drm/bridge/sec-dsim.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 19109c0b5481..a183eb165a35 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -189,6 +189,21 @@ config DRM_PARADE_PS8640 The PS8640 is a high-performance and low-power MIPI DSI to eDP converter +config DRM_SEC_MIPI_DSIM + tristate "Samsung SEC MIPI DSIM Bridge controller" + depends on DRM + depends on COMMON_CLK + depends on OF && HAS_IOMEM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL_BRIDGE + select GENERIC_PHY_MIPI_DPHY + select MFD_SYSCON + select REGMAP_MMIO + help + This enables the Samsung SEC MIPI DSIM Bridge controller as + for example found on NXP's i.MX8M Mini and Nano Processors. + config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 88e4edf81087..ff802a4ffe65 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o +obj-$(CONFIG_DRM_SEC_MIPI_DSIM) += sec-dsim.o obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o diff --git a/drivers/gpu/drm/bridge/sec-dsim.c b/drivers/gpu/drm/bridge/sec-dsim.c new file mode 100644 index 000000000000..5b6645bb94e7 --- /dev/null +++ b/drivers/gpu/drm/bridge/sec-dsim.c @@ -0,0 +1,1535 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung SEC MIPI DSIM Bridge + * + * Copyright (C) 2018 NXP + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * Copyright (C) 2021 Amarula Solutions(India) + * + * Based on the drivers/gpu/drm/exynos/exynos_drm_dsi.c + * + * Authors: + * Tomasz Figa + * Andrzej Hajda + * Fancy Fang + * Jagan Teki + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include