From patchwork Sat Apr 2 05:24:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12798978 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 8CC21C433EF for ; Sat, 2 Apr 2022 05:23:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F083D10E027; Sat, 2 Apr 2022 05:23:22 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2048.outbound.protection.outlook.com [40.107.21.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id D711410E027 for ; Sat, 2 Apr 2022 05:23:21 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B4K7Tc5Y10Ju2sCzkxlPa83tpC/8gQdkh0AtEve9dVTZWCGipqp2E9PSwhhsFZrqHGrVhm+kTqLSnVTdFUUS+scDTO2hR1OGd9/6PyUof40lhk1biVO/eWzT7LLByYHzT3JAGc1KhBuotFJXdtx4wpCF41S0MPzB2QcKkQnucZrAbBqY5XUM/WuiwjvU1Xv8IpOvKFD/dp7dDoJL317XNHS+AVpZzIvZ/CuxyBEPPmhp8XiktjducTbSl+zot50LjxUOnqd3T2TU0uFMEdKHm9G05ZEMpkLfDGg7EDvXFKRtIJoJtyyY178jOnuN+q+x6GxQhcHI9B3yUTL9gZULsA== 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=PKF3ZHbu2cRhYcusaOvTHu3Ufexvm4LzPwJQ3FVb0+I=; b=ITzY3CbC4uH1ZDWGirHDrizjhcdurOM7ue42zATldoc/v3jeQZjQMuhNoIv65eH38YEB3DtGmKu5xKIFB1H4xZv8l6v4QUjYm+OPrdIeLSRFmD1SkMd4kZX/WewTHsVXy64cN6WmwxCc7qpqGACwuljk6Qx7CFG8I5KEjCTuc+a8HZ7k5vSeE7cTJMDcLnQl16jgcuBd09/JID4H3U+hNUDP7sI68bb2CNgdTRj8Lw3ZEzjwqSdac4Yh1qHNLn2h5ugGWMrVd/MHjGcyYIAorD+WST1TGTN2ToZYfZ3fRw1qFZeUwQLkxRfRcdBizDMAsUsyYMRVkn0hBBIk7Mxppg== 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=PKF3ZHbu2cRhYcusaOvTHu3Ufexvm4LzPwJQ3FVb0+I=; b=P3pb9bz9qKEPvOOY+GMdFiXk++G4KRNj96nUQWXmmEgv4EV+pKe1xXGQVsriCePDJLuj2BHOx1pVF1dtsIR3jv1OissxS9m/Q7wmMhxHEjaQ0s52XESKzRmUyWX0rgeB9XtS+bo+NUb8YwY4pymrAnNmmt4nnvL5qb9iIHG1GGw= 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 PAXPR04MB8750.eurprd04.prod.outlook.com (2603:10a6:102:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.30; Sat, 2 Apr 2022 05:23: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.5123.030; Sat, 2 Apr 2022 05:23:17 +0000 From: Liu Ying To: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 0/5] phy: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Sat, 2 Apr 2022 13:24:46 +0800 Message-Id: <20220402052451.2517469-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) 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: 9ff52a59-af6c-4e5d-de66-08da1468e441 X-MS-TrafficTypeDiagnostic: PAXPR04MB8750: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: OpLFrsZgaqa/tS7knPuq9eTShSSgc+/gh32bTQFMYHbkXtwk2BOoXtnaNDymUtnJ404q+1R4uvG8EB8wCGKqa06ZSdVsRy4UnW1aV6ijLVZ9BDEljNJHDk84ELlK/Lbd67ZqkhtH6FHRrlVc4hC0GKnYzOdCTQZQrhx6WDTn7uOp15gEXohfgTcuNAb6jUpqP5kCi8A7CxaXPlK/kS7+f0+hVKBep9dRquwhS8xgztoUX31MuktoU3j+A/bD5b1Frpshgx3ldRwSOI4ezlskhCkyI7gpXJUswObh+4IwGDz+XcmSHUjjlc6O8nmSET8IZ2HZdnslVymWUkxiAowvHUZC52TV+1cYNnuqyMOy0gbP7wJwxHqT5Zch9g1hj1IngWRkStE9qYeHFao1CtBAjjW1DBypHYeuHnPCL+EY2Fr5ecJgD8Y2XP2onDN8kIpy8ul5u49qWfVBHt6t0bNOmxstLdfRAmprnGMo/LDphVsuwMb5VSCOXdzeT+uPGCZcmDmbKulfvKQQY9TElrV2/6NeiFzhnxpYQUySZtUigO0NP3hXcjx/A1wM9cKwAPv0BRRWMaFv6j84ijRHVNKOEbjwzoj5IVWFqvViNGua1uaJl6PL930rO+yLYNUzLhSi/z4SJ2bVL+JyNTIPJLpyjYWH/peHgbUONqXDmoY57lHXqgzZm/2Saj8StVyePAJ00f6nsvqOUqbV9L0yLK1m6Q== 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)(36756003)(6486002)(83380400001)(316002)(6512007)(52116002)(186003)(26005)(6666004)(6506007)(1076003)(2616005)(508600001)(7416002)(8936002)(86362001)(38100700002)(5660300002)(38350700002)(2906002)(66476007)(66946007)(4326008)(8676002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gHHXqdZ8nEt4w6dFzcT41FR35bWl?= =?utf-8?q?Bg6h63NBOKx3/FSqiMAQePZdJUV6CDW4mczuoFvEfVGYzjQNEYW+unWRVG3/0dxgP?= =?utf-8?q?B6f4kw2pvhxiOElol0uEF18UVUWx1rYkcGDxsCaMcE3xQgWtB5VCLA5YnPhxmoX8k?= =?utf-8?q?pulbPCOTbTIhDLGQ50E8oBDASsZZzXHhUpVlylxG3dABtn5ggC6JZf08bZ4kMUS1u?= =?utf-8?q?zNBn6ggk0MlbzuSx2R3HARockK/oxJ+YMfKzEuiMjMx58Jk8aTP5GTW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85Wb?= =?utf-8?q?DrufyiyLArMVew172OuUzEgP/UhFudAWVN876XarDQRza3ecX3gWf+yE08P+kC+tC?= =?utf-8?q?0YHVQPbRTc1QarvKdkNLwQCEijwycUAvFpYbzBwNgcsfCoo+mXsYsrGmJU5pI9+nC?= =?utf-8?q?eC4GdJnEsiygxs0QtgUPiYZ95doX86h6371gyFytsZduM3ItH2kNWt0Zd39Oyv4vc?= =?utf-8?q?7AfxBqhZS/OcrmXCZ9R/k9quB2Cxa6BwfEN+QNhaLtUoSW61l+mmMk8dBQoW2X3H9?= =?utf-8?q?/fFlWagEUtZNBt0B+pXEuip4MK8j/zCBdEbw9nWtZ18wixq3ld8S+Olc8gJYV4bNa?= =?utf-8?q?q83hSy8Rn2sUZAEE8y5A3f8QhEKdCuvoyz1lGJysZ3vUHlnkGd87fb+4GwKxgaPTb?= =?utf-8?q?n+OI5Q/PwBa0OxSswO8qzjOhO/pzvRDXP+hcoZXZWeZdwsxX6hM+wNCNibbLyTIym?= =?utf-8?q?uEgH5kwGaofmiAq5l2rOpaVxx8e/wBCmh27CWhyrHfdHKDIxQ7OMyvgI79O+21xfz?= =?utf-8?q?buvyY6ufzqYIRKcMf4nxkdCi1Gfkqn3g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff52a59-af6c-4e5d-de66-08da1468e441 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 05:23:16.8303 (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: r8FMC7dfl1s/71PZc7UxR8NSx33vg9mZgd28TnJom6abuDirfZlZmmFdQKO+M+2xUPD5FJ//s+gjnFGDHPiQJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8750 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: martin.kepplinger@puri.sm, agx@sigxcpu.org, narmstrong@baylibre.com, airlied@linux.ie, s.hauer@pengutronix.de, jonas@kwiboo.se, jernej.skrabec@gmail.com, kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, andrzej.hajda@intel.com, robert.chiras@nxp.com, shawnguo@kernel.org, kernel@pengutronix.de, robert.foss@linaro.org, linux-imx@nxp.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, This is the v6 series to add i.MX8qxp LVDS PHY mode support for the Mixel PHY in the Freescale i.MX8qxp SoC. Comparing to v5, this version only rebases the series upon v5.17-rc1. 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. 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. * Resend with linux-phy ML Cc'ed and reviewer mail addresses updated for patch 1/5. 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 | 269 +++++++++++++++++- include/linux/phy/phy-lvds.h | 32 +++ include/linux/phy/phy.h | 4 + 6 files changed, 407 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