Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2985754pxb; Mon, 4 Apr 2022 05:03:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw32AR+l5cXOkc3s6Kq8IO8QNG6SK4AoUvQna5OiOjmfYFVy8M/vly4EEL2pF1mFwi58W+Y X-Received: by 2002:a17:907:1624:b0:6db:8caa:d71 with SMTP id hb36-20020a170907162400b006db8caa0d71mr10745345ejc.723.1649073784924; Mon, 04 Apr 2022 05:03:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649073784; cv=pass; d=google.com; s=arc-20160816; b=wQw/M0eA726hBu41G3Eq/kaBpWztA0z18fG6A3HkwKjS9Bh+ZIGGCTa54lXGVAP6Tm I3U2oNF10Z6ILNVvrWdkObtLpKu4V6/xxzj23DwrRnxkBdCbsjp4HHtsIXk54Ap0XlsH nBf/cMRxMW5aLKJ5YuRKIxoK2Uuj5bfo0XTBVsLDCjbqfYJhUzUmQTiPecfsNHUOVfss f1wa+b8dAJ08pL+LTKj35YyW+Ijnhirn50IbEgYwzQPegMeFPPgXjmVvH5HZVhcJAyk4 mOde6nfVBxAQjkznW4MPCVllV1eu0/WSRs9dvNYva8/nrJs6nzR4ME1DgOAwe8EyURxL /p9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OBQV+Ohgw4rC2MFsKm8LEhBcWsWoUQRtJKI3LqPqGIg=; b=IYD7YEQx7hechyht7U9TGh3DA5/Es9syPxKovCvmI1eW5V/8wBc/3imLJiGUzQsaB+ P9zojPGA8QG2KT10VCTwoClrobC0q74/V+QihRzDNunoXLCVgUOWXlbwfEYYsTQfTsYw 2XRvke61gIXUVQZ4Q9wJL8DFSlMG8Ok36zjGyH+V2tHQCWy0t+HSyw7TlTG92vMGfgDH 5lFHwAdBdq6edj+NtYSuwOY+fmw22G8I64hDrwcthcckyj/uRqM2DGv1AY89g21aC3qL lwpJd2lRHPLRgafu1NSkepIkuqyoVSoGk6kC3FKVgDrroQ5uC3pUj75f46VwedeWxkMM +j8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PLQ4SsJX; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a0564021e8e00b00418ea5ad78bsi7297382edf.85.2022.04.04.05.02.38; Mon, 04 Apr 2022 05:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=PLQ4SsJX; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353805AbiDBFZY (ORCPT + 99 others); Sat, 2 Apr 2022 01:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240281AbiDBFZS (ORCPT ); Sat, 2 Apr 2022 01:25:18 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50412D54; Fri, 1 Apr 2022 22:23:27 -0700 (PDT) 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?B?ZVByOGV1REErVjgwTm1tREo5SlFPK1E2U0VENmMxQUxYL2daM2FJTnVlem4x?= =?utf-8?B?ZEsyWXdvSHZTejFvRTlRZHoySS96NHBRUVgvZUpKVkNqMkY5NUdUUTk2L3Rm?= =?utf-8?B?dlpNbmRiRE51T0l2TEpUTWVqekZ0WEJxNTBvcEFVT3VqZkloSkJuV0hncjJL?= =?utf-8?B?bnRsSmtRTlRWV2JqSG1SVGxYYUdLRzVNeHdpSDJScTFBaDk5dFU3NlhseEly?= =?utf-8?B?c1BZSDJralVVVGpDa0FCQnB6WGE3bVlMUzdWVk5XaHpRWEpiWnFHZk1JWGpW?= =?utf-8?B?dmQ5bzJnbDZyR2hGU1paY1lQR1duUWNjNEpFNmx4Q2pQb1N0YnpCa0lKRVBi?= =?utf-8?B?ZThtbkc4aFRSbjZjMUVuY2ViR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DNThaN3RhenA0bXpaTitoeUxNS2UxWjhsTjkyTWtJNjllSHNnY0ow?= =?utf-8?B?bFpkWFpQZkF5RTIwWUpiUWFpczdZdm1kbFh0V0VMSVkvYVVaVmxoVzBCVFBS?= =?utf-8?B?WHF4ckVBYXlncUo5TENabGJDTjh3ZTZMWW1kKzI5SVJSR29oWWxudz09?= 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.25.1