From patchwork Mon Aug 21 03:39:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13359027 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 E0AC4EE49AF for ; Mon, 21 Aug 2023 03:37:12 +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=7ayAp5sXi7uk3LjbCM2W0TXgzl+XOFq/UQ65sqAnwWo=; b=DUdtCvCWFbikJl IxEyBPMnvzK7gKaGDfN6fgmJta5yv41nj2lgQMbp6D/aQTqBwMuPfb25MisD6o6tJ+gCI/eGf/XkN huUCdwBnV8/NvivgaMmsnlZ9GeRWVAUyymdnOJlT4veNY7XSZJD8RO0HZSmWNrVqweXVGNd0uzs/G rnd73m3Ui+wea4lDUS0QVUeiJe0x4JyAd9wSs4Ic5qL/pFtBW7VmN/++aPe65gZJLBQ/tMXfOOKpM yqreOZQxnSdiz3R6VQPolVE7dnvwTnsYS9WfpVR9VF7Bpfh/REpkonMZ56afHLStuOg922yMbdvE5 Nk4sxsjjACCDU8eIpJeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qXvih-00Czyq-2n; Mon, 21 Aug 2023 03:36:47 +0000 Received: from mail-dbaeur03on20619.outbound.protection.outlook.com ([2a01:111:f400:fe1a::619] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qXvig-00CzyA-02 for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2023 03:36:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zn8F1uaiBjdbkVhMv/sBNqzFJsGimYf85ioxBbL642QJv4CS9UZrkM0k5ucOwGIvq3h7JjCtOL7qV7SrZ4kw0TvL1UOYMR0caOcdvW34MTj0DI5kNQ7kASfmvaiPFom50o673bqaREuGy3aBrH9N6G333jB9v4zig4qK+pyunjcrV+mrNC60xH2v3sjZCfF4K1VvFapQRLDm91429N7XpagURjqItTv9sIPHGhnPtHVFGcfWgFnA9wjFmeNjDfSJ09d0pr3dBAJXhuG+09RJFTHR9wDYnxRZ0v5bWj3WP9YZQ6Br9CiUEB4QlcvOYbieI1ucEo8Waod3jI4Mn6KTgg== 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=6bhD1OyOCk/b7xDxt1Sh/+n1tKYgcSDjTVOJ/0h9TnU=; b=ApsS6AZihdiT125Kfo/J9KE+alk4ulVakvvNPIXgT/55XsP+cISDi6/DTmPRv0rWeQhkoHr43P5ziH/A6fc9zNvpozKR1pVRM3/60orMofCZaaDyCMx0wX+f7K/f3uCc+3g86pb8VFtXwlfuQXjqH4PK/Mok846BZ//NJhvDdDyek4GixHYXXjYc2lcizNOloYNNi8HoRbqE/R2l9ASCWkd7KMkXTZH2Z5RO767+glY7wzTASuFA4LwSBygyJ6jLX1PkgF4W7nyFWfzyXaEfa902Ny7guGTENV/zeRuplXPetAdPPJlBT9YloCPZlIUG0BV2zETmW5mFGCPtE7iuIQ== 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=6bhD1OyOCk/b7xDxt1Sh/+n1tKYgcSDjTVOJ/0h9TnU=; b=B38AK5OoTcwLJ0eZYJfmvC49kwM7vj+ccj2uplv6pBlMEfi7N3RIa6vL2tFyxFOMgRJXd6cVTPFBaLKv842tXq943IyWQWnd5ca5jPYTAGLMg4TUiQkOZwOUInoihWptYq8G4sihYTU8hqFzOUgg3TADfZDaEpi77+ZoxoKKmRQ= 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 PA4PR04MB7758.eurprd04.prod.outlook.com (2603:10a6:102:c4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20; Mon, 21 Aug 2023 03:36:42 +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.6699.022; Mon, 21 Aug 2023 03:36:42 +0000 From: Liu Ying 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, linux-imx@nxp.com, alexander.stein@ew.tq-group.com, sam@ravnborg.org, jagan@amarulasolutions.com, yannick.fertre@foss.st.com, raphael.gallais-pou@foss.st.com, philippe.cornu@foss.st.com, hjc@rock-chips.com, heiko@sntech.de, zyw@rock-chips.com Subject: [PATCH v3 RESEND 0/9] drm/bridge: imx: Add i.MX93 MIPI DSI support Date: Mon, 21 Aug 2023 11:39:59 +0800 Message-Id: <20230821034008.3876938-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2P153CA0025.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB7758:EE_ X-MS-Office365-Filtering-Correlation-Id: 457c5798-8a49-4f74-c020-08dba1f7d5a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GW0jEmyJiOBXvkubE3AmAz5CSKr8r1AkdLJrW9bmbLomT4WbnB6lrjXoHSTzA3SqXylUyQkYKHvt40HoPXVaEpBYSZt29Rlv4CYToVS+qR+uz6YGsTrWFO/VoCtC3cjcJK6deZ6unEO48rO4e8WDKRWKC2ezY3OZIugrjWt+/iHXVC8vzf3umoS771hqyOkg3ybiHRaDWO684K/3yMuboXN5OI3v5UibNWC8cgnS+d1NaO8R8ZrPlLqALmDSdWJoVDQRklbooCVTUD1mMDF26bYy0pvGM8Dy4zaEVhFbOYEbQ6ZWHSirr7wENeyXx7vHk/pmpriQ5BGaaU0O2TvHpjk2zZAk9ygJPfMw1fGi0lEIawABWAYOpV90aS8+CU0pnAtEoOD/a/ICQ5VPUg960Oqh7/Pe626gJ1kbkUwPPSuC+PQaXXGKnn7NxxV+fH8gW150HWg4BIXM1klYWK/lA8VQ3APSI8LCWEU6SNNN9TD2yAmHnXn1s2Q5CtjzT4VLz+ZYo4ng1dIQ1Wxmj+diSaZlu5oqfiSlJfyS275oBSmfNYp5IST/T6UeKBqx6wxVzUE8yuLwK9sk8fKtaGJlyCWrP7aq7bn0UW0WwohWlaK1lmWAtsKQHY3qGG/Mgd4J 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:(13230031)(376002)(39860400002)(136003)(396003)(366004)(346002)(186009)(1800799009)(451199024)(1076003)(2616005)(26005)(6512007)(38350700002)(38100700002)(36756003)(86362001)(83380400001)(316002)(8936002)(8676002)(41300700001)(66476007)(66556008)(66946007)(2906002)(4326008)(478600001)(7416002)(6506007)(6486002)(6666004)(52116002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QrWdUlQ0vTNALiNJWMiJ+RnLFALido9kbq/NnKdW23Cs/pRGgEEvgtz+4+2ujFHHuJWweh0zXCdLqhhug7tc+raIeZnYGyFthBYwayzJ63NVC8F0j1R1gxxA7GMVdsKDH5szgU0wvHZliVwdcFBZPM82fBlGQfOiZFy1aZMieksHJvpN0qBW5gZ84ZlHZzWD6gP/qZTysCycV2P2hIiUtaIUWdT1tt2W2uAF/QDrp4BiENJEahd84SdiOsGSuOm29IzUaoxObHliwCvLb8tT0kjLajdM8Vh+dvp/00MWL0EtYXbK9cgqj+fC3sqbm5rZJ0GdZCXv3FCPwTnVVlZT2noSTLamXzpluOw8KKOLv5pdrGPYazV8BjmoL9m3eqoqNyT8hvBrQfT1nTPXuOscrHlrWACrDRMdzQ4UKMngr/DVbKJyBGkKVLQubEThPhgxvFSPAQTGNVZh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co1/6a9Xm6DIaM0z9AQwb5YGbenB+MmE6PLCCZzQyIlvgCg4Gx1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 457c5798-8a49-4f74-c020-08dba1f7d5a3 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2023 03:36:41.9069 (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: gJ772wq5VXKf9zwvbiLuHdIWEzufqgH56pLBlPWvBt3Qf1GXkPUXz2lp60rnX7Oqt/CWLwBJMvk+BvNCUoahnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7758 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230820_203646_122957_9C35A738 X-CRM114-Status: GOOD ( 11.95 ) 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. v2->v3: * Add Neil's R-b tags from v1 on patch 5/6/7. * Select GENERIC_PHY to fix Kconfig warning for GENERIC_PHY_MIPI_DPHY dependency in patch 9. * Cc stm and rockchip folks. * Resend based on the latest drm-misc-next. 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 | 11 + 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, 1147 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 base-commit: 25205087df1ffe06ccea9302944ed1f77dc68c6f