Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1252358pxb; Thu, 14 Apr 2022 01:43:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW2z+3rOSPZT6/CamjkpafroxM1GpmqeVlNqB8z5U3XrROestlGnReK6QrUst+jsUAWX5M X-Received: by 2002:a17:902:ef48:b0:156:8ff6:e2cc with SMTP id e8-20020a170902ef4800b001568ff6e2ccmr46935531plx.130.1649925792418; Thu, 14 Apr 2022 01:43:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649925792; cv=pass; d=google.com; s=arc-20160816; b=SJhwE8agocflXMHfynOzm2VeYAxfxjMJrQaokyHdSiSwCgrV2vUBusJdObIOdregg7 vpiIP0be69kF3DjjcfdJ/FKrrvbpeFr5X94HyzoKvPEmL54wsWlykWDi8WD/B8FUsjko yvBwlJW5mVJXnd9wjSk6zipOpVUAI8gUYSd4wZfk5Nln/hLQ/50XL7usWIWs5uA01+ug Jloy3rfmGORxOEFG5VfvVnyrYOKGwCl+ffOwPvY6GPJpFzXP83feKWtZJg5w8n/v1BT0 iF9CkzyB1syyHjw4PzDo9P+K3lFYr5OWsNkdE8Hu9DkOPUCPOu7fBSLfcAZuKfwLGTED IWPQ== 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=6uqG1TtbXF7+KFyfyyBlvzGXLuQEZxe93n27M5vWflI=; b=Llw9tI5ENTINJB7gL9DSTRXQtszWX082Js00tIeYpnLkmc4nnaATV/ik0x4+ovBIRN xj7omfM/Qsd1JC5t2r4AHuekN54EYVDQqQlO+PsXBzZpGT7J9ZXTSi43kFuSV6DMYszR KkqOH4ayCFs77SINWPAmj3fFOFOh5mJPq/bKWVmtaPwIZ0xWHRn/oYswjuh8mjPXjz5T tWGHKZ+n9CbNR/0ThJ+oGMUl0xYJ+L3WuGUQh8Kxt5uW8jULL6G4GrZv7NU/3OMoumjV vyha91cNF/WMbtcRlqWKWqfL0w71rr4L1fXjj8XmwqBpigep2/CxHYHffuJhrOkrSci1 rqjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dxcVFaWw; 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 o8-20020a170902d4c800b00153b2d1645esi17366373plg.102.2022.04.14.01.43.00; Thu, 14 Apr 2022 01:43:12 -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=dxcVFaWw; 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 S240132AbiDNGt7 (ORCPT + 99 others); Thu, 14 Apr 2022 02:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240133AbiDNGty (ORCPT ); Thu, 14 Apr 2022 02:49:54 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2076.outbound.protection.outlook.com [40.107.22.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE63353A63; Wed, 13 Apr 2022 23:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LM/wduR7FXx+y24guxRVMohphP7B8sPOX0p1tp2fgroc9gtRjQjR4lbD3brXj8TtqkZnueXlTUXWen/osjRXsGIq2/Eki0OQlIM4zq48ilg6SrI4e/UyGmzTPkF5K6Qv+wNwHHN8v5C4ayRj8Pt4z3IMINnyTmBNa7xQrzGUAbbRXL1m2T9fZdmcTg9Zba7dc7zrhof57H+dp+uQOHbINYiIP39XLN5fYlE6lkRYFcaQx8e+yCexun/VZTLJeU6Ky1IPXi1jLWpmlWmf+yIFMkNfMrjQW8RTnCbWPCKztXoYjemwEIYB3UnvSqsu67EoRkn4en8Sj+X1Jt23uyDU/w== 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=6uqG1TtbXF7+KFyfyyBlvzGXLuQEZxe93n27M5vWflI=; b=AewBwi2yUBVhPd0VFZjb8yQxNPx9jsVN7LdiWJZBpAk6EtTmS8xUD6+UAgQR+DpFUdTL5M8jghNCwa5/zLGkR02N+p2c8BtYc/BDsmoOI/EtxSXGx6eKFTr1mTRlE37PA4WEmFXEK6vYPGclzJyFB1LY8D/aPL2aGPQtKHVNTaGLTBUPkJ1q2qH1mNCWSLizZ6IRFt2zsfxoqu5RSEs+lKot2mGSfrnwrjDRQyV5enQYBvXExIgT1PiWaNIhVwTk8zoMv7H5X4q06zYhvTU/yJ4AR6oFw8XRKPID21RRJ5Zq/D90SIMAAky7XdRjKr873qK61RQTyt75zMdVnRlUGQ== 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=6uqG1TtbXF7+KFyfyyBlvzGXLuQEZxe93n27M5vWflI=; b=dxcVFaWwZXnadO5EELaFG29fxEQcJ6In4K/MPG8TMiOC0Hi0e65iIzcbxCFx6qYPq7pQ90m9n7TrtAyWmlr20Kf/ZrjD64HDvaqUNCOAafRNC2XkQTM4E1AcZtnEalSEBMJmSqTgGDezRCEU6+WxKFf54+Fg0LN0z8plxMH/ZVQ= 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 AS1PR04MB9381.eurprd04.prod.outlook.com (2603:10a6:20b:4db::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Thu, 14 Apr 2022 06:47:28 +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 06:47:28 +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 v7 1/5] drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() Date: Thu, 14 Apr 2022 14:48:54 +0800 Message-Id: <20220414064858.405096-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220414064858.405096-1-victor.liu@nxp.com> References: <20220414064858.405096-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: 51dc4fe1-8f9a-4cba-71a7-08da1de2a434 X-MS-TrafficTypeDiagnostic: AS1PR04MB9381: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: y5RbcGuES5mkkIh+wg/Ul7E1lIYf/xRAkSETt3w+5zkUjElJpcWix1AGADGpL2Ck1Ila9DCa3ap5dZNfnAoSUAciMFsi794B9zBU69iZtLRiSx1yjgQyBNFZf5iebY/4tXUPNIQdY5r8Fp9EMlM8+GVVHvrMTgy3LC9u4g7PXXHvImcJuQIEVS9n5Xlig3hsICRVzcAETm7rcljX73rEUNpOVTbWugX1NbNc+Zx6bLf8GXnvKIaOvE0BDn3dx3A5CtA1EkB9W13lzGBkGG6a+Jr6zQGeDdKtS/Fwuq6lFoLW8C2af1zX3TMLZHaP5dPi9xmqYr05Sj08trwAyZZi7yctWhTs73f3BMWisRPLmDyc7USX/G2TFFqMVEAAcJbiS6YncqaM/o/z8anesAFo5wwSmUfJ4orCQVpJ5sA9SN+KXyfJ3MINBEk3rHRuoyTsBHUwB933fVf5zYDcLx07Ij9boVG7+LhwK/vmoxi+7PDBscNxL+mpsArZv/RQjP1ZAFQFElEB8JN3txSehpNo9+Njhd+JBUkh8u9CFZcAvnRHj5jtjVhmufBWn3BK1e1CBBfmtX2+xJc8AAX+oHIkvSi2UKx/Gp1OCz66KPqTJgsx9NPUPhSJiHORF+DoR1CO2bFdJZYjA6VpZUDc4aaqF2HbnpRHyNzSM5vrWvOzH7aZrq99ZJ59sXCmu+pTkK6yQebOrTGxiiqAFA7GgbzZ7g== 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)(54906003)(1076003)(6666004)(6506007)(2906002)(508600001)(38100700002)(38350700002)(86362001)(6486002)(5660300002)(8936002)(6512007)(316002)(186003)(7416002)(8676002)(4326008)(52116002)(66556008)(36756003)(66476007)(66946007)(2616005)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OVBURmdHbkVwK24yM0dWelNaT1Nvd0xyelpPTks5Rk5QRWZ6SEgwajJsSmd6?= =?utf-8?B?dStSbHhSbmpySkNYTXJRZGQvbll5RlNFdzd1OWxoRFJoRnRhNlhVMmo1MU9m?= =?utf-8?B?ejhpUDZHemRrdGdJNGtrMGFFWVI3eFExcnJ3aFhWekJGdzBYZnlPZ0FqRGFX?= =?utf-8?B?N1RkSGF0WDlXV1NNdklWTFpOMGpvV29QQW8zWVJWYTdMY3ozQ3RTL0JxWG5T?= =?utf-8?B?d1VISlpHd1NsclU1aytZanorcDFsOTlaV0l2eCs2MkZFYU5BT0FZY1JWekhP?= =?utf-8?B?eDU2WW5odVE5OU45L2tyY0ZuZWU1NU92d0p1Ry9QZloyc1hMQitkSmo5OWZX?= =?utf-8?B?UDNjU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ODZHVk5Gc2t2U1dT?= =?utf-8?B?VTdobHMrd2pDV1U1b01udmllOUUzMWk2T0szbjNIcVNYRGx2OXFSSjRtT0hO?= =?utf-8?B?UVloWTdDRmRlRFhQbEZwamdCVmxNY2dPL0FsZi9zMnl5bmxxcVMyL3BrQXpT?= =?utf-8?B?RldVSlBzcFRIZk10b0dEVWRJRTRWSjYzOUNSVmN0ZFhIZEpTaERmQT09?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51dc4fe1-8f9a-4cba-71a7-08da1de2a434 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2022 06:47:28.6529 (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: VePCckByugecxzg7fHppt8NfGoEomugMtQPtUylW95YBeVyYFxDABYBDCJe0BOo/HBjb//lZWqJ1Qqn81w2FAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9381 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_DNSWL_NONE, 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 --- 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(+) 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