From patchwork Mon Aug 7 05:25: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: 13343011 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 77CA1C00528 for ; Mon, 7 Aug 2023 05:22:29 +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=1XwFi4zWXKeazOG2socrguconzKk12/gdSVCGMHIxQ8=; b=MrHE7yuJarX+Jl grTi3EMEVk6W9AO0iIrAfWqsbe+u9f26GySQP/6SHNeIDpUKVDlzVjbMAqBoxnh4Kph9y5giHu5YD DW75ZETrwqi4EXMTFSZ4buEav8jAaboUQi3AiDOelnvW1wtIYG2IKcfgLQqohHxBBvkb+GEmdX8S/ K251m3OXwkhifGmMoo1QfYPuyZFVYJSXnjictt2R+Gy7RqAJ+w/QurIO8i4UMBA8i56oj8StHIY5K SgvQK3uVZ3ifYbzmrcVUaQSlu05PaEGHnOCzmlj1pdZSiVZEpYfUHCbFvKL9Wm9Ga3yHBvyyFS/2R KrKR1G2Qunfd2s0s2e7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSsgt-00GAOO-0M; Mon, 07 Aug 2023 05:22:03 +0000 Received: from mail-db8eur05on2062d.outbound.protection.outlook.com ([2a01:111:f400:7e1a::62d] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSsgq-00GAMa-02 for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 05:22:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADg+ckB3mQc6gOxcmx4zAFwo3jd7cTgOK9qlnWJV+HUKysPgF2VhvfdtN7A+gm5uvk/6rIeHjYRgyu6XcrG9/M4a5p6YWhKDZvQ7g3B2AkZqIgJ7mG1W5c6fzve0Nyt+YPNc1i3npGI71T1VXGi+hy3uKhL/iHm3yo3T6cx2qK5YTMRfzYxzE6kXiA6taNCnVgclhxTkx3RNyQsWBxrd8Nh0IG0NxMzD3Bzh9x67KK8RPa+SK58XZJp/IJTYUgIMep4WqlE74LQpid+tTVpjSaRWNyCecUZY6oCnp/5PKfXIQr6zI+k0rONUzJLd4oKLOkDDPp2ZQtGSw8bsAGHThA== 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=cPWD0gJ54n4Q0L/+NQ3lHFLKq5bbpu8o16/baztsCf8=; b=J95hMTz1ra/jtbxiD/ae01k0Y/GXho2rYeUltUR0Z0BtexUsPyr3QGZO5Aro9yAPr7Sn4mV0NY3xFTRjrLuXrml+R3tCW/ObMAQNQDhFIkYiOWDKtsxqLyQ2iuE/5qhP2iLMRsUKRdtsF4/WORh8Sx9F3+LBdessq0kENN0k9N0YkDHp3eU0fTeEMgrXq6sPG2YnrBs7IlA2v1fd6o9JXxtmM/RB+bkJO4VQAxmbZx3FRjGLudSQmzIPdLTiISTDA8Cn9/N2Asd+71etvFkiCsbbrSflaicAHkblrXJzu3XysRFCGsqv7L+9MDHgxKpdp28cQM78WxspS1OzW6f9ow== 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=cPWD0gJ54n4Q0L/+NQ3lHFLKq5bbpu8o16/baztsCf8=; b=LL2lyY+lr9Eh7H7vWO0V0BGcYluOh59uNubCT/vPxwBHytneDwoxX/pJkLSl3vFvxnRcrF3uPiFa5kmBt5wxb+WlHAnxL1YZiG+A8gUshN2VuJ2uT8wKLO+X1hwk8L+VsPbltTlU3Y8VPFL68ItN3Ha1a8iCT56rH3/ldCUxtWo= 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 DB9PR04MB9701.eurprd04.prod.outlook.com (2603:10a6:10:300::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Mon, 7 Aug 2023 05:21:45 +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.6652.026; Mon, 7 Aug 2023 05:21:45 +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 0/9] drm/bridge: imx: Add i.MX93 MIPI DSI support Date: Mon, 7 Aug 2023 13:25:59 +0800 Message-Id: <20230807052608.3038698-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2PR01CA0006.apcprd01.prod.exchangelabs.com (2603:1096:4:191::14) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9701:EE_ X-MS-Office365-Filtering-Correlation-Id: 28f06593-244a-4266-608e-08db9706311a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yiz0e8iRPzUDwn1bxMjuXN8cA+0BdLxPwuAMRfWfB1w2K1xNx1UtgJZk/wC/hDAh9h7gQc7IlGND7zG/fq/9Qn9T+1jNQXSxt3Kh6mpbPBnZmmAqPc3jymm2fDh6WHTJLIt6em8VngJTfHQn36vEjE+HGeGbnIlRgleRJERWVqMdXkH70aMkj4WA2iY69/bXdygfO2N+3HiH2HXptY12FPy5kz2VrSfdeH5oOR0g1OVTPx/7k2NOZ28adpStXFic+az7XsDOnfcM1y8XUqpQjaxfYyWcwBmLlgJ6wTbqiOnlJP4W2CoApx+BaiQLjhxGpzW/S7nC1kSeIx4HuSXJVS91M5I5zw4j2RMcTisPkGRDfpCXLeFewBxmQHkVjW13SBWNcUpaTkCgkzr3YpH2P7SAeBWP6+aFkGvhfEpTGs807gH/IIwXwkDngA/vpQQeFDv8mt+NrmH3uWeysheXe1urhtq2J/Ry2+URpzCfwwC6IYjxrPY7LXVMQmpSQiWooLXeOhak6hHqt5YVaGZHG70lh1Z3EzK0IOV3uc7mT1rGYjOmrubYzs8DILKNnJihnQw6W7ttBWZMo4GJnJMHLj/QKKkKvb//KpRBtGDxQwnIdrdLuTVOjam62pJ2G5qw 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)(366004)(39860400002)(346002)(376002)(136003)(396003)(451199021)(1800799003)(186006)(2906002)(36756003)(83380400001)(5660300002)(2616005)(6666004)(52116002)(38100700002)(38350700002)(6486002)(66476007)(66556008)(66946007)(6512007)(4326008)(316002)(41300700001)(86362001)(8936002)(8676002)(26005)(7416002)(1076003)(6506007)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /0YJESaeVnlL0w6hF/WG8TSf71SzT2LrX6704NmFI2kzM/18kxdHpeX3mDpQcQKECBgDGiaqx58UW7luq8U1blykOdUFONu4alfQZjdkU0ddKPySktFLzKVqpwF3FJ8SClhJLp9knYreorrVY1YLHl0bshPJcC53cxgCvWA7yGzHRrVvt4xSY8lgTOcsmH/wFuBVWqlnnH8GOIh2F4qCY6znJY1ZevdY+Jm0RltEv0OBoQCPKHir6XtuZpRRUd2BpPtZ140O1QFNVwxROu9B2PzGIBPhV4KpV4HyknHLXhP3OUe0MLPky3DDtsj9OzhFdqEtChql+pP2HSYPpcsLK+3zJ/McJwZIO6MQs2sJKFlNNqh6wb7GG4vfs2XTOA0Cdxa2yoWu7W0smEBDNjqIURAdfkGk7qQ60aEiVNslFXoaXfsdAx10ZtMpQkMNmMmmKvuOTUy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wEpGfzOx2l9oyz+f4lgBXxtovdpsV7xuJ5USgTwtmNDNxlW99ZAFulyRu0x7dj5eO0RBpPyB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28f06593-244a-4266-608e-08db9706311a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 05:21:45.4852 (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: f4+nkTLj/5hezfgGddvNk69N7mP4ROTUJjDoAt/CKRTr84nrGDlnQ7rkW9517+ls50cuHDxxViXXk8MWyy8hbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9701 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230806_222200_132821_5763EDD8 X-CRM114-Status: GOOD ( 12.03 ) 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. 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