Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3535402pxj; Mon, 21 Jun 2021 00:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn7IqHp2pop2aYp+0kkFfFsjbxfFaoOu19vgrgCg/TcVnRwQFVQR2suc+ArJdZpjqgq7M4 X-Received: by 2002:a17:906:b2cb:: with SMTP id cf11mr23303213ejb.448.1624260411395; Mon, 21 Jun 2021 00:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624260411; cv=none; d=google.com; s=arc-20160816; b=MJ/2y9sLMgUofqY/Y8rClgBA8ENBNiYuomJn15PiV0QNsbLu3IY3fJdFRnF7Oh9hvF O/039HMPoM+5gt7fnEcOLIR5oCWkLwmC8/1kyigOR1wQGOdIP0u0++W/TgtcU+WXMJP8 FTMo0UBlywbStDxHLBqkKVe39UheMOzTcSbrzQGbBMGu6Dwg2GQ7KiTg8oOb5dzrGgCg HVMC51VkZMdpO6DbBT2sv+6WrbbmtkTIigLFsQlhbkR7O6pem69v8LxwzThHzMOoTqwC znBBA92IhAzt8OnyTFPo4KMwz6V6M0qdSCEclYBIelIVBaiSVniHKXQyDHaph+cbnvdl IsAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kuphqV+Qz4uHQQTA/MdDnxW8V4FGlAndZNWK24EZ8pQ=; b=J5aFWybYw30zyDRgGbWzDiG54BFXRhNyWKeymep//K0UmLVBUZJzo/+1DyA/rzevpl Mfa4PtcjbOXb4ws9IEy+iR8i+tZUIt0734cdsnvFY+ebib/6ADB70Tr4kp5cR21axZiV BlCgb9Gipv3aT6cdIsLwY9W1MemMBBdLB15Xizv0fAUpGNTjc4ng0L6ehB4GKgAGjUzM NXY0gIkDFvFYMDTqyod390z0NmPn9mwv5myZYgNMVfpg/W7D33qDQAN2vfSDXU2UxOFn aS2rKw/mvlYamAe6iMblOSw1W2n29/bGHLQTh+NU1Q6Fm7ZbYG+0DYx5gIZrNUk4U9iH tvgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=U3Hcv5TG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si12969197edc.353.2021.06.21.00.26.29; Mon, 21 Jun 2021 00:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=U3Hcv5TG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbhFUH1I (ORCPT + 99 others); Mon, 21 Jun 2021 03:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbhFUH1I (ORCPT ); Mon, 21 Jun 2021 03:27:08 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D35C061574 for ; Mon, 21 Jun 2021 00:24:54 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id c7-20020a17090ad907b029016faeeab0ccso1136452pjv.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=kBVIAU6ei7B6JFXT9Guh0m4gML6s70UtVat0daIreZsK4fihZjkrK1JmJT2EdHd8ZT 1wed+mG/mCZHg7KMPlCai+C+0/5MjeSC36+Krzj9AtXcVvbU7O/NkionDgLXAivkYE8X +tngxn9LCMFtZRj3VgSRBaNunfvSj4woUK2AfKVGfZJViUbGN6ehc0CMab/bMlXM1F8J VG1ldItQJnaY363KsCF31fGl0AnhF+aPIdUvA4ElYROxJmMmx+FkCaX2k9GyiS1z+Fk/ Q798/e//yjqs9GXhQS4O9zKrAVswS0OLwq6UW4/8j25sy145M6OLKsmuDxlREe45/Wun ZsDw== X-Gm-Message-State: AOAM530ayg8anmJOoYDTn5tw1LyZFHPnpdbFlBWPBK3OUGKpajBfXqoF A33GlFM555dVsjGHJm5ZpUACQg== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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