Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1909384pxb; Sat, 2 Apr 2022 07:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVEWAkLChQR80O43hDM1dfPvZXxFzsLgKZX27xYqA6AQfdJAAWmFXG6/YdCt9PWofe3+OL X-Received: by 2002:a17:90b:224f:b0:1c9:949e:2202 with SMTP id hk15-20020a17090b224f00b001c9949e2202mr17190436pjb.56.1648911328527; Sat, 02 Apr 2022 07:55:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648911328; cv=pass; d=google.com; s=arc-20160816; b=ylhSbGUfXJq7FKUvuRET1P6sA/VtgbPF9jMcMm+MGvPi9f9P/KqoBVCOYpWz+u3C8g 67I6F8/aBvbvB3BCbXDTTuSGY5TZJj13C2RYYn/BnsoOye2T6uMa4UQlYsk7C30kSMcF xKvT6sVjWLX2m6D5MpLEwOXMOuKeQwlQBC9JoUkVg9QlJFH0D9bsB0jQreWbIbTq8g4A CuClmcFtbdIBDfJKhDl9xDZ1GBNn0RdAzzwvpibnTfKSVYL/wGHtSt3CGIzJYfiy8DOl fEPWFMBScymycvGMhzhGIkv/TkSMJBCQV+ClYoZAq/RXR031NApZQ+c/oSwQQ2FpBf01 2svg== 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=E2iyT4vCBQVYLhhj2DqdYLsq/1RQuVjwDOOXOq7s36Q=; b=H4GgiKvh9Qb+aeLtRLYs/bd9nmtb1mnE4db7aSrM1vavs7on+OJmbES04N5kDzXdQw dYNP/AgWHj4OiPwJZc7Z96dMgBi+ZtHEQsvZn3onSgKKZCSo/rRfvpTPEiwTaNIpUNHR n/eqWbidnxWh5IqTZUtFGmSATrBeUqcdxddNKBrzCqVD6lNukcuNfk65axAdKZOdV1xp Ygd+WfkJzu1jrGGJ3bKq4jr654Xc9H18J/4POVwFu+hTcajeeo5/tQTX+aOhBbp+3qYl BfZXmWr6WsIF5uj8zCKAoJxHp5bcmRQ+t6mc+XsUZX4Bu/Pr0ZMeP+7IXWitgBRDbfCr Xqew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=JlQMhSfl; 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 b14-20020a170902d50e00b00154a965e488si5305377plg.237.2022.04.02.07.55.14; Sat, 02 Apr 2022 07:55:28 -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=JlQMhSfl; 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 S1353662AbiDBED7 (ORCPT + 99 others); Sat, 2 Apr 2022 00:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353642AbiDBEDz (ORCPT ); Sat, 2 Apr 2022 00:03:55 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70072.outbound.protection.outlook.com [40.107.7.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19DDD193159; Fri, 1 Apr 2022 21:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lmop5kzwaqaqbIr0mjppc2dffhyf3PgOpLBSFAaF8Ix0FNnXHeqzaKhUEhGIkGdiLOKImHe85iBIuQ66GNM6LI5rRU03JmxdOztfoKLstlq29PswNfckHjiHtvEg9Z7mxbSOgVV73Bsv473A5FjqHvlcHBUOGEUwyNz+9cwaZGdtNWAmwz7VkyTVw54YiPpcLqxaZaGvCS2ZqB4FBu0U0Gvb/ZnjL5k4kTZRoYlNPH3R+VuI3k0N9b/hm0cSwRWh48jhTsLuTYWPSQ6MRAfH5bLx71YKMeLPhPgi1WQYT6OACN/IcG4DkAoCyiItjl37UKBhiZkGuXrgm+l44n5ldg== 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=E2iyT4vCBQVYLhhj2DqdYLsq/1RQuVjwDOOXOq7s36Q=; b=SEO6zNCtylTOHoSH+zlMepS7YfMt3wH1Hp6uVjIzURCUoRe1DNN4WXYRnrpHHQiizBKzOryNjcpkJ37c+fls6TDyD44lT07WxH3FhIf8QB643++3Sw153T5OTFxp+ylq/QNwPo6ZAnhy/f0Vd9fGdYD+B7MUKwWp+hysBYv0yzbVPQXrwJze09OH1pfj6ioSBhpOouUOSvZ99lTjNGNdnCAqEWYdbbXvEBI6qeXYMOgM0rRE+TBakYrzcBBge8jvvinwvS71tNpmQ81QOPC2Ngmrin/4HH29DHP/8+HASPeliZVhAZGbSC6tWm/ZxmklYoUZIIg6FpRJTDY0iR7XYA== 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=E2iyT4vCBQVYLhhj2DqdYLsq/1RQuVjwDOOXOq7s36Q=; b=JlQMhSfl0TyLcAlMLsx9i9e75UWwGG7KwUk3uO7rMIKuQ3LV2cn3b8OCMFRalVOUGyRmcSLjS0YO6AJEsJTs5Ru6foKxmXfVYxtfeLpGEfLpOId+dq3SrnU4ibj/r/hzNexP3GiWO9I6UZTH3ylJKHo/jHC/JOmrujt70RQszvg= 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 HE1PR04MB3210.eurprd04.prod.outlook.com (2603:10a6:7:1e::20) 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 04:02:01 +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 04:02:01 +0000 From: Liu Ying To: 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, a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, 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 1/5] drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() Date: Sat, 2 Apr 2022 12:03:21 +0800 Message-Id: <20220402040325.2465222-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220402040325.2465222-1-victor.liu@nxp.com> References: <20220402040325.2465222-1-victor.liu@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SGAP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::23) 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: 6f9c4514-a55d-410b-b8c3-08da145d8a6a X-MS-TrafficTypeDiagnostic: HE1PR04MB3210: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: EsKRtzcGeZAi13BrROwOuTn+2oEwrbnLt8AYhVZHZ/yniufdNadhiXEtjUzEKZEu8YMudMBHdeoDeoykYuaFJ87Y9YW3pVXgJMjN/eJIyKPxNzeh7TE02m/SVp3Cq0CKSy9kFtP7G4Be9JvxYJ+QTiI+Jq5xGCqr9JjFdE/Agm8H71xFWhL6ryPWFKWtNqe/mFTAdflJOuUeUW6ObnBZqEVIjXgsZyDVTwXLT1PlNNsRAa6liTSeH5VRXnoszfPWTesbzwJroLI4Ljyw2TtHkynyaLKShpU6ikEXh/9SQp7EWVKgfmJkzSszcgfBJXMGAUsq4YLUfZLSJsRrhV8UQC7Kgvo9D+Fd5W07Nffu8w+JYPz6/2sfFPNUAtPadvNWCu0sX66W9BTApmObG/I6uKb7SA/uZfDl0l0D8LYin/4Vz3XyD5GBnD8PzB0j+/TMnNtqjH5++zS/wX/n30TtpciFpWmuniFP3hLZUi3r87kgYMBDWaEFYkeU5OOT1udjmD1pc34nZQpA2r80xf5Kg6wj8dAcnL9Kem9mVEq3gT12H6k+cOBmbE6+hBGwCAOJqn6bRkf0wOCGfB3URIlIccoMy7ceNeysJTDlWP20OVpCK3vefXKJCChBlzNQZOkJ93nGlgB8FnlEr4vmwAhVD0AbpcoQJFQoJQG259Y/kA+L6zXrPttxshaOB4Qxv9S80lZbrMt2tW/qs0zLvXi61A== 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)(86362001)(6512007)(186003)(26005)(2616005)(1076003)(4326008)(8676002)(66946007)(38350700002)(66556008)(66476007)(38100700002)(2906002)(36756003)(7416002)(5660300002)(8936002)(508600001)(52116002)(6486002)(6666004)(6506007)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MnJ0b05FeXhFSHQ5SjRyZ0prU0JIbUV2aDQyRTEvbmM4OG9ITEc3VWhNZWFP?= =?utf-8?B?QzRFWThYZ3NMbk9LaUxMS09mUjRqTkx0TzI1VEYyNXMway8wcURaRmZBMFhY?= =?utf-8?B?WFdlN2lRRTJ0akkrMWkvOGc1VW9PWFBpQVFnL2cxWXp2ajZ6MlViNFlQNDNp?= =?utf-8?B?WWhEYXRoZkNlM0ZUblY2YTNGdGhsS09hL2tPQyt3MFFMTm9kc3IrUmhqVDRq?= =?utf-8?B?TUJaRGZZbXhndGpnTjNGVHJIL2JNNWFla1kzdUFGTWpsdGxYaDlaQXdjYUtC?= =?utf-8?B?WWpTRUNYckJvRllqNWRsbFpWdnFUbkI2WkRrRDdIZGNvRW1JdFFwSlJ4OEdt?= =?utf-8?B?UlZDSjlkVFdEbWpXMVhVZHpISDcySG93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?Q0piVGkvWDRwcGcyVFloenNQZm12YVFkU2Z2bmpRZDhhZy9OcmNrTVdvYW8v?= =?utf-8?B?UEdQYjRlTy9FcGdkRjlWR3Zub1Y1aEkxVms2ZVp3K1pxY2dHc2lDenVmTVRj?= =?utf-8?B?N285d2EybXJjOXJRTTBBMmZURmpZKzZWTm5yZUIvZW9ZWmlJOGdUQT09?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f9c4514-a55d-410b-b8c3-08da145d8a6a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 04:02:01.5309 (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: bvf7ozu6VZ8OZ5D++N9MYyk1nIlbHQtpcKxwa2K/rG1xLcu6L09XG2ehqVlfa0J0xt4bSPP8br0DEksL3xySoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3210 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. 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 af07eeb47ca0..cbe3edb17ceb 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -671,6 +671,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