From patchwork Fri Dec 4 07:33:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 11950823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0A50C433FE for ; Fri, 4 Dec 2020 07:43:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 745932255F for ; Fri, 4 Dec 2020 07:43:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 745932255F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=M8Aywvk46hhyjrOVBNmNv1t0UwXD6Y1NLdlzGk2RefA=; b=iDnNDdM8MbNGs3/MgHWH0Er2Q 15inov1ChbxHW4CncWURElE37JChQXWo4fHguZCk7ngxCgOWAA09Ld74bUS0ybk4Vjj7J+AFo48B2 ZmQexlo4NbrPFk8WmB77+oDSq2YyksJ7wBM2KxqBMrLxsC7q9zXtTOKYkUrlVZk0CzQMAMfcuKzYK EHzUp0Z0qxVa5ZBPrYfLmQpYiK2qdwutsaZd5q2k7zJwDe2X/P7ZHW/T34ABoAZxuF7tHwSPqA3z3 34LF0w5ghT7o5D02XM/rri9TLZCXWja7vntqQkIaElYFGDaOP+LPMYWqHKEh0dvPV+YMGjKsxi9F2 FZzmjkTsg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl5jL-000177-TP; Fri, 04 Dec 2020 07:42:15 +0000 Received: from mail-eopbgr00081.outbound.protection.outlook.com ([40.107.0.81] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl5jI-00016W-SS for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2020 07:42:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nBIL0Cubgkm8+dmxOMubxLQdy3CQhIJF9AMLxEiZHgJKRWxpzVfrghNk3fEGJkqRX0jW6iBiAn0tgfFcLDDhay4E1qipgWIWCB84XGIVL4C/1BAO4VMFySAkryfEz6P3TH/V+rXEcj6AeN0jlAzegvTEA2A8rJKtPKPToCG+uKPE+JFdUwI6rouzdQA03jMm38yMqDqRmShTd/umQFnqJLyQoZTXsgd9x+/0kcryR33shKco2SrkH9bhr8WbMuDQJ5UKntk/ZJYon+rD0CEyNOhPenjnRQyfITFCA32gbi8ygzwtlhO/TrMwNBNj7OMHjibJW44b/zCIP4VdcVIViw== 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-SenderADCheck; bh=0GY+mPBR68leo2+CVA8zk7THF2LYgIVwEjfNNPnFlpo=; b=mSE0LAn2hWf2IEinQhFbJyBtkXkL/o6HakIxHpkBEE7tD9fLPJJrhfJsP3MXTit6Iem8adVrt1adJgFIrClhn8OIe0YJSrlo6ZD6ttMu9govIk9PrxaFdUnzZUtCkHfhDA6Hpk7gaLgTp4sRsp+Of0jkUguM98PaEDbgmNoXp2iK8iXNbqFHkzHH0C4WYKzXjTJTvgbaK73QRN7hYVcrcUKT7ORHueqk8muoohOCg8MFw5ZWfTETTHQZujh1+TIBckn3QSQmslLiCIHxjxow9SG0UglTwl16M1qS2TsnkG0IS/CQE10KCd/6dAhGgssXIY+45zbm2pPK+X6InA7xHg== 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=0GY+mPBR68leo2+CVA8zk7THF2LYgIVwEjfNNPnFlpo=; b=gND8LVV8q14yXv23uyG8TYoD7bQoSjNZRRA2XWl9yQMgQZUXI+mITqvMFTahwyG/ZyvfgFrwM6NSXt1V+pvEuvYF7RKNR4Eyq5lOU5uiEDzVDC5NU+4PNgx+x4idzlaWoUgsPvkf39SrBKYHRUiGdxb7EMUliz5Rm1eSknAEIoU= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB3983.eurprd04.prod.outlook.com (2603:10a6:803:4c::16) by VI1PR0402MB3421.eurprd04.prod.outlook.com (2603:10a6:803:5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.21; Fri, 4 Dec 2020 07:42:07 +0000 Received: from VI1PR04MB3983.eurprd04.prod.outlook.com ([fe80::dcb7:6117:3def:2685]) by VI1PR04MB3983.eurprd04.prod.outlook.com ([fe80::dcb7:6117:3def:2685%7]) with mapi id 15.20.3611.025; Fri, 4 Dec 2020 07:42:07 +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 Subject: [PATCH 1/4] drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_enable() Date: Fri, 4 Dec 2020 15:33:41 +0800 Message-Id: <1607067224-15616-2-git-send-email-victor.liu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607067224-15616-1-git-send-email-victor.liu@nxp.com> References: <1607067224-15616-1-git-send-email-victor.liu@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0098.apcprd01.prod.exchangelabs.com (2603:1096:3:15::24) To VI1PR04MB3983.eurprd04.prod.outlook.com (2603:10a6:803:4c::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0098.apcprd01.prod.exchangelabs.com (2603:1096:3:15::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3632.17 via Frontend Transport; Fri, 4 Dec 2020 07:42:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: db29b7c2-516d-419c-12f6-08d8982819d7 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3421: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /0+Yjp6pbosezozu9svnkWtxsc38PFDPxKhweML4r2T3abEK9+sLTf+1AdqpuODnc2n5Nv2q21HbnuoNMZQJ/qLu1S6SnRSe/yDCC/55ZJ9CrJrG2kN3AJiP2F51JHxaTwTPRoq3HTMQXUSuQq9gyoY7I8qnhyJSva7oK1owGPrA6rKbaP/HHNHT7zaaoi7k+63iSXOY7qX3P5mWKXh4J7KuVg9LA5MZOOOwe/vsNl2Omut2A9qCSBOfBO+Ntss9snnQ+nOCZ5xx+4PduPO/L7pBWm1rJBMjgD0hHz6UwakPM9KvZ3Zw75XYcVo6Tu4lklisyIwya2Uld9mi+Hgh2g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3983.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(376002)(39860400002)(346002)(396003)(4326008)(66556008)(6512007)(66476007)(66946007)(316002)(8676002)(36756003)(7416002)(2906002)(86362001)(6486002)(8936002)(26005)(186003)(52116002)(16526019)(2616005)(956004)(478600001)(6666004)(5660300002)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?XaRHinrqPGHBB3xEUalpgUwD/w4J+r?= =?utf-8?q?Pdjay4+DFWD72jrzCyT7bfTz2gixS2pgdsgD+n5Q5AXNxinyBlaA/+LQDLUYokx7G?= =?utf-8?q?4ZafnFpwc8wymg0fz7AuJzpj9nFayJahEtuXJDbwLset7jF56xWHUugD9vTSvEptZ?= =?utf-8?q?LTGezTCZHdn6DkbvS9AwCIqKjaVrs+OZA5e86um+4ZQQ7GKj1Y4QqBJy8o5v7bJtM?= =?utf-8?q?4s55Fz51mO3b3BW+Ihfr9YU8Uy7QW5yAlWLLMFlqh3nD5+FbhmKm0WdmJ+8jPFCp/?= =?utf-8?q?81CdRdcJDqubTXs4wume/vt6OE7gKbJfyrQS2lOnQNh47sB8Fe30n00ImFN0PMJ7x?= =?utf-8?q?SMPQbM2S5EFCI8NjEX7CHkShddzDt8WapF5D4cekEXnnMfjkV8cAmZHoYNBEfZmKz?= =?utf-8?q?LnWExAg0RjGykkMZcYSsIyY1DXtcUZv4QzPNQOGdNWa2UwBwLIjzed/zNw0Iw9BTp?= =?utf-8?q?wHJCdV8vVOk+NqmwXQ3YTDkhI3kkVIXFAgecnRwnyi+ST3J/55onn3SgZK8CbLmH+?= =?utf-8?q?JpIkEssTKFI3afYik0plZ863p33zMVpXBFWeW+MEPQzPigzNyL74P8MW4FQQHUYUe?= =?utf-8?q?xK6xK0kjqtzcnydxTsW5DgOMpTeYYCOXsG61HLB3lSk5AzQMu3ipqTQusoY1+5SxD?= =?utf-8?q?lMqCVq40oxz0Czh7/ZL8L89StmF2v8HXhMjupH9NpAfJYHuYh1TbndqUFVCjMf6Pk?= =?utf-8?q?VIayv09JfgXO50ssbzWmzUFD8nlN4TExS2BrEsbrO/MOTKUb0JCRexyypHSqOL+/V?= =?utf-8?q?f9bAnTN8BHifzOz5Y7UJy2EHbscmIyI/hg2IGtlbCftIW3XEWqfnIfHQ/LlCh6Hel?= =?utf-8?q?0Vssjlfa6Is8jJTC16YBGS/I4O+wFKvFDVLb/3AL6zSahqeTnofbfvwYc+6qduSM/?= =?utf-8?q?OjvQApeaPV24K0sdkGibJzq8JbcEFfGhfYDdY6Ejeh7iOnrz8LULsbalJswdfFlcw?= =?utf-8?q?dwFj+8bNqKDkdiNdNjG?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: db29b7c2-516d-419c-12f6-08d8982819d7 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB3983.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2020 07:42:07.5692 (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: 9xf7cy49ghIJzeGKpo9WfZIqKjKirSnTbumzD9Xt0a43mYesV3mn+snEM8rGIPA8h3uVZw+QNvgKmdsgh7kv/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3421 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_024212_975341_8824CEB8 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: martin.kepplinger@puri.sm, jernej.skrabec@siol.net, kernel@pengutronix.de, narmstrong@baylibre.com, airlied@linux.ie, festevam@gmail.com, s.hauer@pengutronix.de, jonas@kwiboo.se, kishon@ti.com, a.hajda@samsung.com, vkoul@kernel.org, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, daniel@ffwll.ch, robert.chiras@nxp.com, shawnguo@kernel.org, agx@sigxcpu.org, linux-imx@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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_enable() 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 Reviewed-by: Guido Günther --- 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 66b6740..be6bfc5 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -678,6 +678,12 @@ static int nwl_dsi_enable(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);