From patchwork Sat Oct 3 22:50:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 11815491 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D8F892C for ; Sun, 4 Oct 2020 04:30:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 DBFE7206DD for ; Sun, 4 Oct 2020 04:30:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nPN09Fra"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="U20Di+Lh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBFE7206DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=S72weKfuMS9UyeLqAD4nrH8YcZLWKBCooGbKJRZ69P0=; b=nPN09Frat7UhKahNFx7ByxuoHN 978SodbMJpvdjfcWuhaJtJrNRXGGQ7z9ZPVZp3OsFJzG0sxKx0ij3PTdb1jNzqky67ZR5mDucTiKt MPdArsbnruQVNZq6O9YjeZxMsnvoY7KBqGgqvE7jWFmCNjoppLPxwSyEXcdjqRnG9r7U9v1qysj9j B/BkF0rcckbpurbhkCHmrveQpYpA/VpnjiJQMmOA5WlWj1cb6NDQjpGL9KwsAJASnFma6R6hMuCms /G2yA6iZzk0+lA7gBaA8eS9DVqqzl6BPR4X/Cq8Lt85AmJlwn6Sv7IQs5W+qOwXXU/xZUBx/zl4jS qRfiROvQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOvfM-00026Y-QH; Sun, 04 Oct 2020 04:30:32 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOvfK-00025w-LW for linux-arm-kernel@merlin.infradead.org; Sun, 04 Oct 2020 04:30:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=XoJnvsS2i29C5vBCzxywx8PGbzr6CXwO/jGYwMMdKbs=; b=U20Di+LhwnbFlef6TSA1WJfGiY 1ty4krxRvgDpLKwFT4gau0AOz1nxAmD20qOeFkc99MRkjLeVe3DwwkvI23/iWkk3+1CVYj5Sfodpd iHQkH1cYlgfVY3MfHnyuJe8ancgFUA9IImEihQIhvks1xpuuK8tfs+D7fghN3QII33TFSmPhwilZJ gpKCBnGGH3R1dZmUXcshdTg0R2Tmxvij9mE1eWZahRHAih4k8JUBkbERYUtSrLcmsGrzfBd1/8Xo1 gUkH7gHHrpFBQtVAqT3iOuFxaggyJM9TcmvqIxsXRNNCkNnQjOPak/wOxzLgaZm1wUtwceaqqFIQo qd3WMgCg==; Received: from mail-out.m-online.net ([212.18.0.9]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOqMF-0007rl-6i for linux-arm-kernel@lists.infradead.org; Sat, 03 Oct 2020 22:50:29 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4C3hsD5LfSz1qs3t; Sun, 4 Oct 2020 00:50:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4C3hsD44kyz1qy6R; Sun, 4 Oct 2020 00:50:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id vFcNXQFwUaIF; Sun, 4 Oct 2020 00:50:22 +0200 (CEST) X-Auth-Info: rBmzivWnzWNIJHJiK4FX/DfzXNzYDmve1ZhXiNaeQx8= Received: from desktop.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 4 Oct 2020 00:50:22 +0200 (CEST) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] phy: exynos-mipi-video: Add support for NXP i.MX8MM Date: Sun, 4 Oct 2020 00:50:19 +0200 Message-Id: <20201003225020.164358-1-marex@denx.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201003_235027_512087_C9FFCBDD X-CRM114-Status: GOOD ( 17.45 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.18.0.9 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.18.0.9 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , Dong Aisheng , linux-samsung-soc@vger.kernel.org, Abel Vesa , devicetree@vger.kernel.org, Shawn Guo , =?utf-8?q?Guid?= =?utf-8?q?o_G=C3=BCnther?= , Jaehoon Chung , Rob Herring , NXP Linux Team , Marek Szyprowski , Fabio Estevam , Lucas Stach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch adds support for MIPI DPHY found in NXP i.MX8MM. Signed-off-by: Marek Vasut Cc: Abel Vesa Cc: Dong Aisheng Cc: Fabio Estevam Cc: Guido Günther Cc: Jaehoon Chung Cc: Lucas Stach Cc: Marek Szyprowski Cc: NXP Linux Team Cc: Rob Herring Cc: Shawn Guo Cc: linux-samsung-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Acked-by: Marek Szyprowski Acked-by: Rob Herring --- .../devicetree/bindings/phy/samsung-phy.txt | 7 ++++--- drivers/phy/samsung/Kconfig | 6 +++--- drivers/phy/samsung/phy-exynos-mipi-video.c | 21 +++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index 7510830a79bd..7b9dc361ab0c 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt @@ -1,14 +1,15 @@ -Samsung S5P/Exynos SoC series MIPI CSIS/DSIM DPHY -------------------------------------------------- +Samsung S5P/Exynos and NXP i.MX8MM SoC series MIPI CSIS/DSIM DPHY +----------------------------------------------------------------- Required properties: - compatible : should be one of the listed compatibles: - "samsung,s5pv210-mipi-video-phy" - "samsung,exynos5420-mipi-video-phy" - "samsung,exynos5433-mipi-video-phy" + - "fsl,imx8mm-mipi-video-phy" - #phy-cells : from the generic phy bindings, must be 1; -In case of s5pv210 and exynos5420 compatible PHYs: +In case of s5pv210, exynos5420, imx8mm compatible PHYs: - syscon - phandle to the PMU system controller In case of exynos5433 compatible PHY: diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig index e20d2fcc9fe7..342b75f6e4f6 100644 --- a/drivers/phy/samsung/Kconfig +++ b/drivers/phy/samsung/Kconfig @@ -12,14 +12,14 @@ config PHY_EXYNOS_DP_VIDEO Support for Display Port PHY found on Samsung Exynos SoCs. config PHY_EXYNOS_MIPI_VIDEO - tristate "S5P/Exynos SoC series MIPI CSI-2/DSI PHY driver" + tristate "S5P/Exynos/i.MX8MM SoC series MIPI CSI-2/DSI PHY driver" depends on HAS_IOMEM - depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST + depends on ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MXC || COMPILE_TEST select GENERIC_PHY default y if ARCH_S5PV210 || ARCH_EXYNOS help Support for MIPI CSI-2 and MIPI DSI DPHY found on Samsung S5P - and Exynos SoCs. + and Exynos SoCs, and on NXP i.MX8MM SoCs. config PHY_EXYNOS_PCIE bool "Exynos PCIe PHY driver" diff --git a/drivers/phy/samsung/phy-exynos-mipi-video.c b/drivers/phy/samsung/phy-exynos-mipi-video.c index c1df1ef3ee3c..b735b8089cd7 100644 --- a/drivers/phy/samsung/phy-exynos-mipi-video.c +++ b/drivers/phy/samsung/phy-exynos-mipi-video.c @@ -214,6 +214,24 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = { }, }; +static const struct mipi_phy_device_desc imx8mm_mipi_phy = { + .num_regmaps = 1, + .regmap_names = {"syscon"}, + .num_phys = 1, + .phys = { + { + /* EXYNOS_MIPI_PHY_ID_DSIM0 */ + .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE, + .enable_val = BIT(17), + .enable_reg = 8, + .enable_map = EXYNOS_MIPI_REGMAP_PMU, + .resetn_val = BIT(5), + .resetn_reg = 0, + .resetn_map = EXYNOS_MIPI_REGMAP_PMU, + }, + }, +}; + struct exynos_mipi_video_phy { struct regmap *regmaps[EXYNOS_MIPI_REGMAPS_NUM]; int num_phys; @@ -349,6 +367,9 @@ static const struct of_device_id exynos_mipi_video_phy_of_match[] = { }, { .compatible = "samsung,exynos5433-mipi-video-phy", .data = &exynos5433_mipi_phy, + }, { + .compatible = "fsl,imx8mm-mipi-video-phy", + .data = &imx8mm_mipi_phy, }, { /* sentinel */ }, };