From patchwork Mon Dec 23 06:41:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918501 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2048.outbound.protection.outlook.com [40.107.22.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40BB518B47D for ; Mon, 23 Dec 2024 06:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936124; cv=fail; b=E8AK8rCickvOYmFJOR2T8td7F32A6s/nnqaMovmu28L2hYfrqu4fWPbNTLdXoiPdL02jbvxscR9kiBHiIN1TL/rjmI9cGb7f6JHhp+CPUC/+NYIm/Lhq81z+v7gt6EiQbPv302LfagLWHg9YGBPjDpkYXdtdH3NiXIxAIhODr0o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936124; c=relaxed/simple; bh=iiVzL8XppAf6lwx6x1iwW2o+aHfUS7J5wEbkulZO26E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=pJ0wSA5SU2vPuhVpJRuNaqMWuVbTpKChOzWu+i7GfArjw5AKOtm8VNMc6Drnfs5LStSZaRDoc5RytCb0Sx4RRc7Xm6crAbljViV7d0ok54d/trqmrMOPnJAcyVfxrAijf4WNryKpZTLHsf0FR9jNYb8uXND0m7ug56vhiwmTowQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=E+FVIOg3; arc=fail smtp.client-ip=40.107.22.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="E+FVIOg3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iEQPaNbqnvfLKepqdmn+eGDDQgA2pIbJ32oTdIiIj3VMVIudvnpDQ8e7YEphB8bzRzS1D+ctklvH8AUoyjhMea9PJdmPfZjYab+wZ8/07ytSZfonI7Z90PhDyFoZNR3+2tT5JnzQOalgX81LpOdWagZ6rTvE/wqf82cipwcShtPyzZDxnQBLobt1nBSgamg+YTujBNuYJdrG4kwqpU1sKX8ynDjX9ekDIMeiUnyE9B5bcAXuXHPd6zQ/jJt7f/4CeguPipaNs4c8HX3ubKS38VcdKwWkclPF69EU7woGt3LAzNuqkxpy+HNzefUuasLD8NbUrdrfVQoYuUIIqUij3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=kbk+ILhMSF7ywy7xTFNmuGSg+/XA02i/wn8QqLLs6Es=; b=QcCgjwAdRvZ6iXwDfVtA3Z8xLaMed/NTS2LRYt5OI/svcNm0xGRDArFN08YTxQaFQcYOTMZqVsL5QR04ITU2nm2urbLsD31RMKiqzlp3Gdo9QI54wmg+FXwI3hoc6IefVKoy2kp0/3ad8Zx5hT6qDTCtI/mIhFiGBlpZ1qBVyh3EETcSszwusaFkEz9ZXcb5B+C2gi+sytImFdrhvrIBQYjMElkD9/PgUwFiKoCmW4VBJ7QabXR9DOqJIJvo/7wgkpZFZWSRG1a66ddXcH0YTrONGMREhJbJq8AIBXAd0sN4GcYQpanWtkhCJ3rBvK2N1fCZkUckNMnWsP4Zi6kGGQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kbk+ILhMSF7ywy7xTFNmuGSg+/XA02i/wn8QqLLs6Es=; b=E+FVIOg3wPhvqaQ2skuGmiZNll+p03Ds7OO5E4zoR+k4r8X4Hm9LJGwRutDkCLBPFsF8/Q+3P39ggV6zLUD1pYGjZ/9ra/eH9rWoQMENsJEHvvSSMHWo9RreAY0KSygwbHBw7EhyS2BAQr4BvxV9YQ4Gar/Q5O4YWDqYkGLLBxthrm88Y22Qn6cARq/TRPDsmrpdEODn7IxDi2q0TeeQXs0F77BQ+KDr0kgSgqIRFV9xOpmu3EONFKa0acvzuerU7nS8JsgFjufUESyI9YW61kKo7v+KZpc9rTmtcoaIOKyYahrZA4ynYmLj/z4/8RXYMx7bq8m7cqt39vmIZpNU2g== 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 AM9PR04MB8986.eurprd04.prod.outlook.com (2603:10a6:20b:409::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.19; Mon, 23 Dec 2024 06:41:53 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:41:53 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Date: Mon, 23 Dec 2024 14:41:29 +0800 Message-Id: <20241223064147.3961652-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM9PR04MB8986:EE_ X-MS-Office365-Filtering-Correlation-Id: 368290a4-7e43-4a7e-1c59-08dd231ce2fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: DE/GZAc8C9KfReN6Xw0AeARD9Fls2/VERBDuZOZEQ1ecYLNGNTDcPcyO+s/UeYkBFvks6wUaklX0ADlQ87jFDVQmyTSzj2HAjt7zY7hI5A/98AubB3GoAdmeWoXed12upwjwlJhqcaXdN1V8rYZ3UrsC4W3HHfAUrag2qrog8UZeJ5ojwY37INRj0b6xIVS4MUV/G0P2toPGhYiZi7T/gEQZ3V9OHge6TwV1XlEIPbC10hlHPwFcIwMnsTEPhYWpR0g+7yI1kGGY7hu56Rm4ybqwa68wIi6bjPRAUuxheRDTz2YifNaUXUupqkT0+E7+s0hO7Oi07VI1cOmDo67cLiB6X28xPlTGlj4Rf5ng5Rlfp3SPVEIGCiemssOObIOA2yhXj0f1ocW+5w9aVn7P4dKAo26APfMU4T/0KR351uZINiwN4ehhgWO89kSSm6HH4qeMKzXCBCptYDSsTdNjU7lwdW+qgJCUuqkUhGZxFOrUyoeXoAb9rXsEPel3+OgSF1zpyNTPUPNheumJhklRJdoHsZ+WVxRDNscyt5NGIqK7yeYnoeiXRMSKMMbYu7os+hqZJz/aVdltj+HxNNh2WdBSGLv/ubK/0n46FcztxKWU6qxPg4D+GXOlS9xFE61tHBuY66HxChw0rEmSZCXKGCOW5DKhHNmEtjyJBmMKwbND3+kyOoUmW72uCtSsA862ZoS5xfVYNSvtE+Gp2k9nwy8Y6Mfzbld3h3lHAtshw1gDewwGPM5Ogb2m1M3017Pqd3xgXuZ1lW3R2W4kaTcJCzY+eSV6WEJCZN5y3wirChzhoC2MY55IVHuK3j6+sSTbkz6e90an+3urNgwwveES2+Q0SU7sXVqf8j+CPDVZ/Vzh0vTCXiBn81LP64aFoxQhgxWtAaCvhgCdTgiRN1x2Akkc5vRZbadAsczFeov2eJevFulEkijXa5Ju680GjqDIi2ChvqQUHdPMYK0jePttEnDQFya4A8E/3kWgBTEBsHO82OjQ3KySt5BBf7EhmOSJLQnFQTAK0OcXidLlEN7xam883y6kqSIoAMOAGg552Oaf1I1ZhIOTJzmBfO6iRDNgz5rdJzuaaKj8fM8OYqRIqFRBXrrkGUKAArxnaH+6BY/8zi3+G8X+BmZ8N0wiRr7CAEw+yqwPjOyoPfwyxjoPhKEJ1z848USN1yBFjZIMvTpj9rqPwRzhhAzqYxPILMe6asDkwrlbf9VPAA7A0vNsg1V5YUfenLluWHRrgQpzbdjIVjXVR5fuOq1Mm36mX7T/+xTe73ABB3FW3Ljd+F1/8HI5JFefWwlpYifrwboukLe+2m53ukCKW+nVwZPEf7jRGHiwyntM6lFzX0duM9NXcsRzVKwnbBnWsXqckQMiJQpRiAi0yFEGmggBgNDP8uq/ 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:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: naUcX9tPdP6Mydb07o+Nhl4yVgJ+jXtbbqd61i4NRNCBy02SRjrieRoBLnw+jpxDiREghO9LT/levvYqQduzrMlE824KXxz3P2GIb7NlMW9IiXhUtWNFGRZa33zp7NKWIl11N4dFECj3XmQ3Svqvzs0vOB90prrbwX62xi2RsB1j39pIcc6D25PZhShYpluaxBBS4XIvopuzMx5FmUzSHeEMV9WI86A497n0d47TBRNRGeiUKPup59eR/j3R53E8sbJV6ugbE48fXe9eOmVvrsKaGsj81t29aEN03bNFC9ohH2iOXAJqcyHzWjP7ZmD2HtnhKlDUke6sJjcAWZJQ1CaFstK6gOwM9oGYpHxmRLjCTySQMA+fy14sZZsMq+6rmyJ0YnTLXtZJ1JPzu/GFhRpMTPP5uGWMAVF2QDALYENjlSEZUrMTWwTcOAKm7zxbu0K6qzjGjPGa71zw9equlBUH3hlANXyB2PiCZEwxoH2d6BDd0tglYJ/d0FqRqMnbQ7QTKaBpZQPgPgQl+5Ntzar8htzLZ28cWsb82DRvD4xmqjBVzYu0Mg/V0fVlgAfWO0JkDuq8bUMJwqRt/g+DEDBmJUDBW0XRRoE7kUureKMLmPRp8T6AOg+iki7/QgH18HnPTgzrov6AZxPTbzzdJk3nykOwtPbQustafmmK6M0NY/AnRdIenuSSN4bYe/XtPMH6Wb3ryo2bE2atrpk+V0L9std/xqpguedvzYXbV96LuMcYo4+2Ocpy0bgWi9LRwe/+EeBH/NhkbshWLsmkjLQ9n7vC06Xdz9hizWU756AVE54wpOxYP4sH+zHiciTOg5eVsZe3zbhrKxHmTAhAvn0cRuwEVMbyLuapj5wFc/PPDcbMkIZyEKShNBoGHRvU5Vkr0gHI1vufg4EkikQ8wHK27AFh8pFOhGJ2cBHNSXReMJgLb2IrKRTAgoKQBHJ5e93ZjAzPG0ZHcHK6bNZ4VS8CV/ux/sbtsqvKIC6YjMpPfLy2j0Y38axR6csKUo+8s6/At7saJe+odUmxR6FOBiYR6Joy6kG0wJx8So4XYPFNR4WA+18deSdk3A9umnaeCvz5xF0JeSxkzwuvI1boFS95g4lbtSyYckQQAsK+KOVWXIdFPwF/8QUm2d8f2XlUqykij9yxi55NzqacgVLp5MHvIJYu2qHrxDahW2j06oYxDnfh3c+P7Ex6azrvsjvhjcdsxYxKoG9swZujOYicpgy1OdXDNp33DrW17k2svYp/p6grHx1OqY/qIqbaHlT9C5aEdWfhAQA1gLuAU3O6BHfRK+AJIaEbnXom5kPbvkfe+0Z1WmuYm68bU0i+fzWUBNwqgdKO+xLfsi3au89KezS9u8rJeV2P9YyB8Ev6cUc3F1TnXclqebNJN4Ln95q6sOJfiPzzBuY6B2oBPIlSGmWS4AIS6DHgz9PKazeWNb1LHB46DoU9e8BfH2NDb5RkOyR10g5bFV3Zu3RkdKcYNPQ12Ao0wmtHJUWGjWI6C4CVjWLzqAAYv6LiTnYQIyTcWj5psKuPJUR181xE90HXpjBqVnNfciyRX0uCedE91JOsOIJFYm6kEqXlF8sJtz8v X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 368290a4-7e43-4a7e-1c59-08dd231ce2fa X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:41:53.4368 (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: szDNO3yHM/4b89Ymm2OoF1vgyizG59II84Wf6MwJdhJsB2ZahE9k+9ZOdo8H8hzOjAeefJvk953NwA6VD1idPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8986 Freescale i.MX8qxp Display Controller is implemented as construction set of building blocks with unified concept and standardized interfaces. Document all existing processing units. Signed-off-by: Liu Ying --- v7: * Drop DT alias documentations and add instance numbers to compatible strings. (Rob) v6: * No change. v5: * Document aliases for processing units which have multiple instances in the Display Controller. Drop Rob's previous R-b tag. (Maxime) v4: * Collect Rob's R-b tag. v3: * Combine fsl,imx8qxp-dc-fetchunit-common.yaml, fsl,imx8qxp-dc-fetchlayer.yaml and fsl,imx8qxp-dc-fetchwarp.yaml into 1 schema doc fsl,imx8qxp-dc-fetchunit.yaml. (Rob) * Document all processing units. (Rob) v2: * Drop fsl,dc-*-id DT properties. (Krzysztof) * Add port property to fsl,imx8qxp-dc-tcon.yaml. (Krzysztof) * Fix register range sizes in examples. .../imx/fsl,imx8qxp-dc-blitblend9.yaml | 41 +++++ .../display/imx/fsl,imx8qxp-dc-clut9.yaml | 44 ++++++ .../imx/fsl,imx8qxp-dc-constframe0.yaml | 48 ++++++ .../display/imx/fsl,imx8qxp-dc-dither0.yaml | 47 ++++++ .../display/imx/fsl,imx8qxp-dc-extdst0.yaml | 76 +++++++++ .../display/imx/fsl,imx8qxp-dc-fetchunit.yaml | 147 ++++++++++++++++++ .../display/imx/fsl,imx8qxp-dc-filter9.yaml | 43 +++++ .../display/imx/fsl,imx8qxp-dc-framegen0.yaml | 66 ++++++++ .../display/imx/fsl,imx8qxp-dc-gammacor0.yaml | 34 ++++ .../imx/fsl,imx8qxp-dc-layerblend0.yaml | 43 +++++ .../display/imx/fsl,imx8qxp-dc-matrix0.yaml | 76 +++++++++ .../display/imx/fsl,imx8qxp-dc-rop9.yaml | 43 +++++ .../display/imx/fsl,imx8qxp-dc-safety.yaml | 34 ++++ .../imx/fsl,imx8qxp-dc-scaling-engine.yaml | 87 +++++++++++ .../imx/fsl,imx8qxp-dc-signature0.yaml | 55 +++++++ .../display/imx/fsl,imx8qxp-dc-store9.yaml | 96 ++++++++++++ .../display/imx/fsl,imx8qxp-dc-tcon0.yaml | 47 ++++++ 17 files changed, 1027 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend9.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut9.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter9.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop9.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature0.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store9.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon0.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend9.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend9.yaml new file mode 100644 index 000000000000..621f8b30efcd --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend9.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-blitblend9.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Blit Blend Unit + +description: + Combines two input frames to a single output frame, all frames having the + same dimension. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-blitblend9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + blitblend@56180920 { + compatible = "fsl,imx8qxp-dc-blitblend9"; + reg = <0x56180920 0x10>, <0x56183c00 0x3c>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut9.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut9.yaml new file mode 100644 index 000000000000..00e748d39a72 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut9.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-clut9.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Color Lookup Table + +description: | + The unit implements 3 look-up tables with 256 x 10 bit entries each. These + can be used for different kinds of applications. From 10-bit input values + only upper 8 bits are used. + + The unit supports color lookup, index lookup, dithering and alpha masking. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-clut9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + clut@56180880 { + compatible = "fsl,imx8qxp-dc-clut9"; + reg = <0x56180880 0x10>, <0x56182400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe0.yaml new file mode 100644 index 000000000000..aeaf65b126cc --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe0.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-constframe0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Constant Frame + +description: | + The Constant Frame unit is used instead of a Fetch unit where generation of + constant color frames only is sufficient. This is the case for the background + planes of content and safety streams in a Display Controller. + + The color can be setup to any RGBA value. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-constframe0 + - fsl,imx8qxp-dc-constframe1 + - fsl,imx8qxp-dc-constframe4 + - fsl,imx8qxp-dc-constframe5 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + constframe@56180960 { + compatible = "fsl,imx8qxp-dc-constframe0"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither0.yaml new file mode 100644 index 000000000000..aff739f23244 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither0.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-dither0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Dither Unit + +description: | + The unit can increase the physical color resolution of a display from 5, 6, 7 + or 8 bits per RGB channel to a virtual resolution of 10 bits. The physical + resolution can be set individually for each channel. + + The resolution is increased by mixing the two physical colors that are nearest + to the virtual color code in a variable ratio either by time (temporal + dithering) or by position (spatial dithering). + + An optimized algorithm for temporal dithering minimizes noise artifacts on the + output image. + + The dither operation can be individually enabled or disabled for each pixel + using the alpha input bit. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-dither0 + - fsl,imx8qxp-dc-dither1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + dither@5618c400 { + compatible = "fsl,imx8qxp-dc-dither0"; + reg = <0x5618c400 0x14>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst0.yaml new file mode 100644 index 000000000000..5c64e897bc35 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst0.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-extdst0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller External Destination Interface + +description: | + The External Destination unit is the interface between the internal pixel + processing pipeline of the Pixel Engine, which is 30-bit RGB plus 8-bit Alpha, + and a Display Engine. + + It comprises the following built-in Gamma apply function. + + +------X-----------------------+ + | | ExtDst Unit | + | V | + | +-------+ | + | | Gamma | | + | +-------+ | + | | | + | V + + +------X-----------------------+ + + The output format is 24-bit RGB plus 1-bit Alpha. Conversion from 10 to 8 + bits is done by LSBit truncation. Alpha output bit is 1 for input 255, 0 + otherwise. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-extdst0 + - fsl,imx8qxp-dc-extdst1 + - fsl,imx8qxp-dc-extdst4 + - fsl,imx8qxp-dc-extdst5 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + extdst@56180980 { + compatible = "fsl,imx8qxp-dc-extdst0"; + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml new file mode 100644 index 000000000000..92f6600af49e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml @@ -0,0 +1,147 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-fetchunit.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Fetch Unit + +description: | + The Fetch Unit is the interface between the AXI bus for source buffer access + and the internal pixel processing pipeline, which is 30-bit RGB plus 8-bit + Alpha. + + It is used to generate foreground planes in Display Controllers and source + planes in Blit Engines, and comprises the following built-in functions to + convert a wide range of frame buffer types. + + +---------X-----------------------------------------+ + | | Fetch Unit | + | V | + | +---------+ | + | | | | + | | Decode | Decompression [Decode] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Clip & | Clip Window [All] | + | | Overlay | Plane composition [Layer, Warp] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Re- | Flip/Rotate/Repl./Drop [All] | + X--> | sample | Perspective/Affine warping [Persp] | + | | | | Arbitrary warping [Warp, Persp] | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | | + | | | Palette | Color Palette [Layer, Decode] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | Extract | Raw to RGBA/YUV [All] | + | | | & | Bit width expansion [All] | + | | | Expand | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Planar to packed | + | |->| Combine | [Decode, Warp, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV422 to YUV444 | + | | | Chroma | [Decode, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV to RGB | + | | | Color | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Gamma removal | + | | | Gamma | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Alpla multiply, RGB pre-multiply | + | ->| Multiply| [Warp, Persp, Decode, Layer] | + | | | | + | --------- | + | | | + | V | + | +---------+ | + | | | Bilinear filter | + | | Filter | [Warp, Persp] | + | | | | + | +---------+ | + | | | + | V | + +---------X-----------------------------------------+ + + Note that different derivatives of the Fetch Unit exist. Each implements a + specific subset only of the pipeline stages shown above. Restrictions for the + units are specified in [square brackets]. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-fetchdecode0 + - fsl,imx8qxp-dc-fetchdecode1 + - fsl,imx8qxp-dc-fetchdecode9 + - fsl,imx8qxp-dc-fetcheco0 + - fsl,imx8qxp-dc-fetcheco1 + - fsl,imx8qxp-dc-fetcheco2 + - fsl,imx8qxp-dc-fetcheco9 + - fsl,imx8qxp-dc-fetchlayer0 + - fsl,imx8qxp-dc-fetchwarp2 + - fsl,imx8qxp-dc-fetchwarp9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + fsl,prg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Optional Prefetch Resolve Gasket associated with the Fetch Unit. + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + fetchlayer@56180ac0 { + compatible = "fsl,imx8qxp-dc-fetchlayer0"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter9.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter9.yaml new file mode 100644 index 000000000000..fbdac4526b7b --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter9.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-filter9.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Filter Unit + +description: | + 5x5 FIR filter with 25 programmable coefficients. + + Typical applications are image blurring, sharpening or support for edge + detection algorithms. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-filter9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + filter@56180900 { + compatible = "fsl,imx8qxp-dc-filter9"; + reg = <0x56180900 0x10>, <0x56183800 0x30>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen0.yaml new file mode 100644 index 000000000000..72e88bbffb17 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen0.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-framegen0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Frame Generator + +description: + The Frame Generator (FrameGen) module generates a programmable video timing + and optionally allows to synchronize the generated video timing to external + synchronization signals. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-framegen0 + - fsl,imx8qxp-dc-framegen1 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 8 + + interrupt-names: + items: + - const: int0 + - const: int1 + - const: int2 + - const: int3 + - const: primsync_on + - const: primsync_off + - const: secsync_on + - const: secsync_off + +required: + - compatible + - reg + - clocks + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + #include + + framegen@5618b800 { + compatible = "fsl,imx8qxp-dc-framegen0"; + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor0.yaml new file mode 100644 index 000000000000..0eab18192966 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor0.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-gammacor0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Gamma Correction Unit + +description: The unit supports non-linear color transformation. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-gammacor0 + - fsl,imx8qxp-dc-gammacor1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + gammacor@5618c000 { + compatible = "fsl,imx8qxp-dc-gammacor0"; + reg = <0x5618c000 0x20>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend0.yaml new file mode 100644 index 000000000000..228cd0a9e9f8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend0.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-layerblend0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Layer Blend Unit + +description: Combines two input frames to a single output frame. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-layerblend0 + - fsl,imx8qxp-dc-layerblend1 + - fsl,imx8qxp-dc-layerblend2 + - fsl,imx8qxp-dc-layerblend3 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend0"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix0.yaml new file mode 100644 index 000000000000..fe2a77b518f9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix0.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-matrix0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Color Matrix + +description: + The unit supports linear color transformation, alpha pre-multiply and + alpha masking. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-matrix0 + - fsl,imx8qxp-dc-matrix1 + - fsl,imx8qxp-dc-matrix4 + - fsl,imx8qxp-dc-matrix5 + - fsl,imx8qxp-dc-matrix9 + + reg: + minItems: 1 + maxItems: 2 + + reg-names: + oneOf: + - const: cfg # matrix in display engine + - items: # matrix in pixel engine + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qxp-dc-matrix0 + - fsl,imx8qxp-dc-matrix1 + then: + properties: + reg: + minItems: 1 + maxItems: 1 + + reg-names: + const: cfg + else: + properties: + reg: + minItems: 2 + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +additionalProperties: false + +examples: + - | + matrix@5618bc00 { + compatible = "fsl,imx8qxp-dc-matrix0"; + reg = <0x5618bc00 0x3c>; + reg-names = "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop9.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop9.yaml new file mode 100644 index 000000000000..371bff3aaede --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop9.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-rop9.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Raster Operation Unit + +description: | + The unit can combine up to three input frames to a single output frame, all + having the same dimension. + + The unit supports logic operations, arithmetic operations and packing. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-rop9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + rop@56180860 { + compatible = "fsl,imx8qxp-dc-rop9"; + reg = <0x56180860 0x10>, <0x56182000 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml new file mode 100644 index 000000000000..66c12948ab09 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-safety.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Safety Unit + +description: + The unit allows corresponding processing units to be configured in a path + leading to multiple endpoints. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-safety + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + safety@56180800 { + compatible = "fsl,imx8qxp-dc-safety"; + reg = <0x56180800 0x1c>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml new file mode 100644 index 000000000000..f9cd25488584 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Scaling Engine + +description: | + The unit can change the dimension of the input frame by nearest or linear + re-sampling with 1/32 sub pixel precision. + + Internally it consist of two independent blocks for horizontal and vertical + scaling. The sequence of both operations is arbitrary. + + Any frame dimensions between 1 and 16384 pixels in width and height are + supported, except that the vertical scaler has a frame width maximum + depending of the system's functional limitations. + + In general all scale factors are supported inside the supported frame + dimensions. In range of scale factors 1/16..16 the filtered output colors + are LSBit precise (e.g. DC ripple free). + + +-----------+ + | Line | + | Buffer | + +-----------+ + ^ + | + V + |\ +-----------+ + ------+ | | | + | | +-->| Vertical |---- + | ----+ | | Scaler | | + | | |/ +-----------+ | + | | | + | | | + | | | |\ + | ------------- -------------+-----+ | + Input --+ X | +--> Output + | ------------- -------------+-----+ | + | | | |/ + | | | + | | |\ +-----------+ | + | ----+ | | | | + | | +-->| Horizontal|---- + ------+ | | Scaler | + |/ +-----------+ + + The unit supports downscaling, upscaling, sub pixel translation and bob + de-interlacing. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-hscaler4 + - fsl,imx8qxp-dc-hscaler5 + - fsl,imx8qxp-dc-hscaler9 + - fsl,imx8qxp-dc-vscaler4 + - fsl,imx8qxp-dc-vscaler5 + - fsl,imx8qxp-dc-vscaler9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + hscaler@561808c0 { + compatible = "fsl,imx8qxp-dc-hscaler9"; + reg = <0x561808c0 0x10>, <0x56183000 0x18>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature0.yaml new file mode 100644 index 000000000000..5add40dd7edd --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature0.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-signature0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Signature Unit + +description: | + In order to control the correctness of display output, signature values can + be computed for each frame and compared against reference values. In case of + a mismatch (signature violation) a HW event can be triggered, for example a + SW interrupt. + + This unit supports signature computation, reference check, evaluation windows, + alpha masking and panic modes. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-signature0 + - fsl,imx8qxp-dc-signature1 + + reg: + maxItems: 1 + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: valid + - const: error + +required: + - compatible + - reg + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + signature@5618d000 { + compatible = "fsl,imx8qxp-dc-signature0"; + reg = <0x5618d000 0x140>; + interrupt-parent = <&dc0_intc>; + interrupts = <22>, <23>, <24>; + interrupt-names = "shdload", "valid", "error"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store9.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store9.yaml new file mode 100644 index 000000000000..3228b5206f0f --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store9.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-store9.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Store Unit + +description: | + The Store unit is the interface between the internal pixel processing + pipeline, which is 30-bit RGB plus 8-bit Alpha, and the AXI bus for + destination buffer access. It is used for the destination of Blit Engines. + It comprises a set of built-in functions to generate a wide range of buffer + formats. Note, that these are exactly inverse to corresponding functions in + the Fetch Unit. + + +------X-------------------------+ + | | Store Unit | + | V | + | +-------+ | + | | Gamma | Gamma apply | + | +-------+ | + | | | + | V | + | +-------+ | + | | Color | RGB to YUV | + | +-------+ | + | | | + | V | + | +-------+ | + | | Chroma| YUV444 to 422 | + | +-------+ | + | | | + | V | + | +-------+ | + | | Reduce| Bit width reduction | + | | | dithering | + | +-------+ | + | | | + | V | + | +-------+ | + | | Pack | RGBA/YUV to RAW | + | | Encode| or Compression | + | +-------+ | + | | | + | V | + +------X-------------------------+ + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-store9 + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + + fsl,lts: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Optional Linear Tile Store associated with the Store Unit. + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + store@56180940 { + compatible = "fsl,imx8qxp-dc-store9"; + reg = <0x56180940 0x1c>, <0x56184000 0x5c>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <0>, <1>, <2>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon0.yaml new file mode 100644 index 000000000000..fc771c067f74 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon0.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-tcon0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Timing Controller + +description: + The TCon can generate a wide range of customized synchronization signals and + does the mapping of the color bits to the output. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-tcon0 + - fsl,imx8qxp-dc-tcon1 + + reg: + maxItems: 1 + + port: + $ref: /schemas/graph.yaml#/properties/port + description: video output + +required: + - compatible + - reg + - port + +additionalProperties: false + +examples: + - | + tcon@5618c800 { + compatible = "fsl,imx8qxp-dc-tcon0"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; From patchwork Mon Dec 23 06:41:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918502 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2041.outbound.protection.outlook.com [40.107.22.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F80E16C687 for ; Mon, 23 Dec 2024 06:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936130; cv=fail; b=cz706vOUa5znzlEKhRc41OwEbrRTPzZNl80HtEoi000J5Lrg79EaQH7mkjuVPSDE0/1cpCw7Bj0IrN//vdUriZTQSr2t5DGwksHe/d3dyylZtSOTX2RlTavNla3ZSRc0gPSnzCoP62gkThDbfoZdIt1Yj6u7idh4kwoeY0eelzE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936130; c=relaxed/simple; bh=4NIm4spabxJS3buQG2MJVibBVc2Wh7JeOgs4YNXjgeM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rMJ/TiKg68Kfd3YPa/nJ9XcvMzspDjRP8/0P71uI1U4nob9ipDDbksTJX/9aq12SUPV7iNDEpuL0DFplQtE+w/hzF4USboV0lR0VkHedzIpEsM7rG2mgTBuLlRaTpx4f4mFxmmWqNr2BeZlakp8AqVsM17gFwukPTgZnTAX0RaA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=GyNxpJpx; arc=fail smtp.client-ip=40.107.22.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="GyNxpJpx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tMxNa2MTmlvDmQLsp8oHOmWRPWqi2cEJctRA0igK1rbyGDC322KTAgSaDad7c95TiOxTAbelDvBtHnSbT1dzB4i6bkQrp+++PYjqip8+NFB9wzQNUA6YNxFhMmj+au/w9Qeck23g/Ha+JtgtDPxi6ZFca8Ya/YlF/kcOz7aLNx/pmvqX+6aEEpMLA9YAr2YjPamR2mw3FeNrrzeBCtLNw9oOyBjseyvppfRf3HbD43NglQhb6YO9qipFRwJdDpxbhaNVVuDZOxFCZkG3aGiqLo0oS1jFVn6iXVK5eBLw6f9/u+hW8mg+C/j/pVUCgXoRhPuenjwqk+BOvEmi/XqELw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ncpJMUuagEW6GbW6rNX9QgfZojcMMWRKlmdjSnVwn5w=; b=rA/J+3j3wsXGxgMJPCI/Oagdqq+PdTfac0OJEvlrp33D1kEB/qWYvy/vCKGNR6D7LIScG9a/v5sxpAi8dOnPPlbISFGhFmtQp654lB8yWHrO2VLJUgpdMQfTnN2ivXCB/OH27fTB/2B3QC3Dt09L/ax82+kuV6CqsNG3J16EiY0py5OPiuYPhVUB81RbZH76rsk86lMqsHJ+n34JtovuDUE3cp3ffAWcf1Xf+cZp1gAKCj33hUmblBSR16+GGwi85H0Hrc9jZrYBUf8igGxGKJRGm4tNS2rEyZlNw52MhzWip342CP3l8JxVsF+NHL443kAOz3N1ArRfVJMksHkaPg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ncpJMUuagEW6GbW6rNX9QgfZojcMMWRKlmdjSnVwn5w=; b=GyNxpJpxjgPZ20o+kBEi1mhgT4rgPFV0claU4INwRjjdXzgh4Hxv+2T8y8RPrmyhbKeZR43mJdKwynY9taOMKFEEnAN+o5n0vqTQ7zgkmrvyZBr7VYdogyCMjLGrUInI4nNDiGSHDZTN55iJqjjfoFT7VLuM7PRhmyL2YpgtRTjYsyy3fDLcfH5VUBAcAlZl83j1/pwQ/GwpX7gGs1NyqzZVFBbfpyrysA/w3cqa7qKpHUKlud+h8M6xMVlGRsKsuIkyDKRXynukqSuc+TpkluBCODlJtepQK6OeNE5uBy7i8eFiN15K6zYQji5d+506iHYVQ6ZUI42hsr88YYrt/Q== 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 AM9PR04MB8986.eurprd04.prod.outlook.com (2603:10a6:20b:409::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.19; Mon, 23 Dec 2024 06:42:01 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:01 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Date: Mon, 23 Dec 2024 14:41:30 +0800 Message-Id: <20241223064147.3961652-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM9PR04MB8986:EE_ X-MS-Office365-Filtering-Correlation-Id: 586c5ca3-7763-475c-b03c-08dd231ce797 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: cMnHqQatQ4H4di4F33zY1T7pmxuCDhSOP+mb5fGAkMvVb65diDBkatj9aT5kN7qX2EClL1TkDTJ8J2YJRJff+pmtK2dQCDdoC4396lFd/N7DQr1XGTC2lzrvae+O3fUkXxR4ch7byb57eIytb6iDJtcppSCcNxpx30Xf3nFPCtRmXIFNxaL+Dpno9FIAqNarJgjiKsXipBv8x5YLGl1a9LTNvLcSnCQIghCToEPkiMPcpOi4gw37amLbuPuLD1AOfCv8dMHqbGCKVoJbCgN3qC4q6jmLTBoYLCJp34tapo6CZxxPsmvG1PrLraqsim6/J2IjG1/+GgPLF3Lsh/giIc//+qOSvqG3uoxN33LZT1cyUFe6gJZ90z2BcvXumC7nWFUWFMKSpizerHAZvKTJlU8YHJdvCV30dJRfXAlHYlMaytF9f4rkuKr53FLB5NDU15pOrFXokpJ9fDWRr4l7efSgKVri3fIsixcQM/YSb8wbUVDs0SbSePeMTqxXXA4IfPrCk9PoXCyTyr7JuB8zZynHkejj6Xmfd2yFbklERdFf227ZZ/yJKZ0OpAmomKBS62Sgo/ziOcZi8GaPU9mVSHQfmTabp7aJVis4mnMj36o3EDpT+XROM+xdSOCS1c3vXR6IMQp9Tj11llNYeV34/U6D0k8wxmFMKw3HyPj4TluUj52RDsgaMPyCz5DYBaVIFC100YYszvHkPDTwSHSEyzYCAyTNCVeo+VNwD42pwlzD5NWMTpusbjINppIMUJnYUBKPbMYiwxcTO2WNHiVkXGqxHAMnPMheQ7mTJtcFD59VcQOVzSHx9AIP8b1GCH2T8d9zirm9kLrowk3Pz+UtuT6G95w8/TV2pTi0bVzNlaJPLkVaIwFPkj1j2bhuc0/rSFVU2S98RMV2oeFYErW/z9Cwcn+i5AK7AwxOd+AiNP/ysZ6g1u4RLNoJ0pdT5LtCWABsPHIHFMxy7xKOch5Q062KoqxrsvmoiGAVUP6mHkH+HNGiTJIk8YmADINhyleN7vyPsPxW0BND0SXcKPZ3CVP6Dkf6grfIcOwjttZwHyo5/PF6FQH5sfOzsPXBuINTXq5uEoUOfaUkF4LuhkZmraYoMzxTceV2E+foZJYyvlLaZ4tX+LtbEAfIAHTcHywn97p1ximYyHSuWlLttG56AAHJ2Xu8BRCvG1zNgQ+YeOh0tMibQeXIeZfrPqDm/0Isy+a2f3IGuIF7T9DXXQNgUpNyXqGcCvUvxkTTRt2HFrMaVXtoSbzkpthP+bOelI9s1RU4p9PxNw7QueBT/jaoHRjDw4hnuKQKRaiBdN1JEDulNtNsKhBuRs4GUqLizKB+UivMu94LaOKDkK3OS3wi1vKq34gd5NzO4Uvh+zJO6XhJaTIkFJmg1XvtnARgoLkI 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:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UcodH2Fiu4k4mj+IQXD7w5yLY0OhYcByo08GmgSuPlPDnfU54qfBoPnXMhTxwsMEGAhr++Hz7VJpfICMQ5P79nH4UhUjWRCZHuyFgspTVur/XcDbmSnlAUxWOr8YH2N67gu5fcmILUXuNCjDU99IxBCAsGa5hIVZrIfj/ajt5292SGfmrDGXqVazKvDKXjIZ1g4GEUCwIlOPjLGj/8DQLf31HN2UqUh5SdPBsmy1pVzAnLiQroI3BYZLBCZyB79pGadgOBq1r8q5O0s9aYaVBqq0vZroBNAmkotRRRUQwm/nhwouWjwkFL2zYEvBkjqKcbOgZhvR0wJ1Ahk1TWSAjGKQpSnExHogNsQd1btWoHE/KEOjI5dy0j8OrTDNHYDsrdA5p/p8BHGG01MPBAtHOe1rrt5NIDTolXnFPSpGrPqlr2C7etpSdXRjV9Wvp2yB34r4Kt1VLXNXXDCXXIHwb7LQ+sEwrKDQfM8C+ime3xkfzXiPytced/neSBNS8fyLp9MNlADV0Ew9lYv068NbzIdT3/nhleVYNuGGv6YK4AIflQe3yZB3v3aSZwksBWwPZgv4ZCGJPgkIbKiA52crJ2CaBRTUYclINepMJwgQCExSEvj2+tRLATYHzUYiz9CLXpFpJeJFoGKU1hHtVUMRnOaxQKnU2qRB/vgT3CJFmAMTns6oxJCw9U3o21R0nG97swDyRj8lfZsbuZVWz8QJe+dmZ6K15hE0uBrAhKlicDieq7ifQcTGgzoVj7PPbF+E3aBKX7GpTclkd1f0vVbQoDO/bWST9kxGdL9O1d8hFnAxpliq6NCPYhwoZJE9G0Lra0puDwDXuOlZDppGBlHILNZXkKetcHX9PPHxtP+2AClcD8GlIWAIvsEGCQ5EZwCn2tqOnSBu6cmuY96QfEqFi4KHrAKl8U4EcbP9HfLlf2Cv3OJ7W7t0S/QnsKqoTfhR1Vi2TCAhBeP1yhVrgWaCkn7BsR1h3YNRXKewvj0m8xycNsFziaMkdR/9N5g68TkpzirBeIDQXdpEsFZGwDn1UUfSO0GXEQR3iBgHENN+pExbYRTTXIfOfis46DM9gT9dnoW0gVvCUcvdKqoobUtisoShM5us5dzxZLqhTO+dBPU+uUSvvw9igJHfnwkqBG+UrZ8JFrg3K+hUc2h+8fqm/f2E79WviieZXzBNkMzrC4KJzIADWi8ICPrribXiEMKUOFEq6ivoC8bdEyLpH1nsnTcu3/ZYmircCIpOzQo+icDznUYYwr8yTGV0oaodCamcJiszEMhPvEORR5UMlnHGkYa3CbYNOkYA84pOwBdXLQ3lOs8d8gag2TNyM7TkbyT4WZFhZKbRNu8JDgQb0T4L+M8u0DXHp+zdUGzCKcmGdza7wY8WVCl7PAL0tJEeOC3LUD29PWLkSK2xSIQ3ZmdbOjxaOUufF1793ciBTrnGBXBuQUlq7XyO9V+JbYJkE5aD3eINIn7hnFSVxDDRky3qvE+iERGKbSK0ihwPwuFz6pK7vBGx2KmtKkBj4iyCu3Ov/rdcTQ9AUn5osiXO9WSQ23xaqIGKr2uGW/JLkLzuqBOY+bMr/HVlM7CvECJcH4Bl X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 586c5ca3-7763-475c-b03c-08dd231ce797 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:01.0148 (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: FZgQkDfplJzrlfNwX3rM+AjmG+cUbkm1MwCxN8p4s2Y+xks/+1Ifh4dDwHPvfhTUXUfEGQK+s1X69eFsXmncgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8986 i.MX8qxp Display Controller contains a blit engine for raster graphics. It may read up to 3 source images from memory and computes one destination image from it, which is written back to memory. Signed-off-by: Liu Ying --- v7: * Add instance numbers to blit engine internel devices' compatible strings. (Rob) * Drop some Rob's R-b tag. v6: * No change. v5: * No change. v4: * Collect Rob's R-b tag. v3: * New patch. (Rob) .../imx/fsl,imx8qxp-dc-blit-engine.yaml | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml new file mode 100644 index 000000000000..6c14ce653619 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml @@ -0,0 +1,204 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-blit-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Blit Engine + +description: | + A blit operation (block based image transfer) reads up to 3 source images + from memory and computes one destination image from it, which is written + back to memory. The following basic operations are supported: + + * Buffer Fill + Fills a buffer with constant color + + * Buffer Copy + Copies one source to a destination buffer. + + * Image Blend + Combines two source images by a blending equation and writes result to + destination (which can be one of the sources). + + * Image Rop2/3 + Combines up to three source images by a logical equation (raster operation) + and writes result to destination (which can be one of the sources). + + * Image Flip + Mirrors the source image in horizontal and/or vertical direction. + + * Format Convert + Convert between the supported color and buffer formats. + + * Color Transform + Modify colors by linear or non-linear transformations. + + * Image Scale + Changes size of the source image. + + * Image Rotate + Rotates the source image by any angle. + + * Image Filter + Performs an FIR filter operation on the source image. + + * Image Warp + Performs a re-sampling of the source image with any pattern. The sample + point positions are read from a compressed coordinate buffer. + + * Buffer Pack + Writes an image with color components stored in up to three different + buffers (planar formats) into a single buffer (packed format). + + * Chroma Resample + Converts between different YUV formats that differ in chroma sampling rate + (4:4:4, 4:2:2, 4:2:0). + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-blit-engine + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^blitblend@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-blitblend9 + + "^clut@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-clut9 + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchdecode9 + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetcheco9 + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp9 + + "^filter@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-filter9 + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-hscaler9 + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix9 + + "^rop@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-rop9 + + "^store@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-store9 + + "^vscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-vscaler9 + +required: + - compatible + - reg + - reg-names + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + blit-engine@56180820 { + compatible = "fsl,imx8qxp-dc-blit-engine"; + reg = <0x56180820 0x13c>, <0x56181000 0x3400>; + reg-names = "pec", "cfg"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + fetchdecode@56180820 { + compatible = "fsl,imx8qxp-dc-fetchdecode9"; + reg = <0x56180820 0x10>, <0x56181000 0x404>; + reg-names = "pec", "cfg"; + }; + + store@56180940 { + compatible = "fsl,imx8qxp-dc-store9"; + reg = <0x56180940 0x1c>, <0x56184000 0x5c>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <0>, <1>, <2>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + }; From patchwork Mon Dec 23 06:41:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918503 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2068.outbound.protection.outlook.com [40.107.249.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFA03156F5D for ; Mon, 23 Dec 2024 06:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936138; cv=fail; b=HSiJ0HddRJ0uZHDKqUbO2Md4QjQZ5GhItXpEQtfNGSFvGqIGkzvm5fYFFinHMi3wzLlIPFUx9V3EaQFr86KAdqBrK2pdqGx0IrfubPUWXORVApIeuInNVN2i+Y+esfoF7k8lnNUvfp1DUS/hAnvLPhXse/YsXy/i7M9zrKyXL0M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936138; c=relaxed/simple; bh=ohnAr071j8pzk7M6Xx6y/IZjdH5gTHtg7yiFEV98f+M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=q2nuAROlawBlUrHrtBx6EZhjPyV26+kUTa+Y5ZMP02uBxegSwis8pXfg3YIarI8zMcD1UH0Xcios+Tr7LqWaNyIqpS5NnGGVDNVpNsmtayE0TpaNeMpcBXy9UoTTuAPeneWMGc+JUrve4tUaN/4RXj0R0yHBkhDpDOf+eTqLzXE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=b5ee+yIg; arc=fail smtp.client-ip=40.107.249.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="b5ee+yIg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q+ZgASOWrJTU6kmfLLbhwKnT2PpRtURkpefD7vFpF9LHjWJ70tR7QKnK/TYMOJ+sZB2jdCtBptD3RGqg06HxuAiLG9Dxg+37oudOKhmy3alrzvfhTUauG2IDGR/4GvezQ7JJ0ox7Np9QxxNxYbfeZlFCSQJZ7+uFuxZ0vfwiqVrCnGBVxBp6Gn5f1T4M7rFrOxO9V2wFzgSaJV7ZKXWmTuUZ4gCeIbEgz3RIeRsB6CNUE+x/qcIQnb2adTLIGcAPk/9YHB9+BntZbt7WQfN4x4CXiEjjwv36/ZUQ6wgGuZrIMr/1YXEukgpiZeH41oKlR5cHpCqN8nbVDxSKst8YUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=QsyWWrI5GjT0B5shM7zKy7frQ3QBVDXtpKjveWOOL08=; b=VzaAj29AWR19i8owdMlz9A/T9RoIRJmNVC2mDp3j2eJi2EgXcPYrKT4NaOwdkUZLB/NnP3IoeP1stIx5/Leu2RMkP1hcR9yqjxPIIenmdvZwWRrduDJWsrFBjxSU8cYNNg1EvXqxMkulXL1DoIC3iPyr0L2io6mJrcBLEF063IWQfD/sI+NHdIhzoaEGcNGSZ0aTL9UFpgKWbXxKBLQaPrWvBD+AjNohM3WYhgpuI/pZmxBSdPwECe7Bpd6DyIQnsPVOBzvO1IqN7qbL0IcH42JzYp1b6wBc0vc4QyZZ2K8zsLjKk818VkrRHzmZRSkV2x8KkrP0AhSn8xhu4n4Srw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QsyWWrI5GjT0B5shM7zKy7frQ3QBVDXtpKjveWOOL08=; b=b5ee+yIgQhG6a+DEQlTeSrrbQ4mWmx72HKmyaXeZjbRsHPVX/KgrmHopO5HWvrdR83SrB4KiZDoPv2myJFTJxz1+XXXDtASttDDedTzX15ePG/d/FN1jXyr8nS+5usFJHvBMht5WdzFtXExiOK4yz8mFQ0KozA62w6d4bO2fqOwcdLNgJYXMAsQkzqeQ1hQTseQgKyZoDsZogbXoj8HPIUip0keTbxjk7Xve9Pb6ZrHF//ivsn0ruEsK6imCqb9nuurqDDSF7CUE0OtcX2W8orYvKvLJgsvs8roGg2x8RwSDaQSK0BWfBwGkLQkydWBLyP6/3KrCAFDn9WRkKMCifQ== 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 AM9PR04MB8986.eurprd04.prod.outlook.com (2603:10a6:20b:409::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.19; Mon, 23 Dec 2024 06:42:08 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:08 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Mon, 23 Dec 2024 14:41:31 +0800 Message-Id: <20241223064147.3961652-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM9PR04MB8986:EE_ X-MS-Office365-Filtering-Correlation-Id: e8d43749-3306-4527-8074-08dd231cec1b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: wXQQqrBnyHd+UNIV4dcWgauuptuWySOTcIEJLs3n8pVViTe94SN3EBpzZeJ82BRUQMByeAK4g9bkkwTTIB5zMyW2xTkGUwEYcVCb9iwtsROEVxs+a29sbUcxFWUXQFcyAf0HqHq8Ol+QlC4RMn+25NBpnGq8KDgXlaZSQORnVfMQU8U1Ok0lh20FabiI4Ojb9KzJn4Wxgj0DP0+Q09UxtN7jxN6V9B9p5XPMeYrId42Nm8XjKceVjMSWKHFx9sIeYBJ8rDZdiG0b5oDETaj4CbXaAj/TB9ILKoNLL/w8MmSG/M158PSxkdugu4p3xAZmgxuEQ26Yj1dT26SCaaauUSwae46kj2DOOBGoycOPLQDMhnBSNYccmBwS6ctt5zWuGxOB+mp04wBkl8CnJNPKjwomzYxO4e6alrR9yjITHAXtlPOIneJyABVoGOH4o5uV7AAB3mNPny/C1vc5KnfGoWu+USA2RpVCzBO4EmSrJVWqxVnfjioE1VYlabaS6Qti7pXgMxn4mjEmFzzcZ+wurLky9WL8WG91dLVBcikaMAWQAtn9mypTFXDFywUXQJrEkcuN8YFniERu8AufpBETw+aJrrMoSMEHVejj5jGLgH3tu9DjGex3HNbTsf8fIJ5w1jz0A/ASRvMZqrQHlVWalxdW/NQqruFG0vWdNxNYuSx8cIaj7uz04g0mD+k0pj1XR68Qk/GwgiM4J6GKtEit/par1c+QWVmjl93xmdBeG6XBPgRkM9dNHUiBE3SCTmG55d4dSh8tDtRht44YD1Yku6pue0cLwdmXLpeHOHev0m/iacp1kawv3UWzdMuWgYwMwdv4yifOqkocJ87UMWDAEnMSs5t2l9QkGm+jASAvcJW6kCMLEHD+ufNouhnQLU2boWdXjZw8Rbp/mDMYgovbOeehn7tEAWn6951SogBFwgv+LVw1szLb6Xxo5Z/eV7eK2OliI8Yt3eQQrg2PSkqii1q4FHwA2C5EKa8SLeanMlnrpKqkLO9wfOmAgglLXKEROrn2+F/08xkuarNF0bVOLyczn0l82SRuFYBTX0CAjTU4fCsa+ymkTUHGgg9MntSE6j3lguvZq9n++RTmqSv3r8xlHcCpK03xPw8/IwkWkoKWekNSZ1GJk04AZAXvhPNoGlTOSUOmnpf6ik6LqTMqQ2Qs7b+vPY16MJBdlUlt5YkF4EnsyQ7TG0SpaZip60p47zKw2R/YKNJdOgnBrt6F9TAp/uURyvY22XJ0yGG+ALU7f77EXLuwDhAJwkogySbb+660zpSL8VPlxErE5LV07/Ea0OmRYn5knrrEEzZGLlxqy89MyPFFso1BHzzOXr7oY4yb4L3EMU70gSD1MGTBuKtlvlHbF9min2u9kok9+0g+BrRT3UjQZGV0Ow50qZqH 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:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TQXd+qbxJVd6xGsxbRB9PwFcfnB0QhXLyC5V3Zx5TJSETwt91CpYus+8RdvdkQcA4dSxUPDm2WRUOg4labkugzWFQ42blaBwfAe27B3mOTpGR+RsGVj2zgaSmNPlXVs457e2QnaTKWOfqX8AbGJVFg8BdX+KUdKcblpyvadamv5G0MSN7jeSEdekwA5QkTnDXxo55dplnV7ilKpDT8nMNOtad7QvvwddwCEqR3H2ifFH6K/tKgngMls0ZooN2z1NBG3Ho1qzUIx9ziWGIPfPoyBzip+wMkn8px1P45gFrC86Cz/X6vNrjgUuiS/cErZHxpkGQebiOYc7c1MTzyYqRimtRvDchK9CXj7AZEYKhXgvO6pOdOBmso0OJGNOdrJWhIl4XV0icA0kzuBBwdv0PPNutZk/CZCG2vI5+5Ya/Yh9nvEl7Qui7ftcN0CF8W3OZYK3pOHFuxROuDxzR4bVhpBb2szx3/AbKU5NtCPZsk0ywU7U7MpWdAchPF7MfrdRT+sdkxhcbEA2dYd7PNALc+rG67ma7oy+y89FGC/hOLsqIpNaoR/vOz6GKT2RNuzTRdWWcdHXjoyEjVDBpo5iUmLHOX+XVB99ZFOVrK/PSM7TQy34QfBY7vKOoaznyA3jHOKNQs8x5gcBgDPI/2ZJpK6WnIY6MHAKrjUox34hQbDs8PuWGUa7bsZjTAjlFbpl1wkteIJJXY4FAmgYO7OYVDPkdB8JP31nD6s77cLPhdvY+qXH5TOTLZrVHNhbW3PNdmJwQl/PU55/ghUdU7jq/q/O09+CrKvvWvf0wsM6fUus3QauT27BvbNGkA21pFI52gZXQUTtdctsrgB9uXbVjsoIlKVz+CASf+cz/FT9BvKC0gjvoRYhHbpva61nDmd/artMinsEPXN2T8GAuuRx7vh/Nxu7+SWlkMab6CLCDv+FusFL/0EOqESpwFq4asIqQVGsNAiYMLBkeMMXN4AFMf8igVs36QD2nj3A+t340ae2gtXUatMTnNZlrhNJWJ1swXxMEyi+dFggCWBgRuqsg5M9EVnskS6OawgWQvVz8ktgfrQEIvVr87sclfpT8Kk2+CqLw8CMVw2q0bMpcP+JRpGEkHe0zJhxLc6V4KZRMqmBIJMaPkNittJ2wYAIX0rZ7hLsCp5TPnxJBkgGGsEbfY4Enb+TONMkp8Of/ird74jP2fKkU0OC2PioTlq4gCuH5NnpLQBrfBUjiQtykkQAULBEsXgAVdincXP8s1uYdVKkS9X3VLi0I7E8bBkYM1xsWm06r6suWoDjIefezYK06CV+7Gu6FrzJK94IPYQ/EEVe15ke2MI2UEFFN9viZY/W9Ay/opsz9ys5kzWBJVxtDOkizgPa/FqwHsLq1CnPJi1d3Yu6doZYJiujpzXm73XoAoZgIwl+F5GnLdnmTmdiwQt3RXaU3nx0iTyrfOZ/gvwkQ+jJUqDcm7/jIJg1NA1Hel8gnVdQTzbdr/M1R62VNLytRsYlOI/Si3qvfvYpE0ClzVw18pT+lBaI2/+SOadsl1REULr/Z/gwKEsNkcxr/ObG+FJY4DMcxbELd2nw29Ac+9AF2MPJiQq5CZUErLtM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8d43749-3306-4527-8074-08dd231cec1b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:08.5896 (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: rtJDutofjnr+8waXo4eR6zQEAEp4yucmj7Mf+N9damGEeqg5wFt4/iWKgqknA8n1XMe6ecB5FBa+i0Wvo4N1ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8986 i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying --- v7: * Drop DT alias documentations and add instance numbers to compatible strings. (Rob) v6: * No change. v5: * Document aliases. Drop Rob's previous R-b tag. (Maxime) v4: * Collect Rob's R-b tag. v3: * No change. v2: * Drop fsl,dc-*-id DT properties. (Krzysztof) * Drop port property. (Krzysztof) * Fix register range sizes in example. .../imx/fsl,imx8qxp-dc-display-engine0.yaml | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine0.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine0.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine0.yaml new file mode 100644 index 000000000000..60d1e0a4a5dd --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine0.yaml @@ -0,0 +1,235 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-display-engine0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Display Engine + +description: + All Processing Units that operate in a display clock domain. Pixel pipeline + is driven by a video timing and cannot be stalled. Implements all display + specific processing. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-display-engine0 + - fsl,imx8qxp-dc-display-engine1 + + reg: + maxItems: 2 + + reg-names: + items: + - const: top + - const: cfg + + resets: + maxItems: 1 + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^dither@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-dither0 + - fsl,imx8qxp-dc-dither1 + + "^framegen@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-framegen0 + - fsl,imx8qxp-dc-framegen1 + + "^gammacor@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-gammacor0 + - fsl,imx8qxp-dc-gammacor1 + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-matrix0 + - fsl,imx8qxp-dc-matrix1 + + "^signature@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-signature0 + - fsl,imx8qxp-dc-signature1 + + "^tcon@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-tcon0 + - fsl,imx8qxp-dc-tcon1 + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - power-domains + - "#address-cells" + - "#size-cells" + - ranges + +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8qxp-dc-display-engine0 + then: + patternProperties: + "^dither@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-dither0 + + "^framegen@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-framegen0 + + "^gammacor@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-gammacor0 + + "^matrix@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-matrix0 + + "^signature@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-signature0 + + "^tcon@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-tcon0 + else: + patternProperties: + "^dither@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-dither1 + + "^framegen@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-framegen1 + + "^gammacor@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-gammacor1 + + "^matrix@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-matrix1 + + "^signature@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-signature1 + + "^tcon@[0-9a-f]+$": + properties: + compatible: + const: fsl,imx8qxp-dc-tcon1 + +additionalProperties: false + +examples: + - | + #include + #include + + display-engine@5618b400 { + compatible = "fsl,imx8qxp-dc-display-engine0"; + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framegen@5618b800 { + compatible = "fsl,imx8qxp-dc-framegen0"; + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + tcon@5618c800 { + compatible = "fsl,imx8qxp-dc-tcon0"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; + }; From patchwork Mon Dec 23 06:41:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918504 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4B7C19005F for ; Mon, 23 Dec 2024 06:42:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936144; cv=fail; b=hvSMCtk1GBTTGzT9wx8q/Dk1Zu3aJ4/Szx0i++k4MiARl3byJkmHhMB0BU85zotPYMXjEELoPhvo30e2O/zftpzRD5uiv5Sd7mDULzLJVZ3IeFdw6BtzQ46fRlVGHIsIoeN2DA4yqh2h0rgJnsBFazWtRcBD5wpIiIoKVnUT8A8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936144; c=relaxed/simple; bh=J0KXO+YPqR/JOydYkqQboQ7dJDuzv8gt4Fi4Gt/hQhg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hqsYALS0UZdvzcpdH5bCwO9rwAJHlMFdnvUO2kdS2RMYEpLG2DxHtAwDoe1NyAdSB+HgTIRso3sGXgYzpBPahpCLU3w1R64rSPRsKDUVaUNPOpMRqrAAqr9pxczLkuFJtIRWSO2PhVuwTZ3jf0dga158hBjMUz+DmoiYIc0ihhs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=MrXge4mq; arc=fail smtp.client-ip=40.107.21.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="MrXge4mq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YIx/izUbFCNyBXHA2sRy4A8PeIorE4CKsTE0CSETT0eSQlfciAVkZW+jFVz4on+nitYpxvewecK5XFSx38zEOXZlKlmUmESEhzxXKsAVaQF+lxrkN1/qI7yBJQxzQzYEb2vveyQZVjSbHBP9WJxVRTib8zuxEQVdo6NivLaUtgpHt78BEgRQf3buVv3Aw3PjONm44V7DZVw81sZIKBboF++9uNiIangBsNWm46GnrYYNf1yT8xjUBVisOYWHE9Uilt7+Ryo9X63UCcPFpjsWDV3i4q8RBpAe/XzefqYaVx0u/e6b0QYdIhUvzew5A/4xVIVlPvK1/Fs+fsHYmSzT4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ZkeD2TziSnLiWIku6IEI0ox9ta1hXeA9u5BiRvqefGM=; b=tOIh6RfI1Mmk0HylW88V/1uhgo+JwIbP+5RWyVsaZHvNpIJHaDKpzjAM3Wbg9JHbKkJpf5muEJiXDvCmMsXCCzkYYpH9xDos+FGbCG5ReHuWXxo7z31f2upi3CV+pbpJK597iF+0x5UHkbcBFOwCkqi1pmok/sDY9a6AbHUD0zgfNTFBspJCD2vYb/8mjGyWlMjgi9A1uZNVexzVemGf1y1Mdmt/zjUCJXqrgvhlxLLt6pTVNhPu3LchricAWhvtyXh69WOnKheRExbRlhwqfWH1oDlR0OAk4+3mXepqs0Cj8hfm7B8uAi1mQeRAZXEiOUS4fboKcveYCGZPMlhmGQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZkeD2TziSnLiWIku6IEI0ox9ta1hXeA9u5BiRvqefGM=; b=MrXge4mqkOuXFSIa7/4XFmOPHdCBLK4+OMmIXwmiKVURqADZVbyBlOjC+bUIYlcJNS0p+0Iy5w8SILj/AVs53Xxstb5gQs1UZ6o+DjwuEqwN3rE/qdp40Iy1tAe8LTvZGp9zUd73y6zV9ET2xU7aK20JonfJ4hsB/LP4fypEx0hzP1mIcokkoGBPXTIR2ZClWaRXoGKWiVPPBASCoSnsjx+GEzGDGV1K6bzw675NBiynnmNeKz5TDrPMZQ34aqoSvl88U8aKOLLBPTmAwPYqt/id2c2XedHXbRdQlmpMqdCpPcRhnvdGPqjazDzCsl6g0qvRNCtAJl2Z2jaJJ3ozdw== 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 AM9PR04MB8986.eurprd04.prod.outlook.com (2603:10a6:20b:409::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.19; Mon, 23 Dec 2024 06:42:16 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:16 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 23 Dec 2024 14:41:32 +0800 Message-Id: <20241223064147.3961652-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM9PR04MB8986:EE_ X-MS-Office365-Filtering-Correlation-Id: bd53824c-0d1a-4af6-5184-08dd231cf09b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: //kRZaXgS5w/KMJXuyN/D0Y5owr3OaWuhqZVeJjVQmtBoNJF81fkl2TLF0xFFWAd8FpieREgzK/UZuLS+CxnqgeDt1TKmARrOgQu/UR02t/eHPANwU0Lxyht8gdeF48L+RWsQu6/k+/BK+7D7/aTrKOOhkusdinZvrUdLDevmyYagwW5HJopy32aVBdbVIWOxI17A+vqu3Ynx5IxQcn8Ob2zpS6tF7/UW1WluLCBrnNurYB2FCrFYomDu2YaIj8JVCnfda6joD7bTq54MhzLVx98TDeQ3ewNI320D4pIsfoxnQG+STXz5pilfewYD0yzAAf3au4+ktETHRNrPycDopyIt6ifSWyCRUVCJt7mfY2HU8AoNPTudKNjs5tuhOFY35GxkHD4drFzLc1KicXfVMJmB3EnIyI5gfK4EDy9XmAsN2LPSSZ8qWGVac54ILoYnHdDnFSn93yCfg9L3HGPVmRqxyBx87toiZLXfIOssK0vjZsGPm2PqDOTOAbDm7EeXKzk4uE9o+FaKHi3sWmsgi71v9TROHmzVTTzPj8MB7OaU5IKT5VhTXEbGmdAYVPc2wmafc2iGhJCCvOjFf8qnvqrSWi+dmXv9CTdD22VE8n5nSaeMotTPpKafbBzk2DvgtZbePmGAUBL118ynqmo78fh3Bu5wX16GPWSwmnlpl6j2HBA7cgvRUsI6IQ6BmOG+k7OQptS1LD9rpqrtM3a6FZJoG5o2icAGQQKZMTjWWsZrD8jJfCYLJySJ+SbuMD2uy4uR7F145Z0wajPzUVYz25DbcGjLKCGxFr1EJlE8gaDueESlvwyVnTcuQJkvhAZoNI6S/GNGhwm1TjwyVaBXz+zUTQ5VpknqgD/W7r1v4WFSzDdPwIf4glANXkBIU8ials3ql5DZbFS3kS5YEQPgUScmpzl3k850UlFMO9Rh6TecrRo1xqpPOy7BEnI7oN+Mh82OAQ9r498vNKj94qn5t6fO3QJALnmSFaXtiB/7mijJL/5D2z51DqiZLVoMHAfVsxod4Mz3AEmX4kY/2nZm4R/p6w+switY6L0Bp1GqfJuDfK9wz1X3VwWczyYHaoqGggVwXzvwTHFoMjIcXavSG7MTJp9WdQD28OWHjPAuSJXm4XPYrkSsP7I/TqqXqiUcoh/hZORDB6FZIp+nXgb4sO682TcDN5RDaCI6ebrbadItNQluFUA+7C6QdNOJumA8yXgNr4BrIQRGK/Z0vcOIlB0/Gb50Y8VbrnUpFlVLIn80dqug3yB3wenPv2O9xW2L61T3VaX8qULqSi51bkFfMvH8zOuMLz1KOnt3u1zqx8Wr7aO6GUhZD5S3z/yGiDR8MJljC5SUZbi82+C58lPwSAyZGCSO+K+uKSKIKKBwWa9J8ealq5vShsSENsaMd4s 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:(13230040)(1800799024)(376014)(7416014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aGFbNNepzEmzCFiWLxF4WrE18fcw+wj0n62x4c7bI5yJONHkmPzGEREXEFLqQtUYnZ1rfDwRHwZUnbJe+uAsoqo7HaiEBUjF3SK3Fc3MKLnhxaoKOvuEfz+wlNrs1u6MRO996/D5n2bHm/0zm4z+79T0ZRIeTP0ZISI+j1Igg4M5O+LkVTmG3sMTXmrvJsbammQg1HkRZUp+kfOx0APMjereA1GEzCFGIMyAjBuSfl36OeYIHdmCQpz/FZo8zBhrfreTB0pxj6DlUHyevDrfrYNblIgUSadss855JUHoUVHLVFpXh1doADd9CQXbKubQIQuzS2+d/Bk4sdwTC66JxN/n6BtqQ+UYu9HjIP95dzAzK0Rh7/GBGlMJ0tgCunn+NPJddDNAjgHxbgnYCEfq+higzqTp5gPvvM/6aqELtBEWTDeTiZeC1ZrtLbjARbPDPldiMlB2J3qeDy18IJNVz/i9WKzTCiWpo06CHwvh+NnJYrtq9nM/a9sFOfkOIBChuBdCWTdT3XbN769E0TKOMbcwpdLpAihXTAoUcSialb7QkTzQAtuiMZacIBFv3QooEH1552iEuKjAxdofLjhR8ktaNALuPIiMC0S1qZKHxXgbUrTtg4w1EiqB/mEpobTH3Ols5b/QUBLoQOD8O92vTmlrYCWtbVO8H+E/Ma9ND3x5JhEZgUhJLgtOZFfy3xjQJ99wDS2/u0M/DkM9c8HVNYNbElkMx6Uz4cS6z9GL/7CB1Z7DC7yXUjlHOY3bWeDLgP/yZQFEnHhqheAo4Kd1geCgLC1Ka5nNQpIcuhYUJPsatboUB/BVslLQgaeTcQBwozvsyVxD1w2fKs3OxlFwB1+DIYUC/JJ5XHF4jFY+p/D2a1eyfOckxjGS6vtLa8me2Xc8+orCNTThdMOFoU6L4rDCSb0jN7b+Nni/bOaY311MWZQTTJCH7TB5GCwsakDtZsPpgKMA0jidYgRDN6bffg3N+z1yqkwMO+kQ140WBLOmeI6Es4w7KqACDv6w2tkm8AWZkktgWf1CIiV8R6yJ9dCcf2TL7dIX1TZ62f97LEXOBMjUGfWKsgwi9wwYgiHuytGosuCJnn4UuKHnJxcKgPN9e94oqBlQDo6C126dLRsz9bjQFVe0lLuxatG9EE1hL78XUpSYwW7ToN2ZVl45zM9l9hoNYLv3StiLLJ9B4Ln+qc7T9ykp6VWZhyj3vyz4nZlQPUlS5pD5SCDIW1xn4tggM/T8cYZXHT8fy2QYBaW7hX0qpQjsStyLkpKK8gbkU96JEHBawFEKjFJrc386ITurmVrOCDrNxwBL8y12pmUAQyhnNCg9bA1MXq7o9VvT8WiQxhGehG8zi6jAbczHwiWmEOUS6qUQJJxfY9QA309d4h5oe+U3J/Z/KrlEGjPeL0DOjK9sEamr9ruAxNEgeThJ3Y7DRNOc3sZQvEvRAB1/Bs1/BbbwCaRUucEwvTMMdWQijA6ebny7cStRnn2jz9Tv/vjh71CXyXPIOcwY1LPT+FjlyYB00nSVl3k09Njc1mXVDjWjb67xIfw5TmUXDY+OGkFKGKwzbteGqiM6whR+nWQKlAgUm5vPjDNhVBHd X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd53824c-0d1a-4af6-5184-08dd231cf09b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:16.1094 (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: SJUvjoRTXmLJJ5mCkLosPdXFcyBiPIzBUuLVbqiKUjgoU9DKMgbWaf0Vt9wD3Nt5VSOjEMiycXzvQw5SwcSunw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8986 i.MX8qxp Display Controller pixel engine consists of all processing units that operate in the AXI bus clock domain. Command sequencer and interrupt controller of the Display Controller work with AXI bus clock, but they are not in pixel engine. Signed-off-by: Liu Ying --- v7: * Add instance numbers to pixel engine internel devices' compatible strings. (Rob) * Drop some Rob's R-b tag. v6: * No change. v5: * No change. v4: * Collect Rob's R-b tag. v3: * No change. v2: * Drop fsl,dc-*-id DT properties from example. (Krzysztof) * Fix register range sizes in example. .../imx/fsl,imx8qxp-dc-pixel-engine.yaml | 273 ++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml new file mode 100644 index 000000000000..668c9c9eccb5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml @@ -0,0 +1,273 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Pixel Engine + +description: + All Processing Units that operate in the AXI bus clock domain. Pixel + pipelines have the ability to stall when a destination is busy. Implements + all communication to memory resources and most of the image processing + functions. Interconnection of Processing Units is re-configurable. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-pixel-engine + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^blit-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-blit-engine + + "^constframe@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-constframe0 + - fsl,imx8qxp-dc-constframe1 + - fsl,imx8qxp-dc-constframe4 + - fsl,imx8qxp-dc-constframe5 + + "^extdst@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-extdst0 + - fsl,imx8qxp-dc-extdst1 + - fsl,imx8qxp-dc-extdst4 + - fsl,imx8qxp-dc-extdst5 + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-fetchdecode0 + - fsl,imx8qxp-dc-fetchdecode1 + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-fetcheco0 + - fsl,imx8qxp-dc-fetcheco1 + - fsl,imx8qxp-dc-fetcheco2 + + "^fetchlayer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchlayer0 + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp2 + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-hscaler4 + - fsl,imx8qxp-dc-hscaler5 + + "^layerblend@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-layerblend0 + - fsl,imx8qxp-dc-layerblend1 + - fsl,imx8qxp-dc-layerblend2 + - fsl,imx8qxp-dc-layerblend3 + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-matrix4 + - fsl,imx8qxp-dc-matrix5 + + "^safety@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-safety + + "^vscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-vscaler4 + - fsl,imx8qxp-dc-vscaler5 + +required: + - compatible + - reg + - clocks + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + + pixel-engine@56180800 { + compatible = "fsl,imx8qxp-dc-pixel-engine"; + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + constframe@56180960 { + compatible = "fsl,imx8qxp-dc-constframe0"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180980 { + compatible = "fsl,imx8qxp-dc-extdst0"; + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@561809a0 { + compatible = "fsl,imx8qxp-dc-constframe4"; + reg = <0x561809a0 0xc>, <0x56184c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@561809c0 { + compatible = "fsl,imx8qxp-dc-extdst4"; + reg = <0x561809c0 0x1c>, <0x56185000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <6>, <7>, <8>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@561809e0 { + compatible = "fsl,imx8qxp-dc-constframe1"; + reg = <0x561809e0 0xc>, <0x56185400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a00 { + compatible = "fsl,imx8qxp-dc-extdst1"; + reg = <0x56180a00 0x1c>, <0x56185800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <9>, <10>, <11>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@56180a20 { + compatible = "fsl,imx8qxp-dc-constframe5"; + reg = <0x56180a20 0xc>, <0x56185c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a40 { + compatible = "fsl,imx8qxp-dc-extdst5"; + reg = <0x56180a40 0x1c>, <0x56186000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <12>, <13>, <14>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + fetchwarp@56180a60 { + compatible = "fsl,imx8qxp-dc-fetchwarp2"; + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + reg-names = "pec", "cfg"; + }; + + fetchlayer@56180ac0 { + compatible = "fsl,imx8qxp-dc-fetchlayer0"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend0"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180bc0 { + compatible = "fsl,imx8qxp-dc-layerblend1"; + reg = <0x56180bc0 0x10>, <0x5618a800 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180be0 { + compatible = "fsl,imx8qxp-dc-layerblend2"; + reg = <0x56180be0 0x10>, <0x5618ac00 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180c00 { + compatible = "fsl,imx8qxp-dc-layerblend3"; + reg = <0x56180c00 0x10>, <0x5618b000 0x20>; + reg-names = "pec", "cfg"; + }; + }; From patchwork Mon Dec 23 06:41:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918505 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2047.outbound.protection.outlook.com [40.107.22.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9491F191496 for ; Mon, 23 Dec 2024 06:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936152; cv=fail; b=jbPtq3s0Wjx+H5b4v/5jTfEE4HiRu7SZ5bZ/r43O19VAY3bBsH9rY0FCnOlo+1BCtrOdQHUI8tR0ho1XVy+DPaLSTr54yEG506hU+fd/BHoYLNnimJSNC3VkgDHiPgG8FypUxPhHpex+sJH7jAuL1OX+zfIEynBAGRVL3c5wUG8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936152; c=relaxed/simple; bh=PgWq3s7kMp8nslQAViaKfdO9DREBpXDrb1EpF0Kuxw0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=B6AF4dz5pXEzgmj3JNllqZr/dRPvBPXMPKwkRU6MDPtOKamuOjqTPU1jIF26BC4eQs9/6qIaHTHNTx7NnZMHdM+eVVWvkPMv5buPWA8QrUVwWb034CuhXvsLOzxeXwumy5OozBZBJIuhlimIDM5fwDmjJ2qdNOWn4CwWxoRHnF0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Bg9Dni0i; arc=fail smtp.client-ip=40.107.22.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Bg9Dni0i" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=idiX0iFyJ2Bp/LzedqAf0aEXjdBcedHHYXYQGW4WhOaJW+3HaLh2/EX9caayMhRSLOlVB62bqCVRReiIIL6JLXrYRgRex5vqQLsltLF6uGsbyNbjkLa7rg0FHFPG+lzU+NTtJapP/KOE1jdCrtCNYxwhJcaV7jePR7bu9We6cA9d5maDxRsqW33lNvRX8C7wFRwIsK5MU0yqmRo1kppxAO7ptk5yRb7M6waPDiUolG9nZg3UrbpNqOIOvzmSx1Zruoj3vDRvUpYpu4G+JIxCSpihvgfGJGY+c3Dl24Ntx7HSOA/S49sqm5l6MZcd3l+VfqOH5aG6BJR5ZhjHpxXi+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=iRGsCfyFjAsb4Q/6iQSSGKNgGxkvtLPHfSylzBOaDCw=; b=JRhy2a9W/6WJbi7EidN4M5hXyoobu5SjFiXipzGZt4M+GTZrzpMwuC8QcMy8eMZZ6RXCw/qFFlj/3PVZNodLJBmpRC+Q3kogbeyAGBhgjmwKBznQUVvHvdV2rwr82bXgjjK71kZoW8Qgvp1T3zsFAfDU90EAkuK6qlttmqwJ4G7xkagAUeuyNK8rzuhJ42r8dCjZboAoV4ls8QyiRQbtw1ssgEkttqPBGaV2udHQTeSOiZ1eIctBZUcrC1pFz4EGVkMNZX/p8+8LUZ+JJ8+5kChz+b3ohmI1Gm1ftN4Blc9xolAwb+xfZWTlM9akPunf1IXAza814IKRIVwKvNcMGQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iRGsCfyFjAsb4Q/6iQSSGKNgGxkvtLPHfSylzBOaDCw=; b=Bg9Dni0iTXc+pMa+5DaCQuVGcpSacoYADaA2wnFxHfP+CTE4x9wkl/lxUt+87UafZqRx+HELR4yxBMiZc4EnFVSL4cu/wNSApOjlsBZJj9Co/otPWymxt01Mk8Vv+tT5YT9cTJQLsPnCDMugXGW5HxQDTGjZl8Ni5py61QK+cRVz9Se8TTYEMh/40ykYHhFOkLWlFdz1uZVqPm9h30v3TXoHBegFswlD0Bm4dnCkKoOsGUZlmAHvZCImO2Qj/PxD4U1nVWhZevp3xvlBcD2EJD1uQajokeNyDjcUgQFaUJbNesv0LSIhnqer8ueZBxcKQu15+B0Ml1icb4V1mk/+Rg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:42:23 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:23 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Date: Mon, 23 Dec 2024 14:41:33 +0800 Message-Id: <20241223064147.3961652-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 7f1143ca-ece8-4f7b-fb11-08dd231cf52f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: gCoV2/jOQyq3fPAr3hssZM6IPuM8UTSBFjA+L4SxqUi9LumcQAsgG3EBwDa451Y1mKUZVCQ5v0MHYoBULx9IMf3PUt/56A2KGXD4+1gtHGol6NhQ1WbMcDmeKwJQpJ0gDfVsfzJkRbW3gobd2acYVLSj0CUR8aZtwA/RMfN67sCJg2Epb26+7f4XlxtkKaXOl0tDakn9O7KF4A+To90UpZXcaOflG/UlSUtwPY+7m9A2Vwu1Hl6f/6o7w8eqjvjN+Q737sWatF6chEqH4vEVpXL/7zkBqywRSUpPcFTk4T4TfVnM4kys+/1qWTUyNMWQpw/BeunlVWAa2TKa3+AoT9pcfmlnYXC9e8pZ5MVppI41KTTZ23uuuFmM3UsYblNO3m+b9sIFrcSiQVSeaWBp0SXa5TfgI2Yms4SVW/Qu1DlUvd2umkSSoFLlsYjx6FQY3qgDey8C2Zi4OFasCFky7QPUsHhAuFf78CY4vDfk8QOXeIf6+785ne1W+4Jy3AMkgE+ZBBwjmAxd65dUOKn+jYgjoc3/ZKbUA3GcmC6vdLXmEPgx5p9jmFChZDzPaeN8xtkMG09VhV0JcGkI/5DKL4+IvLvb1jjywYFBmKrHiN2yexoztkPeXL3pMqSSE2Rik6wBIaUH8wETuAqC8reVxYWNBBoc2G7hOHq8w1jtAHYFoMrSv0t6UlgHo3Uj+UAplsIdkU8e3oaukfGGJecqNMnJb7tGDNhuwVzgsBj7qmILQa+/orcsDne59SPrfio0wMLLS63lDtWyeAqSeYc9EAEmcgujPane5yHYUqudTI1QzBUzf3qGyf7YROGRkxEaMm6PKSoJs89QBYy3iCnm2602pl7zXnixXLf8kKKJ3I6W/aAIBsdc2RWphojtKc6tBoAnj2hKhMfo4zk+nfQ0jbAJIxVjvI/CycnWKYFEwbq7U3zRBo5Se2P7S5rIRMj+bl4sr0FROmvT4kD8vyWpX8M0eg/aMxfGPSMEg/imsD7KUfcWv5xbcjZ+dMuW/sre+8rZwJBkNqnmgYsIEwkLL2AOOqQhBiBqW4PXjkS9rQpI6PRUwGtaO6I5Ae1Kk5obE0M6SPf3Fiq42uv25OsIPZmfPWHyLQzL2AvGvjSsGGGC1mhAfF9cO/tyrU/vL9d409XXyFT2xtl1TDG6gJ6QB7tjR92KhAcReU0IKRi5kwZYyFXjDhoZWmuxhRdOjAsZVcB+zx6IZoNcf1OVHZu7dscXhVAT6c3GSnU/otzfkhSYByfq/k3We9eOxLplggRNhkezg8eecdC+Jp+k2vD6LQCBoQIocl4ATHJp7L4t/uu7ZRa7IsNsR++WUpK8Javd1LXZY/6p4m6Fv7hqXJrSgkzF6sPOWwvDlyMKXWN1SPJmUpMWM9AqD0moQX2IHMbg 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DWvXXAR4sUomZ8Qq2RTorxkaaMnKHcu2BmoDOO6Kj8qNnzqPlv9FYZRcNsTYnZ29lat7DnJsOAhYezY2KM6KYXLMc0utjcbaOG90ci7WNZHvhP2vtpVXhulvPI/C64R7rq9Lj7iAiR+4WUCt6hWeqpQn8ti4TCNOZOFgAQFG7zDcSDQervX+7vnG2kszB/xrxAzFxD4O5DUJNhU3ZFa9SHTJrhBBXemPGkiz+p/BmqHRbGatBfgot/fdRS2B1kAm29GX0DJTRyDpgaPouE38OTmb70n9T9INBe1n10/ay0YTvirfwNZNl9u3A4L63YRznhj9E6mGZhbau3IDKXfI8aUqJj8q6A1TX0Nslt1GwCXoTRtLBawEFrXlfTjtVmaQ1eU5mcVYUvPNIsrRf0UHGKO6zYoO99gi57C+WGu7GiSEcWzkkJXnd6Udf7zKhj4jdKn80/0r2tRu14hD4Z7TDKUsBQVIek8cebyJc21EJ/R3xvKSVdG8K4OlNC8AwbvDL2OFWv1A+MCg93yKxoSnbyeFQ3o2n5G3LQDjPczqfmMyai1eTEJlNkNFxipYomvjyO99cHjaUQgXMAJmHzBJAEOIQf6MoYWUgLzngiHOKbSt7grT0U7BY6u6kUK7iSuLuKm4AQOvqTlOLLACsHHlvn+19ctjgz8Q9XrZOOUNBQLWlZf8TpMiR2nWuUkCZwnPg4Ejg2Pb/i+wne59c/c4zkaMqKqvbhII0LTwZgnsebwVoriKapvFB8d2i9NAQUEN/bhIIRWeRQaMF4EgP22vSlAY14wvzgehI8mKjBkG8iZ0LBp0ABbg068eX0SrwjU6+izMOxUC4LX66fZ99q0orbRSIWOhqWzYfrtUz9uozeQdpqSRQ2+3x2t1Xja8PX0WQ+jxf4Ff0SmTAIcQBWXADM9rdcIU5IwZOpXjp2oL7A9sZehyDH9jLZS40k8Uf4UVi3GfueNkZFz3zyOFSlsbRer4CFCXK1swzeQ4MZ0Bdty+Eqxs2Ic2CyeEI/NNV3KUVPBpTnl7a7GYEsxpRLg4XpOoNTuBDBEdRxQgzoIiD83lbCwveQrtRcqHdbjdlxjILYvGQ1MUtqS6njXDXlfP/0KnheA9LEmkq7NeSaTRqtNZu7Sn9lpVyEfALEObuJeEuOUKp4dkw9viKa5930Dn8/hK9EPn9P3uzd5R0+R6ikIn7+XCxmNkqc3+7bKosdx+Yn8zZwMtSZFQixhxzUSzG4K8oJL2tKcsqUBhyHHZYhGTVhxFGu5dU7BPuSjKjojOJ4ufW9G26snhemahUFdFM/8TqNFiXI4WBtQF9URzRnQrO3FU2VDssdRapogxw6zJmw+Jx8UfZP1LRjQchtFrVVwkfL6xQ0yk9+0DdHz4/mnfzj1oppwwDWQXHiiAzKIam6zuzVJSw08KqeR537cmvVGtWVrXb+3WhZLd34UIdc8A/q72jj0Ijfh8ueNv0BaMYvXyfqFOtwqm4nm1LYlxVBzVt/6IIBjy1qeDUZu2iffCJEMTxa54VJp746qdU1wlu81RtVwRewkZ4/pTdIrI/Bz5XvIKZlgR1jyFFdDNnCKgTrdHnJ/nm4m89vJvt92F X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7f1143ca-ece8-4f7b-fb11-08dd231cf52f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:23.7596 (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: r9bcUp4aLVxJuRSDXzAd43J7OpIzxFu+NiJ0f0GAtG3mh9YHm2W/F5zMY5nxNtxHb7WX0QQ051dsUjq0r90rIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller contains a AXI performance counter which allows measurement of average bandwidth and latency during operation. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v7: * No change. v6: * No change. v5: * No change. v4: * Collect Rob's R-b tag. v3: * New patch. (Rob) ...sl,imx8qxp-dc-axi-performance-counter.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml new file mode 100644 index 000000000000..1d6501afc7f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller AXI Performance Counter + +description: | + Performance counters are provided to allow measurement of average bandwidth + and latency during operation. The following features are supported: + + * Manual and timer controlled measurement mode. + + * Measurement counters: + - GLOBAL_COUNTER for overall measurement time + - BUSY_COUNTER for number of data bus busy cycles + - DATA_COUNTER for number of data transfer cycles + - TRANSFER_COUNTER for number of transfers + - ADDRBUSY_COUNTER for number of address bus busy cycles + - LATENCY_COUNTER for average latency + + * Counter overflow detection. + + * Outstanding Transfer Counters (OTC) which are used for latency measurement + have to run immediately after reset, but can be disabled by software when + there is no need for latency measurement. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-axi-performance-counter + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + #include + + pmu@5618f000 { + compatible = "fsl,imx8qxp-dc-axi-performance-counter"; + reg = <0x5618f000 0x90>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + }; From patchwork Mon Dec 23 06:41:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918506 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2072.outbound.protection.outlook.com [40.107.21.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8049A190059 for ; Mon, 23 Dec 2024 06:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936160; cv=fail; b=YmnJ6D8SO6MT2VSW072ODFt4BSXeDv8n/lxCZW1avSOYFjItPAyIRYXV4MVDlzeE/eE4S3K0mqjIGzawYIEIJgLifJi+d2bo6rpPjybikv0NnFebkBEHqBB23Ian1njeIZ0M8YJEq+IUSjwRzf7LcnMc22HTM7T2s+QoofVDRoY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936160; c=relaxed/simple; bh=RJ0+VOW4YPeS1yn4fbBlpnNio+onKxDEX4OLJBJLzc0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=W2x3zjjTX9SobNfkRqyrWBjbcsPA0jy8XAFP8HAo3Tz2Pbg9WiddeIHtS2mRmItrHP/yotZhv35CKbto4TPyi4MGbY7PRRIoojJqsDpXnAX/ZwmAXwALSduePpCZ+iVRPwW051mEykkNVAB2vHkoQVmcm6bgrT7hAOnsJ4T+AOo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ArrSnDmQ; arc=fail smtp.client-ip=40.107.21.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ArrSnDmQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YQ3d/IonyNJ+8liCfuafLAw3F1xCTjMosg02h4L6t+joeZOvec7bf/CE9X6UbOYZFIK6SlzNkxWskTsUiVDzfXlSCVW67zXfZU/Re4aWxlbjzqNR7Mv/784QAHFOZMlT0bMv7/ts17nrKXix89KfTp09dfs3R/HwZHSICgmOnVwpxKmb6aZibzNPST+YfNrPvW3UlV5p7oycyXwd9yNxf/yuunFeVq9zRC0ikcDcpCYhGU06XS7Dw+IQU8UZmuOkmP3RhhVNs/vaDQGCaOLFwUSW8gdV5f8KwXepvALXQiw8LwAOMyqb/p1Qz31QDNQXkezTTBnLVkPmJqagBZ9BMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ZKDOoIIjCiDJLghLlJDBYniUtmgLQ1pIrz/UL3+P8qc=; b=Yrl0d8JZS7pKR2qYj0thHU2HpwlUZ1hBqVuRCHsyE376NMcYgcfNv9+CKSjhi0CYK9mCBDJvJY9At4l9AfPMUouLg440PAk2iBU2Sr+owVP/2LLSLr4fXdTs94+MsaY2jQ8KQT2txIgFlCmBjOtf81u2ox3P3ShNxiBwviRt7IgpfGZDEOgtLYG6RdErovKDmvqLnH2P/Y7jOmLt9QlXibieeHWdPsgGxmRIxGjseMj4f53tZhpoctITJFyZ70MuMrXfBqZV18OJkYoAKi85djGxs8TzgO6gvabwxGgiZNImcUEMIlKa0vftyGZ3zEKKau5ro4Zd39dDxhzQi2zGMQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZKDOoIIjCiDJLghLlJDBYniUtmgLQ1pIrz/UL3+P8qc=; b=ArrSnDmQOjeA9IWfw/dTuPQNlPOdlAPLNl1M0D9AOYN6TkyDFOETa+mPSBCyWtSiDKsuI9yC8rvk9JuOnC9PX0yS7UJULeHvckr42+IluyGVyn/jILfOcGGAfjB6T9AhK6WXdNdi+QOeGX7gfKlq5Bi1Ezah9dJAxJwelIY3R/LinlXCxxmFhhmvn376Ao/y1l09NofdVWSjUb6DPtkWprwkAPlugdv03IBlcHky3QjlHxwrQqCEdnrzzg5fTegVR9iKFr14emZFTmhoJuQ+LRYtyQt+Vs1qR98zRTHhuRsp40ROQdSkp0D/e8GzjIGyiYThprpRk1tCfN5tEhjX0A== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:42:31 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:31 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Date: Mon, 23 Dec 2024 14:41:34 +0800 Message-Id: <20241223064147.3961652-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: c14c2216-7d2b-46f2-de1c-08dd231cf9bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: ClZU3VCWwM0vSqSjPVHvm5milyYw9bly6wVzJlweWkYh8Vka7e+fC4zW04WjT749XpwRO7u2IlTXAh9S5sEb3YTmV/Z3OKbuUAIfamRhSQxgak/aZhYEEH6jO01BDx5XEW2f5pH9VfbrP3tvvW/QyEwvUH7EABZprB3Z8zMy/GxYlkB8gsnlkFkYEZGTdymbYO0M8QuBacSkk3J0qGou+xSspqnncYULZpquT8LUr44MbP1Qr01EEoupBL7np5RENsooSZvcVe4hLY79aCoh4b889K/cvOCvLvyXL4P4I+sKE959VWckrKCEziaaK3HX6lBpypzGZzvVaueaNfVbv0R8T5Az8Y6B5GMnShW21APdlPTsg5P1p8alseazVDJ6mSw6HnlyQwEIXbiZ4UldBAUjWtFEYFv1QEWS75cw2X+QSIwcKm9oeqd7q1ozwobIsngjy6A5n4gqQnSTgfHdY98vnTRGuw2ZcmWrf/AXFZxXi/XEMV/TKmqwaaiCJU88wrdmgW/r7t713HqDJR6jbvf5pZ061qENus9VK4F7TyHfbZFu86ht1djoOVAiW8Cqxw43vXolHfk5UbEEeD/BPMf+DO/qBpVo6sye7mJxVfpNtPNx78hUtjJO1VQAb89TV5z3ev7BIWbZq8sbg28gWO2TYda3ayRKJ41Yf7ejqhIb6n4iSmKIaty0ZgYKnh7ycJc9JnxLPwO+DRVYZPCbhMfwkD2G5iLSXZc1vIHSFJjD009m3eu87aV17ZEbZ7IZ31cD7/COOmEwEm+Cde/cf1JWQOtQv7xHfJlIVXLG8EsiYs2vli3TY02rHrHA0ohqQk+5lz0eeiD3aUqxUxL3x0/nZPwDt43P3GrsZ9uQFlkpHwZHL3ShT2NPXG1FmvHDQ9KpIQLU4PjFJ/MxwL9rx0p8vFqc/o3xzyUv5zLIRuY/AzBq9lWvFOttgr9Ue2pEYL2m58D0FHStV6vbpFVCf9xrakkbfAk8rv4qKwDsUjZhoSNEnP97HOc6UPrjVzws6DU24VhLyL1YHnq+EDibj2GL3xwIPKLQeBasJfJ2zZr3iSrO8ONYr8NNtB5wOs9bm7PhAS29og1sz0QHfFGGi1KbxdEdTHZbxjm78y6O5GQnL7MFIqnbi58CmGQZUZMuUTEpqqjBrs9mhgA8h6xSj3VlsI5RTq1XkracTrU62/CZHEE/G2ls1pU6LhhHEt5HWBAHT75S0wbAfSlwsszEFlvkuwlPp7ZMZJxC0FhFHMQld2v0XCVk1/b3zpXlf26Vu0CobtosZLrzAhS1iZ8Eh5zbJTVQxMCfxQJ20maLeiGJQg/CRqcliymoZKS4rXo30+THjo9L/RZ2t298f0fHQLFkQCJQNlKFKbhDJqs1aY23jdv8353zePeUrdaPa6Ev 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: a6fkL4wPBVuqMFT7IVvOw4wdghCPUxeGxIPH2B4Az9ODr1+LdRfWLig6mdQYalfq1MSSQNcrXfMXCP4VgBqwsCGLiXiGQ8ejSM/f7hYn/P2icAFrmbvPyIoMAs8wCtlOsZKEqtbqnEaRPAMPnheaGL6kDuzCituXsJwTszwPwSaNqG150o9AMsAyrtGxdLl5+Cs5StcGIK2OLW2ixxYVeBYopRHnVbtyXvD7YYqZVzi58KIARyzIgHHvBua6FSPq0zf0gQMkFDpm/8cJtVecfs/F4Kfnf3fDrco6CiQ4ArZvCptfrkhoiOjyfoqVTwV7WAwziyCJpfySKM6GLlJtmGf/93vE1lWJlNj44j4nhwogyTbIhVPu/b7uo8US9ozJ2Ha5pdD9yIuaQ+T+QyuChwAkkK4gaZr6CT2OR1Ud7g3Xcv8cfBeBSRafPT2MuR0NM+G5NyJy9Uq2ROvrLCA98uoO8M3oZwkX2nA4H466Xah/aev7YldqUmKt+Bx+8VoXPJcWj+3a13w04l0dWAEmxq565nVTgzO69q2Ekl/k1mbIXHntSHX2SdxoePo4q33YtagiM6sGtvkjQV5n0+t0eSxuTj5kf7Vks8KwM/OVeF2PFw+CDZ1pPnmvNRNBKnEnVbbmsTUK8ix3utM1GqC0LSvNzpEEOGWUXMb4SnLdwd4bpZAxwIp+Sjhn0Nk3nif7a6Qdd8aiG1vJlKVxMI2t/uxKVfvazoAjhX/rhQyRt1ILwc7+9uSKBFsCoTeml6zSjqTDsuqyB9YSAHf4s8ZU8J9BUNdIJyo4A9dzX13zoH/QzJ8lKqIu0eQ8vwpnFVJWTBkMU1PA9tNY5XkRdYVk5/ZyubVq44ulQyuUi4OolnUjS6rGtmOtJgEpAmhySXIQvc+3XKe3nzizDJEz48v4VWVblWdxjJgUzp9A0Z+Qhffpv0SM5W5Eh0QuSkrQDmlYMAzpOzIj8svEZLtdG1r+/A0cLdcxmUJEO+MKHwVTNXAYk/ZCBDxUDr5qqXLlL6pd2ThADTNNprR4rsR4CYzG08j/aVxGQy9+e+jEjL3IQjI1mjwRe3L/UXobX6iHHVxkIvRSj/bo+ehVS8qXSawRpjNhzEPpQ1teiaxIsHnfJLx/JIjV+62UIFvuAx0miQHP1wMhZ3rw3BPCw1aNFF53UTRb6SZdnsg7uxPFtw3eX/lO6r4wpqaPefXe1zX/x9/X1ysFR2O7Nfb86VGzOmFywKKHMBijD+Rm6BFdUsDOdKm7WwX4tTJ+cCWBZIXVb4CPUQRfNagHfIJgp4mOyyhhgAtwqrysW0QI2PtGs9ELctUdfMXEp/3eSJR0r169UXGpl/WYpDSpUPZaVZqPR5CIkDadlUsq0/dGxvpKYc/FygjIcyP+ZJqB+0qnb59hC8WDVlRwJjlhszsoPFpEqCCIlNEutuiyB4jE4LBOw8zDiUBmNntrak13chC+QXBbTVraWBQAIAmDuYlB+ZtTUxkqaN6wmGWWR7j/hy5IRyMmSnSiteEOiCFJ6MGDGVe9+fZcIdSb7bAChZWE7g72GKDoOfXyPPnVeExZOo5gYDPlZJxUS7NKHzWxHpgjS5c8gTQA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c14c2216-7d2b-46f2-de1c-08dd231cf9bb X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:31.3468 (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: Nk9uwUGEMw3PfPiqZ+dN9irwRP5FyYZXNDllO0kIENsgYnWGWeYmHXEsMwaK6s3CszUCGeorTtRyo4TXddfr5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller contains a command sequencer is designed to autonomously process command lists. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * Replace "fsl,iram" property with standard "sram" property. (Rob) v3: * New patch. (Rob) .../imx/fsl,imx8qxp-dc-command-sequencer.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml new file mode 100644 index 000000000000..27118f4c0d28 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Command Sequencer + +description: | + The Command Sequencer is designed to autonomously process command lists. + By that it can load setups into the DC configuration and synchronize to + hardware events. This releases a system's CPU from workload, because it + does not need to wait for certain events. Also it simplifies SW architecture, + because no interrupt handlers are required. Setups are read via AXI bus, + while write access to configuration registers occurs directly via an internal + bus. This saves bandwidth for the AXI interconnect and improves the system + architecture in terms of safety aspects. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-command-sequencer + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 5 + + interrupt-names: + items: + - const: error + - const: sw0 + - const: sw1 + - const: sw2 + - const: sw3 + + sram: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle pointing to the mmio-sram device node + +required: + - compatible + - reg + - clocks + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + + command-sequencer@56180400 { + compatible = "fsl,imx8qxp-dc-command-sequencer"; + reg = <0x56180400 0x1a4>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-parent = <&dc0_intc>; + interrupts = <36>, <37>, <38>, <39>, <40>; + interrupt-names = "error", "sw0", "sw1", "sw2", "sw3"; + }; From patchwork Mon Dec 23 06:41:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918507 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2068.outbound.protection.outlook.com [40.107.21.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76B6418F2E2 for ; Mon, 23 Dec 2024 06:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936168; cv=fail; b=TwHG7zLgfJPCO3zWUDmYAl+ojfniTHsQa0FeJLSUobHQqqGjoFsX/KPxSr0CkympVfKa/6xM5nsxjuZC1p1v71UUb/JBg6K/RqnhSeTHUrF/CFm4rbSxQ/6uunKD5jGsQaL/+DSz9XKBOaEVXuXkmZn3hM89Q6UmNUgfPhdJtTA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936168; c=relaxed/simple; bh=dWeEb9H1TlkpLeZ3NuOGDntUbc+RKmgylSxZO/uyWJA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=OXBQyDCAFjzGdyZsTTo8kJ1ZuhxiNQYM6VvpWYGurkPq97/NdIjYTadE/fcmZyGui5Nk0kFDLC4nDyVV4lQUPlfJboPC/oWg2Tfv55FaRhJC8j0OsSLIw/CL2dge3PgLq7HzZX2/n0x9gjzPBq1ar5nO2pOwS9yMmT46JQfATl0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=an9t9+JG; arc=fail smtp.client-ip=40.107.21.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="an9t9+JG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tYh+5/seUuJTw+6+PIzv/laUNb0n2993P3frkYLCSDbUEe6+1SuLbd/bv2kW3U9pHVOPhgIplQ+LvO4Ds2NH+v8jVA4MpD2NabzpNm6Hyp38CazL9dMvVKIGYyV2CspAZc18BU9j92xFKdjY3KuAfL8NGltXjankAnTxrLMllumDLcIjGAxiHzXEn1Splc2702ergctrpiW5uvw4eO5p1fhFEEKMXqkgydbP9VAskNDaPX39xFXsQWXcfKIFFGUrH+cLnXyqFkF6l/XwFDNyhF9P4In35FvYmIvMDn8YRsfdggLaDgJ01QBdWECxAHoTjz/w+7kjPnm65V09er8ucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=GdTl4XzLq3uK2kVhxKL533QhbD0oSbMsy8gP1DoynRc=; b=kT6zPk+lZX/fLIyGNyT4n4uvcb+DfqMo8LebUk4BoBv+ZMaKGOYiVDoiu7cmvf+Rg5h2tQLFisAnc1Pg2wiHZmVGijnRIummiCj4xnacU6VeWI7KqsOSXECGJnYe2IigUsSbq8nOrnHwo4dGJcjD0rkDDyWgKNIRBgVvWJi1D2BExkxlyU86qZVCg+HY1IPVRELHZQLVhgyGOyR4g0nEtCS2GYDRpgDff+S0/befz4DX7YGVeZrhT0gvwLgPuPqYM84Ceqy/AgYc3+BO7DVEzjtafZbeKucQUjpQ6rvjCgpHQNQruwXzVGFRP8XSFmaR135424XGO6clmYTCwpCDMQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GdTl4XzLq3uK2kVhxKL533QhbD0oSbMsy8gP1DoynRc=; b=an9t9+JGPKUc1wxKAP9EsylZ/ymhyjFhVEmjS80ERhbgnUyN9y6rj/YWPCZR1wBX+IZS81ZvfZD224m+pPzm9kW4F4GylPi8Lqo1CuY4bg0FVbUt7gNqLcvEoEqGbIvQ9zpMIvBtHvwSyTgWtzp+fy7icjV1PYuu9HvMqWp+5bYfQV3BC3BnCgDu8phvUVmPEBqrabSgzM7HhfuhfPGLO/L9xLMhAAyZW9dp9swFlC7Meuo2WdK4uXOWlkWHbrO/sk/wPi7qm0DBAzxQ8KgwgSoItfh2TjjovMRAJex1RO/vRFUjXWGc51rohXlRgCnE4KrH4fpXV9ly6nV9Gx//kg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:42:39 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:39 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 23 Dec 2024 14:41:35 +0800 Message-Id: <20241223064147.3961652-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: bbad2e8a-f1c5-47cc-5ecf-08dd231cfe41 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: he9r79dISTelERZGWayILJ72HOHwou0C1QgwGYqiZTzq9FHoLyiT3c05BL2yBVVjgLMTtQYACw8R7I45/bNEU5h80hy2vX9dDMnuo49LQ4/kYdyJQtVSEZEm/EJRTlADJeGAuRhrIlAB4VPFS0wtZveBJk5I9Aj34UIxufg4CRTQ0ddjIAdsytlQ4WnuUbunRkNvk1W82D51LxwVvm9yIl2EawKhs9juEKQb4bc228xeehZFNZ6eXwFvtPIEQAUv9RBXY1iuXtwuRPq5fdCfhyrp9y21Ek/CsFkb11f+GNMD+CuXrRbk89R64fVjx7u6PODhajpUMFDvzoCyP2NwpvTPloXu1CAWKzuVgvej97R1npuHN5dSVJnvasDLUhWQWTDGoGcTXv8Tq6VPvP/76i/wV+f/9k99RCra2f7LDvuKciVk8gh0MdOu7X1Bv6BER96V4FPQrajrNA2xdjT2b/pj5ZXk7dHvq5krrLfNUPTLUyUpVk+bRHc1e4/3O0JJHZQR2Xe0MWeah/ZAElSWDAVPNSvNIPAy+uxIlRMXQKUsOXpZNPRZn3bTwAqMPMMHm0QDcgBcS9eAWeQSupaj3ntHeWLW/nf6AJ+OC6MVME+EvSBNFHotMgheh3lPlUAaB7CgsJbtNWYcftCfqFBNkyzS/66bTget5mFCfKPnl0dIyI3e9FvzScQS1tIUBtrpegxt16nTPoh81Eerw+av8dy4Qn/OjtZXizCOJJ+o9tAtLLEKgRIMi06xylO0nU3gou6Hy6NBn3nfiqDCbvt5UI/m/wSwCSmPBHopWaQtIdFd7gU8z6Qenr5n8I4iPMVA/0gUmaFOnW2VK5XTlbZE+6AOSG3Tg5Otvnc+iHTkWjXZ134M4Po+fmkPfUBTR+U3v/RHV0VIfmZjva9HUGrNcpiwKmpxj445TOWKb8Qiv6Q6VrkI/zpsPmG31nD6co1DVd4FhZdjIol5juvqK+mfx+WGck3ivD/bDAM5bmX7xqHFvMwEtpgQZrUrDa/zcbdVIDAkA8JNzRe2ikvG8eZQaMqrOdqHoJ2mpGXulx+iLwiYbKHp88JJ7h1+o85Z9ZllQi5VgltNIwwdmIH1rBGKN8DaUKq4U3D9BgH/oPs7WBtgiTgZPhIaw5LPfILrTGrR8rpQhngqJn+I4lQ/8CaKs5OpD9HxCKnryAFq9QOsQ0vMddEic5HjwvIrpHpo8/9HQB+S8htj7cf7reXBObW16rW0WiHqnHWA7tBst87Tsv2iYSj6oe+ik2DLz+YDtzCZkhndQ7L5IoUQ2FjvT+VGDqwc2JX3wXaHY8BrBn59gkmuniPnkTr5tDXvJCg7oijVd2X9ljCRQ5NMYbYBGHwBKz4h7Fe1+qF5KrzgShuVG5mX6xbcEkCBIzCEij4w17FK 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 91kjVZTth3VIT5XTnecEqRh6ca2zc4C6Q1K7B/4mzFyHRsWio3vQsbnKpQUrQKDJLqE7wx6A+0fzooOB15IeKpkQqxBoA+Jlgh3qinHigxW/0XQirpDK7stiM8phoS2GWGpWLZMjvHSYmXYbXC6GO2/+EsbzLMr0lTqHuPjOvxbb6WDCqEOp3eHr8yQIgq64lCVvQYStD5Q5VRnLUFUBTXTvO/QhgEGjwSo8zfJM+Sxpc+52Ra7slPeBysp5IU7K3BxEKC/Ohu6jrS9w3tbv566z1WS/AfAZX8ZVHclC821iUj9FMtasBJYpYjPMDqfILTRlroLLXbhfRH0/WFDAI89K4/bYydHo0gw/Zs3GrPYExhNeIYKLZxE3INYVjDTRK++r3TepsCppSuyG9yKS1OeGxafmMueN6ln6jhoyyYs5fY3xX96Z1nDHRBxQSk9hjQasRrwAuPbE3GBx+n6MXwMD27QrPZz3Bk8KHQSqSVjZCbk+aDm0zlzWCbB5YkwCeyQUXgQMnBe9ap0Xttzf2Jnypslgan/HqTP243fc/CLxu3Rp5Ftj3DV2rL2w9PhSWhL61p5K/hBAFgz9xy3a+Weh6JfcnbC1sgYATYeD1rfM9B8WhXfUs6ShvQVf7K2vNALUhoZbKinuijTu4X1gQcKPpxntlh7JLs9xWmADfPwpxdOUoEKzvhtUF4FJIaJErNTzkdN85WB23rG5b5GK/TiIl/KL3WlL9y2jYcCySdhitSC5VKJJ3jCCbwCqUXCWtDKO6FVCTET68SjxdKIz6kG0DduNsiG0kVZps6oaCmo3FMbEC8vJEa7BYTTIPSV9a4iIXv2bskZvlNyJSFl207fLgx/RKb1ZfeMncyW6vCmi4ECHGh0ZS0qFlks9x9iR17dFAtHKs3T/YybZfetrqjgidcjpDiDIuRht+XeRIA+SG6LXSMz/RP3D50cMuVeBP0LxbDyjPrfBpmULUqo4JqtDSDV0wALPw4pm5s9iT13L5xbwT7Fcz63i9yF7sGFvyHXlqsaFsS5aKWNx3tXJPSUbKEVpozFYNwlBDpig9+Z8YwzSVSinm7fnUx5qcc9qvB8sePi4/PS4r5ZpWUQuPS0RFBALbXe65KZjxVyN7yJ0YcBgRLec2na+2mNgpmTOdSLI5e52bJ2gPxlvY+nVkrGADZnq3f5FoZvww/yoEPw1j8spPJdX16OAooCrJubQGOxrb7ZeTDQE/Ob2yovp0R+QOdGgybVVJN0IeVE5di0Eq36QNodBjNBbMsVeonqUcaAsfp+pdxZfNv5QqQb3aA6t+mhZIcCKeNJi22dAjsqAvqXKnmpBqNSXo68ZNP+M7BxDNXecbrjvT5sGRM7ZCvWCfcDdMMirY7/bRmYiQHcWuUCVuOa2l4+h10H7FcJ7iIkGXVptEZboh1CchMHWtrAE5Bq03gLyvDIbBad8F3tRdBjs7+fTbDSM5rQAqFjisqOb/EsEJQt+4vfddH1XoGX7SiLZ4AlRPu6IYcOcm6TDhAfF8JkxBJx6qDdHkOvkhSq4cI6qQ6+YbHylL9yXZkjRa8Mv8wru6b3ogFAGPCu2+XWSGjfgHbW//GGxYoe1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbad2e8a-f1c5-47cc-5ecf-08dd231cfe41 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:39.0856 (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: X/YKQEh3RiRYRCNjYDN4lEnYZrW4jGxrHbAe/r/wsNe8mg5193bnb2mtLpmOhgbq3aTNHCK/rMldzLocwsLfMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller has a built-in interrupt controller to support Enable/Status/Preset/Clear interrupt bit. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * Collect Rob's R-b tag. v2: * Drop unneeded "|". (Krzysztof) .../fsl,imx8qxp-dc-intc.yaml | 318 ++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml new file mode 100644 index 000000000000..6985ee644a25 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml @@ -0,0 +1,318 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/fsl,imx8qxp-dc-intc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller interrupt controller + +description: | + The Display Controller has a built-in interrupt controller with the following + features for all relevant HW events: + + * Enable bit (mask) + * Status bit (set by an HW event) + * Preset bit (can be used by SW to set status) + * Clear bit (used by SW to reset the status) + + Each interrupt can be connected as IRQ (maskable) and/or NMI (non-maskable). + Alternatively the un-masked trigger signals for all HW events are provided, + allowing it to use a global interrupt controller instead. + + Each interrupt can be protected against SW running in user mode. In that case, + only privileged AHB access can control the interrupt status. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-intc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 1 + + interrupts: + items: + - description: store9 shadow load interrupt(blit engine) + - description: store9 frame complete interrupt(blit engine) + - description: store9 sequence complete interrupt(blit engine) + - description: + extdst0 shadow load interrupt + (display controller, content stream 0) + - description: + extdst0 frame complete interrupt + (display controller, content stream 0) + - description: + extdst0 sequence complete interrupt + (display controller, content stream 0) + - description: + extdst4 shadow load interrupt + (display controller, safety stream 0) + - description: + extdst4 frame complete interrupt + (display controller, safety stream 0) + - description: + extdst4 sequence complete interrupt + (display controller, safety stream 0) + - description: + extdst1 shadow load interrupt + (display controller, content stream 1) + - description: + extdst1 frame complete interrupt + (display controller, content stream 1) + - description: + extdst1 sequence complete interrupt + (display controller, content stream 1) + - description: + extdst5 shadow load interrupt + (display controller, safety stream 1) + - description: + extdst5 frame complete interrupt + (display controller, safety stream 1) + - description: + extdst5 sequence complete interrupt + (display controller, safety stream 1) + - description: + disengcfg0 shadow load interrupt + (display controller, display stream 0) + - description: + disengcfg0 frame complete interrupt + (display controller, display stream 0) + - description: + disengcfg0 sequence complete interrupt + (display controller, display stream 0) + - description: + framegen0 programmable interrupt0 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt1 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt2 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt3 + (display controller, display stream 0) + - description: + signature0 shadow load interrupt + (display controller, display stream 0) + - description: + signature0 measurement valid interrupt + (display controller, display stream 0) + - description: + signature0 error condition interrupt + (display controller, display stream 0) + - description: + disengcfg1 shadow load interrupt + (display controller, display stream 1) + - description: + disengcfg1 frame complete interrupt + (display controller, display stream 1) + - description: + disengcfg1 sequence complete interrupt + (display controller, display stream 1) + - description: + framegen1 programmable interrupt0 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt1 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt2 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt3 + (display controller, display stream 1) + - description: + signature1 shadow load interrupt + (display controller, display stream 1) + - description: + signature1 measurement valid interrupt + (display controller, display stream 1) + - description: + signature1 error condition interrupt + (display controller, display stream 1) + - description: reserved + - description: + command sequencer error condition interrupt(command sequencer) + - description: + common control software interrupt0(common control) + - description: + common control software interrupt1(common control) + - description: + common control software interrupt2(common control) + - description: + common control software interrupt3(common control) + - description: + framegen0 synchronization status activated interrupt + (display controller, safety stream 0) + - description: + framegen0 synchronization status deactivated interrupt + (display controller, safety stream 0) + - description: + framegen0 synchronization status activated interrupt + (display controller, content stream 0) + - description: + framegen0 synchronization status deactivated interrupt + (display controller, content stream 0) + - description: + framegen1 synchronization status activated interrupt + (display controller, safety stream 1) + - description: + framegen1 synchronization status deactivated interrupt + (display controller, safety stream 1) + - description: + framegen1 synchronization status activated interrupt + (display controller, content stream 1) + - description: + framegen1 synchronization status deactivated interrupt + (display controller, content stream 1) + minItems: 49 + + interrupt-names: + items: + - const: store9_shdload + - const: store9_framecomplete + - const: store9_seqcomplete + - const: extdst0_shdload + - const: extdst0_framecomplete + - const: extdst0_seqcomplete + - const: extdst4_shdload + - const: extdst4_framecomplete + - const: extdst4_seqcomplete + - const: extdst1_shdload + - const: extdst1_framecomplete + - const: extdst1_seqcomplete + - const: extdst5_shdload + - const: extdst5_framecomplete + - const: extdst5_seqcomplete + - const: disengcfg_shdload0 + - const: disengcfg_framecomplete0 + - const: disengcfg_seqcomplete0 + - const: framegen0_int0 + - const: framegen0_int1 + - const: framegen0_int2 + - const: framegen0_int3 + - const: sig0_shdload + - const: sig0_valid + - const: sig0_error + - const: disengcfg_shdload1 + - const: disengcfg_framecomplete1 + - const: disengcfg_seqcomplete1 + - const: framegen1_int0 + - const: framegen1_int1 + - const: framegen1_int2 + - const: framegen1_int3 + - const: sig1_shdload + - const: sig1_valid + - const: sig1_error + - const: reserved + - const: cmdseq_error + - const: comctrl_sw0 + - const: comctrl_sw1 + - const: comctrl_sw2 + - const: comctrl_sw3 + - const: framegen0_primsync_on + - const: framegen0_primsync_off + - const: framegen0_secsync_on + - const: framegen0_secsync_off + - const: framegen1_primsync_on + - const: framegen1_primsync_off + - const: framegen1_secsync_on + - const: framegen1_secsync_off + minItems: 49 + +required: + - compatible + - reg + - clocks + - interrupt-controller + - "#interrupt-cells" + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + + interrupt-controller@56180040 { + compatible = "fsl,imx8qxp-dc-intc"; + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; From patchwork Mon Dec 23 06:41:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918508 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2051.outbound.protection.outlook.com [40.107.21.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C269192B63 for ; Mon, 23 Dec 2024 06:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936175; cv=fail; b=HavJYa7/RkctgFgvp7d5tV6KYXNn4fC0iYWTNoabT4OgshpiMl7rnb9vb776fnJzbRBJ3iC+1srqLRDYBM5CYi1MnuoxKAnFW/k1WrjNpb3Auxg3RVNqHyUbv5oCSuh4b+wJQKe2FNJ+mbx+LVRF/kxPNyfHUudrUNLAswdoMPo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936175; c=relaxed/simple; bh=YVCREuCAzpvEN6Z335jcwN4lUosberQa28Xiw2neqM8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Y+9o4hJJ6XNv3ZPz8yemhO/GX8Fp5fghrdOovMo7f4mL0iZt2w9Cm0NNRQXnVw+GW3heHZJwKkzuqiFjp6m5SJy8VeUzI7VkahrRWz8x12d4jrD2EkiO+9ZZd+nG+ckfabk9tAdtwsDfFqOM1lsppr1juSfjYwpezrfMKt556QA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=c+A0ILXT; arc=fail smtp.client-ip=40.107.21.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="c+A0ILXT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q/ri8HymZ9kbQag2J8J6W5gPB/mHIFLPlfoAJWYu5X1QkDzupEyWfvvFqENuCeMDoCXqK06iH2Rg3vPwWW4GX8PkvqirUUqQdKoOSI4rRfDhw0TtMrbxuV0V8QjXu+kzOKXjWJ3WFM6liEj1ohKJgAAXX7tng++w9L7QXvXFGxnpkkpUV4kUaQ9opTmrJI7UHS4HWeO8I1A7tkCWwx0+h3DmBC/fdUx8tGKaAGlFrpxy1cQNHGbPCTfor5apNII+l9FK7GU0qAoShDiQ75thHNX+HPd7RTPlmZboNAkFiY67TCvdRnGyeFEQBcEdUSqxIaf6QmpeOUU/+aSsx5JX6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=vjHzbLsPa8aU7a7NL9nG12oXCuLBvlPl9KeGN0aVDwY=; b=w+efmcY6Xf2weLLNwAaY0hYyx5wJxBQzNmFDVt9caviTeVR4zKX14KkEHjm4PGJXy2NIBpYPEweycTl7/ue/E+x47W3zE48snbdAg5GkG/j6d4NGlKJpNmoL3K4NaWioXld7gMCxq/FU7ZT0e2FcHHh+H0+t6/PmjQneXUfzv7v3bOPq+xMibkEZV/+ETBAXL0aBQ2q4Z0Qzv4rszouHdJwuLecqNhieebih16yXaQEO3oA1rBLHiTS8vowEjTNkpCsMM/V0D/sMAN/IPTosmLPmUMOjXIxKAX0vKdYWebwVjKWP+fDjrM7d1Bv45FnZ+YF5H2BYVxYv/XePGljYTw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vjHzbLsPa8aU7a7NL9nG12oXCuLBvlPl9KeGN0aVDwY=; b=c+A0ILXTQ8mlqxjCS+CA2gpS5CYhH3bip+LBPEG85VDSeX8YTrJrC/3+TWCJsY9MRhlYwqLTfbYBRrmih9+zUXzZ3pSOi+Tpcg0kz7IZfKnQKu/JdLb9sXwQ0Q/cyMN7Axzv/8B5CC51a4X/KNcWLWQI3PLU4Wb57Jx6+ZcNodPwCh4VksbezkBeR5qy5dZSG/o9XKmTOauwEFfZ+evBLyi/AZeaiOlDPvHZFzFZOQqY9GEVsigx5zLrOIAuGmqvVur4taoonsLqKLIINCg3LeFCsWAtUvCuEb/JrHLMueDJdqEJ0Nv8ESL9nAIa2n84iBQzwWzqPoxEitW9cwn6VA== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:42:46 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:46 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Mon, 23 Dec 2024 14:41:36 +0800 Message-Id: <20241223064147.3961652-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: aa0a217d-d933-4bef-3e51-08dd231d02c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: iI6eX8nCZTJp1simiBhiNfO7MASlKiAg2nE/U844osgKf1F5lBYMdoRhlOTG0fwTt52YNKdXkQFHbrjcjKk4JIXscZgTN6nx26f5ndPh/oH1xykcMwgNHcXsFUI5dcNu+VqXu3vzfCrohj0VuXMcUvhItGIEfJmhvO9nfTrho7dMQ0gd4YBhLPU3DsGKsLuGYaddjBjwBZY1W1QijRLHRBL+5USm78OzZbufAlPk79NPPGymuBqKrIDaNWiDjKvp6u9CGbZuYuADNA24v+sagxEjPyJE0/39EsLNdtmZJKUcQSFEQG3uD/UF2mT6FXdNRojGiDFCs6PqL2Ee+6WUB5CLS5U5GIDPqjJwMyNAhrhyjX0gGOm/4Fg4f8fdQAg9qYmB6e994oml/RQMt61zxviHEZIlY4ih+w53PE1Rg3BVP0KoDN+hTMW1Lo3DXmddNQFN9Ohhsu0uK60eYakLTdt/w7Hl/GeIicp6Qfn+efMpI0PZGAeB89WM8xY8T3cXm7+3IcTSaNLgHT6vL2FH168wWGlzxSFHubyrznJOKv4ndAcOm3VqI+Dh2HxJs5Kf47cp6JzePgbcRsVbs3bW7iZKPhEKbenUio9yEOim93Z4MuQN6w21lbMKQWwdOLrmsUOTf+w/9lkceSkK5UtnbeRCwZwQz5v9JAJ1RlM5VTIsFQ8agBbbS+9oD+1fYUUpYKc9S0tIQg6Lx5mpQ3MMP0w93zqeyOmJ83lo12pQu6vANMk9QZ3/jxLh6mHX8fksIBI8BM/XlJvySRPOuN/VkSCqmUD9fJUDjhVyhtsKW3bTA3NRSVgojr+r9cZzV2d4XFB5AoUNy8TpUbo/eL042ImLaasT9xPv2Q1guYi5MiA4NsX53VZSZzsZWGL1KcQjhzImwpBUZeFk2mNGU2isAKtAq9IG2m8+w2ubPl1ffZmQgBuMi1UG3mZqgqJKJmlLgN4yGgRqER3UdUKlaQnV78QzQjtt3UlL4Htfw6u9mktiWiuB/yusXjgV0LKnPlVhlidz6/v7Uz/E3Sc0FSVCA7TNlXsMZO6AubJWTVRLRhZfwf/js1UTy8ww46mDoAgIbUtHmahm9jU2CUY5bXzLWKpg5lAnyn5z2cnW6i9pZogdXcVrw81HiLuR0QQR7FYLm92Fk2x26vFN+nop+srCeg73hj4ZaJtD5YOIpc4p6tT3nNw8IHbUR1MV5YB68MKJxQITkssztLl7aIup77KCoJx+kiWGFFMJOIb8BqyZk10D6p0QMCOXyq8n/pJo+7DyxbeuURNdIp7PB4JFDplPMxsJgwC+/qmx/taalPtP0/F0taNAIj8P1AJubgSZBBM4FPQCMIYcOhkzYrm1Sd8C5cn1fHn4h3c9TXYMJErsJHqyZBLpahg8froYATSOlE3b 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: H4mpo6ie92iUTR6OIhbEsc3IiQXaOYSdezw1V+yLS7ZuQvlnvuKqe1Q2H28qkRTnc2NVc3fALHZpsDMonHpcQCv1vE9SX9Z7jFjDSBEWfEIkUwd6BvqSFkaaO1QUnIFYwZgdX71opESwG4/O+wA0CMhM3JmPow7+9u67madY7TdpTPGaVUpPfQvpZHtPj/2KnVHqw7YERXzJ0aw5js0Hpcil+1oeHrjBZVceKtX2UIeskgreDSAb03NI4tif1UO0Vjvi2RlfK/8FfqbSyMA9VQDAv9+P4xK6ixEC1k5ty9EU+Rk4EctNFUgWiE/nsVuPfewlDhXAqxsjxN1NDKFaL+JpMfUKI0Y5bLRgdtgVEQQ1H+npC2g4UN4Wm81wwRHGHf5MDZv8eH+f29MoYs8HZAg8ZnQRogoTuLivOw24T37ktxdJW/sbKpCgS/c0LPq8pl2kqOpIFRgG1aTsdUKeIKMlcfptVk/nJsjdjnHeCAMfsrUuqx9XLJJ8DHxwdeBtmfsTMOyJljt/mj6v2T55I/Ozf1/fjARoiID07GQke7VpQ6LW1CZZ+fo+/nQx0cSaDM6+uwX4ZyugrzAQqOZ5AcYQjSXx9Vm+MDf2gGKPic1g5dUh1kErGrlEq5sQ6vjp5AO1Yg3dzNylu2xglbvAktfiw4qG7HhQhLyKqyLKZwjXSHuABBLW5tmYxaoiOajvwc0FB7aGejWPG3zBL/QAvIEvJXyBIgBE/P8WzhgbkeCNnzfUN4SqGCk4dRSE7d4Tvjial1iU6I1AOu2nCj7n2+2cunpNmwIDA9Wxe+KsAbZMZZJs/ziybHS1UK5eGkxgf7OtDAkCAwB+v8H46eNOOOoBYLsjKZ5VD29cOHWpdC+gGt5sEeB4lcU/lwW7C8dGLA1+fpSsb8xffXwYFaFQjOz2YHjPQ37kE1DdXpmyWojkZmn8VlE/Fr52vycAqYdeUhDCEnb+ggoydxtnCthYCPsEkStF7JwsaVTFKAVczEz3ynNuoiKNa7wr9iEphfqr132kDxCWxlM1WXb00gQ1dLFMqeK2/ByWUtiTed88STD4LdI4NU9pN0A0N5cQ7Ki2ivjjg+J3LRmseF0dm6BE+nOmffuwXHMMbKN2Rc7q9vpt5kdK779Pz1hwSBWErW5OCqswLlJ/q918JbkVyT8x0coJjz8jCEPCdvRBDQSHamGMkI8T1bYsxYDWjWtDDMSSS5aF8jOncppYFYSe2Xzyanm/mGH4WEJUpVpNe6OOQIOwAB3V2FXvUqBlYYincH4hMU1qjnoZp46NB43Skpr91SCpOGXWYkK7z+/cdY8JziHnsOC5WOMtcRhadehm9goJ1e+LOia997/yB1e3ev5LHN2OuqTHlRkwHzqeNc21xS9ufHATplwHaEs5Gbz4le+/ow/MauRx6lfptXG16tORyE0Ugx5q1yYT2UkED2NBwUDIUMhJN6JqyS/DS9fEqtKowLOCSik8deKBMSR2/Xaf3DeP0EGxbMDIoGKlDkQd0TBXPMpIrPU3brswaLbHOwt39JWKspeiDLytLsn0Nflql64gHyR1TUkBF12Ch9u7WC1IhTOP+bUtfO68TfzxJbnh X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa0a217d-d933-4bef-3e51-08dd231d02c6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:46.5998 (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: l+0O8RYLtVSRdjxunX7FgHzzzWKm9igHreXKrYOtoegvqKZDc7zK4hmVZJW+JfK1L1UKbydIRBphrNOEkEgLSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller(DC) is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as well as a command sequencer. Signed-off-by: Liu Ying --- v7: * Drop DT alias documentations and add instance numbers to display engine compatible strings. (Rob) v6: * No change. v5: * Document aliases. Drop Rob's previous R-b tag. (Maxime) v4: * Collect Rob's R-b tag. v3: * No change. v2: * Drop fsl,dc-*-id DT properties from example. (Krzysztof) * Use generic pmu pattern property. (Krzysztof) .../bindings/display/imx/fsl,imx8qxp-dc.yaml | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml new file mode 100644 index 000000000000..0f49053d148e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml @@ -0,0 +1,238 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller + +description: | + The Freescale i.MX8qxp Display Controller(DC) is comprised of three main + components that include a blit engine for 2D graphics accelerations, display + controller for display output processing, as well as a command sequencer. + + Display buffers Source buffers + (AXI read master) (AXI read master) + | .......... | | | | + +---------------------------+------------+------------------+-+-+------+ + | Display Controller (DC) | .......... | | | | | + | | | | | | | + | @@@@@@@@@@@ +----------+------------+------------+ | | | | + A | | Command | | V V | | | | | + X <-+->| Sequencer | | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | V V V | + I | | (AXI CLK) | | | | | @@@@@@@@@@ | + | @@@@@@@@@@@ | | Pixel Engine | | | | | + | | | | (AXI CLK) | | | | | + | V | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | | | | + A | *********** | | | | | | | Blit | | + H <-+->| Configure | | V V V V | | Engine | | + B | | (CFG CLK) | | 00000000000 11111111111 | | (AXI CLK)| | + | *********** | | Display | | Display | | | | | + | | | Engine | | Engine | | | | | + | | | (Disp CLK)| | (Disp CLK)| | | | | + | @@@@@@@@@@@ | 00000000000 11111111111 | @@@@@@@@@@ | + I | | Common | | | | | | | + R <-+--| Control | | | Display | | | | + Q | | (AXI CLK) | | | Controller | | | | + | @@@@@@@@@@@ +------------------------------------+ | | + | | | ^ | | + +--------------------------+----------------+-------+---------+--------+ + ^ | | | | + | V V | V + Clocks & Resets Display Display Panic Destination + Output0 Output1 Control buffer + (AXI write master) + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 2 + + reset-names: + items: + - const: axi + - const: cfg + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^command-sequencer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-command-sequencer + + "^display-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + enum: + - fsl,imx8qxp-dc-display-engine0 + - fsl,imx8qxp-dc-display-engine1 + + "^interrupt-controller@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-intc + + "^pixel-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-pixel-engine + + "^pmu@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-axi-performance-counter + +required: + - compatible + - reg + - clocks + - power-domains + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + display-controller@56180000 { + compatible = "fsl,imx8qxp-dc"; + reg = <0x56180000 0x40000>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_4>; + power-domains = <&pd IMX_SC_R_DC_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + interrupt-controller@56180040 { + compatible = "fsl,imx8qxp-dc-intc"; + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; + + pixel-engine@56180800 { + compatible = "fsl,imx8qxp-dc-pixel-engine"; + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + + display-engine@5618b400 { + compatible = "fsl,imx8qxp-dc-display-engine0"; + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + }; From patchwork Mon Dec 23 06:41:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918509 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2058.outbound.protection.outlook.com [40.107.22.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D978118C03B for ; Mon, 23 Dec 2024 06:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936184; cv=fail; b=gRrRTFdK5mPs2N56XLR3E+vAEdrUTAaOoBmOBITVLd0rhAtXnPk2ayWPuBJvMI20CNmPGfK/jUN+oms1pe65dsVqvxxwVuAY2L1WejlcuO2u94uLkDQ4kd1LrpZyUyX4d8pr6Mr45Ul5k5T3jvFDLGEIfV3tc9oQ7SRN06GItvE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936184; c=relaxed/simple; bh=SjnJkCtLL796+Tgwi5GEItTUJ02nxHdOhugtNv9YlBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Y6pZVULVs3V+j6Llr52fjDt3IIB1tALPtHrxr7qoD2iotGevJLvQQ1Ux4wtAm08VQo54hc977L3baCCPnbU9RE+/dA2BYxez+0Ni8mdceFlX15KrlIe6kH2b3aA3qQcQa1oOsz78JexrjBDRLGgWP3Mr/Fr+je70JRHgzP6ELL0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=aPKjcJFt; arc=fail smtp.client-ip=40.107.22.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="aPKjcJFt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vOoKXPCqQ1q3Y4F6F07ZRlzQC8kVMNaltuJdXLGq/Ks/v6icXLDF8r88BuAV7rzC900/0HyLqjXp+EN0DTaXSJ7ohrUcNI1Nx1zk107mcEkTfsvTuYZRIsSaADXtQ/fdGHfFNJBOW4ZzLzLjx/Cn/Y9WLICWLmAeaCuf3W1AIcvgPmho/7CA3IwVT/p+CFv9R1S4D7JRqfOuhHwSI0cvFRtj9rvWbe9Ix9BcWrdiYUrA1R2Tj2fBZccfW206aLpFk/ANnt+G5Q+U3/Be0XESXB0ZvUBYVfU0md3XDR/Tyx/KgcKgoypnWI4GS4l2clRpz7l+isUYtKdHSS7MyyYp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=SWllqDNMybW+kg3bpR9Z4sBozBE2XTeXRnDKUeTepYM=; b=Pg0M9rYOufBGCf42xfNKid3utn8giOENeS7FCGeAJ+a6JQn/3SRfK10OIlxGuc2sTn1MU+zeeksYmh2p/Jd4xt7DTDgm/206+hr4KKYlidU3elWhgfCglsOtjngUIWH8s83mbvS/KiLjTdD+5Y0lzADJNg+RCFlHEpGhvJrTyqB1HfoKoAJsDEpmjGNoN/CMSEGcaQlXYeZ7yxaS7YXsNxawja5XIgLxEdEhOEQsDtcp8Vs4Rpb9NxZLuhSBJUPQhA7pIwDk8fmhnSt1UJ7S2I7Y/joL6N6w3WSUA1DjyWA8J2prnJXxzCW6anIq1WDggutTQZVkPvptQ24jPZpEtw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SWllqDNMybW+kg3bpR9Z4sBozBE2XTeXRnDKUeTepYM=; b=aPKjcJFtvkGafD+qaGKvFg02BsObmiNPaqXrOAffVq4SZGC4Eukb0yjdDadq4KzhXzF8s4Ib5HjZqcYer5038LcXq+Fq9YRjUwo5lQIc+OMym7ldJSkTHPxc9YPfdqdAgg3BmuoAoTB5p4vVNrTJPtgWGunyWRU4SHiV+q9bk1EmgmAYjlQ2SH2RqxCQY113F5afrpQOJcgjXNFZbZZxGdHfM1JCWnv9EllLDhD+GZ4x7Nwg0RbrgE0yEwwu1ElNW3uLY8irYu7y3ThwNAOaYI+zrPUZqJpXfqXSFBfytvOWLp8m4tMGhbjx4hm2j0owG2BeMa3T0g3uY66rL7zooA== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:42:54 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:42:54 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Date: Mon, 23 Dec 2024 14:41:37 +0800 Message-Id: <20241223064147.3961652-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a14072c-6b9f-401a-9397-08dd231d074f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: QXzpqxH3N/UARnRnmaw03WjklP/ZIHE3ewsuA7Q0Ms0c/5LQfc4oCk851PIHOZY05H4bRGpAJHqF1LhNO9qZEe/l8KAODxEO89P4TNfDQ6hCB90jp8MaCiJoTRxe+xQCNmXmMHr+j99npgxibO3E6ZF7qlgMZAWkTmh53ebYwWHv9gw/J/pE1rMEzmT+FGTpFrXZcEldqJBJx/BOIibC5HGq4C5fuVws5wwadXVGYlBwgEteRpE+DRb3j2jPRkNDn+GMhJldZv2TJm8tNNheEG9qZD9imZ/eerskZCIqdGwdnWRYhQIAzSkZ2zcwEN4lRDd9YBy8XV/R3ac48PcNFVOpqSASPTFD2EcFTvidKw7HBEJ3DnQuH2mcm+lZxieqh45h3SVXPNCwgM7LzbLEELUKb5btCFxr6Nhfd97nvKHdQ8C5VYuCSDk2OrLm3yBOxy+TNrayJ52y8vokGf8O5Fu2vNoC4aZTDGut5KTAReP1xXfZkGcZ9pqzrnBDvScrRrM1I62r0yRmvvSaPN2EQ3uKNPlaCwuBnLQlHYSPYREsgMPL6QmpGJl9Ze313RIf+8XKVzsl8dVGvs93DHvDhkt4vJ5x/rCJz276p270U4eKpiscvYuh33lCjJZepXuFH3c1I/iR0ziVnm2dmtEgwd084ZDIYIiENG2DJOgHGFD2XVI9HAmII1u0uuG1c62/KeRyQ9kx7rZslHPgbvpHrdDmGPWcTqmp1Gv9uLXV8wg9sK9CRRCf7zg+/fVdpxMREnApVAbQYU/C+8OE9JM7roGr8FZDGrugJ8tgVn5e2AWMm1ZycV4ohF40ZDRUIHYiWdkFnFjLF6/uI+Srf/Y8ZDZGeQoLigBEDM+isidGH1ZG0ESTcjjNJqLS+VlaL3KZMxBf9pQIpxE5URPK3I9Wz+LHUM02NobBqR+aYy9w0V8VtWbpuiiL7znnpHV0L/Hqg1ZBZepwn8/ns+E+wDF5Qqq6P4GMlGdpqSc3YPxcqcAOm6cDR4pgIv7i89m2XNpAqVCfJ1mSjzuRU/kfkfqI3GHEmU94ZjMph+rL1REXIlVPYWXE0eb7KOYl3kh1+A7Doyjk9X4oUJy6zyr5Sl993qm0IWP9mHiAjRmjH05895Skkw4XGO6kHdcjn9ORpc14r2mUMsb+LJRboDpAYYzeGymaHWco9tAnoS8zZAekBA1u6dQFUoHLRwiTzWxLVLWQxMfZyKKPmfdNRl+hei155xQM6orWcTd8sxOby381hS6R7TgIbsuYXSdlYoyTlA1h7rfTUSmu18aoPHr5CZ77yJ1Mee3uzFSwNd6sisKvkdcTTVzQHF2bKiF9Ip+sNNkeu5o7JhulI8FjxvwhSPzvUi2TSzr6rMu3AvxmRGca2zl+O9kgs4VBWGw5oYyh3iO2UNf5c08Z9mItYB5pzt4U50BNa9vq5kuJaKrViqZQcx6cf7/f7Y53eom6e1aqoIl5 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ju87C0EpcrFNzPd8Swc+6gV2WhgFH2sYM6j1NIOUN6pWRcayjkLLNbMBD1MoVOfgR8Dm6pVqVNBJ6A6WXzgL/S1b//e/gLBwWpq4F6FPXhfsKX/9qgDDyNnBXquWJORvYKqqLJ6hJgL4GZ/UuqtGDxNXvvqf2W9AeekBsh41Kcx8agjOifcL8NJO5ziyEuYSEigbOyIaelqFruwBQHE2/gj9UpUxowkGYDhqySQ7keDlverk5nmXKftIM6aEvwe4NYO7OR6mMujgj4BKiWki7u2TE1OaUyTR2Dwbqq0nl+ds/L3nWx4q6Ks9rVCcq5agBX980Eh94Y4hPujBRJDEd223haczZSsi0azT4BWxeYYaMKqaPCrLGshMhAw46kHuaTlSQnNRVYJCzLoYfRj90xB+zCGCYrBlI1AQ/oaEwxAV3DoUdGX2M4ZZxpkkOmZ5laMRgU4V/oQA79dBDsQIjDITos1VHbDjbYm6fBhcxd0VVkZuG9e60QfZ6hPnSTLgshPll85D045GBd10p7cIjh35gWw025kYutLA3Bf6HpJYPRuZ0Eq6BHem1BL1Xf24pDJcg1xKfV7ygYHudGeJ/tTqJyqiIyyGaBvnKWLXfcuBFcZuqjfLRA/UTNsoPRfKIT9s9LfEFuqkzfjZ2ltAPScJ+9NYqjB8SN+XUBxRqRm/5o+islml52furOCQplNFgW0yP+TDvoGMcLqEE3j/poXWzu2fIDiZd4ySyVBcQjrrLHAmw1piI2N0+acpgKUSLmM92qPdUfR2PbnFkZNc6eJsRFJzGKK/4gdfk3x3mReC5PKXECwTItGkKG3jmUYxqT3vLdBg8p+UqREPek8y9ltrfvwTOCa4gE0e7DqlMNMbEsXhCUdHSRcd0FNRTYW3MqYeQ44VuznMmix/K31us1fBfpD0pLmIMKS+YVKd0IQraU51aFA3c5gi2hEuJRnCCnoKpDzIN6jebOY36HQXIbR+2vzlz2/Epm3bqtnZEoB26zh0upR2jgGE2oeqdVWEJuWDw5pE4tDw6QcYMAJZKLuN2R3Q42efFBJYSqznsbbYW1EWwP/S1Njum3FjJizFpLoOWoNmvIyT8zbjYAzU60Ahn9VRo/Ido1sYIHFz46WB1nV1oiPO3FSlU53wV/a0Ji2Ll5AhTYXDzawZJKfBWCimsVs7Cn8u9jQ0tx1XU1QGbNIYUQzpYocj1N+ZQGMTKDvPYEnKUJi3ESPlsolS5d6c0JZ27qcWjmjx4LQ+v3jZGvrIa3jJDqm+wYE98x9fFCB0KOWFeWdNBgIBsRWb/cBfT76zMFyo6Rt6xHcOZLXwtr7SgoODuNCcW2Djf9G4kZJMXp3Ar28WuwnNZrWjoNyVE0B8E45KO0qgxCghrPLQ3IGyog2f4Dp9tXerrV84cPxqbuydl1OUVXBwU4UFUhD0bMvtzV5dg8kkFctLi5lMqqb0OhH8fK1QFuSvvHjeXT9uJ/H/4kjb8K9j5awzGoD4Toc+NDg+29UWPTnpY4CB/ad7ly0UYss5welpDjP97buu+yXlKNEiSCOuKO/Syz39afi2upHUf+D6mE8qJOe21MlNJtr9awHQDZSrPjtp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a14072c-6b9f-401a-9397-08dd231d074f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:42:54.2991 (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: b2EuvsMhU1lyZu+pX5h1TAKbpCwR3S8Ionz4gMo/Lc4MWyQPRQYPy9q/KrNayjvlpl1uN/+LpmJzqOWQaJa36A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Add minimal feature support with FrameGen and TCon so that the engine can output display timings. The FrameGen driver, TCon driver and display engine driver are components to be aggregated by a master registered in the upcoming DRM driver. Reviewed-by: Maxime Ripard Signed-off-by: Liu Ying --- v7: * Add kernel doc for struct dc_drm_device. (Dmitry) * Fix regmap_config definitions by correcting name field, correcting read ranges and setting max_register field. * Get instance numbers from device data(compatible strings) instead of OF aliases. * Collect Maxime's R-b tag. * Trivial tweaks. v6: * No change. v5: * Replace .remove_new with .remove in dc-{de,fg,tc}.c. (Uwe) * Select REGMAP and REGMAP_MMIO Kconfig options. * Fix commit message to state that display engine driver is a component driver instead of a master/aggregate driver. v4: * Use regmap to define register map for all registers. (Dmitry) * Use regmap APIs to access registers. (Dmitry) * Inline some small functions. (Dmitry) * Move dc_fg_displaymode() and dc_fg_panic_displaymode() function calls from KMS routine to initialization stage. (Dmitry) * Use devm_kzalloc() to drmm_kzalloc() to allocate dc_* data strutures. * Drop unnecessary private struct dc_*_priv. * Set suppress_bind_attrs driver flag to true to avoid unnecessary sys interfaces to bind/unbind the drivers. v3: * No change. v2: * Use OF alias id to get instance id. * Add dev member to struct dc_tc. drivers/gpu/drm/imx/Kconfig | 1 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dc/Kconfig | 7 + drivers/gpu/drm/imx/dc/Makefile | 5 + drivers/gpu/drm/imx/dc/dc-de.c | 153 +++++++++++++ drivers/gpu/drm/imx/dc/dc-de.h | 62 ++++++ drivers/gpu/drm/imx/dc/dc-drv.c | 32 +++ drivers/gpu/drm/imx/dc/dc-drv.h | 29 +++ drivers/gpu/drm/imx/dc/dc-fg.c | 378 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-tc.c | 142 ++++++++++++ 10 files changed, 810 insertions(+) create mode 100644 drivers/gpu/drm/imx/dc/Kconfig create mode 100644 drivers/gpu/drm/imx/dc/Makefile create mode 100644 drivers/gpu/drm/imx/dc/dc-de.c create mode 100644 drivers/gpu/drm/imx/dc/dc-de.h create mode 100644 drivers/gpu/drm/imx/dc/dc-drv.c create mode 100644 drivers/gpu/drm/imx/dc/dc-drv.h create mode 100644 drivers/gpu/drm/imx/dc/dc-fg.c create mode 100644 drivers/gpu/drm/imx/dc/dc-tc.c diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig index 03535a15dd8f..3e8c6edbc17c 100644 --- a/drivers/gpu/drm/imx/Kconfig +++ b/drivers/gpu/drm/imx/Kconfig @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only +source "drivers/gpu/drm/imx/dc/Kconfig" source "drivers/gpu/drm/imx/dcss/Kconfig" source "drivers/gpu/drm/imx/ipuv3/Kconfig" source "drivers/gpu/drm/imx/lcdc/Kconfig" diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile index 86f38e7c7422..c7b317640d71 100644 --- a/drivers/gpu/drm/imx/Makefile +++ b/drivers/gpu/drm/imx/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_DRM_IMX8_DC) += dc/ obj-$(CONFIG_DRM_IMX_DCSS) += dcss/ obj-$(CONFIG_DRM_IMX) += ipuv3/ obj-$(CONFIG_DRM_IMX_LCDC) += lcdc/ diff --git a/drivers/gpu/drm/imx/dc/Kconfig b/drivers/gpu/drm/imx/dc/Kconfig new file mode 100644 index 000000000000..e1ef76d82830 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -0,0 +1,7 @@ +config DRM_IMX8_DC + tristate "Freescale i.MX8 Display Controller Graphics" + depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST) + select REGMAP + select REGMAP_MMIO + help + enable Freescale i.MX8 Display Controller(DC) graphics support diff --git a/drivers/gpu/drm/imx/dc/Makefile b/drivers/gpu/drm/imx/dc/Makefile new file mode 100644 index 000000000000..56de82d53d4d --- /dev/null +++ b/drivers/gpu/drm/imx/dc/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + +imx8-dc-drm-objs := dc-de.o dc-drv.o dc-fg.o dc-tc.o + +obj-$(CONFIG_DRM_IMX8_DC) += imx8-dc-drm.o diff --git a/drivers/gpu/drm/imx/dc/dc-de.c b/drivers/gpu/drm/imx/dc/dc-de.c new file mode 100644 index 000000000000..1eaa7db56a9d --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-de.c @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-de.h" +#include "dc-drv.h" + +#define POLARITYCTRL 0xc +#define POLEN_HIGH BIT(2) + +static const struct regmap_range dc_de_regmap_ranges[] = { + regmap_reg_range(POLARITYCTRL, POLARITYCTRL), +}; + +static const struct regmap_access_table dc_de_regmap_access_table = { + .yes_ranges = dc_de_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_de_regmap_ranges), +}; + +static const struct regmap_config dc_de_top_regmap_config = { + .name = "top", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_de_regmap_access_table, + .rd_table = &dc_de_regmap_access_table, + .max_register = POLARITYCTRL, +}; + +static inline void dc_dec_init(struct dc_de *de) +{ + regmap_write_bits(de->reg_top, POLARITYCTRL, POLARITYCTRL, POLEN_HIGH); +} + +static int dc_de_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + void __iomem *base_top; + struct dc_de *de; + int ret; + + de = devm_kzalloc(dev, sizeof(*de), GFP_KERNEL); + if (!de) + return -ENOMEM; + + de->id = (enum dc_de_id)(uintptr_t)device_get_match_data(dev); + + base_top = devm_platform_ioremap_resource_byname(pdev, "top"); + if (IS_ERR(base_top)) + return PTR_ERR(base_top); + + de->reg_top = devm_regmap_init_mmio(dev, base_top, + &dc_de_top_regmap_config); + if (IS_ERR(de->reg_top)) + return PTR_ERR(de->reg_top); + + de->irq_shdld = platform_get_irq_byname(pdev, "shdload"); + if (de->irq_shdld < 0) + return de->irq_shdld; + + de->irq_framecomplete = platform_get_irq_byname(pdev, "framecomplete"); + if (de->irq_framecomplete < 0) + return de->irq_framecomplete; + + de->irq_seqcomplete = platform_get_irq_byname(pdev, "seqcomplete"); + if (de->irq_seqcomplete < 0) + return de->irq_seqcomplete; + + de->dev = dev; + + dev_set_drvdata(dev, de); + + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; + + dc_drm->de[de->id] = de; + + return 0; +} + +static const struct component_ops dc_de_ops = { + .bind = dc_de_bind, +}; + +static int dc_de_probe(struct platform_device *pdev) +{ + int ret; + + ret = devm_of_platform_populate(&pdev->dev); + if (ret < 0) + return ret; + + ret = component_add(&pdev->dev, &dc_de_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_de_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_de_ops); +} + +static int dc_de_runtime_resume(struct device *dev) +{ + struct dc_de *de = dev_get_drvdata(dev); + + dc_dec_init(de); + dc_fg_init(de->fg); + dc_tc_init(de->tc); + + return 0; +} + +static const struct dev_pm_ops dc_de_pm_ops = { + RUNTIME_PM_OPS(NULL, dc_de_runtime_resume, NULL) +}; + +static const struct of_device_id dc_de_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-display-engine0", + .data = (const void *)DC_DE0, }, + { .compatible = "fsl,imx8qxp-dc-display-engine1", + .data = (const void *)DC_DE1, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_de_dt_ids); + +struct platform_driver dc_de_driver = { + .probe = dc_de_probe, + .remove = dc_de_remove, + .driver = { + .name = "imx8-dc-display-engine", + .suppress_bind_attrs = true, + .of_match_table = dc_de_dt_ids, + .pm = pm_sleep_ptr(&dc_de_pm_ops), + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-de.h b/drivers/gpu/drm/imx/dc/dc-de.h new file mode 100644 index 000000000000..b504de5589a5 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-de.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_DISPLAY_ENGINE_H__ +#define __DC_DISPLAY_ENGINE_H__ + +#include +#include +#include +#include + +#define DC_DISPLAYS 2 + +enum dc_de_id { + DC_DE0, + DC_DE1, +}; + +struct dc_fg { + struct device *dev; + struct regmap *reg; + struct clk *clk_disp; +}; + +struct dc_tc { + struct device *dev; + struct regmap *reg; +}; + +struct dc_de { + struct device *dev; + struct regmap *reg_top; + struct dc_fg *fg; + struct dc_tc *tc; + int irq_shdld; + int irq_framecomplete; + int irq_seqcomplete; + enum dc_de_id id; +}; + +/* Frame Generator Unit */ +void dc_fg_cfg_videomode(struct dc_fg *fg, struct drm_display_mode *m); +void dc_fg_enable(struct dc_fg *fg); +void dc_fg_disable(struct dc_fg *fg); +void dc_fg_shdtokgen(struct dc_fg *fg); +u32 dc_fg_get_frame_index(struct dc_fg *fg); +u32 dc_fg_get_line_index(struct dc_fg *fg); +bool dc_fg_wait_for_frame_index_moving(struct dc_fg *fg); +bool dc_fg_secondary_requests_to_read_empty_fifo(struct dc_fg *fg); +void dc_fg_secondary_clear_channel_status(struct dc_fg *fg); +int dc_fg_wait_for_secondary_syncup(struct dc_fg *fg); +void dc_fg_enable_clock(struct dc_fg *fg); +void dc_fg_disable_clock(struct dc_fg *fg); +enum drm_mode_status dc_fg_check_clock(struct dc_fg *fg, int clk_khz); +void dc_fg_init(struct dc_fg *fg); + +/* Timing Controller Unit */ +void dc_tc_init(struct dc_tc *tc); + +#endif /* __DC_DISPLAY_ENGINE_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c new file mode 100644 index 000000000000..e5910a82dd4d --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include + +#include "dc-drv.h" + +static struct platform_driver * const dc_drivers[] = { + &dc_de_driver, + &dc_fg_driver, + &dc_tc_driver, +}; + +static int __init dc_drm_init(void) +{ + return platform_register_drivers(dc_drivers, ARRAY_SIZE(dc_drivers)); +} + +static void __exit dc_drm_exit(void) +{ + platform_unregister_drivers(dc_drivers, ARRAY_SIZE(dc_drivers)); +} + +module_init(dc_drm_init); +module_exit(dc_drm_exit); + +MODULE_DESCRIPTION("i.MX8 Display Controller DRM Driver"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL"); diff --git a/drivers/gpu/drm/imx/dc/dc-drv.h b/drivers/gpu/drm/imx/dc/dc-drv.h new file mode 100644 index 000000000000..23ef715f5cd1 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_DRV_H__ +#define __DC_DRV_H__ + +#include + +#include + +#include "dc-de.h" + +/** + * struct dc_drm_device - DC specific drm_device + */ +struct dc_drm_device { + /** @base: base drm_device structure */ + struct drm_device base; + /** @de: display engine list */ + struct dc_de *de[DC_DISPLAYS]; +}; + +extern struct platform_driver dc_de_driver; +extern struct platform_driver dc_fg_driver; +extern struct platform_driver dc_tc_driver; + +#endif /* __DC_DRV_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-fg.c b/drivers/gpu/drm/imx/dc/dc-fg.c new file mode 100644 index 000000000000..b5a0441b2b13 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fg.c @@ -0,0 +1,378 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-de.h" +#include "dc-drv.h" + +#define FGSTCTRL 0x8 +#define FGSYNCMODE_MASK GENMASK(2, 1) +#define FGSYNCMODE(x) FIELD_PREP(FGSYNCMODE_MASK, (x)) +#define SHDEN BIT(0) + +#define HTCFG1 0xc +#define HTOTAL(x) FIELD_PREP(GENMASK(29, 16), ((x) - 1)) +#define HACT(x) FIELD_PREP(GENMASK(13, 0), (x)) + +#define HTCFG2 0x10 +#define HSEN BIT(31) +#define HSBP(x) FIELD_PREP(GENMASK(29, 16), ((x) - 1)) +#define HSYNC(x) FIELD_PREP(GENMASK(13, 0), ((x) - 1)) + +#define VTCFG1 0x14 +#define VTOTAL(x) FIELD_PREP(GENMASK(29, 16), ((x) - 1)) +#define VACT(x) FIELD_PREP(GENMASK(13, 0), (x)) + +#define VTCFG2 0x18 +#define VSEN BIT(31) +#define VSBP(x) FIELD_PREP(GENMASK(29, 16), ((x) - 1)) +#define VSYNC(x) FIELD_PREP(GENMASK(13, 0), ((x) - 1)) + +#define PKICKCONFIG 0x2c +#define SKICKCONFIG 0x30 +#define EN BIT(31) +#define ROW(x) FIELD_PREP(GENMASK(29, 16), (x)) +#define COL(x) FIELD_PREP(GENMASK(13, 0), (x)) + +#define PACFG 0x54 +#define SACFG 0x58 +#define STARTY(x) FIELD_PREP(GENMASK(29, 16), ((x) + 1)) +#define STARTX(x) FIELD_PREP(GENMASK(13, 0), ((x) + 1)) + +#define FGINCTRL 0x5c +#define FGINCTRLPANIC 0x60 +#define FGDM_MASK GENMASK(2, 0) +#define ENPRIMALPHA BIT(3) +#define ENSECALPHA BIT(4) + +#define FGCCR 0x64 +#define CCGREEN(x) FIELD_PREP(GENMASK(19, 10), (x)) + +#define FGENABLE 0x68 +#define FGEN BIT(0) + +#define FGSLR 0x6c +#define SHDTOKGEN BIT(0) + +#define FGTIMESTAMP 0x74 +#define FRAMEINDEX(x) FIELD_GET(GENMASK(31, 14), (x)) +#define LINEINDEX(x) FIELD_GET(GENMASK(13, 0), (x)) + +#define FGCHSTAT 0x78 +#define SECSYNCSTAT BIT(24) +#define SFIFOEMPTY BIT(16) + +#define FGCHSTATCLR 0x7c +#define CLRSECSTAT BIT(16) + +enum dc_fg_id { + DC_FG0, + DC_FG1, +}; + +enum dc_fg_syncmode { + FG_SYNCMODE_OFF, /* No side-by-side synchronization. */ +}; + +enum dc_fg_dm { + FG_DM_CONSTCOL = 0x1, /* Constant Color Background is shown. */ + FG_DM_SEC_ON_TOP = 0x5, /* Both inputs overlaid with secondary on top. */ +}; + +static const struct regmap_range dc_fg_regmap_write_ranges[] = { + regmap_reg_range(FGSTCTRL, VTCFG2), + regmap_reg_range(PKICKCONFIG, SKICKCONFIG), + regmap_reg_range(PACFG, FGSLR), + regmap_reg_range(FGCHSTATCLR, FGCHSTATCLR), +}; + +static const struct regmap_range dc_fg_regmap_read_ranges[] = { + regmap_reg_range(FGSTCTRL, VTCFG2), + regmap_reg_range(PKICKCONFIG, SKICKCONFIG), + regmap_reg_range(PACFG, FGENABLE), + regmap_reg_range(FGTIMESTAMP, FGCHSTAT), +}; + +static const struct regmap_access_table dc_fg_regmap_write_table = { + .yes_ranges = dc_fg_regmap_write_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fg_regmap_write_ranges), +}; + +static const struct regmap_access_table dc_fg_regmap_read_table = { + .yes_ranges = dc_fg_regmap_read_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fg_regmap_read_ranges), +}; + +static const struct regmap_config dc_fg_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_fg_regmap_write_table, + .rd_table = &dc_fg_regmap_read_table, + .max_register = FGCHSTATCLR, +}; + +static inline void dc_fg_enable_shden(struct dc_fg *fg) +{ + regmap_write_bits(fg->reg, FGSTCTRL, SHDEN, SHDEN); +} + +static inline void dc_fg_syncmode(struct dc_fg *fg, enum dc_fg_syncmode mode) +{ + regmap_write_bits(fg->reg, FGSTCTRL, FGSYNCMODE_MASK, FGSYNCMODE(mode)); +} + +void dc_fg_cfg_videomode(struct dc_fg *fg, struct drm_display_mode *m) +{ + u32 hact, htotal, hsync, hsbp; + u32 vact, vtotal, vsync, vsbp; + u32 kick_row, kick_col; + int ret; + + hact = m->crtc_hdisplay; + htotal = m->crtc_htotal; + hsync = m->crtc_hsync_end - m->crtc_hsync_start; + hsbp = m->crtc_htotal - m->crtc_hsync_start; + + vact = m->crtc_vdisplay; + vtotal = m->crtc_vtotal; + vsync = m->crtc_vsync_end - m->crtc_vsync_start; + vsbp = m->crtc_vtotal - m->crtc_vsync_start; + + /* video mode */ + regmap_write(fg->reg, HTCFG1, HACT(hact) | HTOTAL(htotal)); + regmap_write(fg->reg, HTCFG2, HSYNC(hsync) | HSBP(hsbp) | HSEN); + regmap_write(fg->reg, VTCFG1, VACT(vact) | VTOTAL(vtotal)); + regmap_write(fg->reg, VTCFG2, VSYNC(vsync) | VSBP(vsbp) | VSEN); + + kick_col = hact + 1; + kick_row = vact; + + /* pkickconfig */ + regmap_write(fg->reg, PKICKCONFIG, COL(kick_col) | ROW(kick_row) | EN); + + /* skikconfig */ + regmap_write(fg->reg, SKICKCONFIG, COL(kick_col) | ROW(kick_row) | EN); + + /* primary and secondary area position configuration */ + regmap_write(fg->reg, PACFG, STARTX(0) | STARTY(0)); + regmap_write(fg->reg, SACFG, STARTX(0) | STARTY(0)); + + /* alpha */ + regmap_write_bits(fg->reg, FGINCTRL, ENPRIMALPHA | ENSECALPHA, 0); + regmap_write_bits(fg->reg, FGINCTRLPANIC, ENPRIMALPHA | ENSECALPHA, 0); + + /* constant color is green(used in panic mode) */ + regmap_write(fg->reg, FGCCR, CCGREEN(0x3ff)); + + ret = clk_set_rate(fg->clk_disp, m->clock * HZ_PER_KHZ); + if (ret < 0) + dev_err(fg->dev, "failed to set display clock rate: %d\n", ret); +} + +static inline void dc_fg_displaymode(struct dc_fg *fg, enum dc_fg_dm mode) +{ + regmap_write_bits(fg->reg, FGINCTRL, FGDM_MASK, mode); +} + +static inline void dc_fg_panic_displaymode(struct dc_fg *fg, enum dc_fg_dm mode) +{ + regmap_write_bits(fg->reg, FGINCTRLPANIC, FGDM_MASK, mode); +} + +void dc_fg_enable(struct dc_fg *fg) +{ + regmap_write(fg->reg, FGENABLE, FGEN); +} + +void dc_fg_disable(struct dc_fg *fg) +{ + regmap_write(fg->reg, FGENABLE, 0); +} + +void dc_fg_shdtokgen(struct dc_fg *fg) +{ + regmap_write(fg->reg, FGSLR, SHDTOKGEN); +} + +u32 dc_fg_get_frame_index(struct dc_fg *fg) +{ + u32 val; + + regmap_read(fg->reg, FGTIMESTAMP, &val); + + return FRAMEINDEX(val); +} + +u32 dc_fg_get_line_index(struct dc_fg *fg) +{ + u32 val; + + regmap_read(fg->reg, FGTIMESTAMP, &val); + + return LINEINDEX(val); +} + +bool dc_fg_wait_for_frame_index_moving(struct dc_fg *fg) +{ + unsigned long timeout = jiffies + msecs_to_jiffies(100); + u32 frame_index, last_frame_index; + + frame_index = dc_fg_get_frame_index(fg); + do { + last_frame_index = frame_index; + frame_index = dc_fg_get_frame_index(fg); + } while (last_frame_index == frame_index && + time_before(jiffies, timeout)); + + return last_frame_index != frame_index; +} + +bool dc_fg_secondary_requests_to_read_empty_fifo(struct dc_fg *fg) +{ + u32 val; + + regmap_read(fg->reg, FGCHSTAT, &val); + + return !!(val & SFIFOEMPTY); +} + +void dc_fg_secondary_clear_channel_status(struct dc_fg *fg) +{ + regmap_write(fg->reg, FGCHSTATCLR, CLRSECSTAT); +} + +int dc_fg_wait_for_secondary_syncup(struct dc_fg *fg) +{ + unsigned int val; + + return regmap_read_poll_timeout(fg->reg, FGCHSTAT, val, + val & SECSYNCSTAT, 5, 100000); +} + +void dc_fg_enable_clock(struct dc_fg *fg) +{ + int ret; + + ret = clk_prepare_enable(fg->clk_disp); + if (ret) + dev_err(fg->dev, "failed to enable display clock: %d\n", ret); +} + +void dc_fg_disable_clock(struct dc_fg *fg) +{ + clk_disable_unprepare(fg->clk_disp); +} + +enum drm_mode_status dc_fg_check_clock(struct dc_fg *fg, int clk_khz) +{ + unsigned long rounded_rate; + + rounded_rate = clk_round_rate(fg->clk_disp, clk_khz * HZ_PER_KHZ); + + if (rounded_rate != clk_khz * HZ_PER_KHZ) + return MODE_NOCLOCK; + + return MODE_OK; +} + +void dc_fg_init(struct dc_fg *fg) +{ + dc_fg_enable_shden(fg); + dc_fg_syncmode(fg, FG_SYNCMODE_OFF); + dc_fg_displaymode(fg, FG_DM_SEC_ON_TOP); + dc_fg_panic_displaymode(fg, FG_DM_CONSTCOL); +} + +static int dc_fg_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + void __iomem *base; + enum dc_fg_id id; + struct dc_fg *fg; + struct dc_de *de; + + fg = devm_kzalloc(dev, sizeof(*fg), GFP_KERNEL); + if (!fg) + return -ENOMEM; + + id = (enum dc_fg_id)(uintptr_t)device_get_match_data(dev); + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + fg->reg = devm_regmap_init_mmio(dev, base, &dc_fg_regmap_config); + if (IS_ERR(fg->reg)) + return PTR_ERR(fg->reg); + + fg->clk_disp = devm_clk_get(dev, NULL); + if (IS_ERR(fg->clk_disp)) + return dev_err_probe(dev, PTR_ERR(fg->clk_disp), + "failed to get display clock\n"); + + fg->dev = dev; + + de = dc_drm->de[id]; + de->fg = fg; + + return 0; +} + +static const struct component_ops dc_fg_ops = { + .bind = dc_fg_bind, +}; + +static int dc_fg_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_fg_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_fg_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_fg_ops); +} + +static const struct of_device_id dc_fg_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-framegen0", + .data = (const void *)DC_FG0, }, + { .compatible = "fsl,imx8qxp-dc-framegen1", + .data = (const void *)DC_FG1, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_fg_dt_ids); + +struct platform_driver dc_fg_driver = { + .probe = dc_fg_probe, + .remove = dc_fg_remove, + .driver = { + .name = "imx8-dc-framegen", + .suppress_bind_attrs = true, + .of_match_table = dc_fg_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-tc.c b/drivers/gpu/drm/imx/dc/dc-tc.c new file mode 100644 index 000000000000..a7d04e6eb8bf --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-tc.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-de.h" + +#define TCON_CTRL 0x410 +#define CTRL_RST_VAL 0x01401408 + +/* red: MAPBIT 29-20, green: MAPBIT 19-10, blue: MAPBIT 9-0 */ +#define MAPBIT3_0 0x418 +#define MAPBIT7_4 0x41c +#define MAPBIT11_8 0x420 +#define MAPBIT15_12 0x424 +#define MAPBIT19_16 0x428 +#define MAPBIT23_20 0x42c +#define MAPBIT27_24 0x430 +#define MAPBIT31_28 0x434 + +enum dc_tc_id { + DC_TC0, + DC_TC1, +}; + +static const struct regmap_range dc_tc_regmap_ranges[] = { + regmap_reg_range(TCON_CTRL, TCON_CTRL), + regmap_reg_range(MAPBIT3_0, MAPBIT31_28), +}; + +static const struct regmap_access_table dc_tc_regmap_access_table = { + .yes_ranges = dc_tc_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_tc_regmap_ranges), +}; + +static const struct regmap_config dc_tc_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_tc_regmap_access_table, + .rd_table = &dc_tc_regmap_access_table, + .max_register = MAPBIT31_28, +}; + +/* + * The pixels reach TCON are always in 30-bit BGR format. + * The first bridge always receives pixels in 30-bit RGB format. + * So, map the format to MEDIA_BUS_FMT_RGB101010_1X30. + */ +static const u32 dc_tc_mapbit[] = { + 0x17161514, 0x1b1a1918, 0x0b0a1d1c, 0x0f0e0d0c, + 0x13121110, 0x03020100, 0x07060504, 0x00000908, +}; + +void dc_tc_init(struct dc_tc *tc) +{ + /* reset TCON_CTRL to POR default so that TCON works in bypass mode */ + regmap_write(tc->reg, TCON_CTRL, CTRL_RST_VAL); + + /* set format */ + regmap_bulk_write(tc->reg, MAPBIT3_0, dc_tc_mapbit, + ARRAY_SIZE(dc_tc_mapbit)); +} + +static int dc_tc_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + void __iomem *base; + enum dc_tc_id id; + struct dc_tc *tc; + struct dc_de *de; + + tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL); + if (!tc) + return -ENOMEM; + + id = (enum dc_tc_id)(uintptr_t)device_get_match_data(dev); + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + tc->reg = devm_regmap_init_mmio(dev, base, &dc_tc_regmap_config); + if (IS_ERR(tc->reg)) + return PTR_ERR(tc->reg); + + de = dc_drm->de[id]; + de->tc = tc; + de->tc->dev = dev; + + return 0; +} + +static const struct component_ops dc_tc_ops = { + .bind = dc_tc_bind, +}; + +static int dc_tc_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_tc_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_tc_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_tc_ops); +} + +static const struct of_device_id dc_tc_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-tcon0", + .data = (const void *)DC_TC0, }, + { .compatible = "fsl,imx8qxp-dc-tcon1", + .data = (const void *)DC_TC1, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_tc_dt_ids); + +struct platform_driver dc_tc_driver = { + .probe = dc_tc_probe, + .remove = dc_tc_remove, + .driver = { + .name = "imx8-dc-tcon", + .suppress_bind_attrs = true, + .of_match_table = dc_tc_dt_ids, + }, +}; From patchwork Mon Dec 23 06:41:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918510 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2045.outbound.protection.outlook.com [40.107.21.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC727192D91 for ; Mon, 23 Dec 2024 06:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936192; cv=fail; b=KxfIWrW74fId5baeCo9vOo8P4RILwTnkSszPgfQA0AhRTIRgB+RsuR2fUblP9MhUy6SWYy8mR3GzzH8EZIpsmLt9CGbQQ1CsQeuiQte7O/PFt8H+Ueo71n/XzxVuiDndxbcmeu3wdRqVgxywRtKSIUb900YNjDBPYv1LRVMVk3c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936192; c=relaxed/simple; bh=rHQbRP/+NXOrJKlKiF2WMDjVq7mum8pdkeGHQSNcTtQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=o1h3Pye5Pm2Dci6/J7UscpPZlCB4NtneXovRFu+9JpSPvkHX7SZDBQYVsXNztrUOhg46IfFR9fzs68Z7rt4IvkXC09ZvUc3O0yiI1OkNvOF8eR4HO2htGFIuRpqgjGRPPHSsCoLNa9Z1K/R+dTLHp4xepn3LfppPMpUY1EwGY4U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=kvjYohZv; arc=fail smtp.client-ip=40.107.21.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="kvjYohZv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=acPfrPedrncQMd0CxGFxvaXMAsQfiDeqrPwasnLPXHY5DxWIQ/ZK5k8+yUTLNa4Sy5BlvNVF+hCcJBV5hFzGU43bCNY3VyVbmo9mZiMhnhDmSyVsjisegbqHKWEdPoF1Uir8nR7eovoZUluB11PcY1CBJjMglTKmQ4orod+upXItZfWcYbMv5O9zv7NQLT/WKMquBQatLh0KH9oy617Iii5I7nywblx1b2GrKw45GxVjvBHVo7uHvm2i9QvCDRqqaYAhFDZtk9/0224IPloSfmXalytn+QhvlEpVa1u4/sc6YilE4nVXnNIveYUqQh8gVsng4QXl8dR4MkcEJJN+Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=saj6RbwhlhBvT6LPcKxCkn5X+2jkmjG5z8L+yIhMlWM=; b=SUAC+XMnV3xteErmKi18IvcFaHwF7WkdZiwI6DxL/TBXe4wm31z9chE4JvlB9FNsJcYUreDi345YzFlPNvRRMBy53cLCvRq6vGvSwatiFEhqTv8WZC+P5HbptHvY4gH5C4ZTXtElAuwWlqnQyOGbzK1QWiVsu50rbDkWP0WtTpBIGwoCswslzgiF7qr7yx2lRfF/IiClFRoP0any6x3fOWy+JpkregUooeZDiBe6LeXW8WOLYsTNn4tJLatrV203RUlhR1744j2CnBebEHydLEWNFao822n+k35ldgcTgJHb98SAVIRzYRkAWYO9swy8T1DW4lJkSo4HB2XUTcQnjg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=saj6RbwhlhBvT6LPcKxCkn5X+2jkmjG5z8L+yIhMlWM=; b=kvjYohZv8hElmQ9ViKZY+6kR6No2wDv7gzZ957icvIGeqWZh5lbzN6EEF5nBTuVb3iT02r68RcuAbfv6uVKqaB33u8blzn0Wu9KUOPMI+4xDLkGyHKLvkBX7RCTONocRR5Cx+MFBsKhJdZx7EA+J/za3cjLLRGFVfHNTnDmhjMA4w+EoWyXFyUqaZv+x8oDTU4wBMd4oVm91czYd/cnoQiuQxhhcLe6iz9bq1V+qolUUyk7f9VsGbt431BTcfAVGoSqDuhf/2YoSGv1PA3EXIx6RclOH9x8kfzmbJan5pXmyWLq5ri8dwR1bz519vuzcKOz3RlV3z5AFSctOTXQdjg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:02 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:02 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 23 Dec 2024 14:41:38 +0800 Message-Id: <20241223064147.3961652-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 5138091a-6c8b-4f9c-6f07-08dd231d0be1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Cgl0YB/18CkS0CF+EjtkDGfZt/Xh5QUTlTm7SmR1ECQ4YshBk3/XOb/gEZnV1fn0ERcj+ZuG321c9WAQ35wdiWxzqumqpDRyk6SmiXnC7E74kuP7duZ/AnjWsJIjVQ/8qOjwvhEVErTNNYQmGJD7DT2o4dA7Tq0w9X2HIL3jco8wKrdaZQXdBdCfKhzjTKc/xbX5739M81kj8DdmkFeZjtrvar98CQXzXsuJSg5KVtN3zznRX53yckg+wDWRvpWyQ1wFDqV920INpHU+PVRlNEcEaucEia0RodlcRsIZqQ1TsaRRCCD5nFG95pI7jzblQHlF5cOU0fREUS4NRlwtdcRdYJqOUPkLpXsXNC2L3OVIn7pDNQpaJslT9D8p0Bh9QoiSL1JF2Y/YeHpHfBg6LMPsua/ugfs8TCL1+YTBdQpn45gx9pVjgz1mvjPVCIIDct/kua+2/hCfnDMRGWlXe7TJDHj9nKnZ5t6WqFXYdBrEjCeddinlz7Nfey5CUbiOkX3xs9/N3cqwekZxFS+LjU2+lhzKpOTFfV4LBWaZXPGUXQJPuX37sfr7deMJQoSV8ycvCzjF+MGiycEw0CqK0rQZX6EHkP10rfQMaq6tgNaqaDKdMQwcE0bOd7TI1Wooh/ezUozz2drhfAFHmrbMfhF0RiXPZ1u6wT3v3nur1TYIY2Ik4ZykzSv69Gf4ipL7vsm++3EFPRkBnqMOXkFUSriGKeLE/fZkjEygNU7kjTn/2/5ufrCgjEMKmiJEpv0wYjggsbVtH1R6XO0xcWMSHY01OX9oTyQm9CT4wbY2Kl6GGKwUcNNLaZ/ARWXm9SZDSuet6YCQeoM5mbcq01xjfcrgiVZ3ZFOU/svWNgmRuWM/zej7tYIQ4xtPE1KhWf3rv688nDkEYbHn+M0Bbb2EYfOojGnt4RrqzEKxFF9TpAMX1/8AVOth8p6a++80gk04rUA2vE09Gn221Mbgxi6RyjoBVSJYjmBWZPu2cLOT2vvS7FlL2PcvqmpAunbPfpbwv1GzmnlcK+kPJKHnH3FhHN8VK1iLQSfC07OiwMCHpkVU9Ft+CIi+/2mowTEa9gfAJaePyXviWHpfOuRdxQtf9J1gCys6tiXU78EPD96s2MZF3A7c7xt6AwkialPtOGyOaY2drUros5MNa6jIAczJPCKUau2+G7cvbnIPHdXVaDw500hCS47Y8zkdDyAlWkxAVh9m6Uwv5Kq+H0TZzgrAgTQw635+Q2NnfrUtgGwRZwt7meFuCprNNL6rPUePmOZZFTK5kY+1z5wbfifqOVkwsEpNy8y1a0XOxWqsvWr4qA1hkc1WFiR0iPyAUYXzOzT4K/cLt7hANaNcbh2STY5bh0DhsugZMb2T2ViypUdo6NW3OARhHZGrWAKUKzGpFdvx4LqLcJBrcyAOEJyEknKpuppNZE6hoh+VbxLof4tKuJ/cBgxhdU6/A985dl5XX5wM 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Uxa6wMU4rMmbjO0TtaQeiamdh+nyETR3ZQoZRHg71SmX0WbKrxBv2EAipPk9iWrm2R6DvPH96TUsiyYE3RHeJ/sQGIFnLy9AByjyzjNo4kz4dcSlfrN6i7AZ1f6AyPKi/qFQ8ZJU3BAZvtdXinxr6fgD2uki74pbaHHm2mRLFyI8sbJ3jg3g0NntCVDK5ei3CLVHeU40gQQaa1D5L4eV3KOioncDfvkD6j1wozgHLg8nERGFLxrzbQD5ZHCk28TtIndJvhs/RRmWniibBjD+e96ShemjoJAmYfXZj5bAzR1UnLXgPuf/LttN6sXwrmMEbqbLg9bg+4NSjzeQpiEYPSNo3ewS99YZwssp1pDo3cGwRoyHzt466DXEy9PMYup1zjmmVWNnj+k8jDZKNXwZrqMdj6dVYIB1akgyCCd1h/rDnrA/VU+hgCoTba3j8qapFKDM/uuyST4j42u0tq4GoZ3buNawICYzU/yXXa1c0+U+FAOcE0+ydIj3V2y/FK3B/S2WI5hHHE2IH87/l9dNfpvmrcUza4HN2uAR3AI+FT9tfHu+yR1VFl1tqzUlTLHREw9Xj3+r1uZ7dGi+IawjO4bu6X9heb/cejYyuhOWLvydr6gWTO2dB7cIe7YbBFSQD4puHpcb8YwDzMRlVy/OUkEa3cq4JanUJtNW5lSfhEzST3yOepKqB67vh7jJYGnv8eD3DkERJwJ7xIsB2UHuI+HRuMuZwtxM5d82tc6VC/SRkL3sgvIT+PDs2zxiaNdIdJZv7opGvMa/ywsR3V3UA5klZQpzIBvOg0PCz3+k4jPzFSgwHvDst4Qv4Hf+Byy5HDATViUnDZVSu1dEgMx4k8kcVSlUyG5pNl5nPdZo30gydCJg9RVIC30SU1PjgyJI8flBmGi+SpB0PIWlWDSnzjT4jL/6tYm+C8mVGKNRA6tuXX3j3+O93pDDWL8eKAjIk+mrD/s4zyz6KkTfncI7yLYSDbRKxYnqgVoM98lQoY2ZQwEtCPRCOrnXeunk5yFeW7/nVcqzC4iOx7chBdr76p5iJCvG7NVN8zVpqRFEFhEb6N55cBUo1mhPttee0MFIzhqIkBJTrIWjbsNqnX/l6mqyQrFMg2Z5A9XqLhnwhgJuJxY4Ad9avcchG1+qdgVyCvI4V9m9KYLGzDU8x8SonRj/RyLdR8f0V0XlA/XETQ05wFqCMG6H64QHNg+Tvw5MVlWt1+wz8+RpFitXXnGcHZ7waFMxEdJdMCThBLswceL/RYTygw+VybPTZe9IXE30/u8TT4jxoueznuv8h1gfHlXRu23EnXGfUxLUvrtl9PZfijtIWvWis2WjQihZ0sU/rkx3kVPxan7w5fkQRxCYdzy6h5a/SAYFVhhmECw76W/tMWtj4X5rm6mUZSeNpkQx0lfI3AnmgTtil1JZtgt3De9dysaG2RIFQKmiFC65HnxEiRQqdzPbvq4Lzrk4dPR51fw8HbbVgQ4/vNDagWX5Z9wPk6JvCuGxYywyDx1s02nm07DGSL+IamPnz+pF1PcTHg0y2SJjqyImRUlKFhChFM/Xz11XqngHdLTP6s9BcpIN8cqd32PAUypddPEbZssW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5138091a-6c8b-4f9c-6f07-08dd231d0be1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:02.0301 (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: fXvD8SBS/7lWFRVx8dV9e6CiGiBwlJ4NzS3jZpmG/fALx7cGAAMHrR/uwHlsVCNKufB8JYnuLeQP+MI00DY/Rg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller pixel engine consists of all processing units that operate in the AXI bus clock domain. Add drivers for ConstFrame, ExtDst, FetchLayer, FetchWarp and LayerBlend units, as well as a pixel engine driver, so that two displays with primary planes can be supported. The pixel engine driver and those unit drivers are components to be aggregated by a master registered in the upcoming DRM driver. Reviewed-by: Maxime Ripard Signed-off-by: Liu Ying --- v7: * Add kernel doc for struct dc_drm_device. (Dmitry) * Fix regmap_config definitions by correcting name field, correcting read ranges and setting max_register field. * Get instance numbers from device data(compatible strings) instead of OF aliases. * Collect Maxime's R-b tag. * Trivial tweaks. v6: * Fix build warning by expanding sizeof(fu->name) from 13 to 21. (kernel test robot) v5: * Replace .remove_new with .remove in dc-{cf,de,fl,fw,lb,pe}.c. (Uwe) * Fix commit message to state that pixel engine driver is a component driver instead of a master/aggregate driver. v4: * Use regmap to define register map for all registers. (Dmitry) * Use regmap APIs to access registers. (Dmitry) * Inline some small functions. (Dmitry) * Move dc_lb_blendcontrol() function call from KMS routine to initialization stage. (Dmitry) * Use devm_kzalloc() to drmm_kzalloc() to allocate dc_* data strutures. * Drop unnecessary private struct dc_*_priv. * Set suppress_bind_attrs driver flag to true to avoid unnecessary sys interfaces to bind/unbind the drivers. * Make some fetch unit operations be aware of fractional fetch unit index(0-7). v3: * No change. v2: * Use OF alias id to get instance id. drivers/gpu/drm/imx/dc/Makefile | 3 +- drivers/gpu/drm/imx/dc/dc-cf.c | 173 +++++++++++++++++ drivers/gpu/drm/imx/dc/dc-drv.c | 6 + drivers/gpu/drm/imx/dc/dc-drv.h | 9 + drivers/gpu/drm/imx/dc/dc-ed.c | 292 ++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fl.c | 182 ++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fu.c | 268 ++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fu.h | 129 +++++++++++++ drivers/gpu/drm/imx/dc/dc-fw.c | 223 ++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-lb.c | 324 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.c | 133 +++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.h | 107 +++++++++++ 12 files changed, 1848 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/imx/dc/dc-cf.c create mode 100644 drivers/gpu/drm/imx/dc/dc-ed.c create mode 100644 drivers/gpu/drm/imx/dc/dc-fl.c create mode 100644 drivers/gpu/drm/imx/dc/dc-fu.c create mode 100644 drivers/gpu/drm/imx/dc/dc-fu.h create mode 100644 drivers/gpu/drm/imx/dc/dc-fw.c create mode 100644 drivers/gpu/drm/imx/dc/dc-lb.c create mode 100644 drivers/gpu/drm/imx/dc/dc-pe.c create mode 100644 drivers/gpu/drm/imx/dc/dc-pe.h diff --git a/drivers/gpu/drm/imx/dc/Makefile b/drivers/gpu/drm/imx/dc/Makefile index 56de82d53d4d..2942ae6fd5bd 100644 --- a/drivers/gpu/drm/imx/dc/Makefile +++ b/drivers/gpu/drm/imx/dc/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -imx8-dc-drm-objs := dc-de.o dc-drv.o dc-fg.o dc-tc.o +imx8-dc-drm-objs := dc-cf.o dc-de.o dc-drv.o dc-ed.o dc-fg.o dc-fl.o dc-fu.o \ + dc-fw.o dc-lb.o dc-pe.o dc-tc.o obj-$(CONFIG_DRM_IMX8_DC) += imx8-dc-drm.o diff --git a/drivers/gpu/drm/imx/dc/dc-cf.c b/drivers/gpu/drm/imx/dc/dc-cf.c new file mode 100644 index 000000000000..55e6186533da --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-cf.c @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-pe.h" + +#define STATICCONTROL 0x8 + +#define FRAMEDIMENSIONS 0xc +#define HEIGHT(x) FIELD_PREP(GENMASK(29, 16), ((x) - 1)) +#define WIDTH(x) FIELD_PREP(GENMASK(13, 0), ((x) - 1)) + +#define CONSTANTCOLOR 0x10 +#define BLUE(x) FIELD_PREP(GENMASK(15, 8), (x)) + +enum dc_cf_id { + DC_CF0 = 0, + DC_CF1 = 1, + DC_CF4 = 4, + DC_CF5 = 5, +}; + +static const struct regmap_range dc_cf_regmap_ranges[] = { + regmap_reg_range(STATICCONTROL, CONSTANTCOLOR), +}; + +static const struct regmap_access_table dc_cf_regmap_access_table = { + .yes_ranges = dc_cf_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_cf_regmap_ranges), +}; + +static const struct regmap_config dc_cf_cfg_regmap_config = { + .name = "cfg", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_cf_regmap_access_table, + .rd_table = &dc_cf_regmap_access_table, + .max_register = CONSTANTCOLOR, +}; + +static inline void dc_cf_enable_shden(struct dc_cf *cf) +{ + regmap_write(cf->reg_cfg, STATICCONTROL, SHDEN); +} + +enum dc_link_id dc_cf_get_link_id(struct dc_cf *cf) +{ + return cf->link; +} + +void dc_cf_framedimensions(struct dc_cf *cf, unsigned int w, + unsigned int h) +{ + regmap_write(cf->reg_cfg, FRAMEDIMENSIONS, WIDTH(w) | HEIGHT(h)); +} + +void dc_cf_constantcolor_black(struct dc_cf *cf) +{ + regmap_write(cf->reg_cfg, CONSTANTCOLOR, 0); +} + +void dc_cf_constantcolor_blue(struct dc_cf *cf) +{ + regmap_write(cf->reg_cfg, CONSTANTCOLOR, BLUE(0xff)); +} + +void dc_cf_init(struct dc_cf *cf) +{ + dc_cf_enable_shden(cf); +} + +static int dc_cf_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe = dc_drm->pe; + void __iomem *base_cfg; + enum dc_cf_id id; + struct dc_cf *cf; + + cf = devm_kzalloc(dev, sizeof(*cf), GFP_KERNEL); + if (!cf) + return -ENOMEM; + + id = (enum dc_cf_id)(uintptr_t)device_get_match_data(dev); + + base_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(base_cfg)) + return PTR_ERR(base_cfg); + + cf->reg_cfg = devm_regmap_init_mmio(dev, base_cfg, + &dc_cf_cfg_regmap_config); + if (IS_ERR(cf->reg_cfg)) + return PTR_ERR(cf->reg_cfg); + + switch (id) { + case DC_CF0: + pe->cf_cont[0] = cf; + cf->link = LINK_ID_CONSTFRAME0; + break; + case DC_CF1: + pe->cf_cont[1] = cf; + cf->link = LINK_ID_CONSTFRAME1; + break; + case DC_CF4: + pe->cf_safe[0] = cf; + cf->link = LINK_ID_CONSTFRAME4; + break; + case DC_CF5: + pe->cf_safe[1] = cf; + cf->link = LINK_ID_CONSTFRAME5; + break; + } + + return 0; +} + +static const struct component_ops dc_cf_ops = { + .bind = dc_cf_bind, +}; + +static int dc_cf_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_cf_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_cf_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_cf_ops); +} + +static const struct of_device_id dc_cf_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-constframe0", + .data = (const void *)DC_CF0, }, + { .compatible = "fsl,imx8qxp-dc-constframe1", + .data = (const void *)DC_CF1, }, + { .compatible = "fsl,imx8qxp-dc-constframe4", + .data = (const void *)DC_CF4, }, + { .compatible = "fsl,imx8qxp-dc-constframe5", + .data = (const void *)DC_CF5, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_cf_dt_ids); + +struct platform_driver dc_cf_driver = { + .probe = dc_cf_probe, + .remove = dc_cf_remove, + .driver = { + .name = "imx8-dc-constframe", + .suppress_bind_attrs = true, + .of_match_table = dc_cf_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c index e5910a82dd4d..7c64acc863ad 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.c +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -9,8 +9,14 @@ #include "dc-drv.h" static struct platform_driver * const dc_drivers[] = { + &dc_cf_driver, &dc_de_driver, + &dc_ed_driver, &dc_fg_driver, + &dc_fl_driver, + &dc_fw_driver, + &dc_lb_driver, + &dc_pe_driver, &dc_tc_driver, }; diff --git a/drivers/gpu/drm/imx/dc/dc-drv.h b/drivers/gpu/drm/imx/dc/dc-drv.h index 23ef715f5cd1..e618a4228590 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -11,6 +11,7 @@ #include #include "dc-de.h" +#include "dc-pe.h" /** * struct dc_drm_device - DC specific drm_device @@ -20,10 +21,18 @@ struct dc_drm_device { struct drm_device base; /** @de: display engine list */ struct dc_de *de[DC_DISPLAYS]; + /** @pe: pixel engine */ + struct dc_pe *pe; }; +extern struct platform_driver dc_cf_driver; +extern struct platform_driver dc_ed_driver; extern struct platform_driver dc_de_driver; extern struct platform_driver dc_fg_driver; +extern struct platform_driver dc_fl_driver; +extern struct platform_driver dc_fw_driver; +extern struct platform_driver dc_lb_driver; +extern struct platform_driver dc_pe_driver; extern struct platform_driver dc_tc_driver; #endif /* __DC_DRV_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-ed.c b/drivers/gpu/drm/imx/dc/dc-ed.c new file mode 100644 index 000000000000..8a370b7e70f0 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ed.c @@ -0,0 +1,292 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-pe.h" + +#define PIXENGCFG_STATIC 0x8 +#define POWERDOWN BIT(4) +#define SYNC_MODE BIT(8) +#define SINGLE 0 +#define DIV_MASK GENMASK(23, 16) +#define DIV(x) FIELD_PREP(DIV_MASK, (x)) +#define DIV_RESET 0x80 + +#define PIXENGCFG_DYNAMIC 0xc + +#define PIXENGCFG_TRIGGER 0x14 +#define SYNC_TRIGGER BIT(0) + +#define STATICCONTROL 0x8 +#define KICK_MODE BIT(8) +#define EXTERNAL BIT(8) +#define PERFCOUNTMODE BIT(12) + +#define CONTROL 0xc +#define GAMMAAPPLYENABLE BIT(0) + +enum dc_ed_id { + DC_ED0 = 0, + DC_ED1 = 1, + DC_ED4 = 4, + DC_ED5 = 5, +}; + +static const struct regmap_range dc_ed_pec_regmap_write_ranges[] = { + regmap_reg_range(PIXENGCFG_STATIC, PIXENGCFG_STATIC), + regmap_reg_range(PIXENGCFG_DYNAMIC, PIXENGCFG_DYNAMIC), + regmap_reg_range(PIXENGCFG_TRIGGER, PIXENGCFG_TRIGGER), +}; + +static const struct regmap_access_table dc_ed_pec_regmap_write_table = { + .yes_ranges = dc_ed_pec_regmap_write_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ed_pec_regmap_write_ranges), +}; + +static const struct regmap_range dc_ed_pec_regmap_read_ranges[] = { + regmap_reg_range(PIXENGCFG_STATIC, PIXENGCFG_STATIC), + regmap_reg_range(PIXENGCFG_DYNAMIC, PIXENGCFG_DYNAMIC), +}; + +static const struct regmap_access_table dc_ed_pec_regmap_read_table = { + .yes_ranges = dc_ed_pec_regmap_read_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ed_pec_regmap_read_ranges), +}; + +static const struct regmap_range dc_ed_pec_regmap_volatile_ranges[] = { + regmap_reg_range(PIXENGCFG_TRIGGER, PIXENGCFG_TRIGGER), +}; + +static const struct regmap_access_table dc_ed_pec_regmap_volatile_table = { + .yes_ranges = dc_ed_pec_regmap_volatile_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ed_pec_regmap_volatile_ranges), +}; + +static const struct regmap_config dc_ed_pec_regmap_config = { + .name = "pec", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_ed_pec_regmap_write_table, + .rd_table = &dc_ed_pec_regmap_read_table, + .volatile_table = &dc_ed_pec_regmap_volatile_table, + .max_register = PIXENGCFG_TRIGGER, +}; + +static const struct regmap_range dc_ed_regmap_ranges[] = { + regmap_reg_range(STATICCONTROL, STATICCONTROL), + regmap_reg_range(CONTROL, CONTROL), +}; + +static const struct regmap_access_table dc_ed_regmap_access_table = { + .yes_ranges = dc_ed_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ed_regmap_ranges), +}; + +static const struct regmap_config dc_ed_cfg_regmap_config = { + .name = "cfg", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_ed_regmap_access_table, + .rd_table = &dc_ed_regmap_access_table, + .max_register = CONTROL, +}; + +static const enum dc_link_id src_sels[] = { + LINK_ID_NONE, + LINK_ID_CONSTFRAME0, + LINK_ID_CONSTFRAME1, + LINK_ID_CONSTFRAME4, + LINK_ID_CONSTFRAME5, + LINK_ID_LAYERBLEND3, + LINK_ID_LAYERBLEND2, + LINK_ID_LAYERBLEND1, + LINK_ID_LAYERBLEND0, +}; + +static inline void dc_ed_pec_enable_shden(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_pec, PIXENGCFG_STATIC, SHDEN, SHDEN); +} + +static inline void dc_ed_pec_poweron(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_pec, PIXENGCFG_STATIC, POWERDOWN, 0); +} + +static inline void dc_ed_pec_sync_mode_single(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_pec, PIXENGCFG_STATIC, SYNC_MODE, SINGLE); +} + +static inline void dc_ed_pec_div_reset(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_pec, PIXENGCFG_STATIC, DIV_MASK, + DIV(DIV_RESET)); +} + +void dc_ed_pec_src_sel(struct dc_ed *ed, enum dc_link_id src) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(src_sels); i++) { + if (src_sels[i] == src) { + regmap_write(ed->reg_pec, PIXENGCFG_DYNAMIC, src); + return; + } + } +} + +void dc_ed_pec_sync_trigger(struct dc_ed *ed) +{ + regmap_write(ed->reg_pec, PIXENGCFG_TRIGGER, SYNC_TRIGGER); +} + +static inline void dc_ed_enable_shden(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_cfg, STATICCONTROL, SHDEN, SHDEN); +} + +static inline void dc_ed_kick_mode_external(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_cfg, STATICCONTROL, KICK_MODE, EXTERNAL); +} + +static inline void dc_ed_disable_perfcountmode(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_cfg, STATICCONTROL, PERFCOUNTMODE, 0); +} + +static inline void dc_ed_disable_gamma_apply(struct dc_ed *ed) +{ + regmap_write_bits(ed->reg_cfg, CONTROL, GAMMAAPPLYENABLE, 0); +} + +void dc_ed_init(struct dc_ed *ed) +{ + dc_ed_pec_src_sel(ed, LINK_ID_NONE); + dc_ed_pec_enable_shden(ed); + dc_ed_pec_poweron(ed); + dc_ed_pec_sync_mode_single(ed); + dc_ed_pec_div_reset(ed); + dc_ed_enable_shden(ed); + dc_ed_disable_perfcountmode(ed); + dc_ed_kick_mode_external(ed); + dc_ed_disable_gamma_apply(ed); +} + +static int dc_ed_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe = dc_drm->pe; + void __iomem *base_pec; + void __iomem *base_cfg; + enum dc_ed_id id; + struct dc_ed *ed; + + ed = devm_kzalloc(dev, sizeof(*ed), GFP_KERNEL); + if (!ed) + return -ENOMEM; + + id = (enum dc_ed_id)(uintptr_t)device_get_match_data(dev); + + base_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(base_pec)) + return PTR_ERR(base_pec); + + base_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(base_cfg)) + return PTR_ERR(base_cfg); + + ed->reg_pec = devm_regmap_init_mmio(dev, base_pec, + &dc_ed_pec_regmap_config); + if (IS_ERR(ed->reg_pec)) + return PTR_ERR(ed->reg_pec); + + ed->reg_cfg = devm_regmap_init_mmio(dev, base_cfg, + &dc_ed_cfg_regmap_config); + if (IS_ERR(ed->reg_cfg)) + return PTR_ERR(ed->reg_cfg); + + ed->irq_shdld = platform_get_irq_byname(pdev, "shdload"); + if (ed->irq_shdld < 0) + return ed->irq_shdld; + + ed->dev = dev; + + switch (id) { + case DC_ED0: + pe->ed_cont[0] = ed; + break; + case DC_ED1: + pe->ed_cont[1] = ed; + break; + case DC_ED4: + pe->ed_safe[0] = ed; + break; + case DC_ED5: + pe->ed_safe[1] = ed; + break; + } + + return 0; +} + +static const struct component_ops dc_ed_ops = { + .bind = dc_ed_bind, +}; + +static int dc_ed_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_ed_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_ed_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_ed_ops); +} + +static const struct of_device_id dc_ed_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-extdst0", + .data = (const void *)DC_ED0, }, + { .compatible = "fsl,imx8qxp-dc-extdst1", + .data = (const void *)DC_ED1, }, + { .compatible = "fsl,imx8qxp-dc-extdst4", + .data = (const void *)DC_ED4, }, + { .compatible = "fsl,imx8qxp-dc-extdst5", + .data = (const void *)DC_ED5, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_ed_dt_ids); + +struct platform_driver dc_ed_driver = { + .probe = dc_ed_probe, + .remove = dc_ed_remove, + .driver = { + .name = "imx8-dc-extdst", + .suppress_bind_attrs = true, + .of_match_table = dc_ed_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-fl.c b/drivers/gpu/drm/imx/dc/dc-fl.c new file mode 100644 index 000000000000..81f4255709af --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fl.c @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-pe.h" + +#define BASEADDRESS(x) (0x10 + FRAC_OFFSET * (x)) +#define SOURCEBUFFERATTRIBUTES(x) (0x14 + FRAC_OFFSET * (x)) +#define SOURCEBUFFERDIMENSION(x) (0x18 + FRAC_OFFSET * (x)) +#define COLORCOMPONENTBITS(x) (0x1c + FRAC_OFFSET * (x)) +#define COLORCOMPONENTSHIFT(x) (0x20 + FRAC_OFFSET * (x)) +#define LAYEROFFSET(x) (0x24 + FRAC_OFFSET * (x)) +#define CLIPWINDOWOFFSET(x) (0x28 + FRAC_OFFSET * (x)) +#define CLIPWINDOWDIMENSIONS(x) (0x2c + FRAC_OFFSET * (x)) +#define CONSTANTCOLOR(x) (0x30 + FRAC_OFFSET * (x)) +#define LAYERPROPERTY(x) (0x34 + FRAC_OFFSET * (x)) +#define FRAMEDIMENSIONS 0x150 + +enum dc_fl_id { + DC_FL0, +}; + +struct dc_fl { + struct dc_fu fu; +}; + +static const struct regmap_range dc_fl_regmap_ranges[] = { + regmap_reg_range(STATICCONTROL, FRAMEDIMENSIONS), +}; + +static const struct regmap_access_table dc_fl_regmap_access_table = { + .yes_ranges = dc_fl_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fl_regmap_ranges), +}; + +static const struct regmap_config dc_fl_cfg_regmap_config = { + .name = "cfg", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_fl_regmap_access_table, + .rd_table = &dc_fl_regmap_access_table, + .max_register = FRAMEDIMENSIONS, +}; + +static void dc_fl_set_fmt(struct dc_fu *fu, enum dc_fu_frac frac, + const struct drm_format_info *format) +{ + u32 bits = 0, shifts = 0; + + dc_fu_set_src_bpp(fu, frac, format->cpp[0] * 8); + + regmap_write_bits(fu->reg_cfg, LAYERPROPERTY(frac), + YUVCONVERSIONMODE_MASK, + YUVCONVERSIONMODE(YUVCONVERSIONMODE_OFF)); + + dc_fu_get_pixel_format_bits(fu, format->format, &bits); + dc_fu_get_pixel_format_shifts(fu, format->format, &shifts); + + regmap_write(fu->reg_cfg, COLORCOMPONENTBITS(frac), bits); + regmap_write(fu->reg_cfg, COLORCOMPONENTSHIFT(frac), shifts); +} + +static void dc_fl_set_framedimensions(struct dc_fu *fu, int w, int h) +{ + regmap_write(fu->reg_cfg, FRAMEDIMENSIONS, + FRAMEWIDTH(w) | FRAMEHEIGHT(h)); +} + +static void dc_fl_init(struct dc_fu *fu) +{ + dc_fu_common_hw_init(fu); + dc_fu_shdldreq_sticky(fu, 0xff); +} + +static void dc_fl_set_ops(struct dc_fu *fu) +{ + memcpy(&fu->ops, &dc_fu_common_ops, sizeof(dc_fu_common_ops)); + fu->ops.init = dc_fl_init; + fu->ops.set_fmt = dc_fl_set_fmt; + fu->ops.set_framedimensions = dc_fl_set_framedimensions; +} + +static int dc_fl_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe = dc_drm->pe; + void __iomem *base_cfg; + enum dc_fl_id id; + struct dc_fl *fl; + struct dc_fu *fu; + int i; + + fl = devm_kzalloc(dev, sizeof(*fl), GFP_KERNEL); + if (!fl) + return -ENOMEM; + + id = (enum dc_fl_id)(uintptr_t)device_get_match_data(dev); + + fu = &fl->fu; + + base_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(base_cfg)) + return PTR_ERR(base_cfg); + + fu->reg_cfg = devm_regmap_init_mmio(dev, base_cfg, + &dc_fl_cfg_regmap_config); + if (IS_ERR(fu->reg_cfg)) + return PTR_ERR(fu->reg_cfg); + + fu->link_id = LINK_ID_FETCHLAYER0; + fu->id = DC_FETCHUNIT_FL0; + for (i = 0; i < DC_FETCHUNIT_FRAC_NUM; i++) { + fu->reg_baseaddr[i] = BASEADDRESS(i); + fu->reg_sourcebufferattributes[i] = SOURCEBUFFERATTRIBUTES(i); + fu->reg_sourcebufferdimension[i] = SOURCEBUFFERDIMENSION(i); + fu->reg_layeroffset[i] = LAYEROFFSET(i); + fu->reg_clipwindowoffset[i] = CLIPWINDOWOFFSET(i); + fu->reg_clipwindowdimensions[i] = CLIPWINDOWDIMENSIONS(i); + fu->reg_constantcolor[i] = CONSTANTCOLOR(i); + fu->reg_layerproperty[i] = LAYERPROPERTY(i); + } + snprintf(fu->name, sizeof(fu->name), "FetchLayer%d", id); + + dc_fl_set_ops(fu); + + pe->fu_disp[fu->id] = fu; + + return 0; +} + +static const struct component_ops dc_fl_ops = { + .bind = dc_fl_bind, +}; + +static int dc_fl_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_fl_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_fl_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_fl_ops); +} + +static const struct of_device_id dc_fl_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-fetchlayer0", + .data = (const void *)DC_FL0, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_fl_dt_ids); + +struct platform_driver dc_fl_driver = { + .probe = dc_fl_probe, + .remove = dc_fl_remove, + .driver = { + .name = "imx8-dc-fetchlayer", + .suppress_bind_attrs = true, + .of_match_table = dc_fl_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-fu.c b/drivers/gpu/drm/imx/dc/dc-fu.c new file mode 100644 index 000000000000..dda8e6c52be8 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fu.c @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include + +#include "dc-fu.h" +#include "dc-pe.h" + +/* STATICCONTROL */ +#define SHDLDREQSTICKY_MASK GENMASK(31, 24) +#define SHDLDREQSTICKY(x) FIELD_PREP(SHDLDREQSTICKY_MASK, (x)) +#define BASEADDRESSAUTOUPDATE_MASK GENMASK(23, 16) +#define BASEADDRESSAUTOUPDATE(x) FIELD_PREP(BASEADDRESSAUTOUPDATE_MASK, (x)) + +/* BURSTBUFFERMANAGEMENT */ +#define SETBURSTLENGTH_MASK GENMASK(12, 8) +#define SETBURSTLENGTH(x) FIELD_PREP(SETBURSTLENGTH_MASK, (x)) +#define SETNUMBUFFERS_MASK GENMASK(7, 0) +#define SETNUMBUFFERS(x) FIELD_PREP(SETNUMBUFFERS_MASK, (x)) +#define LINEMODE_MASK BIT(31) + +/* SOURCEBUFFERATTRIBUTES */ +#define BITSPERPIXEL_MASK GENMASK(21, 16) +#define BITSPERPIXEL(x) FIELD_PREP(BITSPERPIXEL_MASK, (x)) +#define STRIDE_MASK GENMASK(15, 0) +#define STRIDE(x) FIELD_PREP(STRIDE_MASK, (x) - 1) + +/* SOURCEBUFFERDIMENSION */ +#define LINEWIDTH(x) FIELD_PREP(GENMASK(13, 0), (x)) +#define LINECOUNT(x) FIELD_PREP(GENMASK(29, 16), (x)) + +/* LAYEROFFSET */ +#define LAYERXOFFSET(x) FIELD_PREP(GENMASK(14, 0), (x)) +#define LAYERYOFFSET(x) FIELD_PREP(GENMASK(30, 16), (x)) + +/* CLIPWINDOWOFFSET */ +#define CLIPWINDOWXOFFSET(x) FIELD_PREP(GENMASK(14, 0), (x)) +#define CLIPWINDOWYOFFSET(x) FIELD_PREP(GENMASK(30, 16), (x)) + +/* CLIPWINDOWDIMENSIONS */ +#define CLIPWINDOWWIDTH(x) FIELD_PREP(GENMASK(13, 0), (x) - 1) +#define CLIPWINDOWHEIGHT(x) FIELD_PREP(GENMASK(29, 16), (x) - 1) + +static const enum dc_fu_frac dc_fetchunit_all_fracs[] = { + DC_FETCHUNIT_FRAC0, DC_FETCHUNIT_FRAC1, + DC_FETCHUNIT_FRAC2, DC_FETCHUNIT_FRAC3, + DC_FETCHUNIT_FRAC4, DC_FETCHUNIT_FRAC5, + DC_FETCHUNIT_FRAC6, DC_FETCHUNIT_FRAC7 +}; + +enum dc_linemode { + /* + * Mandatory setting for operation in the Display Controller. + * Works also for Blit Engine with marginal performance impact. + */ + LINEMODE_DISPLAY = 0, +}; + +struct dc_fu_pixel_format { + u32 pixel_format; + u32 bits; + u32 shifts; +}; + +static const struct dc_fu_pixel_format pixel_formats[] = { + { + DRM_FORMAT_XRGB8888, + R_BITS(8) | G_BITS(8) | B_BITS(8) | A_BITS(0), + R_SHIFT(16) | G_SHIFT(8) | B_SHIFT(0) | A_SHIFT(0), + }, +}; + +void dc_fu_get_pixel_format_bits(struct dc_fu *fu, u32 format, u32 *bits) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(pixel_formats); i++) { + if (pixel_formats[i].pixel_format == format) { + *bits = pixel_formats[i].bits; + return; + } + } +} + +void +dc_fu_get_pixel_format_shifts(struct dc_fu *fu, u32 format, u32 *shifts) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(pixel_formats); i++) { + if (pixel_formats[i].pixel_format == format) { + *shifts = pixel_formats[i].shifts; + return; + } + } +} + +static inline void dc_fu_enable_shden(struct dc_fu *fu) +{ + regmap_write_bits(fu->reg_cfg, STATICCONTROL, SHDEN, SHDEN); +} + +static inline void dc_fu_baddr_autoupdate(struct dc_fu *fu, u8 layer_mask) +{ + regmap_write_bits(fu->reg_cfg, STATICCONTROL, + BASEADDRESSAUTOUPDATE_MASK, + BASEADDRESSAUTOUPDATE(layer_mask)); +} + +void dc_fu_shdldreq_sticky(struct dc_fu *fu, u8 layer_mask) +{ + regmap_write_bits(fu->reg_cfg, STATICCONTROL, SHDLDREQSTICKY_MASK, + SHDLDREQSTICKY(layer_mask)); +} + +static inline void dc_fu_set_linemode(struct dc_fu *fu, enum dc_linemode mode) +{ + regmap_write_bits(fu->reg_cfg, BURSTBUFFERMANAGEMENT, LINEMODE_MASK, + mode); +} + +static inline void dc_fu_set_numbuffers(struct dc_fu *fu, unsigned int num) +{ + regmap_write_bits(fu->reg_cfg, BURSTBUFFERMANAGEMENT, + SETNUMBUFFERS_MASK, SETNUMBUFFERS(num)); +} + +static void dc_fu_set_burstlength(struct dc_fu *fu, dma_addr_t baddr) +{ + unsigned int burst_size, burst_length; + + burst_size = 1 << __ffs(baddr); + burst_size = round_up(burst_size, 8); + burst_size = min(burst_size, 128U); + burst_length = burst_size / 8; + + regmap_write_bits(fu->reg_cfg, BURSTBUFFERMANAGEMENT, + SETBURSTLENGTH_MASK, SETBURSTLENGTH(burst_length)); +} + +static void dc_fu_set_baseaddress(struct dc_fu *fu, enum dc_fu_frac frac, + dma_addr_t baddr) +{ + regmap_write(fu->reg_cfg, fu->reg_baseaddr[frac], baddr); +} + +void dc_fu_set_src_bpp(struct dc_fu *fu, enum dc_fu_frac frac, unsigned int bpp) +{ + regmap_write_bits(fu->reg_cfg, fu->reg_sourcebufferattributes[frac], + BITSPERPIXEL_MASK, BITSPERPIXEL(bpp)); +} + +static void dc_fu_set_src_stride(struct dc_fu *fu, enum dc_fu_frac frac, + unsigned int stride) +{ + regmap_write_bits(fu->reg_cfg, fu->reg_sourcebufferattributes[frac], + STRIDE_MASK, STRIDE(stride)); +} + +static void dc_fu_set_src_buf_dimensions(struct dc_fu *fu, enum dc_fu_frac frac, + int w, int h) +{ + regmap_write(fu->reg_cfg, fu->reg_sourcebufferdimension[frac], + LINEWIDTH(w) | LINECOUNT(h)); +} + +static inline void dc_fu_layeroffset(struct dc_fu *fu, enum dc_fu_frac frac, + unsigned int x, unsigned int y) +{ + regmap_write(fu->reg_cfg, fu->reg_layeroffset[frac], + LAYERXOFFSET(x) | LAYERYOFFSET(y)); +} + +static inline void dc_fu_clipoffset(struct dc_fu *fu, enum dc_fu_frac frac, + unsigned int x, unsigned int y) +{ + regmap_write(fu->reg_cfg, fu->reg_clipwindowoffset[frac], + CLIPWINDOWXOFFSET(x) | CLIPWINDOWYOFFSET(y)); +} + +static inline void dc_fu_clipdimensions(struct dc_fu *fu, enum dc_fu_frac frac, + unsigned int w, unsigned int h) +{ + regmap_write(fu->reg_cfg, fu->reg_clipwindowdimensions[frac], + CLIPWINDOWWIDTH(w) | CLIPWINDOWHEIGHT(h)); +} + +static inline void +dc_fu_set_pixel_blend_mode(struct dc_fu *fu, enum dc_fu_frac frac) +{ + regmap_write(fu->reg_cfg, fu->reg_layerproperty[frac], 0); + regmap_write(fu->reg_cfg, fu->reg_constantcolor[frac], 0); +} + +static void dc_fu_enable_src_buf(struct dc_fu *fu, enum dc_fu_frac frac) +{ + regmap_write_bits(fu->reg_cfg, fu->reg_layerproperty[frac], + SOURCEBUFFERENABLE, SOURCEBUFFERENABLE); +} + +static void dc_fu_disable_src_buf(struct dc_fu *fu, enum dc_fu_frac frac) +{ + regmap_write_bits(fu->reg_cfg, fu->reg_layerproperty[frac], + SOURCEBUFFERENABLE, 0); + + if (fu->lb) { + dc_lb_pec_clken(fu->lb, CLKEN_DISABLE); + dc_lb_mode(fu->lb, LB_NEUTRAL); + } +} + +static void dc_fu_set_layerblend(struct dc_fu *fu, struct dc_lb *lb) +{ + fu->lb = lb; +} + +static enum dc_link_id dc_fu_get_link_id(struct dc_fu *fu) +{ + return fu->link_id; +} + +static const char *dc_fu_get_name(struct dc_fu *fu) +{ + return fu->name; +} + +const struct dc_fu_ops dc_fu_common_ops = { + .set_burstlength = dc_fu_set_burstlength, + .set_baseaddress = dc_fu_set_baseaddress, + .set_src_stride = dc_fu_set_src_stride, + .set_src_buf_dimensions = dc_fu_set_src_buf_dimensions, + .enable_src_buf = dc_fu_enable_src_buf, + .disable_src_buf = dc_fu_disable_src_buf, + .set_layerblend = dc_fu_set_layerblend, + .get_link_id = dc_fu_get_link_id, + .get_name = dc_fu_get_name, +}; + +const struct dc_fu_ops *dc_fu_get_ops(struct dc_fu *fu) +{ + return &fu->ops; +} + +void dc_fu_common_hw_init(struct dc_fu *fu) +{ + enum dc_fu_frac frac; + int i; + + dc_fu_baddr_autoupdate(fu, 0x0); + dc_fu_enable_shden(fu); + dc_fu_set_linemode(fu, LINEMODE_DISPLAY); + dc_fu_set_numbuffers(fu, 16); + + for (i = 0; i < ARRAY_SIZE(dc_fetchunit_all_fracs); i++) { + frac = dc_fetchunit_all_fracs[i]; + + dc_fu_layeroffset(fu, frac, 0, 0); + dc_fu_clipoffset(fu, frac, 0, 0); + dc_fu_clipdimensions(fu, frac, 1, 1); + dc_fu_disable_src_buf(fu, frac); + dc_fu_set_pixel_blend_mode(fu, frac); + } +} diff --git a/drivers/gpu/drm/imx/dc/dc-fu.h b/drivers/gpu/drm/imx/dc/dc-fu.h new file mode 100644 index 000000000000..cab71965964e --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fu.h @@ -0,0 +1,129 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_FETCHUNIT_H__ +#define __DC_FETCHUNIT_H__ + +#include +#include +#include +#include + +#include + +#include "dc-pe.h" + +#define FRAC_OFFSET 0x28 + +#define STATICCONTROL 0x8 +#define BURSTBUFFERMANAGEMENT 0xc + +/* COLORCOMPONENTBITS */ +#define R_BITS(x) FIELD_PREP_CONST(GENMASK(27, 24), (x)) +#define G_BITS(x) FIELD_PREP_CONST(GENMASK(19, 16), (x)) +#define B_BITS(x) FIELD_PREP_CONST(GENMASK(11, 8), (x)) +#define A_BITS(x) FIELD_PREP_CONST(GENMASK(3, 0), (x)) + +/* COLORCOMPONENTSHIFT */ +#define R_SHIFT(x) FIELD_PREP_CONST(GENMASK(28, 24), (x)) +#define G_SHIFT(x) FIELD_PREP_CONST(GENMASK(20, 16), (x)) +#define B_SHIFT(x) FIELD_PREP_CONST(GENMASK(12, 8), (x)) +#define A_SHIFT(x) FIELD_PREP_CONST(GENMASK(4, 0), (x)) + +/* LAYERPROPERTY */ +#define YUVCONVERSIONMODE_MASK GENMASK(18, 17) +#define YUVCONVERSIONMODE(x) FIELD_PREP(YUVCONVERSIONMODE_MASK, (x)) +#define SOURCEBUFFERENABLE BIT(31) + +/* FRAMEDIMENSIONS */ +#define FRAMEWIDTH(x) FIELD_PREP(GENMASK(13, 0), (x)) +#define FRAMEHEIGHT(x) FIELD_PREP(GENMASK(29, 16), (x)) + +/* CONTROL */ +#define INPUTSELECT_MASK GENMASK(4, 3) +#define INPUTSELECT(x) FIELD_PREP(INPUTSELECT_MASK, (x)) +#define RASTERMODE_MASK GENMASK(2, 0) +#define RASTERMODE(x) FIELD_PREP(RASTERMODE_MASK, (x)) + +enum dc_yuvconversionmode { + YUVCONVERSIONMODE_OFF, +}; + +enum dc_inputselect { + INPUTSELECT_INACTIVE, +}; + +enum dc_rastermode { + RASTERMODE_NORMAL, +}; + +enum { + DC_FETCHUNIT_FL0, + DC_FETCHUNIT_FW2, +}; + +enum dc_fu_frac { + DC_FETCHUNIT_FRAC0, + DC_FETCHUNIT_FRAC1, + DC_FETCHUNIT_FRAC2, + DC_FETCHUNIT_FRAC3, + DC_FETCHUNIT_FRAC4, + DC_FETCHUNIT_FRAC5, + DC_FETCHUNIT_FRAC6, + DC_FETCHUNIT_FRAC7, + DC_FETCHUNIT_FRAC_NUM, +}; + +struct dc_fu; +struct dc_lb; + +struct dc_fu_ops { + void (*init)(struct dc_fu *fu); + void (*set_burstlength)(struct dc_fu *fu, dma_addr_t baddr); + void (*set_baseaddress)(struct dc_fu *fu, enum dc_fu_frac frac, + dma_addr_t baddr); + void (*set_src_stride)(struct dc_fu *fu, enum dc_fu_frac frac, + unsigned int stride); + void (*set_src_buf_dimensions)(struct dc_fu *fu, enum dc_fu_frac frac, + int w, int h); + void (*set_fmt)(struct dc_fu *fu, enum dc_fu_frac frac, + const struct drm_format_info *format); + void (*enable_src_buf)(struct dc_fu *fu, enum dc_fu_frac frac); + void (*disable_src_buf)(struct dc_fu *fu, enum dc_fu_frac frac); + void (*set_framedimensions)(struct dc_fu *fu, int w, int h); + void (*set_layerblend)(struct dc_fu *fu, struct dc_lb *lb); + enum dc_link_id (*get_link_id)(struct dc_fu *fu); + const char *(*get_name)(struct dc_fu *fu); +}; + +struct dc_fu { + struct regmap *reg_pec; + struct regmap *reg_cfg; + char name[21]; + u32 reg_baseaddr[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_sourcebufferattributes[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_sourcebufferdimension[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_layeroffset[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_clipwindowoffset[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_clipwindowdimensions[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_constantcolor[DC_FETCHUNIT_FRAC_NUM]; + u32 reg_layerproperty[DC_FETCHUNIT_FRAC_NUM]; + unsigned int id; + enum dc_link_id link_id; + struct dc_fu_ops ops; + struct dc_lb *lb; +}; + +extern const struct dc_fu_ops dc_fu_common_ops; + +void dc_fu_get_pixel_format_bits(struct dc_fu *fu, u32 format, u32 *bits); +void dc_fu_get_pixel_format_shifts(struct dc_fu *fu, u32 format, u32 *shifts); +void dc_fu_shdldreq_sticky(struct dc_fu *fu, u8 layer_mask); +void dc_fu_set_src_bpp(struct dc_fu *fu, enum dc_fu_frac frac, unsigned int bpp); +void dc_fu_common_hw_init(struct dc_fu *fu); + +const struct dc_fu_ops *dc_fu_get_ops(struct dc_fu *fu); + +#endif /* __DC_FETCHUNIT_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-fw.c b/drivers/gpu/drm/imx/dc/dc-fw.c new file mode 100644 index 000000000000..6800f6c9f785 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fw.c @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-pe.h" + +#define PIXENGCFG_DYNAMIC 0x8 + +#define BASEADDRESS(x) (0x10 + FRAC_OFFSET * (x)) +#define SOURCEBUFFERATTRIBUTES(x) (0x14 + FRAC_OFFSET * (x)) +#define SOURCEBUFFERDIMENSION(x) (0x18 + FRAC_OFFSET * (x)) +#define COLORCOMPONENTBITS(x) (0x1c + FRAC_OFFSET * (x)) +#define COLORCOMPONENTSHIFT(x) (0x20 + FRAC_OFFSET * (x)) +#define LAYEROFFSET(x) (0x24 + FRAC_OFFSET * (x)) +#define CLIPWINDOWOFFSET(x) (0x28 + FRAC_OFFSET * (x)) +#define CLIPWINDOWDIMENSIONS(x) (0x2c + FRAC_OFFSET * (x)) +#define CONSTANTCOLOR(x) (0x30 + FRAC_OFFSET * (x)) +#define LAYERPROPERTY(x) (0x34 + FRAC_OFFSET * (x)) +#define FRAMEDIMENSIONS 0x150 +#define CONTROL 0x170 + +enum dc_fw_id { + DC_FW2 = 2, + DC_FW9 = 9, +}; + +struct dc_fw { + struct dc_fu fu; +}; + +static const struct regmap_range dc_fw_pec_regmap_access_ranges[] = { + regmap_reg_range(PIXENGCFG_DYNAMIC, PIXENGCFG_DYNAMIC), +}; + +static const struct regmap_access_table dc_fw_pec_regmap_access_table = { + .yes_ranges = dc_fw_pec_regmap_access_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fw_pec_regmap_access_ranges), +}; + +static const struct regmap_config dc_fw_pec_regmap_config = { + .name = "pec", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_fw_pec_regmap_access_table, + .rd_table = &dc_fw_pec_regmap_access_table, + .max_register = PIXENGCFG_DYNAMIC, +}; + +static const struct regmap_range dc_fw_regmap_ranges[] = { + regmap_reg_range(STATICCONTROL, FRAMEDIMENSIONS), + regmap_reg_range(CONTROL, CONTROL), +}; + +static const struct regmap_access_table dc_fw_regmap_access_table = { + .yes_ranges = dc_fw_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fw_regmap_ranges), +}; + +static const struct regmap_config dc_fw_cfg_regmap_config = { + .name = "cfg", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_fw_regmap_access_table, + .rd_table = &dc_fw_regmap_access_table, + .max_register = CONTROL, +}; + +static void dc_fw_set_fmt(struct dc_fu *fu, enum dc_fu_frac frac, + const struct drm_format_info *format) +{ + u32 bits = 0, shifts = 0; + + dc_fu_set_src_bpp(fu, frac, format->cpp[0] * 8); + + regmap_write_bits(fu->reg_cfg, CONTROL, INPUTSELECT_MASK, + INPUTSELECT(INPUTSELECT_INACTIVE)); + regmap_write_bits(fu->reg_cfg, CONTROL, RASTERMODE_MASK, + RASTERMODE(RASTERMODE_NORMAL)); + + regmap_write_bits(fu->reg_cfg, LAYERPROPERTY(frac), + YUVCONVERSIONMODE_MASK, + YUVCONVERSIONMODE(YUVCONVERSIONMODE_OFF)); + + dc_fu_get_pixel_format_bits(fu, format->format, &bits); + dc_fu_get_pixel_format_shifts(fu, format->format, &shifts); + + regmap_write(fu->reg_cfg, COLORCOMPONENTBITS(frac), bits); + regmap_write(fu->reg_cfg, COLORCOMPONENTSHIFT(frac), shifts); +} + +static void dc_fw_set_framedimensions(struct dc_fu *fu, int w, int h) +{ + regmap_write(fu->reg_cfg, FRAMEDIMENSIONS, + FRAMEWIDTH(w) | FRAMEHEIGHT(h)); +} + +static void dc_fw_init(struct dc_fu *fu) +{ + regmap_write(fu->reg_pec, PIXENGCFG_DYNAMIC, LINK_ID_NONE); + dc_fu_common_hw_init(fu); + dc_fu_shdldreq_sticky(fu, 0xff); +} + +static void dc_fw_set_ops(struct dc_fu *fu) +{ + memcpy(&fu->ops, &dc_fu_common_ops, sizeof(dc_fu_common_ops)); + fu->ops.init = dc_fw_init; + fu->ops.set_fmt = dc_fw_set_fmt; + fu->ops.set_framedimensions = dc_fw_set_framedimensions; +} + +static int dc_fw_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe = dc_drm->pe; + void __iomem *base_pec; + void __iomem *base_cfg; + enum dc_fw_id id; + struct dc_fw *fw; + struct dc_fu *fu; + int i; + + fw = devm_kzalloc(dev, sizeof(*fw), GFP_KERNEL); + if (!fw) + return -ENOMEM; + + id = (enum dc_fw_id)(uintptr_t)device_get_match_data(dev); + + fu = &fw->fu; + + base_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(base_pec)) + return PTR_ERR(base_pec); + + base_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(base_cfg)) + return PTR_ERR(base_cfg); + + fu->reg_pec = devm_regmap_init_mmio(dev, base_pec, + &dc_fw_pec_regmap_config); + if (IS_ERR(fu->reg_pec)) + return PTR_ERR(fu->reg_pec); + + fu->reg_cfg = devm_regmap_init_mmio(dev, base_cfg, + &dc_fw_cfg_regmap_config); + if (IS_ERR(fu->reg_cfg)) + return PTR_ERR(fu->reg_cfg); + + fu->link_id = LINK_ID_FETCHWARP2; + fu->id = DC_FETCHUNIT_FW2; + for (i = 0; i < DC_FETCHUNIT_FRAC_NUM; i++) { + fu->reg_baseaddr[i] = BASEADDRESS(i); + fu->reg_sourcebufferattributes[i] = SOURCEBUFFERATTRIBUTES(i); + fu->reg_sourcebufferdimension[i] = SOURCEBUFFERDIMENSION(i); + fu->reg_layeroffset[i] = LAYEROFFSET(i); + fu->reg_clipwindowoffset[i] = CLIPWINDOWOFFSET(i); + fu->reg_clipwindowdimensions[i] = CLIPWINDOWDIMENSIONS(i); + fu->reg_constantcolor[i] = CONSTANTCOLOR(i); + fu->reg_layerproperty[i] = LAYERPROPERTY(i); + } + snprintf(fu->name, sizeof(fu->name), "FetchWarp%d", id); + + dc_fw_set_ops(fu); + + pe->fu_disp[fu->id] = fu; + + return 0; +} + +static const struct component_ops dc_fw_ops = { + .bind = dc_fw_bind, +}; + +static int dc_fw_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_fw_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_fw_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_fw_ops); +} + +static const struct of_device_id dc_fw_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-fetchwarp2", + .data = (const void *)DC_FW2, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_fw_dt_ids); + +struct platform_driver dc_fw_driver = { + .probe = dc_fw_probe, + .remove = dc_fw_remove, + .driver = { + .name = "imx8-dc-fetchwarp", + .suppress_bind_attrs = true, + .of_match_table = dc_fw_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-lb.c b/drivers/gpu/drm/imx/dc/dc-lb.c new file mode 100644 index 000000000000..7bac6cf4ee48 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-lb.c @@ -0,0 +1,324 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-drv.h" +#include "dc-pe.h" + +#define PIXENGCFG_DYNAMIC 0x8 +#define PIXENGCFG_DYNAMIC_PRIM_SEL_MASK GENMASK(5, 0) +#define PIXENGCFG_DYNAMIC_PRIM_SEL(x) \ + FIELD_PREP(PIXENGCFG_DYNAMIC_PRIM_SEL_MASK, (x)) +#define PIXENGCFG_DYNAMIC_SEC_SEL_MASK GENMASK(13, 8) +#define PIXENGCFG_DYNAMIC_SEC_SEL(x) \ + FIELD_PREP(PIXENGCFG_DYNAMIC_SEC_SEL_MASK, (x)) + +#define STATICCONTROL 0x8 +#define SHDTOKSEL_MASK GENMASK(4, 3) +#define SHDTOKSEL(x) FIELD_PREP(SHDTOKSEL_MASK, (x)) +#define SHDLDSEL_MASK GENMASK(2, 1) +#define SHDLDSEL(x) FIELD_PREP(SHDLDSEL_MASK, (x)) + +#define CONTROL 0xc +#define CTRL_MODE_MASK BIT(0) +#define CTRL_MODE(x) FIELD_PREP(CTRL_MODE_MASK, (x)) + +#define BLENDCONTROL 0x10 +#define ALPHA_MASK GENMASK(23, 16) +#define ALPHA(x) FIELD_PREP(ALPHA_MASK, (x)) +#define PRIM_C_BLD_FUNC_MASK GENMASK(2, 0) +#define PRIM_C_BLD_FUNC(x) \ + FIELD_PREP(PRIM_C_BLD_FUNC_MASK, (x)) +#define SEC_C_BLD_FUNC_MASK GENMASK(6, 4) +#define SEC_C_BLD_FUNC(x) \ + FIELD_PREP(SEC_C_BLD_FUNC_MASK, (x)) +#define PRIM_A_BLD_FUNC_MASK GENMASK(10, 8) +#define PRIM_A_BLD_FUNC(x) \ + FIELD_PREP(PRIM_A_BLD_FUNC_MASK, (x)) +#define SEC_A_BLD_FUNC_MASK GENMASK(14, 12) +#define SEC_A_BLD_FUNC(x) \ + FIELD_PREP(SEC_A_BLD_FUNC_MASK, (x)) + +#define POSITION 0x14 +#define XPOS_MASK GENMASK(15, 0) +#define XPOS(x) FIELD_PREP(XPOS_MASK, (x)) +#define YPOS_MASK GENMASK(31, 16) +#define YPOS(x) FIELD_PREP(YPOS_MASK, (x)) + +enum dc_lb_blend_func { + DC_LAYERBLEND_BLEND_ZERO, + DC_LAYERBLEND_BLEND_ONE, + DC_LAYERBLEND_BLEND_PRIM_ALPHA, + DC_LAYERBLEND_BLEND_ONE_MINUS_PRIM_ALPHA, + DC_LAYERBLEND_BLEND_SEC_ALPHA, + DC_LAYERBLEND_BLEND_ONE_MINUS_SEC_ALPHA, + DC_LAYERBLEND_BLEND_CONST_ALPHA, + DC_LAYERBLEND_BLEND_ONE_MINUS_CONST_ALPHA, +}; + +enum dc_lb_shadow_sel { + BOTH = 0x2, +}; + +static const struct regmap_range dc_lb_pec_regmap_access_ranges[] = { + regmap_reg_range(PIXENGCFG_DYNAMIC, PIXENGCFG_DYNAMIC), +}; + +static const struct regmap_access_table dc_lb_pec_regmap_access_table = { + .yes_ranges = dc_lb_pec_regmap_access_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_lb_pec_regmap_access_ranges), +}; + +static const struct regmap_config dc_lb_pec_regmap_config = { + .name = "pec", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_lb_pec_regmap_access_table, + .rd_table = &dc_lb_pec_regmap_access_table, + .max_register = PIXENGCFG_DYNAMIC, +}; + +static const struct regmap_range dc_lb_regmap_ranges[] = { + regmap_reg_range(STATICCONTROL, POSITION), +}; + +static const struct regmap_access_table dc_lb_regmap_access_table = { + .yes_ranges = dc_lb_regmap_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_lb_regmap_ranges), +}; + +static const struct regmap_config dc_lb_cfg_regmap_config = { + .name = "cfg", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_lb_regmap_access_table, + .rd_table = &dc_lb_regmap_access_table, + .max_register = POSITION, +}; + +static const enum dc_link_id lb_links[] = { + LINK_ID_LAYERBLEND0, + LINK_ID_LAYERBLEND1, + LINK_ID_LAYERBLEND2, + LINK_ID_LAYERBLEND3, +}; + +static const enum dc_link_id prim_sels[] = { + /* common options */ + LINK_ID_NONE, + LINK_ID_CONSTFRAME0, + LINK_ID_CONSTFRAME1, + LINK_ID_CONSTFRAME4, + LINK_ID_CONSTFRAME5, + /* + * special options: + * layerblend(n) has n special options, + * from layerblend0 to layerblend(n - 1), e.g., + * layerblend3 has 3 special options - + * layerblend0/1/2. + */ + LINK_ID_LAYERBLEND0, + LINK_ID_LAYERBLEND1, + LINK_ID_LAYERBLEND2, + LINK_ID_LAYERBLEND3, +}; + +static const enum dc_link_id sec_sels[] = { + LINK_ID_NONE, + LINK_ID_FETCHWARP2, + LINK_ID_FETCHLAYER0, +}; + +enum dc_link_id dc_lb_get_link_id(struct dc_lb *lb) +{ + return lb->link; +} + +void dc_lb_pec_dynamic_prim_sel(struct dc_lb *lb, enum dc_link_id prim) +{ + int fixed_sels_num = ARRAY_SIZE(prim_sels) - 4; + int i; + + for (i = 0; i < fixed_sels_num + lb->id; i++) { + if (prim_sels[i] == prim) { + regmap_write_bits(lb->reg_pec, PIXENGCFG_DYNAMIC, + PIXENGCFG_DYNAMIC_PRIM_SEL_MASK, + PIXENGCFG_DYNAMIC_PRIM_SEL(prim)); + return; + } + } +} + +void dc_lb_pec_dynamic_sec_sel(struct dc_lb *lb, enum dc_link_id sec) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(sec_sels); i++) { + if (sec_sels[i] == sec) { + regmap_write_bits(lb->reg_pec, PIXENGCFG_DYNAMIC, + PIXENGCFG_DYNAMIC_SEC_SEL_MASK, + PIXENGCFG_DYNAMIC_SEC_SEL(sec)); + return; + } + } +} + +void dc_lb_pec_clken(struct dc_lb *lb, enum dc_pec_clken clken) +{ + regmap_write_bits(lb->reg_pec, PIXENGCFG_DYNAMIC, CLKEN_MASK, + CLKEN(clken)); +} + +static inline void dc_lb_enable_shden(struct dc_lb *lb) +{ + regmap_write_bits(lb->reg_cfg, STATICCONTROL, SHDEN, SHDEN); +} + +static inline void dc_lb_shdtoksel(struct dc_lb *lb, enum dc_lb_shadow_sel sel) +{ + regmap_write_bits(lb->reg_cfg, STATICCONTROL, SHDTOKSEL_MASK, + SHDTOKSEL(sel)); +} + +static inline void dc_lb_shdldsel(struct dc_lb *lb, enum dc_lb_shadow_sel sel) +{ + regmap_write_bits(lb->reg_cfg, STATICCONTROL, SHDLDSEL_MASK, + SHDLDSEL(sel)); +} + +void dc_lb_mode(struct dc_lb *lb, enum dc_lb_mode mode) +{ + regmap_write_bits(lb->reg_cfg, CONTROL, CTRL_MODE_MASK, mode); +} + +static inline void dc_lb_blendcontrol(struct dc_lb *lb) +{ + u32 val = PRIM_A_BLD_FUNC(DC_LAYERBLEND_BLEND_ZERO) | + SEC_A_BLD_FUNC(DC_LAYERBLEND_BLEND_ZERO) | + PRIM_C_BLD_FUNC(DC_LAYERBLEND_BLEND_ZERO) | + SEC_C_BLD_FUNC(DC_LAYERBLEND_BLEND_CONST_ALPHA) | + ALPHA(DRM_BLEND_ALPHA_OPAQUE >> 8); + + regmap_write(lb->reg_cfg, BLENDCONTROL, val); +} + +void dc_lb_position(struct dc_lb *lb, int x, int y) +{ + regmap_write(lb->reg_cfg, POSITION, XPOS(x) | YPOS(y)); +} + +enum dc_lb_id dc_lb_get_id(struct dc_lb *lb) +{ + return lb->id; +} + +void dc_lb_init(struct dc_lb *lb) +{ + dc_lb_pec_dynamic_prim_sel(lb, LINK_ID_NONE); + dc_lb_pec_dynamic_sec_sel(lb, LINK_ID_NONE); + dc_lb_pec_clken(lb, CLKEN_DISABLE); + dc_lb_shdldsel(lb, BOTH); + dc_lb_shdtoksel(lb, BOTH); + dc_lb_blendcontrol(lb); + dc_lb_enable_shden(lb); +} + +static int dc_lb_bind(struct device *dev, struct device *master, void *data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe = dc_drm->pe; + void __iomem *base_pec; + void __iomem *base_cfg; + struct dc_lb *lb; + + lb = devm_kzalloc(dev, sizeof(*lb), GFP_KERNEL); + if (!lb) + return -ENOMEM; + + lb->id = (enum dc_lb_id)(uintptr_t)device_get_match_data(dev); + + base_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(base_pec)) + return PTR_ERR(base_pec); + + base_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(base_cfg)) + return PTR_ERR(base_cfg); + + lb->reg_pec = devm_regmap_init_mmio(dev, base_pec, + &dc_lb_pec_regmap_config); + if (IS_ERR(lb->reg_pec)) + return PTR_ERR(lb->reg_pec); + + lb->reg_cfg = devm_regmap_init_mmio(dev, base_cfg, + &dc_lb_cfg_regmap_config); + if (IS_ERR(lb->reg_cfg)) + return PTR_ERR(lb->reg_cfg); + + lb->link = lb_links[lb->id]; + + pe->lb[lb->id] = lb; + + return 0; +} + +static const struct component_ops dc_lb_ops = { + .bind = dc_lb_bind, +}; + +static int dc_lb_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_lb_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_lb_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_lb_ops); +} + +static const struct of_device_id dc_lb_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-layerblend0", + .data = (const void *)DC_LB0, }, + { .compatible = "fsl,imx8qxp-dc-layerblend1", + .data = (const void *)DC_LB1, }, + { .compatible = "fsl,imx8qxp-dc-layerblend2", + .data = (const void *)DC_LB2, }, + { .compatible = "fsl,imx8qxp-dc-layerblend3", + .data = (const void *)DC_LB3, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_lb_dt_ids); + +struct platform_driver dc_lb_driver = { + .probe = dc_lb_probe, + .remove = dc_lb_remove, + .driver = { + .name = "imx8-dc-layerblend", + .suppress_bind_attrs = true, + .of_match_table = dc_lb_dt_ids, + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-pe.c b/drivers/gpu/drm/imx/dc/dc-pe.c new file mode 100644 index 000000000000..459fc3823953 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-pe.c @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-pe.h" + +static int dc_pe_bind(struct device *dev, struct device *master, void *data) +{ + struct dc_drm_device *dc_drm = data; + struct dc_pe *pe; + int ret; + + pe = devm_kzalloc(dev, sizeof(*pe), GFP_KERNEL); + if (!pe) + return -ENOMEM; + + pe->clk_axi = devm_clk_get(dev, NULL); + if (IS_ERR(pe->clk_axi)) + return dev_err_probe(dev, PTR_ERR(pe->clk_axi), + "failed to get AXI clock\n"); + + pe->dev = dev; + + dev_set_drvdata(dev, pe); + + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; + + dc_drm->pe = pe; + + return 0; +} + +static const struct component_ops dc_pe_ops = { + .bind = dc_pe_bind, +}; + +static int dc_pe_probe(struct platform_device *pdev) +{ + int ret; + + ret = devm_of_platform_populate(&pdev->dev); + if (ret < 0) + return ret; + + ret = component_add(&pdev->dev, &dc_pe_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_pe_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_pe_ops); +} + +static int dc_pe_runtime_suspend(struct device *dev) +{ + struct dc_pe *pe = dev_get_drvdata(dev); + + clk_disable_unprepare(pe->clk_axi); + + return 0; +} + +static int dc_pe_runtime_resume(struct device *dev) +{ + struct dc_pe *pe = dev_get_drvdata(dev); + int i, ret; + + ret = clk_prepare_enable(pe->clk_axi); + if (ret) { + dev_err(dev, "failed to enable AXI clock: %d\n", ret); + return ret; + } + + for (i = 0; i < ARRAY_SIZE(pe->cf_safe); i++) + dc_cf_init(pe->cf_safe[i]); + + for (i = 0; i < ARRAY_SIZE(pe->cf_cont); i++) + dc_cf_init(pe->cf_cont[i]); + + for (i = 0; i < ARRAY_SIZE(pe->ed_safe); i++) + dc_ed_init(pe->ed_safe[i]); + + for (i = 0; i < ARRAY_SIZE(pe->ed_cont); i++) + dc_ed_init(pe->ed_cont[i]); + + for (i = 0; i < ARRAY_SIZE(pe->fu_disp); i++) + pe->fu_disp[i]->ops.init(pe->fu_disp[i]); + + for (i = 0; i < ARRAY_SIZE(pe->lb); i++) + dc_lb_init(pe->lb[i]); + + return 0; +} + +static const struct dev_pm_ops dc_pe_pm_ops = { + RUNTIME_PM_OPS(dc_pe_runtime_suspend, dc_pe_runtime_resume, NULL) +}; + +static const struct of_device_id dc_pe_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-pixel-engine", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_pe_dt_ids); + +struct platform_driver dc_pe_driver = { + .probe = dc_pe_probe, + .remove = dc_pe_remove, + .driver = { + .name = "imx8-dc-pixel-engine", + .suppress_bind_attrs = true, + .of_match_table = dc_pe_dt_ids, + .pm = pm_sleep_ptr(&dc_pe_pm_ops), + }, +}; diff --git a/drivers/gpu/drm/imx/dc/dc-pe.h b/drivers/gpu/drm/imx/dc/dc-pe.h new file mode 100644 index 000000000000..7951c2d85441 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-pe.h @@ -0,0 +1,107 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_PIXEL_ENGINE_H__ +#define __DC_PIXEL_ENGINE_H__ + +#include +#include +#include + +#include "dc-de.h" + +#define SHDEN BIT(0) + +#define CLKEN_MASK_SHIFT 24 +#define CLKEN_MASK (0x3 << CLKEN_MASK_SHIFT) +#define CLKEN(n) ((n) << CLKEN_MASK_SHIFT) + +#define DC_DISP_FU_CNT 2 + +enum dc_link_id { + LINK_ID_NONE = 0x00, + LINK_ID_CONSTFRAME0 = 0x0c, + LINK_ID_CONSTFRAME4 = 0x0e, + LINK_ID_CONSTFRAME1 = 0x10, + LINK_ID_CONSTFRAME5 = 0x12, + LINK_ID_FETCHWARP2 = 0x14, + LINK_ID_FETCHLAYER0 = 0x1a, + LINK_ID_LAYERBLEND0 = 0x21, + LINK_ID_LAYERBLEND1 = 0x22, + LINK_ID_LAYERBLEND2 = 0x23, + LINK_ID_LAYERBLEND3 = 0x24, +}; + +enum dc_lb_id { + DC_LB0, + DC_LB1, + DC_LB2, + DC_LB3, + DC_LB_CNT +}; + +enum dc_lb_mode { + LB_NEUTRAL, /* Output is same as primary input. */ + LB_BLEND, +}; + +enum dc_pec_clken { + CLKEN_DISABLE, + CLKEN_AUTOMATIC, +}; + +struct dc_cf { + struct regmap *reg_cfg; + enum dc_link_id link; +}; + +struct dc_ed { + struct device *dev; + struct regmap *reg_pec; + struct regmap *reg_cfg; + int irq_shdld; +}; + +struct dc_lb { + struct regmap *reg_pec; + struct regmap *reg_cfg; + int id; + enum dc_link_id link; +}; + +struct dc_pe { + struct device *dev; + struct clk *clk_axi; + struct dc_cf *cf_safe[DC_DISPLAYS]; + struct dc_cf *cf_cont[DC_DISPLAYS]; + struct dc_ed *ed_safe[DC_DISPLAYS]; + struct dc_ed *ed_cont[DC_DISPLAYS]; + struct dc_fu *fu_disp[DC_DISP_FU_CNT]; + struct dc_lb *lb[DC_LB_CNT]; +}; + +/* Constant Frame Unit */ +enum dc_link_id dc_cf_get_link_id(struct dc_cf *cf); +void dc_cf_framedimensions(struct dc_cf *cf, unsigned int w, unsigned int h); +void dc_cf_constantcolor_black(struct dc_cf *cf); +void dc_cf_constantcolor_blue(struct dc_cf *cf); +void dc_cf_init(struct dc_cf *cf); + +/* External Destination Unit */ +void dc_ed_pec_src_sel(struct dc_ed *ed, enum dc_link_id src); +void dc_ed_pec_sync_trigger(struct dc_ed *ed); +void dc_ed_init(struct dc_ed *ed); + +/* Layer Blend Unit */ +enum dc_link_id dc_lb_get_link_id(struct dc_lb *lb); +void dc_lb_pec_dynamic_prim_sel(struct dc_lb *lb, enum dc_link_id prim); +void dc_lb_pec_dynamic_sec_sel(struct dc_lb *lb, enum dc_link_id sec); +void dc_lb_pec_clken(struct dc_lb *lb, enum dc_pec_clken clken); +void dc_lb_mode(struct dc_lb *lb, enum dc_lb_mode mode); +void dc_lb_position(struct dc_lb *lb, int x, int y); +enum dc_lb_id dc_lb_get_id(struct dc_lb *lb); +void dc_lb_init(struct dc_lb *lb); + +#endif /* __DC_PIXEL_ENGINE_H__ */ From patchwork Mon Dec 23 06:41:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918511 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2046.outbound.protection.outlook.com [40.107.21.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 490F119007D for ; Mon, 23 Dec 2024 06:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936198; cv=fail; b=SIcWzy43pxAB2Pkdq5gzDevOe4JYlNFdXVIhJC4GCTyIgKRNWZpkUslFFe/NcBIFfRNnPNJNDa9+yBZIwvPjiZK0sow8rsTk3kG0p7UnbJwKnntUE0skj1AGrFZg+eTLcCNGM33vqdYnd9EENCAEtZvbA11CNg1BdJdOLmG+cB0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936198; c=relaxed/simple; bh=gsIRzUAwLWE89ShHlZTL/jTejBik8PPqVmH00xWgjvg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZGC2f9uOJByLgKUWlnDnFjq2Fa96zb15khaSzwlRzQICjEmB1gCEs8r/9NpTPsBrT4R43QDypwPf0wEhV/RLMYjQ4jmn8BwRffXA5vScy3ZwnxDOYiQcdtY0tNU0R0U2STv+K8g1DTrJwENxHxkU6eddmBd5v2v1m+xlPHIkty8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=hfs1vx2I; arc=fail smtp.client-ip=40.107.21.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="hfs1vx2I" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=thQ6obuY2PW40wz8SmaHmEOLIruL69V86N4hKBmFig0Bqd0V0YsEYPeJJFt6KrIi6ohZlny4rOsY5ECWpj2LgCUK/zUX2bPiLOYlvJWu+rgNgHh/DKO9AAAEdbSjOne5hydRUwdrp1Echhjky8F5swVkDwchvOjO8MTZYv3O6gJ5FZrxVq5zTXpLKKw+4Ef+osvDPmkSr88fj/fgqowsUZLYXBLKYLg4JdE+Y5v69bvVoyQ540DjAxuWqgL89Y2CmMpJ09GrSiIJPAHvEL3QfAOoNQVGjyjK66snMXlwOFY/tQ/FOdUoCHHxa+aydBG2nc3fS3T4cewx8KM3RyL3Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XpDq32NOFHlSPy8giRuBRv8NGKpEy0FQgEjalPq5eSM=; b=SinVlgS9RcRUWEWowmxRogNmXXSDRV7r63D93HeC4iOkwBdK1YRlwb+3Ou7A/0DoD99q5lITMBtFTmiOjqBvfnMavMf0Xqey63dmt/NsPogGGDd9vhX3E5pXtIoyOLea2T+5MnIOFjEocG7bWqDTDHL9E3oP0gAGI+iTbxzkgInAsfF7CJ7FHvgjv8VD2eZYMPEkQ13aT+4Jl2JMuhHZzjAeJICGtThHPb2lYo/CgIvQqvGEw5zpt6ACZlRETbpEqouaI+50APlliTGebFmPJ/n1x+KaQEUKjvTVz21SuHKJhgwioG1ob10iYqmXL+SpUQdGQKj2j8DgI867QuqkKQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XpDq32NOFHlSPy8giRuBRv8NGKpEy0FQgEjalPq5eSM=; b=hfs1vx2I/gh71f7eDbIC1i+g1aEjdl6nuiA5RChQ8hGWgqZU8YPV/fbba7VARHkGXi0jzNC9lPFYKiUxrwf8DxC+Ew7Z2Z/ZLYmrcs9sUCRT7CbRpzqIjjTHrDsnJq12YM+sF9Y+byXpWOhdi2DUZdRUiHL113idV7Z4mpObrEd9aCOruDh5Ckdztcn505roEYrVGgynoon+wtWuLwdg2dvcprkO6cntL+IfiYGzTR9LNYAXDl1c9APC4gqLiJkJXkiTUJ+IgG6uJRz8ymOSGdXl43r///8/KKYR9i0zO1hoHp9iPKFqsvgqrTs5+BumSlUfd8xm3jsnUwmnNE7kKg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:09 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:09 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 23 Dec 2024 14:41:39 +0800 Message-Id: <20241223064147.3961652-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 42fe73f0-fcf1-4ba9-4a5e-08dd231d1076 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: wq9Ig29AnfVeNsUS7PFdfg8cp/fMIf0k5v1QI8tyHYAUUtodrnESl/hkX0vsm35GtL2Znpo5wcE6kLgpmYgogP+QrYGIHhEoLkNwv8r6be6Ze8aF9j6uFxHdTsv+TSUyOl/Q7MeSRKE0zqSb5bwPHL8lu/mkwqRCSJmVKE2eVlEt5i087bsdZcYFm/w8baC2eFNjOKMxQBULl83pvwrcpBscxXQs2LJh3guya7djKfGJon9IYBKylDWnQq/r9PhSKEE8LESd1Z8OyD8HgRgP/1jJHAN80HB2VlwivozNokmLoGn6nlzEWCmstkdRQ906qL29s9looM38GjWb62KhqNdrx+x33ji74KTL7zmS/N4cDfznVhDEhWoIpDMxIlg8m1hoofj2You/vMoTOMofw9hMMS6DTypP5NjmsPvH2S5XQme34uXk/+3CKi24Rx9SIXyoYG4BQuV7ctfbWPzPspw/ApQ5C2xad7WmBWL+gVo1ndJJeTL4VhAWc9vHHkWidKNm2ZoCNIlQRgq0zSxKSvgEQuJzhxrH65CIkKwgQPuJvbYEPGsfd55sCVQsNwSaUtqLaK/nsO2Hqra2Yf2mBK/gWFV07XkH/B8crg4TTdi4jmYwEvhzs7fRSQXJIMzjsdaA/oO+eMN9QRCqSaV39P4S4j9UCH78e5y52Lhnp4aCtGq3O3Ab/UtNt7ewRx5gyE51B92pXq38P4wCNmuv0BSVVLczyslpwJFw+qTE5x33ZlEfXCbhtzG1g/hQjVr/N3YxJACyvn551iaEWOiJOw8oM2wYh/UmtvG2R2CAtvaVjU75XEbmVytPbrh/E/DxjvFbtZ+o24MTKweTLhyKqgFEGsP05IFj9QHIAGqhXTY3++cFZtOJ9vfLU2NzeISbUR3G7pE3lkpwDvPZy9XNbngwcdBTd5kRNu5C+kFX8RenHg4LR6PKwOAGh0a3CTkf/ynRfGCSdGSWIw2Hjhc7MJxamczTGNUIRwgfyLTsweGN3qLG9AfqnCea1EG9o/ZKc9Qz8EvTbRJbni8FpfZsWnKVP4YzjBXUeykb8RsMWK8MlaMEzKSuwFyj3DUZt5b38R1z/eFQtllCGX1NRk6p/LN63W7IMflRaYWAUyxf2uQG/bNY8Jqp+vy1B0+klLMyNp7LM2wc/1MYOyDakyJBjsnlYUe8wmo5UqUlv1L4muFzTQNq93fc78x5SIv+WIMgaEMXKBsM+uN5lICWSzMuxI9pHzglbtiWbwe3OZjwiKXaFT1XGd++l7cyT5VD8Vdp8UiIDdxcTQAc7wbwBOnTII3rKVLBCKFvcTLgXXVUJAg081lfA3qUlu5PDgqlaJZUkMumUUfkNRW07HWXx4YsjS1Vi/isuimoNZ4hjVNHO/95kF487Y4AhqGdb4LpG+HNeMYksVsPWHA/NW9N0UsQ5KBnhK5v4Q4iXLOMk6hemqJEtdYCXnnBbl3kzr5/rhHP 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mi2ECMR0MVKoMNpm7CKxIu5TvxSirmHhY1tLhd8YsfWElv6d5kKan+8ezZQwVwG1+rN5Wmb8RQDwikeGOLYrNIgkdfJSBEJ/ik2X9sfuJFpKpHmKal2sF85bVPDnGaIHl9y0b+u5CYR7gJ+ev8rLNLAP1L36yF4Z/P9jNYWmV/1tyVmiIgCQH3DXiGWIeE39OvhDS/LX5NderVGVTrp5lgmoO/zRk8XBUy2sI06C3rvx1Kkp8kimiMUJteesnnf/j0FuToNR6oN/xwwSW7DXLb+av8Gj249/rtbfMOXmASlSDmeqe63u68UOM4PDdYKPkPeR78L4mgfFOgPvHM98uW3Ibm1d1TF/ZvzdzjADlzFa1OXhLM3Vvhe20cprnYQZJLfYiVtZTEXfs0A3EuR1/XUXbqSueoeXBHno69UrXZjBOJBcAvGa3qUZ0v12eNEbJplbJ00HHMZ8sbM5yVPxi/0y6TbFpLNrhRn4/6Mx/F3o9Uc15QTwy/L27epNUWpc+zzDt6HZDfE0u9LchPvpMHv/+IXL+JoOU0a+SIr4LPB8SIunIo/yFUZR1mq2Pc1FmKBiSQ41yF1Tr2horsCi7s+/TkyIgaY1HyxQfXnSElTQd8D01QMUzweLPrSFr5ER9ujvmaDZE7GrwgNKfcdJj4XkbdF1TllG8O6V+2lwZkOtyr/9mS8/fDQphISPO+2r1Uo77xa6fn/jZJlhz+x+rRANc5o021CdMO+ohvEEDpZKapcaP+uiyaOq9/SbF8KEdKM4b7ckGUnr3Dl+VUSR7gcA/zdgd9whIwtbU/TNEJEYA44LlfziL6yUsZy/97z5YjAbZckKyJaZTE+ZSjMldfzDv7PCiuKzqXtBjF6L7Qoc/TSZW9zOxpq2m1qrXSeH9mKTTJyszbZs5EKSYdFKRbojKZjYX9a7OTi+8rUEV03cFT6kfsjDWPBGPGcJWv3HC6qqFTvbsAQPy0TfTRpPP9oU6kZpzqRQElCjIhpCUS1Vke4qNLF5s0/lB3qNro/bTY8gk6RZdSYAnty0Um31M1q4Xk+HE7MDlqAHy1StVIY0ci41SZpaVVauedfbgFyZBBBycsfo668b/kI4x0t6QsATyzz0Soeksf04rvHlOdBGY9gkKjMDHPefJjNVZDYG1CJvngBOKn5LYLzAlHADHpEHG14dGupE7y+1pTtg+teIQGkya6twS1eoO3P/INs76EWF9fhV4Okq24lIQbhJnnknIjje4iXaxeRQILz8qxRPSxCYKV1U1u8fFGkQcvoubtECO8ooylraOFCtcm/MYlzPUvgrgk9wL5AIQYkduTZt8zIF1FrMjv8VaNW4iikdWjJ7nX5bnVjMxYTXqJDBlFYPwNgY5mbaBXAY3/2dI0wGWgMiG2QxLmYds1nohzOPo8RV2gT+IcjuBKC1HzhCmSGg76ZMNgWWBT/a7PTmbgqQ0coF+oKkCI9/5lF/bj++uOdJ/K0n8f/6HU5bFOmXvcmdPdI9Y9KqakRFqhsU+96P4kQHNW5EdRwdsWFv5n/QxrDd/Ir+9MfiRFZiuczmsiG6AwtqxrGCMZUqqFTU7r45NCRFafnG8PBeUUdeg6kO X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42fe73f0-fcf1-4ba9-4a5e-08dd231d1076 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:09.5812 (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: qI5v2vYpC8Nh3IZ940Ao25Syl0Qt/xVCmSHxW6d8/TslVB/kHqdrDwn6lA4b/2ESQ1UBUhI4kSogFD67PzXLBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller has a built-in interrupt controller to support Enable/Status/Preset/Clear interrupt bit. Add driver for it. Reviewed-by: Maxime Ripard Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v7: * Fix regmap_config definition by removing name field, correcting read ranges and setting max_register field. * Collect Maxime's R-b tag. v6: * No change. v5: * Replace .remove_new with .remove in dc-ic.c. (Uwe) v4: * Use regmap to define register map for all registers. (Dmitry) * Use regmap APIs to access registers. (Dmitry) * Use devm_kzalloc() to drmm_kzalloc() to allocate dc_ic_data data strutures. * Set suppress_bind_attrs driver flag to true to avoid unnecessary sys interfaces to bind/unbind the driver. * Take DC interrupt controller driver as a standalone driver instead of a component driver. * Replace drmm_kcalloc() with devm_kcalloc() to allocate an array for struct dc_ic_entry. * Call platform_get_irq() from DC interrupt controller driver to make sure parent interrupt controller driver is probed first. v3: * No change. v2: * No change. drivers/gpu/drm/imx/dc/Kconfig | 1 + drivers/gpu/drm/imx/dc/Makefile | 2 +- drivers/gpu/drm/imx/dc/dc-drv.c | 1 + drivers/gpu/drm/imx/dc/dc-drv.h | 1 + drivers/gpu/drm/imx/dc/dc-ic.c | 282 ++++++++++++++++++++++++++++++++ 5 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/imx/dc/dc-ic.c diff --git a/drivers/gpu/drm/imx/dc/Kconfig b/drivers/gpu/drm/imx/dc/Kconfig index e1ef76d82830..1fc84c7475de 100644 --- a/drivers/gpu/drm/imx/dc/Kconfig +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -1,6 +1,7 @@ config DRM_IMX8_DC tristate "Freescale i.MX8 Display Controller Graphics" depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST) + select GENERIC_IRQ_CHIP select REGMAP select REGMAP_MMIO help diff --git a/drivers/gpu/drm/imx/dc/Makefile b/drivers/gpu/drm/imx/dc/Makefile index 2942ae6fd5bd..1ce3e8a8db22 100644 --- a/drivers/gpu/drm/imx/dc/Makefile +++ b/drivers/gpu/drm/imx/dc/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 imx8-dc-drm-objs := dc-cf.o dc-de.o dc-drv.o dc-ed.o dc-fg.o dc-fl.o dc-fu.o \ - dc-fw.o dc-lb.o dc-pe.o dc-tc.o + dc-fw.o dc-ic.o dc-lb.o dc-pe.o dc-tc.o obj-$(CONFIG_DRM_IMX8_DC) += imx8-dc-drm.o diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c index 7c64acc863ad..fd68861f770a 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.c +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -15,6 +15,7 @@ static struct platform_driver * const dc_drivers[] = { &dc_fg_driver, &dc_fl_driver, &dc_fw_driver, + &dc_ic_driver, &dc_lb_driver, &dc_pe_driver, &dc_tc_driver, diff --git a/drivers/gpu/drm/imx/dc/dc-drv.h b/drivers/gpu/drm/imx/dc/dc-drv.h index e618a4228590..01f3c355beba 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -31,6 +31,7 @@ extern struct platform_driver dc_de_driver; extern struct platform_driver dc_fg_driver; extern struct platform_driver dc_fl_driver; extern struct platform_driver dc_fw_driver; +extern struct platform_driver dc_ic_driver; extern struct platform_driver dc_lb_driver; extern struct platform_driver dc_pe_driver; extern struct platform_driver dc_tc_driver; diff --git a/drivers/gpu/drm/imx/dc/dc-ic.c b/drivers/gpu/drm/imx/dc/dc-ic.c new file mode 100644 index 000000000000..66884ce72b5b --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ic.c @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define USERINTERRUPTMASK(n) (0x8 + 4 * (n)) +#define INTERRUPTENABLE(n) (0x10 + 4 * (n)) +#define INTERRUPTPRESET(n) (0x18 + 4 * (n)) +#define INTERRUPTCLEAR(n) (0x20 + 4 * (n)) +#define INTERRUPTSTATUS(n) (0x28 + 4 * (n)) +#define USERINTERRUPTENABLE(n) (0x40 + 4 * (n)) +#define USERINTERRUPTPRESET(n) (0x48 + 4 * (n)) +#define USERINTERRUPTCLEAR(n) (0x50 + 4 * (n)) +#define USERINTERRUPTSTATUS(n) (0x58 + 4 * (n)) + +#define IRQ_COUNT 49 +#define IRQ_RESERVED 35 +#define REG_NUM 2 + +struct dc_ic_data { + struct regmap *regs; + struct clk *clk_axi; + int irq[IRQ_COUNT]; + struct irq_domain *domain; +}; + +struct dc_ic_entry { + struct dc_ic_data *data; + int irq; +}; + +static const struct regmap_range dc_ic_regmap_write_ranges[] = { + regmap_reg_range(USERINTERRUPTMASK(0), INTERRUPTCLEAR(1)), + regmap_reg_range(USERINTERRUPTENABLE(0), USERINTERRUPTCLEAR(1)), +}; + +static const struct regmap_access_table dc_ic_regmap_write_table = { + .yes_ranges = dc_ic_regmap_write_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ic_regmap_write_ranges), +}; + +static const struct regmap_range dc_ic_regmap_read_ranges[] = { + regmap_reg_range(USERINTERRUPTMASK(0), INTERRUPTENABLE(1)), + regmap_reg_range(INTERRUPTSTATUS(0), INTERRUPTSTATUS(1)), + regmap_reg_range(USERINTERRUPTENABLE(0), USERINTERRUPTENABLE(1)), + regmap_reg_range(USERINTERRUPTSTATUS(0), USERINTERRUPTSTATUS(1)), +}; + +static const struct regmap_access_table dc_ic_regmap_read_table = { + .yes_ranges = dc_ic_regmap_read_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ic_regmap_read_ranges), +}; + +static const struct regmap_range dc_ic_regmap_volatile_ranges[] = { + regmap_reg_range(INTERRUPTPRESET(0), INTERRUPTCLEAR(1)), + regmap_reg_range(USERINTERRUPTPRESET(0), USERINTERRUPTCLEAR(1)), +}; + +static const struct regmap_access_table dc_ic_regmap_volatile_table = { + .yes_ranges = dc_ic_regmap_volatile_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ic_regmap_volatile_ranges), +}; + +static const struct regmap_config dc_ic_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_ic_regmap_write_table, + .rd_table = &dc_ic_regmap_read_table, + .volatile_table = &dc_ic_regmap_volatile_table, + .max_register = USERINTERRUPTSTATUS(1), +}; + +static void dc_ic_irq_handler(struct irq_desc *desc) +{ + struct dc_ic_entry *entry = irq_desc_get_handler_data(desc); + struct dc_ic_data *data = entry->data; + unsigned int status, enable; + unsigned int virq; + + chained_irq_enter(irq_desc_get_chip(desc), desc); + + regmap_read(data->regs, USERINTERRUPTSTATUS(entry->irq / 32), &status); + regmap_read(data->regs, USERINTERRUPTENABLE(entry->irq / 32), &enable); + + status &= enable; + + if (status & BIT(entry->irq % 32)) { + virq = irq_linear_revmap(data->domain, entry->irq); + if (virq) + generic_handle_irq(virq); + } + + chained_irq_exit(irq_desc_get_chip(desc), desc); +} + +static const unsigned long unused_irq[REG_NUM] = {0x00000000, 0xfffe0008}; + +static int dc_ic_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct irq_chip_generic *gc; + struct dc_ic_entry *entry; + struct irq_chip_type *ct; + struct dc_ic_data *data; + void __iomem *base; + int i, ret; + + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + entry = devm_kcalloc(dev, IRQ_COUNT, sizeof(*entry), GFP_KERNEL); + if (!entry) + return -ENOMEM; + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) { + dev_err(dev, "failed to initialize reg\n"); + return PTR_ERR(base); + } + + data->regs = devm_regmap_init_mmio(dev, base, &dc_ic_regmap_config); + if (IS_ERR(data->regs)) + return PTR_ERR(data->regs); + + data->clk_axi = devm_clk_get(dev, NULL); + if (IS_ERR(data->clk_axi)) + return dev_err_probe(dev, PTR_ERR(data->clk_axi), + "failed to get AXI clock\n"); + + for (i = 0; i < IRQ_COUNT; i++) { + /* skip the reserved IRQ */ + if (i == IRQ_RESERVED) + continue; + + ret = platform_get_irq(pdev, i); + if (ret < 0) + return ret; + } + + dev_set_drvdata(dev, data); + + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; + + ret = pm_runtime_resume_and_get(dev); + if (ret < 0) { + dev_err(dev, "failed to get runtime PM sync: %d\n", ret); + return ret; + } + + for (i = 0; i < REG_NUM; i++) { + /* mask and clear all interrupts */ + regmap_write(data->regs, USERINTERRUPTENABLE(i), 0x0); + regmap_write(data->regs, INTERRUPTENABLE(i), 0x0); + regmap_write(data->regs, USERINTERRUPTCLEAR(i), 0xffffffff); + regmap_write(data->regs, INTERRUPTCLEAR(i), 0xffffffff); + + /* set all interrupts to user mode */ + regmap_write(data->regs, USERINTERRUPTMASK(i), 0xffffffff); + } + + data->domain = irq_domain_add_linear(dev->of_node, IRQ_COUNT, + &irq_generic_chip_ops, data); + if (!data->domain) { + dev_err(dev, "failed to create IRQ domain\n"); + pm_runtime_put(dev); + return -ENOMEM; + } + irq_domain_set_pm_device(data->domain, dev); + + ret = irq_alloc_domain_generic_chips(data->domain, 32, 1, "DC", + handle_level_irq, 0, 0, 0); + if (ret) { + dev_err(dev, "failed to alloc generic IRQ chips: %d\n", ret); + irq_domain_remove(data->domain); + pm_runtime_put(dev); + return ret; + } + + for (i = 0; i < IRQ_COUNT; i += 32) { + gc = irq_get_domain_generic_chip(data->domain, i); + gc->reg_base = base; + gc->unused = unused_irq[i / 32]; + ct = gc->chip_types; + ct->chip.irq_ack = irq_gc_ack_set_bit; + ct->chip.irq_mask = irq_gc_mask_clr_bit; + ct->chip.irq_unmask = irq_gc_mask_set_bit; + ct->regs.ack = USERINTERRUPTCLEAR(i / 32); + ct->regs.mask = USERINTERRUPTENABLE(i / 32); + } + + for (i = 0; i < IRQ_COUNT; i++) { + /* skip the reserved IRQ */ + if (i == IRQ_RESERVED) + continue; + + data->irq[i] = irq_of_parse_and_map(dev->of_node, i); + + entry[i].data = data; + entry[i].irq = i; + + irq_set_chained_handler_and_data(data->irq[i], + dc_ic_irq_handler, &entry[i]); + } + + return 0; +} + +static void dc_ic_remove(struct platform_device *pdev) +{ + struct dc_ic_data *data = dev_get_drvdata(&pdev->dev); + int i; + + for (i = 0; i < IRQ_COUNT; i++) { + if (i == IRQ_RESERVED) + continue; + + irq_set_chained_handler_and_data(data->irq[i], NULL, NULL); + } + + irq_domain_remove(data->domain); + + pm_runtime_put_sync(&pdev->dev); +} + +static int dc_ic_runtime_suspend(struct device *dev) +{ + struct dc_ic_data *data = dev_get_drvdata(dev); + + clk_disable_unprepare(data->clk_axi); + + return 0; +} + +static int dc_ic_runtime_resume(struct device *dev) +{ + struct dc_ic_data *data = dev_get_drvdata(dev); + int ret; + + ret = clk_prepare_enable(data->clk_axi); + if (ret) + dev_err(dev, "failed to enable AXI clock: %d\n", ret); + + return ret; +} + +static const struct dev_pm_ops dc_ic_pm_ops = { + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) + RUNTIME_PM_OPS(dc_ic_runtime_suspend, dc_ic_runtime_resume, NULL) +}; + +static const struct of_device_id dc_ic_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc-intc", }, + { /* sentinel */ } +}; + +struct platform_driver dc_ic_driver = { + .probe = dc_ic_probe, + .remove = dc_ic_remove, + .driver = { + .name = "imx8-dc-intc", + .suppress_bind_attrs = true, + .of_match_table = dc_ic_dt_ids, + .pm = pm_sleep_ptr(&dc_ic_pm_ops), + }, +}; From patchwork Mon Dec 23 06:41:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918512 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2060.outbound.protection.outlook.com [40.107.20.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 931DF193436 for ; Mon, 23 Dec 2024 06:43:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936208; cv=fail; b=SUJoZFwSAp5ddmSGjrxLq4NeXZlMx2LGyAu253HVqzcoD7OoJqmmCev8xjZZ5PGNvxJuiL6m3fZtaJ9TI7cxruUK/uPLZulG9mNRApqRge7OefX0iRHWoBD4Se8z98v3Ito+VLYP33H4/GcwLZklM5IyPd9ioxSAZUFXbD62NYs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936208; c=relaxed/simple; bh=aQJBZgahFvW89yupiWU8fKCrGwh81sQttG7p/v5/mHQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hhH6NLPAcdLWfb7NuDlhD0PXT6TQdChXsjcIB+FO55kv4QM3GSo6HDFpzjk7i0yDHXOegygYBp1U06PWIz722WzdaIot+n/KK1Gx/vS0z8l3ZnFV9b1lIGQ8eD15H+D0IqZEvNFPaUWu7U68Tyf7CZnXXPJo75lP7LW6PsBL+24= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=cJa1ih2m; arc=fail smtp.client-ip=40.107.20.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="cJa1ih2m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=A39gieipNUxWYtUfCIOxw0P6fw7t27TucpA7sG0gxqgtEXUhBYjgCFtDpyig+/bjJ5z3GmHxCCMAaOY5o9c2obYHjAqgLTQeWcPZTEqlgUMScqXB8wT3BW7ZOgCxrvuqJyne/4dhaLoWwt/WNr76yK95G2Yggg/Xbb/V81KC84avsCNQHeGqt1iB5zD7cX77RTxzBwYFQ8eIU+0CUoj1gg959lddF+ABaw3bQ2CiP8jGugaJhJ8OpxOsUEWIQYj/jRv+cti78jJRhQlmORWBib+RjlArQo2rargf2PuX0q1baHU/EGp/oDpS21lSIWLPIFwzm56BVBgQLEmdaRaZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=0fCa3kVYe2EoYmsNDBus1umX2/5l+EXyswe2cYOqPIo=; b=jVBsDGio64faS7vGRJw3TIkwkzeXOZ05E+IjsYlFmh10UkVa2R2XG7SFgoTRDZ4HNOiDG9IckmK6P2+a78uLsNEM/N1Iad+OtaTtKfo/rzU6BNqvXgsPYZU4QfxBF3a4indrBlMEBpmaPrS9KRr4iWVrlD98QbQ9Df0heK36hztplchyigt1IQcUZz1g5Bdv8CAC0zJT/9tn0DIIrA9TXMNGFvkA0/qpac0AxG3aqVhEKy8371PoewnYpCT2TOeLuFmi1yZ7QI1idkgu8YGX8iGiR2mEBndNrqMxYVWXNA10I5CWiOf+FwG2aZbnR4Ej2MerogTYjIyqBMT5b+JemQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0fCa3kVYe2EoYmsNDBus1umX2/5l+EXyswe2cYOqPIo=; b=cJa1ih2mbtRBZydxWxEy+lm9JhGNO0OM/Ojnsz3iOKPhAeH/CqqmkwSg0mg0LmBOst9tcE+CMRVN2CL/U7WRlUT2SYRJ4toFKflCTZfckE30ytifqqYmIqV+L41LD1jgMXuZJ0hMq08Uz3ty+GTDiLrtk+SZZdhYND3Cue0HJtZHY6NJxXBHbZwdn5dHM8JwYy/sIFAgip/jUIRvTA3BxVHQUCPhtoEqYqXf23GCHvYB7up/k6dvHBwYbAHQN2lpv3yeeijczNwem+YTyDTnPvc2iWw8Y+TBe355C0RMe5LhMIFK60HgDt+s6Hi/CTxol7bi/f4/hkZKmSge4oVlCA== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:17 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:17 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Date: Mon, 23 Dec 2024 14:41:40 +0800 Message-Id: <20241223064147.3961652-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 2902a094-b1b5-4fc6-6fd7-08dd231d1506 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: EibfKHagrVW+P1NZNEetN5UHBCq3XDrHxSbghLck2N0bu4/azg2YBsFEReeH8XTr3rak61LH0PqXF4oQzz+kT2LgtTdtFBUdRlKfGqOkrZcfNpUSZE7GnWKynF57XPmuXY7tO85khmGO2JSVRJK2O87NkWm8CPDvmE0qtSogkkPOnvAY80EQz82CsPVdDaKVxrq90FFRpA3O8c/rBOMngPNlT9ncwHPJiM9piwnJZ9PB3I5hhnaMW2PlQFjp3CvFxiE07l0aEHLbIIrv3sa2w9PRhr18qemjyvk25xHBpRBnntjDMZEjOH26Ne/apouYHEpB2CBM4srHrffZu9E7XVv9RcjruEqoZFu/OKX9Cd4AE9+Ge7CHA+FqrJUi1rigGVj+8GJriQm8acphpvhW6LzUbWBm/jN4ot7EvQ6/GGwkLj30X18PfVWxWYloPHRUmBBmTiEpfqsA9AOMWgRlOzH4aH9rTWskQ1+qphZ++lEdXuP/Q34mHHXE8l7w065BPLr56tt/4GnsnijD/WN6nsVSl/lqlu3Y/F2YmCHOPk7aLaV+VJpat8imYuTc34BEmI5K8jh94QMUX3k+7xBz1Sk6IW6aFSKCA0NMRf6OL1XL1ZKx0gvDi17/pYcURwAyDM6ftyo1aAlND67uwxIpU1MOdOL6sfuAyX8yFWsSbjhC8SHAihLE6cETOUWyD//4hx26W/hy3lDRz9otij0kLdRCK/zx7MFAMBJd5LrmIgbss8mysI7i78F3Kar+1ttGNcK+BK9h/2ueAXanfMH2rQWwhuqNc+NSTFySa8GhLHE3qxc/G/5FGh9vgz0itS0A9dikzoptj/EdorS+n6W4np6rGhRrDfUur+5eOfPZFUb016oFChK7ZisflS3e/bvGyJc1HmazY95EYJlRC/Om9tJde+SQFIUM3yNuSyfAtL0EYvhWs2HJwRza4Zqj6e38xxmQIor66o0U8DUFbg1VwS6wDpMdjHzD22mlK4ECjgQC6hOXcAF4narLmbD9Qrv5OEnzCWsiTuQZFaG+YDxgiRH4UFD5ihU7nvnyrss2aOhgHseqyP+LQybrD17YErIz7k06nH799uUqnndNikT2X9Yg8Q/iz2TyG2CRYdAtoi4H1qr8eUUYBmTPd8Pr2mmR1DoA8U5l5s9RXDza4PQuHJqekVeJD7WNZ8/v/nFGYOcdOr+3t7ysYawRNQ602YOouK+xSWk9IEfpmUPq+iAGBRV3hw5BokmKKxZAZeTd511lTPmNlz8T5T3tgvIjBMbJoXBr0xkv66stOdJKaVWKjucc1G4jM4n14jxLOp7BFLxyzv0NRK7tchMZSKbiVhDB3llGBqahdW4FuKl3xlepfNEMfNNTxhrpxE5nAWe/iERb57rmgyOaPsnIEGPdALMVgA3vV/lzb+yrITjkYW12lYnoj3QrcGcd+V3z5aBmUZsOax8GXFs96lHI02i12RNg 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6W2q7480+SSwcfpuUHVL+UalWb0fda1hLXwI6y3VLQUSsrEYVGZNCbeDmDu0o3bEP3b594YQ7l3Gw08zHe+uKV2irW87rKs//rhKrReKlHQjC0M4T3nS+md0RpFZda5zhwEurgGVCYweRbJoWf2GY8Xs/f02uFpaI1tPt3UD8Om9n/SrKZZJmRAqI6PzjajWDBaiuuZGp76EUyf3qNAFiUEgNw+dozGbH0XiJtuAOK0/hrOAptftsa6UFo8gyntil0qDg9veoCRQNp69XqHN4wcBsYmWzGNqf5OJ//HoeqnooODnPN9Fmu6WXESFAWefy8WXdrVDA4x+Zy6AFvtniGpU7HoU0XucE/xfptSRkc0LhtQqLR67+aBY15Q2jYMmOeFRz2J7X1CZrABydMkThCGlc7LW61002wWKgABlTVwL9XD49EHOFH3TpqeJIlupFDTxt4THrAhiUIfgCftN74Ph/+uqMutybTE6OAj2BjbkiRivWf0sHoRUjkz784o0Iojgif4aRyOQGlPhefk87BIYRpZgBK8aP+s568tKmKezuc2Kp6Rk0VeMNgplIUGmYhcjbvdT/Kbe177gudVAhDLU+WQ1AYwZTfhwMrGoojmLrI0G5KCZlwi+oIIgeyf0mrCrrtf7gyH0ROPKIunwKIwtOkz4o+zSQjqfQbTHNmNaT6EdVjmhxhy6odWrB+q4pPcHxGq8QPKQqJWpJA14b/NVdnDJY/Otx0VAeGN4QNscFhp90C3TmetyGL5JQ6KEz9tOIaG5BSgk0dLTABUPXIeBemSW35RvOlHeIpcohQt+gKQIfAgC3MRYw+kOPAU2eP3vwlSi78s6CpV9CGRkSRmLhDGTPZ5ADqbgfhj6W/opcsRDI3c/T1iV4EVyouoJluambPxbDP0ng3EsAOxcc7wycommDgxhzu8qr+tFSVKfszJ2SosHPGt4IZ1XZ1HNHd+UdL6TwYyvf1ZiYko5+QYLq+R6JV77K4DqrF/5A4i6dA3HgJMgLhrniPpG2MNtK2c1UgVRPL5TaoBt0JHC7uiS/esPCsiYYztitRo1xZsIz9hbjVu2cqGFKBAIlTr+BmPXlkynUj+sQGlHV0ab4TlG361oSSA2qa+f1Kv+8hRcU3wyg5lVSkL4JOKqNnd65EnIaMgVKHmeOxnDR5T7WAixNB0dFp5xOSxkXbXh2GIz6bqkbL+zKUYS84DGvKGJq/ZyNH5rSRg3k1Pnjj7Sz6akbic0mQGz92CbeMRkE1iDzBM9HMPm0JdF/QtVygIfbIrSRUt/vfubDViq9rM+b9UmH6VV3sJ/0o4CaBjOEuCGQ8qlRAfiOkqTdfr5ymQT98+vhl+H0E87Z5lWwQMrNJwRiXUq4mTpDKmMm+jCVgP/lRy17GpH3fn3/u/Ke3orl6TMjgN8un3NMmo29LkA5lt7g0HN29kQHetWFtb9ybDOnxuAApLkEjzbU6VTnXwehcCixNaIDo6dQIMQfpDteMmEzSCrrJ68ZS6lb7HjSKuJ89xyya51X9A7xu7FjMPQC/X9o+y2t5G0ew+sJXHmTvsUzVWdOz4WfbcYNAG9LzB0PX4UzikczFuMl15aKDA3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2902a094-b1b5-4fc6-6fd7-08dd231d1506 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:17.2248 (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: IlVcWJ9LB5Zra6jqgxphJV7TFSVq/MB2RFIZDz4/lsB2ykpYgSWrmsJjKlelK47y5NEeTHxtKccU4rxVcC5Dlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 i.MX8qxp Display Controller(DC) is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as well as a command sequencer. Add kernel mode setting support for the display controller part with two CRTCs and two primary planes(backed by FetchLayer and FetchWarp respectively). The registers of the display controller are accessed without command sequencer involved, instead just by using CPU. The command sequencer is supposed to be used by the blit engine. Reviewed-by: Maxime Ripard Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v7: * Drop using typeof in macros and explicitly define variable types. (Dmitry) * Add a comment for disable_irq_nosync() to explain why _nosync. (Dmitry) * Inline dc_crtc_check_clock(). (Dmitry) * Use global drm_dc->pe. (Dmitry) * Drop dc_crtc_disable_at_unbind(). (Dmitry) * Add kernel doc for struct dc_{crtc,drm_device,plane}. (Dmitry) * Define common IRQ handlers separately for each IRQs. (Dmitry) * Rebase this patch upon next-20241220, so drop date entry from drm_driver and correctly include drm/clients/drm_client_setup.h. * Collect Maxime's R-b tag. v6: * No change. v5: * Replace .remove_new with .remove in dc-drv.c. (Uwe) v4: * Move dc_fg_displaymode(), dc_fg_panic_displaymode() and dc_lb_blendcontrol() function calls from KMS routine to initialization stage. (Dmitry) * Drop dc-crtc.h and dc-plane.h header files and move relevant defines to appropriate .h header files or .c source files. (Dmitry) * Drop futile "else" clause from dc_crtc_common_irq_handler(). (Dmitry) * Drop dc_drm->pe_rpm_count. (Dmitry) * Drop DC_{CRTCS,ENCODERS,PRIMARYS} macros and only use DC_DISPLAYS. (Dmitry) * Drop drmm_kcalloc() function call to allocate an array for storing IRQs. Instead, put it in struct dc_crtc. (Dmitry) * Call devm_request_irq() to request IRQs, instead of using drmm action. (Dmitry) * Call devm_drm_of_get_bridge() to find the next bridge. (Dmitry) * Select DRM_CLIENT_SELECTION due to rebase. * Select the missing DRM_DISPLAY_HELPER and DRM_BRIDGE_CONNECTOR. * Use DRM_FBDEV_DMA_DRIVER_OPS due to rebase. * Replace drm_fbdev_dma_setup() with drm_client_setup_with_fourcc() due to rebase. * Replace drmm_add_action_or_reset() with devm_add_action_or_reset() to register dc_drm_component_unbind_all() action. * Request interrupts in dc_crtc_post_init() after encoder initialization to make sure next bridge is found first. v3: * No change. v2: * Find next bridge from TCon's port. * Drop drm/drm_module.h include from dc-drv.c. drivers/gpu/drm/imx/dc/Kconfig | 5 + drivers/gpu/drm/imx/dc/Makefile | 5 +- drivers/gpu/drm/imx/dc/dc-crtc.c | 556 ++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-de.h | 3 + drivers/gpu/drm/imx/dc/dc-drv.c | 238 +++++++++++++ drivers/gpu/drm/imx/dc/dc-drv.h | 22 ++ drivers/gpu/drm/imx/dc/dc-kms.c | 143 ++++++++ drivers/gpu/drm/imx/dc/dc-kms.h | 131 +++++++ drivers/gpu/drm/imx/dc/dc-plane.c | 241 +++++++++++++ 9 files changed, 1342 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/imx/dc/dc-crtc.c create mode 100644 drivers/gpu/drm/imx/dc/dc-kms.c create mode 100644 drivers/gpu/drm/imx/dc/dc-kms.h create mode 100644 drivers/gpu/drm/imx/dc/dc-plane.c diff --git a/drivers/gpu/drm/imx/dc/Kconfig b/drivers/gpu/drm/imx/dc/Kconfig index 1fc84c7475de..415993207f2e 100644 --- a/drivers/gpu/drm/imx/dc/Kconfig +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -1,6 +1,11 @@ config DRM_IMX8_DC tristate "Freescale i.MX8 Display Controller Graphics" depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST) + select DRM_CLIENT_SELECTION + select DRM_GEM_DMA_HELPER + select DRM_KMS_HELPER + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR select GENERIC_IRQ_CHIP select REGMAP select REGMAP_MMIO diff --git a/drivers/gpu/drm/imx/dc/Makefile b/drivers/gpu/drm/imx/dc/Makefile index 1ce3e8a8db22..b9d33c074984 100644 --- a/drivers/gpu/drm/imx/dc/Makefile +++ b/drivers/gpu/drm/imx/dc/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 -imx8-dc-drm-objs := dc-cf.o dc-de.o dc-drv.o dc-ed.o dc-fg.o dc-fl.o dc-fu.o \ - dc-fw.o dc-ic.o dc-lb.o dc-pe.o dc-tc.o +imx8-dc-drm-objs := dc-cf.o dc-crtc.o dc-de.o dc-drv.o dc-ed.o dc-fg.o dc-fl.o \ + dc-fu.o dc-fw.o dc-ic.o dc-kms.o dc-lb.o dc-pe.o \ + dc-plane.o dc-tc.o obj-$(CONFIG_DRM_IMX8_DC) += imx8-dc-drm.o diff --git a/drivers/gpu/drm/imx/dc/dc-crtc.c b/drivers/gpu/drm/imx/dc/dc-crtc.c new file mode 100644 index 000000000000..519db7634ce9 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-crtc.c @@ -0,0 +1,556 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-de.h" +#include "dc-drv.h" +#include "dc-kms.h" +#include "dc-pe.h" + +#define dc_crtc_dbg(crtc, fmt, ...) \ +do { \ + struct drm_crtc *_crtc = (crtc); \ + drm_dbg_kms(_crtc->dev, "[CRTC:%d:%s] " fmt, \ + _crtc->base.id, _crtc->name, ##__VA_ARGS__); \ +} while (0) + +#define dc_crtc_err(crtc, fmt, ...) \ +do { \ + struct drm_crtc *_crtc = (crtc); \ + drm_err(_crtc->dev, "[CRTC:%d:%s] " fmt, \ + _crtc->base.id, _crtc->name, ##__VA_ARGS__); \ +} while (0) + +#define DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(c) \ +do { \ + unsigned long ret; \ + ret = wait_for_completion_timeout(&dc_crtc->c, HZ); \ + if (ret == 0) \ + dc_crtc_err(crtc, "%s: wait for " #c " timeout\n", \ + __func__); \ +} while (0) + +#define DC_CRTC_CHECK_FRAMEGEN_FIFO(fg) \ +do { \ + struct dc_fg *_fg = (fg); \ + if (dc_fg_secondary_requests_to_read_empty_fifo(_fg)) { \ + dc_fg_secondary_clear_channel_status(_fg); \ + dc_crtc_err(crtc, "%s: FrameGen FIFO empty\n", \ + __func__); \ + } \ +} while (0) + +#define DC_CRTC_WAIT_FOR_FRAMEGEN_SECONDARY_SYNCUP(fg) \ +do { \ + if (dc_fg_wait_for_secondary_syncup(fg)) \ + dc_crtc_err(crtc, \ + "%s: FrameGen secondary channel isn't syncup\n",\ + __func__); \ +} while (0) + +static inline struct dc_crtc *to_dc_crtc(struct drm_crtc *crtc) +{ + return container_of(crtc, struct dc_crtc, base); +} + +static u32 dc_crtc_get_vblank_counter(struct drm_crtc *crtc) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + + return dc_fg_get_frame_index(dc_crtc->fg); +} + +static int dc_crtc_enable_vblank(struct drm_crtc *crtc) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + + enable_irq(dc_crtc->irq_dec_framecomplete); + + return 0; +} + +static void dc_crtc_disable_vblank(struct drm_crtc *crtc) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + + /* nosync due to atomic context */ + disable_irq_nosync(dc_crtc->irq_dec_framecomplete); +} + +static const struct drm_crtc_funcs dc_crtc_funcs = { + .reset = drm_atomic_helper_crtc_reset, + .destroy = drm_crtc_cleanup, + .set_config = drm_atomic_helper_set_config, + .page_flip = drm_atomic_helper_page_flip, + .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, + .get_vblank_counter = dc_crtc_get_vblank_counter, + .enable_vblank = dc_crtc_enable_vblank, + .disable_vblank = dc_crtc_disable_vblank, + .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp, +}; + +static void dc_crtc_queue_state_event(struct drm_crtc_state *crtc_state) +{ + struct drm_crtc *crtc = crtc_state->crtc; + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + + spin_lock_irq(&crtc->dev->event_lock); + if (crtc_state->event) { + WARN_ON(drm_crtc_vblank_get(crtc)); + WARN_ON(dc_crtc->event); + dc_crtc->event = crtc_state->event; + crtc_state->event = NULL; + } + spin_unlock_irq(&crtc->dev->event_lock); +} + +static inline enum drm_mode_status +dc_crtc_check_clock(struct dc_crtc *dc_crtc, int clk_khz) +{ + return dc_fg_check_clock(dc_crtc->fg, clk_khz); +} + +static enum drm_mode_status +dc_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + enum drm_mode_status status; + + status = dc_crtc_check_clock(dc_crtc, mode->clock); + if (status != MODE_OK) + return status; + + if (mode->crtc_clock > DC_FRAMEGEN_MAX_CLOCK_KHZ) + return MODE_CLOCK_HIGH; + + return MODE_OK; +} + +static int +dc_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct drm_display_mode *adj = &new_crtc_state->adjusted_mode; + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + enum drm_mode_status status; + + status = dc_crtc_check_clock(dc_crtc, adj->clock); + if (status != MODE_OK) + return -EINVAL; + + return 0; +} + +static void +dc_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct dc_drm_device *dc_drm = to_dc_drm_device(crtc->dev); + int idx, ret; + + if (!drm_atomic_crtc_needs_modeset(new_crtc_state) || + !new_crtc_state->active) + return; + + if (!drm_dev_enter(crtc->dev, &idx)) + return; + + /* request pixel engine power-on when CRTC starts to be active */ + ret = pm_runtime_resume_and_get(dc_drm->pe->dev); + if (ret) + dc_crtc_err(crtc, "failed to get DC pixel engine RPM: %d\n", + ret); + + drm_dev_exit(idx); +} + +static void +dc_crtc_atomic_flush(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *old_crtc_state = + drm_atomic_get_old_crtc_state(state, crtc); + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int idx; + + if (drm_atomic_crtc_needs_modeset(new_crtc_state) || + (!old_crtc_state->active && !new_crtc_state->active)) + return; + + if (!drm_dev_enter(crtc->dev, &idx)) + goto out; + + enable_irq(dc_crtc->irq_ed_cont_shdld); + + /* flush plane update out to display */ + dc_ed_pec_sync_trigger(dc_crtc->ed_cont); + + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(ed_cont_shdld_done); + + disable_irq(dc_crtc->irq_ed_cont_shdld); + + DC_CRTC_CHECK_FRAMEGEN_FIFO(dc_crtc->fg); + + drm_dev_exit(idx); + +out: + dc_crtc_queue_state_event(new_crtc_state); +} + +static void +dc_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct drm_display_mode *adj = &new_crtc_state->adjusted_mode; + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + enum dc_link_id cf_link; + int idx, ret; + + dc_crtc_dbg(crtc, "mode " DRM_MODE_FMT "\n", DRM_MODE_ARG(adj)); + + drm_crtc_vblank_on(crtc); + + if (!drm_dev_enter(crtc->dev, &idx)) + goto out; + + /* request display engine power-on when CRTC is enabled */ + ret = pm_runtime_resume_and_get(dc_crtc->de->dev); + if (ret < 0) + dc_crtc_err(crtc, "failed to get DC display engine RPM: %d\n", + ret); + + enable_irq(dc_crtc->irq_dec_shdld); + enable_irq(dc_crtc->irq_ed_cont_shdld); + enable_irq(dc_crtc->irq_ed_safe_shdld); + + dc_fg_cfg_videomode(dc_crtc->fg, adj); + + dc_cf_framedimensions(dc_crtc->cf_cont, + adj->crtc_hdisplay, adj->crtc_vdisplay); + dc_cf_framedimensions(dc_crtc->cf_safe, + adj->crtc_hdisplay, adj->crtc_vdisplay); + + /* constframe in safety stream shows blue frame */ + dc_cf_constantcolor_blue(dc_crtc->cf_safe); + cf_link = dc_cf_get_link_id(dc_crtc->cf_safe); + dc_ed_pec_src_sel(dc_crtc->ed_safe, cf_link); + + /* show CRTC background if no plane is enabled */ + if (new_crtc_state->plane_mask == 0) { + /* constframe in content stream shows black frame */ + dc_cf_constantcolor_black(dc_crtc->cf_cont); + + cf_link = dc_cf_get_link_id(dc_crtc->cf_cont); + dc_ed_pec_src_sel(dc_crtc->ed_cont, cf_link); + } + + dc_fg_enable_clock(dc_crtc->fg); + dc_ed_pec_sync_trigger(dc_crtc->ed_cont); + dc_ed_pec_sync_trigger(dc_crtc->ed_safe); + dc_fg_shdtokgen(dc_crtc->fg); + dc_fg_enable(dc_crtc->fg); + + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(ed_safe_shdld_done); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(ed_cont_shdld_done); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(dec_shdld_done); + + disable_irq(dc_crtc->irq_ed_safe_shdld); + disable_irq(dc_crtc->irq_ed_cont_shdld); + disable_irq(dc_crtc->irq_dec_shdld); + + DC_CRTC_WAIT_FOR_FRAMEGEN_SECONDARY_SYNCUP(dc_crtc->fg); + + DC_CRTC_CHECK_FRAMEGEN_FIFO(dc_crtc->fg); + + drm_dev_exit(idx); + +out: + dc_crtc_queue_state_event(new_crtc_state); +} + +static void +dc_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct dc_drm_device *dc_drm = to_dc_drm_device(crtc->dev); + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int idx, ret; + + if (!drm_dev_enter(crtc->dev, &idx)) + goto out; + + enable_irq(dc_crtc->irq_dec_seqcomplete); + dc_fg_disable(dc_crtc->fg); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(dec_seqcomplete_done); + disable_irq(dc_crtc->irq_dec_seqcomplete); + + dc_fg_disable_clock(dc_crtc->fg); + + /* request pixel engine power-off as plane is off too */ + ret = pm_runtime_put(dc_drm->pe->dev); + if (ret) + dc_crtc_err(crtc, "failed to put DC pixel engine RPM: %d\n", + ret); + + /* request display engine power-off when CRTC is disabled */ + ret = pm_runtime_put(dc_crtc->de->dev); + if (ret < 0) + dc_crtc_err(crtc, "failed to put DC display engine RPM: %d\n", + ret); + + drm_dev_exit(idx); + +out: + drm_crtc_vblank_off(crtc); + + spin_lock_irq(&crtc->dev->event_lock); + if (new_crtc_state->event && !new_crtc_state->active) { + drm_crtc_send_vblank_event(crtc, new_crtc_state->event); + new_crtc_state->event = NULL; + } + spin_unlock_irq(&crtc->dev->event_lock); +} + +static bool dc_crtc_get_scanout_position(struct drm_crtc *crtc, + bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int vdisplay = mode->crtc_vdisplay; + int vtotal = mode->crtc_vtotal; + bool reliable; + int line; + int idx; + + if (stime) + *stime = ktime_get(); + + if (!drm_dev_enter(crtc->dev, &idx)) { + reliable = false; + *vpos = 0; + *hpos = 0; + goto out; + } + + /* line index starts with 0 for the first active output line */ + line = dc_fg_get_line_index(dc_crtc->fg); + + if (line < vdisplay) + /* active scanout area - positive */ + *vpos = line + 1; + else + /* inside vblank - negative */ + *vpos = line - (vtotal - 1); + + *hpos = 0; + + reliable = true; + + drm_dev_exit(idx); +out: + if (etime) + *etime = ktime_get(); + + return reliable; +} + +static const struct drm_crtc_helper_funcs dc_helper_funcs = { + .mode_valid = dc_crtc_mode_valid, + .atomic_check = dc_crtc_atomic_check, + .atomic_begin = dc_crtc_atomic_begin, + .atomic_flush = dc_crtc_atomic_flush, + .atomic_enable = dc_crtc_atomic_enable, + .atomic_disable = dc_crtc_atomic_disable, + .get_scanout_position = dc_crtc_get_scanout_position, +}; + +static irqreturn_t dc_crtc_irq_handler_dec_framecomplete(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + struct drm_crtc *crtc = &dc_crtc->base; + unsigned long flags; + + drm_crtc_handle_vblank(crtc); + + spin_lock_irqsave(&crtc->dev->event_lock, flags); + if (dc_crtc->event) { + drm_crtc_send_vblank_event(crtc, dc_crtc->event); + dc_crtc->event = NULL; + drm_crtc_vblank_put(crtc); + } + spin_unlock_irqrestore(&crtc->dev->event_lock, flags); + + return IRQ_HANDLED; +} + +static irqreturn_t +dc_crtc_irq_handler_dec_seqcomplete_done(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + + complete(&dc_crtc->dec_seqcomplete_done); + + return IRQ_HANDLED; +} + +static irqreturn_t dc_crtc_irq_handler_dec_shdld_done(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + + complete(&dc_crtc->dec_shdld_done); + + return IRQ_HANDLED; +} + +static irqreturn_t dc_crtc_irq_handler_ed_cont_shdld_done(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + + complete(&dc_crtc->ed_cont_shdld_done); + + return IRQ_HANDLED; +} + +static irqreturn_t dc_crtc_irq_handler_ed_safe_shdld_done(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + + complete(&dc_crtc->ed_safe_shdld_done); + + return IRQ_HANDLED; +} + +static int dc_crtc_request_irqs(struct drm_device *drm, struct dc_crtc *dc_crtc) +{ + struct { + struct device *dev; + unsigned int irq; + irqreturn_t (*irq_handler)(int irq, void *dev_id); + } irqs[DC_CRTC_IRQS] = { + { + dc_crtc->de->dev, + dc_crtc->irq_dec_framecomplete, + dc_crtc_irq_handler_dec_framecomplete, + }, { + dc_crtc->de->dev, + dc_crtc->irq_dec_seqcomplete, + dc_crtc_irq_handler_dec_seqcomplete_done, + }, { + dc_crtc->de->dev, + dc_crtc->irq_dec_shdld, + dc_crtc_irq_handler_dec_shdld_done, + }, { + dc_crtc->ed_cont->dev, + dc_crtc->irq_ed_cont_shdld, + dc_crtc_irq_handler_ed_cont_shdld_done, + }, { + dc_crtc->ed_safe->dev, + dc_crtc->irq_ed_safe_shdld, + dc_crtc_irq_handler_ed_safe_shdld_done, + }, + }; + int i, ret; + + for (i = 0; i < DC_CRTC_IRQS; i++) { + struct dc_crtc_irq *irq = &dc_crtc->irqs[i]; + + ret = devm_request_irq(irqs[i].dev, irqs[i].irq, + irqs[i].irq_handler, IRQF_NO_AUTOEN, + dev_name(irqs[i].dev), dc_crtc); + if (ret) { + dev_err(irqs[i].dev, "failed to request irq(%u): %d\n", + irqs[i].irq, ret); + return ret; + } + + irq->dc_crtc = dc_crtc; + irq->irq = irqs[i].irq; + } + + return 0; +} + +int dc_crtc_init(struct dc_drm_device *dc_drm, int crtc_index) +{ + struct dc_crtc *dc_crtc = &dc_drm->dc_crtc[crtc_index]; + struct drm_device *drm = &dc_drm->base; + struct dc_de *de = dc_drm->de[crtc_index]; + struct dc_pe *pe = dc_drm->pe; + struct dc_plane *dc_primary; + int ret; + + dc_crtc->de = de; + + init_completion(&dc_crtc->dec_seqcomplete_done); + init_completion(&dc_crtc->dec_shdld_done); + init_completion(&dc_crtc->ed_cont_shdld_done); + init_completion(&dc_crtc->ed_safe_shdld_done); + + dc_crtc->cf_cont = pe->cf_cont[crtc_index]; + dc_crtc->cf_safe = pe->cf_safe[crtc_index]; + dc_crtc->ed_cont = pe->ed_cont[crtc_index]; + dc_crtc->ed_safe = pe->ed_safe[crtc_index]; + dc_crtc->fg = de->fg; + + dc_crtc->irq_dec_framecomplete = de->irq_framecomplete; + dc_crtc->irq_dec_seqcomplete = de->irq_seqcomplete; + dc_crtc->irq_dec_shdld = de->irq_shdld; + dc_crtc->irq_ed_safe_shdld = dc_crtc->ed_safe->irq_shdld; + dc_crtc->irq_ed_cont_shdld = dc_crtc->ed_cont->irq_shdld; + + dc_primary = &dc_drm->dc_primary[crtc_index]; + ret = dc_plane_init(dc_drm, dc_primary); + if (ret) { + dev_err(drm->dev, + "failed to init primary plane for display engine%u: %d\n", + de->id, ret); + return ret; + } + + drm_crtc_helper_add(&dc_crtc->base, &dc_helper_funcs); + + ret = drm_crtc_init_with_planes(drm, &dc_crtc->base, &dc_primary->base, + NULL, &dc_crtc_funcs, NULL); + if (ret) + dev_err(drm->dev, + "failed to add CRTC for display engine%u: %d\n", + de->id, ret); + + return ret; +} + +int dc_crtc_post_init(struct dc_drm_device *dc_drm, int crtc_index) +{ + struct dc_crtc *dc_crtc = &dc_drm->dc_crtc[crtc_index]; + struct drm_device *drm = &dc_drm->base; + + return dc_crtc_request_irqs(drm, dc_crtc); +} diff --git a/drivers/gpu/drm/imx/dc/dc-de.h b/drivers/gpu/drm/imx/dc/dc-de.h index b504de5589a5..6b9d0c107c0b 100644 --- a/drivers/gpu/drm/imx/dc/dc-de.h +++ b/drivers/gpu/drm/imx/dc/dc-de.h @@ -13,6 +13,9 @@ #define DC_DISPLAYS 2 +#define DC_FRAMEGEN_MAX_FRAME_INDEX 0x3ffff +#define DC_FRAMEGEN_MAX_CLOCK_KHZ 300000 + enum dc_de_id { DC_DE0, DC_DE1, diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c index fd68861f770a..986badce0a6f 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.c +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -3,11 +3,248 @@ * Copyright 2024 NXP */ +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-de.h" #include "dc-drv.h" +struct dc_priv { + struct drm_device *drm; + struct clk *clk_cfg; +}; + +DEFINE_DRM_GEM_DMA_FOPS(dc_drm_driver_fops); + +static struct drm_driver dc_drm_driver = { + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, + DRM_GEM_DMA_DRIVER_OPS, + DRM_FBDEV_DMA_DRIVER_OPS, + .fops = &dc_drm_driver_fops, + .name = "imx8-dc", + .desc = "i.MX8 DC DRM graphics", + .major = 1, + .minor = 0, + .patchlevel = 0, +}; + +static void +dc_add_components(struct device *dev, struct component_match **matchptr) +{ + struct device_node *child, *grandchild; + + for_each_available_child_of_node(dev->of_node, child) { + /* The interrupt controller is not a component. */ + if (of_device_is_compatible(child, "fsl,imx8qxp-dc-intc")) + continue; + + drm_of_component_match_add(dev, matchptr, component_compare_of, + child); + + for_each_available_child_of_node(child, grandchild) + drm_of_component_match_add(dev, matchptr, + component_compare_of, + grandchild); + } +} + +static void dc_drm_component_unbind_all(void *ptr) +{ + struct dc_drm_device *dc_drm = ptr; + struct drm_device *drm = &dc_drm->base; + + component_unbind_all(drm->dev, dc_drm); +} + +static int dc_drm_bind(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + struct dc_drm_device *dc_drm; + struct drm_device *drm; + int ret; + + dc_drm = devm_drm_dev_alloc(dev, &dc_drm_driver, struct dc_drm_device, + base); + if (IS_ERR(dc_drm)) + return PTR_ERR(dc_drm); + + drm = &dc_drm->base; + + ret = component_bind_all(dev, dc_drm); + if (ret) + return ret; + + ret = devm_add_action_or_reset(dev, dc_drm_component_unbind_all, + dc_drm); + if (ret) + return ret; + + ret = dc_kms_init(dc_drm); + if (ret) + return ret; + + ret = drm_dev_register(drm, 0); + if (ret) { + dev_err(dev, "failed to register drm device: %d\n", ret); + goto err; + } + + drm_client_setup_with_fourcc(drm, DRM_FORMAT_XRGB8888); + + priv->drm = drm; + + return 0; + +err: + dc_kms_uninit(dc_drm); + + return ret; +} + +static void dc_drm_unbind(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + struct dc_drm_device *dc_drm = to_dc_drm_device(priv->drm); + struct drm_device *drm = &dc_drm->base; + + priv->drm = NULL; + drm_dev_unplug(drm); + dc_kms_uninit(dc_drm); + drm_atomic_helper_shutdown(drm); +} + +static const struct component_master_ops dc_drm_ops = { + .bind = dc_drm_bind, + .unbind = dc_drm_unbind, +}; + +static int dc_probe(struct platform_device *pdev) +{ + struct component_match *match = NULL; + struct dc_priv *priv; + int ret; + + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->clk_cfg = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk_cfg)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk_cfg), + "failed to get cfg clock\n"); + + dev_set_drvdata(&pdev->dev, priv); + + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) + return ret; + + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret) + return ret; + + ret = devm_of_platform_populate(&pdev->dev); + if (ret) + return ret; + + dc_add_components(&pdev->dev, &match); + + ret = component_master_add_with_match(&pdev->dev, &dc_drm_ops, match); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component master\n"); + + return 0; +} + +static void dc_remove(struct platform_device *pdev) +{ + component_master_del(&pdev->dev, &dc_drm_ops); +} + +static int dc_runtime_suspend(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + + clk_disable_unprepare(priv->clk_cfg); + + return 0; +} + +static int dc_runtime_resume(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + int ret; + + ret = clk_prepare_enable(priv->clk_cfg); + if (ret) + dev_err(dev, "failed to enable cfg clock: %d\n", ret); + + return ret; +} + +static int dc_suspend(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + + return drm_mode_config_helper_suspend(priv->drm); +} + +static int dc_resume(struct device *dev) +{ + struct dc_priv *priv = dev_get_drvdata(dev); + + return drm_mode_config_helper_resume(priv->drm); +} + +static void dc_shutdown(struct platform_device *pdev) +{ + struct dc_priv *priv = dev_get_drvdata(&pdev->dev); + + drm_atomic_helper_shutdown(priv->drm); +} + +static const struct dev_pm_ops dc_pm_ops = { + RUNTIME_PM_OPS(dc_runtime_suspend, dc_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(dc_suspend, dc_resume) +}; + +static const struct of_device_id dc_dt_ids[] = { + { .compatible = "fsl,imx8qxp-dc", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, dc_dt_ids); + +static struct platform_driver dc_driver = { + .probe = dc_probe, + .remove = dc_remove, + .shutdown = dc_shutdown, + .driver = { + .name = "imx8-dc", + .of_match_table = dc_dt_ids, + .pm = pm_sleep_ptr(&dc_pm_ops), + }, +}; + static struct platform_driver * const dc_drivers[] = { &dc_cf_driver, &dc_de_driver, @@ -19,6 +256,7 @@ static struct platform_driver * const dc_drivers[] = { &dc_lb_driver, &dc_pe_driver, &dc_tc_driver, + &dc_driver, }; static int __init dc_drm_init(void) diff --git a/drivers/gpu/drm/imx/dc/dc-drv.h b/drivers/gpu/drm/imx/dc/dc-drv.h index 01f3c355beba..34d2b927fe43 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -6,11 +6,14 @@ #ifndef __DC_DRV_H__ #define __DC_DRV_H__ +#include #include #include +#include #include "dc-de.h" +#include "dc-kms.h" #include "dc-pe.h" /** @@ -19,12 +22,31 @@ struct dc_drm_device { /** @base: base drm_device structure */ struct drm_device base; + /** @dc_crtc: DC specific CRTC list */ + struct dc_crtc dc_crtc[DC_DISPLAYS]; + /** @dc_primary: DC specific primary plane list */ + struct dc_plane dc_primary[DC_DISPLAYS]; + /** @encoder: encoder list */ + struct drm_encoder encoder[DC_DISPLAYS]; /** @de: display engine list */ struct dc_de *de[DC_DISPLAYS]; /** @pe: pixel engine */ struct dc_pe *pe; }; +static inline struct dc_drm_device *to_dc_drm_device(struct drm_device *drm) +{ + return container_of(drm, struct dc_drm_device, base); +} + +int dc_crtc_init(struct dc_drm_device *dc_drm, int crtc_index); +int dc_crtc_post_init(struct dc_drm_device *dc_drm, int crtc_index); + +int dc_kms_init(struct dc_drm_device *dc_drm); +void dc_kms_uninit(struct dc_drm_device *dc_drm); + +int dc_plane_init(struct dc_drm_device *dc_drm, struct dc_plane *dc_plane); + extern struct platform_driver dc_cf_driver; extern struct platform_driver dc_ed_driver; extern struct platform_driver dc_de_driver; diff --git a/drivers/gpu/drm/imx/dc/dc-kms.c b/drivers/gpu/drm/imx/dc/dc-kms.c new file mode 100644 index 000000000000..2b18aa37a4a8 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-kms.c @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-de.h" +#include "dc-drv.h" +#include "dc-kms.h" + +static const struct drm_mode_config_funcs dc_drm_mode_config_funcs = { + .fb_create = drm_gem_fb_create, + .atomic_check = drm_atomic_helper_check, + .atomic_commit = drm_atomic_helper_commit, +}; + +static int dc_kms_init_encoder_per_crtc(struct dc_drm_device *dc_drm, + int crtc_index) +{ + struct dc_crtc *dc_crtc = &dc_drm->dc_crtc[crtc_index]; + struct drm_device *drm = &dc_drm->base; + struct drm_crtc *crtc = &dc_crtc->base; + struct drm_connector *connector; + struct device *dev = drm->dev; + struct drm_encoder *encoder; + struct drm_bridge *bridge; + int ret; + + bridge = devm_drm_of_get_bridge(dev, dc_crtc->de->tc->dev->of_node, + 0, 0); + if (IS_ERR(bridge)) { + ret = PTR_ERR(bridge); + if (ret == -ENODEV) + return 0; + + return dev_err_probe(dev, ret, + "failed to find bridge for CRTC%u\n", + crtc->index); + } + + encoder = &dc_drm->encoder[crtc_index]; + ret = drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_NONE); + if (ret) { + dev_err(dev, "failed to initialize encoder for CRTC%u: %d\n", + crtc->index, ret); + return ret; + } + + encoder->possible_crtcs = drm_crtc_mask(crtc); + + ret = drm_bridge_attach(encoder, bridge, NULL, + DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (ret) { + dev_err(dev, + "failed to attach bridge to encoder for CRTC%u: %d\n", + crtc->index, ret); + return ret; + } + + connector = drm_bridge_connector_init(drm, encoder); + if (IS_ERR(connector)) { + ret = PTR_ERR(connector); + dev_err(dev, "failed to init bridge connector for CRTC%u: %d\n", + crtc->index, ret); + return ret; + } + + ret = drm_connector_attach_encoder(connector, encoder); + if (ret) + dev_err(dev, + "failed to attach encoder to connector for CRTC%u: %d\n", + crtc->index, ret); + + return ret; +} + +int dc_kms_init(struct dc_drm_device *dc_drm) +{ + struct drm_device *drm = &dc_drm->base; + int ret, i; + + ret = drmm_mode_config_init(drm); + if (ret) + return ret; + + drm->mode_config.min_width = 60; + drm->mode_config.min_height = 60; + drm->mode_config.max_width = 8192; + drm->mode_config.max_height = 8192; + drm->mode_config.funcs = &dc_drm_mode_config_funcs; + + drm->vblank_disable_immediate = true; + drm->max_vblank_count = DC_FRAMEGEN_MAX_FRAME_INDEX; + + for (i = 0; i < DC_DISPLAYS; i++) { + ret = dc_crtc_init(dc_drm, i); + if (ret) + return ret; + + ret = dc_kms_init_encoder_per_crtc(dc_drm, i); + if (ret) + return ret; + } + + for (i = 0; i < DC_DISPLAYS; i++) { + ret = dc_crtc_post_init(dc_drm, i); + if (ret) + return ret; + } + + ret = drm_vblank_init(drm, DC_DISPLAYS); + if (ret) { + dev_err(drm->dev, "failed to init vblank support: %d\n", ret); + return ret; + } + + drm_mode_config_reset(drm); + + drm_kms_helper_poll_init(drm); + + return 0; +} + +void dc_kms_uninit(struct dc_drm_device *dc_drm) +{ + drm_kms_helper_poll_fini(&dc_drm->base); +} diff --git a/drivers/gpu/drm/imx/dc/dc-kms.h b/drivers/gpu/drm/imx/dc/dc-kms.h new file mode 100644 index 000000000000..4ebfbb07a5e9 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-kms.h @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_KMS_H__ +#define __DC_KMS_H__ + +#include + +#include +#include +#include + +#include "dc-de.h" +#include "dc-fu.h" +#include "dc-pe.h" + +#define DC_CRTC_IRQS 5 + +struct dc_crtc_irq { + struct dc_crtc *dc_crtc; + unsigned int irq; +}; + +/** + * struct dc_crtc - DC specific drm_crtc + * + * Each display controller contains one content stream and one safety stream. + * In general, the two streams have the same functionality. One stream is + * overlaid on the other by @fg. This driver chooses to generate black constant + * color from the content stream as background color, build plane(s) on the + * content stream by using layerblend(s) and always generate a constant color + * from the safety stream. Note that due to the decoupled timing, the safety + * stream still works to show the constant color properly even when the content + * stream has completely hung up due to mal-function of this driver. + */ +struct dc_crtc { + /** @base: base drm_crtc structure */ + struct drm_crtc base; + /** @de: display engine */ + struct dc_de *de; + /** @cf_cont: content stream constframe */ + struct dc_cf *cf_cont; + /** @cf_safe: safety stream constframe */ + struct dc_cf *cf_safe; + /** @ed_cont: content stream extdst */ + struct dc_ed *ed_cont; + /** @ed_safe: safety stream extdst */ + struct dc_ed *ed_safe; + /** @fg: framegen */ + struct dc_fg *fg; + /** + * @irq_dec_framecomplete: + * + * display engine configuration frame complete interrupt + */ + unsigned int irq_dec_framecomplete; + /** + * @irq_dec_seqcomplete: + * + * display engine configuration sequence complete interrupt + */ + unsigned int irq_dec_seqcomplete; + /** + * @irq_dec_shdld: + * + * display engine configuration shadow load interrupt + */ + unsigned int irq_dec_shdld; + /** + * @irq_ed_cont_shdld: + * + * content stream extdst shadow load interrupt + */ + unsigned int irq_ed_cont_shdld; + /** + * @irq_ed_safe_shdld: + * + * safety stream extdst shadow load interrupt + */ + unsigned int irq_ed_safe_shdld; + /** + * @dec_seqcomplete_done: + * + * display engine configuration sequence completion + */ + struct completion dec_seqcomplete_done; + /** + * @dec_shdld_done: + * + * display engine configuration shadow load completion + */ + struct completion dec_shdld_done; + /** + * @ed_cont_shdld_done: + * + * content stream extdst shadow load completion + */ + struct completion ed_cont_shdld_done; + /** + * @ed_safe_shdld_done: + * + * safety stream extdst shadow load completion + */ + struct completion ed_safe_shdld_done; + /** @event: cached pending vblank event */ + struct drm_pending_vblank_event *event; + /** @irqs: interrupt list */ + struct dc_crtc_irq irqs[DC_CRTC_IRQS]; +}; + +/** + * struct dc_plane - DC specific drm_plane + * + * Build a plane on content stream with a fetchunit and a layerblend. + */ +struct dc_plane { + /** @base: base drm_plane structure */ + struct drm_plane base; + /** @fu: fetchunit */ + struct dc_fu *fu; + /** @cf: content stream constframe */ + struct dc_cf *cf; + /** @lb: layerblend */ + struct dc_lb *lb; + /** @ed: content stream extdst */ + struct dc_ed *ed; +}; + +#endif /* __DC_KMS_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-plane.c b/drivers/gpu/drm/imx/dc/dc-plane.c new file mode 100644 index 000000000000..0ccd77d2daae --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-plane.c @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-kms.h" + +#define DC_PLANE_MAX_PITCH 0x10000 +#define DC_PLANE_MAX_PIX_CNT 8192 + +#define dc_plane_dbg(plane, fmt, ...) \ +do { \ + struct drm_plane *_plane = (plane); \ + drm_dbg_kms(_plane->dev, "[PLANE:%d:%s] " fmt, \ + _plane->base.id, _plane->name, ##__VA_ARGS__); \ +} while (0) + +static const uint32_t dc_plane_formats[] = { + DRM_FORMAT_XRGB8888, +}; + +static const struct drm_plane_funcs dc_plane_funcs = { + .update_plane = drm_atomic_helper_update_plane, + .disable_plane = drm_atomic_helper_disable_plane, + .destroy = drm_plane_cleanup, + .reset = drm_atomic_helper_plane_reset, + .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, +}; + +static inline struct dc_plane *to_dc_plane(struct drm_plane *plane) +{ + return container_of(plane, struct dc_plane, base); +} + +static int dc_plane_check_no_off_screen(struct drm_plane_state *state, + struct drm_crtc_state *crtc_state) +{ + if (state->dst.x1 < 0 || state->dst.y1 < 0 || + state->dst.x2 > crtc_state->adjusted_mode.hdisplay || + state->dst.y2 > crtc_state->adjusted_mode.vdisplay) { + dc_plane_dbg(state->plane, "no off screen\n"); + return -EINVAL; + } + + return 0; +} + +static int dc_plane_check_max_source_resolution(struct drm_plane_state *state) +{ + int src_h = drm_rect_height(&state->src) >> 16; + int src_w = drm_rect_width(&state->src) >> 16; + + if (src_w > DC_PLANE_MAX_PIX_CNT || src_h > DC_PLANE_MAX_PIX_CNT) { + dc_plane_dbg(state->plane, "invalid source resolution\n"); + return -EINVAL; + } + + return 0; +} + +static int dc_plane_check_fb(struct drm_plane_state *state) +{ + struct drm_framebuffer *fb = state->fb; + dma_addr_t baseaddr = drm_fb_dma_get_gem_addr(fb, state, 0); + + /* base address alignment */ + if (baseaddr & 0x3) { + dc_plane_dbg(state->plane, "fb bad baddr alignment\n"); + return -EINVAL; + } + + /* pitches[0] range */ + if (fb->pitches[0] > DC_PLANE_MAX_PITCH) { + dc_plane_dbg(state->plane, "fb pitches[0] is out of range\n"); + return -EINVAL; + } + + /* pitches[0] alignment */ + if (fb->pitches[0] & 0x3) { + dc_plane_dbg(state->plane, "fb bad pitches[0] alignment\n"); + return -EINVAL; + } + + return 0; +} + +static int +dc_plane_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state) +{ + struct drm_plane_state *plane_state = + drm_atomic_get_new_plane_state(state, plane); + struct drm_crtc_state *crtc_state; + int ret; + + /* ok to disable */ + if (!plane_state->fb) + return 0; + + if (!plane_state->crtc) { + dc_plane_dbg(plane, "no CRTC in plane state\n"); + return -EINVAL; + } + + crtc_state = + drm_atomic_get_existing_crtc_state(state, plane_state->crtc); + if (WARN_ON(!crtc_state)) + return -EINVAL; + + ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state, + DRM_PLANE_NO_SCALING, + DRM_PLANE_NO_SCALING, + true, false); + if (ret) { + dc_plane_dbg(plane, "failed to check plane state: %d\n", ret); + return ret; + } + + ret = dc_plane_check_no_off_screen(plane_state, crtc_state); + if (ret) + return ret; + + ret = dc_plane_check_max_source_resolution(plane_state); + if (ret) + return ret; + + return dc_plane_check_fb(plane_state); +} + +static void +dc_plane_atomic_update(struct drm_plane *plane, struct drm_atomic_state *state) +{ + struct drm_plane_state *new_state = + drm_atomic_get_new_plane_state(state, plane); + struct dc_plane *dplane = to_dc_plane(plane); + struct drm_framebuffer *fb = new_state->fb; + const struct dc_fu_ops *fu_ops; + struct dc_lb *lb = dplane->lb; + struct dc_fu *fu = dplane->fu; + dma_addr_t baseaddr; + int src_w, src_h; + int idx; + + if (!drm_dev_enter(plane->dev, &idx)) + return; + + src_w = drm_rect_width(&new_state->src) >> 16; + src_h = drm_rect_height(&new_state->src) >> 16; + + baseaddr = drm_fb_dma_get_gem_addr(fb, new_state, 0); + + fu_ops = dc_fu_get_ops(dplane->fu); + + fu_ops->set_layerblend(fu, lb); + fu_ops->set_burstlength(fu, baseaddr); + fu_ops->set_src_stride(fu, DC_FETCHUNIT_FRAC0, fb->pitches[0]); + fu_ops->set_src_buf_dimensions(fu, DC_FETCHUNIT_FRAC0, src_w, src_h); + fu_ops->set_fmt(fu, DC_FETCHUNIT_FRAC0, fb->format); + fu_ops->set_framedimensions(fu, src_w, src_h); + fu_ops->set_baseaddress(fu, DC_FETCHUNIT_FRAC0, baseaddr); + fu_ops->enable_src_buf(fu, DC_FETCHUNIT_FRAC0); + + dc_plane_dbg(plane, "uses %s\n", fu_ops->get_name(fu)); + + dc_lb_pec_dynamic_prim_sel(lb, dc_cf_get_link_id(dplane->cf)); + dc_lb_pec_dynamic_sec_sel(lb, fu_ops->get_link_id(fu)); + dc_lb_mode(lb, LB_BLEND); + dc_lb_position(lb, new_state->dst.x1, new_state->dst.y1); + dc_lb_pec_clken(lb, CLKEN_AUTOMATIC); + + dc_plane_dbg(plane, "uses LayerBlend%d\n", dc_lb_get_id(lb)); + + /* set ExtDst's source to LayerBlend */ + dc_ed_pec_src_sel(dplane->ed, dc_lb_get_link_id(lb)); + + drm_dev_exit(idx); +} + +static void dc_plane_atomic_disable(struct drm_plane *plane, + struct drm_atomic_state *state) +{ + struct dc_plane *dplane = to_dc_plane(plane); + const struct dc_fu_ops *fu_ops; + int idx; + + if (!drm_dev_enter(plane->dev, &idx)) + return; + + /* disable fetchunit in shadow */ + fu_ops = dc_fu_get_ops(dplane->fu); + fu_ops->disable_src_buf(dplane->fu, DC_FETCHUNIT_FRAC0); + + /* set ExtDst's source to ConstFrame */ + dc_ed_pec_src_sel(dplane->ed, dc_cf_get_link_id(dplane->cf)); + + drm_dev_exit(idx); +} + +static const struct drm_plane_helper_funcs dc_plane_helper_funcs = { + .atomic_check = dc_plane_atomic_check, + .atomic_update = dc_plane_atomic_update, + .atomic_disable = dc_plane_atomic_disable, +}; + +int dc_plane_init(struct dc_drm_device *dc_drm, struct dc_plane *dc_plane) +{ + struct drm_plane *plane = &dc_plane->base; + int ret; + + ret = drm_universal_plane_init(&dc_drm->base, plane, 0, &dc_plane_funcs, + dc_plane_formats, + ARRAY_SIZE(dc_plane_formats), + NULL, DRM_PLANE_TYPE_PRIMARY, NULL); + if (ret) + return ret; + + drm_plane_helper_add(plane, &dc_plane_helper_funcs); + + dc_plane->fu = dc_drm->pe->fu_disp[plane->index]; + dc_plane->cf = dc_drm->pe->cf_cont[plane->index]; + dc_plane->lb = dc_drm->pe->lb[plane->index]; + dc_plane->ed = dc_drm->pe->ed_cont[plane->index]; + + return 0; +} From patchwork Mon Dec 23 06:41:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918513 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2083.outbound.protection.outlook.com [40.107.20.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 688351940B1 for ; Mon, 23 Dec 2024 06:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936213; cv=fail; b=MUiN49R0cKpFvi5DztznSf1Ge95337FOeE5gvpa04QKsarKr8/JqjRxArf2ea+35v8wPxyU/62+6f0tpybtDtkCdZxGCArvmBANpvjXYzUWD/wb98j5EWVCYqxsI6lUYf5A6FZmpPfbOIQEsbGf+C7ciF3Vtk69eWHqWjVPCoSc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936213; c=relaxed/simple; bh=Bbpk7iAy9j1bHOerQjM9vRGIN9cKM51fHvsCrpTHq80=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=jcIEIjr0n4wRuq/EcwQ7QtLgpdj6puqfqiOM8liyUSDCgsZErTLczmphbn1tlc35oBSSPRPugpOVqV5OH18nthH7zZYgcdOQDLon1cWPwbng9IMVyrZZ4qe0MCaxD9RQ7tizcZjk7I2RJUy/ocGM3//2OPAZaRjDn7Zro2SBVPI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=FgyZ8W6q; arc=fail smtp.client-ip=40.107.20.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="FgyZ8W6q" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PXvRgWay/OW4RYpdEZjTIz0yxbxrjICDJhm1qUfGa/rpESBReKkiwnDpZ2fI6LFkTCnLJgdjSKpNjylBkngENNRKBJQ0Ds9+HjdUs37vZHg9qAuAqrvaHATTx2TzAdsgGpG7YYy28L4KnXgLZXgGsCjI6cUTCtz5uYqcBXNH5nZ/PMSkIsIPfqqHiU/E49CWt3g9vFC7dnZqXPd2JlwiEl+b+ReERksWBfbY0UcvcPJQK1yuTAxJOJPK8NVU1cMRwnIZhhB9Z+UHvMjowo8I0zkLRJSKagxg7TOjhoJeJQQ/U4oiSSvsrQsRZOAPXIhy89CU1V7gbf/EaWPrsOFKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RvVlspONK4Ell/oxGGNW9RjJh/ikV3tQwHd8JQVXrHY=; b=k7fsnlcRJeyC6lwwNjaQrTxP5rUmIkZIYdyElLgArWXmB2AmIpwSbr5lRSsSArOEqfJL2dz3nWzLQq9Zx8mvVY01w6X3vylmsRX3WZbKReE8bBgBiMiE5hcHtbQ3+SVTU6oQ3Tkzv1ehfehf25mafia03qn7KIBKI8ww1iR3fUZ4q74N6uS25S1wpd9NmrVELWqM5KtGaIJlxKUdGicZrwgKnbQrKhQRpKXAUfe21Zg7VWtt5k3NdF2vATLzLs97vp19kQ55M3/VDuFCBnxeYhS+Ughbm8ORGtOucqtPwBctJKJ4lIym17ItvowmW65aF8EMCLIGZMqpbmSAVxHdbA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RvVlspONK4Ell/oxGGNW9RjJh/ikV3tQwHd8JQVXrHY=; b=FgyZ8W6qGNeKinNWycKAZgvTgJhQbFbvy6gFmISmY1D7Thtz+1LLPZmxwgad8zgKH/9UuPk6sN7UVAk6ScBLXpMG84cy76tQ23HTCl3pvvtWYImS/dWTSV93CXAcxGwOp6u5fT4crr1fWGcG6hao7acQcSnwH5LPrbB2mCRzuZLGHCjL73OXvQ6kwH7igZnXIfQyuJDjG3K3UFctl99OcgwOXo+GEQ8afC1EPvtrI5hrR+1SJDN3mMgpXwTj6fwG9c1iPK0K2atlnDzuV/yHm0AWpEahiWf7bmGWIlvsp1o4z3GMLzPHlQmR9oDevGXWN6/lo7HmFVa/ncGI/hw0iw== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:25 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:25 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [PATCH v7 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Mon, 23 Dec 2024 14:41:41 +0800 Message-Id: <20241223064147.3961652-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 09ab949d-ceaf-4fb5-e66c-08dd231d198c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|7053199007|38350700014; X-Microsoft-Antispam-Message-Info: QZUUVXw1Egr50jOGqg66eGI4oGIEz1H+m9p9ifAuuBMFM5ZxCEtuRGm0NXWPDihiht1j01q9q609EhxRmx9G4VZ7VSTyDsf+J8UwZvaEye0G2RUfVWazpjqrM5INj84QhXF9kjgt15nv9VrB8aMgIwKweeyGDsrvAac1IbuehShjccCyAmLRB1RC7POuM4vL/LJbsWJwJCK41oWvdTL6TYuNQhv1Cv1pX/pw0sH/pZEoAjApAEqc9Ovq/nH1RGrTmMUF/Hjgr22lwRqCzHNWFvdy8xMykU6zisX6bS2oGWISf1MuOpEt/zUXbfUAy8A8pNmPYqSwBSxqtkQpP/B41JqXU149nm21unDd41sRlrHZciIf5f3rTUhhJOre1dfe+DhdzJxqnV4NMrkiB+aa/qirvjkASxlIpHmVlOFZfYMvzBsVh9SUIAxX3CC8/SY65sOYSVU1ybWlizcPuGyPe63i25MYCBwC1w5LpwyuPzZrfaW9iZsDvcufD3vlRgnUXMJMRntn/z0kC7ed9DqAVFd6YeNO6gt/lJySUgKECaUY/DY3xnm9+WabbcsJ9XnCEg5V6YuTxVFyKdI8RrjISHdesO+DUKNI5ltjhg0IdCw0t3WG7I++0aR/0DfsSWJfM9icuDwsRhoZIMWE8m/NLJL/YwDrgg9RGOLiYdF8ahjktj8Hahl9Ua58CScTi22zvAIX5F6OxkY2nevGXzkOavxcM9Kf9UXEiSFqJinrDVec7QMj3KmC/fAMtlZcrju+6akku9c7jdAARoQWARLRcN7RD6/4ndCwR0H44/nJFP4lJ+/rWdMh8RYo9KmaXTWtJJfkUIo/YO6cc5ll12MCmtrwaz62jUfbYK+8wuWuE7rcSwvTLpW5tbSyyfKbWDBuqfZv9/nzPD/vgzX0kHlCtBMKwMmQqTaK+GlyJ3w3MX7fz2NtpxO5//+5Adni1QSrTYU544x+fXNgIwNKmBNYkxhXDGRmj3pjULOITZWudx4FRSmKBgRYyz4F42X/0+b9WH8eC4LkFp/SoGcV5gw06JHFsLYSZOuWfGWm3IhQLCBa9wDrie6aayReJpF9H+kMexegBe/mPF1lBBRtQV6E6FgxHzxgszDrx7LgBbJXkNetz29AXmNeTzGmTlBvlKjJ5pq8EiTbGuJq2syKZpk7V5No8n3/lgTXi7wU6UmEYaOb2/+X/1AN0SinixFH5gr2Y/MfKBqLCoXt8LIFaZEpxxj2vuDrOhWY4QluLlW3UW6jjhTABtLcDTRbGTDbGcqhGnxZM1nuHofrEi91YmdXOfsmQStpst5BSosExVbmkkuGqaMV/xQ5bakZgp42MBZuvbSZxDMNfhvz2nSmwe1tJELgaXRJgY27QHRaHiEtRJXlnHAj7XYhdptzATSi0GXgBbtHERXnmPpJJ90bba2+Ug== 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(7053199007)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +6x8mXKldD28lxgokqRGe0b9QnPW5doEkxtmI4262LgB75efu4X8r/Oh4d4A3KRVMABTrKoDf1546x/0MnvpRHeztWb3WSNm0MFGu1HlzT4r1vwUl/xhyndZsylshMdhAhDGfdjUs3O0UoMDjXOrSp7TCd9jV+XBH+imd8zamcepdCNbRkX2vg7OaE1YQZ1w6jzqBX4Rs7vLWYSv2xs1vY32bM4KlHlKcRtpfAkmCFbb7c3x/cKiZEQL2y3OxrTJiE5hvJ3owuSfbZePDZ6jM6ZIMIq7NSxmhsSOy/VDxAER3hZlUwhHu7bKWxc4+e0J0AI7Os5wXVYinA/+7BsHC3FLM3aFBukaAlobZ36tFNzXhpQqKMtKmYN4z6rvscdm0ltQpRvv5nssjBc9N8QO3SWdvlwj3qR6sLlb5ZXKQe67GrmT7k8616rDOQyUEVG0ZtSqNtzpuoPVRul7wpnDcLGAZtFx77shrsg0FoIySCtUPmuwyCr2yKN0dLWIleOu0ExtvzG3mIefUT/ULIyhIuiAeu5ycor+CfFxSNhT78z9IfsCTaPSXjyFL6zHbayYTrJw6hRwW+1m/g/Wbdte5CclfuVAHzelIymbc1HYWOjCXM83jipTAzMf5yHFcYCFFfdaWEg9cdeTrFP7d9ef1GC0G0t0MNLsfZE1h6EyjFwRfvNCsk6te03JaIpqO3Dkax6Lt8SRNgYQ5ezyxANffhqqtQvFOj4wYKVYZVBnRe8cO5AnvkwfBbX+QVZ5UaZY57sWiPOUp9S8m/nbw7g/3WhJOdhhj9KGdLHjBysfWUsOXnRqcHokn9K9WVE4pEh9BtdKvABsIYv6mNC0qsQYUJSwDtYg2tqjmh1BQj327JY944z9IgrH2MRGeA9ih8cDeOWQ1S5dmgnJUpftqoG3LNY1bSKQbgE2l2l6euO4KDMQXjCjtJ2D2vXLlO4hHSosJDwXgwg9cFe02dG6Anm/V8gjVEeSLibnXkhw6xP40MrBjxCMXwrXBQSJW/tMdcehv5z2HNGhynsp77qyNL3LgN0t9rJAs2XqT59aVsuWsv7BBmtW6VksYasgvWHceWm2mgkeQIR6t6+BDRcMR1k6LuTW0nrQ7yLN8+UxozTGG6dAj0NYUz9Ng2Hi6Aenx/efoF+Zht8YRNdVG1+6n89vT5k1KMQ6DFa+I7mapeX/KkVUu6evrO2yiOBFfk8rnBq3vuWoVz501ygy/eo/jFA+Bv5BLyCuOwZFk8aNxHR3k87tL9Bl73wpCszQ1KRApoCrR/lPirtaTV9WpEHOCQNtYS0PK7QAfPLZtK3Jsx1DwM3BN5hU0DMhaFAwHjIfyuV4Tr1KuQPDeb04LAqqASZbX0usw+OIUKgXg3KjNovxTLfYx2wh7FMt+cc+bzWro3rlvqakOlVzOZuFrsFKlTymabuwVQu4Ewx8HVQjn6sWgQSBcCErT93qs3DF0o0DG/vx241mFInMMQCrWrmilTRBf8Z58WKhB+N1owE2TzJUsG9Ax5vWVnd86HD4YrzpAhnmUVTMZOsMyoOlbB5FOZ5r4Im3TI8qeIq/SxkvYkQprBoOLhcyQ+VtKMfcCsU54RDy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09ab949d-ceaf-4fb5-e66c-08dd231d198c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:25.1389 (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: NB3d0ubGT9KwsMDD9CdL0CObiXyWcRnglC7KeiMkCLfB7puR7uICybkY3+DilPSufr6p7zkn+PfwrZI1D4lGOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * Improve file list. (Frank) MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d2ab799a0659..0459878925df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7735,6 +7735,14 @@ F: Documentation/devicetree/bindings/display/imx/ F: drivers/gpu/drm/imx/ipuv3/ F: drivers/gpu/ipu-v3/ +DRM DRIVERS FOR FREESCALE IMX8 DISPLAY CONTROLLER +M: Liu Ying +L: dri-devel@lists.freedesktop.org +S: Maintained +T: git https://gitlab.freedesktop.org/drm/misc/kernel.git +F: Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc*.yaml +F: drivers/gpu/drm/imx/dc/ + DRM DRIVERS FOR FREESCALE IMX BRIDGE M: Liu Ying L: dri-devel@lists.freedesktop.org From patchwork Mon Dec 23 06:41:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918514 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2041.outbound.protection.outlook.com [40.107.21.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C27018A931 for ; Mon, 23 Dec 2024 06:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936220; cv=fail; b=Al3SYwhSXefZ1q3IJ3PG8wmemJ0nE3XVR/aCFUP3S2AvISknH94D/cOXu0pHo7jI8/+vNZEBfJN+nVMEggYu2zJ+tpcXbVcCiQ44tyLzTSobI8oCHcuncd6SkLm4sDU50qF0ipa5XJpXdfYDxzOH3CLHCFcv/SKYqgvmJvNAqlg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936220; c=relaxed/simple; bh=K1w2olcnGArybDhUzLO4yzG0EZXTcG+nQjHJzY6aekg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=NZYffriNIb/SSf9V3HGJuLePr2Uw6d7kew2/vTY7RWMreAV7NlChZYL5jdvHj7J9SwSWHhhmnpYgPRsyquXV1iwGGolqdrd215fTd/HikvjLI++jY0QdPcgOXPN+tFBHI92PeqXH6VOvHDDsOklhZbebi7I0gUn0kNUhiUNRQSw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=DenYbJ26; arc=fail smtp.client-ip=40.107.21.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="DenYbJ26" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I83307TsRqeUM8hAlVMW7NofbdKmSA4wvmd2SZRpjx7JOKaXxJ3WAenB/qCKn3FssKFeEy9ojI6ZvKUEIKLnr33r3D47/N+CD8EeFuBhD15h6br7MyV9Zlz1k+PvUFu73tkKyENVUIuCtKoGRiCQdhceKs3ebPdfkN3mMN9uhfH++8e9HGA7ICGEVKAjbcTXM7br4V1YHs4Ws+KAZVOUyp0eKIUigcD4phccsmo85TPf97zyTG4mPpdkwwCJmBQKBNF/UhJZFBev3RAV+6kMgy0flEEdb+GgF6yo/PuRQV4yc2M9AHWMKvsZOJk5wVPyqOHIUTwK5iGGwpcjVGWb7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wG6/JzaMRxk3dfZhVC9OJQ9riNRSkwXcHHHfGpp2Plk=; b=jg7CpxazgGWzfZjvbZ7yvqFGCtORysHTaBnafu8GILGmPEAHGTLJIuU78336Nwd7FugHVl/mRqdTY+MfAdlbb6Ed8kHTCVAI0R6tmO7m1YwiAMhtoVDWwDZac1kWOLAXftGfvfJjk2GlLugNnYzUrTNTYLFYFEx2mNAibAB0hYQlLbK3ihGmOioPS1GN4c7zpGG+sDGI4PhzpejjiwmD4tPZ+YK7ji+3CN8KzgABzmidYv/DrkDJhMkC8qeGVFYBKHTwlBnPX7SyRbVHb80wsaI3CmW9nm67uNvCm3G8i0xyisyoBRd2XWrR3MiuNbyZBx5XP+LpFcJuLCMa+wEzAw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wG6/JzaMRxk3dfZhVC9OJQ9riNRSkwXcHHHfGpp2Plk=; b=DenYbJ26tSfUK7CI1TyPbsqbGDaXaR/VDMDKfnA8jjlFfIGMCf71jiAtSigPaZI8kzN9totH4FqonPoJkhtDEzE9N5ackVTSnwAiJJwTmqtMrMCm7JVcqRw8JDK6Zxas7WVqcrW5kifQ5N7N11+/Wm7VapSBTYjYurMQahdiccimfgl9S1H+O2kEugULGYGGjfA698elGHO44jdNUF1QMKE24U1MccRE7Qgz6gLAtaQChbYD0UxIgKByBY2EGFPZApHSsHUeL5VXIWWhIhB9P13WiNs4tdZU6lNJoa2eWPQcK1mV0jskoaxXYYjUuedj3d5Ei4MQYHKwdqNWHIFQlQ== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:32 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:32 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 14/19] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Date: Mon, 23 Dec 2024 14:41:42 +0800 Message-Id: <20241223064147.3961652-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 260e29d1-9080-4bd4-d1a3-08dd231d1e38 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: i1ETTbsok+44D4HIh9oLhMfXKx5hmJXiJ0QhJmYcAoYRge43Gu5/AvOOKKkxHJ/pB7a2QlKk5nwKRGEOIisrQgz1aI1Q0FFr9HP6Zo6utBSOBoIGnomvOYLPTQhZ9z9fVq6SKagGy5lWFnQTscx0YTp1U+F2t9769t1EIc/w9xdsEWb3QzzN6A7MEIzIVt1Tr87egjfLqmNwrWV+cq5foIAwsUMF2V9sIB5gUjcPBSF0v8pzNs7sHOuTAug4fsJ2S66DG+pHRjhhXoG7ijFR4NVfeQCMQJsph/GTsxZ7eyCJSA7f6yhtoqAPFU9SmkcAxciXRveXgHfeQ3FQxZVCNstAh/A9GZGj4BD63H+ci0KnirgCRqHr1AiS/FetZ9PR7YuKAfOXKXkBrL0+j63ere2u7hdyXfDwjer72ObYZIQKC3zNE+0nSWdFBvFUCUEqlh8NGd7UfQolgyv4Wgo3HJuPmBFp1hgkPhNkt80GzJnzwMz3zggBKCXZXrvzqnr39SypqxNYZiUWM82FTojMq/TDFs3aF/zcFSE3AVfUgF+MSxNuQoUb0EFPawXFDFzFp+5TUM9iP6tPU8Mygt6Z2N7DvCXIM3gqvt2h2wBifmrc3jwKClb2dgsyczq65BeEsRGY26vXTW7nbZfokTMu3FgbqvliTMkJw+y4jnqqaeuLlPt536eKy7mo0MtEYMom74MhkNsI7EnVs14g/ierF8lc6D+G/dYz/DFgftO4c576688X/+kQwGMzBNImwGTQq+T7dVUucEhjQh/UdeJHkSDO8Tny/h9fHcgmYzsq/u7hdzsGE8s/Y9gWK8G0X4jJGLDSmenOnsBClIR5kYAhJz4SOPVOd6xxhTAlFlbS8iNTti3YK5QiafaykB4S+YCKM+nV3niDImJ9b6FV0U13ks7Dyg0W03Ctks07mlS17TscR12eJK2wTv2gLyhRnFNl9p9q6Hp9EyCChtcvWzPQfEBw+2Y48AirVztlXMl3H1o+wcxcHaX/8OgH/A3Nm/0hRWcoiq8pPeb+IdN4+EnQBPV4PgK86PXdzMausSvJZbV8sNtuVyttFX7mRQlLwkKiRgnaW/N2hmXwvAZRXmjGYcplV5aiCkLqLXQvAwB0SNOVlDg8G5tcq7Duv2y0rjEd7zVS/29YKwI2Yd7uG2v5TG3lHTgfvIAy/AMn+iSWKhCpdY+M2w2mCEiCUuWusitQ1bq7id0PeMIf4cNDFqz+u7BIima0vsj3+0AtPIcyb0m/J0Y4FScxGyAZJrcwjdIxZbbJJeQLZ744dAwv0uRGt4m1vC7fVrr4vFBCM/LNBYk5LZbavFytlc6vf47AVYwOXMHVUtiHUm7dwo666lVCiUmefc5GFQn5Lbqm9iSF4HUVWXy0eKECdLM1yqtVU+oAw2Rar3ARFNLnVF86qyPgD0mpORBy/lsJL34UUVyWG2yTR9Bc0zmuUzd9qSrmzPZT 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9yqPJIVPGsw7Q94RZa4sPNeQZhPmNlEbp1DaL2PnnmdT0zsKGTBCBXtKjdMCLuvw9ZoA9Q2zPn02BZ4jyRhbL/49xiUz8OOSGb2xaXRIDe0CV4gGy2PDl4T7BXvaXcK5M0gDo/vblkHB5/R8D3Ck92siB9TQEkumH7VkA55JbkLFYM1G8ogRiSeFW5o5oqomwOLt+5uitqjWVFwZ9ePWJ0vepD3A3gdWn2s8gnSjw+xRkINTvLtwLCE244XKULKYfLjg2cQmVRpAULK2jaRdiAOU9fsL22yuMhBOjnioQNsakEr8C4Khf/gU4q12esYS5u29EUEK7KEK3DpMZxYFROphbOPyN8vqrgu5jqX0ZAtfMTQx9qgDprpR6U2KmaMVn6XktGG3ZwrBsNACr+1+ch98X+fHGWvX3eWutVVMnzqHo90xZNh7eAG2ituglOpGWR0jd3de9smy1WHCPemeRKaapV5pbpMAijEMBm0dwfXJEDoHRit8pudsKvIDNn81/++eQ0BWT0qAhdWcZ3Am1HI3ufdnz0zLZj2k6KYfyzHWDtWVz90Zo1A9B0taHhRH/3ItxibjHM+JGrx+wt7mUd8tFDrmhjEv/NYtgxmU2ikT37tqpe4LpLVo+yzp7cMfNzEoggol//x+vQ4F4M/ee6eg2Yq2MvmsPCTKw2Faa96Em5TYdjAGdGVSsiLLnOPgeRQ/OegYL08ar49P8DYIlPcFbUKcTku9zTbYEpB6qGSUZporQ9alo1igWuCI7yQNRUbYfGhUNvmcAUdwy1pkybNHGG2Ej25wOnrtpK+c4W2Y/2ef6EYLJGKL1RHT8+ksqRvhpPsYiTinIuL5hB4UMLJmRyFfnTxxjGCuhMzFNlRoLWmTHhWQ0c47EPEO93yltpVb4W91ZjRvuAeWtHWVmVbelXlfw9y6Ve0j4qIUc+5YfUyaztGvo45Uc2/K3BIyQnky1QZvCXE3BF6TEcx9ianyUuMxYgiN/gW4+FpjTM4Iqk1qfreUdvcOHX4FaQm83/AUJeSMrki1IpJAdMt0f8AiqarMF3htgebXU+OmO6FhIMDypUDcS0HytpFZ6LHdh+ibrYZyvkrRYmcGDf1VVRZ9sDgW2QWPlTJ+JHJrmlDSqlijtKD3vMePAXdHBxNWRK/e8H3eY6VQ1+x8hZsIrSMjmufdBJAxgz3yyrNAs/fLQJHyGbSM83jCk/+OyIM/8LcHOB8zOFV70M44vrLW0s8EJMpyeTemWGnAx3xornWDjWBTR2ooUYVzLplGgkGR6hSk+HbqylIe+WhUmRRhE5aVVJP0NEaMsF7XTFg4H67Z6ONIvorznTd+NCOLkoCJeR9xptbllhFSHdsW+TzIffxsYntiA4BCKhdFCgYtRXamw74BDfdCz5cnaMQT8J3TDvwSch6ZrxMP46TOz37zyXM0XlQTaDTPEIbaFA1Xcz/9541xT8aYEhWQZ1u1CDTJJgdY0TM85WgTo8GR9GsBM8UwAvxm5pZb4iLwfi/hfbOlKHrdiHn4MAayfG60gcKhURYKzN+ZzqM5wqMxo59bCNKK5C6BOYJfT/7Ej44J4WaIKPV+5FrgMBhHuoZrX+/q X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 260e29d1-9080-4bd4-d1a3-08dd231d1e38 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:32.7440 (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: 3b95nRQjGty2ErOV7QjGYpPfL1+5Y4G+j+vfjmHMeAKDCU2mgOtOAvVjWIRMQuFPl8MCPZ4Hp0Z2PsmG/6QzQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch as needed by MIPI/LVDS subsystems device tree. .../devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml index 3c28ec50f097..286a4fcc977d 100644 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -72,11 +72,6 @@ allOf: contains: const: fsl,imx8qxp-mipi-dphy then: - properties: - assigned-clocks: false - assigned-clock-parents: false - assigned-clock-rates: false - required: - fsl,syscon From patchwork Mon Dec 23 06:41:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918515 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2061.outbound.protection.outlook.com [40.107.22.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 604F018E743 for ; Mon, 23 Dec 2024 06:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936229; cv=fail; b=W/4zBjX0wuq045qd2kObrv0egvkaW8VXTdTBji5ScpobGbP1P2q0o9aH7PAD34c6nIZ+/fGdX2bamKc/a5RA0uCsZwz7+8l083xpm+/SVuKfGtPc6m8HGABltgO8lDNNddSjLw/oQl0qhZ0/ZhAnRdgAKcaTLcUhjl8UaEdUbbw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936229; c=relaxed/simple; bh=h2vsCemy1nctBEN7lWpZcuDIBhjz1LrOMgRXdB9obgM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JvQ1qvWlLIwWtgdqlmqmVoHxEy+KYBY/yH0XbXVHqur9gdXQDBQKm0zqIHV0ObZIoRFhGT/BSP+N2VdNUjT4ngz9QXb9M9+eWmwYAq4dm2ru0Kl+jNKZ/uHVmuwBSZBwb5uJwEv5XBcrPC63A6SUNqTLx/HImDrJOhhRUWVYJag= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=I2BinXru; arc=fail smtp.client-ip=40.107.22.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="I2BinXru" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vv/3ZsehJDtl7N4ygYjOEEe1oWCT82snBdaPvJoR3A0nPQDXr3svRCSxgZBtPtgY3EPoOOzLKesPsDfhV0w9lJHt1hApGsMkihG5V3OoVk3HbMq6sx+MPPthKBAJmQPXdzuXbeh73inOjRfam94mRXo6JSlK8OyM866dJYkuWJM76ehwwwEgZ71j0uc0X4rBSBJGUYQIMHKag6ZJrCNPFm81eT68bYCOHOSTcytODXEndvbGbaq7h7kEM5vrVXYCK41LC4l0Vx3zJVYiRps3dIqA9ITP6P6hMpo9+eeJZ2mtPRYKARp+5p7rYL66kJl83DWAVlkhVtrsqBN/U4NGJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=gwqYXc5fhw6NY5r2Dv0HjcYeOweeHaAPoP9ki29LAYE=; b=nQ8LhBCU/OzvXcT9PXxE1O3/xWP/ZmPFxhI71EWhvqFYwdxSTP6o/t22Hk1nMW8qgZyHjXUe/KOMtETJxSWGDv6nsDepc210dc4tUSeWg1VxWOTpbc5tPC0Rwm4bzOa1F3gdJ1RJZEGLWbywk8yrvzd6Rw/vlEKrXmDwUhZlGGlbPlwNMdPlsNOFfOdqaBqnsoA3chjY36ZKur8zC3NenNIQ8l3zA9t2PUFDXfKqtB0tZsd8ZlBXTnThJ7LhdTjGyjqZAjYjc4cUSZjC16QShkjBfMYEQEmxMy0YyQYO42ngJWmWGz61/neuEAc0nlDMRQHkMUT7ca427smyebSNtA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gwqYXc5fhw6NY5r2Dv0HjcYeOweeHaAPoP9ki29LAYE=; b=I2BinXruYMeuWQJlqMakqG5GQ0w671kMt64iAxKariU1UUXFS2RW60UVizeT7sWNf98BRyPt4sHc5k2RMnTR7V9nU30MEeVTznKaswppCuyJIZVAjHFWv27f8/jId08X/F/S/2eN3LSfZWhEY35apvp7fFdZxpWxxEAOgryAPXTGWFUVK1eNycilA3m16Yaupln1FF4UREszt/U6nKHdR4L2wTSAefliIUOFuWtDzC0ulOPu4WQ+UWguBIHv0ZRM8hnTJJcKsx2XpjezheIeAPCLEvtmV+hnffqfvWbmzdjvH08WIsWF3vivwBbsxzl0XUtYFSKwgobGhmbxlNHsRQ== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:40 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:40 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Mon, 23 Dec 2024 14:41:43 +0800 Message-Id: <20241223064147.3961652-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 249638e8-e412-4347-616d-08dd231d22cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: vhVLLFYh8gmyqak5yTrlZukeduDmjMIRF5MEcrxqt1xkFtAL0Xm5YGOLCunYyfqTTiT2p9wrYSmFRF+kL0v02h+P81EijdaWn8lkKYIKzRpyb5OfmUgBXaCwwmje2zdoupiv3H34H0nyVwyuSLpbo18YmwEqKuWO0Vo365Zu/bN+L4sW0wzgLU4wicKl39bANcrkrFOgTo3nsSkEI6QCG0dWuJzWQ4E7IyTMuzyotGs2CmogPYCGFGh2Kn+YxWMxFwQ8BBGbcI9N8VVutkpXaQVuyook400Rv9+1etL0uAwnwDgft7XfzI45XMJwxjasJvQ539A6sudorItd3X0Q6mFBYjaF+V8u+jY/k25OHQQQ5GWGM4kEE0s3B4GEe3FgaEHojCPHxy5FIwsetgAolZt5KH7SIjkBng6NxCHpnSC4p0NFqnG+yre3l5Pag/65kGRQFJNOEZ+a9pkNbyJqDjRw7H8zmzjAqRnyNqPUP16pX5xOsW8BHm1Z1DMLBdGDqcDetCRPqWkZ/CIBBV086ykW5xbkUC3og/JceULE7Pg8iri4jxlnTtjTvfVJM2sZGDMGmuhhufNm4rWjvii8xAM8/FOtZE3E0q/ExFUG5mW/pqw2dnMaYsKiIK8s6eFN0uayrjROh54anpeyumSMN+Dgi0kFp49UxOU8JG1+mgqwJPF6JKyyeqz2S0roMjSGOpO+hvRhVzhDdqbJsnMmzTGLPjEaTP+sUYMpsOEhHOO5sKlRkvYQp7OzKhxG/hkqTvn4fhrh7YW82ao6rAb2opo4vLS6daGAKUBEI82MQpMd+0s8BfF05u7KrdAdfKHAWCXtA9UaOBaTyu+W3zutQvmfL6JJpIOfY4trh74sYbtsznOTT3oY32EzTN8DflUzd98dzN2frCIh9jlsEHr8Y2HMjAAqLrClJRV7t0k3Y0hPwF3gma6O+37ALO15wszTbCsg1Psq+lPGH+bx/Szehz8B24TEjLbpl5RVtEDmem7xmljwNNlJsXeBbMAoJ+UuZzE7GNaapVrF7IM3xkU1CtkZ6Jakr3bLeCd++o2sm1rPx2spXpTcvodSKZepilW89nF8XgiM6f2aD+PkXr5SvwiAdzKlff4++OVRzomiJPnHDeLDeb+WbGu037dc5LFw4cZ9d5eG08f02QnL0ILUV6HZXsQbo6oXvpBaYABuorS1tbb6B4X9PdKENHzODUjGGJlThvuoE3Hf1z7BkNqZ5VXjaoCkmfhOznPgQ++nm821uUHrEO3H4zrLjN/5zVhUpwNceY5Sa1ofa3hm0RfmO8zHe0fC68fjQKJ9MrLMcmMAKhvXh9sdl0dcKvyGvaNnFBD2D5BqlCOb2Jnz2to1k491zCPc0N0wJDLqNvlhqXIOwPOEvOi5z73jtBYqxsQuTHPOpb6SVHxy+qk86rt1b1R3CY/YxUan5AN1kp9vDT9KDZYxdFH/GyeklmCWaBpV 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /TZai4iVXmSOgiFl44zRoGoIR9ZkP1Res41w4FCRlYJLyk+E8GHRT9W/wk0WCWfIiZ5o1t7OOYtOaqXZce4x6xY4+nmQJ+0d8D0tNndHiGcoLO5fiy5i2kGT0uJrF+u6xuVxO3dt59bYLVCdRG08J2BtT/39qO7aJmu9JVFHUfaHevrE3DrCoYn04mZiSGcsABbF3XjGm+1RxwGOK8OU6UlhNy3grWKDLisN26ilc3ZFW/2AIPiIUB1Uuu5QRN/DFTXsTJfzhiS3vwlGvjjGUARREEBumxNVsktYq0ZUurwkjw/iEZvpwp9O6rlA7vFoQoxNFKhzlO7Rnj/HqaRxjdoexCrSm3PQN4L1GsqKaVoG2mjfircjipPG0bmUspR4y9KLHvBFCOa33ooCXntJNO3dq5POYTov9ukJgim2lTuxt8K8eRuoMee3qhKAPSa8HWZsoSR6UnNv+rSz6k7KGCnNcYEQcMZANxKVE/4QdmkY27WjtuPFhGNRtp8e6OwdzIwT9a1k6hmXApANYsk7AIRmpz6Dk5CoidKnoKBCDP2N1hn/jQWslsqu1xhkY3pNE3XGUqwm5xHBGCG18c1ex3vomxBk3YUrC6Wp5LFqVyL84F6HqBXRQRhDsz29wjIsJGdcyQ/znVJDJf1SVcB/kwdYf/jl0jQ1eqJl62PPDgLK5jNQw9Mo1t/G7Twzd3CRQ134giStjELnquNl0Uc5WQYYrmMHsvMZgvzFrzo/IaH53up+dB+E+I5CtJ7KshM0cNj+4POshSSRJ0HtzCEP6I601gR2yxs/Bm4kSmKqJPopHonAmZWY6a7iigdNnChK21WuB5fLAfDSS49g2JZQxtu/rsXqMFtRhtkPO0HYzJcuYDh+Fc8z4/3xC/3zh4am2rwK2nt7lDeaoRApY5ABQlLI+OYgmJNWGq4ctRenRnfKo2ljRr6yDO3WVkxNMiAe963HPEjxlVlewzcpq9H5bzwz41J8Bl0sgWKkMuLlbn9nyifdIG8e7Msv4FgqA4HlqXa1ucRj7fmC8vkek+E++Sjss3k93GqKLN/ufQt1zWpFiV00u58I1UJFjfoKc+ETDYGnR0xGipv0XZMc0dd1d5L1Ax8lvtomLGcWwxYpkuC5k9CCQ/wTkjhRqs2/VR0Q18oz9QWCFJ/qQjWw5gq2ZSOWVV4q9nQQzdrVxRk1CyDEODVipsZTSOppUjp6mLzV0pMVo7JAHcL3EmiSptQ4/g2npgTWLgCcDPcQ/4EzSkwvashyeIif2Q8PCpSMdSPRWbA1u+dMO7mbcgETsXl7n22yAuPmhgJ0gEs8TGse6ftU1nkgnI7p5NOpdfW59rAVi3kByIiI42ZfpsQguHUuc3tqHoPurRBsZNJ7bilEeJFnu8Et9luKJpiuzBk1K5076So0AzKDx6aewJ8XDxLwcujevuVtzzNbh3VQuqWqTiXVACZ0kBMp3SyHT+vGPBQaok7VEAMpxeyJR5htch25TMKhwGDQFM3+7NlbGhf21J4pkpHfLBrkbIK6MAkJhgoahd58QpkTd1t/3V3FmolKNCn+2BVx9+K0lYAcIxc5p0japnz476T6TihyN3Q7QEoZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 249638e8-e412-4347-616d-08dd231d22cd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:40.2611 (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: K7YBs4q7pQqU6P1e8EOlvUkl3dNV63t0esnFEnP+NGcU3kstSm41fDdecJayB8t23qbrJZH8GgTkw2bamhgrVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch as needed by display controller subsystem device tree. .../devicetree/bindings/firmware/fsl,scu.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml index 557e524786c2..1a920f013ad2 100644 --- a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml +++ b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml @@ -30,6 +30,26 @@ properties: Clock controller node that provides the clocks controlled by the SCU $ref: /schemas/clock/fsl,scu-clk.yaml + dc0-pixel-link0: + description: + Display pixel link0 in display controller subsystem0 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc0-pixel-link1: + description: + Display pixel link1 in display controller subsystem0 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc1-pixel-link0: + description: + Display pixel link0 in display controller subsystem1 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc1-pixel-link1: + description: + Display pixel link1 in display controller subsystem1 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + gpio: description: Control the GPIO PINs on SCU domain over the firmware APIs From patchwork Mon Dec 23 06:41:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918516 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2075.outbound.protection.outlook.com [40.107.20.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F6D01922D3 for ; Mon, 23 Dec 2024 06:43:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936236; cv=fail; b=uP/zHuSUf57CR/9YM8j+KmhB/EiNjBen0FR7YdsCePrl2TtROXp77pwv1vYLFxUwbS+LEwP/s6rINpP+wHYPu7PdxwKQyhYOjYzm8Pj1SL2mnpVgD81Ore2mi8M/1ALEB8RDsf0tW8ewLGwyN81rTH408OaF0s4mcnmOtcflC8M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936236; c=relaxed/simple; bh=n1hDVAtJmQJOnKUeAsiqrWmavcPxgUuj838ubd315YM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=XfOWfvi+lrIzDFgIvE2Mfa3SXWSllAfpzq2NQdIuQB2Lyoq+dZfoD1zIb1lCgDUy5OfQH6e47o7qkkX4SXTpfzIAxxgcNjuzfsaqz+YoaHcMCaZhQkmlrGSZTcLUy7S1QoUT47oRd20m8c4Twp/iBRRr+76cnF7pbgdkI9vTrfs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=WyUNTAcU; arc=fail smtp.client-ip=40.107.20.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="WyUNTAcU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nqc3+SfCMKxUbEVe27Z7fPNx9ZbQsLKtZioOoWyzv2JRK+VRHAebp4lqsydqcgftU2PDshtLGoA4o2WCwOXCfR0jqwH19ZBpk0wcLdsR8Md1L6p1t51IMwkXuZ1C+F7Fs/nWS/uiQXavV4NfoQw0j7cLExeDTidTtmg9EMd9jzemR/fgKtlXUzRe81AR3i1cfr1Df4DwHrM7zGlF0zXnMqppccjQA3qrVEJ3mVgtFPlEfXx5XBEv586dYcedIEcclQg6xwJveQfdzCRsrpooKTAXUGVFKVUxzRCYIUJvbnsXpkNdW0uMJBuAQo3o2uphJsl54f5lHUo5EP1fHL0yTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=73Onn1whePBmj1SG0z8hWLhajsqB/8dP9WVA+INVoxM=; b=NDRzew1/wKd9fKK3JEmhLsnDaVTR7y3/J9Km573AHtnoTkB6+ADna1XIUFLxW/jw1VZO4DdmEhgaw6bWNPsEC+6Y0+BK2e/n27bod8jrcxBuf+fRqMfi3ho2tr7b38NgZyPrpDts4JizFA9m3fmXleR2OqGcRnUuNo7vn/mtvOvdlDwaby33VKBld/aQfP9Y1i17sUQO04CuGKVJurFJG2NCm81zfCHXWF2k56tHH4wM5z63DfF1zPQh7orOY5lxf3b8JHajQVS0n79pgLhCtCihi/JQy1KTkU+QJtinFno75U6jmnDZJs0zoRkfLanz7VWSQuL69V1jTsuREjsIGw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=73Onn1whePBmj1SG0z8hWLhajsqB/8dP9WVA+INVoxM=; b=WyUNTAcU8yS+YKJOo8WUwj2Ih1kSI+LeWb+aQY2jp+K2sqEuUGOUS1nWfVzlrtwzVzUqmfeYs5C7Mpgq5FvxIyEVGA3DGgnJyYCmVx4t3/RxU5S28UmTLMt6uUqk8duDJgB4XJCPq/vWCV8q5bs4N+MwEZ2QWVuTq/BeswTcKWZMVNnDrZddSmLk3Ow75iGdqr2zdbxTRzgrZBk0CW9NeNZZDzxqMGHFN+q5Fh6DCU6vlnZEClyQAw60fgBIqespe9TSDlnJtY3mADhWKGsbCbSgkEdn3MiiWL9/pLsATaJemP0ljRIygM+wuCw+AdkgTKUhqkc5miSpoglEcqLSUQ== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:48 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:48 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 16/19] arm64: dts: imx8qxp: Add display controller subsystem Date: Mon, 23 Dec 2024 14:41:44 +0800 Message-Id: <20241223064147.3961652-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 468d1024-56d3-41fc-ff57-08dd231d2744 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: O4Wz0BY24u/NHZ9CT7iun47xJL+DUKhTsyee7HUvIuQGdB/48Du3ulQKzqzYqGiA3ucCcBmx5XLpnjwirUwKnn4zb3I6rbgRoMyZPoZvZKf0KsGZCYbzYROE0mocwHKBkAWixnaw9VBuRd5gd2wiw1dDcX6YR0KKsBSgaMf/0N0yG1UrB/kvrCv8pq0XlluzTTEtV4X5zycaAU7AUcAmbslkDhOzQYHiBR7M1n3iL4RL1xbiaPmX6d6dFZtUAapLahkcUv5oUyU714mKOZsgP7kH0XIYjw46bkJwjIavTJdtger7sI6KJqIb9VXiQMhvxmit8H64BTk9ZpguBiSCgS1vfkbq2LHJPMVyHqmqz5IZ9/vq5eqD1XikCp4v2qesYXal5Z8mDL8KIhjZv6Rt+I6l67G9h4x+Wqan+NCj96sjKOIo7h9lPQ9Iz1fozYGf/ei1YRkRP8m8QwVcIP7XW9KEbPVbY0ZDVsx5/f3D9l7fONgCP6t6yHp2YkeZYLjy76BshtSM/d/QpkoKqZsPJ98o0hkWi8mK6rq9GU7/qbmsFN8I0f7Rx2ULMx82UlbnRmUz/4gkM0QpB9xJHYuaZaCigZQu1XWcsyEZdM12lChDFwgD9JbOhQk7JNbr6/59vD3bAetN4A65wFDcq9r3jR+C8n1lFIv+U9p/4cDVPS2OtIaLhpJqRlfLwvtiliOolAb6rtPkmFBCJSLwOLt/t1UemZFonJDFZzbNi1V7+nGIBICttLLddcHSGSphiAmXsUVqZfwQ/rYoKVYVdqnDiZNrias48g3z7tPf0jx7Dpp3szdg4dYNFyJXRQEwrkSvTMTJHbAG/FDEjOk4sF6J+vhfxMYI0p20iY8fuBKD7hSpFO4PST75kJAnzjFZeJOt4dXC+eUEo27unTglX3cEvvbCsscfMWA1EogT7FmVUCpPgIgdnxGON0S/O1W+ufdp1ua1EedRdULDmErovcgFDbw5KRIUGCrarQGRR8MqgkZGm1SzZ6Owl788N/kzZqOLaOQCSslC5Uah7uSIq4ztGchlFjhN0tBDuMSvWbix8G5Y8oWQEwhQ4ZGzvdYO9dIKEo1IxXJV+jQ7+z2FLpXx0nad6odIxQbzcIhPyLniynL0wF5QWivTn0FXDDCquAoUBaTMwu/DiLN1Hc8Qs+KEuhpl/sWjdde+Qeqy+zvafJ+e3Zz5o/5tR5+eUpD0njHqnDUGM12pNY92bo2s+I+VYxR8s9Zzz2/FuIF+OqAQ+OnPdDJLJZH1vzYFEvlFJ1q5NV0Yho/MGhNcDzOGQrz8dQiOiqPB808A+SmWimsBSwFb4ThVrXvkQKRZIXwQ1rxczu9C5Ty81R+sCIOPFJ+UsqMV9B6f0ZK3U6aTANU48YCaMI4xycDJPkgHCk6xn3wFBaMLGOyiDztp6Doe2GLRkAAiZV0zxNXazxafC0cTpK4= 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XbtNfOFlJumlBEBEB9/tmhus6UnSmfjC4Re23qyy4JwnuG3aeUFsMAv76eWzLIK/5A7QnDKJuSKPaMke0KVlYB3nugj+VMCwxSVjKhDFwk99X2JfP+AHatb6OGJKK14PszHsRg0dvRnPtWpJOOeQ5q/sky6EUSPFxp+sPZ4D8RHRn9GRFhRTUo2aWzhM5WZNwrUl9jHaSf2Iyt2UdoVj/TG2+zPx1iNmVRgfnLEcWvMj6hShR8k8xEvnp/DBIfLUIt1kYouJFBpgzbu9X7qhLa2HPxbfzUfUFY7haj4qgqphP2qrxfkJiSaQ/Xo0cvz9LeRIoLkphwl+I26zmIXqbeWsq/ACvl186cw2Q4IqExtDsNAl4txSJVonEXYKOK92th/NYgY6+ud+yicwV/HoYM0NxajSvNEp/0Ifho8WXx1I1D5LLowumhCWO3cEHAPPw+uQ4DBhFVxtlDupO5BHb7mFexdh4oAqgJOZW3H5segYA2EgoTuNVb/eArSZ/NLVjn9feREmtQWQPmSa0Rj+Pb88cuLgiqKAoF67/fHjZJwTC2j9AoqnBUJDIrG/F36P82BU7h02IN0F7bZhMcCBrD/Xwx6xarr+hZXkoqjLgytlnbvm/4jHfZww105tYAx9Yl+jU0hqpXVmVlA/EqcNIng63D0f3rJ8MFSUOzwOrCnfy63RTtIWcJeUIjOsF1b2VlP5o8QMRSJYp93df3WbJUUL0JOIFmjGmrR8mrbGThe2zJ3PNA33Jw4BbXavCyV41Udv8df2sbPKwv4dCBoVFJuSf61RyTplwud9LPSouLFpFSZLXQAj7f0HeJgcgRjbFIHV5t7bHKMA8po+yXJ1BN3m85C2q7TEryvGllgQyieg2CxsnDV+Qv454g0zmTf/F1iuds9CHV8yQS2phJ721DFLDceJvU+Tq3MU7ch7r+T4uQej7kUUwG7hZIcqB1m50pl4BcRUjc+7PDEpEItOq2q2Ch0VTFTujOoLqvyPQo3NXMbk3aKtoOFm3Nd8vAG5T5I+A5FMy4WwWc4Sq1DFPndjrBZRirraRPLbv9dBeVgj5/6luErrtHEOYQh2Yu4o44Et/5j2d01aqueVR/DpAZptz/mtwSJnPP/Ax1cRDlWKmDv+UhMdOmNwiYY2ZPj5B8TsOgALZfIeyh2vv+xHlVtrgFl3/+vbbS59j0Tu7j8UKDCuima9n9DO5UaU8TQ3psSb81XLOHqjEf+50o/+iVnmOrdktPDMW1Yf6kpJ+xhBkA6mLMYHBg4K4aSgHCFkHi2wM0IqcAmgoU4cghsJGxZapWrGASYyfc5PC1rH1aFZQgHXZZ31v3gZl8FpuKhiMYyHA7rkvElfnLO91Ct1D2qJNJ0snT0eBa1TBjKk+LlSkj+dYzb9c/brN2lsd1L32LBGGJzgSgJbBjZRe+mcNWVWYhz8q+vVqbxf2mNNs/s9cFspOCwGEduicIZstALUcOVDymdvGN8PEXie0UZR9ZqxaUbiKkaOih9/yFUqhvXI1BcvzvyV+eYdEmIGKJj+QLYp6jYDXKxwltlwEsAL5GlZW3P8V3OsZaY92pPD8x+0WKB5iZ8+ToVpeUyA/IcD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 468d1024-56d3-41fc-ff57-08dd231d2744 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:47.9508 (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: rPw9bDJqS9PmZiyiEo8mqNybGN7+7cAW0A/q7D+gRM+5PgnH0gHHvwBs/qPciZ+rO9kdv6vsz5PF8LWuX0IicA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- v7: * Add instance numbers to display controller internel devices' compatible strings. * Drop aliases. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch. (Krzysztof) .../arm64/boot/dts/freescale/imx8-ss-dc0.dtsi | 408 ++++++++++++++++++ .../boot/dts/freescale/imx8qxp-ss-dc.dtsi | 236 ++++++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 4 +- 3 files changed, 647 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi new file mode 100644 index 000000000000..0db345204b89 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi @@ -0,0 +1,408 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include + +dc0_axi_ext_clk: clock-dc0-axi-ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <800000000>; + clock-output-names = "dc0_axi_ext_clk"; +}; + +dc0_axi_int_clk: clock-dc0-axi-int { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <400000000>; + clock-output-names = "dc0_axi_int_clk"; +}; + +dc0_cfg_clk: clock-dc0-cfg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "dc0_cfg_clk"; +}; + +dc0_subsys: bus@56000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x56000000 0x0 0x56000000 0x1000000>; + + dc0_irqsteer: interrupt-controller@56000000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56000000 0x1000>; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + interrupts = , + , + , + , + , + , + , + ; + clocks = <&dc0_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <512>; + }; + + dc0_disp_lpcg: clock-controller@56010000 { + reg = <0x56010000 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_DC_0 IMX_SC_PM_CLK_MISC0>, + <&clk IMX_SC_R_DC_0 IMX_SC_PM_CLK_MISC1>; + clock-indices = , ; + clock-output-names = "dc0_disp0_lpcg_clk", "dc0_disp1_lpcg_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_lis_lpcg: clock-controller@56010004 { + reg = <0x56010004 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_disp_ctrl_link_mst0_lpcg: clock-controller@56010008 { + reg = <0x56010008 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_disp_ctrl_link_mst0_lpcg_msi_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_pixel_combiner_lpcg: clock-controller@56010010 { + reg = <0x56010010 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_pixel_combiner_lpcg_apb_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_lpcg: clock-controller@56010014 { + reg = <0x56010014 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>, <&dc0_axi_int_clk>; + clock-indices = , ; + clock-output-names = "dc0_lpcg_cfg_clk", + "dc0_lpcg_axi_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_pc: pixel-combiner@56020000 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x56020000 0x10000>; + clocks = <&dc0_pixel_combiner_lpcg IMX_LPCG_CLK_4>; + clock-names = "apb"; + power-domains = <&pd IMX_SC_R_DC_0>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + status = "disabled"; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch0_dc0_disp0: endpoint { + remote-endpoint = <&dc0_disp0_dc0_pixel_combiner_ch0>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch0_dc0_pixel_link0: endpoint { + remote-endpoint = <&dc0_pixel_link0_dc0_pixel_combiner_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch1_dc0_disp1: endpoint { + remote-endpoint = <&dc0_disp1_dc0_pixel_combiner_ch1>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch1_dc0_pixel_link1: endpoint { + remote-endpoint = <&dc0_pixel_link1_dc0_pixel_combiner_ch1>; + }; + }; + }; + }; + + dc0: display-controller@56180000 { + reg = <0x56180000 0x40000>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_4>; + power-domains = <&pd IMX_SC_R_DC_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + dc0_intc: interrupt-controller@56180040 { + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; + + dc0_pixel_engine: pixel-engine@56180800 { + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_constframe0: constframe@56180960 { + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst0: extdst@56180980 { + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe4: constframe@561809a0 { + reg = <0x561809a0 0xc>, <0x56184c00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst4: extdst@561809c0 { + reg = <0x561809c0 0x1c>, <0x56185000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <6>, <7>, <8>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe1: constframe@561809e0 { + reg = <0x561809e0 0xc>, <0x56185400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst1: extdst@56180a00 { + reg = <0x56180a00 0x1c>, <0x56185800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <9>, <10>, <11>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe5: constframe@56180a20 { + reg = <0x56180a20 0xc>, <0x56185c00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst5: extdst@56180a40 { + reg = <0x56180a40 0x1c>, <0x56186000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <12>, <13>, <14>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_fetchwarp2: fetchwarp@56180a60 { + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + reg-names = "pec", "cfg"; + }; + + dc0_fetchlayer0: fetchlayer@56180ac0 { + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend0: layerblend@56180ba0 { + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend1: layerblend@56180bc0 { + reg = <0x56180bc0 0x10>, <0x5618a800 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend2: layerblend@56180be0 { + reg = <0x56180be0 0x10>, <0x5618ac00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend3: layerblend@56180c00 { + reg = <0x56180c00 0x10>, <0x5618b000 0x20>; + reg-names = "pec", "cfg"; + }; + }; + + dc0_display_engine0: display-engine@5618b400 { + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_framegen0: framegen@5618b800 { + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, + <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + dc0_tcon0: tcon@5618c800 { + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; + }; + + dc0_display_engine1: display-engine@5618b420 { + reg = <0x5618b420 0x14>, <0x5618d400 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <25>, <26>, <27>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_1>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_framegen1: framegen@5618d400 { + reg = <0x5618d400 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_1>; + interrupt-parent = <&dc0_intc>; + interrupts = <28>, <29>, <30>, <31>, + <45>, <46>, <47>, <48>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + dc0_tcon1: tcon@5618e400 { + reg = <0x5618e400 0x588>; + + port { + dc0_disp1_dc0_pixel_combiner_ch1: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch1_dc0_disp1>; + }; + }; + }; + }; + }; + + dc0_pl_msi_bus: bus@56200000 { + reg = <0x56200000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&dc0_irqsteer>; + interrupts = <320>; + ranges; + clocks = <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>, + <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>; + clock-names = "msi", "ahb"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi new file mode 100644 index 000000000000..ab84ae3198c8 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +&dc0 { + compatible = "fsl,imx8qxp-dc"; +}; + +&dc0_constframe0 { + compatible = "fsl,imx8qxp-dc-constframe0"; +}; + +&dc0_constframe1 { + compatible = "fsl,imx8qxp-dc-constframe1"; +}; + +&dc0_constframe4 { + compatible = "fsl,imx8qxp-dc-constframe4"; +}; + +&dc0_constframe5 { + compatible = "fsl,imx8qxp-dc-constframe5"; +}; + +&dc0_disp_ctrl_link_mst0_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_disp_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_display_engine0 { + compatible = "fsl,imx8qxp-dc-display-engine0"; +}; + +&dc0_display_engine1 { + compatible = "fsl,imx8qxp-dc-display-engine1"; +}; + +&dc0_extdst0 { + compatible = "fsl,imx8qxp-dc-extdst0"; +}; + +&dc0_extdst1 { + compatible = "fsl,imx8qxp-dc-extdst1"; +}; + +&dc0_extdst4 { + compatible = "fsl,imx8qxp-dc-extdst4"; +}; + +&dc0_extdst5 { + compatible = "fsl,imx8qxp-dc-extdst5"; +}; + +&dc0_fetchlayer0 { + compatible = "fsl,imx8qxp-dc-fetchlayer0"; +}; + +&dc0_fetchwarp2 { + compatible = "fsl,imx8qxp-dc-fetchwarp2"; +}; + +&dc0_framegen0 { + compatible = "fsl,imx8qxp-dc-framegen0"; +}; + +&dc0_framegen1 { + compatible = "fsl,imx8qxp-dc-framegen1"; +}; + +&dc0_intc { + compatible = "fsl,imx8qxp-dc-intc"; +}; + +&dc0_layerblend0 { + compatible = "fsl,imx8qxp-dc-layerblend0"; +}; + +&dc0_layerblend1 { + compatible = "fsl,imx8qxp-dc-layerblend1"; +}; + +&dc0_layerblend2 { + compatible = "fsl,imx8qxp-dc-layerblend2"; +}; + +&dc0_layerblend3 { + compatible = "fsl,imx8qxp-dc-layerblend3"; +}; + +&dc0_lis_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_pc { + compatible = "fsl,imx8qxp-pixel-combiner"; +}; + +&dc0_pixel_combiner_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_pixel_engine { + compatible = "fsl,imx8qxp-dc-pixel-engine"; +}; + +&dc0_pl_msi_bus { + compatible = "fsl,imx8qxp-display-pixel-link-msi-bus", "simple-pm-bus"; +}; + +&dc0_tcon0 { + compatible = "fsl,imx8qxp-dc-tcon0"; +}; + +&dc0_tcon1 { + compatible = "fsl,imx8qxp-dc-tcon1"; +}; + +&scu { + dc0_pixel_link0: dc0-pixel-link0 { + compatible = "fsl,imx8qxp-dc-pixel-link"; + fsl,dc-id = /bits/ 8 <0>; + fsl,dc-stream-id = /bits/ 8 <0>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* from dc0 pixel combiner channel0 */ + port@0 { + reg = <0>; + + dc0_pixel_link0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_pixel_link0>; + }; + }; + + /* to PXL2DPIs in MIPI/LVDS combo subsystems */ + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + dc0_pixel_link0_mipi_lvds_0_pxl2dpi: endpoint@0 { + reg = <0>; + }; + + dc0_pixel_link0_mipi_lvds_1_pxl2dpi: endpoint@1 { + reg = <1>; + }; + }; + + /* unused */ + port@2 { + reg = <2>; + status = "disabled"; + }; + + /* unused */ + port@3 { + reg = <3>; + status = "disabled"; + }; + + /* to imaging subsystem */ + port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; + + dc0_pixel_link1: dc0-pixel-link1 { + compatible = "fsl,imx8qxp-dc-pixel-link"; + fsl,dc-id = /bits/ 8 <0>; + fsl,dc-stream-id = /bits/ 8 <1>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* from dc0 pixel combiner channel1 */ + port@0 { + reg = <0>; + + dc0_pixel_link1_dc0_pixel_combiner_ch1: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch1_dc0_pixel_link1>; + }; + }; + + /* to PXL2DPIs in MIPI/LVDS combo subsystems */ + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + dc0_pixel_link1_mipi_lvds_1_pxl2dpi: endpoint@0 { + reg = <0>; + }; + + dc0_pixel_link1_mipi_lvds_0_pxl2dpi: endpoint@1 { + reg = <1>; + }; + }; + + /* to parallel display interface in ADMA subsystem */ + port@2 { + reg = <2>; + status = "disabled"; + }; + + /* unused */ + port@3 { + reg = <3>; + status = "disabled"; + }; + + /* unused */ + port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 05138326f0a5..9fb4bac708a0 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -206,7 +206,7 @@ psci { method = "smc"; }; - system-controller { + scu: system-controller { compatible = "fsl,imx-scu"; mbox-names = "tx0", "rx0", @@ -323,6 +323,7 @@ map0 { #include "imx8-ss-vpu.dtsi" #include "imx8-ss-cm40.dtsi" #include "imx8-ss-gpu0.dtsi" + #include "imx8-ss-dc0.dtsi" #include "imx8-ss-adma.dtsi" #include "imx8-ss-conn.dtsi" #include "imx8-ss-ddr.dtsi" @@ -332,6 +333,7 @@ map0 { #include "imx8qxp-ss-img.dtsi" #include "imx8qxp-ss-vpu.dtsi" +#include "imx8qxp-ss-dc.dtsi" #include "imx8qxp-ss-adma.dtsi" #include "imx8qxp-ss-conn.dtsi" #include "imx8qxp-ss-lsio.dtsi" From patchwork Mon Dec 23 06:41:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918517 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2058.outbound.protection.outlook.com [40.107.21.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED7E219AA5A for ; Mon, 23 Dec 2024 06:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936244; cv=fail; b=dV2p1lZqLISA1M+5mFN83ro9K28yfS3IViysHLGIKMlM/d58qw6ioc3v9OPFaRLBn+OyXvKBr9SU2lFt699YCmaISl05nFWCZKEImQsghp5VKaaSE+ARhd5IQYE6ZHghKEcrcI0qX8LJ+i99+W0/+MWN5OVC1UcpGFP3BUFSuto= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936244; c=relaxed/simple; bh=sOsA+B/jMKgMyjqD4ojdVwnIOItojQYoENW5PITS2eY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=h43Wi84kWp0740+UnSUNMfOmr/pbxOZQ8kVEtHaYJsiSRZzldzblZy5tafTG3RGV0+CtCmRSDsnIphseRIXL7P4JZcxTBec76h+wyuBoCoNOG12YMEn2CIOD1RowuAJy8yAqTtIpjPA4sM79HRlVTGc7wxGuzSZbEVDB9lBhBkU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=XOOSJaHU; arc=fail smtp.client-ip=40.107.21.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="XOOSJaHU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QFbAumdT222Q2nB+5A4rg6EErM3d30aRJNkXP0P9ssWXlaOQIVaPN7z3EMKwfRc4DrvmwwlfU7Z+5frb/UhEkzjsle18xV1YKSQBGKVazyQtayd/aZtCvPSjPjaBsdA1ydeHv4HyVUIl9U2rj7F25GR0g2/4pYMijff2QXUzruWGX/VtOA1hK/9LlJXb2uD0fUF4GaGAGWKx7bicz+3eeqEyRx4GFnkzGWXywHYFQW7L6OFdKRM8apyOQAZ6GWd88e2wVf2fgTjUP7TMB03vfUlZxiZX+Zvnf19nmKmONHPRA+XwPAZxCwNWdGFuLetoGBRsghWhSVO8kIsru91kkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=JVH2f1E7M69XieYFVLycu5FfiC4LmTask2TonVNPMGU=; b=RXBhXYJwNLEBr+e2cncsL9W5BsD4VCJ9OFNGsk6IApszmfo4UyHyggNdIizH1kLrg0nD9PvLZ62rAkIv4p3EkWpcyytPJC1OJzTfqjXAv9D+Oq5MqEvlxuhvAU/WUEqq6P3iCFJ1RoeYV/oV+fJtzzYhSydEA6a5l69N5D71ti1R7WTCjHdFxRR9cVTrKhViWiGB3BdzrRzq56JulYke1bOKymwweOrkKwlnwISK8BzaSrLLRWVEA4PX85QFXXNJY6foHPk3/BFq6t0Camz/ObryU8LEh411KZv0ANDW7OZGZPERIrVzoMwTi0u2YOD9HAiyKVvJwcx6nllHuE7y1g== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JVH2f1E7M69XieYFVLycu5FfiC4LmTask2TonVNPMGU=; b=XOOSJaHUWXCpfRf4gF+y9sAdkBO2/TYEZ5Ln2V8y6pRHD+sFvaNGzZ5af2JYuvqx3WM2idv817F/szcumO7exeFUP59iFgxx+6TnQE+ZvYIS9Xr/8dk4T0d2RJ8cTgOKfKr7YDnppn7u0lPIrVfOyj5qJh/rbFUufe2PKHMYOZQ0FqkBxq9fpWkFLwDLbZpDllqedDz18w2pB/pSmm99983vO7pCnwQJoTvmiT1WsbKlb1Wgc6XCRYTrR4IJ+YhVGbbUbxxSSc39TDNkeShm4xsFAcuuT3ilwWERRgUBtuNDaSZzHH9YJA0rwGjSTJJBHr1R7Cwg/e3F1zI9M+ZvQg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:43:55 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:43:55 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Mon, 23 Dec 2024 14:41:45 +0800 Message-Id: <20241223064147.3961652-18-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 49f73a10-fe59-4c49-c717-08dd231d2be0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: jaWwt7uEeVkWAqBVdHiwn1Bl+m6ghxIt+fqv6bt3XnUjCB40liq+z2vZW74RRWID1OPmvYGD8HvAX4rUdfg8JcTi7BHwCRyR5eOjJQZRabrr8opQ2mu1IkWxi1YezW1hGAouPq+tXbljzc/c39dRwejgGdA/Eib9sWm0uwsSS0SWVkeBN0e5tEzY5ZIUiqOF/3daLyIu6NaQKZJCu2MMWsNYJcToNfzwcUMwHuIuW5NTHHQwgaW+IJF+kGZsH8mamIP91Hfr+6XwHrXtN9pozCRH1ljee+OwCbxL9lJlev56/HCGbw8By33k2qCVYWRwbvPitZKkdt0nfYSiowG90Vzfe91Rm8VpVLNFKy4Kjpjs8XibqamR3lZNeGERCSCPa6GsuUiZAEzUvbFZ7wNuotlohMYaTAhmJTPlS91jInBP2hdcJxSjRevwW3nueT8C9vUTK6K2TyCxdxehyRD7D6WqdRQpmjS+Nr1ZDfLle8APVDTxBBWv0GpU8F8y1KtHGCnA+9QVrk4qWE8IQMnZngNSeU5irk8Gv8e0/fKFtZzBOFU0DElEqv13XXS1qmvlNQdKj+YxKnsUwU8HOW/uFAoYES7FNc0SPTdlq/QWDWmit5kABhj03h6wmtG26jaz4BH2BZC+ze7bJIFkP1RHjmyBupYmUmD+WwZDR40VWyhTR6n1PwEUcNjcrZI0a3VDQhMK0HDC37hXT1gZdnsSAHclYwZyyjSN20vUBr01WXkqdwKTQReMzP6Fpk+eEcEfLZQqC80wytd00kvqhK7s9JI/bo8iF5n4hHxGfVLYeaOlePqQiw0XCEYn4mO9uLKGHTDBgHA5r5m2U/dUO7e99EIsQ59t8W4UrspnwaJm1v7h1U+kEUplsS2O5QLD2klWnYt/nEwLpp3BfqXV8DTtYDLdfArbHw2rRxU5vbroUQ4/qIPrN06kJSP9G3truqUtZRTuhzZyhdXqOUWIbDoNfM7IV5cIsivKDg0UWDXP7nxoUyP6m7VLhMQwPXLyQCSp7/JZzrFPSFkUzUQpRbBGd5gd295PwwbQZT2RMSWzpB6YaTP3fL0vsrtYlCTGTcgAir+0PYfVhz/Nuv/B6F3kxHVWlnLiAeb+NDhYlecfd0Xgfu+Cfp+bdepOtVAWzV1mSj7NCH8WOC0x7yc/MMUgMfPeB/cDb5Blcj4dhbpFAgKU9BJpoZ0PAWIwRY6CLQA0nr59uxVZdyWGbAehAvxzfkLTQ+LYx2aXqu9Wtbq0mw/3T04YHnjjKO3AA79snbUYNfSsLqFefskwZDotTOX5xCC95+lQoUMvUiIi6bmQiGx74E07Hm/injUV5uyj4YDDRlSx85Bui92qiM8Z+Ivw4w7qL2/tB2qh10neyx7ZxZuzFwCjPHTDVWgGEp9m5pdYHrcx19S411IuSPR0TE0hyeC41G3q7M89evTKy6gR6Dt40kqCUaag1rQomFVALQyd 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Qwm17yM0eHGALg50BCtspVVig5lbqOzewjyg0sNOMg08uIEuQpLxhH0n0baOHDAXjdSxPILNPNiwYOr0r9rp2FuBPFGMby32J+EGMA9tGlOYLWULylC8CZkYjobl4oKn7BrgdFRd1GT0WtCdnv+N1r8d9dDBxZ/wv8f5LntOeMcRv50i655UXreOCfPNU3mG0M0nvbWZothT6Ggb0FDi1OgInSXxxOPSeetDSzeWQ3l4MBL0KjFGHjwbTHCUy2JZCIdT4eICl8OrNqBQKIJA7g8PmJ1h1lN6UZMxe2kYKGbAc6DKxZ8hMinM7+QfL42+/Wd7AOUBGtPrK48QEA4YOPnjE4wdAMNLjhHBJE5ZXWOihGVLOXzJgW8S1LZSVU5rjQr+I1y5TpXRmnfC786QrvVOE92s8jEcPeA1Sx/vtlHzwPtq/mbcl5T5luBX4hi6EvMlxEp8KQXe75CeaczeuD8G7RAmaQpV0y0Twkke0GwTgf4fcLEM6qE+dMOu+IxlyihKABJCCcxxz6FLKK0S/pYVCHBmpJ0rJdMkyMCqK0DdBN9qhF7wt+10P5Oph7gWgqK1AHBSyqE0egYvZywXCQjB9Z916GRmHLU8d3NdHFTsC/f7wwJyQWgnkCUJHQ1afSj4aQi7yUHzV5BnjrhCNQ7MTN7QJkeCm61TRxBDS0YRA9xXJQ4AVZNWs40EG2+jYQDnn1MV1ZjfU32COVgOc7fkwbfcPAsYUKmpdcZuzTnNpf1IwweNUow4GcrgfdbBJ6hknho5YyspypUPPYDIRmhygNbtw55nC2Ybgd99KrTDuaGEmSrKES1L93BczXMnag7NM9t6fUJkoIulJIDhga3ShB+yRPI3IB4RFKcXPVp3mOyAQBq5UFUPaO2wFtWeKZSLgnzxcjAQEBRt7fjJ9ZkRQ0NPXlryNTlZ+Bsv6LhT/7L9P4uEf93yQpHNYGBNHDVHel1uwLcILqsU3p9t+Y4EnN9rUnsGXiRNemQLqgVCr8vPg/5rCZsnYsdc9VqB6aaNOZXB5x6hMm/tFuQ12W+nG1zbiQ2LbkTVZoIwxRo3nJijtAqHiLU3Mh7py6vPszeAkTL1lD9m1cte6+3N4eADMBFdyW2b5sz4+88SssHSN6FDGBylHecBR/+n8MFB1yoyVS8iWu0DAQUvwwOprBIK3/dr99CfLYi5xmJBuiBDqIA+svCZ2msA5LQ7ti7NtMBfd6mLO7ttq42rPNwF956ynONAIlD5JSFpQ3IuqGDuB6NQXfPreC4ibmR45TuL8rG+iqXd6DwDgQv02VrbgVUlFKK5vRgWdMCB4MjN15P2Em31rWsiGVeh1DbhHSgcwQEs9qIlTpKH88jbj5Cx3I4ivnMeURsFJLgS+tFObgUyICWiJxBWPGy3OW8YjiS2L9+xjpTcJtxL6R1qPnkDYSUH/4//HFbRgClh+DSvmQ+8NU8bI/VqJj1rVgLYcQM1e5393JthCTMi0pJ5LtGQIFcvIOVRFZ8rAmAQ1KmJ4fn+22ERZLLlDXHG1+AO7VkUDFWUCb6572ByErQD94oTuMZ+KWPE2l7KKqvdG4SMy/nZd50H5sWoPjA0/f3zCU1t X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49f73a10-fe59-4c49-c717-08dd231d2be0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:43:55.6468 (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: N2NwNeDGcO/Jbu+sjpHpnb7kB36sQHhlzFl1GkT1VbZin6rRmXwRhiudk+hcaVB+Yg1tk45xZLPbmi/lD2sgGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 The MIPI-LVDS combo subsystems are peripherals of pixel link MSI bus in i.MX8qxp display controller subsystem. Add the MIPI-LVDS combo subsystems. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch. (Francesco) .../boot/dts/freescale/imx8qxp-ss-dc.dtsi | 4 + .../dts/freescale/imx8qxp-ss-mipi-lvds.dtsi | 437 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 3 + 3 files changed, 444 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi index ab84ae3198c8..4a3e4724be75 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi @@ -152,10 +152,12 @@ port@1 { dc0_pixel_link0_mipi_lvds_0_pxl2dpi: endpoint@0 { reg = <0>; + remote-endpoint = <&mipi_lvds_0_pxl2dpi_dc0_pixel_link0>; }; dc0_pixel_link0_mipi_lvds_1_pxl2dpi: endpoint@1 { reg = <1>; + remote-endpoint = <&mipi_lvds_1_pxl2dpi_dc0_pixel_link0>; }; }; @@ -207,10 +209,12 @@ port@1 { dc0_pixel_link1_mipi_lvds_1_pxl2dpi: endpoint@0 { reg = <0>; + remote-endpoint = <&mipi_lvds_1_pxl2dpi_dc0_pixel_link1>; }; dc0_pixel_link1_mipi_lvds_0_pxl2dpi: endpoint@1 { reg = <1>; + remote-endpoint = <&mipi_lvds_0_pxl2dpi_dc0_pixel_link1>; }; }; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi new file mode 100644 index 000000000000..fa7e7c33518e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi @@ -0,0 +1,437 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include + +/ { + mipi_lvds_0_ipg_clk: clock-mipi-lvds0-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <120000000>; + clock-output-names = "mipi_lvds_0_ipg_clk"; + }; + + mipi_lvds_1_ipg_clk: clock-mipi-lvds1-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <120000000>; + clock-output-names = "mipi_lvds_1_ipg_clk"; + }; +}; + +&dc0_pl_msi_bus { + mipi_lvds_0_irqsteer: interrupt-controller@56220000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56220000 0x1000>; + interrupts = ; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + clocks = <&mipi_lvds_0_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <32>; + }; + + mipi_lvds_0_csr: syscon@56221000 { + compatible = "fsl,imx8qxp-mipi-lvds-csr", "syscon", "simple-mfd"; + reg = <0x56221000 0x1000>; + clocks = <&mipi_lvds_0_di_mipi_lvds_regs_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + + mipi_lvds_0_pxl2dpi: pxl2dpi { + compatible = "fsl,imx8qxp-pxl2dpi"; + fsl,sc-resource = ; + power-domains = <&pd IMX_SC_R_MIPI_0>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + mipi_lvds_0_pxl2dpi_dc0_pixel_link0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dc0_pixel_link0_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_0_pxl2dpi_dc0_pixel_link1: endpoint@1 { + reg = <1>; + remote-endpoint = <&dc0_pixel_link1_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + }; + }; + }; + + mipi_lvds_0_ldb: ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + assigned-clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + power-domains = <&pd IMX_SC_R_LVDS_0>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1>; + }; + }; + }; + }; + }; + + mipi_lvds_0_lis_lpcg: clock-controller@56223000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223000 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_0_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_0_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0>; + }; + + mipi_lvds_0_di_mipi_lvds_regs_lpcg: clock-controller@56223004 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223004 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_0_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_0_di_mipi_lvds_regs_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0>; + }; + + mipi_lvds_0_pwm_lpcg: clock-controller@5622300c { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5622300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_0_PWM_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_0_ipg_clk>, + <&mipi_lvds_0_ipg_clk>; + clock-indices = , + , + ; + clock-output-names = "mipi_lvds_0_pwm_lpcg_clk", + "mipi_lvds_0_pwm_lpcg_ipg_clk", + "mipi_lvds_0_pwm_lpcg_32k_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0_PWM_0>; + }; + + mipi_lvds_0_i2c0_lpcg: clock-controller@56223010 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223010 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_0_I2C_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_0_ipg_clk>; + clock-indices = , + ; + clock-output-names = "mipi_lvds_0_i2c0_lpcg_clk", + "mipi_lvds_0_i2c0_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0_I2C_0>; + }; + + mipi_lvds_0_pwm: pwm@56224000 { + compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm"; + reg = <0x56224000 0x1000>; + interrupt-parent = <&mipi_lvds_0_irqsteer>; + interrupts = <12>; + clocks = <&mipi_lvds_0_pwm_lpcg IMX_LPCG_CLK_4>, + <&mipi_lvds_0_pwm_lpcg IMX_LPCG_CLK_0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_MIPI_0_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <3>; + power-domains = <&pd IMX_SC_R_MIPI_0_PWM_0>; + status = "disabled"; + }; + + mipi_lvds_0_i2c0: i2c@56226000 { + compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x56226000 0x1000>; + interrupt-parent = <&mipi_lvds_0_irqsteer>; + interrupts = <8>; + clocks = <&mipi_lvds_0_i2c0_lpcg IMX_LPCG_CLK_0>, + <&mipi_lvds_0_i2c0_lpcg IMX_LPCG_CLK_4>; + clock-names = "per", "ipg"; + assigned-clocks = <&clk IMX_SC_R_MIPI_0_I2C_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + power-domains = <&pd IMX_SC_R_MIPI_0_I2C_0>; + status = "disabled"; + }; + + mipi_lvds_0_phy: phy@56228300 { + compatible = "fsl,imx8qxp-mipi-dphy"; + reg = <0x56228300 0x100>; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_PHY>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_PHY>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + #phy-cells = <0>; + fsl,syscon = <&mipi_lvds_0_csr>; + power-domains = <&pd IMX_SC_R_MIPI_0>; + status = "disabled"; + }; + + mipi_lvds_1_irqsteer: interrupt-controller@56240000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56240000 0x1000>; + interrupts = ; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + clocks = <&mipi_lvds_1_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <32>; + }; + + mipi_lvds_1_csr: syscon@56241000 { + compatible = "fsl,imx8qxp-mipi-lvds-csr", "syscon", "simple-mfd"; + reg = <0x56241000 0x1000>; + clocks = <&mipi_lvds_1_di_mipi_lvds_regs_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + + mipi_lvds_1_pxl2dpi: pxl2dpi { + compatible = "fsl,imx8qxp-pxl2dpi"; + fsl,sc-resource = ; + power-domains = <&pd IMX_SC_R_MIPI_1>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + mipi_lvds_1_pxl2dpi_dc0_pixel_link1: endpoint@0 { + reg = <0>; + remote-endpoint = <&dc0_pixel_link1_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_1_pxl2dpi_dc0_pixel_link0: endpoint@1 { + reg = <1>; + remote-endpoint = <&dc0_pixel_link0_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_1_ldb_ch0_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch1: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_lvds_1_ldb_ch1_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + }; + }; + }; + + mipi_lvds_1_ldb: ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + assigned-clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_MISC2>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + power-domains = <&pd IMX_SC_R_LVDS_1>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_1_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_1_ldb_ch0_mipi_lvds_1_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_1_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_1_ldb_ch1_mipi_lvds_1_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch1>; + }; + }; + }; + }; + }; + + mipi_lvds_1_lis_lpcg: clock-controller@56243000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243000 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_1_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_1_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1>; + }; + + mipi_lvds_1_di_mipi_lvds_regs_lpcg: clock-controller@56243004 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243004 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_1_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_1_di_mipi_lvds_regs_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1>; + }; + + mipi_lvds_1_pwm_lpcg: clock-controller@5624300c { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5624300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_1_PWM_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_1_ipg_clk>, + <&mipi_lvds_1_ipg_clk>; + clock-indices = , + , + ; + clock-output-names = "mipi_lvds_1_pwm_lpcg_clk", + "mipi_lvds_1_pwm_lpcg_ipg_clk", + "mipi_lvds_1_pwm_lpcg_32k_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1_PWM_0>; + }; + + mipi_lvds_1_i2c0_lpcg: clock-controller@56243010 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243010 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_1_I2C_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_1_ipg_clk>; + clock-indices = , + ; + clock-output-names = "mipi_lvds_1_i2c0_lpcg_clk", + "mipi_lvds_1_i2c0_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1_I2C_0>; + }; + + mipi_lvds_1_pwm: pwm@56244000 { + compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm"; + reg = <0x56244000 0x1000>; + interrupt-parent = <&mipi_lvds_1_irqsteer>; + interrupts = <12>; + clocks = <&mipi_lvds_1_pwm_lpcg IMX_LPCG_CLK_4>, + <&mipi_lvds_1_pwm_lpcg IMX_LPCG_CLK_0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_MIPI_1_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <3>; + power-domains = <&pd IMX_SC_R_MIPI_1_PWM_0>; + status = "disabled"; + }; + + mipi_lvds_1_i2c0: i2c@56246000 { + compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x56246000 0x1000>; + interrupt-parent = <&mipi_lvds_1_irqsteer>; + interrupts = <8>; + clocks = <&mipi_lvds_1_i2c0_lpcg IMX_LPCG_CLK_0>, + <&mipi_lvds_1_i2c0_lpcg IMX_LPCG_CLK_4>; + clock-names = "per", "ipg"; + assigned-clocks = <&clk IMX_SC_R_MIPI_1_I2C_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + power-domains = <&pd IMX_SC_R_MIPI_1_I2C_0>; + status = "disabled"; + }; + + mipi_lvds_1_phy: phy@56248300 { + compatible = "fsl,imx8qxp-mipi-dphy"; + reg = <0x56248300 0x100>; + clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_PHY>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_PHY>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + #phy-cells = <0>; + fsl,syscon = <&mipi_lvds_1_csr>; + power-domains = <&pd IMX_SC_R_MIPI_1>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 9fb4bac708a0..0acc93675a87 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -34,6 +34,8 @@ aliases { i2c1 = &i2c1; i2c2 = &i2c2; i2c3 = &i2c3; + mipi-dphy0 = &mipi_lvds_0_phy; + mipi-dphy1 = &mipi_lvds_1_phy; mmc0 = &usdhc1; mmc1 = &usdhc2; mmc2 = &usdhc3; @@ -334,6 +336,7 @@ map0 { #include "imx8qxp-ss-img.dtsi" #include "imx8qxp-ss-vpu.dtsi" #include "imx8qxp-ss-dc.dtsi" +#include "imx8qxp-ss-mipi-lvds.dtsi" #include "imx8qxp-ss-adma.dtsi" #include "imx8qxp-ss-conn.dtsi" #include "imx8qxp-ss-lsio.dtsi" From patchwork Mon Dec 23 06:41:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918526 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2088.outbound.protection.outlook.com [40.107.20.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2D4019D8A9 for ; Mon, 23 Dec 2024 06:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936253; cv=fail; b=I5C7QjyZp7lvdYOVYtB2U/Mg+E25moNU39ELk7SWo4l/sHa1JxtBrBn06N15WekkBGY7Bl/pEz22Q2r/gTtd/LIfIwwHVpg5p4pJTT4mGbGnppNAet1sCeatQoo8+ZJbG63S8CqJclYzv1lptQUeOIbXK3KBjfIZODjixrjLX+0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936253; c=relaxed/simple; bh=zHEBOHbEl4sms09i4VRfcGOXKziYpX/bqU/0V62I/oU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=pP/cpeTaw69YIY6cs2G63eqgxtB4TuBn+12kW6eNhGEvSHkxXLKPa6OR+9M19v22mOfjuOs+rbLfO41clfd7Vp7YRsBhbBwWrbeFyzKS+68e9ovNaK0qsvubx6U/EfaJ890LmZQhG2RBuLL5Vd0qGveWwJSv/UXnjL6e+pWFFmE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ST2xhELr; arc=fail smtp.client-ip=40.107.20.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ST2xhELr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ogegclShzF91xFi/atK3lBROJ3kP2pPc1fgN5GquevdjK1kWDiWC1wEQBPQz7gCkFgYSro9rvcfut8R5w+WgTiF+aP8FO0pP6Jxe/96zcZ6/VB6TEASgZs1/l9Jcm5/zwCkdTrrU3lzIX8jcEFQkspXd2dng1ubchZBGEKtrYTwwJKGeQpe50VG3GFfUOVU/egObw7Ar8boANHtVmfoAFJ2T2n1Hz2PMT2RwSImp+iYHiPS05JUtfm0hFwjwKHdm0e9eW1f8W22USEv86dyqUdnLeDqrYw47S6BUTt+bJ11I0CnvyuNz37PEVuFso9am0/NkriqP3nxdZr3A/+sVQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2/64GOZVZ7UPD/71DFazdO8NfU6O/0A3dnPczvkP/Js=; b=n0O8AtdLSSiJJl18eWDOfIYgR286cRMEps2NjVEVat01GHtZTObv2Qf6vXsVbzP+gehvURktNDwsTwzQEk97DWoJkEMFhldDKnrixKy9CkJoCqXaomGcj5G4+yGDI4P6JLDJsZAECu+oUqyAHOnp8/cWzqmo93lva2IbhhhLQgBgCLDZQvs2oOPFokiBHLAdzqPcZY4RUYxvqfY2afJWs7cWV+s2PpPLO8HDtzVZbDFPWSzwAriMqZTCN94GgINC6ZvPNPTbR70gUEMu3mxEW7EvrjU4NV7GYp6KcUvz7KtXH+MZUvWFcvtnBMCpk4yXY5MmrsYqTY8yqgpDZZHa8Q== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/64GOZVZ7UPD/71DFazdO8NfU6O/0A3dnPczvkP/Js=; b=ST2xhELrW76vyqbZXEaDm+1dbYVE9spMcnc6QO8VipcKZBsHhpV5jgUaOE+TPO9bgbAyNZtXHih5uPCYLv0HUunjkDnafuKFeRLM37aev32fAYsafKGqi4x9OzKVwx7Hhpm1dLHXBUUjPibTNaVXI4tLr9ZP91p9+ULwsaE82kGcSqkzQc5y4dxjPlRH2ZBiM3s6JkkV3g1jdvSs4jCIQKaUDd5Qz322dS2X8Olm7EKyWWPlYoSpKvmVuv1NQRx/9Fp9rmH5Dh6BLSU9NjCATkW5jbUC9EeXpBf/qmp8rgHi6nb4f7lBwo38ARsPh7hKl1ib5s8qSPQ9wYdU3iUSDg== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:44:03 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:44:03 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 18/19] arm64: dts: imx8qxp-mek: Enable display controller Date: Mon, 23 Dec 2024 14:41:46 +0800 Message-Id: <20241223064147.3961652-19-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: a8d5d608-ed7a-4971-68bd-08dd231d30a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 5NNv8Gdqe9OcplE7lui5uWM0z5wAQGYBnrr85VtTu+D+7fldUqT2fS7y9fN6zKuPK9g/XK/Bq38KxO7UZZQ6b/xBqY1iGi7eaJZWuHDxud8HRbjKelEQYb0qfKIqeK24d0LwbYieJTBxXvMr5bRswU/uRq/XXW/eSXNKgaig3e/fcABtPPMZ9ie+AisMLVoMoY8frQVDKf/kfyP54KCm2hfui3qfkvCnyBMhZ89bIaRYkImi1pclK86wDch50ZmWf+xeHH3E/e/aAugijRBq/hGLG5msrn3B+XoabITDHqKqa4p0c4IPHz0rqu8pV/uxVtG+U7fzWeACX41H8M0o6BZ/qduYt1swRTZuvrYmAevxcxTOSCQ6EoK3au8bJGBsKfv/Y8lddjHwO1PijkBppJTj/br6w21jJlzpYNjouLJRJ2bW7s57ikKhBe6iL4mSXpaziVn1TwElsJYGitruE97fj7yOkldYHSydhkG1MsFYB02S13AzQzrMdIi78mrqc1y61USVEG383XeaDnaz5sC1B6rDX746XZKLWpM2sar6WWXaVW1vE92LNoYnU9YrFoUE4a0/22U3xRaW+b9dHPnGDTk+0vgf7aLT+SqwtjmTRAP90JRpGEK/q1WmfVkypSplGtqgRVeJlUbheQkoUwGnBLtsSsq1Frl1o5e/sJgyVJKuUpord8VsDB+cmkGQfzSDYKADNRXJlMioECrnX7jZi6V+MlZm4j5Tf8fvSO+eOa9v/61WG+8uVS8KRAbTLI4HaYPPCa2aDqqwbhrySK9HjNq59mDMO8zbBs5ZJApeAS752oupmMtRcRi4lOya22rRAFfJxnuyP8ZOrlASnfy8atdFk1i2CEW8Zw0Byiyon1yiq2itUwsT5T7tQ/8hj0aGNixi4adXUD7zCX0n+kLl1F/Spii1C+OKwuuyMIFSc/CQpwYp2lEd0sNh421RLgR/0l0krlkkMZQXJE1gAlaS3hGguNlz31PVFNMtEkX9ONLqp+pjFcwotU8YEcJFtH+32WE/16y3ABntq2wawCdd7zhFy4fHwNDhoFETw2TQF6irWGFXmL0+MHJbq4vimMQhhs9/XF+fkCs8NjoDtre/PaE8M2I4dALhqDTX55xFTp2ZFsKbwaSjLSiJH/BihiSj1qjM9WORGNcvCo/skFGtzPh6pfLNS8xHo1nVLopEE5SWXAuHoXyxt0x0W+A5ISMffYxs1UV6uzecJnEcU1q3w2Xj0mM0xQ00FhisHnYEgEoyDuYWFwq0S/WiDkpB+lwGHKEpg5SqWV03kKLtttDwrUN7Ln/5CjrjTZeHBEB1BzZXT2vGkS3f5w63xM6c5IOa92Y4HxGWfHhtcFJUmjQXx/3tXuTiNO6IstWUFUNTG3fNKzhtlF0IpCAN1AOlxQcja1pwf/HfVCGBurWargnuGJ7B8ywLQEDbOhDijSE6y0YsDlRYWex/k8CpCtQ7 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HAlKjBKsfloIZaB14HAmPEDVZ4j+Tdx2INf18dlrYAyrZfPtA+cOfaIi7iu4PMyfAzdEof7RmABo5rUMj3nMcW8zGwIJQSnl1DyIyNbsrvCJxHk+ZuAsnZ2XAB1ILwlBg69wYCmFkFwI56hfr3VfVY5aZyzeHEFTTO75HyA/hAtys9XHJSPuot6juiiStxE9u/Dk4YxPe4yDp4F6U/GgfEreC5V2Qfw+rpZf1MvqCEAH2QcAAacfKIVjRhuhOOZkxpr0a4F4Yf3Wv7ag/mYCtpM28F01+RgvxwwtGWeYqWUKXzFz9+cN0VxPeSOtxSECQogrsl0GlsID+kH0/mfqa+37Qr43Wg9l27N57dgJE5Nk539+b4CEHdr/ohincORW5DnqY54ar4bcj+JIDNC+vowCyzzVr3BwU5v6Ec/1suEuZ8S4MsQ3nf4OLHLBJ4qVeSyvefc5p4eh9A7qMDCMIkgGiBdVp/9n4XUNfv+SvJrHqyN0YOqdZA3kpgYvLUbFtzMFQCDTiu/y5wmgd3Rt9pNq5WCrscLKI3I7CjINdi2A8OD1MyZPHKknOTAEAp9m1FDkF4/WZOKADrXc5admpluFP7vn/xCkfsuQa8Ycns+jemuMzSCVhRkSyO0SVGFGQXeg/PtTjPvGfhHcprdUDY2DMa4h8uMaYZPzulAzLeG4dThuoQSHvAv+OhxA1mBafjekJQDHVVV7zO/lA1JkfTC5yc7Jup0d+Q3S7GjYhVGePMhrlhtgtN5cXAJfpIzJYv3fLf5GQWvRJ2pKHqDbpgGAuBm4V1NWbuJvwG4mO4MEZcx7nTtAqa1M41CjUkWNSACAwd/0xKQveJlTZMa5Km2KaviErEA7NkHbeGOLiR+fahkxzXEjhw5fmB39RkNcF7OAAKMqM+H+nhWYwyDvwGbrB4xKT4ZQ8AaHDAR45xcW1qo+E6IDGsaIiSl0szA6BEOTppQ4ltmNY4VQQ2s2s1WAmuphNpl6APPAuxBBu/WMrGmLAc4+hW85/60ucl0WfsyBBytP6O7dKiTb10O0xeyLB7wHoAL1pXtblTcdPxnEUdyIJHMEo8sEJD8tF0jj2yCLAE650YLoHsP1Nrvvk14rIUG6IpxyXtEM7aUEB1KqMj7dm3jWIJzVrIAKP6T6mVVJAHxUw2+3DZ2gwk6DOQ66xy4Z5CEE0OEOkkexolMaUvqUfe1KlRstlj1bemvHHRhAZf3yiuDS0XfPdvL1x8phlM0bpyVX6EczECD3K6uBAVf02W2o52AzTrESW3xpo4BM/jYdFQ2mTqqoU5QUXDF603ywDKFk9e3IggSaPtWPyO3Xxs6om4RPmAc/7tfXR8LD5z905qjE4dy55n6QbM3Q9oe/bBrnYkXAFfgKITT0g+NllZGtg6UATD+Ni9IXZWr2Vn0QV9zObZLPhhA+5yD1UNEp47Z0DnMjf46lbzOy4NaGyASGnJjfQZBe0hrStjhDeQO6mjPaxgKTJhmiJvx6ivOyf7/n3YIQqjdLu5dKcsUbaHF6BzocuSkPcDljuyXzwywwnwa+3zpWUnNPCEy7gHXmrBcmxyMxBgCDOaGZBtLXrhmBrFbmJiko5bhm X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8d5d608-ed7a-4971-68bd-08dd231d30a1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:44:03.6529 (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: e0n8bjO5Q1/eW0HVxaZ+41q8oCgmwsz5x0r3HK3gu3yGDlwGk/GmohvY/Q4ObDb2sZSMyHwqcUHgkYpy5StjXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 Enable display controller for i.MX8qxp MEK. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch. (Francesco) arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index be79c793213a..c7b4015c7bf7 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -234,6 +234,10 @@ &asrc0 { status = "okay"; }; +&dc0 { + status = "okay"; +}; + &dsp { memory-region = <&dsp_vdev0buffer>, <&dsp_vdev0vring0>, <&dsp_vdev0vring1>, <&dsp_reserved>; From patchwork Mon Dec 23 06:41:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13918527 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B158019CC0F for ; Mon, 23 Dec 2024 06:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936259; cv=fail; b=dphBoIU1gFRZGmqJTONNQp0NOVYOH1VvXSYB9Ut0t3D2uArGDFVqnJvD5Epp7g4WP5syBZ3AM9nCkQCQrOgeuoZWb2OA7uPRkiheeh/VoO+143U5645zp9UzLmbX5oOW5Wwvem3bGiwhORei4egf7QaB8idjNQeBAQa6ZGuXiIo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734936259; c=relaxed/simple; bh=ZCXyxmB58MYFquXc0pvZrDrwwlsn3dDjmCL5PiivX9Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=HoSkKF8TumR8zUMqCQRBnjnZhgvcwCib4cXC7VVcRXAQ1TXcIgTaCMzk5eFZIFHLdzdNPC4XftS6vAcoYrP8OyRvQcQvgv/QCsM9Kmj1EMtoRNKFbezzEW0ryV+0gbM2SG0i3D46Oh46L+hMWGRnmQYlCowndFdUVsZJsv4V9LY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ixzITOmT; arc=fail smtp.client-ip=40.107.20.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ixzITOmT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zJ1S6gkhZr8l5OYNJwR3yxX6FItnRhJXWCTvgjy8PknZjwUTtN5JfpXOjqvFaj5A0Qb9E9fKQzF/V8184UkIFibS1bR5KGUzhXIPlWOxygh/vZ38IYQjL7UP5fYp/Zjj3sT0E7g52xc6cAHQPftvmb3q+UewEs/rD/vy0OKQUSvlOT05jaLMGnvvdvzIkANXrOwtkWYsFRcKZ/t6gTfbDiCb2BHdbSNw6VYVuV4nhvRF9XHxGG0G+WHGdfubV52sNqjZP20UTKd4dsULVYxJvjaBOk7EOZqQiRrfo/DEiu6YqgAmSHd4Rvx/ZFQ6CwqN3kwa4haJ/jtneEhogGYDWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RVWiJqCYn9BVBNDFswBQ83dNbOE51ydVJwXHcmF8FbI=; b=M+clPqmBrN49I0ws6FiPMFxT23ZIw50EcsI0Pln524anqo7bWw+NrFtLitJtQtkjF7+yh1lBVN+71CoHeTFZSouKiouTRNvmgrCKWEptD1fZ5n2SY2vjCy4ToR7wEDArGUzTS3FsfmYFeZ3TdwSXopmu9oTL8A4Kp05/7WaOs04JOFI1HvPrVvljaXVTIyrnYp75uVryLYmpc/bsLxKu0g2UbkyWDEF3+Gz6v/bRJmQrKHNVL6jVLl4G+S3TGbG3j9LNDOnLI3Kjh4ztLUOqt919amcXJCT9D2bBgADRrhHIQGDtY1JXsyqqOh7sJFaOjTUU/F4FMmwYTiabP/q8FA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RVWiJqCYn9BVBNDFswBQ83dNbOE51ydVJwXHcmF8FbI=; b=ixzITOmT3eGVLRzXVTwXQeoU2XGrOFvV5cosJDjMSKJVJ+4sWsN0CGN815yRTd9JtaqIPeJhrtMNkx5ObEkVwjC4SsYJyihNEb84dinCg3TyTx8YsYllaliqHniotSbCpSGASsNy6Rg4pSHrHxLkoPontATpmahxrGua7WpxyoDMoxxekqJJpBNRnMKmKg9znXx8L067HqU4w94/llWkqXj0sLEVGO73aCMUhT3G2M8Y5wxN8mf04dyd8+1qHt1aoWXEqfOOTh+Ys/HToziEOL3VLrSswAz+wOrGmTG/pW2eZwbBNg1uK3HyOs24VTWDSHhBk6g5r2iumFqdIX3ucA== 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 AS8PR04MB7941.eurprd04.prod.outlook.com (2603:10a6:20b:2a6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 06:44:11 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%3]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 06:44:11 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, u.kleine-koenig@baylibre.com, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org Subject: [DO NOT MERGE PATCH v7 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Mon, 23 Dec 2024 14:41:47 +0800 Message-Id: <20241223064147.3961652-20-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241223064147.3961652-1-victor.liu@nxp.com> References: <20241223064147.3961652-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::19) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7941:EE_ X-MS-Office365-Filtering-Correlation-Id: 779e89dc-0ab6-4c5a-7d25-08dd231d3530 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Sxb8y4J/4GPqCj+vxGWL/OG+LJ4RZ2iIYYCA3Vt8bR1G7W88QnrInD3IBc1Gb1dgqJk7INL52So1mQJXJHW2+tf5bLHKowiigl6hrTn9AALaLa6lRnpAk99Df5sPOexuwrFRVH6O9EDToI5PhL6jH9bPhXahHDMePPSB+mN4RgKppTZ2RiZlfzahqNYy+2L/BqAH6b0BWrYIvMxYLAYnH6ptckIoAajF6v4S7QKornvwbrNz1axWzPFrFRQNzgheQ+0Ja32KiZlz9KIwPF9V4GA563P/hkcGhz97HSo3o0ELxAtTqFvScC5wC4AkA09HYqKGIiM3Y/tJmBkAfiIirPiebWP1N6qOZA0YCh25CXJ/bpfjQPJssJuuFzHlw6GWfJdTmOfe1obRG2LXtVEZi7zfdZpTzhfkzmHHowraeev0PZkJ9Ys78LYRi1Gg0bIS2+/Tw17ruVVY+00Dre3zS4pQPbQlnP0x+L2Q7h/cuiwT7ZuHcaKzRjiSQ6dgNw4Kft5mOpXhGkBjlPyWJh5fQ1FVms1X2zOkrmvvbXq70ZgD3I1mBt+AvvwKtMXS0Xrfkj9Lch6V8uUiFn5nUKcQL/iaUgWiGCRgL/5N4Sz5xUekwz0zv1yvHBK6L5rJ7Hz92at6Lhzx3hA3SjfAyx6szxtgfCMe0zYYQYDm8dJSR5F4l3zhdvLkCWS+/4Vte/3aohANYjYilZw7DWcRThNfHVeF5PkFGMgpjVyAxjATCBL84d+qm6S8v9B2VQllUUaXE2beU/qM6N5L22t3XdlXVi8r+Iiq/jBzeSgpvtzlQVOy3MVGTlHRSr2cTIpD09/QU6cEK0A7qxSfboE4yRZczgUt0D+6+Z8HOCgIFLzSDH1dvPKANZDYpwCzWhBfjpMcL7OjvHLHb1x0kJKY7oCqQjKsUM8h0sC3yPH/sSZG3+GWmsq38QaoF4Th1sHfX54+ZXfasdRh1/J7WwNn8ec0nAa6hbjuwEaT1kyN8qlUeth+nK4NSTzW/XY6OAHcHZsCAPusrIp/0fMfoAToOhr6ca6GT5x975aRWWey1UL8seT22gmLQSUqJabMv9gqjAyd+vQ/TGFYlkUhuA+Qoir6ZyUug/Rjzrn+GP1cMJCGM9JJZlI4ofviWzZkkIPN4Zi4kXwYVd2v0ONh+AUrIxc5YpRO0qJ1MyjuY0PdQbMuQR8YOfGbj3CkEWa5rgIpAyk5pLjAqBbyESA2gx881dCK9SmYqojBsqOg4FJ2+tXs7N5nT8oKFp1Gt9Lll8Mcl4qIK58ytniNrHvPU0ypDPogQ6zDOKecjvcNTo0NOTfqzVIastWuwAUUxv06Ig8sCeUHVKyMJ8Wl/hR5TMOJcKuRfcJMMfv2D6A5WcAa3+dGps1IObipNa7QxS/XF2FvPmfOoM+7QH4uOYgt/ZQ9rj5HbUZ+Pa1e4WyEftrsj5b3e2U= 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:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l+vkiyMyL0LAZtENfbuUTgvdIFEkkGfiy1FDPOy75uTWzB6OX8EjuPrlxrwUg+hK3qu60krOSjPX/CkCBtG9OM1sSCd991wRL/ce4+KcX+jt88YFR1pXIGodBcF3xJqVpNbw20kYYnAsGpuQuVIjSkq0uW4lC3KFZClSxfmxPUc0BaAYm5ekwrp/zxdZXDMjNzqerQrpLDXNf8qVKm1aAD/0ZtAJVmfWm2nyQz1KZJvBb3/JsScHzU/7M5+FbioZVZ8R+/coAoT7i3EvYhzBzk1ckrIYwHT5DioLyJB6mCgVRt/SXE7NJEW3meBcmgrXy97aO8h5XuBtklPbhAvXF9S1cnNwMentxaPkKanCTptvM0iR2YCS9MzJQM3lgvv1jFn7UXWt2aUD7MPJNSDsCqqeXGnNi/g1b1WMm2ZLJLBoclBzH8BgNCuxcroNc+0/m6492gGcL2K7wfLzbxfcJE22RsmDMu8bBtw5rEngEviuPJ+QIgoNptOfH0jFPoXLQVpjk4nP2ZbGnYorZf48RwAlayd/MQNmvyZOl3xvX3bALdnP6Bo+kk77pUP/1UbwJihrU+21WKJQ7bVym3Qy9CS4SsnqNuMUKHySlp7hwFkYCIf4OZQrnO0aTH/A/L9YiUqriJhOqhPsQxLXGdyPSL2n5mzC+eWvQmdedlGKAukVFDbNPnPsyf0x4B/LcK64YpFG/EcCybDypyOw6IUpYj8HUx2G0VIQgEJoNCASNGuVkpDustQAll/aI3lxVhzpNvMzsYURE3e0ZpHBYryGTkpcG/KF9DAXhMYCH+NoTso1/mTa76YK6b8ArdCbwUVN9DqGCMi+7up3CXIdAp+ehmGMs6B4MG4F+JW19bMUdd2n5Fv+1BJWXZth8SAPNWR+0bP4EZ5lVo6iZJGxqOMQpN4c9iO/a0cikDAiRYMhGj3JfYnPBZ6QB72x9STa8/Tc726dMbur67aynUMsL9tr5y2z4QcPK1p3K6D/qeVhfrje6B40FhbdUelzb9W8K2QohICCZ1h+0iOe0ZrGEOXlPwW3XCpJKUcEEukof/wUZLcwLtLsB9d7Srhnqsi7kIt6g/5NNq+9Q/HqCnEPli7mk54aLIT22zDcYgdgoDxjdzjiZedsHR1VPN8CX3UsuHZ0lUXqRQvz8h+zbyePsJv8hD9vY2C3kl902mOYAg2mLvgAiD0hN5XA13zpEWZ0b0etJ6jHVZqhtxZ1lgLjdulAROV9YY9t2hsCiJ03XdpXUWqHf2c/hkewaj/qsH47RvIQ97drtr3VOYdt8E3rBosrhBllY62pgYNUID7/tAVaWzctp1SXm5Lp+zn5KQq4/mISuf78wZqVsHZ6bF5f/v7rsieqg4OK8oxyBGAPULPTAcFZ1GslG6spLIyzoOtG5miYvBUOr7poq3ZxHYS/0JKSUIhf7JFOMjIoccFDgfVkBcCkVx8yJXOlnnsIWk4jkOlwaqTA8VUs7261Rxv/u76HuEtWDVd/tlQU9C0oFpNG72UXOzAJi6JAL/LdYgsJB6q1uQFTm+2GA/N7zodkSoi775tqJ1Yv+CCnW3THphQnDNXZZtqCsB84jHLqaCDjLCWT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 779e89dc-0ab6-4c5a-7d25-08dd231d3530 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 06:44:11.2285 (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: to0hMLRP6nUifXGnd6uJ984GkY8AAkCaa/5l2F4Zkbl2VttKed4b1eTW6He96MT8/rboC9fpck1qRC8BTwglvg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7941 MX8-DLVDS-LCD1 display module integrates a KOE TX26D202VM0BWA LCD panel and a touch IC. Add an overlay to support the LCD panel on i.MX8qxp MEK. mipi_lvds_0_ldb channel0 and mipi_lvds_1_ldb channel1 send odd and even pixels to the panel respectively. Signed-off-by: Liu Ying --- v7: * No change. v6: * No change. v5: * No change. v4: * No change. v3: * No change. v2: * New patch. (Francesco) arch/arm64/boot/dts/freescale/Makefile | 4 + .../imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso | 183 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 30 +++ 3 files changed, 217 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 839432153cc7..408240b0002b 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -267,6 +267,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8qxp-colibri-eval-v3.dtb dtb-$(CONFIG_ARCH_MXC) += imx8qxp-colibri-iris.dtb dtb-$(CONFIG_ARCH_MXC) += imx8qxp-colibri-iris-v2.dtb dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek.dtb + +imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd-dtbs += imx8qxp-mek.dtb imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtbo +dtb-$(CONFIG_ARCH_MXC) += imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtb + dtb-$(CONFIG_ARCH_MXC) += imx8qxp-tqma8xqp-mba8xx.dtb dtb-$(CONFIG_ARCH_MXC) += imx8ulp-evk.dtb dtb-$(CONFIG_ARCH_MXC) += imx93-9x9-qsb.dtb diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso b/arch/arm64/boot/dts/freescale/imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso new file mode 100644 index 000000000000..7ddd90e68754 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso @@ -0,0 +1,183 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + panel-lvds0 { + compatible = "koe,tx26d202vm0bwa"; + backlight = <&backlight_lvds1>; + power-supply = <®_vcc_per_3v3>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dual-lvds-odd-pixels; + + panel_lvds0_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; + + port@1 { + reg = <1>; + dual-lvds-even-pixels; + + panel_lvds1_in: endpoint { + remote-endpoint = <&lvds1_out>; + }; + }; + }; + }; +}; + +&backlight_lvds1 { + status = "okay"; +}; + +&dc0_framegen0 { + assigned-clocks = <&clk IMX_SC_R_DC_0_PLL_0 IMX_SC_PM_CLK_PLL>, + <&clk IMX_SC_R_DC_0 IMX_SC_PM_CLK_MISC0>; + assigned-clock-parents = <0>, + <&clk IMX_SC_R_DC_0_PLL_0 IMX_SC_PM_CLK_PLL>; + assigned-clock-rates = <940320000>; +}; + +&dc0_pixel_link0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + status = "okay"; + }; + }; +}; + +&dc0_pc { + status = "okay"; + + channel@0 { + status = "okay"; + }; +}; + +&mipi_lvds_0_ldb { + #address-cells = <1>; + #size-cells = <0>; + fsl,companion-ldb = <&mipi_lvds_1_ldb>; + status = "okay"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + status = "okay"; + + port@1 { + reg = <1>; + + lvds0_out: endpoint { + remote-endpoint = <&panel_lvds0_in>; + }; + }; + }; +}; + +&mipi_lvds_0_phy { + status = "okay"; +}; + +&mipi_lvds_0_pxl2dpi { + fsl,companion-pxl2dpi = <&mipi_lvds_1_pxl2dpi>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_lvds_0_pxl2dpi_dc0_pixel_link0: endpoint@0 { + status = "okay"; + }; + }; + + port@1 { + reg = <1>; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0: endpoint@0 { + status = "okay"; + }; + }; + }; +}; + +&mipi_lvds_1_ldb { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "okay"; + + port@1 { + reg = <1>; + + lvds1_out: endpoint { + remote-endpoint = <&panel_lvds1_in>; + }; + }; + }; +}; + +&mipi_lvds_1_phy { + status = "okay"; +}; + +&mipi_lvds_1_pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm_mipi_lvds1>; + status = "okay"; +}; + +&mipi_lvds_1_pxl2dpi { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_lvds_1_pxl2dpi_dc0_pixel_link0: endpoint@1 { + status = "okay"; + }; + }; + + port@1 { + reg = <1>; + + mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch1: endpoint@1 { + status = "okay"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index c7b4015c7bf7..cb999be00c22 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -21,6 +21,16 @@ chosen { stdout-path = &lpuart0; }; + backlight_lvds1: backlight-lvds1 { + compatible = "pwm-backlight"; + pwms = <&mipi_lvds_1_pwm 0 100000 0>; + brightness-levels = <0 100>; + num-interpolated-steps = <100>; + default-brightness-level = <100>; + power-supply = <®_vcc_12v0>; + status = "disabled"; + }; + imx8x_cm4: imx8x-cm4 { compatible = "fsl,imx8qxp-cm4"; mbox-names = "tx", "rx", "rxdb"; @@ -58,6 +68,20 @@ dsp_vdev0buffer: memory@94300000 { }; }; + reg_vcc_12v0: regulator-vcc-12v0 { + compatible = "regulator-fixed"; + regulator-name = "VCC_12V0"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + + reg_vcc_per_3v3: regulator-vcc-per-3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_PER_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + reg_usdhc2_vmmc: usdhc2-vmmc { compatible = "regulator-fixed"; regulator-name = "SD1_SPWR"; @@ -785,6 +809,12 @@ IMX8QXP_FLEXCAN2_RX_ADMA_UART3_RX 0x06000020 >; }; + pinctrl_pwm_mipi_lvds1: mipilvds1pwmgrp { + fsl,pins = < + IMX8QXP_MIPI_DSI1_GPIO0_00_MIPI_DSI1_PWM0_OUT 0x00000020 + >; + }; + pinctrl_pcieb: pcieagrp { fsl,pins = < IMX8QXP_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021