From patchwork Sat Apr 2 05:24:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6CE5FC433F5 for ; Sat, 2 Apr 2022 05:23:40 +0000 (UTC) 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=A9zpcS2SZKLL2yXRmY9d8m0YrClB8lFsaE/ILq79z+o=; b=3nJEWKPqT7OfFW km4DVN9pMJZthT4bdBWjuxkr61FuBnsnRrJBlSseZQT0vxLbeJeV035eCcx+yyl2tYMUTHADAtge9 nG6ARiPKG7gqIvyYgkjSY07hhfiobVJKFP00VZIx/t0Jxy6WHjdSWfCQCfOmvRp5oQI9AhKsJKxsl zg2IhP8EPbWG3vpFWWIGO96IbrQjKT0POopzMGonLZv6HYAaMT8nW1jR5g5UVHlxlFsbE4aXYySmn 1+0va8OPv0SPGHrVrmsQHTJnNBMk9+xgJCGBKXIOQowqOF6qrfkLyI1SJuPyy9iywjITpSlZj1MmQ bhiEhctl7U42RMD/Cd9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWEd-00840f-QW; Sat, 02 Apr 2022 05:23:39 +0000 Received: from mail-am6eur05on20630.outbound.protection.outlook.com ([2a01:111:f400:7e1b::630] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWET-0083tE-Jv; Sat, 02 Apr 2022 05:23:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eI0rl9q3EZ1uZkYvXNhqpzE9aAxrkBe34IWRR6iJiGmof6UT3V+yrgKHZfmsUdXN+oN38X4uGjoIVVQCFKuEO+clXorv3+aAZKiUH6ykRkA4zn39hDA5KId21GQq5NNPgXq1eVhL3anuwru4ZaHWSkVr8+eHOmAnws5B7iPdcGpGpsZnDB924lItRd5kYn7XIBG4w78qSIYnpaEaU+f7h4OEaZzLP/2y3/9PJIepEjylvri5+sdZWgNO8IDVBZhphEOqMmjKskD8acw2rTZnVXWQ5FaK+2igVb9wpRMTLYtkgrIjlokpj1IJl/2Bs5NTA/p1aSKbCpRlO8uSAzb1/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OBQV+Ohgw4rC2MFsKm8LEhBcWsWoUQRtJKI3LqPqGIg=; b=SOlgyZG89Q6jJ2uhT8cjkPJeRstpU7BWXxI4dTOtkLlOyqDuxuqTPS/bCcPN9dX3pVnkYRWGxIp+mAmbHzYfnniPDflMjHz+j7/RssyZlqeOZL0bSssefTerBTQJaNguOvRmqhbE8EBIGxbvzJvwYNdKhMhAt3JUthB9G86y9UamT4XLoV6Ee6StvVYffESw4NAwTUVp2xksuhCTvxsdbN5X1fY9TXUu8kvxE2uEnzr8mb39fnMTkXXSI2okZo3779PPiYkcymR3EjIwRXMs9OhjnRmydL6nOUpx/7rrA6UizXXY+TRiXyuJCdGImFdoXUgLULzWPhbP7QLTg0VrLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OBQV+Ohgw4rC2MFsKm8LEhBcWsWoUQRtJKI3LqPqGIg=; b=PLQ4SsJXBYneDqcbydEbFu4+bE9CHv4DLzD1BuS3xuB4wCwQiFr3M3ke5eQPfxzcT0g5kQ7qsx5JxAeMdkN5o3iiKLwQLzXE2qvA6DUvdDtrT/cy6Ljb/XS/X9ZJiejz46lZAzrOs7wLb1OfdwgffmGZoAiWPXpheQrwXCEHoio= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PAXPR04MB8750.eurprd04.prod.outlook.com (2603:10a6:102:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Sat, 2 Apr 2022 05:23:23 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387%9]) with mapi id 15.20.5123.030; Sat, 2 Apr 2022 05:23:23 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org Subject: [PATCH v6 resend 1/5] drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() Date: Sat, 2 Apr 2022 13:24:47 +0800 Message-Id: <20220402052451.2517469-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402052451.2517469-1-victor.liu@nxp.com> References: <20220402052451.2517469-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8e59d9e-c2aa-4a94-cbbe-08da1468e839 X-MS-TrafficTypeDiagnostic: PAXPR04MB8750:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m/fpQx1VkOIGpS0qoxkCM+4jgz2N4GavVVxgCx/T4mKOs0Q4ISIxW+5J8QnrvZjHbt5UaBpAAzawoSHjcQc8+5xUGEiauV0VERmVex816/tJcVfK89aAOkBZ+W8LE1t8tEBVXCJ1+4mehrRo9wp/+3HiIa9emZaxT+Wrk1yXrpujjsGpAjLBRoLWPm4RsnbG1By4Vkk75xXpBrTo6F6dluveP5eC8wZjNx1vu5z4YrE26du1rFF/K/53KfqVEJjgEdile6D9X3IkuOhK1U4wHITa0ea2IOmgzhVrd2+PXv/Q9IoJLNaX4nUS8DoIf6gAd3c7eJjp4TqAa5qZQAoIsnvWjEP/xD1AJZywsCU1UHrbvje77xb78FbAJPXVEkolFKg0Pd0KpXWdQi+KqtrpPl9dpSpcdwlqSHBDg000HJUfZ7DkT0/dpLxNJK8foBFwl2Mkzkn3AOQ2cPOFunX9s0ULaHQwCdUZfOfXEi+W83LMlSwnNeY5A1tNBfqpQFhp7YfB0n/aehZ4zRbKEQQm64fSKbquS//WKg5K2oZaUTZvwHOoepkf4Sfey7zhBym1q31XEbaDe4o1sbsBD4WeQpN+phYRa4mL08f056up/+syLgcBJHZEVP1eWh1OX0l+oe2o9syk/jJyODQUDGWyuX9OzoppgQmxtkNVo1FxnGuZ9swHGkt2j3CTiQMr2ZATW/D/jh147JZfEes8jjP7Sg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(6486002)(83380400001)(316002)(6512007)(52116002)(186003)(26005)(6666004)(6506007)(1076003)(2616005)(508600001)(7416002)(8936002)(86362001)(38100700002)(5660300002)(38350700002)(2906002)(66476007)(66946007)(4326008)(8676002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ePr8euDA+V80NmmDJ9JQO+Q6SED6?= =?utf-8?q?c1ALX/gZ3aINuezn1dK2YwoHvSz1oE9Qdz2I/z4pQQX/eJJVCj2F95GTQ96/tfvZM?= =?utf-8?q?ndbDNuOIvLJTMejzFtXBq50opAUOujfIhJBnWHgr2KntlJkQNTVWbjHmRTlXaGKG5?= =?utf-8?q?MxwiH2Rq1Ah99tU76XlxIrsPYH2kjUUTjCkABBpzXa7mYLS7VVNWhzQXJbZqGfMIX?= =?utf-8?q?jVvd9o2gl6rGhFSZZcYPGWnQcc4JE6lxCjPoStbzBkIJEPbe8mnG8hTRn6c1Enceb?= =?utf-8?q?DucsEwW4gYR8+Wil7Afk5Oxdy2shBCNCnubd6D3cA/Q8S/m4WTgE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?LUOH4TJsVIMq4pk892a8dHLciibfyvcfGpEn5v97irbUBu/MPMdnaKrm6hHO2SX0G?= =?utf-8?q?myB+fQ8mD1vqNOFwe3HXavEYO6YVoM03GQvY5MHw8Y8Xn8B8JA6L2s5KVP+CreYAJ?= =?utf-8?q?HT3+ztBh+6U5WBFxkYNHHtQx36AzTnh/Ue79Yja47ayFSDtA8VfJc/vbyQsWnErFg?= =?utf-8?q?fl6t7iQQ+I4inBLSKuokxIaZ8gZMdfrUSv3SluYOV1zTmDp8E6LLm+jXNeXBdIET5?= =?utf-8?q?f3vZheyBRP6lnoChnFRwKEPUZ6sGfAjdYmAtNXQSLwCauf+Cag/ud/v2XlpiQwGMM?= =?utf-8?q?uti7wYxN5CU8IJmKk0f6IcbdPJF+ioxNMAp8sC58Z7tazp4mzZN+hyLMKe1Z8lN92?= =?utf-8?q?MkI69eHsgcJ0lZdXZPfAyE20YJbQais7YvmdlXtWELIY/aUZVlhW0BTPRXqxrEAay?= =?utf-8?q?gqJ9LCZlbCN8we6LYmd+29IRRGohYlnw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8e59d9e-c2aa-4a94-cbbe-08da1468e839 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:23.4258 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qVdg6uXkeef2iRHM7HVNZiVicbW1A3f3cXzBwQBca2y3nAnb6BLZRe4IOn6RhHSMHfDcUuhoLNzKK2xEhRECMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8750 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_222330_655089_E83E9C0F X-CRM114-Status: GOOD ( 11.48 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The Northwest Logic MIPI DSI host controller embedded in i.MX8qxp works with a Mixel MIPI DPHY + LVDS PHY combo to support either a MIPI DSI display or a LVDS display. So, this patch calls phy_set_mode() from nwl_dsi_mode_set() to set PHY mode to MIPI DPHY explicitly. Cc: Guido Günther Cc: Robert Chiras Cc: Martin Kepplinger Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: NXP Linux Team Signed-off-by: Liu Ying --- v5->v6: * Rebase the series upon v5.17-rc1. * Set PHY mode in ->mode_set() instead of ->pre_enable() in the nwl-dsi bridge driver due to the rebase. * Drop Guido's R-b tag due to the rebase. * Resend with Andrzej's and Jernej's mail addressed updated. v4->v5: * No change. v3->v4: * No change. v2->v3: * No change. v1->v2: * Add Guido's R-b tag. drivers/gpu/drm/bridge/nwl-dsi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index a7389a0facfb..5fbfc68a46a5 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -673,6 +673,12 @@ static int nwl_dsi_mode_set(struct nwl_dsi *dsi) return ret; } + ret = phy_set_mode(dsi->phy, PHY_MODE_MIPI_DPHY); + if (ret < 0) { + DRM_DEV_ERROR(dev, "Failed to set DSI phy mode: %d\n", ret); + goto uninit_phy; + } + ret = phy_configure(dsi->phy, phy_cfg); if (ret < 0) { DRM_DEV_ERROR(dev, "Failed to configure DSI phy: %d\n", ret); From patchwork Sat Apr 2 05:24:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E183DC433EF for ; Sat, 2 Apr 2022 05:23:52 +0000 (UTC) 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=oxh/axy/1rBxgaf7FtLkeqmXz2cRJLkFNcKQ5d4AZo8=; b=2+gLyafugd03w3 TIWJRwdc50OjuaRCUactfuxhdfv2k8VPSKfcWa+aX9jZb5MzfpWseLQ9D+BU2zhWMxk9H1vHIyAhr MGRBUKyXNPx8LJtct3uDnQURvm4SrCrOm0StK60ojvOKpp5NNvrSD2oO7l318Z3XUio3guhtlPJL8 7Vso32sm62Zyx0PZ/5rMZKL09LJDlOfT9qc0sy+n8oQlt5tY0Cbz1Lk3J6/ACtNj4bZ3YNhGafwKK lu26hUf4JAfoDHX6Ajfm0ioFL4vpIZxZE8SMyp1RXrJCW9ICu5gJ0DTme5mTZal/ZjueUgVzOvYQY If57j66C484zThTGHM9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWEq-00847Q-8Z; Sat, 02 Apr 2022 05:23:52 +0000 Received: from mail-am6eur05on20630.outbound.protection.outlook.com ([2a01:111:f400:7e1b::630] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWEX-0083tE-4R; Sat, 02 Apr 2022 05:23:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gKIYkFYmeQrgLGTyMCgUO9llmYIyDtqP2FyYIu6ksqA+AVebptbw+qEptyL4W4hR012dAJnesWrOGkOz2hn3q8RTSx1ImG6tFSwi7Nnf0bMx/JsyalV7Pv3KvM8UARcZrvUIpgqGkOh2EBtlJLhUwb5rCIvuoqhYgzPxah3rzfcvTMrbfZ1wBM6OrAt/ihLtjCVzRoYN45i1PEuYm9Y5uXpPfJGo1QwvhtMw8CzgX+nmhQASfnm2Ya2SG47mNeoE/NnrUK+QYLJmw3bbuajtxnZ5nWSRGD6TrNNIe1bejGuuu9SOYlpCKWF3niAZW2iXTSDhAUucRjzVpa8b7KHvbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tjK68ISxlPtPopikQN4Q5k2cGpA/Ce2C8IvfLTxH7Z8=; b=fL3kTySMHJI1CUr7CdKQIj07qaxpsxrNga9P5SuclkNHqgKpO7eaD2EznpoVeFmfy4NPquYwocgZ8d/bTsTSW+m1sfWG3RHpoOu31wPzaRjE39mdXSUiy4z5ei4jGq2uep/cv65Uc16M3CDBhaOpZqFEhjcdVWXshjh6+V8C0j/eEUyXI8wY/Yfl0OojP3eIIt5G1Gkeq+LT3IfOvsGFnJ0w6Heu+pG4UWQACNTpSemuBSqyg8yJA8dLSviHSu+ZCReko+CfJ41YHoCOS599JyYn27AyTlmEsjimo+KU0Pq0NEPHbcTOz11o5yZkVW/aHtzr0aG+pA/5jq/vQh0lLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tjK68ISxlPtPopikQN4Q5k2cGpA/Ce2C8IvfLTxH7Z8=; b=ee6DTM5IurD6EdCs31UVSFhP0sS7d1jJyUOt2DuN7kCv1kdxWLDm9kd5BjEzR+fEqI+RV9n8GAAVVrxvj1AFOu7eWPIpUdtcFsrG2JECT7Hpaq3mey1D3Q5uchZN0dWeSdVQZe8l+qN/jSenuVxsuDizPdcdeBXc5mg4rtxQLNw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PAXPR04MB8750.eurprd04.prod.outlook.com (2603:10a6:102:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Sat, 2 Apr 2022 05:23:30 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387%9]) with mapi id 15.20.5123.030; Sat, 2 Apr 2022 05:23:30 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org Subject: [PATCH v6 resend 2/5] phy: Add LVDS configuration options Date: Sat, 2 Apr 2022 13:24:48 +0800 Message-Id: <20220402052451.2517469-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402052451.2517469-1-victor.liu@nxp.com> References: <20220402052451.2517469-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb170a2a-e24d-41e4-47ab-08da1468ec2f X-MS-TrafficTypeDiagnostic: PAXPR04MB8750:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4nWe9kKPUW6VPGar3deADfRxUat+z+/PdA43NtF53aHpnSt/0Ag11OmzIG0VdKI3E2DSj0RWbVEe+NOkpocYuyfOnSLE5G3t9xN268FxNiH7VwrWVQAtVCcfheFcIhEF2XBWsGArV5r5vEaU4GG7ssKRsqh/EA4gVMpiOQlk08RI1wuZdCo01WNGc1RvPASpYzrubnQWQ4SBDCpLMz4ZDLI1HjUEttHFizM4V2FOOY+K9TLagl3ywfwa7/wtPLQpNLXPdBx67cKMCOY1s5ctmbgvYpOPen4aIgZ2wyb839TQsIhF2X5of2gvUb3UKD5QM0WEWDPivu+ZifmmgGXQdWyCi9Qb+DrFJqnbO0+hGvpX1HKKkxOCKtcOsUWtPzm5wnHKyFZT+EJ7Zd7UtK5TE3FU/Y+VjbuGu3Nza+Gl3C9ck93Q+Io79FZ2afq2WmpS0pBhij9apoxvWM8sN89WwxpZ74Salu7FqcTmi863xodlXtz1ysXExpelWow+DyXTX1irr5DAFuXAn0GbGkXIO9HhT7R0E5fen14LSVrVJ1CON6leD6Z2alvXKca3kAzjjaHTRTifGAMPS7Xn3dBtQsfpAoSx69+DuqNfExaCRvs/V64vQrYNQkqeccavt5QhqGofiBX8Skj4GF0f7bb+kVp45CkWs/B2jiF0zBsYVJTsngLNSVOLfgXcMaoVV9/PaUnpB61XdcnfhIN/4g1Zwg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(6486002)(83380400001)(316002)(6512007)(52116002)(186003)(26005)(6666004)(6506007)(1076003)(2616005)(508600001)(7416002)(8936002)(86362001)(38100700002)(5660300002)(38350700002)(2906002)(66476007)(66946007)(4326008)(8676002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QjXNZgBNGr0QboPSXbqZNGfqbELKnaAt+DmlYqWPfbGJvEN1enYwIxzFl0uNYHKhhH/VJPd8AzPlX/NTY9ByL/XHcny4QiDQHNzojk7nlc4sYjZCRojp8AREuUscR9JllxKz72SFTuV0s4zq+GMiVcBEMbfogZtG6+NN8qVI2CmBrO5tt7lDn1RIOrq4U6Zn+jrC4vnlmibqBQddbuYsyOBcf3aDeE6sgdFk3EOtA3XYHfS0QLOThZPezGisiNKlE4Xh4X5wQQfgMM60o+eA92LeOfXFjEAaWBH+PZhcHL7xiPV1VUs7gH8y5TyCrZgNf5Nylu/PUcXABwKqtgqxxWgdi15CU/n2SAGNHCNUXFqfz5s13NzlSwy8G+A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Bb48dXT4H9fIey60JVRSSy9Kj+G3QHPwdj9xqY5tg9OnMCBvHq0CID6brDNBA/Swf05zOX5zA+VhEkBLTl9v3ThqkgZUkIX21NrM4xuX8Z0JP2/GquqBAtglvgx5wSfPlCoANT6VzEtMMKUkVUpeVpEQBF0OJeEGIN9PKz2g8PnzmlhjZuQSDcegq5P3fIuiagIOobR1eAmB7qTiC7sf17QxOKeiI2ecaePvA8BEgY0GyQrooTEK4Wd8TwireNhoUXxID9m9GpvNK5ZBLCVwumcF1uDbYa3Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb170a2a-e24d-41e4-47ab-08da1468ec2f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:30.1147 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o+FwNGim5uGBc6cZIv98Y2XxKrB3D2yGWx1F8VzE9J+ZIDym0iLraktk3TPSXTviSJ6B5dQ62c0mMoVJ8Fz7eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8750 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_222333_208527_8CA03800 X-CRM114-Status: GOOD ( 17.08 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This patch allows LVDS PHYs to be configured through the generic functions and through a custom structure added to the generic union. The parameters added here are based on common LVDS PHY implementation practices. The set of parameters should cover all potential users. Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: NXP Linux Team Signed-off-by: Liu Ying --- v5->v6: * Rebase upon v5.17-rc1. v4->v5: * Align kernel-doc style to include/linux/phy/phy.h. (Vinod) * Trivial tweaks. * Drop Robert's R-b tag. v3->v4: * Add Robert's R-b tag. v2->v3: * No change. v1->v2: * No change. include/linux/phy/phy-lvds.h | 32 ++++++++++++++++++++++++++++++++ include/linux/phy/phy.h | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 include/linux/phy/phy-lvds.h diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h new file mode 100644 index 000000000000..7a2f4747f624 --- /dev/null +++ b/include/linux/phy/phy-lvds.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2020 NXP + */ + +#ifndef __PHY_LVDS_H_ +#define __PHY_LVDS_H_ + +/** + * struct phy_configure_opts_lvds - LVDS configuration set + * @bits_per_lane_and_dclk_cycle: Number of bits per data lane and + * differential clock cycle. + * @differential_clk_rate: Clock rate, in Hertz, of the LVDS + * differential clock. + * @lanes: Number of active, consecutive, + * data lanes, starting from lane 0, + * used for the transmissions. + * @is_slave: Boolean, true if the phy is a slave + * which works together with a master + * phy to support dual link transmission, + * otherwise a regular phy or a master phy. + * + * This structure is used to represent the configuration state of a LVDS phy. + */ +struct phy_configure_opts_lvds { + unsigned int bits_per_lane_and_dclk_cycle; + unsigned long differential_clk_rate; + unsigned int lanes; + bool is_slave; +}; + +#endif /* __PHY_LVDS_H_ */ diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index f3286f4cd306..b1413757fcc3 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -17,6 +17,7 @@ #include #include +#include #include struct phy; @@ -57,10 +58,13 @@ enum phy_media { * the MIPI_DPHY phy mode. * @dp: Configuration set applicable for phys supporting * the DisplayPort protocol. + * @lvds: Configuration set applicable for phys supporting + * the LVDS phy mode. */ union phy_configure_opts { struct phy_configure_opts_mipi_dphy mipi_dphy; struct phy_configure_opts_dp dp; + struct phy_configure_opts_lvds lvds; }; /** From patchwork Sat Apr 2 05:24:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2390CC433F5 for ; Sat, 2 Apr 2022 05:24:07 +0000 (UTC) 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=PQqjLgJt/vmMALtgoEbfWzJLHeKYsbrHCZs6P8NdPSY=; b=or6P6AeEaKVfF/ +6udTK0b0u0VLrLsZSHrRhcR6wPsF/hXP45K6s7qRuQJ4C2IrQRp6lKj/F2nT9ek7PSz4S8BnS0j5 7tHxAF8dEr/Y9RCQ3mFkj29nrKNalwF4L1PoSt9uAOvcWZSW7KoqWDrrrZSPl8os1mU2euF4dgBb6 3wCWCHrS/8frzovQW4ZFV2pGPBrjUYgbS+i/OR/Kyw8WMy+a3PHcsG0mnmfNmjPzAmuelaWV0oprX SW/rLZ2P7cWZICO3uxoFnfvqhzHivrps77Pjc01U9++NFlM4mcuNPCqzVPVZwDWHrQKshxxXN9df7 eeqp9BCrogdvshDozDQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWF4-0084D4-FV; Sat, 02 Apr 2022 05:24:06 +0000 Received: from mail-vi1eur05on20611.outbound.protection.outlook.com ([2a01:111:f400:7d00::611] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWEe-00840T-Lt; Sat, 02 Apr 2022 05:23:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=acDtFvfTJEisL2Dhx7JarTttw1v7RLPKjr/iema8VW6AOrMIiGGfTQqq6+zv+BU1eUdUk3BdBctYEkYfp4gDSGFzo2RKBiZtvbMIsm+kKe41ysq2kDiupwzDWJnSSBA3Gy2fA8Y4zGvfZkTE+hrYRjbvLyM8ZiZxHtQwlbMwidh5zK3UcAy6rhE83hKL0exKesCQeC5k/fbBsef1Ws8IA/hTTcIlPwKKqmz5S41BrppjWd7+Dk17LeOgV1UyRTqsglRpoFje5w90ZTpNoqEGiERqL722VCW148yndtx8XTiBimCP5/DpIMH34ZZ01QtI8pDy7YqEU/zOPKi4jBEBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4QMNrjHkSzPkfgPuClD3OGPsGuNeGuSlP1cKorrZli8=; b=N4euGZm7yf0USDRpM90POuLyhowuD/hPRtOmPum1kiOSeLoEKfMHZNQf2le1A0t3gwyIf4VEXJMxvvcGfez8hkHx13Jsm0rDdqdeTaZFktui8ubsXTG0wMSIXj3vS/N+p0S58LisN+5ZY4c49hmtCTdYtMGJ9ev6mbc/CrH+Q9mRjfqFwVbomUhKJmNXoOwPDSM3IZvKEel0bGkBk/WNF3WW8LFow/0oNcGrj6vCwo4YDh2tmY60OHU1f+VsrZADN+zuCoS8EABYVAdTtOs7VlwmttEbQmgaU8xayj1p7IeRgzvkRsZdUYtRA5batprLWc+75zFXfLGx0370FvrwrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4QMNrjHkSzPkfgPuClD3OGPsGuNeGuSlP1cKorrZli8=; b=Mo/faPxyHhYDtgG+0O7mPJ6lo/rFv+QX5Ir8SOTEMrZfhhGJ2nGFKH5+Esj1rEQET53+T9KBGqRVQNphGouSgsMqL5SyKzMlDcxMwBxGIXPlS5z6RMMQL0BfkLN78T8Il0Z3OjIJM+TdkNLoLobmv1SIm/lcbxYi62h318Sk8VM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PAXPR04MB8750.eurprd04.prod.outlook.com (2603:10a6:102:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Sat, 2 Apr 2022 05:23:37 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387%9]) with mapi id 15.20.5123.030; Sat, 2 Apr 2022 05:23:37 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org, Rob Herring Subject: [PATCH v6 resend 3/5] dt-bindings: phy: Convert mixel, mipi-dsi-phy to json-schema Date: Sat, 2 Apr 2022 13:24:49 +0800 Message-Id: <20220402052451.2517469-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402052451.2517469-1-victor.liu@nxp.com> References: <20220402052451.2517469-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29da1dc8-4580-4e84-1640-08da1468f048 X-MS-TrafficTypeDiagnostic: PAXPR04MB8750:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3j87+0+hCjeDDnjcn2T+8KxOaXQ/DdMF9sS39TKv7T5Tjg/Q6U/r1eTB5ITWORyUbG8D1fim+W625scfcGazyzRC3ABbLDy2FqTEX3hT0hjTB4z9RcqGFdElRf/Vma1HdeMrRFimzV2UQEuR+4wxwBLjq0CTqWDFHv8j9AbnHtiADPsBYv9/bF7GDmqyreHIVgHJv0uvF2Gt+bZ3WsES1XFQl6UcRxasib8CeBbqn/RtKu0kSVHH03Do0q1Zu9oJo1lo3vq6I0DLGW0nnzc4z0ijgukPQQ7yu9BBEy1HQXWfNZpBS6lkb7btSGhNXiFRbvjdnD2M87MF9+K/XoFaopQOkHBAkEwd1JbvVnI82NXYp8KwxvLDW0+TOTGIpfOukJQVbA5ZQYR5IOBo/ZoHpzEbMQTmLGDRjmDpi5NytYaRGJ4Y9y3Ws5CJU3AH4jVsaLCbabpLk5sujMJGg13iHvllH+43SRXi33pgqqugyAB9dJEHJw+zeY86BtGwQRoLHJFUVjJxmuKhPyxWQDvCtb+EwXDVeUC9r7pY1nhL41Zx3zFSIZMEECcse7pJxtyl2pCF+qwGlK58F8KNGVT6H+jG0/YPBZpzSd2M17YmuGVNgKGNDOEVmPlCFBQ3XAEbJ6fs08bifG9kydCl0kjYWvWCEmxkOA/Nf3YTVjMhNjvnxYPMHX2EtlbEglT0FTgNoEK1TpcxzIkC2H+iu6wsU1Aeu8Oq3GEsuUZ/WlBKNLBv0FFpmfMKOGjG+LZDQVDa7R1QQdi38MemQYcuY8e78VGWCvD2YlIl4j/eGif0BRUdgZYGsuuXo9iAWgdSRFM1WxWicdHhSSL5J0VgHkQYCQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(966005)(6486002)(83380400001)(316002)(6512007)(52116002)(186003)(26005)(6666004)(6506007)(66574015)(1076003)(2616005)(508600001)(7416002)(8936002)(86362001)(38100700002)(5660300002)(38350700002)(2906002)(66476007)(66946007)(4326008)(8676002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?13AC9dCo9Fh/7AzuAA2nSEObormR?= =?utf-8?q?OqfuF4VXnKLJNtp+w68D+cZw6LwMkKyOW8G4OQNstiGQuT49cZJx4DQBL2lLiJFup?= =?utf-8?q?szhjUlyrOUkjyRsjEavrnWGbcOvOK9fJz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Mfu309F3tEHA8MJpdc?= =?utf-8?q?l8D7WyHN4TztztgMXl7jxiF2LW1RRikGvR690knED2838FQtwcbTvGG7Idqxr2Jix?= =?utf-8?q?VWiWz+o/lzN+E64UpSxQn5E6UQHHRaeuabY6/vCxtYeEns8o+U7sgn670sFc02QBF?= =?utf-8?q?2Tq59qIy+YOvUM4k0M1L98C2WkIzCIEHHhGWgRbQWGpp7Wf/4vYgQwkl3mvqyCHq9?= =?utf-8?q?Lc9eQIfjUyWV1esUzfADT2pbYKuEKqj0dbBWTXlBhzNwNJeoF/DnjDcWx+0LeTVDp?= =?utf-8?q?4N4V//6I/PnYNT1fRPFvpwgRRcHS0wJNlXbsFywkRqv+y+OsOOvLgLRpjhjQVeARY?= =?utf-8?q?lWNaIqmNSRXeFpQi0Bs0dJC++bmUl6pnCZE6xKf6+hlu7MEhpKKSDxsKItbSwfsNm?= =?utf-8?q?k9oGbXTzV9NlE8NldIpUKYCZuUHfa/KzSanhx2ANz/l4UAuUS89gRN6DnmRq3EWoU?= =?utf-8?q?f7rt0gsz8zNBfchNA0c6pCuiQPP0wYSgpxQn+xmsQRbsC8hd/6/mQWDWf0jzBODV4?= =?utf-8?q?fyeiOxusIC0FMERl3dLyHbYp5EL7g8Brot5rY1sou9Fb7gsfCuFtp0yVCsJpy9q/O?= =?utf-8?q?7oL959PB12b0lvP/IOJCuXZOQNAtjpYp0QwSmA/nskRC4TEBzB9Hbqf+yZG4vP12f?= =?utf-8?q?9iZqnCrKfaLyM6ZjHAQ3+enja1YC7nDA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29da1dc8-4580-4e84-1640-08da1468f048 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:36.9957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UO7g9EGPaD1FJHRvJC6qhJU8EzQotgyoBJFIR/pCD8FB+A3zDwH0Vuy48xR92eBIdAobkECP6RkvlxTLbBkpgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8750 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_222340_774776_FE72DCDC X-CRM114-Status: GOOD ( 16.78 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This patch converts the mixel,mipi-dsi-phy binding to DT schema format using json-schema. Comparing to the plain text version, the new binding adds the 'assigned-clocks', 'assigned-clock-parents' and 'assigned-clock-rates' properites, otherwise 'make dtbs_check' would complain that there are mis-matches. Also, the new binding requires the 'power-domains' property since all potential SoCs that embed this PHY would provide a power domain for it. The example of the new binding takes reference to the latest dphy node in imx8mq.dtsi. Cc: Guido Günther Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Rob Herring Cc: NXP Linux Team Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Rob's and Guido's R-b tags. v2->v3: * Improve the 'clock-names' property by dropping 'items:'. v1->v2: * Newly introduced in v2. (Guido) .../bindings/phy/mixel,mipi-dsi-phy.txt | 29 -------- .../bindings/phy/mixel,mipi-dsi-phy.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt deleted file mode 100644 index 9b23407233c0..000000000000 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt +++ /dev/null @@ -1,29 +0,0 @@ -Mixel DSI PHY for i.MX8 - -The Mixel MIPI-DSI PHY IP block is e.g. found on i.MX8 platforms (along the -MIPI-DSI IP from Northwest Logic). It represents the physical layer for the -electrical signals for DSI. - -Required properties: -- compatible: Must be: - - "fsl,imx8mq-mipi-dphy" -- clocks: Must contain an entry for each entry in clock-names. -- clock-names: Must contain the following entries: - - "phy_ref": phandle and specifier referring to the DPHY ref clock -- reg: the register range of the PHY controller -- #phy-cells: number of cells in PHY, as defined in - Documentation/devicetree/bindings/phy/phy-bindings.txt - this must be <0> - -Optional properties: -- power-domains: phandle to power domain - -Example: - dphy: dphy@30a0030 { - compatible = "fsl,imx8mq-mipi-dphy"; - clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; - clock-names = "phy_ref"; - reg = <0x30a00300 0x100>; - power-domains = <&pd_mipi0>; - #phy-cells = <0>; - }; diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml new file mode 100644 index 000000000000..c34f2e6d6bd5 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/mixel,mipi-dsi-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mixel DSI PHY for i.MX8 + +maintainers: + - Guido Günther + +description: | + The Mixel MIPI-DSI PHY IP block is e.g. found on i.MX8 platforms (along the + MIPI-DSI IP from Northwest Logic). It represents the physical layer for the + electrical signals for DSI. + +properties: + compatible: + enum: + - fsl,imx8mq-mipi-dphy + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: phy_ref + + assigned-clocks: + maxItems: 1 + + assigned-clock-parents: + maxItems: 1 + + assigned-clock-rates: + maxItems: 1 + + "#phy-cells": + const: 0 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - assigned-clocks + - assigned-clock-parents + - assigned-clock-rates + - "#phy-cells" + - power-domains + +additionalProperties: false + +examples: + - | + #include + dphy: dphy@30a0030 { + compatible = "fsl,imx8mq-mipi-dphy"; + reg = <0x30a00300 0x100>; + clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; + assigned-clock-parents = <&clk IMX8MQ_VIDEO_PLL1_OUT>; + assigned-clock-rates = <24000000>; + #phy-cells = <0>; + power-domains = <&pgc_mipi>; + }; From patchwork Sat Apr 2 05:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798977 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6216BC433EF for ; Sat, 2 Apr 2022 05:24:36 +0000 (UTC) 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=83iLNUbPm4s3a2EaZcwYkXiq6ew9NI9kGiHqLx7+6Nk=; b=lexMlvlMOFb2w4 5Xl8Jc6Q9En6gVqmhOnmOBGqGr9JfGFXl5zU8fF6zDHm95ynjQs5QKPTxhgBjaTro6c5oE+HqJOm1 fkIByii9Lch7PYLXG+BWqGSMre163pvy8KR827KzFiCMiQtMIg4FzKy7arYJhiLI8B7TCfRuHz9Zf FXCTagAYy5D9QWsOBIwle3I4bumz5BHvc5itKB3Vs6bQBmmmirvA1q94/GCxvmg3b/jMWr6MfA08R PxOoJuSNzM0l2/7mdikGP7P6VnUQA+KtPlZEyAop0730eV8/hEDTvW3Gm670CgcPjpd246oSJbi0t w8Hfkk3EV7yEE+ypt20w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWFX-0084Pp-O8; Sat, 02 Apr 2022 05:24:35 +0000 Received: from mail-am6eur05on2060f.outbound.protection.outlook.com ([2a01:111:f400:7e1b::60f] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWEk-008432-OB; Sat, 02 Apr 2022 05:23:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mLR7hqpxBR/fvin7OZsIYvsyhDRXG3Bh5SOoinUYyfarpl01lQHfht1jFeHUfJvNeDlB3QnfGOtJkBEWuR+FAXN7MAR3glgJxniDs5GSMk4SwVMzczaGi8GasvdSXYDZl6aMLp6+8F8poQK9WI6byo/7kaW9Ruf6qXZPV8b5yW4jok1yJxF1kficMXOtC5s7Qh+1cKttSN6yFD/cIkfz7jcNzg/ZInmOKYNHub3CZfEvQqfm9gHyZl6j2pGx6bmkDRqa/24dGwMCGc81NdrCsuZ11ciui0/TjlKjkzBglvo7bomS0zkUPVw2miN8y4/HZFWeHAxR57hhA1LFY6zUjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oGFfS88Z0L9svuW6iyHKRmljyrsYlgWUs4+4IejC1IY=; b=kifb6KAOzDsZBjeXAYr5ro4NfiuYCcxcQCQFpdPTQezvAezQxNgpv+iA18/xCKID4KGf/km08m2JpCIaUq6xh2l0Ze1hbs6rN9oOjeVNgmUuoc37Cy2ef8Ni48RYuPgorcMYyNEJLI1vnnjMPeVt+uCNWPvgrcONoRPpY1fPwfjWj2Xa3gHRo27nEsDbqYEKRfxk/cwSvMO/QltumB7R+14912fjZZ10i7iXwnqYUQJtTX8IFnvH9B7y6USZoisp/c8HxPHyLnWgeridoQ5cKohlFKt6uIIztVVl2qgE9DdDKhOskTkbzPUV1EpkNERowC03oRFWAn5Xii3f3fekHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oGFfS88Z0L9svuW6iyHKRmljyrsYlgWUs4+4IejC1IY=; b=dxJpuPew0VRKcwF6SGsqQSLwjKZ9nYlXQGtCazPTf+65hs26pSLfJNni3Ytos5BY0nMJ2rjlBPdOMSPKmSpsGRbLJzr1G+6b+Xo4MJkR8DOKz9G3ykYhq4Gr4T3Te9ilpul+kX+xttzm2Zu+G84ynVlkpNDWS9/K9/mA6srOli4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PAXPR04MB8750.eurprd04.prod.outlook.com (2603:10a6:102:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Sat, 2 Apr 2022 05:23:44 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387%9]) with mapi id 15.20.5123.030; Sat, 2 Apr 2022 05:23:43 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org, Rob Herring Subject: [PATCH v6 resend 4/5] dt-bindings: phy: mixel: mipi-dsi-phy: Add Mixel combo PHY support for i.MX8qxp Date: Sat, 2 Apr 2022 13:24:50 +0800 Message-Id: <20220402052451.2517469-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402052451.2517469-1-victor.liu@nxp.com> References: <20220402052451.2517469-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac110f71-a519-4e4b-4e0d-08da1468f466 X-MS-TrafficTypeDiagnostic: PAXPR04MB8750:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v8aQYz7VRjX28JWtFD9C+5C63G9/zHYLoRv6VCrm3yDJ559u39qu1CFMxH0kt6ePr24siLj/7LT/YHFpWkfs8Rf4UFqQZ64CUmuSWJ71RWsmwRFJsjAsB9YcsvDp9d5Kda4fuQxS+L4lwIKfqQAItzZfuLiywpcBIuYWAXJOjVA5RSVJHpRYi/IoidXLHQ1XHCAIsr3q/9hrymT2xzmibrDjmsUCh5J/E6Ds0As9mW/gUPPEYFTy9bNv+ih3Snlk5zj/4tqUcBgHK9dsKLzACasymI19TRIBxUtYmioJaWi9BCCHmVFdupkUkEA8ewYmY4K0V28ES3Aa53zxPlwblQRaBTIZ4iQfOVQShBwE6Pl8iFaefWEwftHwG2GbNfFS0XmJvHno/uT2cCmx+Ik8xilfHSDlPNjayEr//J6IQLHFV4CVmNX77AIZ3hhuQmsmcYBX/FeyXHB/PidzgZVNK3vqBBwJc5k7ysWnE2dPKWbdztksVc11GkHHucK8klmPCAJrVnMQeUlp1OGDlZ8R9Efp5LMkLahbllJtNmee6bQNsLS9IHO+V8oa1FM5HmMeVHFpIW5f443UOeggrERNbF3KoC8aXIjOv1eRJo2fQ1jFSIchpfpBZFdsiJYlPYJELtL5HmjAiI7WmBcU2KWhO8wLDD+7QmcLNIAj8c11Iz/l/XDi6lFDUkQ7jf7QQr5X/4tx8XcCb5JakGt5oOqkGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(36756003)(6486002)(83380400001)(316002)(6512007)(52116002)(186003)(26005)(6666004)(6506007)(1076003)(2616005)(508600001)(7416002)(8936002)(86362001)(38100700002)(5660300002)(38350700002)(2906002)(66476007)(66946007)(4326008)(8676002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?B2YuE/6pQO4xVAFP9qQx33481KRj?= =?utf-8?q?JcVdDKYrdPnG5FLUODcphcjGKJ3lnHSIrifOL+5i0s1vnuZR3DGd1B/zlTql0DIxC?= =?utf-8?q?3c9j4KZr7GhwI+CATgORc6qIJVWsfszfgFFVwTlAlx6BaptwO+XAYT2qd5LIknkxb?= =?utf-8?q?bXtLddZ5zRenGJU/AF2q6jlSJWw8cAcQkmUEYMZXDdJqhHQqNuzRBjOcMHBSwQazW?= =?utf-8?q?aFiFyKBD5wEA1/I98K67LJitgL9KTieroqiqeiE41/zERu1iWrlPZ0g80spxYSYLV?= =?utf-8?q?JJ23HubqIqJMPT/Fu7bQgq70/43mh9y93soAzhVju6u+hlfGEGgXkSbV9TEisUGzM?= =?utf-8?q?g7hMsdvYE4S52G4AyfO9wKlsP8/eXLaiEi1AQdP7RC1KW1AWQfiUY/KElzbAw76iK?= =?utf-8?q?DBu9vYiliuLR7UEWcHhSaZkv5AW0klJF8K00kzE3SHJRzh7U7ry8ow1oFY7wX6cK2?= =?utf-8?q?UhDYXrsFKv6YfxQrsAPA4tIUssio/DNyk67LdkAgXrRryKt+Mqn3fC2M53lP0FKQJ?= =?utf-8?q?sFUSYt3UZwfwY5osmO46wyM8G59+FN+JcCzsdBUPrGeqBqsnOaQNqA8YkLTyQD5Zg?= =?utf-8?q?SiBAQ1j4IcCSfnMH8GgNX2t8pwDSKf867BP4vSbJGqdyEWu3d/rHIaRUggdHpKKfb?= =?utf-8?q?QN74Cdb8q9SPd68r181NQt7DEugxCubXLtLIHi34rAwCh+JWRFqm0eXKSyRprNJgP?= =?utf-8?q?2bSr7T6bZKMvtGcX8XjpG+DB0ssFmNNqqESX39W4Xx6GXq1j5oJtXGn5t3e9gpcxw?= =?utf-8?q?i2y6F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bCn8f1M+7fX71a1RVYqGZg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac110f71-a519-4e4b-4e0d-08da1468f466 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:43.8814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OtLo7ln5a8fFDKzM9iRDS4XB6I/Qe2KZhLkdo0JHiUHCsqO4UxU4+rdeuoT4YtpJHpX63CKiGn/55mMCjrPp7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8750 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_222346_820941_76EEDAA5 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add support for Mixel MIPI DPHY + LVDS PHY combo IP as found on Freescale i.MX8qxp SoC. Cc: Guido Günther Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Rob Herring Cc: NXP Linux Team Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Rob's and Guido's R-b tags. v2->v3: * No change. v1->v2: * Add the binding for i.MX8qxp Mixel combo PHY based on the converted binding. (Guido) .../bindings/phy/mixel,mipi-dsi-phy.yaml | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml index c34f2e6d6bd5..786cfd71cb7e 100644 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -14,10 +14,14 @@ description: | MIPI-DSI IP from Northwest Logic). It represents the physical layer for the electrical signals for DSI. + The Mixel PHY IP block found on i.MX8qxp is a combo PHY that can work + in either MIPI-DSI PHY mode or LVDS PHY mode. + properties: compatible: enum: - fsl,imx8mq-mipi-dphy + - fsl,imx8qxp-mipi-dphy reg: maxItems: 1 @@ -40,6 +44,11 @@ properties: "#phy-cells": const: 0 + fsl,syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + A phandle which points to Control and Status Registers(CSR) module. + power-domains: maxItems: 1 @@ -48,12 +57,38 @@ required: - reg - clocks - clock-names - - assigned-clocks - - assigned-clock-parents - - assigned-clock-rates - "#phy-cells" - power-domains +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8mq-mipi-dphy + then: + properties: + fsl,syscon: false + + required: + - assigned-clocks + - assigned-clock-parents + - assigned-clock-rates + + - if: + properties: + compatible: + contains: + const: fsl,imx8qxp-mipi-dphy + then: + properties: + assigned-clocks: false + assigned-clock-parents: false + assigned-clock-rates: false + + required: + - fsl,syscon + additionalProperties: false examples: From patchwork Sat Apr 2 05:24:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B89B1C433F5 for ; Sat, 2 Apr 2022 05:38:56 +0000 (UTC) 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=cgZm9NFlXy/fnG1BTXkevVWNXO4XrXy8aWS53QfrzS4=; b=PZMavbI7BSh0H5 Kj4B1TJWScRx/6+8GaKX9UAkAaJIlOqd0z1O8Al5Ra/fMsmg5TKhj/G5SsvnPimRlStErCkeano4w H6hbeXkoHXhkSSfRBB9ShEEWA2ocCNexYSA9qzqJaGg8vRcNa1VAsNOHFkOwMtIIaqEtiJeu1fOX7 tYCihRlF/3r9ZaX2yHlUo/GLW8SE0IMzSFf9lfBgW2uQHXRwd4lc/z2JwndFrc7/7pzDwrO5cDZdU vm/v3k+x6b3kuOQUi+5HuFQlWQO991Z1JHJ7UHvDGF+WSDDLh9oiE60HBFOG4buJV1S4Kx878Knoz E4focJhAKL9uhQa/Lk/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWTQ-0087IA-4Y; Sat, 02 Apr 2022 05:38:56 +0000 Received: from mail-he1eur01on062b.outbound.protection.outlook.com ([2a01:111:f400:fe1e::62b] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naWTM-0087HY-He; Sat, 02 Apr 2022 05:38:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bI1v0qaM3KhgOKCX28Psb5jHBtW+EdJzfAuUyVCXz+TyXJwadZVOLpXOH0j817fnuGEqeoE3/zgRhn1DPIAFku9MxOp+fdu5PsDniz0oC6ECZvhQjjo71omYQnN5j+eesP27omhKNaTzkPBzG+puajaUoUAG6tRqfJ4h59g9OSZuvBYWEfjmVYs5lrJGDnwjdg5SDcMRyAEWCug1H2PZpJ6B4EPcE/LJfBzYf4Ou1frkZE6fH35sBkW71Z8GikupJ7yyTMphkt8RO3jNoGQ0WSfiQi1BTSBRHq6gvGwPGVrEDEm5PVr5lHaSBk7iKEIUOt4czCxTjkZh1Ko9KdwewQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z23oGthQQVatgNiHhq/oRsg65W52HNMSx8ap0xPZR4U=; b=S+Ea326d8hh3h8ZVewqHqb41v7kZX/rv5VkeldgeVPJd8WVvNeBW+BYc0Y6fPggLgFzYjg3zBBBac/zI7LmbB4g5+hVnesF9tq45FpNKZHa0h5tcjQYXGe4Y7aTVmLriCaOEecck3iDf1m/GFPLFH6GnvmQCJjX4Twqg9qEUsFqBfJERWgCLpeXfaeYVt/ZReZoFcxtHKaJeh6cr1CayP7LoJdu2ZD7lBOrlYGy8ldZgvBFaXlxvmSvcd/1Me2ilYv4cuOTDy5xUFI9IbofpjHj0i5iBC++1S8FtqEKA9su0w8d4My9rExh6qx+OeUOpuHbmo932NSPs/NBhDU+Z3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z23oGthQQVatgNiHhq/oRsg65W52HNMSx8ap0xPZR4U=; b=lzgjOlFackcCQE1NQ+ktGzjsEFA77B/55cIqZVL1PWO93dK5ri3PTJeeGNdTqhaulG/UdMwVMVS76ICQnt3GcwB1X340afbWSTdpgTPwT6lTcOOGfyzsfUR9AWpDtm5XuCYUvGgZVKEwPwhPOhYZBy0+9Rdw/FZKHGTGWy5f3WQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AM7PR04MB6776.eurprd04.prod.outlook.com (2603:10a6:20b:103::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.25; Sat, 2 Apr 2022 05:23:50 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::b09c:8ffe:8e02:7387%9]) with mapi id 15.20.5123.030; Sat, 2 Apr 2022 05:23:50 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm, robert.foss@linaro.org Subject: [PATCH v6 resend 5/5] phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Sat, 2 Apr 2022 13:24:51 +0800 Message-Id: <20220402052451.2517469-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402052451.2517469-1-victor.liu@nxp.com> References: <20220402052451.2517469-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f17bc912-c9ad-4142-b3b3-08da1468f86c X-MS-TrafficTypeDiagnostic: AM7PR04MB6776:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A/KZ0eYp2tS5elt5hPBQC6Tdhfx+a0NbRx1K1oNfeC+EyafljFkpfxRbWuhIozO2OOoppgR3A5moYC12Ce5whUhk5J+h90aWVQNKih//eQUbdyCdbWkBbRH4rJHLShh8CfITEbWerrG581JY6nreZxA8JEU77aY3UkqAK2aS/yqTq8qrOt1pccUJO451vAI3L7sz7srlitsptwTzsRfS97nGkIc3uetyaKRdj98xs0Gyy/KGYch27pT0LjLe9bDKOkcYcU6XKU9H/pg5Z1dy6SjV0upDarKRO+ysEFHj0meIxyUff5EBLGIQjAS9yDZSiOZKCxPuPcOeRpixldwouOan+MNMeZ5585v3n5s+xtiZCmSLORwOoFzCoWUAyyqt1Z37gwMZQN2f1FDu+EaLJDg+/Zp0aBv7YMYZ8tJt56NjB2fhLwCoqBAlrvRXVgEXJIUadXogFcoaiXgGhSOupbuS6LH7BMDfXjmccPT0+cM2Qvocp7WuRC/9bWuVejksZkK8M8I8g0plp7BgQpKREKx3EJxOSD700u3V75KWtbIVDc8oLKRANMIQbPhHRh5bzd8FcRmZJRJYcAbIQQJbBa3DLHgTwD41n/9cQgBpaQ4+eAK3ksZrTJVKvMSFnR85j+gegk5lGBgDuTRwiPGVJ/9NCbUnhLUCKXGaH1x0qGir/BsQDKpOZQrS41agaEKZwi3W40b8+xddRmDmM1OrkA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(1076003)(30864003)(8936002)(7416002)(186003)(66556008)(26005)(2616005)(316002)(66946007)(8676002)(66476007)(5660300002)(4326008)(86362001)(66574015)(83380400001)(36756003)(2906002)(52116002)(6486002)(508600001)(38350700002)(6512007)(38100700002)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4vu8dIN5iKM9XD1bPHWWdukU1RIV?= =?utf-8?q?UkPSuCVzFFm1bwjfrwvvLLP68Nwgund1Vr+Fu46QO1kb78/ELwPgzgVTwOBN5HLee?= =?utf-8?q?DkoJopy4XgLaNCv78C+YoNqwEzz63Pj0ejJOMLzYbijEiyy89TfQ3iq/OXEan0Aua?= =?utf-8?q?YKKmWEbyfKveCP/h2NHP64bFyxwzGi2h77JWh76qo9cKGkc+USN6STB1wVqWQPg+8?= =?utf-8?q?R99EFX1nQUS+IbJAP1yGgarf1jbPL+WVhc7jGknnjIB+oq+5k2V0m3H9fex+BTRRz?= =?utf-8?q?ILkXHHOEHABFHG8BqPuabmpPD1fAc8W6KG+eTQRYrV8mkinFo7WKFHhq1GHF4MGuH?= =?utf-8?q?r0h+PJM8KInwbksouThTkybtWGwsvBEUULnrRUH5lbo39CNwU1vwGyFXnBfK55zmT?= =?utf-8?q?MyyrxP2oy38zuzwv9EEsieXYJ3zJn3Qxrry32rXVDKeAwGAnRceRg5EPFHDQjasSU?= =?utf-8?q?796IOUCqv6ik2JQlzmFuqtAWlEksrr2bH59DLedX4XpPEakZOTy/5vniD7HmRyZsO?= =?utf-8?q?zz1L4ri7qNf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j7iDBylD75dQxmmtK53TxP7PKpp1BVjD15r5lnCNJyR?= =?utf-8?q?lHGJnmFkZ70FnTno1/2PcWXQfPzytVhM8LgBQh+Vb4gnEEBixW58WDbhHMiGf/peu?= =?utf-8?q?Cn19PyJsqmxo4F3V4e8EUUNybexhpAizsC0y51V80+E+b9AkYyWGeshgZmSYtwVb3?= =?utf-8?q?p4acpWnx0oeF3hoWzfMHiBheUIgruc+ipSBcN1rXheOM9VYDlYtUXr3cPZ1KDb0dg?= =?utf-8?q?NNJwUtPUgGL3+dz0fKWZYwMOdnoiI8+A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f17bc912-c9ad-4142-b3b3-08da1468f86c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:50.6186 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zO3k9VOd1Qc+5c7RLDars4IDWhJ7gVJSTdcZMNz2lmZ6SBmGotfyb19GgifEsDCzDHrj4aN5A0wyPU59CDvQKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6776 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_223852_790916_62DD9370 X-CRM114-Status: GOOD ( 21.90 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org i.MX8qxp SoC embeds a Mixel MIPI DPHY + LVDS PHY combo which supports either a MIPI DSI display or a LVDS display. The PHY mode is controlled by SCU firmware and the driver would call a SCU firmware function to configure the PHY mode. The single LVDS PHY has 4 data lanes to support a LVDS display. Also, with a master LVDS PHY and a slave LVDS PHY, they may work together to support a LVDS display with 8 data lanes(usually, dual LVDS link display). Note that this patch supports the LVDS PHY mode only for the i.MX8qxp Mixel combo PHY, i.e., the MIPI DPHY mode is yet to be supported, so for now error would be returned from ->set_mode() if MIPI DPHY mode is passed over to it for the combo PHY. Cc: Guido Günther Cc: Robert Chiras Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Guido's R-b tag. v2->v3: * Improve readability of mixel_dphy_set_mode(). (Guido) v1->v2: * Print invalid PHY mode in dmesg. (Guido) .../phy/freescale/phy-fsl-imx8-mipi-dphy.c | 269 +++++++++++++++++- 1 file changed, 258 insertions(+), 11 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c index a95572b397ca..af1ecda091c7 100644 --- a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c +++ b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c @@ -4,17 +4,31 @@ * Copyright 2019 Purism SPC */ +#include #include #include #include +#include +#include #include #include +#include #include #include #include #include #include #include +#include + +/* Control and Status Registers(CSR) */ +#define PHY_CTRL 0x00 +#define CCM_MASK GENMASK(7, 5) +#define CCM(n) FIELD_PREP(CCM_MASK, (n)) +#define CA_MASK GENMASK(4, 2) +#define CA(n) FIELD_PREP(CA_MASK, (n)) +#define RFB BIT(1) +#define LVDS_EN BIT(0) /* DPHY registers */ #define DPHY_PD_DPHY 0x00 @@ -55,8 +69,15 @@ #define PWR_ON 0 #define PWR_OFF 1 +#define MIN_VCO_FREQ 640000000 +#define MAX_VCO_FREQ 1500000000 + +#define MIN_LVDS_REFCLK_FREQ 24000000 +#define MAX_LVDS_REFCLK_FREQ 150000000 + enum mixel_dphy_devtype { MIXEL_IMX8MQ, + MIXEL_IMX8QXP, }; struct mixel_dphy_devdata { @@ -65,6 +86,7 @@ struct mixel_dphy_devdata { u8 reg_rxlprp; u8 reg_rxcdrp; u8 reg_rxhs_settle; + bool is_combo; /* MIPI DPHY and LVDS PHY combo */ }; static const struct mixel_dphy_devdata mixel_dphy_devdata[] = { @@ -74,6 +96,10 @@ static const struct mixel_dphy_devdata mixel_dphy_devdata[] = { .reg_rxlprp = 0x40, .reg_rxcdrp = 0x44, .reg_rxhs_settle = 0x48, + .is_combo = false, + }, + [MIXEL_IMX8QXP] = { + .is_combo = true, }, }; @@ -95,8 +121,12 @@ struct mixel_dphy_cfg { struct mixel_dphy_priv { struct mixel_dphy_cfg cfg; struct regmap *regmap; + struct regmap *lvds_regmap; struct clk *phy_ref_clk; const struct mixel_dphy_devdata *devdata; + struct imx_sc_ipc *ipc_handle; + bool is_slave; + int id; }; static const struct regmap_config mixel_dphy_regmap_config = { @@ -317,7 +347,8 @@ static int mixel_dphy_set_pll_params(struct phy *phy) return 0; } -static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) +static int +mixel_dphy_configure_mipi_dphy(struct phy *phy, union phy_configure_opts *opts) { struct mixel_dphy_priv *priv = phy_get_drvdata(phy); struct mixel_dphy_cfg cfg = { 0 }; @@ -345,15 +376,121 @@ static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) return 0; } +static int +mixel_dphy_configure_lvds_phy(struct phy *phy, union phy_configure_opts *opts) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + struct phy_configure_opts_lvds *lvds_opts = &opts->lvds; + unsigned long data_rate; + unsigned long fvco; + u32 rsc; + u32 co; + int ret; + + priv->is_slave = lvds_opts->is_slave; + + /* LVDS interface pins */ + regmap_write(priv->lvds_regmap, PHY_CTRL, CCM(0x5) | CA(0x4) | RFB); + + /* enable MODE8 only for slave LVDS PHY */ + rsc = priv->id ? IMX_SC_R_MIPI_1 : IMX_SC_R_MIPI_0; + ret = imx_sc_misc_set_control(priv->ipc_handle, rsc, IMX_SC_C_DUAL_MODE, + lvds_opts->is_slave); + if (ret) { + dev_err(&phy->dev, "Failed to configure MODE8: %d\n", ret); + return ret; + } + + /* + * Choose an appropriate divider ratio to meet the requirement of + * PLL VCO frequency range. + * + * ----- 640MHz ~ 1500MHz ------------ --------------- + * | VCO | ----------------> | CO divider | -> | LVDS data rate| + * ----- FVCO ------------ --------------- + * 1/2/4/8 div 7 * differential_clk_rate + */ + data_rate = 7 * lvds_opts->differential_clk_rate; + for (co = 1; co <= 8; co *= 2) { + fvco = data_rate * co; + + if (fvco >= MIN_VCO_FREQ) + break; + } + + if (fvco < MIN_VCO_FREQ || fvco > MAX_VCO_FREQ) { + dev_err(&phy->dev, "VCO frequency %lu is out of range\n", fvco); + return -ERANGE; + } + + /* + * CO is configurable, while CN and CM are not, + * as fixed ratios 1 and 7 are applied respectively. + */ + phy_write(phy, __ffs(co), DPHY_CO); + + /* set reference clock rate */ + clk_set_rate(priv->phy_ref_clk, lvds_opts->differential_clk_rate); + + return ret; +} + +static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) +{ + if (phy->attrs.mode == PHY_MODE_MIPI_DPHY) + return mixel_dphy_configure_mipi_dphy(phy, opts); + else if (phy->attrs.mode == PHY_MODE_LVDS) + return mixel_dphy_configure_lvds_phy(phy, opts); + + dev_err(&phy->dev, + "Failed to configure PHY with invalid PHY mode: %d\n", + phy->attrs.mode); + return -EINVAL; +} + +static int +mixel_dphy_validate_lvds_phy(struct phy *phy, union phy_configure_opts *opts) +{ + struct phy_configure_opts_lvds *lvds_cfg = &opts->lvds; + + if (lvds_cfg->bits_per_lane_and_dclk_cycle != 7) { + dev_err(&phy->dev, "Invalid bits per LVDS data lane: %u\n", + lvds_cfg->bits_per_lane_and_dclk_cycle); + return -EINVAL; + } + + if (lvds_cfg->lanes != 4) { + dev_err(&phy->dev, "Invalid LVDS data lanes: %u\n", + lvds_cfg->lanes); + return -EINVAL; + } + + if (lvds_cfg->differential_clk_rate < MIN_LVDS_REFCLK_FREQ || + lvds_cfg->differential_clk_rate > MAX_LVDS_REFCLK_FREQ) { + dev_err(&phy->dev, + "Invalid LVDS differential clock rate: %lu\n", + lvds_cfg->differential_clk_rate); + return -EINVAL; + } + + return 0; +} + static int mixel_dphy_validate(struct phy *phy, enum phy_mode mode, int submode, union phy_configure_opts *opts) { - struct mixel_dphy_cfg cfg = { 0 }; + if (mode == PHY_MODE_MIPI_DPHY) { + struct mixel_dphy_cfg mipi_dphy_cfg = { 0 }; - if (mode != PHY_MODE_MIPI_DPHY) - return -EINVAL; + return mixel_dphy_config_from_opts(phy, &opts->mipi_dphy, + &mipi_dphy_cfg); + } else if (mode == PHY_MODE_LVDS) { + return mixel_dphy_validate_lvds_phy(phy, opts); + } - return mixel_dphy_config_from_opts(phy, &opts->mipi_dphy, &cfg); + dev_err(&phy->dev, + "Failed to validate PHY with invalid PHY mode: %d\n", mode); + return -EINVAL; } static int mixel_dphy_init(struct phy *phy) @@ -373,26 +510,74 @@ static int mixel_dphy_exit(struct phy *phy) return 0; } -static int mixel_dphy_power_on(struct phy *phy) +static int mixel_dphy_power_on_mipi_dphy(struct phy *phy) { struct mixel_dphy_priv *priv = phy_get_drvdata(phy); u32 locked; int ret; - ret = clk_prepare_enable(priv->phy_ref_clk); - if (ret < 0) - return ret; - phy_write(phy, PWR_ON, DPHY_PD_PLL); ret = regmap_read_poll_timeout(priv->regmap, DPHY_LOCK, locked, locked, PLL_LOCK_SLEEP, PLL_LOCK_TIMEOUT); if (ret < 0) { dev_err(&phy->dev, "Could not get DPHY lock (%d)!\n", ret); - goto clock_disable; + return ret; } phy_write(phy, PWR_ON, DPHY_PD_DPHY); + return 0; +} + +static int mixel_dphy_power_on_lvds_phy(struct phy *phy) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + u32 locked; + int ret; + + regmap_update_bits(priv->lvds_regmap, PHY_CTRL, LVDS_EN, LVDS_EN); + + phy_write(phy, PWR_ON, DPHY_PD_DPHY); + phy_write(phy, PWR_ON, DPHY_PD_PLL); + + /* do not wait for slave LVDS PHY being locked */ + if (priv->is_slave) + return 0; + + ret = regmap_read_poll_timeout(priv->regmap, DPHY_LOCK, locked, + locked, PLL_LOCK_SLEEP, + PLL_LOCK_TIMEOUT); + if (ret < 0) { + dev_err(&phy->dev, "Could not get LVDS PHY lock (%d)!\n", ret); + return ret; + } + + return 0; +} + +static int mixel_dphy_power_on(struct phy *phy) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + int ret; + + ret = clk_prepare_enable(priv->phy_ref_clk); + if (ret < 0) + return ret; + + if (phy->attrs.mode == PHY_MODE_MIPI_DPHY) { + ret = mixel_dphy_power_on_mipi_dphy(phy); + } else if (phy->attrs.mode == PHY_MODE_LVDS) { + ret = mixel_dphy_power_on_lvds_phy(phy); + } else { + dev_err(&phy->dev, + "Failed to power on PHY with invalid PHY mode: %d\n", + phy->attrs.mode); + ret = -EINVAL; + } + + if (ret) + goto clock_disable; + return 0; clock_disable: clk_disable_unprepare(priv->phy_ref_clk); @@ -406,16 +591,51 @@ static int mixel_dphy_power_off(struct phy *phy) phy_write(phy, PWR_OFF, DPHY_PD_PLL); phy_write(phy, PWR_OFF, DPHY_PD_DPHY); + if (phy->attrs.mode == PHY_MODE_LVDS) + regmap_update_bits(priv->lvds_regmap, PHY_CTRL, LVDS_EN, 0); + clk_disable_unprepare(priv->phy_ref_clk); return 0; } +static int mixel_dphy_set_mode(struct phy *phy, enum phy_mode mode, int submode) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + int ret; + + if (priv->devdata->is_combo && mode != PHY_MODE_LVDS) { + dev_err(&phy->dev, "Failed to set PHY mode for combo PHY\n"); + return -EINVAL; + } + + if (!priv->devdata->is_combo && mode != PHY_MODE_MIPI_DPHY) { + dev_err(&phy->dev, "Failed to set PHY mode to MIPI DPHY\n"); + return -EINVAL; + } + + if (priv->devdata->is_combo) { + u32 rsc = priv->id ? IMX_SC_R_MIPI_1 : IMX_SC_R_MIPI_0; + + ret = imx_sc_misc_set_control(priv->ipc_handle, + rsc, IMX_SC_C_MODE, + mode == PHY_MODE_LVDS); + if (ret) { + dev_err(&phy->dev, + "Failed to set PHY mode via SCU ipc: %d\n", ret); + return ret; + } + } + + return 0; +} + static const struct phy_ops mixel_dphy_phy_ops = { .init = mixel_dphy_init, .exit = mixel_dphy_exit, .power_on = mixel_dphy_power_on, .power_off = mixel_dphy_power_off, + .set_mode = mixel_dphy_set_mode, .configure = mixel_dphy_configure, .validate = mixel_dphy_validate, .owner = THIS_MODULE, @@ -424,6 +644,8 @@ static const struct phy_ops mixel_dphy_phy_ops = { static const struct of_device_id mixel_dphy_of_match[] = { { .compatible = "fsl,imx8mq-mipi-dphy", .data = &mixel_dphy_devdata[MIXEL_IMX8MQ] }, + { .compatible = "fsl,imx8qxp-mipi-dphy", + .data = &mixel_dphy_devdata[MIXEL_IMX8QXP] }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mixel_dphy_of_match); @@ -436,6 +658,7 @@ static int mixel_dphy_probe(struct platform_device *pdev) struct mixel_dphy_priv *priv; struct phy *phy; void __iomem *base; + int ret; if (!np) return -ENODEV; @@ -467,6 +690,30 @@ static int mixel_dphy_probe(struct platform_device *pdev) dev_dbg(dev, "phy_ref clock rate: %lu\n", clk_get_rate(priv->phy_ref_clk)); + if (priv->devdata->is_combo) { + priv->lvds_regmap = + syscon_regmap_lookup_by_phandle(np, "fsl,syscon"); + if (IS_ERR(priv->lvds_regmap)) { + ret = PTR_ERR(priv->lvds_regmap); + dev_err_probe(dev, ret, "Failed to get LVDS regmap\n"); + return ret; + } + + priv->id = of_alias_get_id(np, "mipi_dphy"); + if (priv->id < 0) { + dev_err(dev, "Failed to get phy node alias id: %d\n", + priv->id); + return priv->id; + } + + ret = imx_scu_get_handle(&priv->ipc_handle); + if (ret) { + dev_err_probe(dev, ret, + "Failed to get SCU ipc handle\n"); + return ret; + } + } + dev_set_drvdata(dev, priv); phy = devm_phy_create(dev, np, &mixel_dphy_phy_ops);