From patchwork Thu Apr 14 07:10:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D928C433F5 for ; Thu, 14 Apr 2022 07:10:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vVu6zp8wgsiW3wxGDzaJY2fmpj7fx4F+HvG9L0GbzMQ=; b=ns+I0QBX0PJtF4 2YEYEgLz593/vLDY23T78XdV4BtzfYp3LGQl16VCf9iBNLJzJOpQQwycIsfy3w6qbSxT/Sro44obZ 9TkbjxW5fE1Ay22DFGmFCm9cyowGSKT//V5+XOvAnNEnvnMx8TyDyGczsbB0pyVEl8QgUL3si/KBI 90R8wYQKOFS1I14c5a8lBXfFFyrMIN2D5TJDFsf0rmteoFOFyev29Lae/IlVYFk/NHbcP1tUNipJV eKDzj/cqEW2gOto3qfWviclZH1K+0C2/bvnoQsOQwvIus/BZXrBovjfg35dP2XcyPfAGxy18EAaJg WB32pgk7Zwm8eqi2ReLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbP-004G3U-67; Thu, 14 Apr 2022 07:09:15 +0000 Received: from mail-am6eur05on20606.outbound.protection.outlook.com ([2a01:111:f400:7e1b::606] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbK-004Fye-Q4; Thu, 14 Apr 2022 07:09:12 +0000 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> 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?q?buZ7puJRn3Zi2zwdj/QgqM7zQTqZ?= =?utf-8?q?0ahz1x0BfHvdXwWUPm8V3KaZsOzERgExXzcXAtkUbypjmkLee18mDqidDj8WTfLNt?= =?utf-8?q?cCR4lDYaNpJNXxw4CRTBmkBQRSBeAsjLmAfP3ZJMlHWwWxDcUsAX5IOhHms5qvTmq?= =?utf-8?q?lMd98Wn4tN7f5wlbXeC3wzFU/KIlFIdazp54FGnThW9WpTVAoWksng3UO/iuCHn8d?= =?utf-8?q?y1N1kJE6GF9mxXc1dmOyRaXgJOeFGe6VlRunBJMPzLZW+/BD+PTIFZtVuSGaZn5Nw?= =?utf-8?q?U62+hkyFql03v1TUh8jiMlogljOX5/HjHsUl75KLwgoF27IRn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bPSWKPw?= =?utf-8?q?Hnx5rCjDTeD6MtF/TBfsUTI5X2YJA4n8xAF6RK+NA0MHQMrz+5N+nwO4Uy68Fon74?= =?utf-8?q?K/zWU/dcsBV0TbY8XCczwGZSCw0K+Gg4ebBlHbY1F85B/TZWGA2QioAIdBiomFfhz?= =?utf-8?q?AjASGvft+rxjM10HlLv3Xvcd8U8cbqL989QfG3eWE1JAQz4VaNyJ7wse1vLFaOowL?= =?utf-8?q?Oi70pB1QeBnRhn1kuOFJDKBwbPfcZRNa+i9+McS4S86N++BB4bVp3AL30+HhRwBrI?= =?utf-8?q?6s5Jg39BNM4iDTfxl3dNbotwXxLR3zq0LfEYXvAuPKhgFoGgxdR0kVcG3t5652Ydk?= =?utf-8?q?0IGF02vvmbF1Kt3UmxeokxHlc5CuVP/+3JdPDvK5JnQPVMEox3HKWiDUFHgLbI4Bo?= =?utf-8?q?ttzSEg6JcCpOdnuGHRj8maZve/IIPUiDQohDaVyBer53BqC+4iOob9nRi8xEA1T8P?= =?utf-8?q?lz80c5qsuT7lDO+ovgUke2HogH5+bO7g=3D=3D?= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000910_881243_BF57A95A X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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_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); From patchwork Thu Apr 14 07:10:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B528DC433FE for ; Thu, 14 Apr 2022 07:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oT2fgPjPtIDcmQ+GMLOnPOirwJUGo7RTWpzJXYzXL1Y=; b=cgOivL2tw1drNy 84ffRf0h69unzAh/lBhXmdTw8MqGu87XrayyP8o/VrCP0jOTbz/RE4YXctH3NTmw5JXOBhdZIY7K8 hDvqQcbPKNlGTEqZlGK8Oz6/A3iRORL4JPLQMzkqZnSN6/+Us1mQKShizb7XC4WYA9kxYfHQhMK9G Yq7rgfzJb7dI6fxzMvBXqhxkAAibNjQPWWJMjSCQrmSZqMhjhIBKIPmmmG7TAO9Uf1DOSnofRUkNS q+8UnZRUyL7ZtyZS1V6jQ/ZvY+Ecc1BzrxAA0Kkpf4U2+KAROd7Gaze5P4jmzSImCvVYxnQOUGisM s/6EHLn495URvyAHgk9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbd-004GB4-5K; Thu, 14 Apr 2022 07:09:29 +0000 Received: from mail-am6eur05on20606.outbound.protection.outlook.com ([2a01:111:f400:7e1b::606] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbM-004Fye-P7; Thu, 14 Apr 2022 07:09:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kc53NfyL2UIIZnhyeYkTdovegj/BSylCcgqxcuLNSH7OWUg1/hdyoXU3s++3lzAtoCAeeyEeLmXfYt6nAnBYTq1at07aBJ3QkGxDzlECNGDPm8x7f2MCXHBwGpWbRNGon0NzZUG6U092noGWlSiL5IxS8/WvHli74BNjSl2XQ8bv3vmUqBBMaxyHApobZuMBDJ6bUgkI51I/VJj+nIy7HHvVXKQKXBqbSFHYNW9WvjzzvrjdiKOulavOjWN01fycUTNRqLf3m3z1QdJYdsurYGcrGd4vevzaQgtXD8Ww5poNAuWO5s8KixOhn+JISU5bGrhmvswkOUdtNjQKJjnkYA== 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=zikVNYi3cS+FrIsX3tOfjPXYjapqrG9gbDqBXBxuQPQ=; b=jcVebgU/DDUPtnQIbZ7I95X5rPHU6pYB3lymJI5kNod+4S0gkbfy/XmtFfPaC8cSB91tccgE1knUX1Utv/CMBsIULt+Q4fy8sCUShmd4yYHVXcHT9v4DA0Lg5Udki92KrRqgOBjpvTKDy7VbIDLShercJNbEuV8flUxdCW//gsSuKk7CHtYlKZ4ydYm13MDydguiQfddjFB9O5oPSA0evLzrDyJdYLQjXnRzLRuaO2/iSmhmAFH6YZYmsAHjRolqfbABrRiftjchHuk+qqZBaONLEEBiI8+LA4d5veYx7DQr7V7DlVdwdp6aHl9vilQqAqZhMnRJ0FzDUM7TgKHZNA== 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=zikVNYi3cS+FrIsX3tOfjPXYjapqrG9gbDqBXBxuQPQ=; b=s6ne/lnwLa79o4AaeJXpSXngLuCZvvXfpJwm6P13ysBoK6ry5KI33nU31duVoex1kYOMkoHICFlUwfmjClny7NJ1ePgCdO8xnsJTMRvdAK4mHphmdg5gS8Cl1+emLu2jt4+Fidzz0BUHeWjcAgcBubhrfrVl6Dz1l0m1CKtz0Eo= 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:09 +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:09 +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 Subject: [PATCH v8 2/5] phy: Add LVDS configuration options Date: Thu, 14 Apr 2022 15:10:36 +0800 Message-Id: <20220414071039.423271-3-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> 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: 4fc22ae9-9c6d-40b9-7895-08da1de5abf5 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: c8k4ZHvr9e8mt7JKbAplSYiHuA1t/+ItDbdk3avWVqLr9iDNJnnS3hcq1mP9nmsTIFGRMghOT8eQ9WdkT9kA4SaIafrMkHYyP1rhivwqjQwBqb0SKD9fJlqcjlqi6QvdSqeLzL2Y9/1Ngpji/i1NZPsgVpkHqp3sW8HF12XYqE1JwNFnsbzo2Gf/XhUP8gOsf+QDalb25eQwXUkp5ebktTImUxPI/VjvPhPVQfNRuNXnImyw094hnNJ5zENzUoZAwJWbH9HFFejLFIuptrltopET5QyOAkHW85i5lLtZlvrOOTTgO8KIV14btRFhlUKOMnigogScEEM8Gj8zQmyE5B1uY144myQ55MYjZeooL8BzKV6jsxmQQZi3Xl5nE9HR8+UQn8wG5KM8rx+4rhEGwPXIsyju4uRsBh3D6yP0azKAlJsZeY/0CMYZdvfAQtB/wa3ncUj8EMRJREVt7cl0GLDcxTcd3x1x9ysqxqfaHZzHX9Qh9GOkpQZ7urTE7xhCnlzk9oCt/gmYUQDpbFRUmlwsEYQuSWlukvz76xARUnRlrthmv8AB5Im0UwswlJKcNZZLoy4HJcWiWoR/m8L3GkMikfl2bQSyFXyzcsY1ImzzmaWtrIesmDpVv7EEEKptawL2qR8vDSZGV1J/HxuUYbA77WuRX431EOXshNp2hdcUiPRyv0oNKC1vAJntAKlfgqaQCsW1TodTgkNuRtU0nA== 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)(66556008)(316002)(66946007)(4326008)(66476007)(508600001)(8676002)(86362001)(2616005)(26005)(6666004)(6512007)(52116002)(6506007)(186003)(7416002)(2906002)(5660300002)(36756003)(8936002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eRBz+psjArZcniD5VQOrVRXhQZ12IUU2HqFq6DF2ljz/S9KYaQuU00hx9FjRmBfSlpEZWtbSMN2DlyCqFu5PG/eIOGMLLlYiInIKnjIBszMczxNps+VNeD65QPLM9bwuoJtfzygI+/LA9JgAuXmGlrIOmTlL8h5N72muHdSwuw2GgJVvquvwcekB0+IncsHCFhJ1u6tESf2BFB2+k+LcXLHfibmnPuY85e4yzeiBoYvEx5CRcVBh4oaMiXizuJ8NK4vAizieRUAMnI59BXWG5rFoOpq+1ln3LwcAogj4univkTfaA94M7MEoElqqcAGuKAR+k2tbaM9Znr/vE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sv9urUGYz4HWODD0PEXkYrT75Tn6DZ+hu9w9boW+H+wW8t1oKc55H6u9PmjSYRSfHJlVEPFRycrd7kTkW3DWZGYRvB7l8w0Y62WLEh5xWzm9lMF/e8WC2T+61u3w5LG0BA+AEry+NTVeq5NGuzSY3B5aujazhPdDsQ0eom9c9p+nSqNph4OUdTMDUpchCtBO77Iks7wOavkHX8ZkmGx73rn+/zH9aAoy7ogNpv50m+bBFBzqLHUUCGb/+vY8otORFTlKmcwRJwj66OxLqZZxty2XC/xd2ZgOSsQPjA8iquNsVLX+Ns4/Ep3G7eegoHtEdApY0xK8Ixg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc22ae9-9c6d-40b9-7895-08da1de5abf5 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:09.8709 (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: LVrZKrCYZ2Vbjp5IkuQVHeGDsdv9/RVT5fZ/B9lksi58+cuSDBsXy0krixUKRGlpvtw5fBpSQxDQYn2wLK6PGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6714 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000912_853606_BF7329C0 X-CRM114-Status: GOOD ( 17.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch allows LVDS PHYs to be configured through the generic functions and through a custom structure added to the generic union. The parameters added here are based on common LVDS PHY implementation practices. The set of parameters should cover all potential users. Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: NXP Linux Team Signed-off-by: Liu Ying --- v7->v8: * Trivial kernel doc style fix - add '*'. v6->v7: * Update the year of copyright. * Better variable explanation for bits_per_lane_and_dclk_cycle. v5->v6: * Rebase upon v5.17-rc1. v4->v5: * Align kernel-doc style to include/linux/phy/phy.h. (Vinod) * Trivial tweaks. * Drop Robert's R-b tag. v3->v4: * Add Robert's R-b tag. v2->v3: * No change. v1->v2: * No change. include/linux/phy/phy-lvds.h | 32 ++++++++++++++++++++++++++++++++ include/linux/phy/phy.h | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 include/linux/phy/phy-lvds.h diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h new file mode 100644 index 000000000000..09931d080a6d --- /dev/null +++ b/include/linux/phy/phy-lvds.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2020,2022 NXP + */ + +#ifndef __PHY_LVDS_H_ +#define __PHY_LVDS_H_ + +/** + * struct phy_configure_opts_lvds - LVDS configuration set + * @bits_per_lane_and_dclk_cycle: Number of bits per lane per differential + * clock cycle. + * @differential_clk_rate: Clock rate, in Hertz, of the LVDS + * differential clock. + * @lanes: Number of active, consecutive, + * data lanes, starting from lane 0, + * used for the transmissions. + * @is_slave: Boolean, true if the phy is a slave + * which works together with a master + * phy to support dual link transmission, + * otherwise a regular phy or a master phy. + * + * This structure is used to represent the configuration state of a LVDS phy. + */ +struct phy_configure_opts_lvds { + unsigned int bits_per_lane_and_dclk_cycle; + unsigned long differential_clk_rate; + unsigned int lanes; + bool is_slave; +}; + +#endif /* __PHY_LVDS_H_ */ diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index f3286f4cd306..b1413757fcc3 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -17,6 +17,7 @@ #include #include +#include #include struct phy; @@ -57,10 +58,13 @@ enum phy_media { * the MIPI_DPHY phy mode. * @dp: Configuration set applicable for phys supporting * the DisplayPort protocol. + * @lvds: Configuration set applicable for phys supporting + * the LVDS phy mode. */ union phy_configure_opts { struct phy_configure_opts_mipi_dphy mipi_dphy; struct phy_configure_opts_dp dp; + struct phy_configure_opts_lvds lvds; }; /** From patchwork Thu Apr 14 07:10:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4815EC433EF for ; Thu, 14 Apr 2022 07:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n5W9eNPQmbqtVn9afOnu8qRpEXjl01vzQ7x5LImH6Vs=; b=Ibiov5mKClnEmF DZGlHrLm+ibg9t9JfGvThd0w3X4QGYMIwar4ZvKzT1zmck8DWNP0fM1uOJO3OUZzsm1TqRuyE7nem E8XfKt/52heU91zUBweK1LZXsM3H/d82RmjynfdJxPbiIXXk1jln9nvcrMKwAntoJ5Lwzp/Scag2v nosy1A+sV0EH/B0tYQTEywPJ7kzTZ102u90ErUTklUBfK36i34BCnmQBEAPCVi0qwVJ9scfLtxwOx 4YUJ9+sSvCy5F/SyxniimJKBYd3fmQYduIdQqu/oGB1ht4JdpK1/pNx+uyyIRjhcoI1fL/on5FmYD 6q+89Q7cYNujsaCd1AwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netc1-004GMi-4N; Thu, 14 Apr 2022 07:09:53 +0000 Received: from mail-am6eur05on2062b.outbound.protection.outlook.com ([2a01:111:f400:7e1b::62b] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbV-004G61-FC; Thu, 14 Apr 2022 07:09:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTDZ1cCotbZd0IydRa/S2wTNipNbYDF5z9GsgvvnRzjjTxuggEhPFL2cOGsEp5O77c8nktdzOwd/+BAzd1d1LB+zES+hV8gnfyM6Fiqg/p868b6wRkW3NDau5OHihqpstxJ4o7gh/WNfl43L+xf3m6ettrYwLelWyY1tlehiL7R+0NpZcB1nUzc+EmWYD52za0msAlap7QHsctb8aiWVMURX6Kly3wYEdut5eQt1jzoGb9upuYBPvEmvxWhp6Yt/4LoAKFqRASVE/Ki584/FVnkU/WBWIvlnKbuAoeCmBdb6pSZ4Z/FMr2obsRZqIC2V6DQzBQfZIhCJJVJRnxMjCA== 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=J2oGElILzCk+igiUTrOVzfcg+9IEz0ALDeKTJRlftv0=; b=oVBKG9lfzKYiLoAaOzGU3bsw1OqtpE5QGOwzo9CkjxXD2jU5TMtInuPoFtH6uUAInhMV/Gkrbh2eNVeXCEqgcYTkdVI3Gbock5pmukwDnJy88LuVkacEFOtD/qCdPra1q8Hun9aPEgD7I17MxL7fLeYI05TdHgqJRoatDnxYPc6DpRa4ac3JGD5uQIq5dRpuM4mP10M5gh0ejF4Kkgk9M8f2w1u0eDe8LVAZMnxuf36U/gb+AD4KDscSv5VGCXNvHnJdejHqrdXDrr1dX4jpF4yOY1g6k7kQE60aWUNeJLxhrsHbbIFMtSt8PEj1ExjLeCZgzsLOF9jQ5tVl2Njd1w== 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=J2oGElILzCk+igiUTrOVzfcg+9IEz0ALDeKTJRlftv0=; b=E0rMaOWdOiZuXIiy8vZFLGScTMmEtjd4nD5h9yM/XiJMl7jtSDY77HZnQBW/dEvukqQ1X0GCHTtYXn7wl6wGT1gwhll9m3ie23fxJX0tWy9wi7BQ6mGVR8cSeObhDF96ddIrqdBPFIOp/w+FimUDqafb+c8UwsAZaZ8yizEdtrs= 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:17 +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:17 +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, Rob Herring Subject: [PATCH v8 3/5] dt-bindings: phy: Convert mixel, mipi-dsi-phy to json-schema Date: Thu, 14 Apr 2022 15:10:37 +0800 Message-Id: <20220414071039.423271-4-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> 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: 2a2d7bcc-db4c-4fad-865c-08da1de5b07c 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: qE9My7+/runUOCq5/SMZOCu4wIFby4/MlKm0Fe9okNN6IYCnL+1txMcWwQdwn8FA/u/2yAtW5z5T5qxYmNSXxN0HatmpbU+qTtyQMzUp4vXW8sFJVWJM7JGv5CHgtDCKE+u8nMZPF/1cLtY3FyflMnZKvbWuOLAnGhrHGIhLFta5pgrhvnIehUCR8aWw76T747U2XDEXSzaKHxsbnztumpKo8oPwBupqv+PFdzQY/LUgDlGMoXyvOtcemEoeCA1Dd6/LHBbJ1A6ErYUdgeWZKZY4yZxbXoiE8A6LH9/gC4MK7QHMkXucnRGAeevezv4wf78vmuHNyjr+6xnAUftOfaYNldLMhLHE3g5M917yUCGrQiS2Y2iXvslI8JBAL83n+/wr1JNGTCDE5JVSQ6JCViGr9Jsiomlc2Rbj5quBfx1jmsR2r/oiC9kOFL4rJAIeQIPje/GqEUFEPVQ/D81VNwLtxstxFuaN952synGCwWC/kZda+Rdym2Ykx43wlYMNs2JVM5nEDqzPKTYfKp2Lc8Oqn2xxjZhvg+FFCcaP83G9qQS3Xq4LYK0ctSwTWjlk1cYw1Uklew0ZSJizZg2MrNdEHIbC/5mcIphlJu35An76J3c0MNeBAJ1SbVHmGLPRUJRSHSn2+JCkILoEPzLzHeBplJ7OKZ2ouqFyBBhIYw0fDeY0n6hHST83NpBNi2OkUjwpRFtdzMXR3FDmxYXyoM1A0l1achCWwJ6Efnd28aNQJyPv+UvwOz4IEVvG05k82zWYHqIkX7x1ARg5gqTlRjwumuFbVaptHfFGoD1EYqQWu5xNiylyZq93ST6Eb3KCpkCXcUvzAv6XDrCDzBlQLw== 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)(966005)(6486002)(1076003)(38100700002)(38350700002)(66556008)(316002)(66946007)(4326008)(66476007)(508600001)(8676002)(86362001)(2616005)(26005)(6666004)(6512007)(52116002)(6506007)(186003)(7416002)(2906002)(5660300002)(36756003)(8936002)(83380400001)(66574015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?SsO4GANtyM5/Vvd8YUv8gQ65ZKJT?= =?ut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ua4IIKcTRniTuE6HLGgpSmZyVqcfz8pkE1h7UBeA5yUyel8+MaPx0NmdDqkW7lxTm?= =?utf-8?q?KDtgZL+D4j1HMdI4U5HKbKhYTxL87kW8AvaoWtRK7nc6WmpvnnMaPpi40OU5l4TJS?= =?utf-8?q?Mdf1OflEJ283nhK5NpZGLkBTqA3liF8rkmuyu5qKM88UoB+8mgVc/INMYb1tUpeAy?= =?utf-8?q?QcNJTVIC4841E0tO5X5kaksztRyXn7fKt60Sgz7Rn3DRtFxPe9dm1BBQMk88DlSQJ?= =?utf-8?q?W6IpiuM6ith0n9QJxAO6x4XwZVqqk3BUvtZI/YpLCccp1o2gzleUBT4Z8aTHnILMi?= =?utf-8?q?leBlwZkhoK9uO1jrjaXkEKRp6jZwt9rpndExh7yZTSeDtD7C8WyAyg3f+7cx2lrpr?= =?utf-8?q?Q/rVQBga/YrpdwQ9Dc01vr4wKhXEJ/kE83oXmIUK0ifo/gDUrb8nEl8U1xPYuiwAO?= =?utf-8?q?Mh626M4OAjKvtS7V1QckZZSsz2U5rnBNpFsyB7Kfxrj/4T5dHhB1kYYilEDYyrnSJ?= =?utf-8?q?fH5ncpi8Bo/ud5rs2jQqY0Pzhb2reLlhqyv6uWrpzPHTl2XAvDxVmfERuuLkcKGGe?= =?utf-8?q?twZ2aN3iFt3SXrTAA+bS4t/Auk/CLAyTEsHf+xPwoq98CyO9m4gwbfvljzRLvQ2Wv?= =?utf-8?q?qcsUC660adE6w1DW+N7XuGleopdExvPt4qOvBtcOrLNMM4dwkAoArYcx4hJSZlPiv?= =?utf-8?q?nBE2CAuGzd3uf2JsApLBtwGz78hN/dlyoOQNEHjVbxpp7c6n8e8VJGRLQciqDyG1F?= =?utf-8?q?43t8C+KaXRu9O8eqt2pBNQhs3OvGCC7A=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a2d7bcc-db4c-4fad-865c-08da1de5b07c 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:17.3888 (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: sbCC5JmQ1gSmWSGMYgUYd4lph0heVRfW4Qc0uWmGlNFoOZxspTuhg9pr4bfZmziKpM34NrH9tMHUHllfxYTc7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6714 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000921_594812_F2CA45A6 X-CRM114-Status: GOOD ( 16.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch converts the mixel,mipi-dsi-phy binding to DT schema format using json-schema. Comparing to the plain text version, the new binding adds the 'assigned-clocks', 'assigned-clock-parents' and 'assigned-clock-rates' properites, otherwise 'make dtbs_check' would complain that there are mis-matches. Also, the new binding requires the 'power-domains' property since all potential SoCs that embed this PHY would provide a power domain for it. The example of the new binding takes reference to the latest dphy node in imx8mq.dtsi. Cc: Guido Günther Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Rob Herring Cc: NXP Linux Team Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v7->v8: * No change. v6->v7: * No change. v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Rob's and Guido's R-b tags. v2->v3: * Improve the 'clock-names' property by dropping 'items:'. v1->v2: * Newly introduced in v2. (Guido) .../bindings/phy/mixel,mipi-dsi-phy.txt | 29 -------- .../bindings/phy/mixel,mipi-dsi-phy.yaml | 72 +++++++++++++++++++ 2 files changed, 72 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt deleted file mode 100644 index 9b23407233c0..000000000000 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.txt +++ /dev/null @@ -1,29 +0,0 @@ -Mixel DSI PHY for i.MX8 - -The Mixel MIPI-DSI PHY IP block is e.g. found on i.MX8 platforms (along the -MIPI-DSI IP from Northwest Logic). It represents the physical layer for the -electrical signals for DSI. - -Required properties: -- compatible: Must be: - - "fsl,imx8mq-mipi-dphy" -- clocks: Must contain an entry for each entry in clock-names. -- clock-names: Must contain the following entries: - - "phy_ref": phandle and specifier referring to the DPHY ref clock -- reg: the register range of the PHY controller -- #phy-cells: number of cells in PHY, as defined in - Documentation/devicetree/bindings/phy/phy-bindings.txt - this must be <0> - -Optional properties: -- power-domains: phandle to power domain - -Example: - dphy: dphy@30a0030 { - compatible = "fsl,imx8mq-mipi-dphy"; - clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; - clock-names = "phy_ref"; - reg = <0x30a00300 0x100>; - power-domains = <&pd_mipi0>; - #phy-cells = <0>; - }; diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml new file mode 100644 index 000000000000..c34f2e6d6bd5 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/mixel,mipi-dsi-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mixel DSI PHY for i.MX8 + +maintainers: + - Guido Günther + +description: | + The Mixel MIPI-DSI PHY IP block is e.g. found on i.MX8 platforms (along the + MIPI-DSI IP from Northwest Logic). It represents the physical layer for the + electrical signals for DSI. + +properties: + compatible: + enum: + - fsl,imx8mq-mipi-dphy + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: phy_ref + + assigned-clocks: + maxItems: 1 + + assigned-clock-parents: + maxItems: 1 + + assigned-clock-rates: + maxItems: 1 + + "#phy-cells": + const: 0 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - assigned-clocks + - assigned-clock-parents + - assigned-clock-rates + - "#phy-cells" + - power-domains + +additionalProperties: false + +examples: + - | + #include + dphy: dphy@30a0030 { + compatible = "fsl,imx8mq-mipi-dphy"; + reg = <0x30a00300 0x100>; + clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX8MQ_CLK_DSI_PHY_REF>; + assigned-clock-parents = <&clk IMX8MQ_VIDEO_PLL1_OUT>; + assigned-clock-rates = <24000000>; + #phy-cells = <0>; + power-domains = <&pgc_mipi>; + }; From patchwork Thu Apr 14 07:10:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D6DEC433F5 for ; Thu, 14 Apr 2022 07:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=raSJJ0uYn3+oW8KyA225oAj5WSROya1Y6MtweH0yP5s=; b=lACZ9UW5nHMP6m vTym87lRGLtoVPA69XknZoTPLuumJ8lhFZlFAm1rdyJKuu2Kej/3DL2EYQI6Ir23EnXX62AntINNp MzbFLIdpMJdDGmns2tbrdxyIwzbfPn4X/qwhlu8/exwg40i7OW3a+0IOFLz+Ye2/v98+sCWccRrxf GjGfHCldAQz7W0SRqt5YTjZWxc/njBe7QAbpuWtRelU/FlEqrN/Y/KPnqDnR9f1eIb+vfmJo6im+6 NsOrHlkdeM9fFlh+uO5i5lRpBxJIlGO1x+mCb5wXfC/I+pH8ZlFfbWuVT5y2Co33ZDdNX6sNvVT6C 57kstI5xNrKXFh0cn5sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netcN-004GW3-2k; Thu, 14 Apr 2022 07:10:15 +0000 Received: from mail-am6eur05on2061e.outbound.protection.outlook.com ([2a01:111:f400:7e1b::61e] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbk-004G9b-HS; Thu, 14 Apr 2022 07:09:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxejaADVjmaztHg4K01nldj/1D95T3Xx6sYB5TAesAvLp4R4XwWxX4b1YciU6bTCYNEhoigOuGXE+eH3MH1keSdSUxmXhmKSgkAQq4iMbX2eHQFtRFuMVy7AXsuwjeGtJluaW5VJRYJJOEbAC6Yl1FLwLYUbzeSI+bi+z00MWN8uM7K+/zCKV77ltR88JpCjhBN8tK7XwIPyy1yNdAC2HS+f8oBnBmreUjFJo7E6UqrFPTIExhdcwpIKVLn75Z27zpR5zV0Vkv5z+b0xNcv/mQHMnGnQf3A1dAVFjg1X2yimVfMI9XH6nq7IGoMUmsnt03GA/6luty1mnpLUNFU2mw== 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=bwVgVujLCDokFEM7c0bPtR5ihAMPkZO/ohpa4ZORM/I=; b=LG1p1feeDa4tEImtL1mRI/iXTAz4ErpW/tDqUsoX7jS+ccmBWYouGsHlNQBnpxcrdiN5u6TMWgzVCyh94RP3rH3QD6k4O3GeV1NiOqp6SUKiQR/6hm1HIANZV+c5DwNAt0+8ud6vncW9XcEO8dNLEwhg4gfgB7j6V3pqETaKbyIdz9bZFTi0ZcXNUjD6bL34OI1LLYHIswa88tpcNju4N36rcDIXUObe3ErB4ly8v33dByVLRIz62gjAnH4ven9v3ZPd9N/JoNgEahYgIFDboommCMljnwXHD50LlUT+7DyQEELRyeh6guVMFeFfUMEU4drFXWPA36Mo7xt4r8rO2w== 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=bwVgVujLCDokFEM7c0bPtR5ihAMPkZO/ohpa4ZORM/I=; b=DRpGXdGRUv7uZzQMEEuGBCcYaBZceTtxAd0+uaI6Om0PcZq0vKICvlk6HsZJCdBSX0kPrJkrMQMbJmL1DCBOJh1AsG1ab6mf8LGMMJVBl11Oou3OY2xoDsQfTsS0b0ANV4gcc8fmayFPK+wuWlejnz38YONPHdlLa7TKKFYarNw= 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 AM5PR04MB3027.eurprd04.prod.outlook.com (2603:10a6:206:b::14) 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:24 +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:24 +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, Rob Herring Subject: [PATCH v8 4/5] dt-bindings: phy: mixel: mipi-dsi-phy: Add Mixel combo PHY support for i.MX8qxp Date: Thu, 14 Apr 2022 15:10:38 +0800 Message-Id: <20220414071039.423271-5-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> 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: 193c7933-d7ec-40f1-d10b-08da1de5b4d5 X-MS-TrafficTypeDiagnostic: AM5PR04MB3027: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: 8gSz5/KyecXHYKcsl7nMpCQ0wXTRZjIVqrQ4jtOkGm+VB1S0JHUjZG01Vkv6oRsLdf1IKISNZLHFYphovH4L5JLOZKjaNVaX70Smm/8qFjjhy9vwAE4y31obbPUep4JXFPXsR6XYHQBPsxU3wObYDJyAZl1CDKVobgnaXKfW5aDGiXbS58nvaA2vt1BlqdTTO6kXRGqRPvOBTZd9n5P+04r6n/fIOgRqueEvtZsNjuo7tNY7GHNM0zFN+lH4rc+iWR1hFaowYlRNW9JxibHAkW88MvfEm7TBoj087vZ14qYsLRj5ua3WdqELPcMWDKwP3VmShYyR2Psc+0OydoR/sX+uhZCubrxVqTEvdhEAxA7t3+iHjkKOj9iMj6PzE/AefZtasZ8/YNVeaADSLoYJx3oHaD8jhKw8oHoE8rFwSU7AE9K07ZDMixKi6pfBaca7CV17kQceA+FOPpvbBWrut2eyvMKFhRkFc96Y3tbr9VdSme0MbtPBwNW6FiNBtxFN4gzSpB8DqWbdK/oAgbVLXvQgPQE1Vx7Z65R281E9auo8pkPchFgIduacFWXLFKpJlmX63C6v1um7Q0gpjB+N65w4RjZXFThpqxcKLdJDEwOquoOF1NM42IMw9t/fSR046yQ0E0X4gi6pymTMDNdKViuHhCPxKTRiFwEdMyi/sAXtwARTleyv2GXm5ngdAzbQXjuuHHrMiqybwDvJLu07Bw== 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)(2906002)(6666004)(316002)(8936002)(7416002)(66476007)(4326008)(508600001)(8676002)(66946007)(36756003)(38100700002)(38350700002)(66556008)(6486002)(83380400001)(52116002)(5660300002)(6512007)(2616005)(26005)(186003)(86362001)(6506007)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lBbpnIVFa2P7Oevvwzb0K4/BY1MA?= =?utf-8?q?00ka3hHI3Kau+BHjnYmYIkuZ0eA8bCm7wSuZ/7jZ/ZMup1Y4UNRpvVS6saAdX/wQF?= =?utf-8?q?owXzA3wPF3NKCqRlPnLHVSLxLwUMG9wYmXSyqpEP+wp9pg2pmvlQJdojYF34q0qrA?= =?utf-8?q?gmP9lUdTGM+RmUf86HgXeGiBiwNhi1MuX8eT2znX1LxNkfE5lOxitWYvQkiRsiqBu?= =?utf-8?q?+CmsmUFW5vMitgm2vW/JIklizoDLr0V5J0fkJUAD87PeQLLXG3g4lz2IFUq1dLRhc?= =?utf-8?q?gvzwzUDFdnfNezYk04TtBS5BJ/9BQMmBvN8zHrZYWEYSPyQ2/nI2E2nP1fmUjV58e?= =?utf-8?q?+74yZYUEh9AzWm8ujXYYbctS3CMe1baD43+VpHKhDrtgveNgqU/aFVo74QhQ9t4ez?= =?utf-8?q?eeQSsFAlQ/MRDBuTcRMjK3IEyTgPanHPAzuK2+IVcjx4AbfalEe+aqrl0fzTr2MQ4?= =?utf-8?q?8l0juy/e/Q3VmtuaYwUy3be/gl1X33ehYHZ4gAXjHLArH45n1ORX/lkti939XE7dg?= =?utf-8?q?K8iTCPoCd0rGdZqOunzmGl3eJBfN1t9LVkwP5gg5NUWSCKPGAXZ7c67vCBEb16tMR?= =?utf-8?q?pjOFIth2ANwT1bCc87wfiT1RrOhJ9AdundlCvzJMfKhr86sOIlNV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87op1KJVDaoiNrwbL?= =?utf-8?q?SVsPebyYpevfAlmp2XS76tjf1qGz6vZ/Jm4cezIt5QSPzcs7w44Er9bKYGxnSIvKW?= =?utf-8?q?CpLCSzL9+iYY8GEJA32+efg+uwFfDkbWnTyDW+chof4+k1OwJTzSSEF8mpYkHNb18?= =?utf-8?q?biu4+lFaufFLK6g0zJSkwawSMZtDgyfw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 193c7933-d7ec-40f1-d10b-08da1de5b4d5 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:24.7630 (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: 1GG83gnQLk1XZ16Y15mpwuE58I/JDK7aFjEORqkYQtH6EFObaFi5Y+ZltdUXwdV2+smxfQ+Xg1pxtczMThwZ5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3027 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000936_613787_283F2806 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for Mixel MIPI DPHY + LVDS PHY combo IP as found on Freescale i.MX8qxp SoC. Cc: Guido Günther Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Rob Herring Cc: NXP Linux Team Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v7->v8: * No change. v6->v7: * No change. v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Rob's and Guido's R-b tags. v2->v3: * No change. v1->v2: * Add the binding for i.MX8qxp Mixel combo PHY based on the converted binding. (Guido) .../bindings/phy/mixel,mipi-dsi-phy.yaml | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml index c34f2e6d6bd5..786cfd71cb7e 100644 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -14,10 +14,14 @@ description: | MIPI-DSI IP from Northwest Logic). It represents the physical layer for the electrical signals for DSI. + The Mixel PHY IP block found on i.MX8qxp is a combo PHY that can work + in either MIPI-DSI PHY mode or LVDS PHY mode. + properties: compatible: enum: - fsl,imx8mq-mipi-dphy + - fsl,imx8qxp-mipi-dphy reg: maxItems: 1 @@ -40,6 +44,11 @@ properties: "#phy-cells": const: 0 + fsl,syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + A phandle which points to Control and Status Registers(CSR) module. + power-domains: maxItems: 1 @@ -48,12 +57,38 @@ required: - reg - clocks - clock-names - - assigned-clocks - - assigned-clock-parents - - assigned-clock-rates - "#phy-cells" - power-domains +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8mq-mipi-dphy + then: + properties: + fsl,syscon: false + + required: + - assigned-clocks + - assigned-clock-parents + - assigned-clock-rates + + - if: + properties: + compatible: + contains: + const: fsl,imx8qxp-mipi-dphy + then: + properties: + assigned-clocks: false + assigned-clock-parents: false + assigned-clock-rates: false + + required: + - fsl,syscon + additionalProperties: false examples: From patchwork Thu Apr 14 07:10:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82B80C433F5 for ; Thu, 14 Apr 2022 07:12:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=szyKXqN1VrZhQvzTi3U05+rogs7yuKwQjgFgo4fkENs=; b=xtU2/j1DDF3Trc cc81xDnD3ErpAgFLQ1GQN7IkjPX7gN73MyUVaxeHqS6JIURxE3HT5U6sVoQ0UCKhgPL8NP8w3JXyd QdILB26zVsbyZ9FCDK+vLeUMhEdjdJ1WJvNmCk06UuubT8vDjIISeW2ZWbESa92lqTwa/ZseJiaKg XGOPQ2yEoL+CdcD9COpXlgFWI9ueNcl9EIkVhnpLWzExxZKTwaGMddUhzwyBjUXfQhU9a+dBOc2bh +IGzDYZEXUtC19a/tM7al+JoUWrWtPjOO4fLYGD9A/oh8twFJ8GnqpLYrizXUMWAjQQb0FsyrFI07 /2jvwKlvWzbfqRaCgKCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netcp-004GiS-IE; Thu, 14 Apr 2022 07:10:44 +0000 Received: from mail-am6eur05on2061e.outbound.protection.outlook.com ([2a01:111:f400:7e1b::61e] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbm-004G9b-QX; Thu, 14 Apr 2022 07:09:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pr5uYfoSaBf1QdByodfh/vfKeIxcsNTjf6rQiJAWogrL7Her0Im/omOONJAYF59ncS3TKFkDa60i8TjutvQDdF74iK7H4U5BWDzHRBOcdM37yW0Lvccz6V283T/9XfTxntcTCdpF0VvavxoiX5ApNvf/sgWl4sorww+xup5d4PouUGlkNj7thcFcW8YUo2FaFSqNUqmNY0bPYRs5BczSjKWgKyGDLJEJrpne+9kyhyhsQqCuwpnDJEigBcP//+ftRgmOKdLf4GKCSac6p4bGlMYhucqCeJnILefaTj+uBp/HZyStjbKvnjuzPPeayH4EhxU3oLuwEXnBRp/sbVDF4w== 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=0L4vMIUf1mDanswpJo8fhPsQYyiOeSJQ+w6SBa7SJpo=; b=jqo7KkJ0TLJ/Dny2WltxeGKYw8BXpGUlHU24ZvpYUy5K2x2MmEYw1yrPyDMB8zBizKvwfg0FRjOOqXj0nMX1XK5hGIMMETSIBeONn5jgK/q0jkHHwjjNgP5buX0EFPHDsSnnnZuuDty7gGsRZTosB9PUTl2hknNNin402u29lUCbrALFj4dUxhxP68Mn5bCjNkKqy9fCDqOcWXnhf6zR1GRmc7EOWg62TDc4WFWgmGje8uiHvH4Am3opwRliGoKdYlHMaaepMDat5J2gZxucwb0VefVTTIdH1N2amG/4KSm8q47/nPAFkbeiohWm183MIfc0SziWehSk1DX/PwHWmA== 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=0L4vMIUf1mDanswpJo8fhPsQYyiOeSJQ+w6SBa7SJpo=; b=f0CJA6bzdNcM4Ct7ZC5N1RXly0heC5qZZ0LA6b3mTdaAOuwhslHEXrMSjJSwpoQX+ZMGoMtk/UjymuN/WjuXO+O2q0jjLFtF4N/DCESV4jtkAWjuWYXAUoUL42TbFjR+WRiIDPcD/csA6t1Zf5rJmA9hLsZWGppVJtUWtEmvclU= 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 AM5PR04MB3027.eurprd04.prod.outlook.com (2603:10a6:206:b::14) 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:32 +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:31 +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 Subject: [PATCH v8 5/5] phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Thu, 14 Apr 2022 15:10:39 +0800 Message-Id: <20220414071039.423271-6-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> 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: 4231c9ce-e569-4f99-c831-08da1de5b917 X-MS-TrafficTypeDiagnostic: AM5PR04MB3027: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: 71+iB3LFxeml02siSB9JJMbxXqAcA7flVoLuhYqItQX8IsTSSC67j/4123JW2cDYEhAqQdnAa5IFML32wr6Xy7MhGrmyHNGzLU08G8xf4SexaOQ83FD+c8XH43URpVx9bOPX2PwaeWlkJRhDtJ04NTYO0QCPpfgLBZwAE51qeRojyks4/Zb8VDcMOFNf8/PcLW2bY0qC3ab/8azTYFheR5sI1EUJl150g1l5BRw0D5KL8BdIarPp4TBlfGF1kKd4EQUg8OKDjowhi+mZHJXlhJ1YxbzMcHDtQmFw+ioZal9aTinUrveRk2Hv86o2IwbCCjBGlPoKpmLYeLhIMAwrBvipDn9qaMW4rNymRB4ZXchgNmmt/HbMHtRHrubulebTsJsgqAEWxHMCkq/xJXPFwB1IvhcHgdUf33CJOEIJHj4gkAAqTGZW0cDQoFy+ZJypQGnkPYPy6deHVi6zcm7Vjn6qj/l+1rozr0oiNPyQePhW5alc2xEidA+wWqRDoTJ4vdu+wrpD4oiKRRCVOR5H6zTicCKNFtyrD3sVLC8eJE+JDBX3CRDsM8f6/DYGifcX3nTqr4W/+kOwJYM8N1101V/KgZWBqvH3cOkpPsyVWI/yDsA4Ky7CTMrzbHA5b7Csf/P0kmWvujwg2OM/LydUwygUHC1mdmM3gg6MfRXd4ArqmferDW00W7Y0Y34Uxb+Q3lbDJUVtETA6c7mG95AvcA== 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)(2906002)(316002)(8936002)(7416002)(66476007)(4326008)(508600001)(8676002)(66946007)(36756003)(38100700002)(38350700002)(66556008)(6486002)(83380400001)(52116002)(5660300002)(6512007)(2616005)(26005)(66574015)(30864003)(186003)(86362001)(6506007)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?oJjTmmkarnwaO3PytcvLC5QXbMuN?= =?utf-8?q?OJI3zWpC7YvQm1GMTkYLjJyzz0EAUZ4s9AwzYEZUMvZxU1snI8RTIQ09ut/Vv7S6B?= =?utf-8?q?86PhqeMmY5FC1HUlttK6YrQUF5mo4ajypcir46WPN7cbN4BaBgcroJrgtaDpnm666?= =?utf-8?q?Qhmkwy/eW+XDBSTh2X8Wj7ejiZWOSpQvljL3Ad4sXsyDH2ixoHD80s26uRKudTizD?= =?utf-8?q?SxIKoQj2PRBXlqeHxH2ae2JL6HpB6dnMWIuUyc51AQvrfhWfaaPpQB8tPnXdLDEwA?= =?utf-8?q?ySHuAo5wBQIIhUlIS3s7z2Vjw8GG/mRmLK4FqT6K0uXU1Os/47G7Dr1x8+NjbKhNM?= =?utf-8?q?ehNXkKeVVI0EU2m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b3JW1K+00FMUpYH90LBDZDOxSIKE8LtZVGjFQrapJ?= =?utf-8?q?G0SwhTvTK5L8Y+1UoEPgahMxqgQsiyWeWNRAHLcPJzUq6d/Erl4OHNpVxRHpG+qKh?= =?utf-8?q?cTrVlZdq+QuJ1zpb3eX4OBlbcXUSpIeFwuOcMR8KiwCQHVzW0x10MA2aNwtz1YPu5?= =?utf-8?q?SQI9DoodfuXEe3Q79WmjczxH3vzYjF7HbcNFN7gmSPTSDNoIeSohd5eCV6grmY2lz?= =?utf-8?q?Sx+WIQZ6mng5l1+BSVaMrt82f7H+CI+73JuHzJ13gxVvRInPPdr2fluXfN60p0A8h?= =?utf-8?q?PF2cW39FVUuVBg86Y4YdqZ+YMANIIrN/a5VDZCMxirKiL2eBnN+D49m1W0OJiGU+C?= =?utf-8?q?uegpnCKROkdk1a1aGERarmP0IYmVvZVACFB4auNZvayW1UeV/1CiSi1SOeLZlC92x?= =?utf-8?q?j9IGug6w1rvmIiTdo5iM6jlyX55VMkzA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4231c9ce-e569-4f99-c831-08da1de5b917 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:31.8905 (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: Oig5/gaXJnSAFwS/uQdpnU9GlM7Uj84eAFpdaF4NVwewUu/oUB8nCK4gPtZvg752AdEDpb6wTlFbvM8ojY0/kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB3027 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000938_963782_3DEEE4F4 X-CRM114-Status: GOOD ( 21.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX8qxp SoC embeds a Mixel MIPI DPHY + LVDS PHY combo which supports either a MIPI DSI display or a LVDS display. The PHY mode is controlled by SCU firmware and the driver would call a SCU firmware function to configure the PHY mode. The single LVDS PHY has 4 data lanes to support a LVDS display. Also, with a master LVDS PHY and a slave LVDS PHY, they may work together to support a LVDS display with 8 data lanes(usually, dual LVDS link display). Note that this patch supports the LVDS PHY mode only for the i.MX8qxp Mixel combo PHY, i.e., the MIPI DPHY mode is yet to be supported, so for now error would be returned from ->set_mode() if MIPI DPHY mode is passed over to it for the combo PHY. Cc: Guido Günther Cc: Robert Chiras Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Reviewed-by: Guido Günther Signed-off-by: Liu Ying --- v7->v8: * No change. v6->v7: * Use marco instead of magic number for CCM and CA values. * Suppress 'checkpatch --strict' warnings. * Check !opts in mixel_dphy_configure(). v5->v6: * No change. v4->v5: * No change. v3->v4: * Add Guido's R-b tag. v2->v3: * Improve readability of mixel_dphy_set_mode(). (Guido) v1->v2: * Print invalid PHY mode in dmesg. (Guido) .../phy/freescale/phy-fsl-imx8-mipi-dphy.c | 276 +++++++++++++++++- 1 file changed, 265 insertions(+), 11 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c index a95572b397ca..e625b32889bf 100644 --- a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c +++ b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c @@ -4,17 +4,33 @@ * Copyright 2019 Purism SPC */ +#include #include #include #include +#include +#include #include #include +#include #include #include #include #include #include #include +#include + +/* Control and Status Registers(CSR) */ +#define PHY_CTRL 0x00 +#define CCM_MASK GENMASK(7, 5) +#define CCM(n) FIELD_PREP(CCM_MASK, (n)) +#define CCM_1_2V 0x5 +#define CA_MASK GENMASK(4, 2) +#define CA_3_51MA 0x4 +#define CA(n) FIELD_PREP(CA_MASK, (n)) +#define RFB BIT(1) +#define LVDS_EN BIT(0) /* DPHY registers */ #define DPHY_PD_DPHY 0x00 @@ -55,8 +71,15 @@ #define PWR_ON 0 #define PWR_OFF 1 +#define MIN_VCO_FREQ 640000000 +#define MAX_VCO_FREQ 1500000000 + +#define MIN_LVDS_REFCLK_FREQ 24000000 +#define MAX_LVDS_REFCLK_FREQ 150000000 + enum mixel_dphy_devtype { MIXEL_IMX8MQ, + MIXEL_IMX8QXP, }; struct mixel_dphy_devdata { @@ -65,6 +88,7 @@ struct mixel_dphy_devdata { u8 reg_rxlprp; u8 reg_rxcdrp; u8 reg_rxhs_settle; + bool is_combo; /* MIPI DPHY and LVDS PHY combo */ }; static const struct mixel_dphy_devdata mixel_dphy_devdata[] = { @@ -74,6 +98,10 @@ static const struct mixel_dphy_devdata mixel_dphy_devdata[] = { .reg_rxlprp = 0x40, .reg_rxcdrp = 0x44, .reg_rxhs_settle = 0x48, + .is_combo = false, + }, + [MIXEL_IMX8QXP] = { + .is_combo = true, }, }; @@ -95,8 +123,12 @@ struct mixel_dphy_cfg { struct mixel_dphy_priv { struct mixel_dphy_cfg cfg; struct regmap *regmap; + struct regmap *lvds_regmap; struct clk *phy_ref_clk; const struct mixel_dphy_devdata *devdata; + struct imx_sc_ipc *ipc_handle; + bool is_slave; + int id; }; static const struct regmap_config mixel_dphy_regmap_config = { @@ -317,7 +349,8 @@ static int mixel_dphy_set_pll_params(struct phy *phy) return 0; } -static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) +static int +mixel_dphy_configure_mipi_dphy(struct phy *phy, union phy_configure_opts *opts) { struct mixel_dphy_priv *priv = phy_get_drvdata(phy); struct mixel_dphy_cfg cfg = { 0 }; @@ -345,15 +378,126 @@ static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) return 0; } +static int +mixel_dphy_configure_lvds_phy(struct phy *phy, union phy_configure_opts *opts) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + struct phy_configure_opts_lvds *lvds_opts = &opts->lvds; + unsigned long data_rate; + unsigned long fvco; + u32 rsc; + u32 co; + int ret; + + priv->is_slave = lvds_opts->is_slave; + + /* LVDS interface pins */ + regmap_write(priv->lvds_regmap, PHY_CTRL, + CCM(CCM_1_2V) | CA(CA_3_51MA) | RFB); + + /* enable MODE8 only for slave LVDS PHY */ + rsc = priv->id ? IMX_SC_R_MIPI_1 : IMX_SC_R_MIPI_0; + ret = imx_sc_misc_set_control(priv->ipc_handle, rsc, IMX_SC_C_DUAL_MODE, + lvds_opts->is_slave); + if (ret) { + dev_err(&phy->dev, "Failed to configure MODE8: %d\n", ret); + return ret; + } + + /* + * Choose an appropriate divider ratio to meet the requirement of + * PLL VCO frequency range. + * + * ----- 640MHz ~ 1500MHz ------------ --------------- + * | VCO | ----------------> | CO divider | -> | LVDS data rate| + * ----- FVCO ------------ --------------- + * 1/2/4/8 div 7 * differential_clk_rate + */ + data_rate = 7 * lvds_opts->differential_clk_rate; + for (co = 1; co <= 8; co *= 2) { + fvco = data_rate * co; + + if (fvco >= MIN_VCO_FREQ) + break; + } + + if (fvco < MIN_VCO_FREQ || fvco > MAX_VCO_FREQ) { + dev_err(&phy->dev, "VCO frequency %lu is out of range\n", fvco); + return -ERANGE; + } + + /* + * CO is configurable, while CN and CM are not, + * as fixed ratios 1 and 7 are applied respectively. + */ + phy_write(phy, __ffs(co), DPHY_CO); + + /* set reference clock rate */ + clk_set_rate(priv->phy_ref_clk, lvds_opts->differential_clk_rate); + + return ret; +} + +static int mixel_dphy_configure(struct phy *phy, union phy_configure_opts *opts) +{ + if (!opts) { + dev_err(&phy->dev, "No configuration options\n"); + return -EINVAL; + } + + if (phy->attrs.mode == PHY_MODE_MIPI_DPHY) + return mixel_dphy_configure_mipi_dphy(phy, opts); + else if (phy->attrs.mode == PHY_MODE_LVDS) + return mixel_dphy_configure_lvds_phy(phy, opts); + + dev_err(&phy->dev, + "Failed to configure PHY with invalid PHY mode: %d\n", phy->attrs.mode); + + return -EINVAL; +} + +static int +mixel_dphy_validate_lvds_phy(struct phy *phy, union phy_configure_opts *opts) +{ + struct phy_configure_opts_lvds *lvds_cfg = &opts->lvds; + + if (lvds_cfg->bits_per_lane_and_dclk_cycle != 7) { + dev_err(&phy->dev, "Invalid bits per LVDS data lane: %u\n", + lvds_cfg->bits_per_lane_and_dclk_cycle); + return -EINVAL; + } + + if (lvds_cfg->lanes != 4) { + dev_err(&phy->dev, "Invalid LVDS data lanes: %u\n", lvds_cfg->lanes); + return -EINVAL; + } + + if (lvds_cfg->differential_clk_rate < MIN_LVDS_REFCLK_FREQ || + lvds_cfg->differential_clk_rate > MAX_LVDS_REFCLK_FREQ) { + dev_err(&phy->dev, + "Invalid LVDS differential clock rate: %lu\n", + lvds_cfg->differential_clk_rate); + return -EINVAL; + } + + return 0; +} + static int mixel_dphy_validate(struct phy *phy, enum phy_mode mode, int submode, union phy_configure_opts *opts) { - struct mixel_dphy_cfg cfg = { 0 }; + if (mode == PHY_MODE_MIPI_DPHY) { + struct mixel_dphy_cfg mipi_dphy_cfg = { 0 }; - if (mode != PHY_MODE_MIPI_DPHY) - return -EINVAL; + return mixel_dphy_config_from_opts(phy, &opts->mipi_dphy, + &mipi_dphy_cfg); + } else if (mode == PHY_MODE_LVDS) { + return mixel_dphy_validate_lvds_phy(phy, opts); + } - return mixel_dphy_config_from_opts(phy, &opts->mipi_dphy, &cfg); + dev_err(&phy->dev, + "Failed to validate PHY with invalid PHY mode: %d\n", mode); + return -EINVAL; } static int mixel_dphy_init(struct phy *phy) @@ -373,26 +517,74 @@ static int mixel_dphy_exit(struct phy *phy) return 0; } -static int mixel_dphy_power_on(struct phy *phy) +static int mixel_dphy_power_on_mipi_dphy(struct phy *phy) { struct mixel_dphy_priv *priv = phy_get_drvdata(phy); u32 locked; int ret; - ret = clk_prepare_enable(priv->phy_ref_clk); - if (ret < 0) - return ret; - phy_write(phy, PWR_ON, DPHY_PD_PLL); ret = regmap_read_poll_timeout(priv->regmap, DPHY_LOCK, locked, locked, PLL_LOCK_SLEEP, PLL_LOCK_TIMEOUT); if (ret < 0) { dev_err(&phy->dev, "Could not get DPHY lock (%d)!\n", ret); - goto clock_disable; + return ret; } phy_write(phy, PWR_ON, DPHY_PD_DPHY); + return 0; +} + +static int mixel_dphy_power_on_lvds_phy(struct phy *phy) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + u32 locked; + int ret; + + regmap_update_bits(priv->lvds_regmap, PHY_CTRL, LVDS_EN, LVDS_EN); + + phy_write(phy, PWR_ON, DPHY_PD_DPHY); + phy_write(phy, PWR_ON, DPHY_PD_PLL); + + /* do not wait for slave LVDS PHY being locked */ + if (priv->is_slave) + return 0; + + ret = regmap_read_poll_timeout(priv->regmap, DPHY_LOCK, locked, + locked, PLL_LOCK_SLEEP, + PLL_LOCK_TIMEOUT); + if (ret < 0) { + dev_err(&phy->dev, "Could not get LVDS PHY lock (%d)!\n", ret); + return ret; + } + + return 0; +} + +static int mixel_dphy_power_on(struct phy *phy) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + int ret; + + ret = clk_prepare_enable(priv->phy_ref_clk); + if (ret < 0) + return ret; + + if (phy->attrs.mode == PHY_MODE_MIPI_DPHY) { + ret = mixel_dphy_power_on_mipi_dphy(phy); + } else if (phy->attrs.mode == PHY_MODE_LVDS) { + ret = mixel_dphy_power_on_lvds_phy(phy); + } else { + dev_err(&phy->dev, + "Failed to power on PHY with invalid PHY mode: %d\n", + phy->attrs.mode); + ret = -EINVAL; + } + + if (ret) + goto clock_disable; + return 0; clock_disable: clk_disable_unprepare(priv->phy_ref_clk); @@ -406,16 +598,51 @@ static int mixel_dphy_power_off(struct phy *phy) phy_write(phy, PWR_OFF, DPHY_PD_PLL); phy_write(phy, PWR_OFF, DPHY_PD_DPHY); + if (phy->attrs.mode == PHY_MODE_LVDS) + regmap_update_bits(priv->lvds_regmap, PHY_CTRL, LVDS_EN, 0); + clk_disable_unprepare(priv->phy_ref_clk); return 0; } +static int mixel_dphy_set_mode(struct phy *phy, enum phy_mode mode, int submode) +{ + struct mixel_dphy_priv *priv = phy_get_drvdata(phy); + int ret; + + if (priv->devdata->is_combo && mode != PHY_MODE_LVDS) { + dev_err(&phy->dev, "Failed to set PHY mode for combo PHY\n"); + return -EINVAL; + } + + if (!priv->devdata->is_combo && mode != PHY_MODE_MIPI_DPHY) { + dev_err(&phy->dev, "Failed to set PHY mode to MIPI DPHY\n"); + return -EINVAL; + } + + if (priv->devdata->is_combo) { + u32 rsc = priv->id ? IMX_SC_R_MIPI_1 : IMX_SC_R_MIPI_0; + + ret = imx_sc_misc_set_control(priv->ipc_handle, + rsc, IMX_SC_C_MODE, + mode == PHY_MODE_LVDS); + if (ret) { + dev_err(&phy->dev, + "Failed to set PHY mode via SCU ipc: %d\n", ret); + return ret; + } + } + + return 0; +} + static const struct phy_ops mixel_dphy_phy_ops = { .init = mixel_dphy_init, .exit = mixel_dphy_exit, .power_on = mixel_dphy_power_on, .power_off = mixel_dphy_power_off, + .set_mode = mixel_dphy_set_mode, .configure = mixel_dphy_configure, .validate = mixel_dphy_validate, .owner = THIS_MODULE, @@ -424,6 +651,8 @@ static const struct phy_ops mixel_dphy_phy_ops = { static const struct of_device_id mixel_dphy_of_match[] = { { .compatible = "fsl,imx8mq-mipi-dphy", .data = &mixel_dphy_devdata[MIXEL_IMX8MQ] }, + { .compatible = "fsl,imx8qxp-mipi-dphy", + .data = &mixel_dphy_devdata[MIXEL_IMX8QXP] }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mixel_dphy_of_match); @@ -436,6 +665,7 @@ static int mixel_dphy_probe(struct platform_device *pdev) struct mixel_dphy_priv *priv; struct phy *phy; void __iomem *base; + int ret; if (!np) return -ENODEV; @@ -467,6 +697,30 @@ static int mixel_dphy_probe(struct platform_device *pdev) dev_dbg(dev, "phy_ref clock rate: %lu\n", clk_get_rate(priv->phy_ref_clk)); + if (priv->devdata->is_combo) { + priv->lvds_regmap = + syscon_regmap_lookup_by_phandle(np, "fsl,syscon"); + if (IS_ERR(priv->lvds_regmap)) { + ret = PTR_ERR(priv->lvds_regmap); + dev_err_probe(dev, ret, "Failed to get LVDS regmap\n"); + return ret; + } + + priv->id = of_alias_get_id(np, "mipi_dphy"); + if (priv->id < 0) { + dev_err(dev, "Failed to get phy node alias id: %d\n", + priv->id); + return priv->id; + } + + ret = imx_scu_get_handle(&priv->ipc_handle); + if (ret) { + dev_err_probe(dev, ret, + "Failed to get SCU ipc handle\n"); + return ret; + } + } + dev_set_drvdata(dev, priv); phy = devm_phy_create(dev, np, &mixel_dphy_phy_ops);