Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3495746pxb; Mon, 4 Apr 2022 18:50:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVFO3NATbBVsNj49Te8vRwyzucMPRNCNQwEnMHlIeWy7jxRcjyBTlpm7167AhSx4OVl3U/ X-Received: by 2002:a17:90a:b115:b0:1ca:9d56:24f9 with SMTP id z21-20020a17090ab11500b001ca9d5624f9mr1285418pjq.130.1649123407330; Mon, 04 Apr 2022 18:50:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649123407; cv=pass; d=google.com; s=arc-20160816; b=w1hiMC1TVUo2SrXnCQBghvJLF07o9pJAtxFjcdjHhKj63HOV5UNcbiPk3CKcGqP3ul 0MZeLAFiGvpno/D79flMF5KmdMlNJu75aWCBNvd1CTbuh6rkJ4E6EqiUrGzpNOqdaRhI KWb1UYEofOFfqMHDorITl7ZIWjcgJK9kxwaCggMIHKLHFanPf1BZRS6seLkJBtzoVVeO YGYCUHhgSqH1aGjn2+Z6Cm2chLjkjFpF4IwKzhWryJz+7nuLtNkaN+YXPVRXBhe4dfUr ZmHTQMZ+dwH6KLJI089zULPvyJ46dFhfv2YiI2Q5N3OLot7udnNSCynhkJ/OhGwaZVJX ae4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=R1GZDzO74JfSypjeNswUBQ3ccmJzfPio8vtcxiO1ca8=; b=six7UCzu2ArHtnbsq12XWhAr/z+f8wbX5DvGMkb6EGiSpc5rZs+KAFa/E9MLGqeWnN A4DuFVLeGJPwyvGOcWkX0H2SnctmW/jNoO21Ze6bfoz7DbZ949EZ/JBKzK5B7wVMOEbJ HxlepbJc6Phsi9+1+FfhAzbT6ISuEBQGdLpHzCbAwMbhCmudkf3CGgoX6uV4hx4cDajl +mRcjdsUviDASC8ODmQI3o+6v/DRCLKHzoSWhB47/92pDPTYUSuOrbM6/ZqdzLo7TCxC CfTa0r2Yyjr0IuAxwHjSDy/mxofzm7BfZwGDW0TBdBE+sN+F7Y9b5mtxLUn501/SjnMC xYDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=S8Gyeeo2; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c2-20020a170902d48200b00153b2d16453si12381738plg.91.2022.04.04.18.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:50:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=S8Gyeeo2; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F8ABE728E; Mon, 4 Apr 2022 17:51:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353640AbiDBEDy (ORCPT + 99 others); Sat, 2 Apr 2022 00:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbiDBEDt (ORCPT ); Sat, 2 Apr 2022 00:03:49 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70087.outbound.protection.outlook.com [40.107.7.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2D6D192581; Fri, 1 Apr 2022 21:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LzNxtKm+Iglh9xzLdKS/blLQqykGe36fnimm5QBfD9knLx4bvA0+n3alkTveefn5cB9uVpOMuZl9G/4usAtoB0UBN4uLZ0ikzJJCtQgS7MwNZu5ixMwHJrlGY6p4jUAzChSIB8ONEYm8J+4UnqOvNghxkTbmrzgp08zXYjPAcCJ3nscEWRx2KYyepkk1Oq0gfvcv13cs4i710HmRvLn6+YGJFjX7leaKXDR8Lb5gv6sW/aroXmam1XF5K6crzNhq+FyFhZNAf33eKQzvQR98gPWKgIR+6gOGxsK/t9Fugt9TfIM8LPi716ggDiB5OoUrDw813O1PRT+Z03zUdQkGEw== 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=R1GZDzO74JfSypjeNswUBQ3ccmJzfPio8vtcxiO1ca8=; b=gmjfhi93FSYDFsck+QC0How0z+qOjH8otwSWBF0uXKaKc+Y8/FmF0phFQEUl0PALMYNyH876ODa+QQb37cPnb4GQbS4d8slMiA5PFNEIP6Mg0N+lQfXwLjghJP7cxMM98XYFzZ07fFWxAiRhbkEdwcFkna0cVORTYM93wUnccm/ztnAFCkuuc5r/DAwa7kNSuM1KXnyLf6aJCRCEm3/KUrdxoj7sScY1rl2aWSc/TzgAOslp+Htw4SKIUkTa6nUJce3F6hvOpj70bR7z4NnzsyBH0YyALHn2Oo+h22fDyqp+XlpZXG99BAnnCItF4DjhDIM2NhBPOiJvMLiVxJt3+Q== 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=R1GZDzO74JfSypjeNswUBQ3ccmJzfPio8vtcxiO1ca8=; b=S8Gyeeo2tcwfBfTVPqp9s7zKMmkuV4xlQukhD3LT8w/Xwcq1nmy4bHSWiS+eTpaKV/+I6XOE8hJktB0ypMdbERuKlo4MV7OhBcZ0P/lVkV5jt93NhLpBxci2FGwscKFa05KsYLbzqQ3Sa6Mb74Qz3XqofHXlYdehCWf5KkeHKVE= 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 HE1PR04MB3210.eurprd04.prod.outlook.com (2603:10a6:7:1e::20) 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 04:01: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.5123.030; Sat, 2 Apr 2022 04:01:55 +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 Cc: kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, 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, robert.foss@linaro.org Subject: [PATCH v6 0/5] phy: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Sat, 2 Apr 2022 12:03:20 +0800 Message-Id: <20220402040325.2465222-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGAP274CA0011.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::23) 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: dfb1d0e3-c33e-40ae-7478-08da145d8651 X-MS-TrafficTypeDiagnostic: HE1PR04MB3210: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: Kc3zFgkXkID9s1aPmFF0+J1edjwqQSfAOeE6FFUqOtg93E+8yBj4nn8s/LIPaoTSc92Hbow7BApgcmMOCLCcXyh//63NdtIcGEl1AlKGH3VS3wv3PcdXSKHcjFtjFw7K/SmW0rlUwDoj3wg2nwS7uarKK8X5Tx3umB1n93E4BzSJkDmW3LjcAoe4M5hAcYxPlD6hJ+5QCsKNMNbFaEhy+EF/5gBnIs9Wv0OOz5cGqvmqOHTmOA/FNlh5MOKrb2zIyZ75yOqiUWXxKg8UHFuZErK4VLqFX9Lk1BtpK5F/xSS449B8qTlY8PzfNZ7uF3NysTV2e9iqqYWB251nFfKinyBQHjThKkKw9YmUbjRh/Le1TYI/+WzKNHJCxWUhIfLizHyB4tPd1IlC1vJffNHPCmJh1FY//m1LBC4TA7qoDSlIuGCLEJ7gRmmKYxNCKkO0OliQJSsQjVMN9MXkZYGIgrTzIuSilM+K9TEhWfLkmstBzVhSeJtSgrTEmQHUoAi8uUhvBj5LW4DF5xyzm+Wbh3RQ5zl5JthcOfR2jDe4Ozy66J90i6e+9oq8o3isE/HBanjng7CAXbWnUct+ZL5Pi3LNyBGdd2HcpQqJLX+N8ULZ/WBxH1wQH2j8VA5LRK7MfScPNRzpf3qQUhQELowA67QPmO+uhRAoFNTX0sGbrXUvzL5RL080Go+S54U3u9aY6qcInJcrhsee5QfCjEEcIQ== 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)(86362001)(6512007)(186003)(26005)(2616005)(1076003)(83380400001)(4326008)(8676002)(66946007)(38350700002)(66556008)(66476007)(38100700002)(2906002)(36756003)(7416002)(5660300002)(8936002)(508600001)(52116002)(6486002)(6666004)(6506007)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?kXNj1ro6vehqfKBU7K3nNC4UxvuS4Jhv+tO1q4yPqpi3lnsWzMI2q29UvIro?= =?us-ascii?Q?SByLOz1N7M3bh96l5dpb63RYEjQ6CCKHnSi+UGTGbyJSE+XaaPzgA75FSexe?= =?us-ascii?Q?jDwf8QH7X9j0IAYW5syBugJhih5goiABuz831LYeKGgu4IEoIiSaFDe3J55w?= =?us-ascii?Q?KJWt34XH/evFZjTzOngvdwC0KQLcnMgAJqDimrXOcfAeiDrabwS++eETx27p?= =?us-ascii?Q?hrgBDaDkhjDkOaTeHZOuVOgvcc9PuCN2bj9pHf3tTFca4qtYeXWzpgVWTmVV?= =?us-ascii?Q?3LB+0/18wFsYqBNP7mjZ5KRN+2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ascii?Q?60B538E9uOWLXn1ztoHsX34xUV2saa28jNK/k4qAse2wJu8Te7hPf0R6M7ee?= =?us-ascii?Q?GzMTAtOdmZh8kshsDxbPDilqvTPfi/D3cbxrM5eqBwCZAe9NvxERJ9j3tQRn?= =?us-ascii?Q?jplwNZA6kjm9CPNEkmXgP9cMj0BAk6HXQzVyZO7hB/jwrwv8roK9OYItqP4S?= =?us-ascii?Q?TNpGjwnUNslHukbnCIowM0UkRlloIOp3GhNISSekXuktvAOpPEgYeIHH9foJ?= =?us-ascii?Q?5zcLh2QRZBdb0WFtDilITCIQf0xAmyXSQfGMgm3Mbs4ABXIfboqs6rMnghAL?= =?us-ascii?Q?wDeXQYoBhluoq1JXHV5Baa1+QrKRTDewGAXaUZASAQVFqtzJb6FVNgtZqFqO?= =?us-ascii?Q?bgPyvcIY//DHRGUgkXoJTt3IeopQv4wkSanvezHRy7DQX/e0fEiRCsT0aoPd?= =?us-ascii?Q?AMzRGe1ee/RUxM8SPqTJsG5/1+6wWmB1GkgMKJntdsLStMu/XwXpRgkTpt1D?= =?us-ascii?Q?8FzENZVRBybkif/CS6p4hmhrZUl9OG+TjjO3PlCWUJUYgIQCereB0NnHUd7I?= =?us-ascii?Q?CpInABAdKw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfb1d0e3-c33e-40ae-7478-08da145d8651 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2022 04:01:55.0282 (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: d6aE0/UV172SA94eQ+C5kns2Q72F/Sli8T9sq7WEAi3GHhNNKWpbMwPn4MEaau/j1Y2auXSoXkWwvx/e4GHsvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3210 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 -- 2.25.1