Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp28383lfe; Fri, 15 Apr 2022 17:53:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHGSRkATnEQ87Npzf7pVSgZGcdEwLZaHQ3r+BW7AnexEhnehvn9AXyVmMd5eoODX0f9u0h X-Received: by 2002:a05:6a00:190a:b0:4fa:e4e9:7126 with SMTP id y10-20020a056a00190a00b004fae4e97126mr1370023pfi.65.1650070405664; Fri, 15 Apr 2022 17:53:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650070405; cv=pass; d=google.com; s=arc-20160816; b=LFCTQ1ouAyolnCAvFzloyLIDVRZQtKSuIf1iURsbJUUybTESESSRMYnYs1hwI3HJ+K IihMTPqRx5sS+3hWMt4IGM3JNLM3I2Nslkts1KBPKAnqyeXJA4D8MSm9JqpSKXr+yQq/ XOAjEB2tA8cxUv9yMNKWnyyXQGAEOro+IeZjx77uhwtZ14UzH77E+WKsd8zL4dZKNfOZ TL6ZyIvzwqOLFjiNxHqFJ0fxSJUvXnwduLP8QgEd+g8mZ4uBRq2LLbHYY27OAisvLZqD mZQhRUF9V/9BPgJrnotEXLS7FZWDM2SuxryZ6oBZazWmGFKliiztK0Kv9nbR2l3oazh0 fPcw== 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=H4Yt87+y8OLIFPsVv3s0nx47PgG01ijdBdHzherr3D0=; b=GmvQvxZHYGTcHygWyQZrGBtDPlSBopnZf3xTauNh7+osSQDXq0rKXVDfHOZqf3TEUu 8cvqGzil4CzXtYhCOT16uuM3+Q/jYv8ksvG/B+pUBACtnPGuM4cmjViUxF2f0yPmdhYK slYULDw5Ac32MRH0tYGme9f1uXuRgZngxqoKsCfvPohGBE3V6jw6KSedaI4ddnPRw7c3 Rw3VDmuZA/3uIFuIx8aD6vsx7nlzAy9A/9amuIgx7Um8HCnWLk5anUAbiXabjYiCDdpZ Ung1GssGv4bLm06l/gMVFkRmhxVfU33vNnNx28bdy/nPG6E6mT5l8KFTWEyu7LaB8/Hw oy7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FmqwJJfR; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l35-20020a635b63000000b0039d9d404482si2816691pgm.570.2022.04.15.17.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:53:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=FmqwJJfR; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5F7811017FD; Fri, 15 Apr 2022 17:40:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240243AbiDNHLd (ORCPT + 99 others); Thu, 14 Apr 2022 03:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240235AbiDNHL2 (ORCPT ); Thu, 14 Apr 2022 03:11:28 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2053.outbound.protection.outlook.com [40.107.22.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F299B53E19; Thu, 14 Apr 2022 00:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7cmNhBle6uC/Yjn6atc7SuF8fJK6NUc6WpFPFZM5lUnpcP+L2uvE3lXDT+3dJ/c1qFi9YN1+kWiVfYnFroqHdOjulAt3Dgk2/TuW55C7poHd8sT/xRnHOyr5DitH4h67tYPW3BDph0JWijikgDmzXLllz9jNk5UuNywiysZdNpTlBru+BsuKpAshB+gwI8InAIcmlzk/riGn4bz3DWlxfGFbH3pdkpP5w7SspeQ3s+YLINLKbHG0635yKdn8Bde0gOBpM35L48LoIJBsZpv7eykeUCY13bAvw2oHWWuPbbKnDzD2Ww4I5qCYF3mT+O3U11v2xYafmrpp0Xte8Wwyw== 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=H4Yt87+y8OLIFPsVv3s0nx47PgG01ijdBdHzherr3D0=; b=gxyLGPI/dSvfScpjWKcVOS/AE2hMOIWjlV79aKr1aPfsgJWhefo8DRGTQ5pTMxdkOIlAjGrC2i47aYWWI9UyPM7ntHbTfspj1In627xN+EpP1bnMcMjTPRyB/cSYlSmLWsr0hlFtJK3Sc/Pr+l5KDHXhiEt6471xYg6tawmAck1tQY4wM94UkVianPmJxCDM/VhMo2nvpkZQWtaMCY1Tr/P0qQSseg0mhMecOOEQkfG2fJOHv2EoQ3Ye+4UBHEKksrCSoulRbdXkHhBDfknLbjqdPM9Yuf4bpWzQACG8VZqr05ShMZnvYLTmoQ3+6VxnXDDu35Nm3uXkhXXFjx4uzA== 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=H4Yt87+y8OLIFPsVv3s0nx47PgG01ijdBdHzherr3D0=; b=FmqwJJfRmcvbgvsJH28TqcMeI4YHHgH00Wtcsib4lWpvjEHpuAtlu30SmdsM2NDw40d7ZOeZRk2kV+zk9il9xugF0Ug5xT/lXRRrt88OyKg3o4OAP1HVWEeBVKCEnUwTyy9NFk0U2FeWcVhr0htm74an6gtFGMZ44dTms2C6TRg= 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 DB8PR04MB6714.eurprd04.prod.outlook.com (2603:10a6:10:10e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Thu, 14 Apr 2022 07:09:02 +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.5164.018; Thu, 14 Apr 2022 07:09:02 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@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, krzk+dt@kernel.org, andrzej.hajda@intel.com, narmstrong@baylibre.com, robert.foss@linaro.org, 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, Andrzej Hajda , Jernej Skrabec Subject: [PATCH v8 1/5] drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() Date: Thu, 14 Apr 2022 15:10:35 +0800 Message-Id: <20220414071039.423271-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220414071039.423271-1-victor.liu@nxp.com> References: <20220414071039.423271-1-victor.liu@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) 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: 17c75abb-9c88-4cf1-c548-08da1de5a7b5 X-MS-TrafficTypeDiagnostic: DB8PR04MB6714: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: snn7Nol9XdeZwX+rj5wkYJmwp9/4VM3HHG0/9KZTVel1KFyr4nCZbZr+NksL3BtJiYT2cYLEp+/sCcowdL2JhNGc4BrfkMAACPfLX1Gz3xGfRR4znlzBduOr8Y5XdQZsUfQ3AyjUDBcy2zlhXc+W44f6SlqubSURUDTK70fJssA1dIK3aBarfZ73rpK2TBPV6elq5yerBmNErcAuOD4lkf9GlUhzB8sEGXA+Mv32fMXRmVsO4sJiuxtqFuP99+KU9IEyvm1ZAJFOa2wY/quR9HTFH/mx2CsVSHhWSZ2Ekov7KraNSsAguHs2TpyB1//Tbe0kKHeHvyEQR+ooGqCfpLhJ8OzXm681ggJ/og1ooFPPfeQymOczq5Qw+7yvgX1qNcX26Kw+l/AYMlN8dho08TZ94cM7Ef5RTPw57cc79Ir6YKNA2fzFzV4SfQGocdU7hcWvPgMQVwXo7OSi2Bme5CIxeQdspE25kMj6VR4inv4BCGRlTz/iVoiIn3WgOVJA7OzC+5+KVMmAqF9RXUTJf9qLPln/hpGNZYHv4m71xekeSGQA8q3ALo0GZebzRDXjDBB6l2bKdJxS1r0yNDRjAAY/eMNEum951WwThBHyBZJmfVBtwUwk/NYakXh5HhjfJX4LK8730Unuu/eIEsvNSLa9A5ahK0sQ9IJoEb9KHKGstUhDnb0aXDkasZtqeZtkcRaJw561oWKVRdtoLVpVdQ== 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)(6486002)(1076003)(38100700002)(38350700002)(54906003)(66556008)(316002)(66946007)(4326008)(66476007)(508600001)(8676002)(86362001)(2616005)(26005)(6666004)(6512007)(52116002)(6506007)(186003)(7416002)(2906002)(5660300002)(36756003)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YnVaN3B1SlJuM1ppMnp3ZGovUWdxTTd6UVRxWjBhaHoxeDBCZkh2ZFh3V1VQ?= =?utf-8?B?bThWM0thWnNPekVSZ0V4WHpjWEF0a1VieXBqbWtMZWUxOG1EcWlkRGo4V1Rm?= =?utf-8?B?TE50Y0NSNGxEWWFOcEpOWHh3NENSVEJta0JRUlNCZUFzakxtQWZQM1pKTWxI?= =?utf-8?B?V3dXeERjVXNBWDVJT2hIbXM1cXZUbXFsTWQ5OFduNHRON2Y1d2xiWGVDM3d6?= =?utf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FM4Nk4rK0JCNGJWcDNBTDMwK0hoUndCckk2czVKZzM5?= =?utf-8?B?Qk5NNGlEVGZ4bDNkTmJvdHdYeExSM3pxMExmRVlYdkF1UEtoZ0ZvR2d4ZFIw?= =?utf-8?B?a1ZjRzN0NTY1MllkazBJR0YwMnZ2bWJGMUt0M1VteGVva3hIbGM1Q3VWUC8r?= =?utf-8?B?M0pkUER2SzVKblFQVk1Fb3gzSEtXaURVRkhnTGJJNEJvdHR6U0VnNkpjQ3BP?= =?utf-8?B?ZG51R0hSajhtYVp2ZS9JSVBVaURRb2hEYVZ5QmVyNTNCcUMrNGlPb2I5blJp?= =?utf-8?B?OHhFQTFUOFBsejgwYzVxc3VUN2xETytvdmdVa2UySG9nSDUrYk83Zz09?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17c75abb-9c88-4cf1-c548-08da1de5a7b5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2022 07:09:02.6801 (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: Az9lDrgiMsbzDu/QiAna3ZQr0NkQzZrea0HGXWtyhjtSterOAUT0FbrB0ERLnEzLQZP44EHIAVWVJgJJyayQNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6714 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --- v7->v8: * No change. v6->v7: * No change. 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. 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(+) 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 d5945501a5ee..85bab7372af1 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -666,6 +666,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