From patchwork Tue Apr 19 01:08:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 12817195 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 48324C433EF for ; Tue, 19 Apr 2022 01:08:59 +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=mBkDrrL4OBCFKegBGouuaF8l0o6uEYxvRtEy18p1iiQ=; b=0SknejaQWXcOV8 Pzpu2louIX0Wn2M+JWr0PJter8Gu+VCaX+d0EugQ2Lt9K/L7At219u/dlW2t1HRn79rXwgKLF9/9E sS8DbrkUCu8d8P41fuzbWfid2o1ac50Hh28OGipD2ND4H3qRDRfMZZ4cLSAzLv8uzIDgqbuYaPBOj vHar0kTEeOx3jV6MmCtW4VRhtSzjgsHLS0Rv4H9TNJ8irL1FNXv4w48ACL6yTLz7v3fKKFYc3Udht /93ebfcI1PBND+eHRZUQIgWpj8Mn5190QjES4AsguIlsbEQnFhZUaPXRNznCDrLk6GzOhXBxH+Uou PSQnlh5D54qr6G7fLqRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngcKv-0010RC-1U; Tue, 19 Apr 2022 01:07:21 +0000 Received: from mail-vi1eur05on20620.outbound.protection.outlook.com ([2a01:111:f400:7d00::620] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngcKs-0010Pj-0W; Tue, 19 Apr 2022 01:07:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bGrF1HSVnGgjwHNUnS1Q1MbSD/irRMF5Qlv0c9xFKpHXVKqAjswV06KgSKZxjrUhbidXxrlwAKVGCj9Jp/tl0p/TFQSeSChbGO3zMVxqfacq/VZDnk1oCZY2MTiQbs04v6rNbr+aXw+tdjwJsq+C9FMeqPiIf9F1j81DjSrEEbwbEdVZ3gz9Hq22iSHr1sOZG3v3ezCectmy3GuyEONwTe4c/Wiqe8J6s3Kqc1tRj/ij+ZMf8EiiBwUvVVScW8Vz68kdQUz/1buCCaIBJ52Fc6SvlgbdWsb8R2lYzrtpOaMgS24v+9tNrx6pNcHfAvyLOGu4mYHy3XQhMwju6Bltbg== 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=b+wH+EVeQJsUnn8AdmBh/OojI/62kuhWmmCeeg7yWPc=; b=FmlLN5cA4dC/EJVk5rpvPFb74E9yFU3G/VglwlY+qkvU1N+aQrqTdSssRJfhwN06Eup9bbmqmx6CE+oDhiYar6cj+VQOh9zgzz1oxUdLG6vGmc0QfrBjX1DL9EA4O2OMPQmLLM8dsDxkpgUYuQbhRtH1ZuCAEwsmQ31I4KnnPqqa9sUKsCeudZsoQ6vpQONxmy4AjGT5Z2chnr6Fh+2O+MH7WTqHIO2NNPwhWfO5beJyHpt+afXS/+n1Pn7GvVjG+LTtG45fA9S8cd+SukSgiUodyNz42xCl9qz8gVJh0+ngYqHX3YSNYDJrn5eTSLY/RE3s4WrgtcQOWrk265jNrg== 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=b+wH+EVeQJsUnn8AdmBh/OojI/62kuhWmmCeeg7yWPc=; b=SWmuIGCFst5vi1YUwW/T5DU2l/nTx5TEsYUNsYqVqFI2gPzqTyLAyaEdrnr9/hz6UIXAsfc92pOwNxnMRn/TV2Gnmia4QUbSALZOG+Cn8cP0aPgMZfRMCcFninTiUj6iLUPCBv4J+9+MsNarBHQwnhsP+jPgq7bREFZR/wJ8IOE= 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 HE1PR04MB3291.eurprd04.prod.outlook.com (2603:10a6:7:18::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Tue, 19 Apr 2022 01:07:10 +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.026; Tue, 19 Apr 2022 01:07:10 +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 resend v8 0/5] phy: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support Date: Tue, 19 Apr 2022 09:08:47 +0800 Message-Id: <20220419010852.452169-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2P153CA0023.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::6) 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: 7aa87591-fb85-4813-fe76-08da21a0edf9 X-MS-TrafficTypeDiagnostic: HE1PR04MB3291: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: ndH2dJ+Y+JNhJPz+VM/TAQnFaQ0rMuVUW/cD6Dh9LabD9lPryp7OZ5/c2r2TURiHoKVvceuFgFd5my2anXbvfd4nwwrX/vv/rc2P22Rd1u3SJMm4gHtnY+h2kIYzObNyWj6zsbUJB6E5YMQmqCRG2WuK2Ru8v0HvCpeWHG4RooFQBQZ7Q5RLvx110nZHlzWFNU639r0JCPkV6hU8/VU+OwlGU0LMkh0Pjzgfqh6NoSz1qq36WoNmAKttM+cXbL3RujavNhsjfMEP7Js91zSHr9CBrhDZuCwhugxE8uTqMKafHgnrBuzaPklSvuMu8WE90okROu2WxT5wRzfcX5ZVhFL+K9jzsRtL9EOI1kGGS/hTxwo8owyYqmVTxqj1mQ0FXr6KlJP2FUKX1ox5UQzNFFzGdARwhdaxwOelLB35vUVCMK7/nwDgFvrEBUSC8m6kF7T/Nu4+lBo9Z8tPA/oHZLY1O498mweDGgTRVZRg94eouy25E7lT0dNouK5qCXAsYNlcsyKnrfRTjqC1YvRmi5wCj+JYpcmZs/KnKsbioVouNupTqbSjR8wwj0MHPbk4fUcSc4uuYanc8hawOc4/9QUYOgRv5Fnf0xCl9f40EoaRHfR33Q5tTLlIP1yx0cdGMbFTGUcwBdKcbTMmPCP3u5wmbXJ0K2F3lgpoNBvLBb5pkMebE07uaM4/V76+g3pn3sSayt5XFKrNlAp43rxr8A== 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)(66946007)(508600001)(8676002)(4326008)(86362001)(6486002)(36756003)(52116002)(6512007)(6506007)(6666004)(316002)(66556008)(66476007)(2906002)(26005)(186003)(83380400001)(2616005)(1076003)(5660300002)(7416002)(8936002)(38100700002)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gg31LsySY900ww6Fn39l6zXVRvis?= =?utf-8?q?ZsY+8T2WBaPd4ZmYdkHWy3eDcaChI9SEOa3m8T/PEvlqmAcx7NP53iVEr5/72nGyt?= =?utf-8?q?+teaUwLwcGG37BR4o+2/awRBEcdcZ/2UsqzpzunpAvyw5iCRfoFeNYCmHGDfF4JHC?= =?utf-8?q?li9hIZXT65vGPNmKjXheTqboblI7UAS9shCkLACAJuvGKHl5EUWY0qoLK8IsNRFA5?= =?utf-8?q?vqCRy7Ad3llL68ZXNDRXkqWVZoW/OJTTYWN2pvb/r8rEM7HtjMG4aZ2b543dQ8H4Z?= =?utf-8?q?dby0qKLLchYnH9Fg1m98lq87ysW0n9tqTPAfUlTNOWoE4YWO/hOoWc9kXo4W6iaBP?= =?utf-8?q?V9OHg40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AX+Iu5wZzo+J1M4XyydP9iQ855KI6oNCKTHYTnTBI9pr7GTIQUMLwC41Eub8V?= =?utf-8?q?PXl3VU8xj5CmA5PtgHIec55KxRV7WugwMjj/1dNU5vKIOcRT6UkKxZkw4FfDvVTBp?= =?utf-8?q?SYxJJP5oxj7V+GA+404JPP9bUWi7S9zyEI7iGWYXk0kplLPFcuNAwmJ6EUad3YLpk?= =?utf-8?q?zLS87rpWozuni/cX3bzKoAwJwbEfIWkw7feuV7pvChkoo7jtIxW83yML6Tk1BHGcL?= =?utf-8?q?sfuSzAXnrd5msfcFpj6BwLa0MUse88wqfiB0JsUaC59R3RObOJWYWvIne2PAXwQF0?= =?utf-8?q?ksiesXEcryz8/6cPCK9oKij4EvggaPEDUxP/P9c4WP9vR/vDfC0TZCWG6DmGFj/zp?= =?utf-8?q?Nr89Sku2wT44Lz8odsu7cU6mvdUpQnv5rYH9pY3HP9cRSMOuoBvMyWVkiHOvy9z33?= =?utf-8?q?5TCBaQA8P+Vvz94MIog3fJdnz3vg4VwA=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7aa87591-fb85-4813-fe76-08da21a0edf9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2022 01:07:10.0226 (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: Zwp6fQl1iV6QsEz7pmNksnaUqxkm6kxJ1PLtkNeYZwm7cwQqMEM412rD9LH+dflFf8CZjcPJeegZHOXjnMOd9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB3291 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220418_180718_282020_3306E3B5 X-CRM114-Status: GOOD ( 14.62 ) 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 '*'. * Resend with reviewer mail addresses updated for patch 1/5. 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