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);