From patchwork Thu Apr 14 07:10:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12813014 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 8D113C433EF for ; Thu, 14 Apr 2022 07:10:28 +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: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:In-Reply-To:References: List-Owner; bh=EqXR82L+ohvYrl6/A1S/+dMU9MgOQD2TE5U3GC+tb0w=; b=DryzMPZsaZnuEw wcvvbEvjmSUJXJYCIA1tLQpLrrm9VHUF2QsarqI0VHt6tBg26TA+tuogkfJPCCCuebAz2cWMz1UJ4 qGA/CUBBfZ4bQNLXBcprucZBrxHj3W/gNN53p8jIlkrnNSui3nQZTaPnM47D+nzUfyaqk0y0h5v7L HYQMUyYp8dSR4QvUaIGrrG8kOyBqxWUtBlrwq0MDcHVSCljp0R6s4RjeaqDSVSPEO0GQoyNV97jH2 7m1r1wRQz8CmdB/QVB17MpAWNlCYUO5DpyGDQSpjcm6EQfOcNF5FJl8OJI9ShAZWb99+eQGsDywwo UtMm4gzfBSIQx1ajyCNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1netbD-004Fy7-Lr; Thu, 14 Apr 2022 07:09:04 +0000 Received: from mail-am6eur05on20608.outbound.protection.outlook.com ([2a01:111:f400:7e1b::608] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1netb9-004FwI-TE; Thu, 14 Apr 2022 07:09:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i/6yu9QYBm4VHS7p/U80VvIHk6NumbX0hfvbnTsy3ct3L9nHg9bjIktsRjbzCjyXT0O9IjrdpkHey3WDYabjOBsTZo6mxuhg//CKJ36sop6kwDhIDzkztjWJbMPopPgpJHeHCn2/j3v6tWF0YR+Se4kuJEwQYbxHqmpCJTejJJNRXOmINuThQw0Qb1CZK+W1XEgiDzs/tIn0UvIdsP/qtRnyhg9yUHbICC5okJr8IwMRXF+xrrR4dSEVy3rw9GtBVEfaX2ej8F/Xj9efsiOnGKHd2x4+3BTykgk7aNqC83mB/8yiXAPwLroNKQryIl9z7KW4/44x+D++HimjsJrDFw== 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=xj9HkHSXAPpfi4JDX0Iv2IscETV/yNlMj3ear9OZ1LA=; b=eFS4iOcordPmyKm4Zu9YJO0S8nJihOlBCNeJRvVuPVYehQgjxD55BAbvtW43nizseQGMxpmBlgQoGDc6H1MrSotmdWi3eg6FdAyCrJOqvW7QTPPdhp27JnuT3B0lweiaRVZoxqzXo07qVvLmVMrd/Uuu2bC+XEfZerdENb5djmy3QCdcZlCJ+zR7jVKi/x7k8oWXdX2io0lt7+ADRacDqztwmQCCX24BmAqv0Hk3/dVyK54fzVlGxS2grae7vPZi1YfX/htZrUkslKC1WD2ruPVF9oYZVV7OtlGSRtUeyR2zGoOxb8BDAgOE++UxrE5/t8PlEBxXurU8IvlqcqC99A== 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=xj9HkHSXAPpfi4JDX0Iv2IscETV/yNlMj3ear9OZ1LA=; b=Mvi+RcspE27shtoobGCF+N2u4Fq0cBs4+42quj8853sYRIBPLjKunLV8WNPNC8MAtnjwlyN0ux/qKl4PO4mhf1vvlNbca/f652GjeDlCZEZGaEQXgIeBlJE+hNN++/uVDCKoNkBqAR1gusZ3x2yy4gPWQustjkCxl7T/8+HWugs= 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:08:55 +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:08:55 +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 0/5] phy: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Thu, 14 Apr 2022 15:10:34 +0800 Message-Id: <20220414071039.423271-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 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: 34182e01-2da2-4608-d7db-08da1de5a2fe 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: kUO2ip0tbM9FI/x3ukqaSjKW7roTH9dioopV1K+dqie9x7qERat/63UZMEptJabiar5+N418xIMSIN6RIYMiqZcuK4i7HgvF+X6e0yaNtB2FLN4wtozZuWhOLCOZXSS5EiQxAJOG/d8jEVLPuYZA9Fv8ZJ12meJn3rM3nUjNvhJf5cY/ZN2M8pr5iIhUeTFy7Gt5coVHq9gSShVkwgVgp9R20bDzounS/A8a6ClxGcKnHrx6TpPYc9Mr1MeQYY1TQFVsDRlYiVP/mIcFt+Wc0zl8C06SISamp+5BdypodEGiKmRWl5Ts/nB13HJo5NYo5RQ5qPZn9fWfTE9NE3cagxPa4d1tY774hz0Ib6uYZMCwijpxnXtGNvoS0fq94n7qPmrSnjNu9dpjivqX5Obc/3wFDD/mDC2pPGg6bsGfCjMBP5BP7rNd1mRQgb2YW1sPb7mD09BScoxD7Zvu9CXa4OfhmvuY88HjqnA+2ltBap9MsymMEiNSj/RptuebKeUSUpWkxSobYySDCnzLqbsAmETWpzAHMDfYiyIkZrbrWlFmqbFbbTksI0RIey2hNCJ9SzsRrk1tjK6XKgMidyHu1trgbP4B0S3EFFi7KR+imbFDhXwytqD+2ye3AxWKDecFDEBmJJHh3UqCx91BWnu5Gt4JB1B0K2CizpBRHbALRdZqe7Ldma8Cv7IAnopC2g31m7Ddygb0OqBBAsrRtRkIfA== 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: =?utf-8?q?e41LsmhA9WfTPa1BUDOSnwQWtKj6?= =?utf-8?q?2TzOWipylPJ7rbBHBYSTGdTcnVw/lMAo3GEjBpB5eGfVS6vDUZ/tIsxJJJ3qPMkho?= =?utf-8?q?d+ggTXeLglBl6WSwHBY495plbAga62brYtnoYofrrrlfn3eCxhvqQo7BUu7tnD+kr?= =?utf-8?q?k4Danz39z7xd3ozT03myKJjnUl2V/42jfn1aYVwgGDdho4I/f60y5IE5LiyKPn+Z5?= =?utf-8?q?Exu+cGpJAW0P+AWhCbWJTuwWTLzEi236lo9TAOvctQ1QhfrC3xEh14Q1ETOxAI3in?= =?utf-8?q?3nr+WNFCUbH9DVbnwcj2cOKjonbAVvgjTvbjMR1QJLOyixpYzczojHzS83+cTfnFs?= =?utf-8?q?8978zDXGDfV3J91+O8s3aaZMd7BbwEtr7ZZmeO1gc83aK0tpTcrdou8zohF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gNP?= =?utf-8?q?9Rj8NfHqmXM9MD0INS29LBwXw9g3nRimNbKfV8f4UNWXqlEUAZ1s8S7V++DCe7qOt?= =?utf-8?q?RaZvbR7ITbf750m4mtgYREtDQbf+dpvlOvg4gN1lm5h7y0oo9AZBXZ++8k8Zgpshu?= =?utf-8?q?FasLQ1gkiCRA8vgWzU3wjoXWijvxUp16+Xun4s9ySVYwBnfz63/+rshiXF2lbnAsf?= =?utf-8?q?QNM+PJJGdnY0Xn3jidU8fZBSMa/owhTOKEZekmX9ku7JxokK4ZtNjS3wyI+ihO1uj?= =?utf-8?q?4ceCjwFD9DM2psJxTKZLskveRW4jaLdCXAXIx3/qQka4GI9DMeZubfSgEkT2qt0TN?= =?utf-8?q?DmYeUMMpvqjT+uHiPB6ywIgSxHOfCtW9XM82azhw0oK4SgckowbSgzhfqbYXS6G6R?= =?utf-8?q?qtBI6j7I3p5RBJzDgXZWkCRyp1E/+pRQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34182e01-2da2-4608-d7db-08da1de5a2fe 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:08:55.0672 (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: fhvsV6uH2PG9PovssBlL36Kjm64VI8Nbk0c3YYyjVfXxDMw0l/BC0AXDOECdatzMVwNovMh2PxwW10PlEBp/Ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6714 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_000859_983700_24DD85A2 X-CRM114-Status: GOOD ( 13.72 ) 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 Hi, This is the v8 series to add i.MX8qxp LVDS PHY mode support for the Mixel PHY in the Freescale i.MX8qxp SoC. The Mixel PHY is MIPI DPHY + LVDS PHY combo, which can works in either MIPI DPHY mode or LVDS PHY mode. The PHY mode is controlled by i.MX8qxp SCU firmware. The PHY driver would call a SCU function to configure the mode. The PHY driver is already supporting the Mixel MIPI DPHY in i.MX8mq SoC, where it appears to be a single MIPI DPHY. Patch 1/5 sets PHY mode in the Northwest Logic MIPI DSI host controller bridge driver, since i.MX8qxp SoC embeds this controller IP to support MIPI DSI displays together with the Mixel PHY. Patch 2/5 allows LVDS PHYs to be configured through the generic PHY functions and through a custom structure added to the generic PHY configuration union. Patch 3/5 converts mixel,mipi-dsi-phy plain text dt binding to json-schema. Patch 4/5 adds dt binding support for the Mixel combo PHY in i.MX8qxp SoC. Patch 5/5 adds the i.MX8qxp LVDS PHY mode support in the Mixel PHY driver. Welcome comments, thanks. v7->v8: * Trivial kernel doc style fix for patch 2/5 - add '*'. v6->v7: * Update the year of copyright for patch 2/5. * Better variable explanation for bits_per_lane_and_dclk_cycle in patch 2/5. * Use marco instead of magic number for CCM and CA values for patch 5/5. * Suppress 'checkpatch --strict' warnings for patch 5/5. 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 in patch 1/5 due to the rebase. * Drop Guido's R-b tag on patch 1/5 due to the rebase. v4->v5: * Align kernel-doc style of include/linux/phy/phy-lvds.h to include/linux/phy/phy.h for patch 2/5. (Vinod) * Trivial tweaks on patch 2/5. * Drop Robert's R-b tag on patch 2/5. v3->v4: * Add all R-b tags received from v3 on relevant patches and respin. (Robert) v2->v3: * Improve readability of mixel_dphy_set_mode() in the Mixel PHY driver. (Guido) * Improve the 'clock-names' property in the PHY dt binding. v1->v2: * Convert mixel,mipi-dsi-phy plain text dt binding to json-schema. (Guido) * Print invalid PHY mode in dmesg from the Mixel PHY driver. (Guido) * Add Guido's R-b tag on the patch for the nwl-dsi drm bridge driver. Liu Ying (5): drm/bridge: nwl-dsi: Set PHY mode in nwl_dsi_mode_set() phy: Add LVDS configuration options dt-bindings: phy: Convert mixel,mipi-dsi-phy to json-schema dt-bindings: phy: mixel: mipi-dsi-phy: Add Mixel combo PHY support for i.MX8qxp phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support .../bindings/phy/mixel,mipi-dsi-phy.txt | 29 -- .../bindings/phy/mixel,mipi-dsi-phy.yaml | 107 +++++++ drivers/gpu/drm/bridge/nwl-dsi.c | 6 + .../phy/freescale/phy-fsl-imx8-mipi-dphy.c | 276 +++++++++++++++++- include/linux/phy/phy-lvds.h | 32 ++ include/linux/phy/phy.h | 4 + 6 files changed, 414 insertions(+), 40 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 create mode 100644 include/linux/phy/phy-lvds.h