From patchwork Mon Dec 9 03:39:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898779 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25902E7717D for ; Mon, 9 Dec 2024 03:39:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A04DB10E373; Mon, 9 Dec 2024 03:39:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="BlurpVHc"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2068.outbound.protection.outlook.com [40.107.21.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 97B4310E294 for ; Mon, 9 Dec 2024 03:39:47 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IY5rrnkQCzcS2GR2CHwGvnGziDDjYiYv0/4feSePZGq8l5KXMuJJ+GxL7+yGPMZsYNnOgyhNARNfKa6JYnvzZ1EkM6GHPkUFWxfH7/oZir5zbsbhFlVG8KTVKhWauyqjbJ/L3FOwi/CmVS0Woz0GG5ipDs4tokxeleqMH5o7cAZwyXaFlkk5IBjmOCI/FUuSBO2S4iAq7RFBQPLVwQkO3SkAuKn0StfUEL3y0eYjzFSBB7OXuN4+fyssMqxyl1JT4QizLr/bcM7jUE5w+sDnx/t14bIh6Z3AsjeTTxDS0yooLx46TQdLOD0jS753ImagzNwEPNCNYsCEU5jzwR67PQ== 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=azUgw4cv6BO3/4aoGBL4zBhK9PCtZOUc2bkYZhlMlaA=; b=ExPps8B2l/NuT4TN24E9P2IPhO9B/RBcek6UjNu0a9xYt+CAiST8wJGFLEg9suRbtcFa816O2paqNwswApHe7JjJBW711dbu9ZWmScnGqaLW++d/xrj1YTdNF/Qlh6MhOEYK32giItUttfErp+yBIRBlZs6RSQrzgBGzR8eEbN8poUpATXLByoEYWhDZJy3pV1oLPHMXQ3lVASpcLqpi8qUf9OcZXmWTi6nSzSSSfk0EDf6H/pz/f7tWA5HcqKA7+rxFMt7Cx9iBeZAyAMSFRceCDuutoDCmFN3aTBaNasEJdOICDoZVOWelS5uYVSqtapKkzz2FpRyiHrCO3Z22aw== 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=azUgw4cv6BO3/4aoGBL4zBhK9PCtZOUc2bkYZhlMlaA=; b=BlurpVHcuTdKqdJmS6vBSieztlrp9YrFNSH14Q0fdnuT8ocf4pnPFhzLbmmRQwSLMo1hSoDoG8ZgYqmQnrh3hMyR0UWdaEkHdzMk2IXm/llPmtNAEgU9+Qr7VOY0bdkRlpu+Qc1A2t8wwjUSJf+jujF1YPK9TCI6jcIjwhZqnxDTHLqDYhEcLvFuAULJKDi2bxpShuYXJrrTKYRN7ePt9TiqoQnJKJTNu9vbYHM+ReipkGj3zZ8wf58RjiZegdOJkmbqn2+pdv1Fob44FTHITvPG9QB/WMZVRLJ6mP5slAjdsAvG80F7oZZXH0IkXYrU8T3NgJGRmTpnceFHsf6O/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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:39:44 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:39:44 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Date: Mon, 9 Dec 2024 11:39:05 +0800 Message-Id: <20241209033923.3009629-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a2dd9de-81c7-402e-ebf6-08dd18031ee0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: llGCjYy2vX+yv5YX/6oAdUYIDi6zOjRpQXbg7EEi0MZcfER+pbTNugMVONuT71AY6EzapCHlc5Brec6kO97D6i7287SQ66p4jCKGGLy2vYycUVWtqWeKt9zU6NhJ1JtnHSikI/QV7rI4JCI3m6rgFBYl0uDfseuiypRUpS45b8jqaKhTl0DbrBIfJams0S/9snvEuCcy/zohByDlCkEN/VvFLzz1r3n+D8iy99BjXKCVJ28zYlcYXc7beVUHEbvHkUnvuEa/Bhz96SmCWz6F7iRrN5WvRK4lbC/yzOUpoyRyo74smtTwLWyg0WKsMIzh65jo+SXSMgBr+D3jnoXeiNj3kJ0qv2Jn+S8QJl3N5onXyAB8v3/2wpLBWjJeO85LOc2M28ziCtjxgdt9j8kDB8OZ89xE5TSW8JbKC5fIDDNbTNc69hwc0NkRSPu6fr/UmG+WS5UG9hiZB+7oORYamxbqApuk90yRZktaQBH1whBfmpg/sBXDZ/xm12/FlumPvnqjIYX6ApMIIhm66+qWRqy7uxY7/XI9osjfHSOdRZd2rmhAMyGEbcm4VMoMcEx6MZDD2UxMz6fWKBs+1fpjtv2pT5uPvFPUCaSeIbLGJt7YRG/UH62IYkz/TjShu9pg4eVaJdLDXV0dy4M5qtr4XIMMNVmBsc+YAHotQVbjLoB7BTb35SPdzYFfOYBf86fWO30OckUU6cnu6JfBdZLr/WzhZbk8l1Sk4iF6gC3Q+Jt/JtBla54MaIEQxBAIQ2OBxXonq7i85eRn8qS79yobewVvbMC/VCfe9dCxLGz9QS8m279nZrfNBTA4EEaKH15xUJnBXPsiweV/jZ/TvqBdJLVJXlu6D2J1/57M+gKUwQwPAhMyRFOSopJI7H+1CfojNvWw/L09jjk/tjum/UhwfXpiyRqReJnNuQubtMI/FaI3poL86fSFD6IiCmgguc5zESdlbIaelpdMbGNoPJ+PJVKSotCw7Fl7n+nRHcKzHrDXHy0wHeoUYxZFrTfGKttkMT2ru1LH7ONs05zUU7KDMgS5klGS88CYNFotVAssUz1bgTN5nFNfHT6P8g9wAc1FkQYd4o2wn6retQka0rDpvWbWy8Fq+Mzt8N0DRkTpBuyuEbNQtXSAzDKlGGiRjgwUiSpo2P8yYyZDIbCfTH4NlUgXHz90+sk8lLVCM8qCWCaxAYlzaAmTAIBZcDncdig80EpGo/dRZxkG4iIaFuVuCNVNHBcKT1e37XGIpWIDJvOQ9jsQFc5Wl4q/Fjq6gnHFbTMYV5BCqJGnbv5ZD3uqA4S6PwmijuIKhTAsNovK6ab3FJtxlk5DDGv/qAPJ2dZXJG4sX50K+0aCQIS5+ePXULGiTFbxWWad17C6c1GpeQo= 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: R0OnQLa4f1Np0gyLpkAcIFejYp0jrkSdPfZ8GhRWDo3QtgftrwJ4BXqN5A6+TIBicmWIApTQ8wvahUny2jmdb2ZUQekBCy0HXlgAk7w0TlqTkDkBThOwto1iMAEhD6QYY0H75rieioMZgKJGoae5LfaX3zxqzqAQUE+tIey1HJ7QhR7Xs3zbz/Af5QaNkvTy6HIWX+kzj52lHsbKB0CQtfpJ9qvSPwNXEqSv+cM0NyEUTjJ0D/XT0JXszBSikKQZzxDgfbD5NsJk/n5alYg4WePcPjdD8sLaSzME2vyS1DkjoNhwqVdzBiBzozhRi6llzeRgjc49EuTCt6doOkWQiXbKW/t+qb0OPDXC5/UXhobmpPcQw2/tpv7XaM4/8UcEJ8Y0CcW/gWgfpH4unSwFA4Ol6SIzk/tWHLuxArAKaN/p/dBzCgI1tlW4z1VbGqtC3Yt/r5zKU1AhMSJYSJP9BU/6XpIbxs2fM+rNTxVNn3KD+obQY8yCnAEBTu9IreZKfzeBQeP0gsmevlTbFKDCbpszAfyV4wgtP8Yd3SMhWIEzy4wHgj05kxFgwVeNTgR/Q4AFqOgRcE+sAaWDBs8ZHQr1hV6tlpY0nT+/3sMs1x0FiS1KAFMNr+TiLbUSDH+NT6nWhIrsiRkK9JjzDuHCgo41n4rAYtwGelgniRJqqXf5Z7dNk/NS4N9JBLg0vCU4Rts/njx5UYgputDKvQAM3JXoen8n7N6zAj7LaA1IyxOqHvAKiaqxboy8sGjitytCFQ1UmgDuM2bV96SeIf1OeSF8wMb7n1HCk79KjwOA2zPCwsYYTx1x3BQ+8XBCENkB3qvUKN0Ihlvveh/fAvDXODjTOhk3PkJYhas5VTAos54PbtI1OCMOvhJD8vC+rB41PFoZ7XCCsVy1ZQEtf0Sjc+hrD8nHLwXOgImW/cj6kk3FenYswV2tCJ9P9K3ff1x+uflShTRsq9ItuLA4wp8quQa0NK15p7SEuMwUyugL8RkDJOKdMlPL/X5FgwExYnHHviLHGSQs9WTWmsAIqU9z4Hz448TUi3n/JHjaQAXQb7xNEmNf1xN0TkcoC1m1fKYADe33l6RNm2BV/AIyBnqqjJYJ592v+oYSCTRpaqT8+UV/ihZCruykEDqj5XF+Wi9aMGm5/hpWFI9aCH5veJ9fa+kg4B45y4+w0QsE8XnMMi5qCXOyTGOZnf41EIzcJZTL0Epp5GpIXtcIk9RRUJcn3OXfEHzvehS6eRS2Ei5KlqZW5T/IRY/QYtajjbS6Zxwbgp/Tv34qSk6kjqwyvUGqT94SnRFCDK1Kf0ESdDEZq/rkHi1NH1WJGTyAWBfDHagV+a2xypajMyOjbRHtRugdmrM24KXHP5n+oys63HXG22DUB1xuen0aS3/tpP1L0SJDHB3NZWk03WLcEvrtUzLwn6erFG9FPmAPS8eXZ+gs+A4hYQb8SBzAeieBEEX0cGHFZvGFUuS2eTJ6tZbYKqz8PXKKllH3CNgEdepVgK5amvR/TtjlKGGmCKj2BTpm4Y7IlASIwfxLMfTJPk10r82rVmWRq49nxdy/eF/v5PaKRsJJYeOpUnhQWBE/jPdl4Jui X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a2dd9de-81c7-402e-ebf6-08dd18031ee0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:39:44.1746 (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: DYpQjr02/YEaZzlFG27ml6mlDUDGjBac/aDLFbqiZfyWpo03TXe15j7yyQBtpVp7nLt4h8a+yiSYsfhZYcdcyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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. .../display/imx/fsl,imx8qxp-dc-blitblend.yaml | 46 ++++++ .../display/imx/fsl,imx8qxp-dc-clut.yaml | 49 ++++++ .../imx/fsl,imx8qxp-dc-constframe.yaml | 49 ++++++ .../display/imx/fsl,imx8qxp-dc-dither.yaml | 49 ++++++ .../display/imx/fsl,imx8qxp-dc-extdst.yaml | 77 +++++++++ .../display/imx/fsl,imx8qxp-dc-fetchunit.yaml | 147 ++++++++++++++++++ .../display/imx/fsl,imx8qxp-dc-filter.yaml | 47 ++++++ .../display/imx/fsl,imx8qxp-dc-framegen.yaml | 68 ++++++++ .../display/imx/fsl,imx8qxp-dc-gammacor.yaml | 38 +++++ .../imx/fsl,imx8qxp-dc-layerblend.yaml | 45 ++++++ .../display/imx/fsl,imx8qxp-dc-matrix.yaml | 48 ++++++ .../display/imx/fsl,imx8qxp-dc-rop.yaml | 48 ++++++ .../display/imx/fsl,imx8qxp-dc-safety.yaml | 34 ++++ .../imx/fsl,imx8qxp-dc-scaling-engine.yaml | 89 +++++++++++ .../display/imx/fsl,imx8qxp-dc-signature.yaml | 58 +++++++ .../display/imx/fsl,imx8qxp-dc-store.yaml | 100 ++++++++++++ .../display/imx/fsl,imx8qxp-dc-tcon.yaml | 50 ++++++ 17 files changed, 1042 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.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-filter.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.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-signature.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml new file mode 100644 index 000000000000..7f800e72c3f3 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-blitblend.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. + + Each Blit Blend Unit device should have an alias in the aliases node, in the + form of dc-blitblend, where is an integer specifying the Display + Controller instance and is an integer specifying the Blit Blend Unit + device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-blitblend + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + blitblend@56180920 { + compatible = "fsl,imx8qxp-dc-blitblend"; + reg = <0x56180920 0x10>, <0x56183c00 0x3c>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml new file mode 100644 index 000000000000..351692d8942e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-clut.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. + + Each Color Lookup Table device should have an alias in the aliases node, in + the form of dc-clut, where is an integer specifying the Display + Controller instance and is an integer specifying the Color Lookup Table + device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-clut + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + clut@56180880 { + compatible = "fsl,imx8qxp-dc-clut"; + reg = <0x56180880 0x10>, <0x56182400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml new file mode 100644 index 000000000000..cae19bc05d6e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-constframe.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. + + Each Constant Frame device should have an alias in the aliases node, in the + form of dc-constframe, where is an integer specifying the Display + Controller instance and is an integer specifying the Constant Frame device + instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-constframe + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + constframe@56180960 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml new file mode 100644 index 000000000000..cb0b4a05cfdc --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-dither.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. + + Each Dither Unit device should have an alias in the aliases node, in the form + of dc-dither, where is an integer specifying the Display Controller + instance and is an integer specifying the Dither Unit device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-dither + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + dither@5618c400 { + compatible = "fsl,imx8qxp-dc-dither"; + reg = <0x5618c400 0x14>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml new file mode 100644 index 000000000000..b382af1de1c0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-extdst.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. + + Each External Destination unit device should have an alias in the aliases + node, in the form of dc-blitblend, where is an integer specifying + the Display Controller instance and is an integer specifying the External + Destination unit device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-extdst + + 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-extdst"; + 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..2141e692bc02 --- /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]. + + Each Fetch Unit device should have an alias in the aliases node, in the form + of dc-fetch, where is an integer specifying the Display + Controller instance, specifies different derivative names(decode, eco, + layer and warp) and is an integer specifying the Fetch Unit device + instance. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-fetchdecode + - fsl,imx8qxp-dc-fetcheco + - fsl,imx8qxp-dc-fetchlayer + - fsl,imx8qxp-dc-fetchwarp + + 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-fetchlayer"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml new file mode 100644 index 000000000000..e1bdcdd893b5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.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-filter.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. + + Each Filter Unit device should have an alias in the aliases node, in the form + of dc-filter, where is an integer specifying the Display Controller + instance and is an integer specifying the Filter Unit device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-filter + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + filter@56180900 { + compatible = "fsl,imx8qxp-dc-filter"; + reg = <0x56180900 0x10>, <0x56183800 0x30>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml new file mode 100644 index 000000000000..d784f6e59312 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-framegen.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. + + Each FrameGen device should have an alias in the aliases node, in the form of + dc-framegen, where is an integer specifying the Display Controller + instance and is an integer specifying the FrameGen device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-framegen + + 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-framegen"; + 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-gammacor.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml new file mode 100644 index 000000000000..895501566210 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-gammacor.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. + + Each Gamma Correction Unit device should have an alias in the aliases node, + in the form of dc-gammacor, where is an integer specifying the + Display Controller instance and is an integer specifying the Gamma + Correction Unit device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-gammacor + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + gammacor@5618c000 { + compatible = "fsl,imx8qxp-dc-gammacor"; + reg = <0x5618c000 0x20>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml new file mode 100644 index 000000000000..50c0c1dacb41 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-layerblend.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. + + Each Layer Blend Unit device should have an alias in the aliases node, in the + form of dc-layerblend, where is an integer specifying the Display + Controller instance and is an integer specifying the Layer Blend Unit + device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-layerblend + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml new file mode 100644 index 000000000000..8778526e1eb8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.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-matrix.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. + + Each Color Matrix device should have an alias in the aliases node, in the form + of dc-matrix, where is an integer specifying the Display Controller + instance and is an integer specifying the Color Matrix device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + 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 + +additionalProperties: false + +examples: + - | + matrix@5618bc00 { + compatible = "fsl,imx8qxp-dc-matrix"; + reg = <0x5618bc00 0x3c>; + reg-names = "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml new file mode 100644 index 000000000000..a724cf960250 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.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-rop.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. + + Each Raster Operation Unit device should have an alias in the aliases node, + in the form of dc-rop, where is an integer specifying the Display + Controller instance and is an integer specifying the Raster Operation Unit + device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-rop + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + rop@56180860 { + compatible = "fsl,imx8qxp-dc-rop"; + 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..a1d6673f2a05 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml @@ -0,0 +1,89 @@ +# 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. + + Each Scaling Engine device should have an alias in the aliases node, in the + form of dc-scaler, where is an integer specifying the Display + Controller instance, specifies scaling type(either "h" for horizontal + scaler or "v" for vertical scaler) and is an integer specifying the + Scaling Engine device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-hscaler + - fsl,imx8qxp-dc-vscaler + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + hscaler@561808c0 { + compatible = "fsl,imx8qxp-dc-hscaler"; + reg = <0x561808c0 0x10>, <0x56183000 0x18>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml new file mode 100644 index 000000000000..5403e3359fcb --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-signature.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. + + Each Signature Unit device should have an alias in the aliases node, in the + form of dc-signature, where is an integer specifying the Display + Controller instance and is an integer specifying the Signature Unit device + instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-signature + + 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-signature"; + 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-store.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml new file mode 100644 index 000000000000..38d86e3dd6b1 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml @@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-store.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-------------------------+ + + Each Store Unit device should have an alias in the aliases node, in the form + of dc-store, where is an integer specifying the Display Controller + instance and is an integer specifying the Store Unit device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-store + + 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-store"; + 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-tcon.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml new file mode 100644 index 000000000000..87f02d92d55e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-tcon.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. + + Each Timing Controller device should have an alias in the aliases node, in the + form of dc-tcon, where is an integer specifying the Display + Controller instance and is an integer specifying the Timing Controller + device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-tcon + + 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-tcon"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; From patchwork Mon Dec 9 03:39:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898780 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FB3EE77173 for ; Mon, 9 Dec 2024 03:39:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 85FE710E447; Mon, 9 Dec 2024 03:39:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="PAVGp8dy"; dkim-atps=neutral Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C4DF10E294 for ; Mon, 9 Dec 2024 03:39:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Cis4FKdOZsZNeMJ3H837PXgnUpJ5Bqg+RewA3aM5H84D8PZ3bfGSG9fjz1Crwzvyysh1MI7DLWQLmhk1KuwPvkVMM8AZ6eu0wh3iYrLADv4ATApcvv1a5KZvLHogCcy6DO3GXXm1ZorzhEPFtnv1jsbHTy3V4+IodcNF7S4NlGu3qC6aDKvupplEiqSGHh/K2MA+RYX6YFJwoTebgLv2cVQ19czJR0Q+S+nUxr27L+TXPd+aO00FkJeCS+mK1nXTgOnfzFFUu3ja8GewxeFb1ON5wIFa9xACy1zY84xsOolkyGoLrtT/xGgZfkhpRe7sxzgXUcqxBmB7B8TjSryVIw== 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=HhTuTA/CfAhsx7pQ+ckjFvgD9mch/n4eRTFSH7/gJi8=; b=n/ytAK2xX97HCG215KsM/O+rr3ROOy/1qJ9uP3GGfDO/imhkDoYrTERwcA/vP1j0UzWKgOuKeRtyVPhhC/eqgb7QeP1gTLLLgmRoO4ACJjpKiXz9OeAfKuhdSYiv0b3S0NzG9iDc0Av31tC/Z7I75+Gs3o+8ZxOBg1bcyIEsV4jSUovceAH3bPf5WSThjBkUg/EPEN541cE+eiayg6e1oHnEPoxw0KRBILNmXAzOFCXzjRXbPwBWV6BOtp7CFjOBjiMg3ig24pQ7/KnHnheoLNvuIuugXLJhLfXmGffAVz30eDVU419Pq/9+LQ27+hbtOrvTiVm2DA+Yx5YdlECkVg== 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=HhTuTA/CfAhsx7pQ+ckjFvgD9mch/n4eRTFSH7/gJi8=; b=PAVGp8dyov6vRGQE4xSbEOItIxxFi5JiYvGgZgzGRt1RHjo4bXJuC4gis6p2mzRuXf5yreJgJDkj0P6nN2qaaKh9izRKg4vGRtKNeSA7P52jJ/AcjLAWjofGlwtln+H+1eYmdn10bDYodBO7FjsZXBqYtoJbU8Rr8SLKe39BwM6YrHhRe52J1piz+Ct59BVtHJ0+J9oaGYGTvX3YlowM5QzcjXBQEOJLSBCGrIq1nI6Crr5MZjD1fjfAf6FsudvlAf6SNVuCNrpWsnyTT18tvSyyL9rkmK7h/4am41IO4cDrnnCdlgMzbQNM91CSL4ASXThzD5zt8pXEgH+zxZEZug== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:39:51 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:39:51 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Date: Mon, 9 Dec 2024 11:39:06 +0800 Message-Id: <20241209033923.3009629-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 59889d0d-8328-4672-c7c0-08dd18032376 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 5mUscJvLDCVAH5QjeOp6+oQ98gDLLm9uUwWQcNEhWvCx2Gsm32TCymGdkATPoGPdsOUA4OvVbKtd9ldWh6j3Z3gZeez14AvU1ZRjQSXRUA7Re0eA9lo0woMOS5KjsUGkG8u4xXtqH+eTDi8C7Q88kmZSpxyEzSZKDc8NooP6aknbo0RXyRzUPbFFXwEyU4q1ajVqFHuRRAqDQvFaOpxypBcSatRHEWIvXx0D9HESAX4r6zcWdvNczf6D5lya2zmSLKu0qtaTQ+6LAeTo3iwsZHG2eHAB3JH8tXNOIdL1pUy90zJJvO6/rLnVju8/RYRTquPeLmMD7/9Orf6sV3FjCp73T7hX7zOvVU/0jOC70ekAsaTAOHs74PpBdgQJjVSzHLIq20GCgqX8WEDQ6AH8KgUA/CjDSaGjBdIFzOZQdiqUyX951F5S726cGM2Q0oa17DJvrCzoI4RP9+2SysmtNqCKczIxJG/x0XfInw9fNGMtVQpu1jQQLkWfpgyJAqLVEyW3FpW0XFc8EGcR46aJpbGVtWCH2QUlwsJpGP8q5FVg8m9b8A+V6LyBKziP3xomFGF3xiwXy5t4IUGdG8Df6T83Qp/9YpDOhqe1PNqwQYkO4nhHF3732z43bWy/Mjky7t17+mhaAJ8sqy/IcPqZ60MB+duTce6FVXk4cCvAO5z3PoHL5gwkTbiCSqP3vZWjHS6XuXzq2uaOkX7YIG612JNWKSX/mm0PDeZKB8IO3cR0dBGgET1KdPO7z2eKI1yKn61HLUaXprIxhw8qycJkMFU5lR0jueiq9VMZRRS5a36GngHsDmAgvZcP2KQU9IxlysQb5qQIfG1HLovctxrb9IoHE9RZLnGPQpofll2x0aoDBZo5hvPpqVCzOc2gZOleLl9MdVzpTzE0y2aiFyGIDyRCtmVRVAd5UfaEzYiEXI7/l2yV7ADO1/MfjFTItsR472MtLJdhlGANkTFypormtXRSHvUuItHgv/wU3UNiGGNqEsv5v0Yg2DGo6oLNzzfDYFechk09Ac6tuuU9HVfPVTcIdcuvVSRozb27T/PqwKYS4q06MwtPwVQSOyvl5TAKqppyhf8fYzmJmB7nod0lWpuu6H3ZVXGUpyIlWSMtv6aXO3c7tWLd7pkzRSnmfSXxTbWlSiVjodx53vWmMEou/kz6wIZdJZQwDVUGtcXS8BikaOi8i9GqcKFSFsLpmMwgSqfN3YjxHP3lmrvsIkBy/bJwOQg2AeZpiriEp8Qa8U09MZFpLzvDo3yfs4+JzXYkSMWGmvd+pBBO5JDeuyyz02rZaGL8qZ1wkvjhwS9WZvUFTBBRaQzi5YJE+TZgyDnDL8V/ex1cAMzdSmhGZh39CQ== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pRJt7GElwjbCZIkcRxuOXzTrEpd801X+mmHzAbn7pEGjn2Zt6S7NbUAIXSV92i8WJlxPJBddCP1+FmCCJ+x0Z0Kplz+xhcJzS16IByPKAmcIWHqDW9+yfewh/jx5CaxjwZpbFubu56aP9e3BUm9dZVCoNsUlIAie2zzMe8UReqpanzmE6KX2yD4thBnC+zhV/+j58t5qalxa9rm9+fDAi/j/GNGisDnHBVUfxK9z3i0nV9ZjLO0fXsZ3MnnL7SCu0vXEAff80O6A50/+gCu3cdX7FejQl4DqR86F+4CoPV37ekuZBNVO9TEqJPz8O+sddMJbtPZ9I4mm9OX7D5YLa/Oc8yj34drr/utRW5SyV6tCvrVSuYykcMgc8zgmR4dDRMhUqitL9uLFEvPz3h0zK78lmLfnwTfTZP2C1mt25D6NauoEwr7kKQA+MCa0BoNI0dEfNMfm9/fAWxWcX38B+UqqPx8peTE5v42u3n05SWDuqCsCfClEmjtwDbY674O8CZePzn7+qtF3S4RgrP/VqbfzMONyKJph+l3fUMOA46ZbgziMIjWzIjAkPYx/sygsqK4JZOv5VQ4Dol/p4Yk0633XHhK50D6c9+GRyxrChlcuhlHXmri7kcWD1vCtJXiPrqNo+rZGXeYxGmmxl5q1ZiHuxb9M1BbIl9h9Ude4/o6HHVWleDeDdGRtT9LxIrqjwozClVwWo5XM3k3Q1vo8VLkFfqUWLPgkJk2NUsbcrJq9slSxao817X4aQzkOAK9dppqM8g/V+FIqDnuA2KJEJUIS99VDG3hy/IJBa4TT3L7vPzR9h5d6ZDxsxxsvS8YxprEz4gqMyui8H/YKcfD8/wvOUELLbTXygFSD5XLQslBwmR4ahBoPDoPIZVpVXMmf6MOOQtwkvPd/Tieo/q4rujjtGwUDRZHy8GEnwbDSnRYqFP09/kKale6Ncbe2hDiuY6O/5IUB4MHOvp8S3aP1T0oz5GWAM+q+Zfpfgpz+P2MhrO613dHImD+8pzNEKaulBvb2t3gD0/cK3R48D4HVcf3G+AF7lgW3dgMKcIkmmBVAQC5C+bOwI8LSK5RolOqjj5gl6k/ly5Xr8JSFY1MYBL6o2g6xwa1Yb32lWwCelBe18kS2kmfrKGSqZHEkOuYSE+I+L41uncw3zQih1+Bcpl9oNTfjNK7j05M292oo5BTQkkrwrjs1osIIiHF+RjCs+2EavL3ok+OKvo3uKkCnlmislEK3senhJPd3dcRR2YmM4J5gd5pM5xtHgIEVq2jET5YM27CdmqdgF9vK3K9onjKiSniaI8tUFI82QJB4rOpHOmKATB1pd4bDqG3NS8gOcZ3VVfEfrmXUvfWfY67BYIz+CQJfCIaPeJVyscQXFOvH1dq6OY2B2FdTInhNyIUzfUT161nWPTTOU6Mntp9MPQ8td4+POno/dhyrPyID21FR3rrviEwARYS+xgs4ECPWwyf19xpUwjvqmDL7gw2UIne8KGmdSxaaWCs4Hp/804nq0EFl3F6ObjqMqWQXVh12L+iENpPF83OUz4kHnGl7lAqU25/rBZ6+FeMGKP/Twab9MWkYYf6WKLUPgX6vYVBM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59889d0d-8328-4672-c7c0-08dd18032376 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:39:51.7399 (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: MZTQbS1/IKS7C3Ai42jpCzVGe4bAQputQTHtUHlQXRG9YC8hZszCMkAfBLzVKuHmL46oWqfG3bbeymn9Khb7Vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Rob Herring (Arm) --- 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..45db6da39e20 --- /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-blitblend + + "^clut@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-clut + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchdecode + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetcheco + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp + + "^filter@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-filter + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-hscaler + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^rop@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-rop + + "^store@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-store + + "^vscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-vscaler + +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-fetchdecode"; + reg = <0x56180820 0x10>, <0x56181000 0x404>; + reg-names = "pec", "cfg"; + }; + + store@56180940 { + compatible = "fsl,imx8qxp-dc-store"; + 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 9 03:39:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD9DEE7717D for ; Mon, 9 Dec 2024 03:40:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 491D210E453; Mon, 9 Dec 2024 03:40:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="kPmdAYYj"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3900510E294 for ; Mon, 9 Dec 2024 03:40:02 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pt4MXG2VHWQz3IKY3dxhQJ1pA9BBiaM691aczz8lBK+UzEyM4sxsnnmetfbMiNdB4bVS5q8oX3jMcgHXpuPJh7ECrBUfzznHggLq8EPZfczrj3MkNPSKGMUJ/KkRfdsXKI81vmcdnHp+fnQFfBppPE+fSa1eJ5CxYDGjLeFTQyInwZuH8zXpDn4a56vyJ1gSxMJXVjrF4vVBxuBuJd7UjuBmq2KsA2+pwtK62wK2PrNiNkC/K/dUMnLfh1xD0nHOAmW5QytrP8rKXz/wT+KkSNwwdDv5UchCIDniXax9Mh7pK/uwFt1Q3SmvAOyt1/iPMsPL7uZZm6qnUW022UxGkA== 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=d4Fs8JMMLB26AzSNA7B2loGfZmags3f8h+j1Q0c74JM=; b=DZ5bP7tqlCy9bFsyBsykOmFHHz2YS07GYL+cZx81tm7zViuJDDDxuhhzrAZwgdknUXVV1p9PDc1b8VPSV0IZOaiG1m2vTNRkzxlvV+Sn96jcBYhhAJmT58K6efyU8uP7xaGLLGmcO1w8McwXTQzAmi90bGJDHCRhwuvQ8NmGAmawWhD0R5+hDpC3tdRtHnXT+Hcw1BhEKP4vVBNfAwdaY8eXcILs3IWCRxHrqRtalTLZSvtcTv4Tt9peOBGpKNgXGvUPRyNsASEgxzWuxDkEztr49IabgJpvAmz3Kjcw2UacKvCMHLs4D36Mh5uBbVGz7Vx2LGc86JQk70ZBEG2dPA== 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=d4Fs8JMMLB26AzSNA7B2loGfZmags3f8h+j1Q0c74JM=; b=kPmdAYYjan4azSAqw+9tl6nwIYzILNnIhD+/2KiYnX1c16PmwjiPiS/1YVqayuNxz56UkCyK5bHwaeSVtD2jBm5DqLS8AMHB0XJSe9Og+vBdhVuVwPamqwVfNNWkPklDM7skXuSNDa2A1CdItrR5cnGttzxQHIasxAXkT2Up523bxGmc5SdWkCoXm7G+U8Fkeeeq9707A2CHSkDrkGWym1WCalWE4db/F79yAk575TYpNKgjp4GyUG7/DSr28XCnS8ouw8G05vIoqZ8HZNyDSVabIjrhoh+WMvq20veL0xTVv7P6Hh+dbSh9y0ue7kEtU5V6kehfcNkWtsDg02N66Q== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:39:59 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:39:59 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Mon, 9 Dec 2024 11:39:07 +0800 Message-Id: <20241209033923.3009629-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 7738d13a-ebe8-4208-874e-08dd180327f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: IxhUPpBdIucBfKzptEaF9n9+G7y1DX4+onXXt9EI4Od9UUUOJjQoS5YXzzl2WOV/Qy/LP9J2TVnVaUwXGvAp9Qb/rwo3divAXnNKylevc3HWUt8/DSHjKm/rI8VfRKiVsW4B4i0pXk8pCI/Lwj9T0JtyzTbDX4Mgo4nTWy0xPLey75DzDVAzmmKe6oksYBW7tjDJuwYq0ecSS2FW2w7IfOPzaEQ/mFuiPTLiWkR90k4H46CbHFwmM8AoyySh/l4fLGMpRWZht1oqgezgSdpqwI8Vz7/VtvCTyCgkY76AqF93GKVfa3wIpMybKSGNjZCqWHv/MdA9FY1QcvAYvVXJHpAB27pyTOeSPArKw1KVjhdh0RHFCHOovb8BbNe+Mcfpp7poGhg+dZgm/KF3VcAFKvDWnfQ3yuCrnZcsNJ/umt5bL8KCKPPLOzuPDpm9TFyasJjL9V/H0TTJKoMKK80Vo3w65FPLo7gNKgYTRM8qk4+8Sp3eyS1QIcUbIyl8Gyx0rWx5/mflJOuyXswSPHNa6POtG61/7A2jiW9XlON2mCktzFPhcPZDkDaYZSOm3tPOiTVRXfB8qd6f1VMlc8BWP4FtSGrqiAYO8uJLLSrlONm7mgLwkDR+YhjE4Dgaxjst5YuNIv4KsoM6taF6DinTD6PFl5SWx+pxG2sysuRIPWXY5c6jPhfXjL5KlumBIe1nxYNeyZzVgaaOm12bVlM7yvosvi9HC/q3+6GxMQSE4e/XgCpl6TaFgOGREURFTLBIcOTIhTeHKRHi4EYcl+AYZddAs2N+3uqHxHxOFpBg6o3acbsaWTwQNnSYVOs3pItb3+mPmhL3p4br3b1b6kPODlBEmsOYGOxpY1p5hTPESR1g8Thw05qzRlR5V3CMvYHuEibklwwmIfeF33MiZMPsMnEIRSBWTqPMlqP+PFK3uR783znWHf5vfoxNP27PNMvEy3wsvENbMW95KvRI6Y7Mi8fvOUlBtqK7oawwtiKCQkbhsP25eqAaUJPrpbUx/YmbbQy+5ffG3dJ/Hqp81Hup7nXAS+up/O7qYgDlId+S4Mucn4+4FkfBHY8UsuxcrEeilZTPdKj8AuTrRedFs66zr6NCvq9kS4vC4ahCqWR7kPPJ6maojMwN7DBORN9Rro3QM9Iyv3aczyJz9GQcXKMpF+gFvk9Omw8ri2fG/pfoAQ3he3JTCe4EGSoHmhGz2c1+3Gw6ynn2wwEjK1IagrgVduNM+LyYIVwtJIiHEzZEnkQgDn7i5yvzbXKPO7tYuQsN9XmBWN3yKNJsaJT9g4mJkPz89j5THkSFsCqVzAhpcj1x/hX9oQcvweKn443grmAiaDyhOiZqAa3YW9OWHdfwDBVzH9jUnwXedPTJ2OIVizA= 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9zWkMsyAyPn1iCkpkC/xYkJGe2z6CrtoJo5ZsWin3b/xBcG7UDYEumb2BaxjfwOUw+3/AxBs6qRfzr3XwPjSQhSyXIDSgXCBRLeV9LGnoXamvlYw2awAvUYp5mNv9D2BrNqaI4iRL9RC3x13G9p0CMOjr3JqGnjM8XtbNGzXGkABE+u03+elQ49yuRCymVFe0VtixqBJ2xnyi8Zt3+ri6e7iAsI0L7yQWuRVzuhXevDJi5AiKhDVQOwRaMytv/gx5JojUTkv+vZqu8x66BEVZDK8eWMrSt9ZQ8ZphD17/cPFYIxKGKV576ABGz+ImnbpKNUplMG2eNJ2Bqe2mCBrd2HSL8TOFIWt9+DIEWKOr+JjUwgy2X2ZE2x1DiniU+0lKe6SaWTVj2uh4a5tMA4wOXRaFheUGSo+RqbPCcyNPQQ6N2WhQMGBxC+ytt7oeZwWpCB/guWjsPmcktjFFJS64vQXGnjhh7TG9t0a8y4JUh9h/LwCTn10llhBxefLxpm7V9gveNmh/M5dwLLSUJ99qpCLHguvomiCv9eeV6PXZN/VU0fevgtPZI+lr7xLKuXTmjcv1PyvLFygSzXS81ASsF3nnNRQ7mSFN60/CLhqhOIJGv4xfEd4vAJrSv0CbFU1S4WOPn0veL20iDqxcrbL0sGeKt8Ma2G17Y0y6JBy5SzINwsTV8pTFThHSUHnC06WvayexyydNjH8TRNeS+pwJfqrkEk22I0ILutXg4V9hocHjIvGsP17BlrPpdMer6oAEuFM8bO/Vg+yWVi7k+elpNsxK9aojZeHo2bblDY/xLQXBQjzfmNQ/rUUday4tJ5FeBi4o9eqJ0K0n1sK1sPvIK4sS9roy7zYhvOtgWNOlezFn9BPKjju6UWWjHeudm5SLc35hi6Rojbkxw8h4TWKaYWLZl5VWR1iOQOZbnJ+Lq5RwDEgQM0WEdG4mqDRuxb0orV2MtMrGvdXW3vgZg4thAykPV84UbSUzRkzp6mJ6W9An18uRZv6cAFIxbrAXNn4Ld7AdH/Nf9/vFMxRZRv13OZdBugjRc/0gDYz+QYReZOYng6auhGBWhG7n5jX4a4ZnHpAmvDYFuLOqe7D+GxXLYla6qFWfM2U2M/7w42DfpO0eJcIKF2zEu50SewmTPBSFr4BcajQruV4bbENYymEZiTPGfsKPAQRaAkTgNqqHy3SRmqwm9xlT5pHgrdNsRlMxCNoCfeNHhOXH2vD5ihQFnJdyTpANJsM7qt6A57EmP9drdKdenp8KIBK01d/ljO7ZwRZd85EISH0PtvsTNW0hFbC1NTUGJEa8nlmrHwgTm9ptxAqMPsgoCPYRjtViWc0z9q4+XZJwxTM05620JLC9MHhePg/thdPX1OzOWoZvM8cUeWXW+Fq6CFNKRRwnXERyDO84yzb9EOhVe+WlJFWtr90cHsVph89hOC/eaJJRglTYfZnuy1Ci15N3knXHcjdmsIWBViIsdczXY5YuBuXNqPGWm+5kfzLYhVT5sFK4A8x1IEmQn+AxGUvvDmZo2pR2N6Hg2Y0LddgeQKk1vYL6Jhjd8zERA7EYONRUxFGx38cJdlEyq9EqL/ojvmE2HQU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7738d13a-ebe8-4208-874e-08dd180327f7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:39:59.3049 (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: oO6ORGj6rUIcWhC0l5oMZa+Bj7ttBBqbp3ZgzQeQ4RUyalRo5tSUJLRmw83XJoI8HZ4xpyIUhT0yZljz/MOL7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying --- 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-engine.yaml | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml new file mode 100644 index 000000000000..b5da0bf3a1f4 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml @@ -0,0 +1,157 @@ +# 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-engine.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. + + Each Display Engine device should have an alias in the aliases node, in the + form of dc-display-engine, where is an integer specifying the + Display Controller instance and is an integer specifying the Display + Engine device instance. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-display-engine + + 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: + const: fsl,imx8qxp-dc-dither + + "^framegen@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-framegen + + "^gammacor@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-gammacor + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^signature@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-signature + + "^tcon@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-tcon + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - power-domains + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + display-engine@5618b400 { + compatible = "fsl,imx8qxp-dc-display-engine"; + 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-framegen"; + 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-tcon"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; + }; From patchwork Mon Dec 9 03:39:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3E83E77173 for ; Mon, 9 Dec 2024 03:40:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D91810E294; Mon, 9 Dec 2024 03:40:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="U06r9yNS"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2045.outbound.protection.outlook.com [40.107.21.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC5E110E294 for ; Mon, 9 Dec 2024 03:40:09 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sS9s66Y6tI1ArvEtHLwzCG3pY8BPQph9NMVzAgnXjYyaR1NJnk2PwEe/OS2bmQhqWFQcqUl9m1ARfenBBTP8eHsNCf4Zlbyo0RHa9QSO+zWlXs3a4XsFi+oAD/sv6dXaf9AWZQdCpfFdSJvHmLsh07eGcmIWG+e821C+2W/I9nBP01azroPsFCfC0gTcZoZltDKIVuUIWDbJK2p56McUdTWb4TfBhnw8lwCFleIOMvWotT3HjLU0lhCoAdw9/ITH6tkL6p7eGjlPHH7Y6td3xf6Oj1sDUVzTM/m7AmkesViSK9LLgwEEipsEucWbbWryiUabXJWAhpQOd8WkacSz5w== 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=9HrlyVkJlHO9vZnO1B2/BU/NF85tFWcntRjhWcul13k=; b=vTqK7IeZmtyxLon2ure8pG6N6zXAJVmaskHZwiwBUcvzgn7jTXWhXJMLeRSJRwGV2rqlUPAd1Ngqzt20aG+dfJs+5juOK01ZTWtbmGI4PkFaKlIlr7xuqW7a7o70PVlkFYtPzl6L+1r+xG4/5cra8pcW0zpFrIReH1i7c7JpprzRUTEAVoUYKdxAe8P+BDVrmktH5UXXZW913NdeDmwcOjXxNq/yF66x+ZNle9++RljdYExofbEjjfD5VVUcQDtjS3wekrKTvIc/7HJSTMZDWpqKQfSzHAbUUC/ucxPqVvsdTHi3BNHIvMe1F6e/rqe9jnS2ATJ9AUlLHWmDsuDaTw== 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=9HrlyVkJlHO9vZnO1B2/BU/NF85tFWcntRjhWcul13k=; b=U06r9yNSefgI9QOQtJDsVswO6O7lh4HHzgl3cz+mtRyploxmuKtBGyWjCe39/vPSRZh87r5HzM2LemeSj11lbovckmqntEUEwRZ5xPG2Ckq2mNpNJnBi0pQiwrsWzOZc5Gdq3vqhpCRiZFqqhbWgYKmpAv+G8lrFlUpigGUfrhq+GfoN8Ar9bPIuy4JUByhSWIzX5vuz1XJGg2UHi8MBc0tXuckh5gPyZn0w9la5pLqj6sXW7seUtLfjzlSvtsD/kHkc00taCDUyMfeLFZrVov+tcZXfvPDmWq9RYi3q+j+GcbidpiuzXlH/YNLqhe2q9apKPQ0F5kR1t14xWfZOsg== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:07 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:06 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 9 Dec 2024 11:39:08 +0800 Message-Id: <20241209033923.3009629-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: b90a0d7d-8a2d-4110-e424-08dd18032c7a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: FCkYJrI8CxY54n9Iy88hXlhN5+2vIdSegDaUjloedlzXtKzJdL1bLWNq4zJtv1RVnb5kkgOtEwqBUZXJykAN8hhwVWLycvlRB3Fhov3RsqxzW8P3mCJxUklCMGoMmjUGXcbMsI8yGcpmCphxofY7wGX7wfxMaZl2dmByaa+XNSgEUGMbAOa4uu3Dr71POfUUfUOWIAdPJSsjkkBbPgTG05LwF8RMPcTEW1AnH0keQubqC1edWBh+5RXQZS+7Q2WpyBEjgRTBja16oAHBHiRI0RQkZuvimStLqtToj+CC6MsKJnML2q9lmMjAUJyc1AsGEwdHdK5I4oL3FCIV+vEoLRE9wo5oMy8QkKioeBT26WMvSAcIIaNgzv4I6sHlqBt8kUGabrl3okbmQE00+FWdM7ylhv3NI/lu2Db93SXPP+j5LVj2QCsq+8ZX4D5NGkmKrrUSM8l7eG4nIjOLTl6x6YlnwZ9K3FxqkCnAmHIFwNX3hu8dhpTNuLR0Qmobt29zctxxv1/CvPKwX6+qFXc/KMHp/QCSX8pqYb5qm32ELIE1/VcjsETvfsU0wNMk/i4TiDAza5G6KCVL0rvg6lER3x20769KAo4D/OV8lVim34QS2nqc89S4FSsQA/MBv0ayYxbXRuG4ffgDgdxYvlf8V52lTTf0kL+AvO3yD2kHqIxutjMnnmdFQlJQLO8VhyVJ0yjbYncEnOMyqLItSmVThhTP8X5ALtJuaFnz/S19FEN+WDyz7bMs6wvpCsvRGWB7dp5CtgEqqAF6UXhuLrkctxIsUkWvMU5EudYx71h9KUSW2LyODQNfIXQq0ZclHICdvPOMpOe26aBRKSSug3GjjKIYImIeIPmHyNQgtJFhrwtnZNBNBN9IJg/2qs9y5mmSwEuGcUH/KnbCqeue9PweuNwFS1psisTv7nY6oApeOd7BarHYmXk/ub3OmSl6zCl7eNGHsbATsZ2W4rU4BopQOoUBmPIuJnPYJWf0k6WlSDUsO0SQzeqCsXf0yGTm+MgvNcSDwqt7K9eb9YyRp3bft9bvDL7T9QBeN0HDNDUO7+KKspGUbUGUSPxZ+jZPXMB7IItcBCvGNz8C+KPIOAxQH+5zVA6tMZqrgfD7gIGxWUi+Zqe3k5gPgqTzHoSHhd5TMRN+LL9A9VWIbslSP/BgxS9cMOVbY9TISLfEnwlAN5HG7dROviAMYmMqyHzvVFN7aktjFnXxU/diSFG0yKTpfd5MYxSYEAJxq0SL7MayM84ov7Ia9E3q1d5+cKkKr5rUkhvs6dJrmHuf33UnnmuE3SDUdOu/Hz1IthQKn17OUXEXJpqDrO3iwaVuEu4n5MbNooV2KtTGKxmLgqzmFvkYkA== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HCLZ0EN/2NI0DFq0/zVB8SVZDxK/racOaeB/COE3HtlsNk/5yK5go0Xha4wJIHVpGRfY8xXr1rXTS1dskwRTbRZN1e7FqtwRLnWoOQGEjEhuJt2/8nFCI+qzauCYH17y+xDT67lYj0PjrkxfSZMjrt8/3oFEMP3IxLS7KOTlpmUGeNXqq0sklf1aFUj3iGGJlqKpBjCZh5DNoUzzn+9NrxjLoXNwJMybuP7CIhDDeywPvR9MbJ+s3fhOWEFL/Pijp7hazGR50Rm4eLS/8iQWHkj4T9xvZ1H/FPyfHBUpqs5O2z/OUffs4DMhtQnfzegWrxDrVslI30NHWANH5ZFUUVYOZM4OHJ/Ea0lnH8/c4CixE39tHBjDMioYo6M19/wb27zLT319GwNU81zyYsEUUApK4LP4LKjnOIDEq9YLgh1wxgNx74DviY0w7Av4uTbcZJ/9j+8khurm4twpxSNl4EqkjmDoT7jJy5+XLhWNnlxWlxQa5WJO0d1qwJJbRoFePMeENuw5sNlcRhf32PWBEX6/NZMvlq26yJ1Y62iel+5DtqyLOWxEHwI2xD873Atxc5tabsoSyNUBTikPS19rauz4Ov9Db6NjPHqVS3Lc3+NODjTtoH4SIGmU0j55+zLwpSeqRZn6B/urV95Zitpzjm/Hh7c5vwu+v/wB1B9/DZchs2goy/xkNjCmd5kxSTJyXAKhT8Jng/E/tijZyDCrq4D8nunNhggtxL9VHhBx4A1Cpw7HUDo+lVf2jGtlNCR7lnMfcs1Leb0h6QjxfANBT1ucGmnxXmY2fFaZFSYSdjCuIYTpYLTRXU+ZZAidRIafcemBot6e6yRAYpKweFzsWdCpsOMQZIWVwqALQzeErHPKbzlNYvIC3gjjsU8Tf5+MahELDYEbrI5+JA0Xxlg8dHhwR/R1PiYARv/Mgli0K0PlSpiG9C+ImTrwnRGPRxNzMab1+bt9b34A3WLvrT0Bi0Xuco9JjZ/gAhajBOvPlAg8suvkVp+R0FrnRgmqqNYCMP9Fm9ZsStzROSZDxmgvwS+ZBbpQgmlXa8l3DHrr9qTF3H66sRs9yN71943uq634i2Rr5tADIJAC7uOqHHrtjlW4QrU4/qKIWYHhmdH4mfgrCoQpVMSbY6Kb1119eTx9PvV9Z7XaBdO6GkmlKYX0hsexKmyMvmqduSFzt2E+Kf7kFfk/EENlM4/2pGq6XabspwtGtDeKQoHmkNUvdzjCDSYYp70pbsXiogPoYXL1cXuDylG7SUTsC5ws+1XWwAcokaIStGSMsBfSYqi1jNRgfRxoXbvyGWQZd4TutycdJjmOCkPs13tQA/cRli97DVlgijXNo13y4qfXyv3BYWkrZ7T6Lva1wwuMHxnQcyYtUlZ6JJU9ufEOPrnUbAG9MWJzVG7eQdN+ysitKpafVA2YQAX3B9cRQzO2JNx/iVJZUrgC0i0NkujagBt4QkT5AXW7SPpUbNx3/IN085Yy9MUmDhYxw1VfGX6mNExFM/RSFaSc+CTeqr8RCZlMf1kgQmrIzDmDnh6WTGy3r2p46dvnxeFJ/d80WGg+hADh9ccObV+U5togSqBHrO6NHjqyfMKj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b90a0d7d-8a2d-4110-e424-08dd18032c7a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:06.8703 (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: mGT7hc51v3eFQhzg4QxQpCdfUdvqX1ruz62QGfrkKa9cXLWezaQlpQmsajGiA8HySQhPUu6OdKHtIH9154INnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Rob Herring (Arm) --- 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 | 250 ++++++++++++++++++ 1 file changed, 250 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..633443a6cc38 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml @@ -0,0 +1,250 @@ +# 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: + const: fsl,imx8qxp-dc-constframe + + "^extdst@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-extdst + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchdecode + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetcheco + + "^fetchlayer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchlayer + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-hscaler + + "^layerblend@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-layerblend + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^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: + const: fsl,imx8qxp-dc-vscaler + +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-constframe"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180980 { + compatible = "fsl,imx8qxp-dc-extdst"; + 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-constframe"; + reg = <0x561809a0 0xc>, <0x56184c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@561809c0 { + compatible = "fsl,imx8qxp-dc-extdst"; + 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-constframe"; + reg = <0x561809e0 0xc>, <0x56185400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a00 { + compatible = "fsl,imx8qxp-dc-extdst"; + 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-constframe"; + reg = <0x56180a20 0xc>, <0x56185c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a40 { + compatible = "fsl,imx8qxp-dc-extdst"; + 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-fetchwarp"; + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + reg-names = "pec", "cfg"; + }; + + fetchlayer@56180ac0 { + compatible = "fsl,imx8qxp-dc-fetchlayer"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180bc0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180bc0 0x10>, <0x5618a800 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180be0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180be0 0x10>, <0x5618ac00 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180c00 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180c00 0x10>, <0x5618b000 0x20>; + reg-names = "pec", "cfg"; + }; + }; From patchwork Mon Dec 9 03:39:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48BEEE7717D for ; Mon, 9 Dec 2024 03:40:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C862B10E42F; Mon, 9 Dec 2024 03:40:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="KkKV+2vi"; dkim-atps=neutral Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2080.outbound.protection.outlook.com [40.107.20.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E46D10E42F for ; Mon, 9 Dec 2024 03:40:17 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jmGPo3igjj38qxXrEa7fQMkdaGPRRfMVT7t7CcAyRJLsAPJOMHyogNGVlNDatLnQE0x9hAI3TfIPfp6KLs3FFKsAb0zJCKNOY8+lGu06pKjy8QzD92FRtW3L9Akjnum1kMPqg60k8ntFNzhO8NDw3zLGWamMu9mzWKkbEI1qxpdWFdquDWivyYQeMVOxS3ZDsjDVSPBul5xzBBT4JgnRFEric7gdJc62SzKLuq/z+x+vRtu/qv5GzEZ6t/KbTDiR0Vfocjqcc9IzpYlXEMVCIULUYP1gp3Zeu2RQ9O84UDUNuskQIjDEeoJc5UmrzdG0wpBlzASxGlelDP2i2Z4quA== 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=NtyB4SY46NxuIdwv7dfFGVDyrq1C/SfLtzvwlH64N4I=; b=v4HevqvWtRbCDtAiX2WE3SklRYhzfMuz36JOCvIg+v+qgh8L6X5XH8TTsTs3YLSLHB4tcdC54bAms9525G8u616IMvLBxm8XgMLnzu3WnLxJhBAFPToTvVnzoGc5rZ4x+D2gqdeWudN2O7H4Z0YXZjgiWNHtG/dSKa6ToZCTl2RNeYo5PWA5MGkWaTzAcGDnTQEIai42Nrb8ZekEPPHWTOcObhA8qOFlZ+cE22lyuW689/sZHozUPmOvtiAj3TkrWb8UHu/0xO+Dlf71BzO0Aper5eEwKjNPbf0eba68hyn/W6pRvvjrnQq1aedjeTEFLKHDz7ojO10APcAPZLeyFw== 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=NtyB4SY46NxuIdwv7dfFGVDyrq1C/SfLtzvwlH64N4I=; b=KkKV+2viUp4GV71WPyzTT8bG4j8XfcbtxUi6N7VWdSSK+Xv9Cmu3xDbeSjEOyQEYYo0lgJJJi/GyeSW44A5YOvB/tv6RIb3ngHbGutNR92B4MXzxfSAdEgqhCBWagdczFSBFwvok3mG09Tr6wTBG3/0ehJHo5ANTuKQMcT0SDo79DZvZXDksgx9Q9wLPPC9CdujkzyCbT0jbF77qNjcVYAkUyKQlSbDnEFbPXEm7SEhTku2v6mD9pnQWkFGJqmNdXRL4slbqvb0VXjGwrOB8tAJ9IglPQHdDjhPVxxiLzeVPy2uzRZgI5JeLrmWljbtjW7qCOKe+sR/iUQAH2cgWUg== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:14 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:14 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Date: Mon, 9 Dec 2024 11:39:09 +0800 Message-Id: <20241209033923.3009629-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c084449-0b0b-48c4-4ae8-08dd18033127 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: QMNJq9aDA4RSImnqJ3jjX6nHTmILMK4+1USkIx/An/e3M7PxTth+CD0dYCZDyaExDSV0r4CE0bzl8kD8ly0tDGDBENp11t5pChSL3VK35dm9YZsj3h/Oi3ekup1emgc/+b85FgcWB2QUnphcV1JXFE7HAx+BVIz9/BcBWxsKro94K8YGOw3nXIpJiXIBR3oXj8dSGalPc4wTTazbMMo5baOR35XePCdq/KjvEMsTWJNjK3GN+xejHXqkYtRLBuvKfGEeOzPaBDcXZoWi2Fjo6dd+daTed3cUAPorsl08X1iW2CvMRhxMU1Ng5C9ArYDZATsy3VKGqXu+f8lkjFs+CFhdmKaqJoijFvyxx5eupnZ4WpMYzXW/mDeX7Y7yH+9nJCw0eexJE38ceC+4r8WWtqNORc0CwRyCuWF8jI2tkdOvovTCpz1nJygYPA4edP2xknTSz8fZV8rwhx7BotqmjVL8N43bhaibcJCl+XRxElfuN4dYOWeYM/oq9BvRqILLprBEljbcbi5JVeTtG05L8kM+5E5UWieHYKoWKpRSFm1Q9k0R/RMnKnKgJHZ9k1EKjE14zmWQ1qBPspuR8LtHX9utG5Gnbn+y40nKxdBwTvKzcTeu1Jl6FbYKtbE+FsUPuXGYPuAipY5KPAIMprKVoRvdBVbsdhoPwyf5lRPfF+zd6yDXooMkZzQtLnMm4ztTALoKTfOLu5cNPBNs5qeU1xwnPxr4dRMPTE9yAHAQjT/2g6ogFlRj1YuDbgCZffTQA2DFEfDLhnnOd2XQQ7vlmfZyh+eCyvoAuYdpbguaPwdcD7Zsn1ffcPQCTEHhBsRiNbT70srUMh4eDM6Db0EZlcPcWJJ5Bh5VA6Ka9pvUN5+g0T37oCqd7YMnErA7LESILWZcHZifDRBfFXxUMT5SX2QuwmjoRaJlu/8vKiLdHVUJw4g3HaXWc51mTZ6/IqNukuYNCG01+RtAQH6RQwMkZ8XL7TE7avajN9il3SfzBuNNELMQU33eF7o2g1NO68xIehQblqoRgMsuia587LOtV0Qf3eo/2cjIc/3UNQswo+DzKvFPC9vi7V7LhZuqWOorMUw32M6RCDzPQKcknyvlpcUIq4w/DpiIb3CE+pHEMYv7yOBar9SJlhWM+9WM8we3YlhtHZGMi0OKzkCZ/4J/UwFi6vqk95fh7UX5cLIaV4pY9mK6RvBlcWh5DsA/RO0Hvn3CcflnRmasCm8irjhsgdu7HUQijnr5T8U1c03WvO8B9bkGazyEPC9Eh+cdgvFKoNpV1rc7hODuWiNpV4rsCCiL1S3qhf9uMOOll5ApBrU9gZDpSTaFlnJ77nYwy/f7DpQDTsPQHPx2g/PQ9i8SbQ== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C4pP1grw1aoBTjZon8XJGKBOf8/90JNhej0x775FLlj2CxBLop4EP2OfTej8KVGB6jNY66pQvWFB855SGnJ1kRpo4Pe5RXv5UBzr5LgiUar336eGixjNwc2fIJKCEIVeLOM2z97wEjcKDXs+cFpip3TEmwRBYIvEXlHcjthr9PduyjBXMu16cIbA1zypZm7cNs1ufWcwEGFoDJVCjkkId01GgkWWj8i+iu9WzGclZTvF6V1jtZCVB7Hh/de/GfSmbjEWvVa7/+9TEb/r7YOYovivcKvWHzCUX0f6hUokS7e3F84nEFaTCJHEB4f0pGdrqRxqkHNMLaG/RWr1QM7vx9OfQgHMO5n3l472LbdHGMm4PAMoE/Oe9UPdKkfu6iH4jd+Kb5nUD+SAAPSN+Cc1fo3ymSeffjbTFAVNeTzZgkj3DMQUcYYlOoWkyO+fbtdK1ai0bluTDtAITkUSWyuPEddSMJHQbqp2Fo7BxWzVXwf7p5OrywcKajpaKTDhudR1kKqsd9ni0aFhKDCCMnDlAOtorNbe8844C3ADya8zrCG9JVentCwslVpP4KkJ5fG9Y7YNwyHZ2Eb+2iNO2q7u5fG/+29yTLuk3xzDLJHtyH6h1FcgaWEfn6WPPWu4Kl1Sa+RFq2yWurIZbicvc2W2A2QeVQm/yUQcvtPaCuM3KHVmBDgtAQKtT4rkg9DC2rT5y7MUgOj/y8gKpptpp+McnVmgCH9tlct+QscMs6NDsowwCuXY+NYSudlJM1YQpDP3uHTItQLxt1Qzf6DEM7rrC3N/22aBEbj6qazsvFUEKErdcoYMGMgdfWofCa7esd0a35mUyaxBJlwUf0zN2vtJR/Np4QG5KhcNprTiCnMiQf791AWBO9XB0QAsyO+OP1nPoM8vtEo2c/to7IjIwzakOr2uNPoAzgPrRvAs2s3N8LK7+d0ig/i54HSh1sn3vVsWsaSrb3Usiu0fSlnyGnt+ceu9mOdgddQUMzZxjQnDPSqEM50/BwtbW4zw5PVkfFvEsZEr+UCgzfdtOkER1Gd3Lu47fB453WZz1IkFiC2Kk7J1412uqxBfataD0EwSS/nYS60QNKW1w+uB4VO4sig5zM8EvCixinClZlIhaUBfjgYx7Xz17n7F6o4ST98tSwGWvHKHdW7xhU6Jre5ewRlVb+nhAzwkRwot5c1Tc7AytCJY1xcyyvr29OVZ3zf9d8KAwUlkHCSj9kt8L7Z3WaiOS5RZh9KxwSd+sKCmvTWr22jQVsH0X5LmGsZU0NMbnJrK+20ccZaL1Jtgv1ct/8/433M/N5bNFd/t/W8de2FpuBxf8/Fwc6B70O+VWFeGGwwrMT1VL/N1HO8y7ngOkqTQh35/8j64sgWmcbTzlEjZXm+fFbMhRs23IR4cKN2418kc/pHOsI1xv5FaDm6vHy/CepCJ2U/gUStdzW91DCpp0nBoVikPurF7z004HElmD5uM0odHXdWx97n7iE1RPagCqYU5jYUm3mROr0ADDXShh/1CWXLhwu8ze7TjEMXg9/SDU5QtJ2hZriiCwORj4OUEeDGuCNjInsT+eX/zdQj5Zu+CzU7VBM1nYnp0SmwVPZ6T X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c084449-0b0b-48c4-4ae8-08dd18033127 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:14.7708 (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: k2e8faFQXWO5LxjpdoQHVNP5+dpSUSjJ/htSAx4NyZKbD8DJ8fOZleF9k+iRp+Gqd9OY7l3HGR2wonHk12QJUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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) --- 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 9 03:39:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49C22E7717D for ; Mon, 9 Dec 2024 03:40:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C72EF10E45E; Mon, 9 Dec 2024 03:40:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="ed0xSFcT"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07DA210E45E for ; Mon, 9 Dec 2024 03:40:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AkNzsFBlgsKQqM9Z4xbuMuBohmQ6X8e6rRNBxC8fLRsUyDWfyXKzhqOQYwRe5YEaGPZKYNV+UnAGPihJZwqauSLsnQmHDoo6GpxVfEVDmHyRiikrMm2/R9dstfB1bLALaoL5xON6InNjSSzIar0/NaveEBL0gSUtIx6vIaPztu+gyj+Wl60u7XYdloFOts1I7KAUD4H6wZOzUyIJuBj01xCbWoeczlaaAlZs3YHj/U83emiRhjHk+sLqEHv5/68Vsi8MHpDkmjJ9+TyBJk4ZenNr6+jKq3WCTZYYU5Bt9N900r6jTUfjANmjwTPGLm5TL/6fGFokYvh/VIBu14RUCg== 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=XQ1hggjcv2U3T/31WtqTL1UF47x6fNmUzBN0+3pkv/c=; b=DDpGS8n86599vyb31p7e8aL4dKTfTCsVH5EIMFUUg34qIRG6nqQZdJzjJHLScYfySzCRRnTtMrTRjVRe39pq2A61Og98LHRGtTti23iAZ4Gs5qAtMiHwbC7l2Xeyq1PCu4otLGbW4DBP1p/P7H8bioTkbkPkm3QW7nJ3dpnNJaviTPwoHcDJuPVVeaHrkogD0ITk4W7N5lvOZxaBqHyd9qtqTguaqOyuYhRVOvOHQjSaaaYTlgNCsdll8VJBurat0JpzRrPaPCBUMhoVWZlgihlAKwR3E6p6Ey+pPb2Q+v3wV8TM6gAI4pz7svmq0SPqp30QzhbPBOoqzAAT2ZdzQg== 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=XQ1hggjcv2U3T/31WtqTL1UF47x6fNmUzBN0+3pkv/c=; b=ed0xSFcT+00SsvXEyDFpI4+Dm1mvC6Fk8uzlhlNUaqPoQ28zqeGN840w3jlFcYPEnh0V9rwDrV80pGL29pwgtPMmNqDIvf5y4AY7+I3sV1v//KuuzVtkmGOfcqDxBOp4Mfvfn9NucO6YW76tsHymWxuH11J40pCbmfdM2jYNPqZny/NM0dumPEZxDs8ePXy57dxtv5qMXrkEOSzzU4GM+uar4qOoAgjw6GiI76kGXOmSATt0eZM0ZaxyQDahHJxqNRMqB1WzX2PFEvRuqpsnpIKgCd3tggbQ41HsMqguPjnizF+grnqt7CyUgrjESG0nRluO1bEceq7QChiftq0WIw== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:22 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:22 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Date: Mon, 9 Dec 2024 11:39:10 +0800 Message-Id: <20241209033923.3009629-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e10a7b9-eb15-4332-cf27-08dd180335ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: HyxeL7pNqXycHdaN8Fc7MZgkToGARqwfe0eJUgVH+FUBoDAx4amXinRoEpX05Rom4RvxzvrBnErpF4IvmQo2oFiFfE3TmUc/Ny/fRy30JFTk3/CmC/6Y+tZDQH7WN/O6TdG7w0XJeMObN9GoeY8RWTDvhl0JqsDKGu+ngNC7u+KesaoOyWrvuh2wcE7i1z5evO2sXLs+4fLbt7139elk5noumJtWA0UOfksMwbO4pArrCq6QXmxql50pIYblfq8m8yXkuarFd7J9mcjXd+SAvVZh5T1Sxb0vpmbeJrNftdJdk1l/jfXFvxLtyb6se44wsHjfJp4Md7it9qa+FFwaalabx9HzYgT7HuOWILhB97+RBn0cA2rvLANgWFqXymu6YQyjPqbvIIuVN3ybLMT+A5RXkKDWmT2RkBLAdNJM+unaEUtkrSKVmhUIfQiFPxq38mUm9PkrLXo0XqFhmV4uZvgOLn3+MF5gmxyk67KJY4Ub2JBOxJCfYfHzOblVJU97a6BAgL0zR9TH9MHRhsvrFjler2aKgRIUoU7ScecTpa7dID3riXN5ClN501LKe1+bh4P0WNEjDeK4jV1SJL9xZOY71PH/64BJZSDZV1tX4wO201HNFPXmOShxhqXMPVPHTohGcyRAj2nwU4m+bTtO/PzLHkr0lBRr6OJlJY/nZo6hStOQ3z/6jnyl2iBn09+2uvtvmm1RNZ5rK8GkD64fMQ0V3l3vidBvbJLaVtEM0yR/PBoJDkop9caUTZ0vRzKujssY+BW4RwDYGG0coBsHHebSf8O2FL0MP44bIhzo5urnFpHYC/EiG7R2vGagfgp9q+F3TWr7cQZ/fNglPn1kgffqMDTkQVkGeu57gUqrUlSlc/LI42+ugCV8OXajnCSw1gWqwqk/Bqpluv6LcJiTIUKKR/u+voU/cz5y4mTtlZLLh/lT0mbXF7qox6ZczUo+XLAUdVtx3fgh1SRF7Ir9wO23/V5ehQQLXGRwLlLq9qN8IoRw9G4Fc6rXZ6zKXXdP6k2XbVZGKhYFkdhnI6kHTe9Djks8Zt0rqpgXPgheY6mTyPZ7fCJpZK03slTobbDgrj9mklSFwPgEQZgDRlVKVOAMjfgmpbj9i4EPToKKr6v+5n6eMzUbFjdEDDMnp9kaWJ+mXUzCRJceh1HSIyH0C9bATTeL9jKmzEoXkJSA62URSLMTqsJbYUyEo50KwcCvmzSeN1MZAXWNP3UAtxBwTmZfPfI0GbYapS73Ply5WnWIJbIrP+6S3D+8lqs3VDfDkB3eSo3I5vQ+jBnqoiADsptIyHaMsXsI6l0uTXlScd1Qf0X4wzkyWaJ5LhcHPBJ0SQ7rm62rpjLyRx7tXSWnHA== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FYDAvcEz8fSiTjJfLSmtPIjmW7rBlSwraTO+6F/tR+RJi9bIHjjitCjJwgXYlbrUwqCYglELZ1n0tndH0IR667JGlLbTOKEceT1s3YzOxomX2niaiiPweFhKquuw8ag9keZBKjW9VKC14BmQfikJFbn0sk07EUGW8mGqE09AZYe17RkpXWTyPM8p6uHJOdqhbeRJKjZmF46+UwGpYzQnlGqjxbGkONoLfBBvbfGM8RMlkxxbwIYUEgvlW0EamDCgL7c+GrtDx9utOolGkQKBIOUCGKQ/SpDbybWkzHMYhmiLfBaYInIIWVv86mK/B3dnn1x1/ftzViH9wj3g9GCmrRbz0lpEkZvHn6t/ZRSIUi87wl9ihl+wQyRaDf3N7WQ8onY5IRsnOtLgjPE/yH4O0lYm8pt6MlezEhcpZ6OscK5lLxFZihCEkEsUcPO4wxRyfFG2PRCzNPN8yTO//n70r8o1HCcH63M2rm/j0+mrQxugiBFlw1J4/lYyuVLbYWjh6cF5PALGKHPtl+jmomWuJCiDU/CBNyxDCfhJovd3t9lJYQilV7a4yMIRCgUD7eS8Yd+Ev68QzGDZMYNnQqci+yWucaorBwx+slqJQsOqSMeafot/eKIUy6z37NNCnKsNz8qHmQcJzs7Y29JmpjlQvL6oYCGEJrKkUqIlyfR8/BGhn8EwYz7lFNdSEtZZvAI8hj0THBS6pkMCsYYbK5CIISiSuY/VDlPUBoS83ODeiALq4i7X6EByZYwdokC+v3w6v/2UpeiUxGAETGqSrsYoficZPAFKxQAOQ6aDORRgk+t/Hlx5ceRqzh6S2FMSvbKIPteJDr+/3Aua+lBTL9goaPl9j6fLW5CL2PLEk9IAOK3EmZteR7IS7VM4xHz7ZxfBsC4LGTb9FbXTCrbgbvGaeS5T13CLoj2fTF+Pd3SBOH30gf0x4jyIYfJmc0UpiT5DOX29Wba+H/iF1tLFntiM8gF5tmoU+5CBmGlCq4dpDmrydeqzy6PZEphUxvJ0+MHp2Wx2kP5TNoYx3GwXhdyWgAAWdFeEnYBIk4CcTsKHX8vb6wmrlNq+blLAbIXQY0fEv0cW0xoj7CYCMldWFW8Na8b0q4Wi/JpASgoMZDLACKiEhTMUOhuLrHyZB8r/kMb0GWje/vyJR85MoXKrEL49WixbwOex8FWjSnOKFBBZ1+psCz/ZTFIIMwLcFyn9QMgXigVSQbY7W7Jzj41Pzz7s/CDPv092Gd2U5JmUjrvrv25zIOXG+Zcd3czb5dmiG5pFWyri3nyEqkM5WpZZ3/4jYDx2LZjPsXy+8Y/M4VPaKr5zI3dx/h67/qW9JkFwj1e8/neYWnN63KGfCtfmQ1bxN/BUwhaXvuBvV+pk2rrHpddOdfLzFraCAH+IH/2Md4lZDWN/Omdmj6nz33ghxslsi0HUMO3OvFjJ28NcgwQAv1Cofn5iSwXbY//yiwF7fXMRx28LPWrX3P0YdwIPs7Hy5Gn2SSRSF9uI55BJMprpoD+kJs3AQA8z2XoI45m8aQJ/WeZ0yyb1eS4+M39Y82JBDxi1HomsdBrjqboAkinh9/L6ZqfdEsn64zJr6u5dxPE1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e10a7b9-eb15-4332-cf27-08dd180335ba X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:22.4521 (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: P/84o4Sh1jvQLq8/tu7JGS/bK7tOnuFO+d1692O0ocBt9SkjLQtSJnN6tSRE3Ca59hxV5Ghzaq3xlxxO0Te4zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller contains a command sequencer is designed to autonomously process command lists. Signed-off-by: Liu Ying --- 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 9 03:39:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17A97E7717D for ; Mon, 9 Dec 2024 03:40:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D87310E457; Mon, 9 Dec 2024 03:40:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="b7Dm2vt+"; dkim-atps=neutral Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAB6810E457 for ; Mon, 9 Dec 2024 03:40:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Fj2nbhDa35G/apgAkK5R0Bz/gfMTL7dMbEQHY/PUKujcwf1nhOhZ8ZSKRTGm/LH5sEBKwg2KTjAxNEro7BDPUmP/wHdZ8rTNu3cA5QGcvRG3ytXF7PLX/Gm7QUrcnn9kacAbNDrMh38KuigGyT3HnjrR9GPt9X7Ij0kB7KNkY0w6zQVjocqkIyeSpVn77c4JcUAb57UpIb2XS34u86p9qSNX1gMJ5UNnkCC/VMcAkxoAJUssY87pyxeyXhNIJVq4GcRZeLXbHgwrE+KRu08nwYpCg00SJrk1izbgLpatLXs7M0jK/Ask1EeYWfYVmDLjyrt+0Yqnhf5CGxqfZAx3rw== 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=v8SxKVYfDrFBJyTZ85YZAZAae/p0orTIA2PQMfV5eYg=; b=iFADCnfXRDna2Dh3uKlNhJLrY7iJwT65kWcln51rMUPFtOswSOn+qxnMBqStlGWbJC7dXeHULp3pbxeYeoSdYu55Ys228a2frJVjI9IDnOSIN7Kloa9X86kN+n7/HPwJWfpKnCe9AwpR3/e3I4hixHfMNMlG88oKj0DKAzk9Po25n3pFhNRLKQ+XTiCAAMEiFAoyXJbHmah/2UV6ZflbyohNTcCMKP2+4+mdeGDsdUJ82DkbEtFdl4mBEgqBhVXJJS/iYwZScl2M3drRSSO2kotzEjr7FPstXxCnAgryyxG7CdIEDrMKlGTb5UDnqQefZVcERqpomkMfls2uwPpDqA== 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=v8SxKVYfDrFBJyTZ85YZAZAae/p0orTIA2PQMfV5eYg=; b=b7Dm2vt+1E1S9fQ5YbZXwuW1f2TgaFy1B+uFzf8wwrgz59L9AuWB3E78g4Bt9gWmF/b1vB+OaGtjBq6E4zfP3nCI4nGSLOqP7rZCDpfiHe9VzhQgFc7KFpmqPWKHIoEQCzdaoybVXgj8alt4/USGGKe7QvVTzyGD3IPyDGO9cHJEZIy0cwGmHndnjTCZcWUzKVddHxrkq748PeByhzq85CqRtouCLuw159oYWWfGMKqMPMZXy1JSxb8O3eYnBbuNbAy5fzmjbfjt+BrzEgcZEhn0g6bHIv+lVtcUpxObagJyvcwnnjfYIduSEEnSrv38EseGUN+2zZFhAOGQKgEzug== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:30 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:30 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 9 Dec 2024 11:39:11 +0800 Message-Id: <20241209033923.3009629-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: ba81a19c-95a7-4b09-9a66-08dd18033a62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: lYy5dZO0NZ19vmzDQv4GfeFfLYmOEBmMaOqSUx5MqrrFUxxMKmuOYSPss7sYKyCDjwVtPopoAvBE87gLRi1qYp9VtThztv0nY6UTMzuVR+YEiwyLLb7I3kKJdFmNFGVxTL8AiprRnwn0bRM1epz+h4vzyzadmjASg5LbC5fSazV/sRQ7xowHVESPE/gRi7HEypQIyzmycEvqVjmcLsf5XGGCXLNafAXzSQiW1bsoqSdpFxYnRLsjoQ9hRc/aqW+fimo9En66mHXc4ztojYeblB8zmeIBQ0ZhoY/yPP4flY8H75FIR2xL3ewOcnA/6tdxSMzWW648g85jq9duN4d250IGfJalrrBwBVicieop/Ahd7E7pm2WKdOOoh6UH8m3M3V3DDfsUfyGTOBTFkUmJPfF7T4S0c7DDGhS1CEJ6hXeLsjVGjt2odBBqpMTh01XZ5YRqYBLcdStL4t2wGy6HYa87MURYlZWt9tZcTEIzGzGuqr2RBq5GPAIRjVgDiK1nkXyYFrLwFUFn9R+h/SNzURGTTmYkjL24E+9RTfA1AJH9WXc15xWIDiXz8sDtYSi2d3ih7AUjgFisQiKtV/yPt6+FXhK89De6s4uRheftufLgsfJyOjtyzBvYvi7pYTGExXqETaf8MV8GjJpsgMFmjbS10kkGSE7tiaS1HmrwZPy9ejYMqFsbuskd8SE9lOuA+KOv9YWnsuIhZh/6vUDbs4ZJFKM0bIH4pYHt4sejC9UMvZi6TpOtn/xYeSL1UJW2D73BeYr0kr89dV5OB0maHpHe0/D74+OlLLpwvO5Q9blXGmi/9Y6zDJHkCGiJcA+Fktr3b3X7JEMzgqbgJeZp5HFZaCzV+mAfLnSk9ZBGpxf1ljQsNscZvudr+2qOisa6QN2pSxC1RBduUMIwtM2Bu4GooRCSnjEifPqNShculykHCb4Ak5xDYbFrLq/YVlM9MibETVzpr9O+cEBLyyHu5ZgVtEAf0B4RyRr9xXSL0exf2jcr3fOzz0C337dWw3T9HGLwRu8Wh2pRE/hKcqO5KRTyRq8KNbuu0+GUDhr0FWGtFX3EqzcG4jvSRMSuu+1l6jcnjTXN9LUbMVliFGR3hzEgPCBCW7z8WGESlJNcEDX8tpbZWM+JRg0zWjJlNS1sfjkyhUN/55nRvgFfa7m1CbOOv4lT8rP6ktXWdHX1TkZ/4JtlHdaXGq7DGe2b6Qcbzp0xdqwsdegZ9h60WH6bgQK73PiR5nq15Vakn7TJKdwY4dp5ShDT8VlzoJhmB0XmEhptBrNkt9XVFBJKJtuaYNAaOZFEhYpUTo5iPnDxzW0ImyQ1BHSo8vD3KWGtATMBNxe8IKnpRGfuSbJTsHkzyNCRRqrO8bV3e5dFMh87OlQ= 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HFZ43kYr1cHlz3BJcgmN/uuyTLmmjS5LSuihzs2mly9igC9ul1jx0HwaR46cvHCOaWWAhvN6ljtFdPm946SwMbxze0PeVoE00yF7vftw+KUW4svLx/FvjtNpcgMeqG3z7FPloJ7wZVVgtgO7OPU3F1EqMl+Ugry1pMTl5o6mT4vviS66GKTF5iubl3ant6SF2VKZagAaNODv6YSjkXrGDinT/7VthE+Txw8UJT24NZQayLf0qe1RVRaxCUvJsKOyBQ0S8rumCXYwFnU/SzAEKYAaEPBRbtGv56KCAInfDuLrEtq0bB9DPS9cdZKY4nLJdxPxL2rG37hzIN+ATKKCD0lrrabzvtCcr4uaukO3aTpyUn03amHRxT+uk20btEZpxqXx4/ewtgDLZQq79bgHXCKphejRsC5UtwsG+Um0uy2hr0AQ2VFQxno0XexnPPJFFjHMBeCQHNWcl/NtyMCj8httOlF34R2Tx94/omKnsVI06d7vFBzjn5Bhmv/yoAmt/+uD1es2lbY/a089lKFWnhnPhcqdUYSAEPnxY5K/G1RFTpdhX8+V6EhU9pNztzyY4YfyMMqTrhMGj6nufggTkFito6y8Z8Zsqfq7RrZvBm4tZNd6+THycLBI9MmE8ARYofWQF7Wv5lQYbso+5pJ0FrsbShH92hW5Vcmcf3LTLu1hCbauKz4Fa4DWmsNLbwjVDU7HAD5VpDTrngq3cHhrflc3rMbIYQavAsMI5Hix8THwcMVFVibi8DUv5vJyqn0SERnunXldndJ6MPgPH44jkxK8ht+7mbrQb0OqAxhurlUJ69tL0NGUP8VjEMBjmAu853y3ddJMxt29gNUkT7rxyywrgTXDtPRCMYdo/PYrm2cC1AQp1Jy2rc9iq3NpuNqI2mMtofV+/5MaY100chflSGZH0gny/jOKWMak7J9TAVNxkfE0OJQ9vcZHE4f1ih0rZdWUH7bUIoKLzTZOo2fDZ4fUkb3JPZvur3x5wzpYzN/PetGegjKCSVbPKPYVbgTOgtJ8tQxQO7JwugZyxfU6Y1WlcOn1wGgOKMRlyd15BiPtnJ5BkRhs1dhOVEIvARmTNvkv2nOgvYMEkD8wK/WSVuEk1Ctracg4v3hiYwkn1OrSzSfoVv9PIIs7z060G6Iw3+IMSPQv4spotJcf/OgCwXLVoMus0dwKaqOXUURmyr+iLcCUvg2SJiSP0+C2+LP26NBpOonO8n07BSl6+Ect5Xn0Qi3WC+zuDm3A9JURm9x4AILzE73EVBdZEoxufG6pvOW6AoQE+PjNKCZhKP2y5ZbL47aeP8zZanKsDEUjVAOHlV0I4N+aUGgoNpR3QclZU02Msp7Qetb8C0OOFCCC26yH+PuP1KuOwGy9YU1hQSgNppFBwq6tyKholk0Qbh8AE1UvRAUX9fBAgYNbzVBknm4NXLURpEaUBL2bdENyhqPramyhBc0cVh4NHyKkDRKlt3mCMiEMXgq9Uz3+lS976p+WE2H6+2tW6Zjr06bUmdpy6DOO9xD79oKeAksGmgm2/GFvswaMzuAtot5+pTRRPg2MstPMED1495vj4xNfyUmQWq6AsAvCqE2MxDnOsr+I X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba81a19c-95a7-4b09-9a66-08dd18033a62 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:30.3060 (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: 2/ogYGfiXpY1lSyyri54HIpD+nEh5N6Bv5k5PiU/eXHC1WlsPeB13wPHnvrI2W7XdFCAhcptfg63GpXTKTrWGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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) --- 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 9 03:39:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6BA98E7717D for ; Mon, 9 Dec 2024 03:40:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB27510E465; Mon, 9 Dec 2024 03:40:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="Xn/NchiB"; dkim-atps=neutral Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2071.outbound.protection.outlook.com [40.107.247.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id 43D3710E465 for ; Mon, 9 Dec 2024 03:40:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gv73jM9n5P1liuNmPe0KtUz0UE1WJrBsb7Gad6qfhqPhd4bUVeyx6oHd9kl2tNOTPutUCqd9WONVtLaikQSWcjVrbzODoDAQLjU87q4z0ZVozvBJmgy53ALgbgLnEw3yekrfFiqphtPMlMiC4176XgISApUGUS2lAi8a+Fiw7b3Pu6cYfHdaGoykxshW9UQCP3Iz+yghhW9iOrZ4y8gt2act4qKCScKe1r+xgFqM+WnygucUdJkyceVONpIZ2HPEs91QZuYLg3IV1ccAkARFjl8SivP+6YMEqqxw/CLj8lAHzWoaJG8hzq4iVI79caCkPbd4okbJBhug29//+sqBdw== 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=C+TQESrLwCyxJ9LEG38oLibqrERDNGgHfPS4nVb04js=; b=kBlz0enMa3CAlmeeaSbwLKYaJqydpciajKvjXVrXLTe8sXg8DUG3j8Zo/3egcgbK6Jj4GadskMzKbPJzXVcQmbsT/G8pG9xFDHC+aRaoz0ooIMr4Nhbu+nMGvo7JPKI6Z2H2YPSeGxeAS1wCM2Pf8LC9s2IHCgIXd80OXWn92Ntu1hYSRs9kSSzMhtyZM3aaL2OMRTei3ZSsApcFrLEn4CjXu7ozSVoVqeySMEpkQAbM0Z0ZE5XEs2Q17mUlCZB35JqmqZ5rShQmNrcuRvs56o/gEx/v5a3j5cirFqcUFU9W16s7i7IVL2HCP7y1mq2fikQVH8ZfPAWtBgQ6EGEGLg== 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=C+TQESrLwCyxJ9LEG38oLibqrERDNGgHfPS4nVb04js=; b=Xn/NchiBJCue0DENyMGCLGXTCuEfzq9UY42YvDVCn4YawHBJa+V1gqFQqbkqrEa3xexoDooFo5tp07pDrXJzs2GzGzeqa/2+FYcqjbQxXRLbRrz7Q5yfXtSOh8ZbIT+deWYW+W+Y1O9vET7HGPUupBqYjFeWw/OINi5D5NgfFvw9tV1C7GGYqRE+5hJFTv8WkReBfjgCn5ZKcCJx0CHlsF4nV4lK+B0DyAT2dO54RvigU8XHqJhI1E61upR0oFOtvu3OVnb1eOuMqhP9USkbzJriPuN6PF8zfDp9ieFKLEXviPWKFQepBlykz15fxlMEC7y4stDvK50nnrcaxKzcqQ== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:37 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:37 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Mon, 9 Dec 2024 11:39:12 +0800 Message-Id: <20241209033923.3009629-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 71a2a0c4-9bba-46ad-ea3f-08dd18033ef6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: LiD0kvL3LYnvG/Dh02s+VBVhkbnewZ0Nh8qm+1aOIeFtC1J93M3g6iMesmm77WMx4zRn8003iOCCtXhbWKBqkz1A004ABXZnblUUu+9Fe+TbcCbxvu/4SxySTJfOCpezGkBGJhSIoAphk2K9xsBydZB7VU+wYAJMfIq92fplzz4NrqH81dVVEzMW6wUsPM8MqNnw4nAWLL72P50j7mIXFoHxUxlY9M8M94pkbDVBkhskAEqmMtAnbrSdTJnoSBN9NJz+JZMKvBEtkTEzbrs3nXjOLpMdZHbZudaCAd2nipKvYj8Ra3e4hyxI/mnppaIuULF72wIcxj1Cn1YKoTvDEn7/Ul8W6uCkv1D7+h2wUtNemrzHObgS4hvSgpco29hfajZCUXIdyYrIEc6VQQ+JIVmsd/Ac32ssRI9bD2VIxCaIWFFZRlzHTnGb0q+eqzlpN2uyZDeICd3vl0DYVFpxxAEayAteExkDWFfXjl7dzhEmfdDkXLK3+7EozBk1Tal82EYBOFRzWwubMWjgaQelqHGfKRyjwpN80lkLWJ+i3hlEQ/QjNsV729tnoplFv7BcXxV7jzJmyfr26l3WoTddmgUrGUTc8hNW3zJ++51AGKC4GaNb6ng4f9EVpbZhUIThT+T70hZs9cu7u2Dj/TD0rkVhhdBAGMCFjjAyATPhGHUPic2OGfjCqrYBkHgM65rTEdZYddxIl19dDTWyDOZP8WUUNgXvktrBIZE6flf+53pzyiEmdEFyOt6nBujyxuSrshkizrQXgkl9u7jkV7jLpq3fgfN6Cc8KlULHv9YYdbLzRo2Xi6/MOIFSUCBwHWtwIkKyDIsiZbkyc6XDitwX5tMrDCb2seSwSoyKlSFbmNRujERZr2PQ27jY+e0Ch/1YG6Sznmi3RbjS5xxwbxOm31JH1GHnkoKhkINaZlicf3HaEIl4GtE4/fus4VJZtEGTQxv43OVdRxCxFP2FlZjhMTsW5VAO21E4cA6vxWcbo6Z5y0Rmj4XmA1CZoimHu5NCUs8+vnOZ5f+nJZTv6q3gWwmEz9uDhI0TVsCSHBpWUD+tE0GFqLRCmKviJVu9jpbPEamO6fUDWu0Beb4Cx+tfblp1HU6Q5cSZPn5ZVlDIOH6eIj033xc2KVxKlrwkMwXcpUJfcjWzzPfAIccOD3L7ckNbgOcW22CIpxlYE5iiAWyNkpY9Mrgtvk+KbyPeiJk1sPVLMJCrv0NR/Xg2Kot+krVe39Qyoudp1bI4NjqR618trZlSSy5Sxs7Bd/CdQHF47kuj9oJcGuTky3/Dizm1m3S9HYkm4G1bp0n1kpkZXWKZyeTYMpSWHV5SvnltOWNtKmGvzwAAsXGd6NR75wCC8Q== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2VEmb5I+X3tswVrT/T2e7QHddNXsS4ELU/4h5K15qm6ghasTmw1k3WsiLBtehRXszwwH4a/DuKGgXB18MqXquzXVk9fjO5Em7b7PM6g55wyrRRirwrcWyrc0JyaU/VlgCF89n/678E8QnEoCRe8cXuQEPrE6knACa0+oFLVMTEoDO4Cds9FsvfvfmtFrsBwUzIz+4w93JV/4aaLHCDloOGcinKPpPchK0uJBmPd/urWCZOMOQjJTvyvwRf92fTIzIme2p63d9S/HxRQmaq4iD1JQkQALo2G+/NRvgRR+PZy7+sDdogyebd1h1rouFhpTL3pXQYr9mnmg9e6OaGbZFEr1SmgGE7oYIwBbAD6eF8pbmvMAgVvTckNlZxRi8T4J3ZbMVWrFCToeQ4TVWuGFljxnfrSx8g58Wda4Mmo4LSbMpqjUxi5jy6UHgd346AguEURaowJI9VFWIZh2JwJM46+SR4gCcQcoG/MLX0ReBeu7C3CAVDtZjvkxZ0TOv5ix6gMlTXihkwnGjebfrFdNDtYOgvlTyqMtwwmndDE5spYA9gGMh5yzjidikwbUrsfF8OvxCrYo2rjykBeCopXNsccQJHm/5pL9+cE8GHv1SKJx7tGREUz1q/vomLYqDFnClehbJhisfHIOp21MJNQBXxnrxNZzgqfNQac/3hrkY0aUrELTDO/hZ+9tAZTKa9l0aTnwoed9Ra8Hgv8kLnGOpWJWKyMEj3bTIT3lglpjBGV0rRuhWdxu6bjk9QrEowiRgO698v7gsGE2VRDytkWXKnY80WyI2aDKqQi3XYnJlVhuaQzfZ/9PCYydLN3HUiOhi+wSrElTYjqyahIbwTNmv1LY6FnWrEOxoDHfFY5/7WFduRo6sBo9bGJOiX9O4/l4aOTzSJlGEOIS3LNPJasmmgr8PgFMtk0VgH6dOHY5ekBbDJ8ZK0nDB9NVAhbFbX9EubPG6iRr3/NjrjgaMDn8fmtaGQZecSxip89kNe5UrHtBdYHDTWuJNJm2K4E8A2WTBvxNOg+g4f5IY7imPa03tzUt/rI3vT3XiuuE2WSImt8K22X4GMXdVMys36iQrTUlWsNjE76pOMuSHQp9T7C52UUaAj1n+e3898PcYmb4cbF5XC18Yw4wH6hm6kIlj0OoW9NKX6ubKViMAhSlRM4n94FVZN6EgJ52QtDLr9MC1nh6T8MfW2oOVbhAxauMGNDzXm8V3sPzUddQpqR2Z5CErKdzMtiG3lpvC1w5lnvizQx4RxeYV61u7zlziy6oF1WUD2HhWZ2kH9Q/pT5bDWt+HXrIHjLIYoPN1+HPgJVkVs437xPhNOtR+Dh3Rt9UC/0Fd9aSVd9TjT9pNL+FZ11lDimgHCRRfADi+owEvXDIV956aZ+4MYWpLGge8RFzADmgXPavutzzvIrFadWmT15mWhRX7w9emSmGALQyEF1ruu7NEVyMwZn9n+m3a8C65QrBMC8Xmlep7AR/6Q9cA+VnY7Trmdg945ycgACHunwVVHFz0DlFQxBIB82u6BA4kOpdkkhrzIqn3dJ2pqL1hSJPjf+1VcS8cXKaa/fUGwdJXWdnFUI2QDvdWxvWS5HrDzlo X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71a2a0c4-9bba-46ad-ea3f-08dd18033ef6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:37.8817 (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: ogfGyWklF1K1aX97hpU03T/K6TQmP9tfTuZ4MSvVpaAF0fdlO39O5UYZnC+uHpykpjTOJXPIbIErND7PORfpjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 | 240 ++++++++++++++++++ 1 file changed, 240 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..10cc83a7420f --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml @@ -0,0 +1,240 @@ +# 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) + + Each Display Controller device should have an alias in the aliases node, in + the form of dc, where is an integer specifying the Display Controller + instance. + +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: + const: fsl,imx8qxp-dc-display-engine + + "^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-engine"; + 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 9 03:39:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03677E7717D for ; Mon, 9 Dec 2024 03:40:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AEC210E46A; Mon, 9 Dec 2024 03:40:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="GqNfFryS"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2052.outbound.protection.outlook.com [40.107.21.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DF8610E46B for ; Mon, 9 Dec 2024 03:40:48 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ChuB4EfvdUquAQ5CjK8SfYANM2LTl7eU56ZHUKjmJX37rSr/mCl2uS91fxRatOKIddSaxonnuxwFzD58Vgsn4bHXCt/UAkbwiDJH7wZbqM+698yw2+hf8YlAzKDrmkA2DvCocZjTIUAgrlhebebUhvSEsnj59VCB1KrvL8TZTRTPcMQLSEXDRgdWckJLgtlCqyDDue1lLIP+bLN2qRQ4X5N1XZATLPanLENPaOth/z5iCFVgrAFrFMp9qV8dyYHyXtMKhO0+1dBuy8IHJM6hfkjdRI65TpMjm3a9o/6Mr1CbRiKehiaX5oPi7rOEn5HtuLwdYAVUvNWRBbydBNEOpA== 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=E23rj13lNX9Gwt3CtMTLK2LbkOASS04o9oPiKM5HD8A=; b=ny2rD83nrWI8pry0VvDUyrqT4hKi3vIdm5A6Jjni/L0SYdPN1xfarSEo800Na+ACP2kkdbjfh4oTRD4+WnCQWr9Tc2GGNR4TuESLjygg3tzaYPQt7EfjV05x+PLSLTJlZNo3nVR/W/gG8m1SeVmx6Z9SXVbNXWOds6CwYyqFavzRJlL+ojQo51igJc5msYfnd9Cw8P+9Rz6eP17d4sVdiUxpFecdaagUkFKqaXP6YkN9SpCcAWGKTKt1H0weQ4g9KRWKT7Rr1ZQSOhKxvhLvOX9o73vY+1QzgNEW0ypmIxajy1RYMqsZwFawPme3o9YQBV8jO6qyf4yvspVbOF+raw== 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=E23rj13lNX9Gwt3CtMTLK2LbkOASS04o9oPiKM5HD8A=; b=GqNfFrySj+Nr0LPvg57QuTTEvMhf/+4aENfXvjyQTp9g6D3iFZKW2IeasNR+II3KMUNtTDvNIn0onPkYHqzR9AjVPzpoMQrTtc3rij4kgYf7PxgA78T3EJf0RqxDj1iacSjXg19JW+Hn7fls+eLrgFeIgj+DacdYkL5lq7sSkXa+XbJ/AQSMOEu36HUZ9urz+ZOiOsP50NsSMVT/0kZ29bDnmvHhkM4OjXERWSB1hpTGefG1rpp7kLp4gmHpS1EOeLOATMuzKwCMjAl4G9wRYvum31n+sNYttR+XJ8BzCG/KfqM0ObzVzklQ3STWRDpNY4FJCWQUWRuWCksqekLMeg== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40:45 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40:45 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Date: Mon, 9 Dec 2024 11:39:13 +0800 Message-Id: <20241209033923.3009629-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: c2c0f0e1-508d-427b-9603-08dd18034379 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: QzLUF4YxKqREJ6qu8M0KBUBsdEVjJmNUDiSCblZ8ITg9/1HNpeNCHkyuJMfe+LKr43K82evDyIQmEOOFTOo5MqFV1+2yL/witG+FJxyk1DbzIM747Iboy9qTaF7Cn2Lscn/Lm2pczgQEBUY9vQ6FazyffhX2zay2BtxTNeM8BalMRemLU6MXNdnAYCKh4beqfSX5wmOZTmK2pH6TbawrIryWRJPO+rogNg6xfBuxyh1pk4RX27iGhoivYl75m1wh+lsh13Z1OjDJj/FvCgQibvUPVp9oWxhwcZjcpOT750n3W6dzRrcePzTGgctg8yxPccV2kLCbuKSO1M8UkSzUSFGI2su+fKsc9xze/NmE3F22NvHBGFCSHGlSZ+tmaUDz/I4M6goQS7ty1GQHCAyTDDgUnxc+W7NqsExVoatH8gZswF0/hf1i2FIB7EhyFCDMVk+m/gkSgr8cRFrFu9Cm3cD+OhV0gMncNar4zo7zxsdLxrls2SSI+m1bccVeCihEm8Nu0bsBFnh2UDMqPQb2sgoLCsPzSJcmMHGBL3WIBxD/gp0Pnl3CvOiO8fi4RUjMQTsRRO/a0k0zc5D5nOBFKpMB+UAG8vJXm2dT1VXaejdrF2bM/E0mMJUSW6Pr5j0UJYZAeZeOYhidl79NGIWN0mnWjz2owqDDRC061m1YSrrTz2nuWX9tRRuUXX9ArRJtLjIZO3QohtkTSl8jPkZBwPUELcThZ2kyNZzsMeL212owYBdiiHMUYV8JFnO4L9jJ+zvoCylCYobKj4pjziC3zG4Tql60AbY0qqC7H3kiILK6J2ErJ/311th7L6YxD2qm7vGiiQm/9ETdWLS22ya31FNN+C9qA0mnztUGQbprYSCHY9xkb/lBLJARYox+O3OcSoeLGIrwlo6Ucnb9PQaqg3RTxCbuszwuAouQT5kBN96+dbLIFIVwiISqmZNdK9EeobMfMrlBWpU8LzkGXarFDA0v9qD9KPSOZMvGAvDSu2o63zyfXhW1ddaUrmgXmyiwaXS5gCTmi6C19lAdi/WiVrRIVbwN5PJvzGKdLSaGg7iRbWJAqvgFEghYkbnot+euQwSxno8dfumBwYrnq3ZJg7NjbEGDBKFcERD2FLcd29gnsyLfS3dzzzFCRTk0JkExcN9+NKCe9q+EueAeibZ5h0IKyXwbAKpxRK6ixXXizTxnAZTiGbtn4/AULCcBuua6RRWNNPZSebKPiImPRbkoQ4WTWF+nJa2iYoCuwFst5+9UJR0A3GQKWvA5/sW20VSNrW0hep2arejUzQZhgFPxUbhYPYRZxQAztzz1oEmElGVSulMVYBqot/RJVNTVCpftQnkBIJJ3+5yleMoayaY83qALrG8G5BtqyU1gQlr6Eq0y12+Mu34pcGF8og2FRr0tyNbO58+BzoDWPOWOUPxsXQ== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 15bUVh4zq9Rq71ojviNNe9Y7hP1IBQWQzE1o5bxCq+YLSdJS5RsZNM7EI9l3OTACm+X4D85pj0gZOFNAl5VV7JaZWTAAEKXEqQxWKc7li6TTqlBXOkdYKEcHjNnZO1nloxyf5yVnEbTo/cANsJRsb0SsHRnJt1mFKlPy6qIlqOlr8M/JO4/v7CiOWRo9sYdJRTDUQsvd3y6uJWXxpU/jTLHAIjzj8SWB3eZ/vicfcrANsX3VLHOre8jPiQOMFC7PYIC72MErmuS+yDFBSHHL+ZglYu7sIpcS7p7Ee0jEoRA3RHT0e8kkwEsQn6pIAkhqNGZTWcTKutW7zKo1t6d2fC/aUsUn5rpG+7lHcXOp6W8r5U0CUcIBkxPMyD6fsenuXxMAVafqRKLuwSbvkw2lvJ4ibkSTctQfQHi7l/GpT3jQY+gn3TBgWToE+Wst5rygZRE8fMM2yLSUQ907CDMz15aHOyVXJ39O5EL6vz4GxL1nie1xLMPWnuFLwTz/sAuJI8Nwesgs343jEyMfZNZrfLfOKP8s8Q/1rSYIiT/aQGC3XR1dbRLWL8xKNPMj2wfBIt7W38cPxP4gZ6jo6LJ14sxyzLrb0Y1rtFOvQawoCy7soNiwe/uh+djoERGjO9I4Rrwh+pmI4qtM5zhMXB9r939UE2hN7dbk4wn2lRuYzzA/rK+TTe3RKCg6j8X0G0pvkJuTNBpzJfdPzHX5C4uop6pkyC/DVV78LtdFsmxm5PUpMZvnGgBCrn9wt0s/DxlOonc82KLj8Z9ycnH+qJg4XZosjyCHq03IyWtaePeBovJ/Kag7fa4PrQjYjxwAoUHgI2bRgAbIlVmI1+tvhH5SsrdoDnrrpPEn8vhbrrdWB3YZgUO6+vwSH9xq0BjRHVDfXwp01EP1bomTx0QkR/5RVt3OEgvXO/KDRt3pJHmXCR0jhkvCmEjnaLvph3Jpp3CACkarxENfkV58cwCJqbfw72SeTGaWLv9NQo1cfngEYOxT4jCBuNISfy9SIUVydgw/RqdM31rBXNGbwcQ0EAthj3cobqDk+HN+xWgpTp7Sk85Qcj5wQrnPW0EdwBuEV3vvWXyq0E9URFsDUVmec1uJuxQ+33vmmEsuiD0nLEE25rzXbtEfW4y1N9FEf4x2bwq7/awhAtcIyd6TWWVhfMVHMZfGV9HTCHql04O4NsB+fgJuhtGP5Ti1WaP60K5X2CvOi6cW5DM2eo1zIp4vV1goozdRxpXVW0O/PC15jh+oPuer5au4IejuKPBmLg/cv0dJ+9ER+cGW4HdnmmjJ7s7cr3R17UclSq+JerZX1F5VoE1tRUoLMxZxJzTFb2i0Uz7XhFbjx6eg0LXdkR+yViunnE4TchIIUObaC+2T9B+ozniXnR3JvWATxudx4j7JXp8wgdj5Gx+Ss4EgtDaZWUkBQYT5fSLBtWRov7zaGaTBSWWzzo//bHeQ6ZO3mPJAMqYowfNv0BVuMpBAKi7YRDK5KG8lgWwuAqXOrpJ2hRaQOy+EARajEUIzyfOHkPn7ShaLi63cEttUQORnbgqyvhihWwcSH9EBzR8hkOP/4eApWbRD8qXWHuwUSdgyaMW+n+mn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2c0f0e1-508d-427b-9603-08dd18034379 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:45.4393 (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: D9vkoJDteNHUAH6JDqkb5FapJ0/l2y5O7Too51wtFAP5QAraaE6RkGOYRxMn2fSKBaEc1YYH8N/yLXxIzn5YQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Signed-off-by: Liu Ying Reviewed-by: Maxime Ripard --- 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 | 57 +++++ drivers/gpu/drm/imx/dc/dc-drv.c | 32 +++ drivers/gpu/drm/imx/dc/dc-drv.h | 24 ++ drivers/gpu/drm/imx/dc/dc-fg.c | 374 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-tc.c | 138 ++++++++++++ 10 files changed, 792 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..24cd37c1e4a8 --- /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 = "display-engine-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, +}; + +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; + + 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->id = of_alias_get_id(dev->of_node, "dc0-display-engine"); + if (de->id < 0) { + dev_err(dev, "failed to get alias id: %d\n", de->id); + return de->id; + } + + 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-engine", }, + { /* 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..17a44362118e --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-de.h @@ -0,0 +1,57 @@ +/* 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 + +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; + int 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..e1290d9a0a99 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -0,0 +1,24 @@ +/* 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 { + struct drm_device base; + 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..bb51fe6faee0 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fg.c @@ -0,0 +1,374 @@ +// 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_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_wr_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_rd_ranges[] = { + regmap_reg_range(FGSTCTRL, VTCFG2), + regmap_reg_range(PKICKCONFIG, SKICKCONFIG), + regmap_reg_range(PACFG, FGSLR), + regmap_reg_range(FGTIMESTAMP, FGCHSTATCLR), +}; + +static const struct regmap_access_table dc_fg_regmap_wr_table = { + .yes_ranges = dc_fg_regmap_wr_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fg_regmap_wr_ranges), +}; + +static const struct regmap_access_table dc_fg_regmap_rd_table = { + .yes_ranges = dc_fg_regmap_rd_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_fg_regmap_rd_ranges), +}; + +static const struct regmap_config dc_fg_regmap_config = { + .name = "framegen", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_fg_regmap_wr_table, + .rd_table = &dc_fg_regmap_rd_table, +}; + +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; + struct dc_fg *fg; + struct dc_de *de; + int id; + + fg = devm_kzalloc(dev, sizeof(*fg), GFP_KERNEL); + if (!fg) + return -ENOMEM; + + 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"); + + id = of_alias_get_id(dev->of_node, "dc0-framegen"); + if (id < 0) { + dev_err(dev, "failed to get alias id: %d\n", id); + return id; + } + + 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-framegen", }, + { /* 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..66e0efbc90ab --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-tc.c @@ -0,0 +1,138 @@ +// 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 + +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 = { + .name = "tcon", + .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, +}; + +/* + * 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; + struct dc_tc *tc; + struct dc_de *de; + int id; + + tc = devm_kzalloc(dev, sizeof(*tc), GFP_KERNEL); + if (!tc) + return -ENOMEM; + + 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); + + id = of_alias_get_id(dev->of_node, "dc0-tcon"); + if (id < 0) { + dev_err(dev, "failed to get alias id: %d\n", id); + return id; + } + + 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-tcon", }, + { /* 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 9 03:39:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D90FCE7717D for ; Mon, 9 Dec 2024 03:41:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6314310E46B; Mon, 9 Dec 2024 03:41:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="V8Fbx9gy"; dkim-atps=neutral Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2056.outbound.protection.outlook.com [40.107.20.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDEF410E46B for ; Mon, 9 Dec 2024 03:40:58 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NgdVwHCG+SIV2ELYsRVwqAyrMPCb3latWBIBUY6KTnbQKQnP48Y1O4FHqvLiIxqPV5Dt3n/71bJNb3a5S2+Yb4LTpex2RzLF9EWuy7cjFlCmCbh8YRmXzFvymFH25dNOE522II7n1TyLZSznoYj6cj4Z89y7vIGxHQuFedGilzrzdiPO/3Csg84DnrgDGnG5W2LkMYNZ5PXCipiOW86ttojjm/Zkf7rIP7eBjsYznebATL3xcpJfoV7uK0DJOxT5kJgj7h+mQtIteDDYXItEYC6bczT0sav0/CXB+O+i6T4LfGE2zF4AFbDmYo4Wp3gvx3m4oDf03rA2IgkfAUZe5Q== 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=jT7LPpNc248ADT9VNmfUjwtZc4zsOuY+Art1bnt2SvA=; b=iY3r01kVNaKTjAj6MwoAKGIXlbmQcRrY6wtA+yEUntllpBiM5G29z2eKcQfrm/RIgs3kfHA6+Qiaxke/dEaF6QDLpoyDkfyiLuF00NuCar1xvP4LXWBhM820OTZPhUo+RVBnvoroCN+cAul+nRZfojLF6WoI43n6jE3eWb3k/8d5vnIr2WJNKrpUSIqm+2jwiQbKksVJV3sw4xd3uLFaNEJ1M9rfuDhcJyRXoFkWcMjJcTCu6uEaYndIGl8JhDjEbl/yPDI81Zk9HI+TZwyLw146lk4hPSigpmzqdILsN+Hnuf5Len3SHTh/7uCOMKy1V1z8vgZGa3wFDUzngxfXuQ== 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=jT7LPpNc248ADT9VNmfUjwtZc4zsOuY+Art1bnt2SvA=; b=V8Fbx9gyP4F/i9U5ZA2uBl6QZgoUE8ueJlJDtrzgeSDi7PbJ6nXQIlqrq5QtgcUOlgh7HNLlWe4R5+ufNIyk3YHP2FwZggMHIDwAyfszuI7VcKr3jdh4nZHLuyO79gNJagTwVQenbf3diHhy28qCCV1A7rmItLke7EOrbpsuSbP8QXlfpv0vUy9IjByNFRNkjsc0jJC/drJDU16cJLrbzosCEQQmmqbme18fc8UCjPMb1ZM7xZ29OJm0l8NI/8HMws2AadhkqwemK2D4fhl9gQlujJc4IwQYI2WLYMQpdF46dl9O2ychXjgMi41VUwr7QPwPNhunDd2HFMWDkl5t5Q== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:40: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:40: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 9 Dec 2024 11:39:14 +0800 Message-Id: <20241209033923.3009629-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: a394d8eb-be41-44c8-7ea1-08dd180347fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 4sppRJ9xvyjkvERGuoqCqIckFIJ33lhYh5jxFHDbZ/CJNKOp0j3DpRn5G4SP8Wsbcj2G/jYu21ljlRHMDkIqf6ej5A2aKZKA0iY0SlVL3aSE2C51RhDTeeLUQbR0hdGH+z/VcxCSTzlV9eh3nhssvAU5G3Bb1ZP+N8m1LfmLpLKlXNAetVOj/5WSJomCiLHbb1jzqKzrmr/0Tkix7O//evK1/rUht+JCMMh0nODAWT7Zckj/bHJ7s40YZbKqnQ77Z5tpmCeHlXJ+9pwNjhCZyiN8Qsm7u4FW8GI9f5cTLLOR6tFq5/Bi1QXVgkUHTYVowU+akhkm33dq/6Rq4Mlzko8UEv6p4O0HjBzTPa9mtHS7G+1lIVALAejXd5uG19nlTV6EYldtzXtHjcXns8eI4e8QaWMKhmwDMKgteE7lZBS86aPoB+CTrqeJ/iV7ciaH370S4tHbDI1kttxIsv7CCq7vhEiJIJv82Tzt9dVLW6d4eEc4s29ZohKuNYlG2chgG80ITEB8FVxHZ02pYVQ2wws8rSYOlFt1Qw6GzKw9ATCYItXetL/O5Gc6XGxkiDz9NmY2FXX1s43I4q0HPOQVZTAmTDo0CR+cztov9TMma0FFJNcsP5RW8y+lJjlUhd+cSTyvuU89MFbPFvmVAl7RppD0x6lo3SyNL4AlhNjMzzRzuTXc+NmCLQUExXta+pwRBXN+jePsl11n8t23mPRU/lKpr19JzQaxyl/ATgBzUqY0I0W8OLdpKk8hRz8kJRAOiEq1BauPHmi61iwZLVHfBL5GdslngyqGAyW9UPUkZdW3RGrYfqJh8CBROLNpqIwryfg6bGzPhMMVZC4wqYVUCUn2KEmbMSjMLTXz+2h8H059Wg6hxfjDsUK5q+hRNkKWZm2XLiFK3xt+6cu6SfhZ0bA0rcdh8I8MsXfS+lfaU6ZRqBtAJL2z+wT1rWR2WVHX64pDJqh6U3mNmzoiFn9JlDlRYQ4frLmKgayMSKWDYDt8X8tX2I7V15DNyckfvavT34Xge1oWO2tkGVBmcxGqUwMqW+xUdIzA8LeRGhVtN6BYNnYz6mf525GZIJ7+1HQ+dXOqrNHyCwWeEtQHXdyRq92a8R4LiEkQPmkiU/Bt3q6ZQBtXydDvC+9anNjeU775hHAbkpMOk9uzRFBhesPnCjFqIP1tYVmq/Epezf6LWlEHPjxTW6R/xVz1DYm6EXXAH5gXGX3CSO6I9n+2sa1CtCR4R/PkWV30eGp/UGvqpAa0tcz8uJbQnEJ3rH/+eZQ5PyY1J1SxO7B1Um4iWQxvY4ITiT+8wA3v/DZmjiGVk30LzerdZRpqe1LBtVc8jr+85Fl/RAWkU/x3vU85KG6MEt+tmElgwt9MekQCUYR48DBGphP+gnU0Hu/lZZVO3lBGRLeh967TSNABb6DcIXZbig== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YfTr0Qpoqga7c9gR2Umerc5h+f6+85CkaonKbk7Az612pPTd6NMhEm71JWL2FzBPvp5+O9rDnWfbydvcXQ4qq7ddm4PNv1PAcJ9HsAk8EsdOPXXBiv7XchxSC67GoT0FXFrOZUpNVyFEmCpuRpsn20/kAcTwvefbsXCTDzHePpoz3VOAgOxR3oKmkKM4AXcjo2DQiHf53p5QxZ8hO2e9Bhmq2YlMFbhxEuYamxwsxaVlPiOZMbSvxGvtjtwroJmv5t6kN0/MIWLmX6bm+Eh9bPoNHDJatOB8+x/jOW4yWiOHC5849WU21TBYccJmjtIIOLhADMmVmJwmkvIyu5KMZDU+dJcskidMOK82uSdmCLZHsTFlkDzCPZwe/vVrBEoz69E6om1X/N+eBjzWg60eSMw/8xxcP81SJbYRM6WDHukuQhD008xwByo+WJt4EKEw8Wj145NbNeIKvJzzGNhRwPHU4tKYjfEK/WJSa/tzlabfChin5jup/FSEa3qv+MLJlhtnMGnTDQhMOlcDlBw7P7XL2aKsdhr/l+mHEnF8B3iD+7H4Y8+YGarrz2xYSBWoa0baREKjiZs64U5ijLhv3mLabUm9rpub9VwPluqsHt8nf1tAx9rjD7pLvg5QTbiujld4XwulLr9ixp+k8IyIT+ixZck6IYd2oVSNZFFWBLtzzqV8Othsbi0C/D85ZQukUvmjCfENrzaHfzAL2uqRqvOXgoTPUXB3TUS+CACmmd6HotK+6MgVLWPqvBOtAFNNWqhVv4vCLWTBZNlBzuIdY8KDXoc4CZPPEKqEiQhAfO46DurkWWd0W9Bu82E9bb7BlG063Db+MT4znPGVIRpwmHL11I4CPOgksNRe1jZOEp9PRYQSFq0Xo+fotpGyucqFYBsbg/qdCzoFaalkDCGLj7S/KvG5DQMhjcjK8vOYDCCDshzHiZgpet2x+EwGPlYvIhtBW83dgOxh2ONdzNgjBLk/+57hqZL9H0mOwZSrWdJ3S1LxhKSgEh+aMB9vsEpMUVfFemqK4baiR4/UY3qHEgy6zy7ws4OoNRiQleWjQPifMZCBkBn3aCeu0/jRkCsV7QXeTNjJs1j4ezCJFSOgMABT6/I76LBtabbrdY1h813jS/Up8owhJd3wyaReLgDhpH/mCzpl2xumJSM293C6/DwNXP/guQmqgRIO1dq7/0X8OAdgwRxqsaiySY3BhMBmTxy1fnO7jNs5+4lDQJ6U0UW/mNx8a6pDj0V/uNy5XrIEebyGnOsLElzuYh3ZCsEqgBnHW955/Zpk9kBajLi7GANr+CmR8fTcLswvBgTNvyFiuH2XHG9SmWnPers4DQUc4Zo+lQ3D8DIZR8Jwml00AO+/R3kpvDzEOsX7RXARmRU0vCXIyFaMSmWCXhf6khGYmyTl3FNxh4Kq7SASgPFjO4vVf2V9MsioGQ6yg8a9bbB640olcrpdmwclkMp7tqhakmHKZYYi0Yr+qoxD6JW7Ho14oMlSnl8UNlqxcmK5ODYXjrBgxZJontYsHEwVjvUUWhELSWeHxaqqpCydbKFmdgq9s2WEC+4bN+uyxpnWyp31Mcgx1JQVsyXQn23A6Nhu X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a394d8eb-be41-44c8-7ea1-08dd180347fc X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:40:53.1081 (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: w83Ayyp9TyfMmrQMm1JKC2Ddd4FCG/KEmhPxDgGuiw3RovQal2y9eGEJXcyaM+TLfjnL8PkzLO/G5B8Icstarw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Signed-off-by: Liu Ying Reviewed-by: Maxime Ripard --- 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 | 162 ++++++++++++++++ drivers/gpu/drm/imx/dc/dc-drv.c | 6 + drivers/gpu/drm/imx/dc/dc-drv.h | 8 + drivers/gpu/drm/imx/dc/dc-ed.c | 270 +++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fl.c | 180 ++++++++++++++++++ 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 | 219 ++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-lb.c | 319 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.c | 133 +++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.h | 100 ++++++++++ 12 files changed, 1796 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..266344054ac6 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-cf.c @@ -0,0 +1,162 @@ +// 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)) + +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 = "constframe-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, +}; + +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; + struct dc_cf *cf; + int id; + + cf = devm_kzalloc(dev, sizeof(*cf), GFP_KERNEL); + if (!cf) + return -ENOMEM; + + 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); + + id = of_alias_get_id(dev->of_node, "dc0-constframe"); + if (id < 0) { + dev_err(dev, "failed to get alias id: %d\n", id); + return id; + } + + switch (id) { + case 0: + pe->cf_cont[0] = cf; + cf->link = LINK_ID_CONSTFRAME0; + break; + case 1: + pe->cf_cont[1] = cf; + cf->link = LINK_ID_CONSTFRAME1; + break; + case 4: + pe->cf_safe[0] = cf; + cf->link = LINK_ID_CONSTFRAME4; + break; + case 5: + 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-constframe", }, + { /* 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 e1290d9a0a99..c687a36b8153 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -11,14 +11,22 @@ #include #include "dc-de.h" +#include "dc-pe.h" struct dc_drm_device { struct drm_device base; struct dc_de *de[DC_DISPLAYS]; + 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..283777ca7be2 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ed.c @@ -0,0 +1,270 @@ +// 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) + +static const struct regmap_range dc_ed_pec_regmap_access_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_access_table = { + .yes_ranges = dc_ed_pec_regmap_access_ranges, + .n_yes_ranges = ARRAY_SIZE(dc_ed_pec_regmap_access_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 = "extdst-pec", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .fast_io = true, + .wr_table = &dc_ed_pec_regmap_access_table, + .rd_table = &dc_ed_pec_regmap_access_table, + .volatile_table = &dc_ed_pec_regmap_volatile_table, +}; + +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 = "extdst-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, +}; + +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; + struct dc_ed *ed; + int id; + + ed = devm_kzalloc(dev, sizeof(*ed), GFP_KERNEL); + if (!ed) + return -ENOMEM; + + 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; + + id = of_alias_get_id(dev->of_node, "dc0-extdst"); + if (id < 0) { + dev_err(dev, "failed to get alias id: %d\n", id); + return id; + } + + ed->dev = dev; + + switch (id) { + case 0: + pe->ed_cont[0] = ed; + break; + case 1: + pe->ed_cont[1] = ed; + break; + case 4: + pe->ed_safe[0] = ed; + break; + case 5: + 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-extdst", }, + { /* 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..7797ea59278a --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fl.c @@ -0,0 +1,180 @@ +// 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 + +struct dc_fl { + struct dc_fu fu; + int id; +}; + +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 = "fetchlayer-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, +}; + +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; + struct dc_fl *fl; + struct dc_fu *fu; + int i; + + fl = devm_kzalloc(dev, sizeof(*fl), GFP_KERNEL); + if (!fl) + return -ENOMEM; + + 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); + + fl->id = of_alias_get_id(dev->of_node, "dc0-fetchlayer"); + if (fl->id < 0) { + dev_err(dev, "failed to get alias id: %d\n", fl->id); + return fl->id; + } + + 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", fl->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-fetchlayer", }, + { /* 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..212302b026c0 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fw.c @@ -0,0 +1,219 @@ +// 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 + +struct dc_fw { + struct dc_fu fu; + int id; +}; + +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 = "fetchwarp-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, +}; + +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 = "fetchwarp-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, +}; + +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; + struct dc_fw *fw; + struct dc_fu *fu; + int i; + + fw = devm_kzalloc(dev, sizeof(*fw), GFP_KERNEL); + if (!fw) + return -ENOMEM; + + 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); + + fw->id = of_alias_get_id(dev->of_node, "dc0-fetchwarp"); + if (fw->id < 0) { + dev_err(dev, "failed to get alias id: %d\n", fw->id); + return fw->id; + } + + 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%u", fw->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-fetchwarp", }, + { /* 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..af35d377126b --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-lb.c @@ -0,0 +1,319 @@ +// 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 = "layerblend-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, +}; + +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 = "layerblend-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, +}; + +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)); +} + +unsigned int 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; + + 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->id = of_alias_get_id(dev->of_node, "dc0-layerblend"); + if (lb->id < 0) { + dev_err(dev, "failed to get alias id: %d\n", lb->id); + return lb->id; + } + + 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-layerblend", }, + { /* 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..d0c1080e58d8 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-pe.h @@ -0,0 +1,100 @@ +/* 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_FETCHUNIT_CNT 2 +#define DC_LAYERBLEND_CNT 4 + +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_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_FETCHUNIT_CNT]; + struct dc_lb *lb[DC_LAYERBLEND_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); +unsigned int 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 9 03:39:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0BE66E77173 for ; Mon, 9 Dec 2024 03:41:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 867AC10E464; Mon, 9 Dec 2024 03:41:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="iZ0uEcQ7"; dkim-atps=neutral Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062.outbound.protection.outlook.com [40.107.20.62]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18A2610E466 for ; Mon, 9 Dec 2024 03:41:03 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=woyToDYmZGEteD+o5CsSw0Pt969NDYz2CTcXavVp2CJrTKLh0Zms0wvSYJ2Hx4bvd4grAhikZx4l4MAwaQ/XM4BBvaVwuD0Q8hkgf927NHBGS+qAwaPxEbyRKmfiRVbiXZyyV5ly1MGRmDWVZOuI8Jv2pdWumuxHQGHCsTsqtuXGG3imp1PyNdDqNxWTBQfuPFv/wkwfMfOXAXPSAzPmGKZA6yKH9Q7Ec9rBrprXKCaP7DXiCLMCFDDa3Rc0y2Rh26y+WJ+NWHLTVKRmqqNkiYrPOeaG+PgqIV/34ZHbbCAljJ6JwrANHQ4+CbX8gI3ruCotxys4x2u+2gkMLBr8eA== 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=5vqMAEEP4qGkTrZnN237D35vr2ohniNCmRmPDgk33kQ=; b=TWGA7IgNp3D5PP7FKwyqAcsKKhu0AsnNHcQOKW5WLuT92Knaz8/jk+637uFeP6pQizdX3cOFP4bR0mHJamJb6ixABV4Vg/EKEXmx/AOngSNGdOo+zSdhnzdQVrAeOTfjx+1X22zVFgnsacPThvzVxH9lvKqhbRhgoj4zQbJBlSV6dJM8Md1AeBJiStkrf9tdxc9/5GcOdTw7X3M5vypuCfxMUHZ0VUwI7WGp1ynLFQE18T+3Eah+dQdGmasvxLhEtedF5Sb6/XBAgQ47rkf73b6YZNJmzJnwzUDlftieXPKJ22+pN6Wg99e4ko+y6J0CtLn2RMAV1YNOveWt9bO2tQ== 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=5vqMAEEP4qGkTrZnN237D35vr2ohniNCmRmPDgk33kQ=; b=iZ0uEcQ7dii/APSeDqXGNimA9tQkvaZyw93N5xPNN+qtKB+sTUseCiIyZ1GDQSHAuMpe/KwTOfG5XohRLS+IiUtR1NJafzVuXMMjm7OG3ZPwvYOEM7EeGT2TgiETRuSusIFJ0Gc17uD2W6rvjPBXNt39/NibQGVPyAV87xOPFTGDgTeuHix+9D6KaxcRtOYIwI3TRNyoL6Vzz63ktFaZx74tka3cBjAwXKI5N8CouSBaKXKY2WcQpoAqDMNtoIO3fTq4vpxK2SmJbVXW+2NeCzRzepbJxf84uZZPYIzWO5BPjW6NIo99K7TBgQmWXTH4X99Qq1irI7SxRY6af74A+w== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:41:00 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41:00 +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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 9 Dec 2024 11:39:15 +0800 Message-Id: <20241209033923.3009629-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: 2069c088-d4ea-4e25-558b-08dd18034c8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: YcRzA2zmmTJjVvW30SdpgwqSXzlu5N0zfQZkfo9fzePd7m6Z8NVsn4he/qvbpCH3XrT+ZEMOE6XzVgGq7qZvD/vv2id//SNd5l1Bn8MNfHC3WEF5At7x+Qtq9gf/xRUzJx0STBrgHzEI1di1MDxmt5R181R6Qh3ggrSs47xWXTr8mgSm1vel1o9mizMVgADlGn6k1zIVI2MsPgpcqs8OnVOkK6Kj7e7J8vUejHPSIW3KzY+jd5VD542WcICsKiA4k/kMqZ8E9Wv6R+Nr5t/Yg5yCWCP1d43gil3n7T3fYT+RUsoOpR5nFUezN1xEkfFjTZ8ALB9riy1N/kPdwAx2HpD9uRM4dKrEv283QLHcsey0KJmuc4LLBCUfzpY+LCpaZV87t/8ZEjExlb/len0bQZ8zZIpyOzLPhFxtA++2vpyzGbXQOyT79qZMXZHnGJHyUwsZDarY10CTrfHhey3b52vGYIpsDj0ymxFsYFEiSA/6YyM1tqRms+JWzxik9RldOpWAIIdADrXc9qK/IK05zDUYfZLgYovE65D0qVWL05UcIt1VNJCqD8IG2LnV7vXv36WsGpGtL7YhMBPdqDe0vysHATy9Ez8x+YFSg72Sr//JfKNp3h0f3AAr7rneIhv3ZPdiQbGutibwy00/434zZBljLjTY1w7WnaimFcC1YpZPmggKme3PBOyh4H0TilnwdRsEs7EUVodhxvnz5NfQNUR+dKGmGJ+BcKkEYzjjWJW4qekacWw6OzXjIw42d4D6uRJez4X6jH6gr6MSKOO9UqnACiQDEfItJgLxCZSh2lc1csoooo31inphKayfE8qIf2V0fhhNcH/N/ENuJAluX+jZKLevJcs9EM0J1WA41xl1yTIZNHjcEJNdd4m2sa+TnXx6khnwi/0Mc6nm7wQCI4tRGcKGJ5VoaWnpqAr74FflPCsWRGWmRL+sKqe2nXG17G8/y9tzsuek+RdNKfb6pnZen2YEEypNlZgGJEjPbMUkAo2zEYW8331gGKbdG2qpvpiVeJoFf1uzACxzE/MNMLk+Iz36eMPOIvW0Dm0R0hN9H73Gc9joHDjAPoYPOppT+oXtQPTQwEOBkMd5KAzg2slxuAxpEBfihXy8NX/1cs4XBodXj4otW8DMtYPWkfRHcq3eSOC5h7Bjjigvl5BPVZWWnT+/3bfwQEFdmbEnRFnw6zmYfTe21+2nbjbWzCL+BDGcGLZJwjIVxSTd+bg59i4CjCo6jxarYwJv3sD0V7SbBoYXW9l+5d/xax4cO6LmyQcTmzwHvcNydZ3pvfmUOWE6pN7B2nwI7fw9lEjHRcKH9d1QKmp5UwufHwD4a9rXYFTrl5MDZJFxmKQFkaIhQYZYcaiessipIpfX1yp5Njjok/Gun9EeXaOH5kOO3VKytikfi4IL+si0t+TtQfux9g== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zI2e6uxUjgFJKTni8wB0uzmFuUx9//6DkaK09SdDXt9NMXoUgnE6cca76ijz1kBc8+HwgOr03mkCaZcReLTOqNkeCl7ATkkpuAV6R1CpUafWRvdX9sa0efn9vm96ktmCR+ggFK8v0Khs34yqMrmh/TP6/3yl5WyrOzDR9l0etUDwp7JZ51BEYrx69pU/qjPPJz+Xz+PemejkmYhgO2TQ3KMmwj8b0Hxkc2AHMbID/qlaenOR1wItdgRIpL1Vn09CQppi5q+iWJlVYLfGIHl526tFVii4MXiWVEbwYeBDwRnNZrrTo1he08dTngf4O4v8yr3relHVonVBBLcrjdbbWxF6LAugi85DepnSbM9X000vQsl4RRNULCFsJekYa62wQ1dbsFaN82yz23n+NEvIKr1XNC81XExlNSU0WHC9qcSoWmKFg9dJN1eNtMcM8VB90fGvJZiCQ762jFfBkBGORlHBWFZGyoeCO6sLZEp45j8ogWo5WM72dCVZQliv/oVu8o5dRK4Ilp2Nt6K9E4pYkqrGZ5DKOTOQPNrYUrborOOsAhxJ1bytiAkmvJ/l6thqZhWTbRpbO0JdOFnRU0dTp0j1pZkGFkrnARB5qGgqVKFY3L3lKEeY4yxKG9G5b0FG6l7JiIfozONzS8Fk3dbyLp1ap+4WZ8OD+TRQTW/BKNft5LETZmqFksRi1yrzcG5gp78AmkKG5rhYGK7Owx1dD7h+f48qyYpLE4gtnupVjCxA4rqat7C1jqEGJAMm8zwVeVTaDRH5jf92k8VAf4OTzTsNHKgDJlXjEk9bvIUju8l2Pqr0Ex+mNXDIv5Hj1qmcuq50ZP5qR89OJTdAmUXq5/T1Qy5dkyDA99dt9lj5ht66hTVAz1CeixYh4RliKvp357j5mWRl/WlosdFtElOBEigxXfHracyJqzttXVH5WwtFkr0l7c4Z5fMJ2VST/G5RLVLp348REHmQ4j8eFXdZUKApo7/TlmMxflrWsc7AmrL5eF7z2mRovmm9tSuJDqeZqOS38r7mCrxngvJuXx8jsnPRTFiNWO3pIqu3jLonwgrSquaNlVSQuDir0o0YDu5lMS4IAzK2zRtN7AfaF9OFZwTNd3+P6s64qVhuSqR1bX+L6jLVMpnfqg0SWJbJ7XjkkAWp8CVc/mDAjFf6xonlSTi0Nsp5VQj3MiFjW1wQhBQQ3GDewAH57NW+Vd0H5wYyHGe4PPMS3Hjn8+1bRTuamTX0Dkw17ih6bikGCiYMs2XMKgPg1TiEVwrbEX7Wxl5JVA5Obm5gySGpPOfcnTmVT0oaxVaH65ozwWDiSH9oqlsPhYx7z6x1r+GfGTMbqw2Bgy6M9lZ6C9K+d6GV4OYI0Sm8y5uAxYJc5Dml8JnPQ1jFD/IaNIO4efjxd+AWsG08n7tVEv1psRhfGzBsWojJJPlPd9wF8w9Ce8bXkNBMVOJIbb5LroNnsVC0Q22rqcCMZu0N0BMbfdjrty8SsIqs2m2R2OCzJnhS4Gks7NQNzv/nTCIUloXIGCoKgzVLuEjtoFC4kpDiAaDgB4y4y81qP9Es77MSqQ2rPlm9a8eI4+RNb9hiwTqTN7G4G8vDFF8q X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2069c088-d4ea-4e25-558b-08dd18034c8e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:00.7586 (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: 0e89l1lsRuRr/dc+sF2dLurvEdRE9IxDVnby7lq6gNqFJh1RyZs7TWG6tGI8u2PO9cBwq4cRaLkBaUesXNwZMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller has a built-in interrupt controller to support Enable/Status/Preset/Clear interrupt bit. Add driver for it. Signed-off-by: Liu Ying Reviewed-by: Maxime Ripard --- 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 | 279 ++++++++++++++++++++++++++++++++ 5 files changed, 283 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 c687a36b8153..3b11f4862c6c 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -25,6 +25,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..f022f0374772 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ic.c @@ -0,0 +1,279 @@ +// 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), 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 = { + .name = "interrupt-controller", + .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, +}; + +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 9 03:39:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898790 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 724D3E7717D for ; Mon, 9 Dec 2024 03:41:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFE3110E471; Mon, 9 Dec 2024 03:41:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="gyFdySIn"; dkim-atps=neutral Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2051.outbound.protection.outlook.com [40.107.21.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id A881110E471 for ; Mon, 9 Dec 2024 03:41:11 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TDTOF62fDj2Y8A6xxoF0XNfPPSd9Bze9zYzQ7dbgKtT/aa+eU//ai75HykGB3cpjWQ5wHBxd9yvPf3uLwwxjduOzjNXqQLYITKtu2WtK7i7FVZisn/tn8lTx97zaQgGL47O5WBmB+DTURdY6zmA97VsCd7H7Ph6s2zx/PlNuk3WPu/aquSypdMFi+Qfun5aM0JcOmycsc6PByDrk3cH9BOhISBu+Z2Tf+riyfrYi877SdtPr7VAKyEi92fKBwcWxRSh+mY0pkvmaOyoHaxjLeYQAwX57z1zF0PEzaIYe6mHwqAz66prDsMO9grQUfwgQuunkaMbbqAR0Nu5vPz3kqA== 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=FPgn4x2vINv5wQxKWcdR4Zh5lDKkmjHfQlai7M1Go/A=; b=vqwUy8KfPMoSKXJO6LNqidBB+aE09wv40JJnL/QEemRdES2Biqojr7WFQbJrbI5EAaV5SN2verWq1ufzD253zaoIUVJKX+aBUNohDUJ7Fem8fDxeeFy+/Cuf/9QQVYqPS1LJd1jXCkgPjOdY184okW+wiaqx/JZMntQEyFvjYkgwhkRILJURZYklAXui8c2gCNkQxqyEMAjsVbbgZSU/kv2MGOVY71fhzm0Y0MQF3fmqd0qz778Hh4xkOoZmaGv/ZOPwTlsUzV8se3FEIhSzfCX89g6Rn3Hg/OC5rPd0FWbGoidFVNzhu9/liogSupsUQJMe8IygHnv7ndGsSINtzQ== 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=FPgn4x2vINv5wQxKWcdR4Zh5lDKkmjHfQlai7M1Go/A=; b=gyFdySInSVEW6y5GHQgGDJ8IC9D5mMxSL+uA/VsnzrZUHvH4MDWLGo5/EampUU7ZTkgo4mwXg+GRerQW9ad7DowB2Dv5+q3NgZfZKh3h5GxW6EEsfj4yJXvOQpDEK7v9TN1InikOQkp2G29Rt+IM7q845VIZ7pgvwkIAmtAEHdrgXvZrowyFzj8k7Iev96EM/PrdxH4sA1MpX28bqPJqgX79DJNvRyXRjKKSa6GIhJ80S21y5+qYe1df3FpkfhokaJZBdLDMNaQ01j/TNHp7ktIHdbTrigCMnwSYJZLHy1nb0yqcB1YwPh5seNfE31/+PV3Ch6YLYBgZc1EfLZh4wQ== 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 VI0PR04MB10212.eurprd04.prod.outlook.com (2603:10a6:800:243::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Date: Mon, 9 Dec 2024 11:39:16 +0800 Message-Id: <20241209033923.3009629-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10212:EE_ X-MS-Office365-Filtering-Correlation-Id: d07fa2fc-716a-44a9-3bdf-08dd1803511c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 15uF93n9PxJUKUIPWIdngrzy2VRuFPLixubq7ZcpkaZzUOoI3YhOEV2ze1XKUvlkANeRYYQ73+TT4QN1fRlj1H5o38bfjFOMbEQ347hz8Q1hJ53OXNR/KTXlJ6WyXvHW0MVCgxyt7GX7PPhb5kYjy6HfYadf7rD3v9yYWLEvEb2huus8lYGs2AEwriGIRZmgc9aNQ+r0gdVvUAVrml6rxft4PKSgwwIje2qMz95WZk4pDxP2DTGjWo3cXKmwxceAKRRNdAjDKOpuT/zmKFy+7TEB+W4BBPbgCm7aO/SzF8q7N7Ct0XglnZwa/MdmSalYd+EqAmM8vGFXgr6CU42wonn6gx9xE5LKDLjY0QM27igO7pmjTQQ53JSwuHIzw3JmEkN1izbntEcjDot56lcNp9sWJndQrm736t37I/vpHwoACFzVzTzcsTM6Q3BeMbCBdHpQWlti0csAbGYZb5/3i4yQzkOGRbzQHAA+mNLuVlYFENEQXjisOmRjx0Ly02ONTn+ia3nKJbvJ1XKVCAf0+cQjQAt4TOCsAV3kB/UrjGPpsucRqLap8YAgTJF9462fYUuQL2JAjf8tjrpEFFMFP50jp8cuZecnUSvZDRK1c5n7JKJXiVvYl+LJ+dpFnt22vfTlvbFEpC1cuNQkJO0N970doNWksRs/zOaMMwwojfEJ1hHrtDSsiy8john6cFr0dgEbnI0UiIW9nmGXG0Q8hqpY3LSh7Rz1qKwpTUeibbuJyyi55lj6jYrdWnrPCbwt8iPa6tNJAOWsDpA88WNSdrTuZ3HSglQOfh+86LNJWlukqNVUkLDxorP8S037pqBLNlaUpsN+A1N3JjK7YypZvo4SH4ZuoruIWViav7ZIwBEVOhJdvWtGkVidxcx0cZBRg4wGpz60q/qZyjRRs3HcPv4sbTNAlTJlsWXDPUaLEi227Jl3bw/5oBTYp6sZDh8Ex+tAvtbmEnXM7bjsIezl4bDiBUwFRGikLEckFOmhz7KmhcvlASUd8EBxsMT+lQznMMI7qUHbnoaK8A+6T+PAK1FFKZHA4rHgn6SM3yHXbfNMCyWLPO1NYWmn/iod5Oq6jvIGo93diOElubTEnMl5X6JpVYAvh2inhmmNnOQgV36ELIpz6qoTWOKhCTMlRsXYJHnfsslG4TxgcJ73vkw0j4MZaUBAeJp6Cf/6wFEbOWPDBLw/DQT1d7E9fZ+3GueO2qLt6QTBsTr1GeHeikXMCam1ENeG/5jAzYSojHEkgDtxWAxukCZLOL7oCRYt53AztPgW3WAJG8EF5hRzHckVnlL/XpkOF5l7BX/8P58o1EPvJ4KU8Js0eTINy3BhvvRL8iyi7M1gMjMx/xCEEsp2YxDaiQw5lruZSSJ5YJMjczYyS0ZyhzEsZyJFhqmANHju0UMtQX1MvcPX17jscnFdEw== 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)(366016)(1800799024)(7416014)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QL0DnRAeklu8nfRSlbDWnX2lbJrmSkzcABRg4/1/jSFB9/TDLz2/Jfl2OI2wqmkrKNbGxAAa4jphZBhYIxH8ujg53nkkCk/EDsNYHeTvS5pgXCMIjXdsu3ZKw1JTjiUqiK2Ih/Pqh9AFkZVlMGbFj4jS8HtVzngT8gUeOYT5LLjGbjLmR3Fmvu0jn0IGv00F25VIuPwarH/mtQT4wv8Bj+1hYBSEb9Jt1ZhttjTl6wJlh/ISqf2s0GuRMtP0Xr7hB5h5uQWKkrRq3pfu1/QuDZgy8T9EpCTJUbHjTZBI/6YI/WTq3tgpsnLIsFc2S7A7Mfq+xxEdyJeEKRqHMBP4ebnSC1WHGSId4aROa25LuKlBwVdpercvpt2a5bmjl8xmUAaMNDlK8XswThGt7p8V6MF2nGuR9FvC0sDLUt1arENogG3RfMSvluXtldEn/cyj3iIVjfrHTKUAo3FPyDa5QbwK5jXW+ZsgYLaYltxN712fjyDM46G1k/UhLafTcm12AbNDvOg7OOn8Gu1j8ZlM+0jOXT3opqkoXGle6JoahXNR0E9zvdYxNKdLOeE74xREbF38Gw+0THaoTZYWwk0U3S1TYkfJcwJG7omNKV7q7MkUsLz2cNp8pnkbwQpTpBfwSvrXjT7izv0nmeQbxLhIl3CN9fHAT9eQk+sGcMjUIZQe1Y28l4Z9/6v3wmwxuZmJ2bq/IoInCAdoWXLLK0RXD/sb6tRp7uZEf7L6gL0F/pcNfZZUDJ1kdNdFMq5bGIuZhW0iftET1ulGjwoVQjBSvq4j+RQewrD8d6Bu1v3Vi0/KT6BonfhOo1y9ucx7scHVvkIxQ3egHthkjLzWGA4g4f6qy6K7keGwYAr3pjrh/CJKDIGd5/IWuPaaBKwWA2K7B3Fc8olz8G1GQMDmhG2ZtP3mTTvtefoewmv9QrB4cW4YOyhNh3EXs7XsSymzcDIPUpNqzuRXg2ghiN1iR9L9EM5HDeKE/4j9Md0bsy+VF0J/cGAF1b3/qn1bG0h9MOq32qFjS8zAcPZlS/7PrhTkoZsTzrrr0BipD8NxZHmaXP8dgIVeqlAmPNqUHA7I8LfI+WV1NbwhyAnSDAWTCw2qMhgKVjJonLC+RaYrni+rXke6HhSYoEzaL2UKco8xKgjaxMcxEQ2cm5JmsoHNre9GBpgrKpf5r0+YM8hST+0TfkzPOZ2Bf2n7pPNW240Mza5/gcoIpa/KMHqN9IUUyZRi9Tk+pcItIh4+fu5b4D3veEQ+qasPMj8qDRg+uOG7Do3iyWJ01EmMYE+oLgWkK6HH90gnZ8SQJmqvNYuX0ZbSSTC2ei9XsL+YxkR5UDawyb0KKNlZ2JUlz0dcesVW7NYgM0JxtwAN2FUlHHa+mNXn7KXBYgOK8X9NHbPcLcOAHITu4Vw3r+fnAqxAXyK8lkJbEdmKCI7DTPpaDtFCsDlrFJDXaC8Y5xbrYSo1/B+at8UGw8SNNoBwe5uGCHwegWlNTux9DgAlNDI8SMXL3pFpthalNay2q3qpf73xT/sX6ud8srzMEg9oLCTyu3pOqoIdYmYLcxKP/OvC2IERmDz8LVGeJXhrl+eljxMXtXpJXLhG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d07fa2fc-716a-44a9-3bdf-08dd1803511c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:08.3288 (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: ZY1KjFaYv9zJTf4C7GqI7iHdKRolU7hlNLks/zEqYYMVDzb7ShdfRzeMqeQtmdMZS2SP/fA1+UGBakZev++dTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10212 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Signed-off-by: Liu Ying Reviewed-by: Maxime Ripard --- 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 | 558 ++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-de.h | 3 + drivers/gpu/drm/imx/dc/dc-drv.c | 244 +++++++++++++ drivers/gpu/drm/imx/dc/dc-drv.h | 19 + drivers/gpu/drm/imx/dc/dc-kms.c | 143 ++++++++ drivers/gpu/drm/imx/dc/dc-kms.h | 58 ++++ drivers/gpu/drm/imx/dc/dc-plane.c | 241 +++++++++++++ 9 files changed, 1274 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..fd6daa1807d8 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-crtc.c @@ -0,0 +1,558 @@ +// 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 { \ + typeof(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 { \ + typeof(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 { \ + typeof(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); + + disable_irq_nosync(dc_crtc->irq_dec_framecomplete); +} + +static irqreturn_t +dc_crtc_dec_framecomplete_irq_handler(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_common_irq_handler(int irq, void *dev_id) +{ + struct dc_crtc *dc_crtc = dev_id; + + if (irq == dc_crtc->irq_dec_seqcomplete) + complete(&dc_crtc->dec_seqcomplete_done); + else if (irq == dc_crtc->irq_dec_shdld) + complete(&dc_crtc->dec_shdld_done); + else if (irq == dc_crtc->irq_ed_cont_shdld) + complete(&dc_crtc->ed_cont_shdld_done); + else if (irq == dc_crtc->irq_ed_safe_shdld) + complete(&dc_crtc->ed_safe_shdld_done); + + return IRQ_HANDLED; +} + +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 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_crtc *dc_crtc = to_dc_crtc(crtc); + 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_crtc->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_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_crtc->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); +} + +void dc_crtc_disable_at_unbind(struct drm_crtc *crtc) +{ + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int ret; + + if (!dc_fg_wait_for_frame_index_moving(dc_crtc->fg)) + return; + + dc_fg_disable_clock(dc_crtc->fg); + + if (pm_runtime_active(dc_crtc->pe->dev)) { + ret = pm_runtime_put_sync(dc_crtc->pe->dev); + if (ret) + dc_crtc_err(crtc, "failed to put DC pixel engine RPM: %d\n", + ret); + } + + ret = pm_runtime_put_sync(dc_crtc->de->dev); + if (ret < 0) + dc_crtc_err(crtc, "failed to put DC display engine RPM: %d\n", + ret); +} + +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 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_dec_framecomplete_irq_handler, + }, { + dc_crtc->de->dev, + dc_crtc->irq_dec_seqcomplete, + dc_crtc_common_irq_handler, + }, { + dc_crtc->de->dev, + dc_crtc->irq_dec_shdld, + dc_crtc_common_irq_handler, + }, { + dc_crtc->ed_cont->dev, + dc_crtc->irq_ed_cont_shdld, + dc_crtc_common_irq_handler, + }, { + dc_crtc->ed_safe->dev, + dc_crtc->irq_ed_safe_shdld, + dc_crtc_common_irq_handler, + }, + }; + 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; + dc_crtc->pe = pe; + + 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 17a44362118e..8a7b6c03a222 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 + struct dc_fg { struct device *dev; struct regmap *reg; diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c index fd68861f770a..1e4b8afa3eec 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.c +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -3,11 +3,254 @@ * Copyright 2024 NXP */ +#include +#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", + .date = "20240530", + .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; + struct drm_crtc *crtc; + + priv->drm = NULL; + drm_dev_unplug(drm); + dc_kms_uninit(dc_drm); + drm_atomic_helper_shutdown(drm); + + drm_for_each_crtc(crtc, drm) + dc_crtc_disable_at_unbind(crtc); +} + +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 +262,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 3b11f4862c6c..39a771a13933 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -6,19 +6,38 @@ #ifndef __DC_DRV_H__ #define __DC_DRV_H__ +#include #include #include +#include #include "dc-de.h" +#include "dc-kms.h" #include "dc-pe.h" struct dc_drm_device { struct drm_device base; + struct dc_crtc dc_crtc[DC_DISPLAYS]; + struct dc_plane dc_primary[DC_DISPLAYS]; + struct drm_encoder encoder[DC_DISPLAYS]; struct dc_de *de[DC_DISPLAYS]; 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..57f6e0c15f57 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-kms.h @@ -0,0 +1,58 @@ +/* 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 { + struct drm_crtc base; + struct dc_de *de; + struct dc_pe *pe; + struct dc_cf *cf_cont; + struct dc_cf *cf_safe; + struct dc_ed *ed_cont; + struct dc_ed *ed_safe; + struct dc_fg *fg; + unsigned int irq_dec_framecomplete; + unsigned int irq_dec_seqcomplete; + unsigned int irq_dec_shdld; + unsigned int irq_ed_cont_shdld; + unsigned int irq_ed_safe_shdld; + struct completion dec_seqcomplete_done; + struct completion dec_shdld_done; + struct completion ed_safe_shdld_done; + struct completion ed_cont_shdld_done; + struct drm_pending_vblank_event *event; + struct dc_crtc_irq irqs[DC_CRTC_IRQS]; +}; + +struct dc_plane { + struct drm_plane base; + struct dc_fu *fu; + struct dc_cf *cf; + struct dc_lb *lb; + struct dc_ed *ed; +}; + +void dc_crtc_disable_at_unbind(struct drm_crtc *crtc); + +#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..78d0d2cd3451 --- /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 { \ + typeof(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%u\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 9 03:39:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE7E4E77173 for ; Mon, 9 Dec 2024 03:41:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74F5D10E470; Mon, 9 Dec 2024 03:41:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="XqS8whj2"; dkim-atps=neutral Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2040.outbound.protection.outlook.com [40.107.247.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDF6C10E470 for ; Mon, 9 Dec 2024 03:41:18 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DOgmGMUCaSNPVV/hkQ68dmq/qGbC3uGTKmlL3vv8x3jKB749CPYTDmXv9304oXNIW3IDLnDdB4cLOJa3rl2CHHyDVJRkuVo0RvypcF52wEjTQUP1IejJkcEBfSMkyq3BNOt9waTVb3z6P68Fq2+7sscz4q/Fl9xfgkP+1Sz18Zp3UAgfM9dKqxPPj3bCI5+DsrH1rivUzHfH0YwytdJf4Ruy07YDOBhO9O/redizeNgod98hjGKI8z5PnlSQJY20f6AdWat5ioTZ6GX/JPA4a2oLYDRPUEWgYTDKjsdUCr7ufwgs3UcEsFbEO/MM7QRiHAHaqVII27JPivim1hHN/Q== 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=jf2UT7q+iiUtNPwi2YGw6gKPwQLYjmrvLy3aFLYNKEM=; b=sAzZOXelQufn6NFuog9bSq/5eaAdpgc1tNrgdcInHQnyVjrFowS6tMJKka4BbdLl9iU5OkJ7rhJH3UwTM+Vqb8V2Zn+ZHVpTBe6rkvvDSdQqPLzaZPtyTRFGOnud9BJWJrGL+Q65QOsP2kpkfnWdaBaIpgCwoutJWYd5NuxyCPuetULsaULZtSrmFyh7NdflEkxVtAAIAvt/n1qpEE5VRzy6Ll5KgItGy33mQ93wybkCnvgAw5tB/9CtnB1FJA+0hyFVUDYyQTuvh/mRLgx9LGQANx4gYIhzp8Dld+P6sg5D3PQdsP2jyCRMAgwnBehyFDE1JjucTX4JRAFsQW73nQ== 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=jf2UT7q+iiUtNPwi2YGw6gKPwQLYjmrvLy3aFLYNKEM=; b=XqS8whj2I1QNvWKfApF9/E1iJ8N4vGlx7+u+lvYYhYKtXpzcLtDYwyQ75pb/6gKXFoP0LO30zuVphXaoBZiRThWii9SLlFWzHldLF3m+xcHKjolV7ZU24a3pCDnHkk7WfzobmnbJaKrh9W2Uj3NDyN8KdBJnXBEnpa0dqkbMSFHmed5HlrMDPFQC/J0MdBlx5BSNa8oginm19k+Yva0Vx1xw0E8586u7XlTxmidcbECgZxvplbjos8B6UkZVbTK8BItyJnMpvRZ8WeUOPvfvLAX/2tLLpTfmDBfZ4Bilgz9HhHjX304hUBOby2+d5YaHDbREdBgil9PzEIoGJEEENg== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [PATCH v6 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Mon, 9 Dec 2024 11:39:17 +0800 Message-Id: <20241209033923.3009629-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: ba2c9c7b-d062-4a33-7910-08dd1803559b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|7053199007|38350700014; X-Microsoft-Antispam-Message-Info: 8+objy4fbM/aCF3I4OXU0JgtC80vE0mBgA1rFxlvs6aXHQ1WODdHlrrJ9b412rlUf6VOqq7e0JAsTPcrYSwclFJyRk6AgykIVIXLDoiEMIiHNPhn1L3baZ1NVUwScSD6SBUh/ICB6lCFpOvMQVzj7PXg7I3Qk8NaXzwLRfxkfUtrmD1ZNBl2fBF2mxLBf4AH+7XBVbh08sEnxIEJ/7FfLrosIjV3A3sTAfRv5498FiLRpRRoc8Zn35Aa/UgphG0kZiWA6HMELLZu1eO1HeZqkoc34hgkSXwvpGrm5BZ0PKGHunFpHwqM6S5E1bTRT3xfhXstfA22vPsUB5gaqabYAreRrP3su5F0JpzaLH/HcQPaLZ04RrVYz0IbXWFVIndHfbIOgccj/uXARulTC/oB8OhuMY0UwpFXm4CAouoYnWhaSdm88UkbIwKzmqWk7hrbF5XwzcotUExz3COPQu3BJJeWFo1RFcIk9E4CdngFLdJZmbIsrDEA20tNhyn27ydKwhekewBkOqPxMO6CykPd/MWzGUrT0vKVv4dHfjVz8X3nSbKfZmi9V8dF2HGfzrGpLnWjAA6k5mmfhLs7/G7o81IAh6sQ3M08FyLiGqDvXy4wPpI4UUPN3ihBtV3mWev5DjmjT51I3ZU5lQibkHdvl1POVOJXDRQA7HEl0mbRkyaSdQBxWMgd3doOMPUmjf3dAM0Ri+fcQoPaAqzr786P3u+R0Ah1cInFW7oE0w7WnIVzPgF1m/Pw0PnWVRd+jVh0kMr282o3ceg+V793Oid+Bgpx4u++4JYCMBHQmIhFJcQZXfoKOVzA12RB86F/5jczrZ7PohZRwNHyAVpbv76jgtlQQVsZUqp7z39uG1NmM0YGbEb/6rwJuln22vOsqUvdqdTFIKu3O2IWLssa52EJcekmp1gDLZ4O90JoeS/PmKf4ErrJmgLwT02nta+uAJCQzp4nT+1+/lwPwSnaENKwgHG5WKGx3ggUrbGIJATLz7GKnQgrIOPG+3XxGtr9DwwvnGQ3APtYONgwrXEPS+FFMv1Iz0ak/E9cRglKwO6zrvwxRsALGuE9craKlkLLEXfjhZjFAEPnz0Eg8VacCD+HMoweeDfkLS5wunKKRqM87awywtywjwAINrH9kIjVPjp7dTRuVtnLrQz67rCfSYmgxWK7t1AACRfADzkcvL6vRv6x1BPJWIpXLSqmoJAJwWYu7XO6qFTOtDj+/KjeTSqzUU/IAi2JO0Rej+00og89sHVXYfk6BYDIcM+fPuAnGjwEMN48IAw3SHbzzfdziPJCOpcfjtiC7uKOAQowF0/JAea03XhVHeUql2qIhUKfMsSw1kj3LHZqzwNBMXMv0wTmwuzg6yfyJ3sKFFHx/8X3BME= 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)(7416014)(376014)(52116014)(366016)(7053199007)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dpy+NJmOVcqqTm1AEkzcJOJlT/OeF4MJCieOMTWBXy9aYaiXvi4Gzcq6QGgSMthiJQ70agV3l8UbeHnINBei+X0bW3mDt4SM2f3QmffjCk7dstXI7UdRl5EJUFWOx5YTlxzj3JfG0k9LHPBuLNadYG33k3UNL7XvGn2D9fCTWM1z59HyxTkSBLOiXpmewuQey8SMcwFeYOD8gejzrqdx69hg2+1R99Nol7argC1eWYj9E7wsHA466jD/A+jHgL8ZANfh34r9zIoOWasecPJk4CmJ9/qYA+GSoqxMWEEThNLM8pMWP7SV5smJA2p/IeE7E3tmrZzzyoXaor3o+SVrtaRLNkF3piPOm5IzOGSM824ZBW1zGHzceJTWGQ9wn/J2BUHg5MZ9nShGq+YRIQ2i6WnafTuBdX/9uS73OJ92UXC33ri2+DoPDLnSxt5JAx3d/gjX7FVGVuiP5r4caUPTZRcmld4aX+qY6tw8ao7Ln4D08ahs8yaA0tejxtja27MjA0PQUbPbruzr3TZ5oybbu7qBbm5M3IWgKT13qt56vfd8i0OfeplDqw9CkXW8EXLj2qSls5tTjhcir0du1KYqOt6dTtCJdPpTi21Wqt/O9m7NaK+/q43vFvy4JOdnOCX2W/tYWULrn/q9HhuTYahZp6QhGI9/isMNt35Iks4qUdnTuJ7LcXlNOq54ekBJGfeIVWoXfp4998BZyeaZdGsiuL391RdNXYRHJ4yHVNJFSX7cp4VudiHpV71zFZmIyrI7rOSa+tuEgZTouPkqlX4Ja09VOdgWDyjVytKsD2umPwZahFiqHW+7XupBBqNSC+EqjRI7BaFc6KvLrNIzZMAfxvVR6lCb0+nBKcOdB4caNU0glbQxphGjDvL8bplTEiqjtwRg2R6wcVW5LIv/1F8DapHNN0Sir/WOB6slahyVNzBysUDmED8fk2s5BHKGLspnBEbTEMTf0L5kxggA0aKTBzrkM6X91tyaD2wGogmGwJoo4q3TQDRrqsyrUHYKh8Eug+GT14k30EI9xqJRMOVkhw1A96HfGfHhfG0hzBHfcqxZPVWCQVeNguj+u64htNl0M5xLD9JHtnYLRqpJ9Dsd9SRDIupMyN11qL1PdrFUxctuckIh5cM66s2xrju618FuK3YqwY7fVJf4RG59n59DplI0LXWeLTtlUcQeu/m1qXf23gBk6b09rejfpy4YfUHaZJ/+j/OESuvwdnON5vkJPxhRq8gImdIvlQPlCKQEkpKoxwb0RmXIidH7B2xVtqDpJlFHgFyugShvoO7vIrz0OLp/XL7g5e2+rcnFrOt+YgFXelOqnivxZ1fIhoHijIkmHZIRD15+gDah7MkJ8KhwKE8C+3EfsZ12NFHKv32nIK2GQPNr8WlVjNMfqbGveknHuzoFTwWDIsbloi6KFK4vmBbJQ4udWPUho5I9mHWMIbSk+AQl4Jzf+a0ZqE+at9x1NmvC9UdQL+Kc9m077X/B1Pj2xoXYT7vGGvO82hO8Yzlt3WFmB8b6vNFUya1INP/e39/EPCczOUiMCb3TqL9JFExSQ9a8YEcVJtfcJOva6qKTAwzR8xFdqMV0AqWk37LV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba2c9c7b-d062-4a33-7910-08dd1803559b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:15.9823 (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: WYoY0oPKa6Vdm34ppyC9nbjjCEVnbJWACHhrr7DJzZ8zLUotUa20mG5LC6bmcY1TFRUlARbiDmcuxHl8BRENXg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- 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 77dbb2ff906f..e12e899d10ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7695,6 +7695,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 9 03:39:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898792 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29343E77173 for ; Mon, 9 Dec 2024 03:41:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A24A10E474; Mon, 9 Dec 2024 03:41:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="Sl/9QT74"; dkim-atps=neutral Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2055.outbound.protection.outlook.com [40.107.247.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 21C9210E474 for ; Mon, 9 Dec 2024 03:41:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BlMFP6KOm/ZHdswgxn8Uh2Sq/ZFhVH9fXruEkpdLvlgyOa+g1iW+8CdnyHRSRDJrFh6/SnoxbCIQaeH70DEMRjRokOXMdmfQQPpzuHETaSooNDh0QLukHhqHjtDHLiTnOgztlOK23R5Ye0Xa/bcRsLUNO9ydU5X9rYG1tEb7u7pBwnf49Sd8RnzHXPsobf7g8CbSaoE1eZr9sjXRkMdsTc8710E1EsNe2aECqxiqYc8hMjmBpjsR5dCLsJZfuoAu0RniOQIkKAwAija8KCN7byQTakfxNNqSVHCEM4s3RFwUaXiYHV87aGZN8W3Y6cqh5/kUwgvubgDTzQlf/wCQQQ== 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=RMW39ZGp+HxIvg64bg8olQiYCojx0O0M5SZxclcteEs=; b=psOZCpPHCIhX1C2Jd1DUVQSkGrpP/0qY2e2LcYuVMQaf1Le27ElAjrabQF3K34XCt2haYpuKG3HGxUoIfCVAtk0Ek8EMBBKvQI/twxZY3m5NO9++1DJaRJM2WnF0xQCmjJUw6L71brpQ4iO2TtiVMFq0MGpdHGj0K4twL0P8gGJnn15bzHtx9bGnUNKV9M1TyubcfuV7/ROFLdaA4yS7/lPjviRM+501KZeyQ3m5Fpk3A9smhgMULxefIZfV+spmX6DCzIwgkil49WIo8JRCVX3YAOHPr8XzUCUZr9E/LMp2Wo7Gl/53uPqhVtJzDVMx4+0JQSRzTXIDV48fpbflQw== 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=RMW39ZGp+HxIvg64bg8olQiYCojx0O0M5SZxclcteEs=; b=Sl/9QT74clt+A3EmRJT0rFlQDSuawaW4jyIlXw2jjPqhwkogEugC3MyEKINcJHvzXTURKGPjBMbAtYLFjTrj0Cobz9I2q//jJHB5b3v3J73kKTrEUKE20L1VEQiS8o0UAXLcf/ECnshtAPykS0LHUvs8CaKFoM+KWxQzLxtWK2UnH/ufx+RItjTvd2M6BNzea/ttJ38VZ9kTdFh21f0fnf5iu3kiR0voJfVFCTrmKVwmKk+Yj5MJ8b6TzgXgC0IepQqC2w+oBsnRnrpNum+Q0LBEGFoPE3AHT+Rmlxo7US2KYWsLCgF5B78UpSP+/5TegTMUfWVaj25KnsgGoN5Tgw== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 14/19] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Date: Mon, 9 Dec 2024 11:39:18 +0800 Message-Id: <20241209033923.3009629-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bc64892-9ad3-4642-7125-08dd18035a2c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: dBJxsg3okXuPPpa0BOKv1YBBAocMl1KGSQMYUHL5TmFLO4U7YsoQoJjQtETtzFtdv/pKmuHHeUA5+RIb/trq7vjLJUKcIWZ3zOSAKdzbY1ZtGaF7x5lNI3t7DJQGJJL5U9NCeqeQfLmUPk15SaCQ75Ys8sKmjgkaJYaiGdWhwKficyjdY52aXnUpR9P/KnRpv3D7ifY+Idsdqp3iibbTtjaQKPacRKS3nultjHxQk+HHphgcgYgnQ5fS5CW2Uz5g2fAK832RUdnkCf8JYH976ivt6Tbhc/EDryVLcKeNEl4REIyeUmUOV4BMI2JM5MNcJQxp7tHFy3f4iDDyhd1KUlsX7uJ5vXu8wiZEIhAOjpLRa+e/DLzNiejfosdE9RjXLUHXo0zMtlJhnqgfe27HZ+8fMJVT3CoC2K2/wk9ZoPpwL1jsKxZsCpiLbkim/4Rcle9wp0Ol2Kqlr8VwV6HRu46gVjxukHtE1Piz5BjVr6UBqy9zjPqPxIImgLT55jgxP+LK0ppIMXFncVQqaVTE4Mv7pRd3+pE/uul2pWb1g4ryKBev+0V80RLoMLk2tPV1tgnqgNmYtCqJlS880u5FtN0RmLh7HxiZMFl+Ydn5gldnCmEgkJ/IuYq3+Vz9THHCYvUXbIFWQZO52H90LhDNRRwGylD9EaMDRgYPjTeZKw5OXNk67FitOKWbXImvtEhg1RPZJDfoCyQRnjYhl9PcAnL++L0XSI1ZQY6vUW/k1KDJDNmEXcaMCcrW8pFvJvD216LGPlyNOp9BfdN1AVZShpnEYe595KcrAbAJkJr0isWLb4Or4as5lZwB/fIoV3Wpnx2itZRDHmxRHtUN0isuWHVYLduwWsoPcjNhhhL4AOjuTw5x9sZ5jYBAb0P8KarOiopWKapwPhxQnE5FtIn4ktjvH89aEE7yQnhwSdaQK5lPNLZkyGCaw6bP/+0KdbkKiUYdF6zs+iPEtQ0HLsLJHjx3CLLAt0bLUytXGYsTFeJtUWd/FFy1V/hnsmHLc33d/EB1DYrkgwcMTxw1nlEB3RRmyv1979SKMyWqeQGlhDXSiYK1jITERnDgyvUfQOchZ8Py7I3HgbL4iorYoC5a9HHfgqGGAB1ct9F43j34GgLZopbIxxoCRctLxUkxoUrUpkEKe0/RICwMc2iasQe+9fkE0Iyjpz2YPtXXhw4u4lKYBYLA+iCaLR8hWG8LJO4KPfbu3Cvz/kcdM5pDtvpyNLfrc7UJGvNtsA3qu4Kz5vNYsZdwMWEdvddmoCXDaOohvjfWImGF+j/veT+NnQSUSKL6yKq1q3x6rj0j0zogb1SDjNxa8jjgzXzPy8nlU+U90oTT/oQBO28XDj9ans9XwZHxSMpg63n/PdRX/q/WG7YKIKslUFlSQ29Q9aF6ZlIxoYvbbeGznIibYiRqSPYzTg== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xEVtUWm71o/OiKc3nM9mPYtVcrkP3nIi+jy+2R8X9n6UjYJfvGgb0EuMOQX6OXPvw0+74UUM/ovRWDtYiP4w2FWXdrYsO6XJQWSEFmCoYIo1wbM2zKuOGvrhUwW8GCGCx+h3RxE4AJN68JuhROf3+b2iGe6Sl7uUNsdtfnVwTB5SnS6npKuvz1/N+f7+sVcrshaW6BNxyhNyLzjbgc7aOfvbnhzbADdcaRadpoICv/6qClfvOFjErRwjDBq7sVQa2BCuD/JK+nGvn3bmIS008YQc0kUlhwNCqNUScDtUQuRlQY9nnBm0ySu2+FRD4d++IP0Du8zqFW6b0/wxlaKvreYe01NbCeKyNMLqNw7MjEUUwTlrSDbciNfnG8IhJHe6leECFSoFqoAOKcUcCZ9vZ7JSx7k8kkX/Zl/XxTXNAelO8A8gkOm3E4wlNC5cutvGqgaLGD3gfget16LvDYjiV/UlsArQ+3eN+9w9z2WLrXpqwsCrL4FulNxxYEXLwtd5T8Eso48rP7bcPEZMNNK2v5Igaj4QRj4MtwFAx7vZHyBsjjfeAufKYZ6gdf1Pw/OI826IOcM5seR2Yx7qwutnTQojCOWKhNgidWj/eZXj2N2By+jXEz7Sxa0dZJtxt1ZudEU243o8OCr0IuaO78JiA9BBacLqzuosHm1AuJpORxVbRxyal2CqvIH0T6EhqmDGl4b+C5LoGQDvpEUrYE0p9y0I9ASPTIWh9p1wPayPVCaR0oOQq9YT6kvJl7f92p5+vxV7i53Y+K3bG9IuHH16tlGO7igtMc1XYFxUnox/rB+LD+zaFf/RIo7SdpJufMx4AgkHpuKPl7wiAvMGJlDwVU0iR1hjf7sMzyuwH/qvRD7hp8317Ro0FKtxHSmN0bRTpLjsIVP24XRYRe5uk80aGejB3B2ofd6NinEqeaJSZpXpp1Ga7Vq5qgTExPkDPtRUMuioHBzemiAhuFcxSSrD88XTnWve6SrhOOqtpoV8n0iUKCzcUndz0No4hahPj4QU7rjMdacqbiXs9+7J0AHUVXdNhoWrIlpBfaTEcri4oSAzHgQkFx0H5SDDtNz5vDWmjFWdMoJWxvUDRSImHr/mGLqnTzDZ3oV0gjuJ67UJwG48b4oV3j35HHsaj/u+H8J1QDK9HRoHdithArASFHQwbi/Lbn3+oq64Pn0XJyqZl5FCIf1phn9mXLYkIJS5TA9AzfDTnKo3MjGqh3IUzgE/Mwto6d1wj+O/zCnwpLf6nWC+6yY3wyGzy0GEdvVbTCTqzYcBQPPiYO2ZMrKp3QCI9aDGV98c/SkTXkCD2Arcz24i+ryIQXYsiICkFJ+vrr2MyvawvZjQpg4qc5sDl9ddFU1nlADvwqWYjA5MRVClgBx43TJ5rk1XBvl3BauKe2GsCOBQ8nZzLAgqgc9YGSA1NJl3d81F0wohf5VsSLBnUuSomNbgHsnjOvg0xH7vValBuv4sAWZIyGQ/Svdjz/fd6VMbc++i8DElam2GA0jc3qNEQPjLTAAUnXoq7Aexw7Ok/2GwfeO30xNUvMjw0hFJSns6QR4ZKGEWEBTqjDO0o+MlZSJ9G0fpVVHhiCDM/cY2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc64892-9ad3-4642-7125-08dd18035a2c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:23.6578 (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: 8TumBtqq9E4pSxpFdHV+SjLcih7TWqF+WFbvJHGUqrP7+1NiMdbkh62tfySXtDV8KgdMj58uQIw4BB6ne8hugA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- 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 9 03:39:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA9B9E77173 for ; Mon, 9 Dec 2024 03:41:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 721B310E472; Mon, 9 Dec 2024 03:41:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="ba08iJs2"; dkim-atps=neutral Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2050.outbound.protection.outlook.com [40.107.249.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1743410E472 for ; Mon, 9 Dec 2024 03:41:35 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hUNSPaEa5JXL2yD1J6NCTagAX5q91JpI905jkVTFYv4Ecbr0IkIJ4hmgIuHFzeEFeaa/Jzyhju9xK3nB+uNpCu0f0fXAy+AvqZbeisCuFdXOIe8KkHtbxqQK+MqD+VxIbxsdZ97kxpRjeVVaR9NCPWuf23C2dfYYGWCthoT/ANK08EGbneVholQnkr9AP8NAwxZCpJGZyHBxE9ZhXnhHrO1oLWsf8tJf+HwUB58FMjW0uUX1U3E6xq7BgIQzuqgqY0RxOVwIdbu55IqAp76sgT6L2o/lHT5DKLbNuQJOCNd82JGwZiAJ3flo/ey0/hbkM0TSfvb9d7PKrAbdQTxJag== 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=kB6bag9hdl2ny3ZXfV+swikKX3XuPVzrj8mL9TUZvBo=; b=pgzDAPh6hfCuW9lU6QmjJC+mREdd9xyOcJhOkkzX0DTiX4tpdKRsCTBLGW+JwTzEbnesFImJ9RaqyF6FYZ6Bl4VMvRrDTLgCgQqOFfWRavNsHTC4oph+zEc9bVE4ucq40UdvhN4gGqjs6ctJdxSVxUmMw4PmVUSyKazxsU40Ix8/jj7yLTLx5FRLf1Lum9tPoEWmgpL6OLHez8Bb9x/u4woJNgV2+Cq1xx4+escwg6xl5I9Cqjr9EHjdrldSGbsYM/rQ5tOF8wHIvVhnNIPTVMtFX10HtZayXRNpiqM8tFl2AypQcuSdaa8gz5c6Hf5zXDiNQBO5qLChNl4Bh1k+qQ== 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=kB6bag9hdl2ny3ZXfV+swikKX3XuPVzrj8mL9TUZvBo=; b=ba08iJs22A3ZkXU588wzHM2GqtsbTMa7XlDn/omi1Yk+GunKu7QIBMwa1a9li4F6Xmbz0wPKIKrJKpYjyr/OJWlNFur5/Tim9KOxJcoeKxuV0gIKM3PAN6mPRj/Z0KGZZjKrvMZ0IazRAro4VPY3I8Fha/0Wbq7NF8GolNzRCUqnPIq96xVjjI9hD2hfR/0Wu0K1nc6BLvS3hNzyjrgkqcAS2uaMf9gA3wbNLC4KESuoBm1hK0Y7f4RFXS/kd2n5LbjdzfkpU6WBUCFkfdh0SK8m/wyFw0HxtEpFKQ17qn//UHfN8WkDC/A9dJsePsvjUAd1huT3Lz1ESU+BejxOSg== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Mon, 9 Dec 2024 11:39:19 +0800 Message-Id: <20241209033923.3009629-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 3113169b-0b74-4f9f-896d-08dd18035efb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 10qXqT5QOziFRRdCdjQRglG9Ml9HzAU5erLNjTkNQQETICo6Wik72KhKcpi+MWtP7i5woZxA0XqosJ/KSxwmQ2MCFv5cZoBfGArN+j3dO7ZgXukc9I4VcsPbHpGMpkKPxrli9ovI9gel6gdSCudV9NJ8Hk9js9BCQQJQzkWMV0Yq+kkpBePJR6uLNzEKBernDQ46srv7BQaSSe7Kodkt4jdSUJNoQ0CwsEjPVJi0+orcqiIhslVN/yzOen7rmgbPDwbAaP+40Ik54j69USgh6HRKS9yHTjPAmf9OzUaMV5CjF1m+NP+/09Pbcr6ot4eBFpk3Ww4DE436ThSGizUsgGLgoJHk3dNdIuVFtANBcxlWe27445cSfn63C2H/xLet+tXokg6y35Jpmd8P9RTc1hJXSbFCrcE5BeqWpSrOzicv3fpXFgFIM6uygmngATE5sa8m4/+1L0YXEnGx7hHc4zUCCPO/iXfzWKR/7f506wIXhkbhp+GUWC97kIBBjeOtYlug4zp0OQX2i9N2OmEJe38fgzff0wHYbE2GoD4eJafEQ1KvBgTR4J+QVkyIzWolFiZA10zNECFyYJsQQcQUJDn8vEYv/Kqv3dj7FiE+7h2vvEDJ3vXEkk0DMcjF0Z1LuF7Xp0FJF+hIw8BPq/6E0sGlyosBYa9nyTzq/3qM/Ey1h1Nu97gM5O/cNsNLy8uHu4gHpmzIn7VFyc+xmfSLeb68nhpjK6kjqPPnIoAJUrEVfMObhkftOImaxLsPO55Xnq4niOa5GRiQ2q0FxwNapw63wLkjSy/ylS9MfHt6qFAbgBO2uE03JdHOT1VvSl4GIiG4hpKrjRebyc1amSC1eTcej9h+4Tb6SaaDfzw0PRnSvqYNYvmLb9qJ/fWLTlXdqJsAHYg+nVk/+cbm2aQUyAZBwJzP/JeF3EL0b7EzdQ+19oQBrZ1q3+U2ENwcyyK8gUOjFS3bGvtP00VGEkyLWm73ofpJwuyUoT+V4g2EUuaa6Ohx1uggTrOudIfbZCJmC3dKNlHnYov01C4eLnt6tOsuzKyPebFaq4ks6eQSXWgeesJ80piHjQi6v8oO8IRFTpdh51+3O2B4AQlP2CCsoh5CGSl+LUGAvhYnE2bx962vWAd2cUKly7j5BtcEOE5aZPvU6jf2+Q5tyqjLMa+4PjT+d84UTwi+B/1Hlhn7d1TqKkhoKSfo8ju8Kz5KTG/OZ++TVRwlv9igRR4GKzIcykwdvmQbM2+XmZrvvPEv9DDjPPSYGKWC4VogHJPZ/Qo4Fd+JXjERA59sYMHqlkKX963fj4Ko5z45Ri4KqqkcYS0gzfXYclgom9RwpJN5T3urV49hvSSiPSpDkW0vBWyM8CXU96NvdM7sI5I1OSGIMgKW4UVL5cF7NDh3YKfKAj9IBp+g86DKberCeOALzH9GeA== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1lymmnFhtwEM5eIi5Ji/LrRalpkli3yMKJDOh2to+dkNjAbNSeFIc8nnnYQVykGgMhPdssTto2BShPDFWzBHAEa6JZ/4HjjMwFsyv9PasV5RVaze7AS+o3YZqZN3MAIqwm0vgnF26uBIlUvoLQZ5EBWDV3fs63TrbuAmXqImT6lFhDyEfXte7cg03iPw9jqBHfIYHSp2w00LmzxmrMErJmLBaFHW5Ku13hu6Xg6of5RVShP5iIvLr/MwdpqbBBAp/SoJBKpR5VYtsx+6AA9CtLAE/rtCNpZagV8IGBHp/3DIb1+7MTiO5NUE65sqLbHqUWv5iTs9RL0yqiAjdhme0Q4eOCIRTdK9J53FDvQ5O2hr/E4ecClZ4RxQvwBUQYABva1KMDi8iBiintz3BIWqlITyWQuMEeTXUrC7mfdTCjRJP51TjKgd/4U81sglGJBjSoD6AUQeThGGYbOeTUaBBG5zChR15tzEc2fix8Y0jZ7ITHmdLXrasQAFRsGMQ6FFFCp/ccP8+0hJs3rSfnFyEsprAjszt67CCCnBjruZYFlmPQf4Z19upe+I4Jz8zaJc2t9gq6HsxtRTRUS7kx6NQHul9m0LI3KOZAiZiJQXW9n+wr8nwoM4CFaioNly2LmB5uVRw8CSKUN/K5OszyeW5evxd0v0b0igaBp13+cJ7JfQvex2wUL4RAGEoh3ysrI0OZc8787SXsUKc+PNjObqa0g8cSNb/QH/Z1FxQY+8XP7aJ4BWzAUmHZru8m32l8YS7MZ1s2mDjmKoToKfAvQI+IdgLm+xHAjn8eszxQsagdBXiSDppDGx3V2FwuUJnilHxE2RIXRj12VVjCKl8czTOBalPRP2lp6g/S2+Dy6uRGDD8tdDKGxV9ib4Uiw9lgpFNmRmEeSwwh5Jek4h5fU15JVKw0ZywlEEXrem3p1QioL9TQ3/+N2MJ3Myw8yT0gg56QC8DjlD1kAVYA/PD069NVbosf6RMJzlbs6Mxd6a4IuOrxy9V1uilyFZNRJXUTWifviVQXzglXCPzVTBSY6FuMuoQkRQX++tK46ef5Yy9ALZRKAdnbi/pJpojqS29tW/YaLP5rpKvDcaWQXZACm8YwhTERydCEFApwFBtT1NT6eEKu6n5jJcLmbp3YTC/SWjsvj+7lEF/2lGOVHyEQrhBXBB/fPeEwjl/T2wx0e8UIQoyszwdROpJalkQ4nCUbZy7+LGEPdLt/u7l5dUc7eegnge99tasbC4+fcs74VMnFtp6fwt7BumzXwCNfVOkHWTWHEs/Yz6TZzwigP7TxuzftlxXgd6t0eIq6Rxxo+psQPW0iKiiG43eZHnpaM1Ic88+Nqi7f1iPlwTxUGT7eEDQ4NpHaByjgkST8kQ30iFLKTmZZeVpGf1XSN4VdOvX7/FMlQPHtoZJiers/Qpn1tQfH5/x/NgXiQWN4RtrOmwAFuNVy0D4bIJJu1mGZs5jLVUrb82KdDy7DcNzljpDk9H6wS336Tjqqv/JdCOnq3W2yvvCmRAmwEQyH+NrLUWZOQb/Su99iPV+J6E1tKYEfBOMTjMeYq+zfC98TUqmMtJtw6vTLJ2SG8aMj/jOFFqihoN X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3113169b-0b74-4f9f-896d-08dd18035efb X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:31.5689 (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: C5Zr1k0SPhEyizVzMHtemGVj8vuf5C5B1eE0M+mzoq3yuWrYFNBaMsXo/eqmoeeBDTsyediZxzF4EWkys9Aj4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- 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 9 03:39:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898794 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2483E7717D for ; Mon, 9 Dec 2024 03:41:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 225B110E47A; Mon, 9 Dec 2024 03:41:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="NYZQ9bEn"; dkim-atps=neutral Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2072.outbound.protection.outlook.com [40.107.247.72]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2770110E479 for ; Mon, 9 Dec 2024 03:41:42 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KTFLagp+eV4U0xQvU00FFd1MVRmRLzTyEz+rCTnl8VdOvRRyJIDbPsNzZ+7PWUQ8OHSqzZ1IOJxkU9jIA/FoenUCIufJJxFJt3oLqvVYxuSb7hdzD3WsK5ZfXzGtlAKy+s4V0e71xMaLZQYf0BYSjMj0kcKE6C8LvO/c5XMzqmbvs+FTiTUHCQLCqBlvv9sZdO9fy5iRSw0nGB4szxfiaaLCGGLSVZitpQyXJOvH+O3cbMQxS+oBoWQQFOOPVcinHzWPPAKF8/3sBnIj5O5XsO7Ub7EMQ2mxBl2XLxQPyWcuUQPjQrXoD8Y4TdaU/jJMV3I059uhNwS5sgYk2v4N0A== 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=Jz/sEV+YUkVyCuxs8KQ59JWL1OLjk6g9Wr4xm/8IKNQ=; b=RIl+XGLBBAnmgoLiJaRIky3XAG3vIQ9gij/dLE7pABuvdSNso6M4jNfWaLaRnQhS8vixZyCBeh24H1oz9FyAF5Owucf45/TX6PTTNJUQLOqW2noFGJ1GwHDRZsSs+JQXYZ1yNXjWXHKOc6HoBr4NA0SbLXBITmiqBL6Zog0JjYFPXxqLsaUi4pi07f7EFONMuuKl5OI+IMjELEowbQvNdE0XgigG/+uzSMrFua70SCqDU9mc1K9t95JwalvnX+/imf1QSW8dCtdG3WHuyi4rD2Z2qmDQszWpQcnsAl5N8UnPubdhdAV7MV4hiX1N2hx8E4e6f7G9CC//Vzpjrb9IyA== 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=Jz/sEV+YUkVyCuxs8KQ59JWL1OLjk6g9Wr4xm/8IKNQ=; b=NYZQ9bEn+V4lCU3he9OUUuzF9oM0x6osPzYBRCyssmNtu19xziWpOahlZ2jhrL4sTAzA2NBHxAMpWwKHpWAswCq0CK+W9nJrplZyA3DBeCk+LqrEY/gCd10NNvtG8QSyz85eGhOgwNJV8MoGbWpKOHnnHqN0tS0hu1PZpdxZdOJXp8/xdWuYY4JuGb/URfYZWRHKT0KZHvmu9of1bB9wbQFqVRyf24pBNsRNcrmmp3kwfRauU5CCiN8FL3Gx+i5rKhdtIiEV1HlRdssPGxSlQX/yLYWwXTyaL2P5peezgSzpD5wEKbLXjRms3+CbsTi/B+pKOTF5geM4pPQAEKaM0Q== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 16/19] arm64: dts: imx8qxp: Add display controller subsystem Date: Mon, 9 Dec 2024 11:39:20 +0800 Message-Id: <20241209033923.3009629-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e29d2dd-1ab0-4e38-5369-08dd18036377 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 8QQa6FhqUhxNm7RR5TN0rw/QMp1KPbN/BzKY7axPTFDOnO9FksRv3s4OgLfDRhKx/Q7srwebffbp3bqNrWHRhUdhyEatreaTZ6XHUPViFGOzl19ZyIDqsVwdChZceaKxG/mDMSuwaN58seCVPDvTie61q+/oAbR54cyYA+Q2zZpAGMDemSNWfgPjKnGyYHGJTuPj/hQAkSefLWFHcP+RunFsdWzVKMlW4qTfWa3Cezs7N5WpDOMAChicBChv4WDqKQOIOAlgkfP6EetHbuWsIjS2kaB+qeqCoMWuRSU0gVZFFjx2tqv/tCl6HvB7TdyIgiuScAO4a5KbedNgSHDfyKqMlf8rHA1BBwTYVsu77MCXn1MwouZMod98kfv33yUZ7VVug8829GLhYeJPDW+geRiK5+z4Zkmdi5K7c1nBZsE2nDlYkNnvZ+U+XFgoRU+by4OeO0/rZHVQt0qewSprVoScdJZvGSRfWyObY+eFpmmB8fWQe3M30CEvU5qQFv8DtqEDgrJZvSDfiBzqOY82VwZvfKzVbHGEvky8yrFp65FObJfykH2hNziFeTypqx4OZUHS+gu7CgeDBgkNyYuq8/9QAqPg0qdY8ycCYToex0MTtE7LPYZB86y2Q/ruzV5zxHfJ+7GRTsoPt1PufswTB3Yl5BCKShRWZvB9wUKyMfVFYBVn15JL31x5kx0A1m3eIX8CrB3Z4u2NCnbTinU+i9Jcf4V1G3DHmwQSMjWEzKyrSDErvEKJskEXHkqzavtDCDEFjiFR18xHQ6O3lgTELJzN1hVGXQiMxxkmzFP0kHdyA5gyzKe67wSqwBJvWjl1fdeYI6UQNkPZhM8dfbxQXmwK8BCSGM4B7GllS8gw38o/QTu0RYk5UQftVrWq0Xuu41UNfk6CgiJ90vRlh+Z3UisCHlGHokVSLFzbfOa2Ok7ji3+wvLfD3iR+uKBfxuuDclAXenfOt8jF4Wu0W3Y2Rd+mA131CvB2xFyyRTJrkTdlcDJwnrjHEkhwcxpEGpe+YnLHF4t+1uV163bkRwl2zcWHekkKaG2dV+u7/wEtW4nnKdk+sZVo+oGCBgDlR0Hqa1FtiMQfgowxKgLMz5mEouzcy1FTtEIbzUC5S1PwpFSB02fAM/ThVV/qDZ+Ztw97JRBcqtjtF74/1O7I6zcbRXTjriPu9dOeZpvcJF+00STMjUEhOv49q6L09u3q5Rq6MKspFUtTqkv+QwUC3yBkXlZZSiU9OFDRDvM1UEBl7XaXuexlBFeQhlMp4MeZHC3pAKEp8QUx0+ua36jf4PLZ/nlIbIvdR65vQMwdWP7DgD01wFFA3aYBg82fjI1h+wm617Q5pYcRJuf0khLuYz0T6dTb3qszgW2qwsUja88otw3yLSXKBRvM4AroWZq2mmhROe4ZC2plXOud2es5DcW/dg== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tBL0vjX0oA+NmC6f8vjcqygqAd89ZVxJagDdHby8KLJUHoHlu43TTMnVYuGCqRxefPGNVRqHdcIArpp4Ns4HMqVSA2tyVH1UVi7elvs7mjr8TLMCsC07k80Tk9KF9MVCJbO4Mqji22F8u+Wd/ZVQFIl/INQxSCvR9H00W/0eoDijNVpBmUQkj6saTXGGJqBhx3JslAvPWiO+5VraUBCRAEmIkRUAt+loJcVSi6Krc4YlT15ybqH07EPNVKPHOGrL3g7i3w+x77XbBrHKdHV6uNrEVqBYDvxkfacQbBGDEbuq4ReOHPWfsg1m+43ajDUq/mcwk7bJPAZ/BdRrGp1DrCMBWq4g6W50EoSb2wSmQRhw+VgQaob65Zszr9SFyikXu3xSA7qO/UA/tvuoVV4sSC9EzhuqAKUyIaG/FE2x+z6kFZl1S0yB8Y5tZ629SmfdbZiTM6mLUAoERSY52y83L+eGIM9f69JYMMLZRul7GMoC/1MklH/yxeWfuuVVDs97bszrYnjy/7w9ApFv90flBBqBO0mdCfwhqQBmvum2HmT93YxkLZfeg8ZOQDU6Rgaoy8471MQOqP6tkPTRkfwt/PBHiRdm5GdW9jKjdHahFoBEtZ/vw1VCi4GFGCB1Kt+R+AL0v3Aapu1SRuay1nTCJivBaxxuF3kA+HGsGO5bWcbVLTwzvirA5NNED9iCcf5VJpMUoRCSk7OOKcglm4jZEUpDL6zenNE8Nk2DMAriiU480XmXHYg0WFWFi3vgUAmiRuhw/sfqzfO2DEta/cM3OBUkNu1ndDSjmxYFdXI+LmDaFF+dDY6B4R+YIf24bxY7M9mTzulfzHFx0ct0UmMPKMBFhp8eHbq2bAu7Nux5ogNCPkb6ipHbiE3OAtukb5ioX7muBnrwWIpWKJVcU7urpb/ZUePzxdEAieKU4WbwuCU9E0piZ97Xq4ooYClo9X7zyzcUZ0DnOdsdyLhE+mH0ro0MULE3ZEmCdDXP7xtem35z81NVUl5d2l8llW1JVKV9mzVs/ILt+3a1IAKzjo/F/g6UUXJz63k6DGrvrJ5DaK4o9Z2qGToTDyymUnheCJ8vs7W6zzNF306dMB5nI8Xot6whHk4s0gRwacgQRa6ab3R/1VLD0p1A2V5h3i4VpJjA3IQq98Yd9U2zvXvSrmkOjk/Ryu0+nfK8S1u8matwPWr/vxKcT+W0fpsjvwco5Tu3ldbQp9MqQmsjwHt10m4sukGjhh6hswWH7grH/kV0up3VCqrdH+VDZJz6n5vP39qwCD0HIP59edrQ+wvl9tQJda++goHwNuRRLjvk/MEgXsts7/Gianjzl9xnTg9lPErr98MLUGcgd3sxq++q4I0OCmX/jSE09VCffnj8EE40ViPGneHMa212565R78w8eZu57QzvuQ0ZSeIq4OFj9c9g1/K4el6ChN7YSJEVvqVPApkBbjYbXgbo9bJEIiCDwErYiA8feGyluB/Ml5YGT1dLUOwt3z5R4oQLLIzf6DIzqGtPJi/YTVqDJfN1ftDzSs/dFU83zeY8351HB0XJNa1tIgJCAhEdGCwLrs4B52if4HLaAj3b2xA4rVqqpKD0vXuX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e29d2dd-1ab0-4e38-5369-08dd18036377 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:39.1521 (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: EeA42lBeQZhFuC6Epjv1jTjQ69mXYRQqOsEkLj2rdZiVpahCEZW51/6QoJLRm0P2ZgMNAVhI48bgVQ6WlCaBXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- 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 | 25 +- 3 files changed, 668 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..299720d8c99e --- /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-constframe"; +}; + +&dc0_constframe1 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_constframe4 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_constframe5 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&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-engine"; +}; + +&dc0_display_engine1 { + compatible = "fsl,imx8qxp-dc-display-engine"; +}; + +&dc0_extdst0 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst1 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst4 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst5 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_fetchlayer0 { + compatible = "fsl,imx8qxp-dc-fetchlayer"; +}; + +&dc0_fetchwarp2 { + compatible = "fsl,imx8qxp-dc-fetchwarp"; +}; + +&dc0_framegen0 { + compatible = "fsl,imx8qxp-dc-framegen"; +}; + +&dc0_framegen1 { + compatible = "fsl,imx8qxp-dc-framegen"; +}; + +&dc0_intc { + compatible = "fsl,imx8qxp-dc-intc"; +}; + +&dc0_layerblend0 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend1 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend2 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend3 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&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-tcon"; +}; + +&dc0_tcon1 { + compatible = "fsl,imx8qxp-dc-tcon"; +}; + +&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..35cc82cbbcd1 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -20,6 +20,27 @@ / { #size-cells = <2>; aliases { + dc0 = &dc0; + dc0-constframe0 = &dc0_constframe0; + dc0-constframe1 = &dc0_constframe1; + dc0-constframe4 = &dc0_constframe4; + dc0-constframe5 = &dc0_constframe5; + dc0-display-engine0 = &dc0_display_engine0; + dc0-display-engine1 = &dc0_display_engine1; + dc0-extdst0 = &dc0_extdst0; + dc0-extdst1 = &dc0_extdst1; + dc0-extdst4 = &dc0_extdst4; + dc0-extdst5 = &dc0_extdst5; + dc0-fetchlayer0 = &dc0_fetchlayer0; + dc0-fetchwarp2 = &dc0_fetchwarp2; + dc0-framegen0 = &dc0_framegen0; + dc0-framegen1 = &dc0_framegen1; + dc0-layerblend0 = &dc0_layerblend0; + dc0-layerblend1 = &dc0_layerblend1; + dc0-layerblend2 = &dc0_layerblend2; + dc0-layerblend3 = &dc0_layerblend3; + dc0-tcon0 = &dc0_tcon0; + dc0-tcon1 = &dc0_tcon1; ethernet0 = &fec1; ethernet1 = &fec2; gpio0 = &lsio_gpio0; @@ -206,7 +227,7 @@ psci { method = "smc"; }; - system-controller { + scu: system-controller { compatible = "fsl,imx-scu"; mbox-names = "tx0", "rx0", @@ -323,6 +344,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 +354,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 9 03:39:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 056B7E7717D for ; Mon, 9 Dec 2024 03:41:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7903D10E475; Mon, 9 Dec 2024 03:41:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="LkbJAa4p"; dkim-atps=neutral Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2088.outbound.protection.outlook.com [40.107.247.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74B2410E475 for ; Mon, 9 Dec 2024 03:41:49 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wpU3iUKlc42z8ekQhJgRiZ+Fx3ZqSexlrzwSHhTPpV1v59ZZrG4yCpr4cUoVKsEN4r1VQ2t/VYnq/HVYUCJdMqKSdSptgjmpwbzFyavTFkqtM38uhr/xdNKCCcJUsqr/DR2dhYh0n3xrE2EyUahJYC5H/HsxMDO0+02N9w/OW7bwmxR4U7FSmBuq4QHD1O2ooeB6QyxFuP9SEpj/ZL+LVZxLIB3ziLQpQAIzELf6RtDYczzITjS+Tax4ZSU44ht9foeTj3YrInGQYUSkL5o9kgLNvXhItVI4M5tEibI+XnwU/jDNMDFX6r1X9ZXCnJ9lm6eLZzzMQxywn/w6Livqig== 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=58k2IfKjFx//cXXvoJZCjnlna5Pm4eOl61wlZswbDu0=; b=rkYr7vyOCEiRbgJYREPOr5zTKiEnCafyr5lCbrT4ZurobhfXvtpGDNPPQk8EqfdueJlxbALohKoE23A9+Hnfr7pxR3kl6quxnF5/8mSm3b/N8rfXOCf8M3Urb7iEVkn6LaxEWai1UVas2qUIQj0x5m5FwvlL5x9BCwDka7gO6+jYv53ikb5yJ/CbzAchhdL2qEf8y6shq04FSAoFegrtdcPuofGr0mj33K2mJJKtNbPCm5UPIF7AMLQkV6ycOyv/fut/gJbRd6DLrf9HdYvwSGRetEPDATiVtgVsnWmohjef/iogUdtP2V8ISGkdEYPjuVwv74Pvd6VbfZA6J7uq8Q== 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=58k2IfKjFx//cXXvoJZCjnlna5Pm4eOl61wlZswbDu0=; b=LkbJAa4p5Y8LtHHU9nbsIqCSrW4ueZaRwtq/Ugj38otzvoFIJFGUUkJVs+My/z8pWs+WAvkbKzN8m1VtdX8+d3WWNEamm4SlJHnrXw2cmrejShgQvsOHW+bYH+5wI1KFiO75oTjb5WcmpXvCyFjMApPsxPQ+7/Uxfjl3oRBvWjGU/ll1y+UAFoUXEcBixl5fPH+mTaUYEZp/lGASURZCsXKPgM68Nn7oJdHK0JsOAogK9o7T8Df7yP/OcRZQak7Tkff1aaL1Dm3es/0ZegcpZMK9dbkruf2jalr3POQs9U8yJz09en/ySOlFOZtV43UPA9c6paazmrY8MW0aw4rxtw== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Mon, 9 Dec 2024 11:39:21 +0800 Message-Id: <20241209033923.3009629-18-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 78d72ce2-54fa-4d88-df6b-08dd180367fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: UnkL4fGF85INIpxypTlz+WMI4/U9u8aCf/5Xcm6pgpbnvly+D1Vm/8fCeHgvFdcSgSkVCTZAt7R9Alu72HnqhPlw73GFtjZ97VhibrenCPGJBxaU4Z073x8dGFlc8/OVDdFNmAYPweEPxI7IjNkztEjQ6rjJrTtPZog/Twfu8MmVNVGrM/pqUCXkj3aNKkckg/dC7ycRUbcl9ll3qQfhVIGlHPvgltEPWpvlRdeLMkHhmPoRZ1Gb8LRxkkPhf82ELlDODJJzzioBSHm8MoqbxSblxmMBuJ8GgB2NvgCsqEwkk01I8QDqktAUu4VldjHJ02lRPgYXLIxTPpV4hz6T07oBeOMymIOeNHLrVew2pJMb7tCJnuyvzL3tXBSPpQdNHYtetDg1pz8rGNF6NCIlIiBuXAPyVys5fuZZMKY7Q4J4Qm/+NJWJrwJfg+QRMmJIn/FXqQXwC/P++jl84NbE8S+1Py5MZQwuHJC5lqcRH0+NxE3gBoUr2MFJNrX26nZvQCZb0Lx/HzJ2uc29RmqrZNYJT/kCCx0wOltOLLXJ97fiCSxhqD435d2JKadzf1yVP4VKAOfJ3BE372ClmRKneKDULf0iItmNAPSq0rTVgTgiH94/0vTrI4p33Bjl6Ee8QJFsADCfMgg+mPr3zVzlhpvA7HUBmUswo5W1kmNaU6ZGK2XfWqmvmd+35JAARjCTutC7dwKycxtE9KsWlBvwnIrhpz2fDWnYlTTIb7ymfE6u4Yndy+WLaIBbbg2XpRlAwNtD2UOGEjGrhU5qJ7kvfXo9x9Qo+lsUdOrouPHibW9ImMTN2UVE2P5AiDmM0kfhvfRdXqEEVh8Wa1c+M+Wl0eej83bLGsezi33uCdfCYz0HwI5kivzlHGNrbmB46AwACDPBQukcoI4rcFNEX6mfzwb1Nb7Th9mVxonoz5KlAfTy9S+XK0XqPA1DcKYPSA3y/YHw2PWC4LCB432ObN0RyTLMIR24sfbXwvyCGPSeXrbSRyGtQ7i6Bgk/vBuda/VwWWyd5xPmBRD0e8kNCZXDE1Xu7wKBZeIHvrh8oyUip4kE5QBg7EjLd8kAo0Cl04H38TmQKyugBBhlB+iG0uq7RTG6lNtxv8WE5NagNHTlby2It8Pe7SQ0DhwHjupN1pvKDPQUJtlvnYjltGg71l5ZvqlfYN8Mpgvi9d2JlAN3hcNG+FFGPmIq5AbRqqEF3nrSbmJt2TXrX9hM4wzZK4s1nuCUW1uY0sJt5ViEasotSa/kW5dmnIX/IWPftk8pc5IveKvjDi1SVnG20ErQUE5MQ4k6JvV4mrOXb1OYvFIDrlYlg5GCPGJoavTeY0xcybOExWs+aTocbEfkbublzkqWkhPhLtU5+JGGSt+LtFPcpGKIoa6IafsV3TnpRfr7bCgN7PakvBAwBob96zV+djotPw== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6hnDVQDi60aL6smCmvuWs6nw6A6e5E0EEWz+mSamRWW4Ya+mTXNUYFpYG2RMkrdfRJybJffqMksVuHEKlPS3/3B1zJ1EQyX/4S2w7MIhDg/EUrHNNgjkcBjKv7GVcGEwe+A+WNCjBfdukTDY5cCnSLvZ7Iks6nvNtL6SHnZdbaJUZ4/DRoFG/qUvFYMEkb1dt6yKdfQ+APH2KDUpikE1S/IZ07gZcJICHvHMJ363brKOH5Isp0JlDhhAMU3B4oBhwncoAbin/is+ZtJCQCcrCwoS7WuK+cVAd7znz+d3uS5UBJzJYLPd458W1uEx0ALSbuozc5H9Z3J76NFDTQF8aLxmhiwgyDi1ZsQPlL84P8H9jd1PwVh+9XxYRaGkC7CJY3d9v1m80XX8xgnFrZ1Xm0p5Ma+3VPsRu1qhWZtwXznyE8t1UKYUVmTHRckJFn4iz3KgEIy7AKtIUTHogtAXq53oKnnOosnZAtEslavtHZe7AZ0Js85CUE0cI4qIATDSpV7tSUVlrl9QPrdOQDd+cFN5J6QFhaaukWdLm0SNB4guTnym1JUy9cu8l1yU/FDaR4djS9XTrxska+ITGJ5eLBRmJ9ACD8oDLmXpMNbL8cPVPOgOyW1ARouwx9Zy8tMjTJnv4jwv92AuD07ycG7ZA3X5YsI1dPJDplYDYt85vFsAcb1G7aVtVLWBlPy+m0K7TcunFOeUeKo28FQQPtDA+I/2dw7sOaWKIQrIvmslxvAG2i1sb+0Yntm3PqXzNMUGaUEgS44RG9MQy3kHdrvbMJXCntLr88s90NQXgn49Hau7AjaOJi1NfhhCbEit6+JjUriMdcnXUia5EM7CZMpwExlMWFHVveeOQHm9M5v2rLusBRdkyoVc06j8xUfi3a6xAudZhnZOj324WBuYJDoCrpfp6Ufwr0m6xpmSJD/ThMZ7EsmcfSYWz7gg9kxi7ujVPEiQGpiH6xEhVr01ZsBb1RtRvHCQrHXo8aaS+l2lmg0WCCPaN9VFSNlsXZuBNYBfpy0xl0sPnoJof3XQeyPvz4/5ycCza9HbP1iH9MmbpRIkNSRS0rbRMtGF0Oj6aUHtcTzVFz5x7mwoEvNwv5ppiVzcLQA85sqta4UcxGu8KtzQCwdtN/KIiFTId2KxGF+vc6wYcuinZ23WMMaJArS4d7r4VBqz+sxZOybaOiB47SyFszCMqcu9JyIxAyTNrnGY5qB39NGv3VJsOiXwezBoRZLs36J62rixHmZwxsFAXzSEDiKvX/x0FpAuZ2TdWdLDnK7fd2Hv9dg6OC1mcl7DIY0wJ5ViAH0LvsfQ9hV/4qSN3cyr6lkRVZtMGuipF0yo9grL0o3GSg9xVkGrxInKJyy3okQr8cGWheKPVwubXWBME1PUIMHTqNw10kZcj1dXeybaISR89RSrecvl4ZhG/qWY0ancEfRa897ROcU5XwGxfG2Y33omhb2SiYuUi690gSrc763UVbxYGPjBcWix0WpxHuQMQeWQgEjDyREDG7f1jeCYAnHE5oPzGiSFWSDb7UVM7TrpMeP1NHATr9xitHBV9V+0khaT02YuVirH6o1XwcWU9/FEmFdN+X01MWB4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78d72ce2-54fa-4d88-df6b-08dd180367fc X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:46.7751 (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: jE15JqXs/gH66xoj1i7OyTdOcwQAP8lyEmmvJJ/YtbEq+IYqVZkt7TpLzBYzhGGfOaH4kvdqy9Kcogx/c1XNiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 299720d8c99e..94c46a20597c 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 35cc82cbbcd1..25adc1090dec 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi @@ -55,6 +55,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; @@ -355,6 +357,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 9 03:39:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898796 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BDDA9E77173 for ; Mon, 9 Dec 2024 03:41:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D3BA10E47C; Mon, 9 Dec 2024 03:41:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="nfHI+/pr"; dkim-atps=neutral Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2043.outbound.protection.outlook.com [40.107.249.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E0A610E47C for ; Mon, 9 Dec 2024 03:41:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=E82GafAHtrWEKLCnUUC5+XD4qqtoIufYZaX2YJG61U1PkkEi+1J/3dornbW40P/phf9vYyFTZ5lnUGDZTR+mgZhG+qWmY3oT9K+DvVUJRUGT62fKDkmNENZuDVJGwcxFePGaPLX7LCA5cyRktA/1FWqExsXAWysZn9iXHDalbtkVc8TyXx3fjyMSR3hpSQ9LC+/DmHBPhHLwtkaDEyhyO9a5uvDKNRjsfrUTo2PsZ8kBHMKQT1h1u3Pcv1BmHNideEov7CSQSjnuPDPrSrYeUdQfPZdSn+SILpPesITd1Nm1hGGOOPaPjlYTcjER1hbTmOe1YtkFARHrqlw0qfPNGg== 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=rgia5aQI5wH4ef0uSKDaectWOyE6PJ/NhEeq+pN5wcU=; b=DSHlP/PPtJTrRDgbgLBjopWlSKDDkE6wosxy/khv/4tcY9zz+QioDs3L70C+47S1K6StvGFeu27/ohC9HL9n4cI/km2EkvHWQBvin3sKN819ce6tQESNqd/Xm/5hSGec77spU/wTFiasnyjfT8A1S9gW9pvsQdAagmdlFGVkUW142jPYSNI/2ToeMaMuvJy25CKdqXJX+iJ34k+JyfZPW5Zqp9oN+sdTWnRQqc2b/hXIQjXJLZHfdLnTprij7C6bstQ19wqTJ/wwEMrHUfaiOlarT1D+D/ynvkKbJilyAuBtkZVR7PPkq3uInIEcgMBflM7Fi1v57+gfp9uPjNwCcQ== 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=rgia5aQI5wH4ef0uSKDaectWOyE6PJ/NhEeq+pN5wcU=; b=nfHI+/pra+zgNHsG1HAYp2buwjxomdLKpAkMz/H4c3CVTSsd++aSdONsv79Uj6zSrOZrK1fqOxVpXMSGYLHPwAJxuIj99Aev4bbJ2NeRPoBU0lbkhP2L8GPWfKJLqLNI3ksY58t8qT4oCRwJm+rZczm/F5vE7jkZoNLtc9N4JWtavOgGEpZW5OLPJ9VBUrMD+RJORH7SNvUPcUGN1eTZfInLzvY8p1WKQ+vTToMNuiHskOeZbUSGkArpolN0myOAK1xz42tM+iw54l8/Y4lwfGyQC6RL8w7kXIwo4X9k30oPMLvL5BI7YNSWSt1mtDgdLunTYSxYrS1lY826WFkjbg== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:41: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:41: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 18/19] arm64: dts: imx8qxp-mek: Enable display controller Date: Mon, 9 Dec 2024 11:39:22 +0800 Message-Id: <20241209033923.3009629-19-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 2cf9fcf1-b8b5-4c58-dcb6-08dd18036ca1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: a7iCtrh2v0ZPkuaOt2wpninWgf27H6MerRlts8/5tkRyqZYw9f1M527uKBB9YWlwTA9WBLx5Ud84IpPVf5oM+IxIA4yHzlmUPrqFw9uVoopsD2wc8SMTTbKuXfNzrT6Dy7i8MAYoysZ1kFNBW+IraeIxmW9DSvpMhBOBozmLdT9NBPEnsbRfmH36BhZY+eqyt0/8qMznzpgprCy8ihADL/wrl7BUaUhbIpQv3OFwZ66ae+YLJxrGXMe9j5HQbS+seR6tSl6xcVPTcBttSP0tlvnCtCDRJVxVASdd1tUuPUSV8XqS6HFvNFUVBBlDgT4iuCbqhPy8P1KftXoUkJb8OgSz7YypNrTQ0idhRh0JwezxRwW4yNg+2koQO/cfRTdOcOHe4a5VQxdD3ZIpuWsfsmOm2J1znRhNdDRVLg7u4tuoECqxabfckqWHHgGzP9PL9d55lT6oOaX4OAV9T9B/C8AJ4b84JFDP8K3vf/A93suMGhzwwPBiy5Ino6QhQffRejbsGF7VYCbZIrab6c4v8Uk31ZDnW6xsQ0AnoeGA7r3w8y4qaN7HUOprhswOWTydgo0TTJsO3FTWGEVEhIejLRp79yVQ+4DQGbFZYZGmSSP0hDYowQdAmzsc7hkcdVpzYuVui+2vTMe/3Q65+1Uyza9jtriRIq3Pvg0hk/1aHAoYucNin/0VPko++TlN2pnzl1CASnjpyt7vWhHVBUEf+qhlGe+pxtg3j5lVeVPI0AA9CLbQHWmBFjsgLgZ/Olj1vsRa6GtjkyN2LmtEr76myCz7ALAO4LBlopL7H6rdcWIHwVGXe7pH1zp2nCQeF/Ivifqhult15X4yifDr4xk7goPlKHeTZSKQC2KeA4bBR1Rf0g5LKaaJkD6aGnhHxK8U8m2+UszEvLYN1w1th1bSqjZXQ50YeKduxfHyhGyaRVL73NjYbMb/aExcpMk+sgI+/TRYWn39eJXFXz+kZK+Z4UrNh3/Ih6p63ayakhELFeelvOUn2VN+KbepB7P/XEK2blGQAKdq1XufD3k2WrsD4n4utLXTytN7h+tRV1ppJrNJeoeTbxBpEBqwOJDnxE607+WDhJVHBROF2QXIyiTozZani+s9GCPdBLPxD221XVT0npE9GM749K3ju6u/itz4yrdLLbcW1gDn3r6nm0+fh42dyfiAf4q7sX9SR675pqy4ykfsDQxeBjQJPYkeLvGKUOB4rV27V3MQ220sGAvwYeuBKNVmOHVXlfAsvmtSYJH/auyE6y0Fec5JsQ8v8oBZqOL70EsdOMg4xG7ObQf24ntMFPc150wHeNT3hdnh5q2g9GAnCi0KJlUrwCbfEYy694EjJNZ7gGfOjRRxsm/IZRUd+F0yu3lVruPHCNlmSxPJULFKfNI31/U0CMz+HiUY91p+h34oPB7EKonbxVpQwQ== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rdm8w36hzdhg++eeP+lZITEX+OQJQpfk7YlOE/oR5e5vUv/x3WIwwJ9eXUbk9QuEYHRlmEQPP2EHqCqx5p+hCoJprn62r30fb1brtGqqbfn1oXyw5N9jgO1ZfMvVXqBWPBG6G1rfLJ3e0M++CIXlIMWMgKLHXwVCJdMiKfNMBuF0qFDgWUBrn0tRpih+rZje0pUBG+eaqUXGdvTaaXnKaQSqcrpJg52nThuZ0utDSN3U+13s7SJcXDk45abHxIB4a1Yibo/iDjm9rkU7AA2kMMHKmx1zU57Z/KkfL9fmloQfH6Gt4Ob3LHoOnqfvS8RdTHicLomCx2GWfg5MQr/qLcrj9SkBfgyWQv+axuCCHiQqjalrnmpQEVPfb5cDb1PhiNdQmgtPEJGfeUrKUngxGN7EVL21kXVw81Ccm3NsZm5zmhFVZr3OVmO3Jt9kKnYWXeBAUFjRtqmpT0OikxB4DG7uYVfOQVvajcuqztMV0TKm3YxcdSH4DOv7fxhrl0uZGr/PoYyi6sQwBk5kbVodnpqplo3KvsYS1Wr83+pYJlK3QQtiEQJCcWot7ye4h3jP83rUnfAmTgqPxjYhcBX4dNe7YkBG04rE5M/r06abj86hHI+Qd1orjWuRMEy/b2XAuI3vsTlomYb8E4i4sg5svGto5HKHbWULvmNwqQjERz+D0JidxwzSr/dJFAxFtgINuHDClQfcpK8JQOUAauWcQQ1wti3SXvQXouGhsUVHbgMhCzXOhcaEexoJLnuh86+Jtq13NeXH7ZkelC78TAXvj9U7VxkH8/2Rq+1wJd4Z8WcPY5IQULRm9rEwOFXxpIaLAkL81vf0nGJbqm02QO0vGjHqUNTYVtmZ/5R5hHHQ16I2F8X4Md+dVQBH0afgMlTDPUGMGqhotT6YOXn72absOk4L3E5fYr+hncqD693c6F5ke3nG6IspKyVYtvEi0oJsQmDDW/HipWsHUKdT+CtobQbvvth+HGEORMMe2KBjRnPf8RuREt4Q9Y+B/6yPvHZEeYeaajpfNIvJHzqC2wIfTlON2keaPcsDVvmNhu/Z17CKGRH81bzA16mNj6x8H9zFHIdbkq227uR+NbHyyzHqlFyJnmojNpS6M3rzKiV6fwPx/ueFkOhpwpjgUJKtwrxchOzvdOHJAnNAF0hWRaW5nvfZZ+esJdwxQS1wStqgZzzumTZV5GX532+DAZv21w8PofB0sD/35NLhF3jaHGpyGVvQ6TC8fqkTh082NWjkxZa/mF50HqK9LqKstNL6dMwwz1yKSUM8AIoXaFIXWfZh27szpr9XnA2+k9W3lFf+AZEkkX6MAS4mf38d4dcN4ZQhwUCZKgovxvrcy+729ejPJZuzLHzSyqcqgl0gTS3IBXPyu9fnpyIVZxL3An6jnqxTg6ZMuDyUfg8HGqIk2IpaNZGWRFz7A2y7TShzHrfr0KvElFJ+lqSBeLad2gK8LVaxX1Q9T2aXA4alv6pFmizfjOv93syPSE9ooPho+ICaK1W3SzjUJq49pZyeWky0W+cnZzl4/nWACug9a71GK75KU0Ee2WedZt+0OZOTxmba+c9Ery8xbUpOIWO36GVIUOAo X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2cf9fcf1-b8b5-4c58-dcb6-08dd18036ca1 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:41:54.6089 (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: EQWLApvlAh+lRqN+1Vz6mMbXtFMn0KwT8HS9cCMHK0n6Ja8aBkvMZ0x35JSPe/jRyR4KHbIYOKDrs5oHcjr7Gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enable display controller for i.MX8qxp MEK. Signed-off-by: Liu Ying --- 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 9 03:39:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13898797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B166BE77173 for ; Mon, 9 Dec 2024 03:42:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3116F10E479; Mon, 9 Dec 2024 03:42:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="kB6jAg42"; dkim-atps=neutral Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2042.outbound.protection.outlook.com [40.107.249.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA80D10E479 for ; Mon, 9 Dec 2024 03:42:04 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nk1SXELkIo1oMjXo0WtkAqMm/ovgifL/920LILHFkI/z3HO4DeRAsWLaoD8dIB+F5xCLWmYc+CfQZOmlKkuY/l1vAcArMRAPKXO0c1SQxaBPb7r6cksoNMj82BVRWbto+Dzpshgf4KJBYFuK3r4VTspkrg1ndMd2X1jN4iilyFXnHCaQSOR9O25/MCxqLfv/7T2VJM6Vras0tpdjbVGlOaRXhE010qivr2fFf2gXVko/fpQKG+HpDc+66xyJuioCDR1aLw9NijOx8Xr8T7qQIWA4m0DgT53zNAGmJCjLbfDk8o1YBN+kpHF/NpTyN6I65QhywTeGO9bkSuPI2P3rSw== 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=K950ozANv5TmVw6Rfr+icFPUPDmhdyaY5OogI5ZGRt8=; b=At+G6rcOWQONQrspnrFwYJ1d/+9lPvYtgYqT7N+DCrRt8Y0rkVJCIVf1oyWshXAH/kahFxxmi8BXNSzNBfHZAvOLhUJNbA2hgXPQXJi9eHf8Wvviwlc5oHU45CdLm/gpZ8cnViLapd7Su4+svMZ5mKyHbmkuYyp3VKxvpLlJUGBkaOQq8LC+3Qe6xkWs5lIBf21uIOCLD/BrM0Hs/hk1VN1D0pTpzZJtaOTV6kQH3B+g+S+9DQYLzUewja9sZfrrC8q1f4PpSefM7VTNFm/aZ00BCjXHF60vYDLZerLLlwFe3l/Jot9zafHaBDTkRdXjHqbAcXYYGbjv46qwSOTdbw== 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=K950ozANv5TmVw6Rfr+icFPUPDmhdyaY5OogI5ZGRt8=; b=kB6jAg42qYjIE0hSyO1d4sq02ceN+5TGABfi47zP6tsYST8u1nlzDj2XZKiAeHccJYpl/By/Uh6kpIsNTWw/3CoArNh+hj6lk58onLDWQqYDsywMlFtHQZyAYTNvADI8DG/jDHDCcGERUnzH5njhWtsPrSAlmQdaauXbobzZIIqRymFQmqyUK8JPyCohnhUwlOiRQbUXyRSMrVspVsLukmBaIUnW7jQlLzeDX/giWWRg3fZ7MkHvWxXA3mBMxakwBcXK+By/47pN7djH8ScFhejxl+m51OvAzqjX0l+3dPEKpq0Cd12nGe3O/KReE/TZVORtoT8TuXOsQfqCPeSVtQ== 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 PA4PR04MB9438.eurprd04.prod.outlook.com (2603:10a6:102:2aa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 9 Dec 2024 03:42: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%6]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 03:42: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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, 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, francesco@dolcini.it, frank.li@nxp.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@baylibre.com Subject: [DO NOT MERGE PATCH v6 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Mon, 9 Dec 2024 11:39:23 +0800 Message-Id: <20241209033923.3009629-20-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241209033923.3009629-1-victor.liu@nxp.com> References: <20241209033923.3009629-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9438:EE_ X-MS-Office365-Filtering-Correlation-Id: 58343e10-0cb0-4c12-968b-08dd18037139 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: RZ4Tbu2Zwg4o7/klKRD830gc9YiyTQEIhaOUSnBT2cbKHScjdUoTAgeEawQ2/qbc9tacrEDlRCOeAz5yBICh/HKwPBnGvmVnD6Zq9LWKo85wJB5C6NRq6C3N9UhwXOOlJ3G5TEslcazb4Y1pjUe4fnwhBvd+HL9VGmkecsI01C/ew9gBXidQXIg1zVrUpZFq9tpNTmi92nIcn39ek9RWLUW5n/9MgP5EQ2FlS+RAmjCg8fAmLb2cASSpVp4n4/Z4Kw26fI3OxHVxcAsObgp5FydsZ/ujZRH7/m7OMNV6LFP9FltMvFZ43SCTJ16Nd4XnlHRoLWng83ZMcoEuCWHcEDpyKHvrp3OGW+x7e6P3R34kus6hpGtqLjqAbmBbX+N6mWcusu8D+4KilZdr9YiJmnGPVj4lsCF9/Z/WGcEVaSCpBlqDS4PMZ0TEQ8UhSlGFDEozepF6IV9QLo9vRhWbmtnCYoCp+T9/4aLP8os0toZiQfVq4c0RaYhUAbVJK1DEZt19or+2guHp2OorWd5JkWsNLfJRFQyAM/eWiOFyrBxkrbIn1d7QqNTCOj6SCkgXZmj1ZvhhHWINK51x8aFRLxh3j+GOlSpjcM3Od21oMEH8/1sq/CKE28FPqkADQNLWGpEQ2a6qXUIr2pQ4nfy91wWpaXU1gTl7mFKNryleFS8wgYZuhoKMcd9iF3nLfun0KNWd45PgiiyTXoq93ZkkCBWcTClNB850FHcPZyN2ymNjz0XJ11NUbh1hFPsWpMK4+npZ0UxXLgyvVleM2Jpx6cwAi6f24QVbO6qJY8AUkzlI22h2Dx7KkKmbZl1go5tFbANsNRDNcpyBRV0Dht3ibtFggqCeZIKHHhnSGFViWvl7ywcs79x7n9/EdvBqHgFTrocOXFx4UL8+JAxP/WJQCLGY9s2f4jP8o36ev05Q3zXSGDOYkgIn8klX7zU01MfmPaXHguPTDCUaBsIAznPsYjEpbYcNh1AkMTZSb6eGuRqg6zu09QiSe4k+I8Lv71sjf6eWTsOCKxcTArrIiTtcnbZZYmtTveiRX18Jd5wBQPHyInFwvsTQkbC3Gg4pL6VEJ19+jsXM0iFd6q56hwf5thRo8kXLrDY+lhUrEnsjOat7A39nDWY9v3zXvbHEaulEsVvIh3rkxNoTBoek3ET0EPtY5AkoHCj8xv6x0yEa+HDuz+Ck1co1FMFL/sCwaPagrJbuNtkUvfx7u1hxxGpb0Z2sAdOD7NY6PeYZ3gwo9ByFu7R21iRlxlBI/10aFj5AYIuCWsDDd3Sv9C/aFgejy7WBG4mUO+AK9YcMDZEums6rOeVnFwitIqbOo7K8dXRC2d0XJQk45ixkFHSaHqjAioRk1NoKfDOPd9TBhVVLLWkL0RAipCKPnAFiR71UbfE0NfNGRdOp4Ys6xRkPp8BNKw== 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)(7416014)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rvdiFu9W8R4Y9+BiVE3IrWgH9Zlnc4m4yP7c5XKyE10gK5tf6k6+J5mEPB/X6eaQoxM6Q4JnA3mgd/9wj/M48ovpsPrmV8muZIhYIFafZAlSw0hmWKcKNsDujuuQZy49gOhseJ0dn2w9X8yWV8ddWZN4UzVpdzpEXwCwHGkMXsFcMaA9iYq/lktk9II8gJ8GInDR+7LiKKm5wOyVnBm9k7iYjEu3Gtqzg+Ku6QRlvRK1fyomaw+GwBwJa5PG8p9FSkmu9rn2BkXRZ7FPySFGAcHv+Bq/1FE7JH8jnW80+XJz4VIx71dXpRXzP29sFBkeGdTE8Edj7EWdJoWOmXb3SUzGI3chUOYh2xLuLV5pGA4OHysng0RLkDNLhVm5AnBDYUPYcr58zKie4Z8G8czltk876EXBgUtlL8FJGSzpey4ZN24tRW2kcGRZAz+ohHg+50B7xpC4r/O+sMMFZy9y4HK9QFYGw+E45nGbAoRHMAKuOA7tWKc4r4qAuUyRkareLH0GvnjNrtbm9p5W2tf4BepahWN4zcc2zcb8LZRSlWGHoZGksETBE7Z6r9+jgTElbsm2xawbgX9P67B1M3psmc56eGk0Ep2MEnGEtPE12z6kEYU3TKYgJtU8dW1sUntZchWdJaoRW7Oy+Sb3RGDA8DxW3G9SpuvlAfDh0fFMh1510WaXKls2LGIcphLnBSXn4mEdSLojNzsqK3PAtkeQ+u9Gsjw1yxVtl0x+sw0Il7nXevIuJzvmFI4cXpc4xeuyIgIaFc9DXoBc1tYY7qvSnG7MjvZGuYIvXwR8fLCrMzpfM7+rLp3lHkbiNodyDmRRQPnuBr6FAOaywLfPF94vX4f2k7vOJsDpTgvZJlE5dARY2grqEwIya6vcgVlDvEx1GSwZs/KXHr3in0phzvZbN/kOsYUMjAnYsyfypPzlDXy8FDqK7IyduNLj2ctAdBMX7CrfWX29jatyHRlvfPI5ez8bYec1nkQmSxVQoHJe0iw+GSv46pf0J1Hxs4YdJaTdJ7Mql3YfTYQ+1buAZ6u+iFlN9cL2dcbBrxi6Rw2XlW0eV8N91Zwbk+vKEMrLdEOKPCT2YhS/umxheUpid/WbTXmI1WRiGQWAO17E+zUGCMnVqp4l1hLJ5msQAIHGIphSQXPZUL9dUluQMgR7e8VTzdscDEg93ZjOd/DKi6vXWTmEqlGxJ3ACNPkXpsE7WSo/4Q8GuKMVTMcGeL2uA3JjxeR5Qt4Ay1zWn2xNAOaqv4WT5vTUSvyqCqlEe2PaLs91b5lnlhrcS20swAM02ZX+jgXoGdcJNVOH7/AOSwjojPyW/Df47fZRIkBh4GCxuJY0bMTeaDrw3xSKOcu6ZE8iWCwitXD3reL+luZjymer9bfTjaOKAfcrYUZLNqzFfbzNl4Z3k+NzQBhIZ2ak73DkkPStFxznip66NM+vU1GiSPFLjLjvt6q457JNy+nzTQBsniL6A3kyWWNVjXLrwLx9XV5b69/GKoAiNy397GRm74Ys49jypiD5TKfC0GfAXN1eCYIUz2Cv44QqwqRlAjvP7bv5y1ac94Vvuu3lZIL2iyvPn2dODLSjcngduLIeLaXp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58343e10-0cb0-4c12-968b-08dd18037139 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 03:42:02.2661 (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: z3G8lHgyHvm8wmgRN0eyz2Ib02u/qQ+W9OHTUB10CVctNeN/EUjBIEdBGoHUdmsSqkzVx7uflXp5RJ/w57tHig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9438 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 42e6482a31cb..a22476e81cc7 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -254,6 +254,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