From patchwork Thu Jul 20 07:09:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13319883 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 69DF0EB64DD for ; Thu, 20 Jul 2023 07:10:17 +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=Ly+uPtdh9uEoKv8IaAY7JriS+vOu2cY9SsmaZoaY3c4=; b=d8VwSKaUJ0XIg8 RnjWL7l8WJmA/+QTaxZeIYsIbLv9cQCwyqJ/UcO0CcbFe9ODlzkuwRUGIhWsx08750hmoAGiFrOpZ 7h3zs0iTbrpWPbDHPv7NqB8zWTejOfE41ZrwEB7A5N/yQN13Cx52hmPcCJgQVqojli1VkjV2R85Q3 fWj+ktiS7EQ7OD6wjbpfYQars9oO6c/8Bseh7sxtS2mYRopBayAGAstr06w+VvKHz7s6v+Kx4sE6A jDAiMip0FvOGll71nycMf+Py4EjeDms5Z/f3d4z8KCDR6IvU4pyOHpkPQQtLaDR/KGgP7fW9wP4js KqT1ulX7ggwsj5HMbpOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qMNnT-00A4Aq-05; Thu, 20 Jul 2023 07:09:59 +0000 Received: from mail-vi1eur04on0626.outbound.protection.outlook.com ([2a01:111:f400:fe0e::626] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qMNnP-00A48P-1B for linux-arm-kernel@lists.infradead.org; Thu, 20 Jul 2023 07:09:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DVfe2O7T2bZMj20KK+9oaMJZ0GWcTNK8OVt6kT4JMLgy5j5P/gEUFT5SU2IE4kmXpxpJVKrI5skNwL9g91BKrnqGwqfDA4QpQC6TlbPU8Rf17DdEqDW5ssdMJMuez8g8GAf/dZDR9wC9eJkYMtP4PxrL4bMYHEeUatdCMP0K6swEqey6lHoyoOSOU5z9ChwtKa+H4jXHuv6e2pzqRfzXO0Fr6VYlRw/17M6IMUiIsBE6EJwlLIwDEhB0EY6Xob6NgZSI38nmVh8uCMv57zSTYHp72DlW6UVn0V8MggdUklw5c94Zbxbfd5qswU0f1N8B7G/1tntZXrKh2ih8AjXisQ== 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=hTikT+lLOdcAIu+1OgkQFehZiVXaH14sjKWwZMk6FwE=; b=gWKDmWnDa21kCd3cnUCZ/Ug94xLXwgzsfgbeWnJAGttiHyqCgGbtzyLuLy85WcAApOpPvypydnOEU9xx4rWoAYwn+XmNp+ZBTuICptncUmY/b5oC69hNgGaUT2QoMLfRGWMm+Y50QX7jd3SzqluCgwoqxBC9XMKANZvi5YJzaw2K4xGXJFYhP4b4Zo0+MICA63WWrbp6RPLVHuXCzwGJpGGIMHCnWjT8VYkuu+K3BvBsZT6cbu0DdRiVDFN9jz/JYPjpHLIjyRrSnW4lK6cGeWs9Y/WAn1/Fe9FsxX1vyUec7uM5oFYGe3ipbOfK7V5AVhqW69p3cJRp2xabF25v7Q== 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=hTikT+lLOdcAIu+1OgkQFehZiVXaH14sjKWwZMk6FwE=; b=Gw1nmM2NXyeAxj/8A7KI3iuda6wgJ8P2+f6dRQqUtwnq6rXT0t+5eS2wzAhkToFXvzS9KqygedDIID+ZiAG47lQjCpCgel01yO0UQNPII4QQ4G2nY1Mhzu+QpmRsSRX1Kmcw3sn97et27HaG/uU/shZ52nuPYHCOarVLhlSsMkA= Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AM9PR04MB8307.eurprd04.prod.outlook.com (2603:10a6:20b:3e6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Thu, 20 Jul 2023 07:09:48 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::9018:e395:332c:e24b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::9018:e395:332c:e24b%4]) with mapi id 15.20.6609.022; Thu, 20 Jul 2023 07:09:47 +0000 From: Ying Liu To: "dri-devel@lists.freedesktop.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" CC: "andrzej.hajda@intel.com" , "neil.armstrong@linaro.org" , "rfoss@kernel.org" , "Laurent.pinchart@ideasonboard.com" , "jonas@kwiboo.se" , "jernej.skrabec@gmail.com" , "airlied@gmail.com" , "daniel@ffwll.ch" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "alexander.stein@ew.tq-group.com" , "sam@ravnborg.org" , "jagan@amarulasolutions.com" Subject: [PATCH v2 0/9] drm/bridge: imx: Add i.MX93 MIPI DSI support Thread-Topic: [PATCH v2 0/9] drm/bridge: imx: Add i.MX93 MIPI DSI support Thread-Index: Adm62SsbW7tBlN2lJUmtK7I8QFCDJA== Date: Thu, 20 Jul 2023 07:09:47 +0000 Message-ID: <20230720071430.259892-1-victor.liu@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SI2PR01CA0039.apcprd01.prod.exchangelabs.com (2603:1096:4:193::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) x-mailer: git-send-email 2.37.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM7PR04MB7046:EE_|AM9PR04MB8307:EE_ x-ms-office365-filtering-correlation-id: f4a069a8-d882-4126-f68d-08db88f04d9c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BUktiwZfd9/2Dgh2G9ujh6HKzNotC/mw//BHbQAs91wc+7r+yzgB+un44RemrsKj2wTdhs19f0Sry4DC32HSZ7xSADHdto+0fTuh+IykNFNkOgCozPl50DtnhyQi+nARlOzzpcqYBu2gO5mPGXGEDLZKpCoQBdM4+ajNwyJiGCk4TJEIvyIB/T50nfYLk5Urc/22wH6knoIIp7cUxdDo872BaiVeTxeDWNXLzKGAlMEagRFOLc4+cDgO1s0nrKEltUnAscLze4D2m6KIv1mDvn3kTdaBr4I08Rye92FzHSfVAPAJuOEESl8kuS1fD46/jRpa7NixbVJ2vf3SDK/ohzbvAFoLgVVGUIv4Qjofb5MYiDR7QXzY2FHPvD7kKXuOTBnqYCsc0is2gtsptj98QRZ5xeFeH3ggmMfh+Vf5t+AMjmACm0ilYdQW9dA+zuu+cTDGsgT6lDbKiIegEwyGgXkkI0SOy5qm9bNq382nsOR8QFhlLYQKeNxhbLaL+VgPy73crmXlKqWalP2+DgITHBmGMeY1oigwxEFPPFSJzXbfV8crPEd7ILUl+l/7IJW29+sbJrf2FQabOGaq826aGlhtTAnCj49Y2EIVY7YdXjLLvPrfgIc7jufU2Ur1x0Kf 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:(13230028)(4636009)(39860400002)(346002)(136003)(396003)(376002)(366004)(451199021)(86362001)(478600001)(83380400001)(1076003)(38100700002)(186003)(41300700001)(26005)(71200400001)(110136005)(54906003)(8936002)(8676002)(7416002)(316002)(2906002)(122000001)(4326008)(36756003)(6512007)(66556008)(64756008)(66946007)(6486002)(66476007)(66446008)(6506007)(2616005)(52116002)(38350700002)(5660300002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?9q1BglqgYTZDPVn8wxZpgkN?= =?iso-8859-1?q?/SSrgH9sJgr+oDy0VQy6akjjzxSpOSgwuQtYEV4LniYa6uvlWAiUN+Dpdrjp?= =?iso-8859-1?q?7NSC7YOeNkSKQoRefuRZLZA2GxAM3dGE2cFmxXcRQhOr0+LjaShqzT7Wl2Gl?= =?iso-8859-1?q?yv3XqEstZJgAxc5ZDmy/F0++OrdTmyY0rVhgX8tn3EZGCFvfYZaoYN2w+DP+?= =?iso-8859-1?q?Jb4xzPQnb5p67Y8vp2Rn1BKSuMW9CUCE8RaUhj5H+pqzSC1gvXlbtMoLsa0s?= =?iso-8859-1?q?haaFE9sdmd3TWREIiUvsIuM3QOYlmrJim/iLfXdKfibWooxz1D0BdTRYCDIZ?= =?iso-8859-1?q?R8Mz+Aug3kIjcyVKGYoxKHtDvHCS4uaBwybhRS7IeRoVTjDYeA1TbowwhFhF?= =?iso-8859-1?q?B+tOH3mb66rRdtKNbiTUh/jUjQLmPU2BzCGkSVTMfnBWyHN44AcHP+uo3vVt?= =?iso-8859-1?q?9uleG1wO/0bYaDTHtcn26IlCRO68nSR3R3L+mqCxbbM2gs59Zd7MfuzhX32H?= =?iso-8859-1?q?AdLHTYrxpA+0nEqJ5Bbl0fM+/Yg5X8VsoKfVvlKf6hbT/sJHyM6FxADpIzwW?= =?iso-8859-1?q?o1uGXtUMbhEWDNnoq39nYv+dBhPrSZoK2EeuuD0OV6W+LKlG8SuNXa2BuaZA?= =?iso-8859-1?q?T+6gYQnov4p242R7BSZz4wCT6Pxq2UtZCxMr1fASgoyWh6Sf3RR3XWSnBeI3?= =?iso-8859-1?q?mEclTvLArQb8Y1+NHfyLINLfYYdpPKYSUdNIBCApPZDJS3lhYocO5eV37Bd6?= =?iso-8859-1?q?OCY6n7z/YGap3/Ls12hA3FV9SesS8y7gsYoCRhG0UdD2220ITGGhECImylHz?= =?iso-8859-1?q?WsdGXOlu1bps5K4l/KExrL0gU7bHv+8YItZ77kvYEFIDjFpuPt+l+PnXtJhi?= =?iso-8859-1?q?Xe7aWaJ9uZUWepXBS+iUcgqbIV+fPpj6s2VbOpTWE2RpjjNy/3PMWC871Uif?= =?iso-8859-1?q?coHwW9Oj90wmur2bDSI8wITr0LixjQR7qeoKQXUKoDhtPVArNEyBTPROcYID?= =?iso-8859-1?q?HmwsDiDToyxWJOLH13GLNhM30OooOOUHo20wYwlc2KgnjG0ZH27t39yJII/u?= =?iso-8859-1?q?Vcm3TkX/FNprndnzW1m/0OOSy/1F2CzXo3jT26bL0/Swllra7akOr/KMFjgY?= =?iso-8859-1?q?vlGsK/SUmg4CFtVDsNSH7NR12OUJgg9fbchqrT+UrIp42udWAtgaFCAzIFQ6?= =?iso-8859-1?q?fgxWy9TtWwfUAH2lYYI+tc4NBQzdC8NhHQ9tFBC2CSvtF6ahFgEVBYuA05CL?= =?iso-8859-1?q?lswg4K5/3vUBL7i27W1JhX93OsVAjERHc3u19MKg8fQxvJVNMqJeknLpmCMd?= =?iso-8859-1?q?MnbCan/R46tHjX31izCLGWsxKjhwiXMDFWzmnvYoEoqE6JLDus45SHxe+ajm?= =?iso-8859-1?q?tOLzy2BsRoIwcrmRBTsmJx+Xl4NOTr0dAVWI8huU67ubEt7UPaClAhM3cEiw?= =?iso-8859-1?q?XMWcapYNdQyVEPCPlPWyIF12vCUT6eo1KPXyTC+rW5KgjxAfRXMtl3J22zEF?= =?iso-8859-1?q?dEDfPJtwqgy0cgd3yhraCAghb4MUoTqrbWQcOXZjFA2Of+gjJC2zCqVtpmrT?= =?iso-8859-1?q?yxLvJhTiepwOMZFgDB7cBiKHhQWFnyGg+meBknDRevynLYDeTm9BAeZTFXQJ?= =?iso-8859-1?q?aH12pGjoso1++84LW?= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4a069a8-d882-4126-f68d-08db88f04d9c X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2023 07:09:47.8689 (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: 7Qcz9C40WP9mnaMgeQCtQ+xJ4QQ7aiVT34r0bKJXl8csIUNGpv961W8gRWXuKbw1h7clOMR9hcyYHK2zm2mkYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8307 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230720_000955_406576_BDA899BC X-CRM114-Status: GOOD ( 12.15 ) 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 series aims to add MIPI DSI support for Freescale i.MX93 SoC. There is a Synopsys DesignWare MIPI DSI host controller and a Synopsys Designware MIPI DPHY embedded in i.MX93. Some configurations and extensions to them are controlled by i.MX93 media blk-ctrl. Add a DRM bridge for i.MX93 MIPI DSI by using existing DW MIPI DSI bridge helpers and implementing i.MX93 MIPI DSI specific extensions. Note that since this series touches the dw-mipi-dsi driver, tests are needed to be done for meson, rockchip and stm. Patch 1 ~ 7 do preparation work for adding i.MX93 MIPI DSI DRM bridge driver. Patch 8 adds DT-binding documentation for i.MX93 MIPI DSI. Patch 9 adds i.MX93 MIPI DSI DRM bridge. v1->v2: * Add Rob's R-b tag on patch 8. * Use dev_err_probe() to replace DRM_DEV_ERROR() in patch 9. (Sam and Alexander) * Use dev_*() to replace DRM_*() in patch 9. (Sam) * Fix build for arm architecture in patch 9. (Reported-by: kernel test robot ) * Improve error messages for imx93_dsi_phy_init() in patch 9. Liu Ying (9): drm/bridge: synopsys: dw-mipi-dsi: Add dw_mipi_dsi_get_bridge() helper drm/bridge: synopsys: dw-mipi-dsi: Add input bus format negotiation support drm/bridge: synopsys: dw-mipi-dsi: Force input bus flags drm/bridge: synopsys: dw-mipi-dsi: Add mode fixup support drm/bridge: synopsys: dw-mipi-dsi: Use pixel clock rate to calculate lbcc drm/bridge: synopsys: dw-mipi-dsi: Set minimum lane byte clock cycles for HSA and HBP drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check dt-bindings: display: bridge: Document Freescale i.MX93 MIPI DSI drm/bridge: imx: Add i.MX93 MIPI DSI support .../display/bridge/fsl,imx93-mipi-dsi.yaml | 115 +++ drivers/gpu/drm/bridge/imx/Kconfig | 10 + drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c | 917 ++++++++++++++++++ drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 91 +- include/drm/bridge/dw_mipi_dsi.h | 16 + 6 files changed, 1146 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/bridge/fsl,imx93-mipi-dsi.yaml create mode 100644 drivers/gpu/drm/bridge/imx/imx93-mipi-dsi.c