From patchwork Tue Jun 27 06:20:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "G.N. Zhou (OSS)" X-Patchwork-Id: 92743 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qE1zn-008XcE-Pk; Tue, 27 Jun 2023 06:16:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230112AbjF0GQJ (ORCPT + 1 other); Tue, 27 Jun 2023 02:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjF0GQE (ORCPT ); Tue, 27 Jun 2023 02:16:04 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C5D82115; Mon, 26 Jun 2023 23:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gwd5qwk+OFHUY298hPdmRrLVgqFLeSEB3fhnyBqw8IiP0+RYpSlvC+vsdR6lDMXnJAOSmocaZwEuJ2ZiXPjzyHgZjCDyWAf+yPmoCKJbYrm79pMJifRAHEl4H1XaGva6fJesSwaf3aYBYD/RCbiYqj//FHvr5taudw0NfZBWvfC7YIvUr9ji8mw8qzBCHJ7JtCOqHMaAA5FfK/FJ4Jkyok324JTLqXRBiJBl0JtAXvxxP/Fe2cG0Q0HkFP/BYQDT5EhjzA7F5aQ3GxKEkWLVy+R/SX75A33OKFZziz7ENhYLBXlqeZ4On6g9Bkk3HDcwljpLowM1C7pfwKGgBawO3g== 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=W51bwjDDfB9q1THw6i3Y2SDwyyfbQwaMbZjg7qwpW3U=; b=QXTEdPiuOZ9pRrWTk4jf0JebtVfiojdTcit1SpOZilxGvKmQMveryWRVO0250yVl2xXre9SobLJ941/8RCDN5tUSOK3JBeMPdA3J84V2/zvvoFga6tnm88R15W4G/3SRmH30CKjOsDa9Qbre2oOZeEHZW8274fiNnesQauPPiHbI/mK8ACOPYAW4Rcdi2Otyw6RnrJKFoAAyEvTABfV3rfM0lPckKVXkzBxY3hNDTelWnouPWu75+qoY8r/TOkwTirHZbT7LIQN9jCTdNfm07PyGFgdFbcUt49brTMPe3WLMPbk9kdM7LCr4PjKqr4NITcYcoFtjatcv8A2CceqyDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W51bwjDDfB9q1THw6i3Y2SDwyyfbQwaMbZjg7qwpW3U=; b=VHwnkJCikFHFNCetbBWBLYTE4BiLGqCGaObtOCwHTxS4/Rij0P/oKBoUr1Py3kLJRBPgoPhjzybjGPjHyt46A97K4OsHVmFhWtcLX6DJe0/rg8d8ZR1PDi7X+W7EoHbqtI50W9jV5n+QPm/A0GblkmbZyEwF3gkx2uKKCZBj3JM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) by DB8PR04MB7004.eurprd04.prod.outlook.com (2603:10a6:10:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Tue, 27 Jun 2023 06:15:39 +0000 Received: from AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219]) by AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219%3]) with mapi id 15.20.6521.023; Tue, 27 Jun 2023 06:15:39 +0000 From: guoniu.zhou@oss.nxp.com To: linux-media@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, xavier.roumegue@oss.nxp.com, kernel@pengutronix.de, jacopo.mondi@ideasonboard.com, sakari.ailus@linux.intel.com Subject: [PATCH v3 1/3] media: dt-bindings: nxp,imx8-isi: add i.MX93 ISI compatible string Date: Tue, 27 Jun 2023 14:20:15 +0800 Message-Id: <20230627062017.1135114-2-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> References: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0032.apcprd01.prod.exchangelabs.com (2603:1096:4:192::18) To AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB9080:EE_|DB8PR04MB7004:EE_ X-MS-Office365-Filtering-Correlation-Id: 970c9c2a-4608-44b4-d551-08db76d5ed93 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nvg8a0gz3UKDg86enDeyOrFlTnSgOgDZdATT4eNFt6MA7+WMUfvvJJdoUIlSvWVJvgk2nEHYntOwo98jLwNTEvlafdjgawPSfvfZLBuVgsdSrJBZiklSLmmeZ6lnOcPelVxxU4nTYXngna6n0/ZG0/8Oaof5Tr3OXSViXJ6vKXqhKjtu9nIY235G9Lyn1jT7E7dR9EomuVteaqNuMcQVwAF6/QdUN9YXhnxgDJUT7Eedt0RKWZY1yhuoUyGZ/S6zPx/Q0qcZLD3hUR5k+wfQTumT2BP/HbzCt0cBOt9rV550NoBEJS02HxqSbntMSYQ+KmZPYBiA0m+MjEeL8QgmdsGjouEnuomipGHlk0iBc0TUj/QjtNg4w61SA1z3Lvj4XnfhSG3Lxak8mzj2yLTMXS08BYrtnY7MpabouSXIdxuOoOo4b4jHE1K8BIumW+smNEx9DjY2IBrl8oSR/sq8MPDEIhBvwwD8JWilwYPIoCF2A1AZ1xSlZijJpk/KDYPyZLPR5BlMrEGy63O5nmfRPm37Hda28YsfNHKJxtYKd1WNFQXB08WSOP5PrlICuKYehAweb8LsoEUZkR59nFAdh5/5Uyg+G1F5JLX3ENhWV4C4+ijCQmBWmDU7R902BWBs X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB9080.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(376002)(346002)(136003)(396003)(451199021)(186003)(4744005)(2906002)(26005)(1076003)(52116002)(38350700002)(2616005)(38100700002)(6512007)(6506007)(5660300002)(41300700001)(9686003)(66556008)(83380400001)(66476007)(66946007)(8936002)(8676002)(6666004)(7416002)(316002)(478600001)(86362001)(6486002)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bbn36VA8rXgdU2D7MTn4yXkHTts4zrI2SFuOmP1CVLTwkv8aOYYz58nCHTbDLXG2ZI8Hl/p0BC/tjbUx4M1TYDdJkC18hNLk4xkZ40qsMEPEy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N3YzwD5zH0YvmjqRwv/U6T/0nJe0Xh50w+tiq6oZl6AI9VxdOPUCd/VRErRIoCqI/c0+5Ptx+NleL7zkkQZ/abM2y9AOUfadVH9G6zphU0NumVAMXCsCtxCYCaK4oD5Qwv3i1V/ulN1RPO7+f89Edl7cuiOwKtQxElO+Dj4aitPFDdgcQHvYIzStihzU787V0McVhYOrcL1gWgE5pPRy1fgZxrDlOTIrexEt5m2hZxG3ZGewqg8ubgiOZeOM3xGipOUkUt2hQm4O37e/df8mWBUPqD49wn7TuQRk68UefeMKaLIDx1sXcegiuzVZJr5NiOymbA+b1Ge8bXa0c+Iw3wCdM6fyLnlnm3S9gkHpKetktRy5qQ8bVWqbvdihYwsfgYd+ZxgJnARWRao3npwfp X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 970c9c2a-4608-44b4-d551-08db76d5ed93 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2023 06:15:39.2093 (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: xpy4fbEBIfhtfGk9aXrw/OSLQMOcQLQeuvszOvnfRiyNcgBywJ2VbzM96n6kcCqVVAtvfBdLbrJX4pQMbUStwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7004 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-media@vger.kernel.org X-LSpam-Score: -4.7 (----) X-LSpam-Report: No, score=-4.7 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_MED=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no From: "Guoniu.zhou" Add the compatible string support for i.MX93 ISI. Signed-off-by: Guoniu.zhou Acked-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart --- Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml index 6038b9b5ab36..e4665469a86c 100644 --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml @@ -21,6 +21,7 @@ properties: enum: - fsl,imx8mn-isi - fsl,imx8mp-isi + - fsl,imx93-isi reg: maxItems: 1 @@ -72,7 +73,9 @@ allOf: properties: compatible: contains: - const: fsl,imx8mn-isi + enum: + - fsl,imx8mn-isi + - fsl,imx93-isi then: properties: interrupts: From patchwork Tue Jun 27 06:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "G.N. Zhou (OSS)" X-Patchwork-Id: 92744 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qE1zp-008XcE-J3; Tue, 27 Jun 2023 06:16:14 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbjF0GQL (ORCPT + 1 other); Tue, 27 Jun 2023 02:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjF0GQE (ORCPT ); Tue, 27 Jun 2023 02:16:04 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E4DA2130; Mon, 26 Jun 2023 23:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=idQ6M2a7WsFqh2BCBmyTYJfrW42IvAiNp3dWv+neHb+gQwkFGHRf1++7G1zs+TjW6430AKvpaYsOEXSBAfgax8PXYk0OxLjSnM28cft5+qtt2K8DH98p0Jz4sJpQpIPXFYlFv8OLK1zpaD6N/YinZxJl96uoq7JhADGxKsfSsMfXp3rGLnCNg86CUqGq7VFmtUTy/s+Z+r9TgSt9BPC2+/UlN7OF9qyXEMr3ug35XweDELAFKSkEMtc6C6jtW74R81A+g6VzF4x7LW42g5+jSSENRqexuBM7dzoZChA9d/6oRXMAq0t3NWE7wHvOXz59hn24ouoi1q2UuvyK/e6bQg== 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=PEBbF8WWwTjsVMBwGVP7uSxbmtxBJgm1qBL4f5ekEaI=; b=j4UGJFtKntH82ufWyl3gN3Po+vBwJ+Z508JexvYFgeIcBz3g4+VYW6rm6Vdq0ieq7lL40quGwvEPGnBniVfz/U8gikMsZgLtk5CrN4rkP99Ea3lrO23j7VrtlECT3QYyXiVfx+bQ/D+R1CcGuN3XluflYG0MzPGYepm5Djp5nEofL7U6nuL1vQ8dlNBSxQv5xhdv4N2gXaADal1DjvuHiTLm3kzmYceEyh+4vUcb1TaoeSnbUWSGkrwp3OCNdCV6H2mLQU/nAoWe/XVgSfaMyX3duLiyqjEtglKyCo17mmJpjoLKtbdrgAVkMroECSBMIa59NMKhjFNrMK57QBcJfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PEBbF8WWwTjsVMBwGVP7uSxbmtxBJgm1qBL4f5ekEaI=; b=HXfzvpebHFVtbeCOdoyeejIJcuTTvd4AOhpQ/UstgoThB7n0/5w7raOYEgmgnMcpSgpbWaLr1b09hUlM9nCTKXRd9cAvYQNPAsKp8WL36LYDJ/mOIYr1t/4BImSRqEJad6vbepEq7bLZ9SdiLQVHL9PLKphd82jUREuppW6DZzI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) by DB8PR04MB7004.eurprd04.prod.outlook.com (2603:10a6:10:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Tue, 27 Jun 2023 06:15:43 +0000 Received: from AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219]) by AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219%3]) with mapi id 15.20.6521.023; Tue, 27 Jun 2023 06:15:43 +0000 From: guoniu.zhou@oss.nxp.com To: linux-media@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, xavier.roumegue@oss.nxp.com, kernel@pengutronix.de, jacopo.mondi@ideasonboard.com, sakari.ailus@linux.intel.com Subject: [PATCH v3 2/3] media: nxp: imx8-isi: move i.MX8 gasket configuration to an ops structure Date: Tue, 27 Jun 2023 14:20:16 +0800 Message-Id: <20230627062017.1135114-3-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> References: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0032.apcprd01.prod.exchangelabs.com (2603:1096:4:192::18) To AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB9080:EE_|DB8PR04MB7004:EE_ X-MS-Office365-Filtering-Correlation-Id: c3ae004f-e36c-40d0-772b-08db76d5efd9 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HCjvWZcog2Q8/ERfG08VpmApgytf0ZbQ6+yhlN1g1DZYf+GTfATDFdTEEqZBlVlrsmQppCM7Q+x0IikFLqAaALJ4U1Zvx38Cf2hOkQ8NMf+FwZW6XkPNculqqs8QZlyIw+duZ4yyuGp7imTei4RgejEY493GnsxiWbYaxyLAH5u86ErFkurCiXfTknE+7S7pFLECDYSLyTDzjq56QktUsYxVCWI0TzbLJGqoGaIWEc3IiRvli40VN1OJ9MMw2VOs9U9cci3UqFJujUB7MJC5MtYCbjZ5nkRGDYEhV3G2RWs8TvGJYOcD2VGkttrDDyzVW/Gf0htiQdD3T4FmFHRrTeeLCH9jxr8F2idZLTt5LrWWb0nXceRAnaEkX/eXm3H0nRZ2iNX5Nqv0FvJae0FGChyicGQIDc/WDDGCKAfze99QMEttGUYzQfzSWvMer2B2liqFM+WfkE07rGxwRiycofKgx9/2yZWOvR2cWoiJIia/tNA9tFzbGIzVgIbhmOk/CEXawAYxcS8ikVpi7WxmlD6iICe26L8qZP7Eypv+amna1a/fZ7KSYVbVhWLM2Anhp8V0JVGH49jJT7ZSP5IyEn13VkVoFs5+nx9UswblT8Cy0+NfxvpLq3zeCcf8r5cK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB9080.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(376002)(346002)(136003)(396003)(451199021)(186003)(2906002)(26005)(1076003)(52116002)(38350700002)(2616005)(38100700002)(6512007)(6506007)(5660300002)(41300700001)(9686003)(66556008)(83380400001)(66476007)(66946007)(8936002)(8676002)(6666004)(7416002)(316002)(478600001)(86362001)(6486002)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WDGN+zafHGr8vg1e0fSYnvXLR32OQehwUEvRRmJjZcxIHXaR6GMJCu01WqUT794wBRknkRVjVGEWohuFJeOPCgsUjmjuhmewhUUsUVXhYmBJxgUsQPfOaoMhP3f3f4UP2pHugT++MJ4zx5rYEVz+ujNFPVLpl8L70pPM9J86YrXdaiqGbnejT1AIYePgBWY9fss5lrbu5z4cen6JEXMzDP8rlzWPK8303+ne7FzIvYw/0DYscBklLwSbyMLCzUSUEYjZLrkTRN0p8aKBZyHZNItl6phxLhUH6ZsGxmYQ2wrOfI/+22mPbQZTDKVsNB/anOTbbtJ3zBdCSmoTx4Hv3YUoRueM8eQUdFcPm/aKeaW/RXgLoDgntUIVGqDRs4wFIBT8qfHrWtWuYr7TwW32/cZe7M5VWN70u/q62x7R5+dB5nyWOx/8G7yFOaxj/jyZJoe1wMotGHqpJPnUGT7gom6Q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IZaCJNUwzfBjadwp15ec9y2Pf999oLRJp6jwJ4Kw2a+c95tu707Rd X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3ae004f-e36c-40d0-772b-08db76d5efd9 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2023 06:15:42.9897 (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: DtiDkAEWvR5SgJcst8F7eqE/RFxOPLytAh4DsxQ9LO7Q/v8gapzaNfiiuI0WkG7r6WZv8hNX5JuFerKKeYbW5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7004 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-media@vger.kernel.org X-LSpam-Score: -4.7 (----) X-LSpam-Report: No, score=-4.7 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_MED=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no From: "Guoniu.zhou" Move i.MX8MN and i.MX8MP gasket configuration to an ops structure. Signed-off-by: Guoniu.zhou --- drivers/media/platform/nxp/imx8-isi/Makefile | 2 +- .../platform/nxp/imx8-isi/imx8-isi-core.c | 12 ++++-- .../platform/nxp/imx8-isi/imx8-isi-core.h | 30 ++++++++++++- .../platform/nxp/imx8-isi/imx8-isi-crossbar.c | 42 +++++++------------ .../platform/nxp/imx8-isi/imx8-isi-gasket.c | 32 ++++++++++++++ 5 files changed, 85 insertions(+), 33 deletions(-) diff --git a/drivers/media/platform/nxp/imx8-isi/Makefile b/drivers/media/platform/nxp/imx8-isi/Makefile index 9bff9297686d..4376e8e0c962 100644 --- a/drivers/media/platform/nxp/imx8-isi/Makefile +++ b/drivers/media/platform/nxp/imx8-isi/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only imx8-isi-y := imx8-isi-core.o imx8-isi-crossbar.o imx8-isi-hw.o \ - imx8-isi-pipe.o imx8-isi-video.o + imx8-isi-pipe.o imx8-isi-video.o imx8-isi-gasket.o imx8-isi-$(CONFIG_DEBUG_FS) += imx8-isi-debug.o imx8-isi-$(CONFIG_VIDEO_IMX8_ISI_M2M) += imx8-isi-m2m.o diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c index 253e77189b69..d645b2f6fa5a 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -279,6 +279,12 @@ static const struct clk_bulk_data mxc_imx8mn_clks[] = { { .id = "apb" }, }; +/* Gasket operations for i.MX8MN and i.MX8MP */ +static const struct mxc_gasket_ops mxc_imx8_gasket_ops = { + .enable = mxc_imx8_gasket_enable, + .disable = mxc_imx8_gasket_disable, +}; + static const struct mxc_isi_plat_data mxc_imx8mn_data = { .model = MXC_ISI_IMX8MN, .num_ports = 1, @@ -289,7 +295,7 @@ static const struct mxc_isi_plat_data mxc_imx8mn_data = { .clks = mxc_imx8mn_clks, .num_clks = ARRAY_SIZE(mxc_imx8mn_clks), .buf_active_reverse = false, - .has_gasket = true, + .gasket_ops = &mxc_imx8_gasket_ops, .has_36bit_dma = false, }; @@ -303,7 +309,7 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = { .clks = mxc_imx8mn_clks, .num_clks = ARRAY_SIZE(mxc_imx8mn_clks), .buf_active_reverse = true, - .has_gasket = true, + .gasket_ops = &mxc_imx8_gasket_ops, .has_36bit_dma = true, }; @@ -443,7 +449,7 @@ static int mxc_isi_probe(struct platform_device *pdev) return PTR_ERR(isi->regs); } - if (isi->pdata->has_gasket) { + if (isi->pdata->gasket_ops) { isi->gasket = syscon_regmap_lookup_by_phandle(dev->of_node, "fsl,blk-ctrl"); if (IS_ERR(isi->gasket)) { diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h index e469788a9e6c..4f920d650153 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h @@ -12,12 +12,14 @@ #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -59,6 +61,18 @@ struct v4l2_m2m_dev; #define MXC_ISI_M2M "mxc-isi-m2m" #define MXC_MAX_PLANES 3 +/* GASKET (i.MX8MN and i.MX8MP only) */ +#define GASKET_BASE(n) (0x0060 + (n) * 0x30) + +#define GASKET_CTRL 0x0000 +#define GASKET_CTRL_DATA_TYPE(dt) ((dt) << 8) +#define GASKET_CTRL_DATA_TYPE_MASK (0x3f << 8) +#define GASKET_CTRL_DUAL_COMP_ENABLE BIT(1) +#define GASKET_CTRL_ENABLE BIT(0) + +#define GASKET_HSIZE 0x0004 +#define GASKET_VSIZE 0x0008 + struct mxc_isi_dev; struct mxc_isi_m2m_ctx; @@ -147,6 +161,14 @@ struct mxc_isi_set_thd { struct mxc_isi_panic_thd panic_set_thd_v; }; +struct mxc_gasket_ops { + int (*enable)(struct mxc_isi_dev *isi, + const struct v4l2_mbus_frame_desc *fd, + const struct v4l2_mbus_framefmt *fmt, + const unsigned int port); + void (*disable)(struct mxc_isi_dev *isi, const unsigned int port); +}; + enum model { MXC_ISI_IMX8MN, MXC_ISI_IMX8MP, @@ -159,10 +181,10 @@ struct mxc_isi_plat_data { unsigned int reg_offset; const struct mxc_isi_ier_reg *ier_reg; const struct mxc_isi_set_thd *set_thd; + const struct mxc_gasket_ops *gasket_ops; const struct clk_bulk_data *clks; unsigned int num_clks; bool buf_active_reverse; - bool has_gasket; bool has_36bit_dma; }; @@ -379,6 +401,12 @@ void mxc_isi_channel_set_outbuf(struct mxc_isi_pipe *pipe, u32 mxc_isi_channel_irq_status(struct mxc_isi_pipe *pipe, bool clear); void mxc_isi_channel_irq_clear(struct mxc_isi_pipe *pipe); +int mxc_imx8_gasket_enable(struct mxc_isi_dev *isi, + const struct v4l2_mbus_frame_desc *fd, + const struct v4l2_mbus_framefmt *fmt, + const unsigned int port); +void mxc_imx8_gasket_disable(struct mxc_isi_dev *isi, const unsigned int port); + #if IS_ENABLED(CONFIG_DEBUG_FS) void mxc_isi_debug_init(struct mxc_isi_dev *isi); void mxc_isi_debug_cleanup(struct mxc_isi_dev *isi); diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c index f7447b2f4d77..d803fda3fdaf 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c @@ -25,32 +25,18 @@ static inline struct mxc_isi_crossbar *to_isi_crossbar(struct v4l2_subdev *sd) return container_of(sd, struct mxc_isi_crossbar, sd); } -/* ----------------------------------------------------------------------------- - * Media block control (i.MX8MN and i.MX8MP only) - */ -#define GASKET_BASE(n) (0x0060 + (n) * 0x30) - -#define GASKET_CTRL 0x0000 -#define GASKET_CTRL_DATA_TYPE(dt) ((dt) << 8) -#define GASKET_CTRL_DATA_TYPE_MASK (0x3f << 8) -#define GASKET_CTRL_DUAL_COMP_ENABLE BIT(1) -#define GASKET_CTRL_ENABLE BIT(0) - -#define GASKET_HSIZE 0x0004 -#define GASKET_VSIZE 0x0008 - static int mxc_isi_crossbar_gasket_enable(struct mxc_isi_crossbar *xbar, struct v4l2_subdev_state *state, struct v4l2_subdev *remote_sd, u32 remote_pad, unsigned int port) { struct mxc_isi_dev *isi = xbar->isi; + const struct mxc_gasket_ops *gasket_ops = isi->pdata->gasket_ops; const struct v4l2_mbus_framefmt *fmt; struct v4l2_mbus_frame_desc fd; - u32 val; int ret; - if (!isi->pdata->has_gasket) + if (!gasket_ops) return 0; /* @@ -77,16 +63,14 @@ static int mxc_isi_crossbar_gasket_enable(struct mxc_isi_crossbar *xbar, if (!fmt) return -EINVAL; - regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_HSIZE, fmt->width); - regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_VSIZE, fmt->height); - - val = GASKET_CTRL_DATA_TYPE(fd.entry[0].bus.csi2.dt) - | GASKET_CTRL_ENABLE; - - if (fd.entry[0].bus.csi2.dt == MIPI_CSI2_DT_YUV422_8B) - val |= GASKET_CTRL_DUAL_COMP_ENABLE; - - regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, val); + if (gasket_ops->enable) { + ret = gasket_ops->enable(isi, &fd, fmt, port); + if (ret) { + dev_err(isi->dev, + "failed to enable gasket%d\n", port); + return ret; + } + } return 0; } @@ -95,11 +79,13 @@ static void mxc_isi_crossbar_gasket_disable(struct mxc_isi_crossbar *xbar, unsigned int port) { struct mxc_isi_dev *isi = xbar->isi; + const struct mxc_gasket_ops *gasket_ops = isi->pdata->gasket_ops; - if (!isi->pdata->has_gasket) + if (!gasket_ops) return; - regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, 0); + if (gasket_ops->disable) + gasket_ops->disable(isi, port); } /* ----------------------------------------------------------------------------- diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c new file mode 100644 index 000000000000..39f8d0e8b15d --- /dev/null +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019-2023 NXP + */ + +#include "imx8-isi-core.h" + +/* Configure and enable gasket for i.MX8MN and i.MX8P */ +int mxc_imx8_gasket_enable(struct mxc_isi_dev *isi, + const struct v4l2_mbus_frame_desc *fd, + const struct v4l2_mbus_framefmt *fmt, + const unsigned int port) +{ + u32 val; + + regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_HSIZE, fmt->width); + regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_VSIZE, fmt->height); + + val = GASKET_CTRL_DATA_TYPE(fd->entry[0].bus.csi2.dt); + if (fd->entry[0].bus.csi2.dt == MIPI_CSI2_DT_YUV422_8B) + val |= GASKET_CTRL_DUAL_COMP_ENABLE; + + val |= GASKET_CTRL_ENABLE; + regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, val); + return 0; +} + +/* Disable gasket for i.MX8MN and i.MX8P */ +void mxc_imx8_gasket_disable(struct mxc_isi_dev *isi, const unsigned int port) +{ + regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, 0); +} From patchwork Tue Jun 27 06:20:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "G.N. Zhou (OSS)" X-Patchwork-Id: 92745 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qE1zr-008XcE-0g; Tue, 27 Jun 2023 06:16:15 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230073AbjF0GQN (ORCPT + 1 other); Tue, 27 Jun 2023 02:16:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbjF0GQG (ORCPT ); Tue, 27 Jun 2023 02:16:06 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C861268C; Mon, 26 Jun 2023 23:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dpDljuC3E7fjTQvVonYBvnT/FLkCnbBtw5Voe+yAxUTEcx582yRGVxCOpxXZA6DsWOUqAq8IqSTxC4tZqiGTroe/82mm0prYzBb1eK1WfGz3n8ga+9+klXaiihFkT8nvpyt0zG9yXBRCfVsoz45a2gaoQFVdB/Az8Q37yazUXLDBClJwi2Hb3CGGdcQ18lKu9ZJGVD0Q2qkf8lFdn9sJbrpQuryoSQH1MQvxarNFtB/4OIkE69fmPFgZbxp7ESqQu9AepPbKLbqxb9fYj9gWOb1MRLP60lgXnge2Wv1kGavsClWGTqk1Zfu2M4FbYxOkXc9xIuGdyfHy7M7sjbK0IA== 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=sZpoGdRnoWhneV4unAKGgHeoe9cmbYW5fpYmySgPXWk=; b=CdlSLE9v1E0SDCStEKQUuQkCkZgDOkTZVx+pzZLvBFsv1PDMHT5A9OBYvElErgcW/oVfD5jmC4HgS4roWvoBWN56neWWv4M0dBn1DS3qPanR6S9JcaAbFulncOwzbQV8TNVwOZYft1N/2ljo5J9mYNX3FKEvsoUDeoVsHEWo57RGo/pRgIj5UxJJzRRRXHWTCqt1ZBTaD8JMnsPAIOKMtcmhIm+lz/EVgS/e2gGkScdF8iyCYW2GbKlwWSEXD2WMv9DSWxHdUY7zfF7VPmF7OAMQ2yJQJGK0J4M6EIIs/NdhJ7KA54gq2n3znTbMA88oCNjEV3Cih7Uaxe0xPSvQZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sZpoGdRnoWhneV4unAKGgHeoe9cmbYW5fpYmySgPXWk=; b=AA/Bux/ws+hMB+4s8lAEQj+jWqn+jqXE3SljLqUJ0Nhqt3c3mwAy7vHD9ESQwhiQM08kX5VCN7XoSOIxIW8M2RZtFI534Y42q60NRirwTysYamNkGl6tcZ5EVrvspPD9hVZb2D4yM919JOd2ipCkf7fSl0SEY66Zyv822p0ucAo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) by DB8PR04MB7004.eurprd04.prod.outlook.com (2603:10a6:10:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Tue, 27 Jun 2023 06:15:46 +0000 Received: from AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219]) by AS8PR04MB9080.eurprd04.prod.outlook.com ([fe80::1a0c:99b1:603a:e219%3]) with mapi id 15.20.6521.023; Tue, 27 Jun 2023 06:15:46 +0000 From: guoniu.zhou@oss.nxp.com To: linux-media@vger.kernel.org, linux-imx@nxp.com, devicetree@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, mchehab@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, xavier.roumegue@oss.nxp.com, kernel@pengutronix.de, jacopo.mondi@ideasonboard.com, sakari.ailus@linux.intel.com Subject: [PATCH v3 3/3] media: nxp: imx8-isi: add ISI support for i.MX93 Date: Tue, 27 Jun 2023 14:20:17 +0800 Message-Id: <20230627062017.1135114-4-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> References: <20230627062017.1135114-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0032.apcprd01.prod.exchangelabs.com (2603:1096:4:192::18) To AS8PR04MB9080.eurprd04.prod.outlook.com (2603:10a6:20b:447::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB9080:EE_|DB8PR04MB7004:EE_ X-MS-Office365-Filtering-Correlation-Id: c40dc138-882c-45e9-9000-08db76d5f215 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pVa6f77nxhuGPKIW3VsvpxS1GGK89WgUb30CFGfz3KsLU/LGWyGQvt9aGpcA32R09DVJqtsB3a4PqLggFbhxnO1HMFDqJdYNeAIwo+BqqPtgWISK44iSZngq+vp8FJ38OIew5OAOZ9ii4xWC3xfBxBsuWCZG06RL3lJZdQOxiE+pqGk9Caj1YX1UgplMlWqNMsh3uas5KtZ8jDO7cYL0unTaczLj6N3doJK/j5XKMO2YxbEsbx3PECrq8gStBOvLknhHPaJmLntULO84EIwD2+q0hpiXtg5BNWyDseK1XkeO9fQsaxOYrRqnH8JnNvPCwwB2kBQ03JoFNDBOznV4R/VtPmKH8kGMq8k13vDs873lP7pm+NzYy6n06qiTxjjLdcV9kD4kqy042oQW0p7S4W7yZDQoTF6zNm37ICc620LNl/FVGc8k4nu79AVmW31/YhYOWX8idUDhPwqCrOOB5dU1SM/l6YJN+yeZ8wTcqPbKgej54Ebcal1dfbkxtK6kY1R7cLgWfKwth8bByyx3dmD0UeIJavr/2ld6Rsz7guPBymC+MVY7JCuir5hSuhk3E3laUpUw9vY68KfgTg4zF4CAE0OkE8PSUmhQCK444kxN74gTKn7CGTAkdCSerol4 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB9080.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(376002)(346002)(136003)(396003)(451199021)(186003)(2906002)(26005)(1076003)(52116002)(38350700002)(2616005)(38100700002)(6512007)(6506007)(5660300002)(41300700001)(9686003)(66556008)(83380400001)(66476007)(66946007)(8936002)(8676002)(6666004)(7416002)(316002)(478600001)(86362001)(6486002)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: asPZjbOM9PpAuqUON3aQ8v3ON3DDPe9qdIImyVX9SA4BD3+fC3gVglGB5yb0/45++7crz8AcVOrG1bawCCJPp87JLHnt1/Z0IqcBXFHkGtGIa9ZNPiwKnU1JOcanodF1YHOVoRE3zqQIAlH3RHrnILZzhaKJq5qVURPvcUix0NudrU/uVuPtJxOBRqCf0R2lqQvGNVrf8pOurCfdNzBKAVQvf9MvoogqxV9zmzXTh7q3KyYCRJE2rofBnN29vt+QvqyJLvWEP+R4bWqF5EyJQjym5j01+VFRBmH0kPC1cyCgLNjxHVI7aYsEJRqQVqfkQd3N63s52rQ99Zmnjgsp9LcW+KFIJJ2VysXLeLb/TAEnqXE0YlQ2EjLMRh6wEp1RZp1yLcprLeufpwnmZalPiwOmPmc1zpNt8Mz0uJ85Qu4igmIjzR4Usu6M92aSaWKaa5/5kyz0d2NpEahAbkZzvZNArUiKRyZWsCGeiS7U6EpseipznYH4nlHTy4iqqgdHOIIBqAt/JoII228AZJ1ezEzp4ao75Pmy3uJe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-CrossTenant-Network-Message-Id: c40dc138-882c-45e9-9000-08db76d5f215 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2023 06:15:46.6350 (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: RWtqh0D7DWiax9iig6DEkoRDPqJe+qhl6C12ugRTCza91QePEreTQGkbj4OFqZlyukwTSO5HpjQ11S7bFf6RWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7004 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-media@vger.kernel.org X-LSpam-Score: -4.7 (----) X-LSpam-Report: No, score=-4.7 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_MED=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no From: "Guoniu.zhou" i.MX93 use a different gasket which has different register definition compared with i.MX8. Hence implement the gasket callbacks in order to add ISI support for i.MX93. Signed-off-by: Guoniu.zhou Reviewed-by: Laurent Pinchart --- .../platform/nxp/imx8-isi/imx8-isi-core.c | 20 ++++++++++++++++++ .../platform/nxp/imx8-isi/imx8-isi-core.h | 12 +++++++++++ .../platform/nxp/imx8-isi/imx8-isi-gasket.c | 21 +++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c index d645b2f6fa5a..24c40e4cfef5 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -313,6 +313,25 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = { .has_36bit_dma = true, }; +static const struct mxc_gasket_ops mxc_imx93_gasket_ops = { + .enable = mxc_imx93_gasket_enable, + .disable = mxc_imx93_gasket_disable, +}; + +static const struct mxc_isi_plat_data mxc_imx93_data = { + .model = MXC_ISI_IMX93, + .num_ports = 1, + .num_channels = 1, + .reg_offset = 0, + .ier_reg = &mxc_imx8_isi_ier_v2, + .set_thd = &mxc_imx8_isi_thd_v1, + .clks = mxc_imx8mn_clks, + .num_clks = ARRAY_SIZE(mxc_imx8mn_clks), + .buf_active_reverse = true, + .gasket_ops = &mxc_imx93_gasket_ops, + .has_36bit_dma = false, +}; + /* ----------------------------------------------------------------------------- * Power management */ @@ -524,6 +543,7 @@ static int mxc_isi_remove(struct platform_device *pdev) static const struct of_device_id mxc_isi_of_match[] = { { .compatible = "fsl,imx8mn-isi", .data = &mxc_imx8mn_data }, { .compatible = "fsl,imx8mp-isi", .data = &mxc_imx8mp_data }, + { .compatible = "fsl,imx93-isi", .data = &mxc_imx93_data }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, mxc_isi_of_match); diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h index 4f920d650153..f5be5394981e 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h @@ -73,6 +73,11 @@ struct v4l2_m2m_dev; #define GASKET_HSIZE 0x0004 #define GASKET_VSIZE 0x0008 +/* dispmix_GPR register (i.MX93 only) */ +#define DISP_MIX_CAMERA_MUX 0x30 +#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x) (((x) & 0x3f) << 3) +#define DISP_MIX_CAMERA_MUX_GASKET_ENABLE BIT(16) + struct mxc_isi_dev; struct mxc_isi_m2m_ctx; @@ -172,6 +177,7 @@ struct mxc_gasket_ops { enum model { MXC_ISI_IMX8MN, MXC_ISI_IMX8MP, + MXC_ISI_IMX93, }; struct mxc_isi_plat_data { @@ -407,6 +413,12 @@ int mxc_imx8_gasket_enable(struct mxc_isi_dev *isi, const unsigned int port); void mxc_imx8_gasket_disable(struct mxc_isi_dev *isi, const unsigned int port); +int mxc_imx93_gasket_enable(struct mxc_isi_dev *isi, + const struct v4l2_mbus_frame_desc *fd, + const struct v4l2_mbus_framefmt *fmt, + const unsigned int port); +void mxc_imx93_gasket_disable(struct mxc_isi_dev *isi, const unsigned int port); + #if IS_ENABLED(CONFIG_DEBUG_FS) void mxc_isi_debug_init(struct mxc_isi_dev *isi); void mxc_isi_debug_cleanup(struct mxc_isi_dev *isi); diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c index 39f8d0e8b15d..a81c4249a26f 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c @@ -30,3 +30,24 @@ void mxc_imx8_gasket_disable(struct mxc_isi_dev *isi, const unsigned int port) { regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, 0); } + +/* Configure and enable gasket for i.MX93 */ +int mxc_imx93_gasket_enable(struct mxc_isi_dev *isi, + const struct v4l2_mbus_frame_desc *fd, + const struct v4l2_mbus_framefmt *fmt, + const unsigned int port) +{ + u32 val; + + val = DISP_MIX_CAMERA_MUX_DATA_TYPE(fd->entry[0].bus.csi2.dt); + val |= DISP_MIX_CAMERA_MUX_GASKET_ENABLE; + regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, val); + + return 0; +} + +void mxc_imx93_gasket_disable(struct mxc_isi_dev *isi, + unsigned int port) +{ + regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, 0); +}