From patchwork Thu Jun 29 01:36:19 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: 697848 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E45BC001B0 for ; Thu, 29 Jun 2023 01:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbjF2BcD (ORCPT ); Wed, 28 Jun 2023 21:32:03 -0400 Received: from mail-db5eur01on2070.outbound.protection.outlook.com ([40.107.15.70]:23617 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229533AbjF2BcC (ORCPT ); Wed, 28 Jun 2023 21:32:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m9Es6VB7JPfqeWl2j7tcD6KPkIIkiUAU1T9PQcvu5/2U64N+ve6teb1SID8ANiJNPifvPGB1VstQCFgUYEC9i+JplGvOEJP2RUGzMX+d0LYlqRcnWgeVrdCwZ6nG8eDP0cCSQVGhyFNzGcFZcB6eqr6QtdljAtuGvSZvhUO3czFV1SV63cdvyV7CzYqeZ4udbl2NI/mbcowP/FdjbirJh9mhcZ33VljvdrKOeicqY2iYbwL/WsnziSvitDQCQI6e8BF7qNd9KgF3QQglVBzqxSjE58/IUS8BQ39J70eOi7S2arf0cqGraS4ecmzo54o+g1rCpyewTUw11856cbVGPg== 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=lQ2n4JnWeEMqgafZoLQ6XCu6gebAuRrrt/yVJ+PpQ6c=; b=d9RhFHgqUceuhRofx3YJdemxgGH8My/6cktKJiqYpev7eYNluj5BLvB3oYG0KMaywx+R89NNtPl419R8nyHkZ6elm/KqFwTyvogWDtlMVDyba3pN5mW52fmFgZP/9WP3b3HXdzsFT+WtZcoR+ItO848aJWxmTE2QbZHJ302qi5fFy3SbnPfWujwhMDPB7n0TrpcbTeiV8EVENqUHIxBVoKdo4UBrMBcfk1DkXrABwVagpR8Cu1qHQs02DV3M2Ib0iuN9GpnBUwMeI8ur07U6DrrO2BEhWAq8qR26aLHgcZEcP6sfAJwroQ8Nd1m9CW0ndyr8NTqyt0HGzL49Dj46Dg== 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=lQ2n4JnWeEMqgafZoLQ6XCu6gebAuRrrt/yVJ+PpQ6c=; b=T2iNHm+/X57tTx5p6DG57bSUmVJNz4MAnQ6pyNQIqscBM/rOKn8s6mkuA7rpjkowUi3cMCl+Cq5rfNOVM0h4EDGrBw4OIDDcezjUxkwYZvvhYNFA2Bvhnx5Uz+/3cMClMOWpC5oQhIYmsgwPf/pdc5kvPp9eBlSLWulQzFg7mDY= 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 PAWPR04MB9888.eurprd04.prod.outlook.com (2603:10a6:102:385::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 01:32:00 +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.6544.019; Thu, 29 Jun 2023 01:32:00 +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 v5 1/3] media: dt-bindings: nxp,imx8-isi: add i.MX93 ISI compatible string Date: Thu, 29 Jun 2023 09:36:19 +0800 Message-Id: <20230629013621.2388121-2-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> References: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0021.apcprd01.prod.exchangelabs.com (2603:1096:4:192::19) 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_|PAWPR04MB9888:EE_ X-MS-Office365-Filtering-Correlation-Id: c3d62bdd-2c2a-4f44-1d38-08db7840a248 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: Jquw96FkzFplEQgyMxwo5GEA9DZdWK6snh9kLP/N0XUbEWzp/5QpbgYn1P4WxQ9h43i7oNh5DmuKhMfwqw+IMLKjLiG3CxMzETJa7S6P6ybHY5KEuJvdAS19bX1pr+qq2AYPaN5cLTbI1+6U+Bd/yrVKUopfmJnPutYl8eKKEgWck98MJESyNNXWqbHPAjY7HgQgIQqQCvNuSfGTN8oRVgLbY8wy7ij18Qd6Oz9/PNJN0SRE8CF0/vQ+5ARlmk/ZfIFLW0ZzwOldm64e8OdLSvh4bDnkTIYE679OBiFucqzSfJS3Sv+hsok49ObNxA7MhoDHRrzJ2/pl5kITa/PGlFYzp9a2L7t4wT1CIzmMpPNFWUdBfDNzC6209qb4yd3jgK1FfOdp/f55u/6HUdZWsFZt6IEfBos8irkNwQoT89edc/NpYSR3J+g6OA4lVxykjgz50RLLfJK9WcLPZlKMjkLVslKDZlVtSUrSdCkYt+wTKDAnBlYyNc5qGjQXWLqVDNmuzjpTf++oM7zAnNXLMwyI2z/oEZIqA61+fOsD6y/gJdq3lJFlNIvADhCNnnuOOklQzl6q6BtdCJ2RCF9hPClHFDWwl2JoQDJqNAPPRH00c6s5/5M/6StP5qyezlQ6 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)(346002)(136003)(376002)(366004)(39860400002)(396003)(451199021)(6512007)(1076003)(5660300002)(7416002)(66556008)(8936002)(4326008)(66946007)(316002)(66476007)(8676002)(478600001)(6506007)(86362001)(2906002)(41300700001)(26005)(52116002)(6486002)(186003)(9686003)(2616005)(6666004)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kpvQ8y8oqsZCU8JqPpIG/xpHq5rBPiumMUD8lqaWXktlBvW5jKghz0kiZU3OQGu8c12bB77xVJ678vO5p6E8WNzE109UfezTUmEPWAfOlSqlahUyHK9NxB6CkPsukFK514w/XiympFAhxGur7D+guih9mazx32KcnnTOCIZw0LzS+/M1Sutma0vWzChB3EacXbXN0Ltfz9Q6dSAsemBS1iDRgRU1eQoIPAStzDy2aNrpxMsKHJ4J9WqbHRbWIMd5Ty+uvNgUHXC5Yy0L8HpX0ksUh+aRX9LoHL7JmHcnfmUGvF7YJ/pyVR/+BLFKGQMRIKO1UWT+48QitfHbl4tKz87Kg1MDlznl1kSJENrP6h+GGk13onqSe7QuPvicZGMd/Ytfc808cZfA553hZlgVS/nc/320OgiWe6a0yzmWthPFmKXkv33eYd0Lz2QUtg/r60Og/SiZt48VSLeATz6f2I7Aky38iACf2VIbI6/KWaLrbojW8BUQj+fERG6E+vhyaghlEXQmdwc4QYE0RgiYMFIP35ppN60BmSqDx0sp3XTeLDw+9aqdddDvgVJfhZMXuDhYTYIT4kysj0kjRErAjoOhKtykTRDqMVtam6Z4lU15ZT0IQZo/6d6dVeMMwIocAsqfBWfQ181Tb2WjRf/EhULgR7QpRZKh9t81Vs5xA5mx5xc+L/NjxLH0bsqyIZzqytnfMVT0R17gG5SF02BXW8B3MhhWcI4uLAmWRo93YzvgMn6wwxgJSHLENzHqSC7Jl6mCxcyNLrTqyDzCn4Zql8D6xcFv7oBeDBrRFhuK+JKWMfJ0LWD+3TDqLeAV2SpdyZyxohS3qKgo7GUrb61ro9WksJ43zieFGWB0MKMiaLHUBKxJJHmcea+NhGf6w4k4HBE8p2Go6Z5sWBcsJu0iacSBGoklUncApvg5n0TKDO8AGttpzut5O+Pozdz/8tiEoH6TG7EapE168InUGhFxofdY09hwl7n/r53EvPzRPlNq3GZY/9PeZRvuzhFB+DyuvjfKwPU+nVhDCNi7dz4qGG4twuuafrXvsDHZ7eXtqj/EWdnHWmqLwaI7W+J2EofalOp+TJaVrk3B2fCCCCSrpCobBB80H2blN3kKor0/AeVDFDVWTe6laX5yqcJHaNu90xL61qzoOCIln1Wj29VrKfpmBdzWy9d/F9Bmg7PBjCTb2IRBQE8sEc3rLeMFqTdtoC9Zg9PEM+Ev4R7MtI49jxJFo6MrPzJblDWWU4D5dLvu9ncvYaHT4zC9PD3+eIls3JceaKblbAGw5ZkibDg3mxF8FCSa+Bt/l/kxleI+zj1APcwv6C0Es1Tn9NXbdkqlMn78QyMme7yf5GMfx0cxdVRzKhIVPWFyPDqfLz+2bp8kMQ7A1cv6YB+awNVTUrxlPFzKxVaMvkElz6ytYrrdRYh0qbrMEl1Sl23qF8Uv+1YVwvPETh4cO9C1m6aGFA9wPuCzelfXYiRdr8WVeMYkR/YNjHss06I+e9zB5WlvHRvXngl/Bxw3rEaT0kXw3efwCvnlSiPxY7XQSyRf0P3UjIX2zY/rGUPQ8Dn/5hx59RwpphNVyPt4aD5n8HigVRod X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3d62bdd-2c2a-4f44-1d38-08db7840a248 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 01:32:00.2124 (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: LTc2vgw7hQqw8f4CQwrpKuXfJzmfor2pf9AtkqkeyBLOUEpBXfFN275p9VrJxe3sc2pJ8ARuVjt8JJx67Lis4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9888 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Reviewed-by: Tommaso Merciai --- 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 Thu Jun 29 01:36:20 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: 698411 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EF3DEB64DA for ; Thu, 29 Jun 2023 01:32:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbjF2BcI (ORCPT ); Wed, 28 Jun 2023 21:32:08 -0400 Received: from mail-vi1eur03on2060.outbound.protection.outlook.com ([40.107.103.60]:17889 "EHLO EUR03-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229533AbjF2BcG (ORCPT ); Wed, 28 Jun 2023 21:32:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TeU5j++4cS7pTUzhPVrJlL6r4GKvSnCq4Ls+G8GkUkkpcsS5gxsDmLJA4j0o2bKi1VV+DQLCvMDd5Hz6lje31h5AlRLOiFIZLx+VYLTQbAsu2KQgZWSDCvjELeTmf/OBFUzljofq8Vw+s55stLmjMj363kY3NFhhgYZgsBxU6nvH9sQcu1Ra2scgmDObhZ19hMRIlo6onCes4ftUcfc/6TPzuTUQp6UCtU4wqBqmQH8r4JfEllPv82mahecBMC72OSWPuOzKz+olENze3RO+76IDphne6nabkycClGijmVrjnMlvC/Wn8ELZwLpCgbz8HlJrUFxeO5M+UDufXz3GHA== 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=tCKqOUsbfyzykJnAeAzCyOOtH2RbqVYINxQSW2M12XE=; b=f0owbJSafEwyyw9Q2jFfJ1r0GMxDcFll1Irt3+Qs0drVJolxhNTpr1YPrzsnXRT0xF/WvQv3XmvQ6SN6dGAqt6C+Bn50Y46T1TqqrsMjKa43+WNBcVS78O1p8gOn5/idlQq0AnXLZ2UhfCXhdt5o5w8LfZj1/XxQy/q5GUlwBpPqLvH8uT3idzPsRhMHeBDAfTxZyiGamEvCNI7B814JR10dRDNPE7d1gw0fgJ9MtAbQquagT0fFZG8wPBHutT7kM5DNebtQsBLyGWyOFm1z08scRmClA0AcqwC4Y7K2LkQ87WyivlD6OKakp2oV8Bo4qH4Oc+X+2v9IgOsy6WeoEA== 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=tCKqOUsbfyzykJnAeAzCyOOtH2RbqVYINxQSW2M12XE=; b=VCiD32Fx7gVyYYL2W6HVT0kCQ8pwmcBw1INsikHfp1tflG1oIwfpnj/ZV5ZV9Ut+dYWPr1eY2u4mVet1tbEQ1kQ/Em8cy9E1omsuchQMu+XObuLk7UwoclgiDIrCxMWER14swYsU/ODq7U+YrX3czDYvSxBDIARxY48iLqWDcyY= 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 PAWPR04MB9888.eurprd04.prod.outlook.com (2603:10a6:102:385::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 01:32:04 +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.6544.019; Thu, 29 Jun 2023 01:32:03 +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 v5 2/3] media: nxp: imx8-isi: move i.MX8 gasket configuration to an ops structure Date: Thu, 29 Jun 2023 09:36:20 +0800 Message-Id: <20230629013621.2388121-3-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> References: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0021.apcprd01.prod.exchangelabs.com (2603:1096:4:192::19) 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_|PAWPR04MB9888:EE_ X-MS-Office365-Filtering-Correlation-Id: ca4525ed-78a7-4e33-81dd-08db7840a492 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: +4vzQVXkSQAoecrWhusZheZiktkWcmFFx1unS5GYBIL+UO7K4pdY416n/UkVo6A7g88R5DqIV2KAy7/3N+TeFmEE6NQjful1nYOB9f7VoACL2biYy1appud0tZ8H8ahRmAGncCvl+uWg8i8HRCyPGAXRScVBbqOr6m0auu4BJ6WbWKLDjcDupP8EG2xdnifE6ZjnxlsdKzL4yZPphAl9dpHmYXGMLSlAiVwnqq0Cz/+3xF6IFwyaGZ9/iLKwty3cBkBfrHd7+B2v94i+jXUQn21mK9oT5Si6TIOAhbdZTgo7zRwjejzFfT8HIK82DHa0a5IkDLs9WSbjD4m776P7qcOIsAAAO/9qyiNc0hBhRkx2I0tmsXb3GZFsOwr2cYk06eeSzP0q4hFhbW/xwuuPKZq4Y3377LCP4lB9EMulFH2vNCCIy/p8nWdZeYCauulkRsGNwMcgMPqEvi/VzBlzePPWjg+Wm5BjI4+3fGMz8YHeqOwmUfYooCh/RFA19TxbJVO1BSIS/sQJY7fTRTJjRnLgorTunb49AXHrI3MuipaJlUz/+ezg4o0EzkYiw8A0Z39PN1adSs6jeLzBrFYeYSCrB7QQo3LQBSZvQIj1p9/ZZjuIiwXtA3W7lSlAFdFX 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)(346002)(136003)(376002)(366004)(39860400002)(396003)(451199021)(6512007)(1076003)(5660300002)(7416002)(66556008)(8936002)(4326008)(66946007)(316002)(66476007)(8676002)(478600001)(6506007)(86362001)(2906002)(41300700001)(26005)(52116002)(6486002)(186003)(9686003)(2616005)(6666004)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cgCWl9MpGqSUAsnhWjFJQIO54sg5j0feVvPLBNZVFd2HJFvnGt3qJXrO8uCKlscINaVKDQAi+wD0iHURGXnRn8Y/k1tjUAmrE2knt4GJvyAU9aWP8/BhqAE6BmDmZR/A+0vnv+v/XDnElbGeWvfepAKUlJlNDoGIyXq6D/XADviQ2MtBoJyK0ksy1YtPwSGuIonj6dbvwd+l1hLkNnqISzco4LYB2Mox99UCF5rivSK9G5ve+5YQnnpfSTntrWHwmgHOEYCSUJVnlRJ6Vmzjm5N2/9oqXBaNRFeDGBEMDYfPpzY6n+Xl8spZxS4RDSlsE7u1ptQ9Psy9fyc6lnJ8qayNPM2n4XFGhiHdx1RrlDVAwckBP0hRKU4FSrhz7pHu+AYR68agnxasbTDrmL3P7/JTP22LZ+DV9aOatSN0vYi09TmaNO7rifnx0IoS6xeTbchUHO2Mg4sASjpPYBoN+A7qRFWZeRbxxXKffG42OVd1P/Uz7BKidtKXsr8Lviys4xuvuXhmR1cbwWgbSC2yErO/Uh7pQLKEditZ6Z5k2p7lA1VxxAG0331RYz9IbV4OVHkOb1r34Vhht2CnZUuVnnv/2eLC3elyx5Q60rDgMhmPAeba2mVJJV3F0uHnHcANc64ICAXKtQsKkHdwbmqM9TTXw+161kwSNx1fhdnOhbFRUSQUPVTJYEopo8ik4omqV/wyF6Wc/lLI1XkZGRGd1jArgjXX8sdl1r9GWwHbusRa8TgfsqJqC8kW398e2m76gkwPezT2W9ljndHF8pcGwBgql2e8RQCTKPlfe0PqrxPyqIOsldh7BTbF/WrwZNsPlWIM3vBbPgtUG9PQ+H3lL6vGcGeS0OJJiCBTKyljvnv5mPtI+Atf0fKcC9KDxgCH3skIMlpQkIZuDorpqk+8PTT+H+MLt+XJAZIGKmEyzvi+IkJay+KYDTd2dm6W6XhrnwRbfoNQo79KJuIDdcVoD7gi9pK6LTdXUh2Yi55xWjROya9T09W+uETC41kpTKoAZQet/SKweqKNnp3cdDCP3A3B1eA/bVlU/ThjBd6btFIWduDjk6aDOiMnsC+6HMvvnilb7aM139amv9lDs43U2OP5hVtMGgYkkr74UNuUen9deF6NgKQj9DyZFOdN970j1lou+Ve2IBZKxbF/Cs+3FTcDTaHW4GFMhPM/B6fr0tFuy8WuASYb0NsMFlJvoyPh5LBPxZ3k9ORIog8kSc9XsPteZFFTZ/QhkZyalwsYIFUjv8v/xqvhH6Nlg2aEYjjUn2qR/VW3vStO3gPpXipWdLj+/t4Heh0YvWGOU55ibIrhWq6uNwKb7bo+wSfem/AN3x+Jsp2fe1WRv2a/mQu3v92Ipmj+Kdi8x4pn8zb0KDPs3ToQ+MiDWJnH4epB9uW6E9DBtFQemkqxm/IEDYraT5Ojf+4p07vlcyjWT1Zo4tdSfZowKIRmxYg3VhF2VZ7EIAW2tSMMuQ9XfO8hurxuKRHX5VAHIlkigokXCrWCZLYgCJ9VPA9zY9hfNhtYt36aXN/SIZrpMltk+Y7mErU/Lp5btwbhMXwUhzvM1VoZqnd269u/G9T2A9Ix9VlH35G3 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca4525ed-78a7-4e33-81dd-08db7840a492 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 01:32:03.9032 (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: ZFfYBunVwUmSxy2bXX6NF1BhvN29McBdsUvRPtUp6sfh8yb1MIEZ81zIrWlW7tnlFZvGOEBvM13ZoIUuOsHVfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9888 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Guoniu.zhou" The i.MX93 includes an ISI instance compatible with the imx8-isi driver, but with a different gasket. To prepare for this, make the gasket configuration modular by moving the code to an ops structure. Signed-off-by: Guoniu.zhou Reviewed-by: Laurent Pinchart --- drivers/media/platform/nxp/imx8-isi/Makefile | 4 +- .../platform/nxp/imx8-isi/imx8-isi-core.c | 6 +- .../platform/nxp/imx8-isi/imx8-isi-core.h | 12 +++- .../platform/nxp/imx8-isi/imx8-isi-crossbar.c | 36 ++---------- .../platform/nxp/imx8-isi/imx8-isi-gasket.c | 55 +++++++++++++++++++ 5 files changed, 77 insertions(+), 36 deletions(-) diff --git a/drivers/media/platform/nxp/imx8-isi/Makefile b/drivers/media/platform/nxp/imx8-isi/Makefile index 9bff9297686d..4713c4e8b64b 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-y := imx8-isi-core.o imx8-isi-crossbar.o imx8-isi-gasket.o \ + imx8-isi-hw.o imx8-isi-pipe.o imx8-isi-video.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..5165f8960c2c 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -289,7 +289,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 +303,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 +443,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..78ca047d93d1 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h @@ -147,6 +147,14 @@ struct mxc_isi_set_thd { struct mxc_isi_panic_thd panic_set_thd_v; }; +struct mxc_gasket_ops { + void (*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 +167,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; }; @@ -286,6 +294,8 @@ struct mxc_isi_dev { struct dentry *debugfs_root; }; +extern const struct mxc_gasket_ops mxc_imx8_gasket_ops; + int mxc_isi_crossbar_init(struct mxc_isi_dev *isi); void mxc_isi_crossbar_cleanup(struct mxc_isi_crossbar *xbar); int mxc_isi_crossbar_register(struct mxc_isi_crossbar *xbar); 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..c6a658ef0c62 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c @@ -15,7 +15,6 @@ #include #include -#include #include #include "imx8-isi-core.h" @@ -25,32 +24,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,17 +62,7 @@ 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); - + gasket_ops->enable(isi, &fd, fmt, port); return 0; } @@ -95,11 +70,12 @@ 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); + 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..1d632dc60699 --- /dev/null +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019-2023 NXP + */ + +#include + +#include + +#include "imx8-isi-core.h" + +/* ----------------------------------------------------------------------------- + * i.MX8MN and i.MX8MP gasket + **/ + +#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 void 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); +} + +static void mxc_imx8_gasket_disable(struct mxc_isi_dev *isi, + const unsigned int port) +{ + regmap_write(isi->gasket, GASKET_BASE(port) + GASKET_CTRL, 0); +} + +/* Gasket operations for i.MX8MN and i.MX8MP */ +const struct mxc_gasket_ops mxc_imx8_gasket_ops = { + .enable = mxc_imx8_gasket_enable, + .disable = mxc_imx8_gasket_disable, +}; From patchwork Thu Jun 29 01:36:21 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: 697847 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98FEEEB64DA for ; Thu, 29 Jun 2023 01:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231718AbjF2BcL (ORCPT ); Wed, 28 Jun 2023 21:32:11 -0400 Received: from mail-db5eur01on2043.outbound.protection.outlook.com ([40.107.15.43]:56337 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231522AbjF2BcK (ORCPT ); Wed, 28 Jun 2023 21:32:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JTiE2IciZu7NxH7UW/x+vtNqLD3GJseR+ftZD7jk8abhQVOvbPnafjtS/qOlDZjO8SQzNYRmeDJFH1cNTJpacWDq6gaUAOghcTkjwM6shvpsZF12hmD9RAS9jO8n5DwS85BF3CTejvJfBDCTGAHxItF/aH0eqRAc7B8IBRDkdaZ6DOeg+jmZLFMEVYzPyFKIfYuvEAx1Lchv1nQjDAzvdQ0PcWOZ+kB8M0tSaLzWys/lgUwIaph9WusnWmaUqnEgvuiNVBi5FWumbdCPPtUsu0F5PDAK/01f9dK4z/bvsPcH1nzxfbGthDXpDnZ7xzbJU7YIOahSeI6BxAaJJt/69w== 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=GxZ4M46YMxmifmxbgAGK+JusjyNcRHhmW9e/FxgEmnA=; b=DnHtJe6U+sacxiby2UT0X7cq2hFblnbpd2pBii6MA6cZPctdjbrmmvK16QknR6hBpCrfWl0fpHRiSSPnoBkvMNqnIeNudkwWEIyN+/tpQiMi4yfBlWDdj3Gll9XVlH5kL2yuY/gGyZQ8JUHLIOzGTd3bc9V+v944KY5l5yuaIFeqyub4mpjOvvM65XF+28xZBt/i6PpqVezfGy5wVM7I/bpHgaQ178jRiPMDs7TjPk8PVRmMOdxrKHsRdB3y8Q3fQU5odiar3aRFYhwFSZzSaKKcaRu+bM/5fU1xotWeto5fqB808GSndxI8ZSK9xx2eK/trWXoSHfn49JVSF28KUA== 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=GxZ4M46YMxmifmxbgAGK+JusjyNcRHhmW9e/FxgEmnA=; b=Of/2c75yFh89iNdftl/Ac9kede4YOpy3AWUCq7Wxu2zMu3CY5q2ASVwSQP8k7gQbKtEmbwRpu2AdPiAoDQ+X5Nikz6DYeF8K996Sw7sKpD+ziTE9AmWJ6wZYacQGkEI15nzMeejeglmc1orHO4v4AUmldpYDQ3hOPOxqE8qoTmk= 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 PAWPR04MB9888.eurprd04.prod.outlook.com (2603:10a6:102:385::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 01:32:07 +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.6544.019; Thu, 29 Jun 2023 01:32:07 +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 v5 3/3] media: nxp: imx8-isi: add ISI support for i.MX93 Date: Thu, 29 Jun 2023 09:36:21 +0800 Message-Id: <20230629013621.2388121-4-guoniu.zhou@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> References: <20230629013621.2388121-1-guoniu.zhou@oss.nxp.com> X-ClientProxiedBy: SI2PR01CA0021.apcprd01.prod.exchangelabs.com (2603:1096:4:192::19) 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_|PAWPR04MB9888:EE_ X-MS-Office365-Filtering-Correlation-Id: c38ea6cc-2c89-42f3-ae2f-08db7840a6c2 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: NqnjBWU14ogmOwy6wUblodX+R6IY1fNLgehSRU3i2s/fFBmOH3OrcMmb2PAbq6HFW61JGUgilz4dk1fKLiokkZFKB0zwxG3XO+tgdzBaknenWku/A4q9o0X0jn65AUDLvFzS/Iyw+8o8YawN12jSvUaa8WC/WSkICAymHAAX4Z3KR/PnSJ47P4R/liNM3asxPlxflpDMA46R+ElCuwE4C6hK+Z67S+5Hk2hH8DxTpbsj2UvBwb+d18YOHXIGwkrYiy8gwqRbndAzKM1OU0DoIS3Yv8TipXKC2dgfy6ODwsmoeswPUcmXd/rDdFEoHu7yvIH1hQhNL1FKq4dDLUZ0UmLBIlgkD1EK3OiqfIyONK3+epb1n4J4eS1IB4wWimZq5bpdVWwHjPdL30do3RDO0lc3OP/7SzI3T2NTnF2nmObdxfapVAvmVgQpzi+A5XOVD+S+G2iWky+BuamdEZb7jIRrSJ2qjdKJCeVHeaJp4Qy/VXSLgDqA+h+DdkS6YJvF9HQJgL+Gr9gqudxXONtpiHe1lovBiPQ3wuEJnkgzbjAtBER7NhkaV1EH/VZ4qPTZcV+Qvynttwtj7ebLem8rhPTTRaOXgnBFXk1mqm4Nd6xVksBQ+aCDYuoT8XBGW1sR 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)(346002)(136003)(376002)(366004)(39860400002)(396003)(451199021)(6512007)(1076003)(5660300002)(7416002)(66556008)(8936002)(4326008)(66946007)(316002)(66476007)(8676002)(478600001)(6506007)(86362001)(2906002)(41300700001)(26005)(52116002)(6486002)(186003)(9686003)(2616005)(6666004)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fmIzfNCH0XKsje43I8/Ji3RmmT61KgKZaX0reWeJ0yBQy3cEeSSNwk9qzF/jFa7VHqw0dwRPZWZYBxWnraqQ1nvRPk70qy2egr4TaZHuF7wsk/FM0qyPyWuJYhtDuF4/aCAIUvqMgpNIY24CUbIQViATvR6P7BaIyQA+AKSTo4Wf0XgPl3fc7D7N6FbUzOs7SWRaQDhGhau+whwdQe3IwSjRhB+Rf7xrj6p2xp6MFzEEWlkASIP5L6Ry4YXrAb90Js1Vhc8fakktQTr4N7km2VeXyKkj7R5/eOjUVrojYaOYAGezIGiezO1c3RI6AMhey91I3V6FXT1Roy/MlJfF5PlMUeU/jE4HD1DRmo0maJ5+mW2XUQnTBgoOTXkwY1yPNTMyn4Tt+qc/MbmAIK67YuUVxikwKsQhEcSvSlX4+qCK9LtqjdDb3iLgQXFwhI42EzQeWbWnJbKw1yKbZg0PHGdRDo8cglfBX39esAnr2dnMKJX8x7z4vn+c0T2KchX22Ve9mzJu+RpMDynYieeN58CrydhSEcBAmybi0tIluEDvOc0lEj20JCrigMPXNZkLD/lxQu9TEjzbqakOYaHFhN17elmYWSvIBWAvt0M0UfXR+hH1MNX+r038HaUcmeEZt1lbSlPJF2+hUtD6PXt106PWJpGpic54VPpGv+08XvcWgryHBHI2e9TjKB5lPyjkp6OWolh+fzW2l4M6os8lYGwfsN6mc5ee0CHghZw60dLDFtZqQkasDpSnkZPdpNja9VsSULrgWeewxKXFrpQVMrgkBTNefzIyNbNxP+RHq2My/hqYkbXXMFTg4gN04XgCbVWxBbEsj2vcPJMK3yK2IDG4TeHJm5orskY7VzaLxfUyDdnnQvYlzmNwO0e/5xw6sfOE1nfYP5J2s644cDr6E/Jok2rkl0vFpuY66q09mFvRzh166ljQoneQ1H9Ax7nWOn3SHhNnhGMxqVpv5cy6GT9M0prya2qFavMWqDBMBLaZQH5ku88a0MeE4rFR86zZtcO+VIMsXtyjK8bz7cJ88gzVbMszC2YXqAjI9FVF5m3l1fTVGrsiibBTOpqDN+XveplK24O8O1m+PtKjgJ3VycRN/RFCOF1MT/6OE3n8FF8ewCoD+GiEQm9VXGwOio2bwM/1vDMyztbYoLKRejq8OKP2ZH5ZHCCmflNifru2tbwdDHtCFPzei5geSyZt+nlXnQ2OtueBcrB6UL0rdYlChUG17Uc9ix9DevOCigxg0nQk9IEwzcrzk0gA6YkKhuaFWWYLKpjVDmY/u7Cg3BohKjmidU15Suz0C1P3Fggzas20za9oAiKTAFLrFsJxmypEZ6kepq8ZS6JBIrtxBnZAEx3zP9949oCtKKO0Yj2vfeLFlVsDZfqzCgDrFVKIXQ6Nee4TWMguycEavYBHHOKv3cidfibjp+T3HVfW+PD/Iy6zpabiQ3hMQXMY+lAIbcfJ4NWsAfC7pCkwpwFhtgdHWsDEaWM67lxx7cgnZaZ3DOsDuxrNyOmf5MG8WLa6HTnCLf13ghSEFHt6zwNhgrTrZqPAZK0w9TVYW+W+gP9RIhVESr7H1zK/GghTaMoKmQr4hzeNrX+YnGyjPA9g4gD42w== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c38ea6cc-2c89-42f3-ae2f-08db7840a6c2 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB9080.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 01:32:07.6455 (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: na8xfV/gdvPo5PmvLLjtJbeKeMwHDxGuv51MtT03ZtOed6zAwQjPA1dMFfJR7ehcZ3C2qtEP+ZHw4CYbb4x0ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9888 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 Reviewed-by: Laurent Pinchart --- .../platform/nxp/imx8-isi/imx8-isi-core.c | 15 ++++++++++ .../platform/nxp/imx8-isi/imx8-isi-core.h | 2 ++ .../platform/nxp/imx8-isi/imx8-isi-gasket.c | 30 +++++++++++++++++++ 3 files changed, 47 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 5165f8960c2c..27bd18b7ee65 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -307,6 +307,20 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = { .has_36bit_dma = true, }; +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 */ @@ -518,6 +532,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 78ca047d93d1..2810ebe9b5f7 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h @@ -158,6 +158,7 @@ struct mxc_gasket_ops { enum model { MXC_ISI_IMX8MN, MXC_ISI_IMX8MP, + MXC_ISI_IMX93, }; struct mxc_isi_plat_data { @@ -295,6 +296,7 @@ struct mxc_isi_dev { }; extern const struct mxc_gasket_ops mxc_imx8_gasket_ops; +extern const struct mxc_gasket_ops mxc_imx93_gasket_ops; int mxc_isi_crossbar_init(struct mxc_isi_dev *isi); void mxc_isi_crossbar_cleanup(struct mxc_isi_crossbar *xbar); 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 1d632dc60699..50ac1d3a2b6f 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c @@ -53,3 +53,33 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = { .enable = mxc_imx8_gasket_enable, .disable = mxc_imx8_gasket_disable, }; + +/* ----------------------------------------------------------------------------- + * i.MX93 gasket + **/ + +#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) +static void 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); +} + +static void mxc_imx93_gasket_disable(struct mxc_isi_dev *isi, + unsigned int port) +{ + regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, 0); +} + +const struct mxc_gasket_ops mxc_imx93_gasket_ops = { + .enable = mxc_imx93_gasket_enable, + .disable = mxc_imx93_gasket_disable, +};