From patchwork Mon Dec 2 02:56: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: 13889862 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2070.outbound.protection.outlook.com [40.107.247.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCCDC2C859 for ; Mon, 2 Dec 2024 02:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108201; cv=fail; b=WG0TRlDdyxw1kH8tCVahbTmi81rRXcQfWknugZWBI6NdrjUP8KzK2DQHhZE4Ms501udntNGtHL9X9skwG/JMEttmksxuuVLQzNR73bZjU5P/S48fGRaujf3Zx4xTW5VasdU1BcxXAUxE8MqBAN0W9Sbvb5GJYXvXN9wRzC9JsgI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108201; c=relaxed/simple; bh=rbllVsO6UvhIhMJYdJxyq3F6atb88lQJ6/4jF0ABYUQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=khWCrsstzBIbYrBk7kTdj8VBne72jXYEFSAGDNS/McAg/n9H+L57o7rKSLn1mb2zRfyEOfaUN6hVtbjg2mxFY6X5HW+uq4owJaYfNVOp1CZeIcIVHDRU9YtXSdBZMohLpiev5/qIBEQHZi9NhtvFikPRzsgro0YYs930Fn2ZozI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=CA1r/5ZW; arc=fail smtp.client-ip=40.107.247.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="CA1r/5ZW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mwwprfxJCSqjTkG2ALqJSY8VONDZzTx5qdQvy64lygDDBbZzxp4V/H27lcIDbVQhnLK5/kemmo1/zSJ8o/1Ip1z1KKIBVSO0yQrAuxsvm+NP7s8V06xeccdUrXikOPI96bNMs6pG5W5Evn85dIzDed0EFEBC2caDxlUxtw8G5rcDTHHMejm+rQlhHy10uqA2rha/5h4opL08PklLjeCvu7l9luoDQqBnCHSeS/L44kj0z9v4+v2h04lpQYO+ZRAeZIL+yxZtdlW98RZidkG1RwFJGcsGy/M7fVjOVPz8HFKB04VVG9O43UkADrezZKy8NCykTeBVE1Gm95PtkKIOfg== 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=2Wruif7Paf9JYIcP0c9bIsiPZiesCYMP2EqKOQazKTA=; b=VaFLAk05uQswyfKMmg2i5lOJo0UWOd8xltzNijm/641o8rQxqMO980jXWqpbAeuYjv96k5lD9/BEUfhDcuBGodBUc7cNH2WTTVFgYtxWX/Vwk5+L4p8gj4a+LXRQAF7FzhX9ziYZxNOrOsVLM3RmKzmSRPPNcpy+h7Taj/ab0nMAFHNFFiXMcwniQdMtbqTsV8fmyO74wgTuoWP3EawPwxw6z+tgaXQG5b2CE33OEPG59tqrHgbib+Vb/m1uLLgJtxTTJhUehYQfbxT5RTr43o557XLnhDJoICN7sVMSRJERxvwDuGzW8Vq5+iqW1bvVYQrTE0LQD0iLEQ7utucZuw== 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=2Wruif7Paf9JYIcP0c9bIsiPZiesCYMP2EqKOQazKTA=; b=CA1r/5ZWbeVF3KirFWzXaE3zYArnmTL4aCQjSacdB4H5/T8Ip0Ta+/xpwnaHU9BFyZqR5JyqTzpXK7153iflxM+r9HOZJ7cezZnS3jy0lUJFiDjBUFOBjQr0Dae/GNGylkeA05xwCfAXHwSko9IG9fLPT7mBwBTsFF1oKgfOxsPaFWx9o1MaTU7ep0o4wevIYIrdLIfytiRyhBNgxNu/UijU+/FormL96fa71isl7+qAtCEI55TCuuGlupqbBigb2Z5qn0SEn5beBBlM4NX725SnuT+nnoTB2nUT9Z1EukjxiZC6ke3yqztuRm2wopZ/8E5DUiseYPHbyEDtMeulBQ== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:56:34 +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.8207.017; Mon, 2 Dec 2024 02:56:33 +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, glx@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 v5 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Date: Mon, 2 Dec 2024 10:56:17 +0800 Message-Id: <20241202025635.1274467-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: b77b9706-d7f3-428c-a5f8-08dd127cee11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: HCZHBd7dmXZCJPvzZNgvuBcCbuH0YwL0JdGawkSjW6PTxgTK4JZ9/5124pGsmNZEym2Z3HZ45Ucuz6+xKQWSFTLqGGSNTMI0zBMlFy5/RkDxRONT5Etw5iEvGq9Ha+jL4xYNGM6ownXCyLl5FvcxYxq7UTORsy7H3vQMH1JvwquJuRVJd6azXPOYW8LqTgTYHCifjDoD17gNd2toYhQYaF8af5ylDuQW+bUUzxcUE6EySTyj6dIzB9JQa+9ELCUYqj61z4EkghCiXsPuWnK9zi3X58s0Fz1HWMiEjGkVUQHRZCMXDxt4l0IZMNSufpn3vR90Z6j++nUU94DrHUu2S6OFxCVy9tbtH+8N7lOvp656PWyWWc556DSC5aJ5nuSmISZB7pm6HwL34Ds9//s2KdFtQWxyikVjZWlqaeXwX4FUkd7nC0/QHzV4FGbClk4VVFAEr4F3WUDALLzMiCAODf/YkkbD/PrCp7SkTA+VjDAWNKsjwPH9SRBx5pqxzwBH70Peq80fr30fXCf/AUug5xtr07O3Y/zltM2YaUOIeI1YXPFfvQmHIr8CdJqP5CxH5f+TdW6rd27IkDNhAso5dhidikAP+DVL4sXzaEpx8jGQghsxho8cU7Zst060EV1VAC8HvWi96igha87G6yI5bU2R18xvPwec7UkyQt73sgqb4B2P+DEXnhCqPvAG4xKE0srzaE4qtBo0bnLPZc+orB19BtrkacPwk0NlpduOttV3P/J4N+5u1axrHVqflXUYabYA9JD2M6VYHKGSOzZXkhfNr1qUeFEYAPjALCZolzDUx2RBAJbIdHXGfAh69XmJFg+aNP2Nudq7ef+EZJpV1f7t/3lmLBCaeVY4CTOi0qup32j+LHBbMITsNTN8J3L/DrFk5Gr5mPdqtM2YEXkZTYaf2t2j1ACB9ibmpcn+BdsoULl96c07RKfG6hRO4kn2QuHQZe9i5MyAbfPo/W8NcxHA786NH1Xzsl/7oH5N3oIAO6QB46Mv6XyxBzmt1GiJTb43z2saZ/bMKp5s12P3yOcuAPTvmB/n/Okor69bqA0z1H+FKABIzEKAppwb8uCmtPFdVpN265hm0Pm0dEMVP5gufSS9QL0OgGw9cW6Y3pNu/tvB4i4023vKDEGO1tius4Msb1jzVsEeYGSY1oUkT/JtxbPw6CHqOmQcU1QtJuOxcdshtAsZBcBLsMPH8tfzB51OosRjiLZbc/MtmFFjyVriOEDuWRmktn9kTDYamgqWssn8F7KWdcUphRhIEndt/zhRJ+E6X5GVCtLBJ1KBud9EZH+1T1mNFxBOOITd6dxdFKVSp26r5K3DSCY9jfOjfr+/6jDQ66sgNsrAqC3hmWugr2NtV1arQtpG7YE1pds= 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9rE/xcM3e6ZGNpRMShK/bbR/a7bzQCNEJwDaw5uF46DnP6C23VJW8O+JUrBITz+JcEhztGF3rIjd0KZDw2+TdcOnRZcizuhoG/FknwAzPC//rUT5ovM9qZ/np9a0e5cbFF9MKsAvgKndjJ1LkYoCsOfotK6tGOO9/XJE31gqjglHiLM/hMtB6Dqn0v4wvaKApEN2xzudODJ8nuAZ5eqyXVTnpF6gTjCRqasYoy/S91IrlYuFNQKY7g3PaWjg7o+p1reResylGzbSA2AOMY0Cpt4P5hUqqsYQ9TDHbY2VGDE4HwTUczYLWZaI3/Ar66yHwYPjTsawJEac3fbsyEJ9LnJt5e0QM9U6AkYLo/aPIwCF/sHFOGTycpJP5WQ29phG5AV+EUJtquDclUVeSFl4o+xu6i6ywZYtVeHxIHdkel2OVaQ+IgmyYGgUl0fLv/kHNY2+b52TiPr0q2qpC2gyvrG0PQaYKIWjpGcBtKhaNhwlnF+CHITaGzh09lpM2mVTfK87eKKrX/EW+wVQ583WimskIqHvDh5e6sVjSvT9tJCW6Uj4umsDnK1J6jLcMt5XwDsvan/I/72VjS3MrxHbpU6l9hcfZaQPb2ktm3x1uiEbSANMfpKwYKCLptZipKqRyoxLQJhGby8MFKVmhjHz1vGRVj2B+2ZolnnLZ8VezFbhZSOp++PGgJHMmnQOhCu2l/eZIc1seP/TrChyGboAytGgZpLMLnkWX6VC3+8FrO5e+Ik7ckbcFpbPAT8jh0Q5ICheHYXKlNUUMNtMwY0dxQh5CukTsx1Do33qd2YrfbJb1Q+PRJyYQAkH086lcnHD/Wbx6yZ4kHAaLP7HyMlOADPRvEsK/lVj3q4B3E8+3TllgMM49tN3m6P3Mr96U8aBimwdZcQpJHCiUHNJo58dTDRj+A4BDfD1jyWziK0er+XEEW612tzxFhw2X8teFshQQBOmDDplSPWzPJnIKXewD11Owo7reeNpj2iublJWJ8u6Vin3ouCA/0jGAkAdKx50omO1ttxkRfbrHXpP7b+Le09OmxvrPKRI2sjkkxp1I0kqS6OSp7jpyqleRgEGe/pEl+Ryrdq+wpIL4pBGpE4rT5elVg+8HcWhibn9LpVjduHx40W9X+O1rUnqFPvX3BoQbnBlDvOekaJ0VE5EpbGzUy/tiuweepXtKv/K3V1mwj4XbViKrSt6wMnziag17zMSnuqFtaWHaRG3hkkGTeXPqJQi9lm2iTURcDz5f8mzgvu+96NxvcK4KuVKoXu1RebcvrPZyh3HDhB++83r90IQyG0lb8xe260mMIIXwE8Bc1DuA3Z+Y1mINgxYUyU5oDLxNfZdVOD2eTsLsQOBKa23wppcnOyvlduillvu0lHhlCoSDBrk19paxuXwPmoagMgD43VKqSNRHl9HVrdIxueMQjZOzWetoN+8o3VQBMy2H3OfKP8g7xo70Ku4bIUENGwI7X/PkluvqX70ApZ7rpkfvBrcZya4WbBGQ94m8cNNj/mDNaG54TtEHG4aWH73QfPBAQq1xYTCp+tYxQx9a7wsVoaH9QNLRLw6lSJKy6cjbwmKoDXgX/Qwc1BLCAvn498t X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b77b9706-d7f3-428c-a5f8-08dd127cee11 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:56:33.9056 (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: QragDu6eCL3CQsDIdOIBJzlTqSUWvD5BRmjVsc96JUskriOcS2QY5lVQyMfEEfR0vrYp24HscqIA60Z2g2M9dA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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 2 02:56: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: 13889863 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2052.outbound.protection.outlook.com [40.107.241.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8E652BAEF for ; Mon, 2 Dec 2024 02:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108206; cv=fail; b=UbBeLLKu5BsyISXqCt6M4xLkkkWfJwqyRoeFE71zIWAFlc48jW6xEBa0pCaZpP3Dgaeqo/gtvkISPcO+n8nTUUw6VdOcEmO9E3SiyeKEWnXI77/WIH+4N9UKA8Ly4E+StiCPlDYgGk3g0N5JWsGI09bPxTKw14OhcMMIYyz3d2Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108206; c=relaxed/simple; bh=U9UHmw9eYCLFJK0Zf8Zn35Yp4yCighlv2Nuve0wOpNs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=AXf68Hl6cxY80ax4Y4Ft7GRI+9qhAA2fGTvsHyxmg+5LI9GrFPHxT8cb1AdGMFalSmGQ6WpI5nCYRn+LgrF5BsGPEDAkifOn2wFI7oQx6US9GLbsuLsZztmTJYpDFaYcIKs+guICjEaaPODPXl33VjaDmJS1/3rYubBxvCqXOzE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=b8+8jj+M; arc=fail smtp.client-ip=40.107.241.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="b8+8jj+M" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sHMVEhQAFoDNgsFh+03ymhjnVjnjx/GAHklVB1n0/14AvUGzk92xrxELvXQUfp/yJEUMbUKxVgpvnCrNxX29T8klQOU/QyrKRk/BANhUy7hIzVzFWORbxR6WQhwKevQIjte6knPj+EMXwfHr9hsRuaVghC7KdjTqJ0rt5+4WPx75c7z8cIyHhTGvEeXZCzajmlArOCqMAzpMf3+ltXpoixGNr2I9DRmJ5+Ioid9GNRaM8ajY5ylvRwPnOCY6+lcCPrNXGZdPgqSBFatBzWH1337VYz7bwMjfo4vGCJ7NLE5C+7JHQFuoy5ZJ1d3i/t7GjoeAawigKtI/z5hTCPKfSA== 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=v8rdLYlsISRXjMhXguHypg1GnRFtRZ5/eKFl3surBVM=; b=bLFWW/2r4ugUcq7K2T75oEqw0awyqxT5oTKPZwNUXskAKxYDruypPe1cTabVeKgW08nbeD3tGRmGgZPBZvvpVkmo6sBBqiBdOEtUu4J0BeQJGnDWnyK67Hr2hSacMsJoJLnIuetARzLlF/eKAn9TmdjnojAlVXmA6MR/E6nPXxY8sSnFctmJc0OiX0on7MYy1FeMITzcYinKoNWoZaWoA3VVVt9jMOAK2GLNVwAUcZ3gIGwRPkLl3rwcaJ5jr/Zqn53gqRKoMrm6X6DKFQTqhPeseGWQcd+UfUQ4h9uaujTO0eUi2DK8yKtRWtxTtjjKRQE44mcnxGh4JGIS7M4vaQ== 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=v8rdLYlsISRXjMhXguHypg1GnRFtRZ5/eKFl3surBVM=; b=b8+8jj+MNSSIcV4UIn4yn+40BNKX7H3w3V6tvtYls8uPoI/HEOgGsNLXef0eoG3VBlNFRPdIUBGNy/Z2sLjTYvTNykw4zEY/d2exugOXhtPgPYqQ/O9dFoFD9yRCp+4gZM1uiEKYH8+e+Ec9pTtZ3KqRTNBeM3uFDixIlk1RGzG7OkjWu/PldIDO6lymt9H9guYoP/nyfgasgclKL5sgBp3pSGhputydewYYmsj+5VD0P6Ej5cojTiwN3g0z4lSK6R2JEXLTArFvy/9fCD9pggd6nu/Um98Y3wQlyK0C6Oimkou4zG1WbmJ7Mpr1dOSQ6GbUBKwdJqg4Od0Gts3Z2g== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:56:41 +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.8207.017; Mon, 2 Dec 2024 02:56:41 +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, glx@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 v5 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Date: Mon, 2 Dec 2024 10:56:18 +0800 Message-Id: <20241202025635.1274467-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 58c0f405-c214-4173-466b-08dd127cf2a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: KDmNJd5d4UifPicWVGBOPZK5mkZu16tNPYLMUtdjmoGbiGWqfQhqR5ogLTZX9I+Pvd9aoq9lnrIebWeXYGlZ50KNuOc0PfOuaw8oIf1s91nhhZ4W0mOy4ttPhl97FZ9cd6cY03Yifx9uFeQPo8JxbkzflMGhl5VxZOt+7218gHOEbezLBhGEnvgjVNL5wvDgoKiGjsHVd9HO03qFCIKgl6nvPrKeQ7QzDEc++7SuMvnPngg6AyiEph5g8VFKNf8lgN1SMikw8Smq9zzpnKjmdb0a4GvWZWFNrVx3XnwEtyeUqjYnCob6IiSW0gx/pLObOXbozuA50eXqMeuRod+zO7VB5pofCpHYIFRwNxwLi8Pe70s3WQaizTsZTzyBm7XCd2uSzzRk4BeNEjBio01Ll9o/81PGs0qpKyvBUbO+xfKpxSiEXBtOyPje6DPlmxDIF7rMAFeR4rtNBNGZTcpD094Eaetef8Rd53pY/prCWMixpreYaMMg2MvjsroXYVKx7NQoqpbyNhkDrsW5/sQOaq+daqFO2otQCzyGgn7xmSv+5w38S+4Z7f7wYAmigNV6U4JAcDozHMAja0j3HH/4w6v8lGctXyFQU6VYFx/mtsaF5nJ0Dwav1OsqcVUECT9fcIwDE9I0uiaGO3jtAIZgCjTUccJQtWBTQac59yegw2S01SIf1/fDGAnMFP/sQ+KpGiQRc8442cvWvU3VBqe+aNqgcX5iHq9PgeE5vTIvbGRuVGHsrVlodID8xdgfw7wnhV8WIT57ykD2m8d1U9kSVvDtf2KGYB+RYk2E7ODVPd4YzNcRnvhzKwYLNcsL3jKYTLAokoKvUSoWmZvEy+RfHq1nJs8IBccGylnm9M+a/UX3779kiEo0nhrc5qPrcYNCfQMziZrXxUFsuB69j/VR/nuLpYPTIL+WplGLOmCLQkZjUZDYyd1xWf9HPHuwZq2ETqoBXphiNRYzLvaQBGeU1uFa5hyQ2PLdSkXRy3TUxTg2/lJ0CUWSqjhvBpCn4IOV/AZWJPOqcwL2RGbVNEYvRCye1S7XVG4iGu/o6zdoPSIbx0QlwwiuT9hg4BWKVaMyG14q2ExxQOyFnnnJxK597rv4ZMgkrcWdrNMTI1CB7kNaZF+n4xqIGXIZ2N2P3MXUT2VmZin+dlwRempCfe2ptjmBhWD2rkQsZtfLiVEGHl0z6GnqogemLw3gyqHHwcq58XhGVu4MpuxvKZYfCoadroTDBA8RfynuZDFvtpvpwe4AnEoOAMRprPej3RJNxfCd+p0kBnAGDQBU80awHjwey9qrOlSXbKur35rRvYSDwu6SxwROGFYJoKaIFjd7LihCd0SrUbjLuxREFOnh+fRMGw== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lHhk52u9985XobOK06zAt45noMuw2XyZGBptDCU+RhKtq/cR3Lnh7laWme8hGVozr7D7HMUgA8LK+QGHU+hMp63o3mldtl9zj0L6Y9FCK7bMODjoWBJ6SKmcpRmTFmDCD10u4RV6Xj7HcEdXWmU8WgrHf2LOk+HuHNuHC4ELS4TO7dRLdvhoyAT1AdgSJw30TAVeIMx7KRkzB/Kth29OO/o6aTHzjwkcNK0UNPlbJWGoQTs4PJBDXr5EqhCcHDAe2puja5FkXaXSzRxE1HJQfFEQcAAr4Fv8/BvNIboWUQ44aaWGvyPK54rBLC37mGHRk+gu2kPSefrZ6ccxCJIEWXNKxmS/UXGYIbngYQKman29SDY1xzG1oXX35onLm5LK5LtujYP+3m3sDeH8BtjKj7QLi6x/8b/ia+k8x8FCfbbqXBEUd7D1iATKPz0Y4nLEWyGaTBYRTPep4jRUIBJn9QejNpcC3IR2HJgfDhCnr/58OW5n5En3S7OeMPXAhOiMmiEWw3HVlTjDDQOxfSs86caoSuvhagfXztCUJMNLs0i352jnf5a3ApxKxg+95Ht0FFfOX8R2GSlDuErvJ8D/AGG5eoDT39NE82FyIEKIXN/iv4TAmNKg+55nffiSnn28GA5MvX50SN5aqClDMbxzbGyv3+qLIsXaZSyzSNQfjmEShIvlvkN6+fS80q+xP1Ve+LjUHQ0X2ies5J29Tfzbl79gL/QFmkGWkzVuMlMua+P1StvCx6NGLNttgWUUuU1SsAwyt9EwjRtaoq//LF5eqyljgjtGBInapq2vZ7wXI+oxfEtSgEShQmkEjHYRCBChqoJLOFbit6qBGFidPtTpRCfCOy6S4MQ5jX3eQG1p4WlJUmT4iiMLD+HhlfckH+CKiUvhBoFK81EhTPYGFirKboGXsAkJTjncz7m3YRLZqW8Iayc6mq8RgzQCXNWeTfHYDZJuMXchDFC8c0L3YRdTDSlN+MYX+gsFdrCxi8eB98Ujvij+f+vf5EwI+AExeqHYDDFdmd9ErcOIUtwIltDoaPTJLzU+2HpwoQqnn/efB0LZ3CKiFhL6oLSk4Ld+tsuTyYj3C2sniTUAjJwLeu2fX7loBoN6TmV1SFNQoR/f3FeKPpFUYgcWMLGg24lxaDoMJFh/isaqw3Jyy6A/T2H3pUf0ShVEyAJmjoX092zM9iGFu8mZqNo2prVCPKtdU7hq79GCCVPIFPTwLNl6Q3fnAMF0V50FpAfLOVEq0vm03qaPLv8EpfmiENa3fAQ6uSYiSH4KBoYzlze72MSSRF86kgZa4AZt/1nGrg5uIkM2yueVeaHy9n9pKWoadGUSmuTEH2werPN4NSNhkQ4sCs0nngD0Y9tvEpI3TC3vaBgJI1YIcdXE/PHbXM8lQs5M+e7v6JHJakmO9raUk5NkrMv+TioO6nbnKqooiexNexd7MrEAJNA2WC23VhTUP3QjCTCMPBFNlNaZyMRE+Wy0gYO5yVDT/j6XqfKXciz5CaDaeup7U/D+N7SQXgxIABEmhxzhBlzTiBQpIeNbE+9GW1O4uiAn0r68gQiOXbeg5qs6PxJYCv3DQuPC/m1/pON31SAJ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58c0f405-c214-4173-466b-08dd127cf2a9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:56:41.4893 (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: UYLnsJ7CeMPMfDrwEKilYXzC+IWE0KYBiCvUthwjcCmlZmSfCLriVMUKdwz1KfdXaiGUnB6InnH9bovyAJUJgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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) --- 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 2 02:56: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: 13889864 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2063.outbound.protection.outlook.com [40.107.241.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB1DA55E53 for ; Mon, 2 Dec 2024 02:56:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108214; cv=fail; b=AQxBHlCD63hJqbpRYrb4Oji7/ABbyDyzqnkvEUQdnHf4IREEh3XRDyUkl2I0d280Qz3jG6B3mpHCModZJudLdxUwjWPOzcNaQUgrRMFpcR2FVdVslI6TCpD4glG5pxqDoBJwkw86A5il4Z4rJbrvVCezM7JbQzl1pJ56/JQeDFI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108214; c=relaxed/simple; bh=XzeYdZ6LGKhygzCparlUZt1hPPQLGgAFWv2aW/UIZd8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mj69H7CrakcrfN/3+LurDp9ea0GIk4yJYsuSJoYVmbyjMJYN4LBeEPaT/c8Wyoiw2Kh3e8I9r5XeSiCF26XU1oux4NQiZs75C1KlQnL9MgsIDA0McnUTmTH6BO2BUaC40SN00m378+yi5n092Y5fMR8n2SohCJ3TqRrAC/t0vQs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=IKlAFV5m; arc=fail smtp.client-ip=40.107.241.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="IKlAFV5m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wZ5up46Fp6qykg9nmB9b2NKe5xR+a+Mg/LjDpbKCG9oXY3L9mSDNZ+St5xr7yxegwU0YIyetWi9b6ymmH/xbmbLzkKiqeDlmnEd6cQS2nDOYu0SYLPo4ufy0Fa9W3wf9gPm+/7SyH0/47rJDx1pjnlZDhOeVPdEPyFG5I9Y3kSf5YEN8u+BMs37vOgZK/7sTAsnelMEw57Znuo6Rh+/XP64QgqAHuBGPtAe/x4XMXJ1d+rdlP/549F9jefusn/Het2Ka1jpSKv2MpUbwg56SeuUm5zGj/UQhPEJk1HdfYc9ivFOETN508bCCSdLqXpK92xpDJul9jsT5s8KQ+ka4SA== 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=G6ur9MuDHAI2yqJbWamXsTVjJFMl2CJnelbodQN5X6Q=; b=JFd21ceZICaUtKAjhh+ZI7NqgR1xoKcBWr04BD3An0lZCSSoI+Jg//592oCton+J21pGqAhSPBrU67NNeYCD9deraqasuzReY4/Ms3Ne0oQeMchVVHZl1JzzUlW9Fra+eUAaXprTjx1K21NC40dJjVmeweXrWps/Ry2BLlIRw76ZKIVPNl7mxOed5U6zkPxbB6B0G48I+lbTuJwutzRIPT/CqG8avUWYMxgFrsB+b02j3Cs2+LicVtRAzQKYHQaDsx7ZKkQDQyyJeBUKnTmf2VsFghH1vuqxEvSSnRWK4kqu0XhDE5HS5QZ1SLlbkJmGlI69m6ooxNsRDzCSZnHNng== 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=G6ur9MuDHAI2yqJbWamXsTVjJFMl2CJnelbodQN5X6Q=; b=IKlAFV5mudi6mmPv4DNHT0/4tjjNhu7Moq5DvT2YxdB5zZus/x/eXg7NzWoMBSph80vvvSWEJKBpOS50WMEuarouZAfvz8gKLZPL26GfGP3Yy8HbQ4AxoZi56bdv6EvIHuQtigekfKTv3/0cHPhyujLR2hQl1zKmYzzzl1uO7i3nGNPjKkw3apHBk2wP1/G7ExEXfxmjcGjAkpjPy0L6G4AfQa07y1CaQ5pIagUPZmyzQaL1LWUqNanR3wdKlmRG2Ss5rWjSxyj2CqRl2VxBFx3ApZhLs8UFCMetRym1geNdXixU509OVHBOcip8y/KRF3dbfKGZEwN1lm7sfrpQ5Q== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:56:49 +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.8207.017; Mon, 2 Dec 2024 02:56:49 +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, glx@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 v5 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Mon, 2 Dec 2024 10:56:19 +0800 Message-Id: <20241202025635.1274467-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: a6398cd9-1f6f-4868-9aef-08dd127cf728 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: qWlRqgQV1lRJEGvq5a18qn+yS+ZKRxkZNNg9KZfLQ+uxdZSQ8GD43e6W5dGw9rqRz4eNjM4nW0RF1LIBWOsm311fPQ8Wn1anFWhFjfUKUq4uztpfF/FmkG8vF7iXj8NdZ5hD8ZgoY8Wa40c7lKRygubkhla/YKmGQR1KoHx9/kaYw99WLAn28g2fzQ+zCjQmx6nUtPx8TAWYFKmJ0KufBOqej9I7nKaVZbSEi+2B8A00ORGo3WUlP9RB5Zej9VwJCozF++BW+LT3baTEBmdjc0vORyt5ISiP4dCTbsQtyCmUR8iYFOpfg5WZodt1Aoz6P5+mYXtxcet1ZZnsCIxvLYV727LJNB2E/2ZDqz63mnBJh0eYAkvzIKX8WSilmFHaX3B3N+nlm80phLacQm7ZWQd9r6+ICUJFRIvY8i1P/FvbwILxraNdqyPUy57JKXicMHK8Rd/zK9u7RvTpBox5bGm60iHfpHL+L4ibTVQmei7rUL90ICI0Q2MMAMef/4MnBGTzl0zt6ktfmISu3jsA87D/QOb4o9D19LoIpz+SLcHUMtJG1PpH1oXMHU3xyXb166G4ca7gtYeeWpoRKfmPu1qeidCJvvgBzOGtVHtfsAuHaAplKgHdVZvXRfFP+z9qyALVowqWrFLONPhM200aFHPb/PzJvTQS9ANY2xyYm+zrfAic+76tq8gtSv5M1P8nwF3wzHWW7Tik6bKtPKNqwy8evUqVvS2NPZ3aMJJ3UDqg398LpFXePIq+eRxS+VbVG6POkM4V8d95pRXeoJQxr013W9tLUbn9+pAQ9tfjXlpLtk8GLiUa2INSJTN26ykMLyIgvSnsCgbB+DLoyEPG0wNnGVIgOOmPrfoelmgXBHVaNGDDbfFYitB2u4auMG77AOM8eZ2tZjYqLVuOh6KIxWL+o3dPOg7heOgJ6BJfcL2DYU/0njvEVoBXc70BBMbcB4a1FMhzkqtGr/eSY8AvUXY34TdaTxwVFPme3/DNxgyjh0aK5aXvJhcJ1DXZWBmeLYvESflBEILxHgB2VrLk0soOhNaCqbldfWDFx4WGKns7+Ur110OJElLGJrFa2sdXdtGHbxXwgSziz5Z5oPqaB+qAqXF2p44LQcuCLeI3PsSKWE1EQVQmkgu2OGymhRGgDfG7h3W9cWbjgpsJ/NZ2Ks93W0Thw98Js+O7+iL3iocmx/Do0Nv6MK9vp6swH7CsM76mBUzGSO2x8bkD4NiWQSOmety3Qnd4F2bPhxayawkX3bRfv2ySK/AMyuKyqRYg+Ql7wi6p780EvNAlqw5PYJ1/0Ezjgai/j3VIHjS7w/ShHdohKuZVCUm1Elxert6UBUv1QaXTHe/lSc+DKb4sz5WNO2SZnX1t85bQHXf9leM= 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7N70rgEg4HgDm0FTtF7oWjf/6uVlHC6pNpBBQYnKpXe+YhqkCTzph6znrY3NQ5Wa/pOSLHbrabNcCkKvshmjx9V/b72Q6ZwuinCsaz6i7zv5LBm88Zyv62a/DtaRpI212ne+Cg30TEP/LzFHKUkcpVrWCnpdKZxUV34fEYA/yB9NhTze8ufznowUtHFLLtKo8Jdj9Cev/4H3hwcYzUZ21L9o7NP2ECbJjhTl98jLaDoxGkfgTGgLJ6Fl7g8usCA+PnpCeYFLNBXbSelztn8e8Z5plc4bMnb72wD773K2kG4AFX3uTGnfgVgysHehDC/sJS1y0OjPyU9RtH5cpXJ8Q6C8Ph/HKpvpTSsQYUSo4pPKb8nl3rKXK5pYMMBCF028H56G0OZt1KkYjqyGBX6FHE/9PAaPreYVhrkFC7dYzqCDcjBo6lCZ49PrBkc5CGrZ9LiQ3zKIaxcGsUJgaahemCWs9C7bQaBD2Qb+fgO1+rNSiQTUH5kjlciub8oz0bwXKZOPzTugnB8xH3t6zBKnkyLguWMGxgUSadDbWwS/pNHhJOYKbSKzPrQ/HxGQ7ZU8g24aFXeyFciLbCBUxoUQ9rGY+RzxUXMvVXIL06FH69aALlg0nDQhVhZaCTN7odacyVepX+wPMZXDaHbFaQGtKy8lUU8hi/wVV1G1IF/vpdPYMgPQE5sgjR0trPSPEZBN9lYGOEzV4mkiHpELVihsarVAO+aZ1QcruD1v+BEsw94ZO8J2iYC7Eydfwp3CMudl2O8g8O7spIer8SKp0ZPBFaLo1JuWQDaDK9pIGuLvlK0aKYcHVJ4tG+W44GX0xo66vXD3O5uj3dPKg9YkXSbV3PY9FM8pxYBM4+DCeiIeRe/82GWas3KBPiCep+iM+OrQRdUC+7ogi5ySmSta+eqpX43eP0gc4l1w2t+QKxe/shOqzt4mw76z8FJJbiU/ygtNUjuc2qIxPb/m0eZ3FUweB/aKIfs/Vuj5wEp/irozOKF0MTZTGHw6qQWBSYIs3Fttl3ibB+Ka4sJi9d/eX7VOBNOsJof0OzdgVtZa1fCQiHJ13ORoWvIKX2KbmtXHpDDYnCk2fzluIu0dXm/2wvzaNUHOGGfcOQT7/NVzCMJmrYvL+pI69qtgmqtockJoUwW1zR4eKYdBQH9elmmM1RN280SCvmWuAmTuD8LwRWY+GSGhaIk+yy0MLijNRv++Np/crdtSny2zTpdGMJ2tZGxgVJcb5XOnFUqBMuKa3XTt/UpaTWyrqahoqyR7bhFbwtbPNjaro1Lp/024lFSceeLIOj68Tqy6veNnEBhWLQJOunY8w3uqj0yQV8B3Lz4Hsgpd0yyD+/WjsjnPwxoGuQ9CeqO8KmQnYPla6YGlRP0rJmsywxeREe3sC8KFcMXl3UUzw6lKrqghOCn3IVIOgWNDk8wbCyr2p3SHtOl3XLI57Rw2+FoyW0eTIu9gt57x77i+8bS0J4WySwRSzMWSVfHnSk5ZzGrhi4fDc/zFCE9HmwzHH+HOJgxdKAzZQ+TIhhxu9adqOKMFzmRkiSylMivEkXnHaBAuJcbWqDYc75jWEnE2Cv7Cu6ohtPEH/meplc4p X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6398cd9-1f6f-4868-9aef-08dd127cf728 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:56:49.0255 (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: eKejvK3gfi11iBpgbj/WaJK9nx6w8hV7YT+sGhdaFLgh9YL6vERbTvp83yqjrVciaNSxVxY21aPYKJYqAyuGCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying --- 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 2 02:56: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: 13889865 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2082.outbound.protection.outlook.com [40.107.247.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82D0D6A009 for ; Mon, 2 Dec 2024 02:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108221; cv=fail; b=eB5BZZB7txRo0EjYtx33YeuG86x4+wlLWQeTRljpi+zdkRX+uHmESlqwGtN5joYi/iNErGGqh+3T8gw5VUL56xcfcCkVq2rZ0it2EPn209LVrwnZrLztG85ALtJvctkbk1caEE/kBvY5D7tUnYAxPhXfE6lSowrr9pkmeVv4Jm4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108221; c=relaxed/simple; bh=jlaNc/wdCaOjd2Q+ij5UD1uwAUoFaRxcBdKIXyCO6dY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=K171Zsjtvm1mCynjATjZ2gOTWJPOr8EOMdJJh0/pMbujh9S3xn+64goUf9LloJm+1ihZw7w3KcQ+sBPj5wGlsHSGbK06qFbHl/2gJwSbkZjxN1QwiwZm1jbpk6qvL0StvZeFW3mgWSzLnWIezSpDk5H4ADE1m+YTKiZHW1ZuznQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ADYQHERi; arc=fail smtp.client-ip=40.107.247.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ADYQHERi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Iv/9RlpR07dKra8lZsWZksmpzdRtBf01xJV62cwv/wnecNZ1dhm33HF5twd/djlXdJ7xxBj2nzsMMi35ZTr8524KLg86/zGusj/V7uksv6NmL1WAt+82qgJULxorOZK7ScPUaFYqh9XJ6KJr2zq2NdGsAshhB1eGMkPhQmoww6hrZWzP0BHZs+0s7suB5NeVILoacB662J+KTQCbKHTiUBHrX0PhOJ9nwtVLQHtxvKkQF/njOvWpnTknJZqi5mpNBaKmVz7JevfxvgxIppNXS/vW5nPkpF83IgwntVCauexT31UnbQOZargCXc5113ovcAgE4QbdMgi2W06ltQCBiw== 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=lJLZuqEpwGyJh68XLzZb2awk1HoOYnEkTq7StmG7oVM=; b=TT36cC/r1QZ3v165Cv5A3X+pPTAVtbXeryH9C85A+nmQEvg6cuXS8UPAvpRGXp0USG9x8WXxH6v4h4ro3PBKijexe058l3Q1GK9DgbcGSIkfLdKV5nVyoCYK5yyD8feb2yiortpt8w11lxfW5/jDDKoH/nWvELfS+0lbMtJ/Go44s6ANqv+bmWgSZ1wXHYPU2I3EXncmCr/rehdNU4yjnbAcFbZwynXca5JGzNJwx89/wSUkGDFU9uX5uigcPKqkfHXuS0PL8mhLMUaOaLm6ntJWjMk7Wa99AlBktBQjywzpBgExhTG2KzGsxRm3v03KqQXhzlZ4ph/cgbvkfpAGXQ== 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=lJLZuqEpwGyJh68XLzZb2awk1HoOYnEkTq7StmG7oVM=; b=ADYQHERiKIjZkpJyaoIgqI7KDpGFXp87kxcMGYnYf9E5Ke1La9wndUQFKbcSdOfzyJfcDMu7jqXeqe0ETdrkXcCkd38L2AR9stqTQn9zZ661vtGIt1yTu/lO5Fa1w9nuy+F5Tj32YSVJ6FwvNPZFnt7Jj2OLvOjDjj9+0xa1702s0XtlDAahG8j6IFZx1GdlDOZDEIdr8n8SpwXeNqjzOcThctevy4hQ0Cb1wLHfeHRjE5sZktmfFxg3hZNjucbbPmCT/bmCYgZq8s7JOUu7XRe7PiQUDAKwqeadFrn5wOkJY9FXPng0jj5fVHgDPugRUPhnRNev/aibcL4ECL3DUQ== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:56:56 +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.8207.017; Mon, 2 Dec 2024 02:56:56 +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, glx@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 v5 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 2 Dec 2024 10:56:20 +0800 Message-Id: <20241202025635.1274467-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: aade7124-13b0-4665-7111-08dd127cfbaf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: P6WbJ38/kv5uPbAH5293dvJjQHFzKxPB55HrwepWM9a1dsrsxgE32zThhcJO+qzF230DKXVVA9wfZMK6z5W8M/f9HT4JEstL2G0VgtY5Rcous6lMf5ULNwO2HQwOH1Af/3/6S03R8nIHsj9mzjoGrAHjpemPLOURKsxqimif6aV4dLiexvbAHcyK/R1qE/hkEelKzigSBhivbts+Bjx5GynLqk0TefrqD0Wqkfdthb2V/o6tksRPZCD5vTs4ZftPlW92au8Y4Lh66ZzJxaKJO/v+B911D4t+2N60xExjXy2f85rXFOkiviqVmcYaEqR6DiHwymjug9KxCap8tQxp+ujLOYcPDZrN60o2qCBfqPRR5aGwdqD9JBHkAdINk2fO0zgkFSJO2Yl/9Gkyb8fT8r4FKaDnYRN9Bd6mKqqYRvKNJHVz9bMR1/UYI30iEeRRvBPIxaBfp6LgzU48AC2bZw02h0o6/0bBAbfhPeahsDS3bIbo6ia44J2ZfMVijq8RcuMVPidIa+Ye3Paf4+Y9uhjRyMj7gLo403bNfUGopGBQv++ErR6xgtTFxY5sguHvpCErjJOCOPTCopbQXdQ/LqfvRKRSYfnytU4m+G++UCzjSn7eBptCDVhpsZZUMZ9zyONJ9MYGXQXPBo7dK/CvPne75AZ55J5SvwzK2ONja1W4h9CP9rVtOK4bLwRKyk4xSVu4Oyp9zpx/BnVWGpLZ4D/qAt+yo1aLEqJL1bW1tQ+EqC+iEVTJ+HFSKEII0ClHO5mJgkNsiKiCM+x+9GoQIbynXkQmhESyWB2ppEIaeuvYlTAFhcKOz5drJmv2aEmDqmtAJh1Zbb8r6PoYToz9t8CgQ7ljIrMUNiuxFGMd8e3Yrm2AIN/TbRrpimSCXxOpPv18kKLxaL/Mobscm/NVTTtBu3xHkIPgGrSto39MyS+7dCrxEEL8jgs+TYiYUtt0cF6VhsQKO/cgeIcyJgFr1o5St7tZ6eX4M2b0upVtcDw0P44yHUqA2TNCl6/d9z+s3mTXCChmfDfsL8i4BwmkZVquN0l/JPYQtMBTqrkemC0Kxnvquj4V9mxALPo26ELW2T6z2+bk2KnnpUeZMl8GdKx7SEj6l/iCMFlmuHK6l65R8z6qamWC6Z+yJ+OT9uTBy1t4TvjOJwkLlT+i+ehHwqUDnZSpL36VicNS+QrathrLY2pmgD+xhkdgp/dO8G2eI2V+VuSn6fnH8jAu3hjI4KBAhyw+Q63CfDgbmT8kLbmwJ07qP5Gl5e7coJrMgjIX9w1L2viRB/RnR75Ml30T9Zdgv0qMgv2fLX2TkAufIVtLzP9LBN6id5a6VjLkZbu0k2Y72YhDsWg+S1A0Px+3GA== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4l18le09FyCW6OMtOSJUT2aiRAQQ4OSYxGy4byfYxknGawmw5kuAI8rnYQCGTFKv4XPs7YYmMuVnnEgW2Fq6eGXqM/ZnGPnv0gCUDr+2sKmvzppe79uPXKxUdedVYGJe0DZa+O+C8LgAgwmhhJ3Z6ghESm/PwpcttvV/5A8iaEbJ5Clk7oDnYmDlYKx37POSLkM8piCMU5f/bSeCRWsO9YanZDRJ9s2TK2BgpGEx1i9DN9gbCp5t2KH7z4sXN5XyGtIYbiL/OY0I4UuygSyB+0+WaE80TPK02/sTgaO7rt+5MSdZhobk7s6465XOvuGYVyx/H7xv5khC/YM+xT4NVTosOZpd1nX5gnxk7zz0KqxyhC980uQ80c+dKrlRNlw7cE+gcZx5EzqIukYUVJK6jHNYqZryaK9Y+FwXqv8AwHholIOL5wcV0G2PHTyX8qP3rk6iJCxdiCqWxaKWtBQipmPAZDRHY24es+cIvE0kbC9gs3hlg6nkOy2/BwLtyovVzp5kOwPVQ0ptpFLwcmJCudN4xl0CcN3pkD/Gv9f48dZgWGYH9vg8bU3KkxgZGV3WeZUqEd2vuPDBC4gnl9RiFYSG6C/wefFl1ZEauqhzkgW2OkyfUyl/qWcwPo0v2CQmqKJcV0BP7a+SPpdSyrec0dkrxXr7EbqZeE3n1UqVhuBZu7k5UxK0+Uu1tgqZRvroeQqT2iCbMGQPUuuLwyKeb+2Jn6rUwIk3H2Z9ABM7tBrzCpzSnobdN8EmxPPYuT0xGBlYlmJ/F1iclfMBrH1aFSG4CQAuSD8lwIjW59HBTeg2CVjnU3JCPOPoG/51JSmXsfOaFC2T5xGmJhl9PxYEqSCVivZH4P9oXhFFYtO2zPZrByFECLS0W5Gx8k6pBPLopVhq2p1E8KkUw9B4A4A2E4EvMvQYWfbPZQZraLwcE62/Qi+HGnhk6AjVzbsZ1cHCDxzdE48/GT4ACATXetIcMyUOgD7fMTCknxCB5T+qvkDKxhtVH9xOLLtFeia9/6sRKyKapAkJzsraheNHRPy0cZYGykS4UxljcV2pXuKkG58uNVxAjLSesZhByEHutyz7eBvN0+M/HJQiHUlr/hj/ldIFcvVz/IaZA403tJGlaeR/+4Ks71nTLMwFQ2bGBy4355RyuWvpc/Umdp4MJVwCyubVZx5jCjNbHKhMbsPQWhwcmBxU6TyHZuUPo8DpQNgoMMoRVrf+19xNSom5nDAbY5BKtunGi8C3f9hETjGFG9bDxBMWZihzuJqkDCDLDpjiFXUww3u9rSd32ATvNdtvHEZ+E0jQc5NNpUKKdgwvy5OBSzCngKyQQhYbJuKjGVkyamdKBLaMDtzEIcUFn4Dnf7IUbUaalB1LIZth+boSgrW4rHwDrbmIj7M7r1w4Jrx49WyIw7fnYk9qG1p7c9yqT/Ufdo3Tuk+MIwlASEk85et8fnXPuUJP0/RcEuQJQ722vKMrilBIa7JlYWE1ySIHgH2K8zbKYpugcBjewsOSDPlOGHDLIHPm8FwQjb0Lxu73ahFZ/g+8ZllWb4ttRZzB7OqTQfdmHHolL3DjB8gKI4za6vwXPBT/jwVE/tEXGNzZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: aade7124-13b0-4665-7111-08dd127cfbaf X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:56:56.6118 (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: Dx6CQzWrLL8uuw4cXHmd9QhSWIIqnkg0JPbBvC2UZwgUtqMasXEG+QNyrl8vrMTbuh0xicKIAg7z3Ic0QQKmcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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) --- 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 2 02:56: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: 13889866 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2049.outbound.protection.outlook.com [40.107.241.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16A456F099 for ; Mon, 2 Dec 2024 02:57:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108228; cv=fail; b=p0HcD9C2OQw8EM1/j6P7kXI3Ujy/9WHsDRWck/9jJ/jd1+cb5yd1IHzQrRkRgr8nz0RKEdXPYbA+DxooJUgKHspILk9X/kkz2fPSLJw27PxkPvZXaeWsX5VqrUAdIPh6QG0F2FQsOIVKxbSY1cCdiXZxqQnqwbJh4+2o2NXVi9E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108228; c=relaxed/simple; bh=k8m6oQ04SeQnVd6l5W8XseGucapL4hPBR5T3NYhq1jM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=GVMQmm/ZY/kn/01T6GMmuyeYYHV389bnxA7mrpY1ADUe3Pu/KCOmMDvbxT1Su17PliNmgWIAG+g3dx9JIsRBsuOeV1csIz3zGo8oNMvsS6sX6OpzV6wgZvxreUKjEbytjTU0tRceZtBBbB8e6txSmn+589D46FARJjwVnEoYFOY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=EeLl5F2V; arc=fail smtp.client-ip=40.107.241.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="EeLl5F2V" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=anErY7Icq20oKxnfmJaiodJcymnxTcaucO00fGf7udvh3AEAVroE1CsrMbZXSQqBlTOZX0OWIbWmBOVgXO6aBlhp13REQyRuO40Q32G9vzfzRlwnRjw2qX7kwC5OMqR0M9iVL54zNaVvKRDlPm5hJ7l77N5cX/H2SMK045wifzE3ZVjwRqS83jn/ZjfAbExB93JNfjqCTbj9SjzCYmLLPCIK0dhlcweYY57Ai0uCjP/rc9fOFWLqujFFnJHm3bBMO5/6jq1uiyCr3L1UJPrOylgjTmGFMNki1XA6nbROmugvSw6rp+Vt1VXhjZw4OPw/4zb8X4EQ1aQ8xVFAhxT8xA== 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=rPS25qix5oSxvleV7DCckXOJ7Y6uAI7TqTcvsXwaH3Y=; b=oWhMrg+et7DrC4q95W2ivTtr+Ltnxt/Z6bfaAwO4vrL180DLjbkMGl7Y7iYeIE/Qqnk30/YgHEFR0ZdHnEaiLYioJUw1/K+7iowbGZlAQJLYWGM0ax5uJ+hJ0LuE8/2lzT1V1g38mG4ELYdiVgY51C9UeWPcbgfsDPVCo/p/hcI5uZQyBKfEflz4eWpEvu+th3WCezxrXgfVyca8uK+wKntv3SBGRauCwjgEYWKBID5un0cuRj7Kw0ECOE6yLj6hj4DZI8Xk2MusgtZkdOmrzD7Wc7tXaeNsYysC7RIJjFxpMpMvUqt0i0BoyBpgOIvqRubvWvAg119ZatjNT3DLjw== 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=rPS25qix5oSxvleV7DCckXOJ7Y6uAI7TqTcvsXwaH3Y=; b=EeLl5F2V9H0FcExXEtOyi4QrSc5mDg410T7rsnFs9UsPIMuj2PyswkxQVvpPxXPwECSZoTDOCsFfMjh8ZnFIkglgZ85UKyQ4MVGO9160LELTYuxAAvap5B5PeGZcnQzD7C1mkTPgq+WBzSDXCgoAI54RPHLrU19NCqdR5UJEB2QQM3QhUBnifmfF0YNxzD3IXgCT6OF9yJdGW8QE8TuxDa7gePobDxwefBtn9X+qRWoQhKljj0NpSfWJkLzJaOtmlhWnNkV8l4OwNvm96kWVPRfBvArDVtojhRyRQwWORFGbpk6mfwx1mIYlDzB7UP/BpfpsI17D1xZ0SueeZ+6Dow== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:04 +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.8207.017; Mon, 2 Dec 2024 02:57:04 +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, glx@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 v5 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Date: Mon, 2 Dec 2024 10:56:21 +0800 Message-Id: <20241202025635.1274467-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: ac31a5dd-ead9-4beb-5239-08dd127d0031 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: R3sXNFlamHel94Puw8sDN0NB/OE+xQhGo9NPY6qjbIFB7mSLYzWDr+OMral6yZQA2AMRzpQDhTHvtIroWRcNvjHR870aHrUH/zZNqKbbDV5rdmDx96ctp9A4ZlES/0uE/0sMzFeX4HIT0TdzSPoeLEb0UQfpe5CKdeWgladjzHMwpvLKYdbwEIgQ0RooLWILRwlUWl/BTjGM0BLhb49toesDQvVQe1CwbfnL6Wibd/Zgo0EJ4KarDpzq/w+vz0xeIPeaJ8Dazv98GFRPa9Ot+/nZGBQThm/NV7/bDx660w/fWTdjSCx112cw7Td1mJXdHj0Jsfr1w803yQ77VC+jNX+LLImx8sGo03c9XFvYOjndgfWcMCg4x2MavYifhsZ+4ucEgURtWXNoGUnIlhOHblpcTRMyUrHLQN1rsiCPGSkQCxdG7I3H5R7rDjFyRu8kPm6E/00QP6bj3KoRfgc2EqXNo+ue0hSonWs3krNSup7+Aa/I6Ccjn8FHzwV6cCNT+fJOoRD1XYZT7B22XgFYrCbzImaenOoxkc6RFUB3hEejt1kJKX3neJjedJW4Cu7EY4m2TDU1ibsxGn0QxYgOL43a2ySUiU3Ha8aR3zdnJmZSvyQDmVdcQbfXJmT3D/WBhfcOq9TVuQXS7ouJ+07du2YufIC92+OTmEEgsvlNf74Gnxz54XO+V5lCWD0ii2oo8QLQho0nsdtREtepCc18spZLhoKfgWOx+Knwciw/L2W8Iw8s5QP+nmmzcV7bfIzR4xyq8opQwPtDQ07d00F9ZbWxHpEmZq6wSsNXVI4SFOIni4MSNi0ExzkBnOoVqAvNAOjZm4sWz/+IWCiBVg4Qn4ZyXYquwFi4zvf95QQ3SepqdeNf9XBCaLwOy5VS4USGiHhyla2BGRxawVEIioMoLrym2pJDhzAF6aD/Kw95EtuHigjkpoA24m2ySQ2qh+krfJ9aATWi1NRlBvFmZhqEZrrRIXOT7FrNtHixezWyUVYIcbJond5zgNr92L8Tj7ZX7pXjuNe6PpWEpMKyEdyiWc+JCZboyF9ysuacLJ2rB6ioRYi5ATbD/YgkGQarhcFsdHvNlhrYlEEU+ZihLucXKgnbUoxiJtNrHDGhS4qjyorzJgbZ7jPNU9TJXeJAt6iTt2gogVdu4mDfZE838GVkfw2WgbZwvFWUWcGak9BNzhJOlZUkUlJBpwaGzJSPUps3sII5xEktz5KQAaGNZwdCNc7A+og1eflM0JhFT1F3ZjCD8cHoTAEhHZTLILtQWL+EA/TuQnYTlUmzsPoH0b4VDl2OzzAzbfK+MTFGVGg6CQLiSI/wefuVeHIhVzBuGsupiosDTjHslQRodOYtDDdzPw== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tBjGXfPrPKdY2kRY5Wj4rvTtDgfcKzIo0PoFw1sWmbrgpIqBoxr6VxaPa8KZVBYD1Lj2CvcP3fYHX79vN1uPYU/8VMTET36J4r24J/fIphS8hPK0TR+9gUMW4DQbK7cf37QGrklYegDQuJz8U6niQElt5D/OFbRrftCJ18ttp2fiUYNUfIVrCAvCFuQb7dQTgrSql9PnZrn/YaGTtCkXLZJ6LpBBSTwUX+HHkTdEJiR2tVajmgNxZB03wkkCCL4O5YYBeW0sdKCl6s7xFWhw+GupALItpA6xasNIRt+o7su834mMmcX0pPAKziAr0rCCO+du4T0hXaVHka4M39RihpSE9VWIGcBmz4gkOskhKYr1mZkamocvAa8h/V2Sz9i6B8qqJbdelBrHycY40ct+pI4QjnKLbVj9mcrea9djevHlE/FduCaHr4/NZUZZGLpmAylfZXyw2DKMxM4IH0QpYLT4tLyhbaXv6EOAnoZgwCq4NQkjpUFuobL56N2UjDXX/+9xK0M/ol68GBwxY3U4ImoiY31RnYdXfx/zj7QY50SKOufXN+GloG7Cp467a02KnQuvXG+AexF8xK+hJdUv9DiA1UHd0puPgLV64zgUYJtR37UVppNrd2Q2k9bGRf3nV9EIrp229khTvnaB+Vhb9bxJH211M3DddXi5Q/O6qDAyRe3pc4bGYDRjY3X7A0rTPfg7iM+FnuEjHAs32FfnKdUTzub9t5plBMy9MUdnMOLueCaECiRKpLhLkHdEHKT7WvTyfSqlPO/BhgdkhfKdCaNneXxnUuA9cB7B2YdHAeTCh7J+iGdQQaU5VGEH9VX2mZgDsys4zdp6ri6eSE201xXnkbYquVab7yetKI7z9shp83B8QzbguHV5Ow9dvRByhbTB6Nevx5oSV0Emln1AdBFg+Kp2dbc6VTqvc7uIOrbBgRdsZOhILD3aXgxNhO+KLq1nHDivIHy9eGJnNvOOJhWHkeiHF2lNOd/EM+Baxb5p6iPbVak+pCOK82ZvODF6rrvtwuQ71NJvb9E2a+gzEfFVpMJFduuOWHY9TNr4Xga0okU0pYXC2P6DYXirrZ1iF55Sq39vk6zIkRaY7q5f+KWbFle4N02sv3gcH0T7cU0WNKgZQ6bR2uHBoq785oyE+tywvsyoRP/WriUvJ7aioZndHhpOvigWYf9FmqsIAXmMReCfiobQedPETumnd5vfmDxnLLlMGlsy9yUbKcik2MguOz/k00XvT1xuyncl1P4LOxCUBonzHO504mJs8cBcYyrdaiDkbg3MxoUDnOkxeJWkKUk4p1tgAFO/rYie/FMXI9Y4X8ztCqsP4hT0TudhViwUcHynDFftNZOkIcqt0rKy/ttJ4OHeWghbKS6UqnOPuuH0gMQG/twGDmAvmVwKwqLntThvmsJv3oM2OUnLhjO7YHdVrkg3nYeQXzh/zlebkR1i2lYvJDXo3e0YsdxMEr4IClXlbhwgr7GYPmExFjkBfa/ohvWk46cqTaTGVIKwuc3/luW4YxFW7oGlAVFilYMZ8CejroCKolGY4QY2ev3IVb0PXEckChtgNkdX+oDUtbmit1kgoeObEQMITzlj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac31a5dd-ead9-4beb-5239-08dd127d0031 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:04.2613 (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: kDrViIy0LCW+pvTlPCnwEKkHCXThEWVjZsTunXDLdTmzgK2GzmK4GswBrYYsNFFnhoHGTWdDYfwUViFL7DEINQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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) --- 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 2 02:56: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: 13889867 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2072.outbound.protection.outlook.com [40.107.249.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4064870803 for ; Mon, 2 Dec 2024 02:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108237; cv=fail; b=D9y6NcxoyvwnuEYuqkBhgc5P8/pZHW2qPVG3RJQaTCrHap8v3eqSDfgwwn03Vx/gd59sNGdfaeuJNuEUjaJsWQo+wGKx8JNUF/8wfmgX3VPwFAlbyNCGJz77CT2WqzxXRKqL+CTNW4qkLKtd3ji8yKzzNmN3GdYyX59vMmijtMo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108237; c=relaxed/simple; bh=PhZ2YNYdkmDHfzpVmMIrq/yUE4OhO/qG717l2sIYmoo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mL+9zK3pJwRgUJIUxlKs0TL3cBpnAGBIYjUdwIS8xn8P+i4bC1UMJrVpHH6G2pHeObISe2soRl8fVLHqjmQ3veTAAAD4vpGOh1I/8EIeDdgfeXIjCPcwlWQGmA/WXWOLjLnkGUD1+PZqXA+zW+N04QvStxwcaJrvxw+ydtBTASY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=FbW4uUys; arc=fail smtp.client-ip=40.107.249.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="FbW4uUys" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NdxKXBPWfWXLJEMBohAbuR2VDWUBuNydUMerWsp3w3LkF4+iWsNPa8+TSG18KH9GzVgIhNaliRDi3muJjfXq87l1HRfwEirz/xdJhEWLIy8ztYfyHWiEMh1au8V/6u8OI7RZykwde5XhsUm+ZOMQW173IdLnNSeWpzN2ZJPs12Uq6c8E90t0hPlPvpYBjBvpVyEoqHKlGUP57C4CqE84p1AOghqugN2yqzqi8AgBF94xlzZR9wgZsz6/5P8e5cOcNMXrslRYhEcpwbshw/jrmC/IRh060R4hBDmNEQG058I9NZhIkenn2xppFc54uF/lfjY0iwumGgPdEw1tYt2XIQ== 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=ZlYCszjOb9ae4enBB14z9kgjSacz+U6zrDT+54z7UpY=; b=qB17mNW2iigAlrWLjHL98POWxIHEwu3EC/cRzTMjvUCxuM1GsKWBWF8IlKcRgonddX3CAV9AN04xlQYx8sHdM/pM1qCqOEyTJF547hTjSLfPneuCJddKD3FTH+RI87Nt17zNDcJsA17XTqv/LXF1xndglZ/YgdsybIo48bUX66Hj5s2lBDxq73/PKSgiGJS9BAOIXwLjJeKj3pD29yY2afcmzgSW7uG99f8nXlN8PySndd0MKPj0Svklu7y8rryL1m9RPSOE5v0/gqQ60p2chijajgnF+IUZWKkSyCLPT+tdfPYdEYmA/AOk0zK4dXsq2BLvgKqm+AZiVeFGj7txuQ== 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=ZlYCszjOb9ae4enBB14z9kgjSacz+U6zrDT+54z7UpY=; b=FbW4uUys2D7U589Q/41kGkriT373i6WygUhHd5QkEcZmxdpv8tOvuIFUH7iVZ6JYmUjY1xGH7zwOLW2f1rLmHNUDOXOIgPvYVhCoc5fRuqgHZKBfC2MubOouWGk3wDytLmoe3N8/e17ytQVX/WYUrSP4PuFPOTl2xme86u3Y6Hn7HZNizc8LKark0NwY4AaJQhyGNp0+FjHc8bykohFLnon2fuu8rdka30Hw6mIe8KpsLbvPXFujcdLIDapNgEjzE5D87JWOzBl1Atlb4AXT3EYgSve5znN7/40fwkK1FRpgA5bAL6W0rZ4K/WybWqnfI/QKS6aKhAUufVdtXNsbPQ== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:12 +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.8207.017; Mon, 2 Dec 2024 02:57:12 +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, glx@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 v5 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Date: Mon, 2 Dec 2024 10:56:22 +0800 Message-Id: <20241202025635.1274467-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c53728f-64c3-46b5-aea1-08dd127d04f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 4sW3YAH2UrzULNawPO6prtp2QJEcE1Nlg37u/LzDshdvZHaC/2htUc7AAjl5g0R3OI3AhW/rbLUCOm7G9YvP5GHc3YOJtdIkD0o9wupCrVD+C/YRrzAgMdwEy6rPZ5CQ7GAafbMxmFAdaCLOmTKLUZSKWSQtCRr8S/RbDbjlnmPbxnMmXR4oBmsMQWgnuf5NoMlO3WXGKLBUfGJYo589vIwJh1g7gwaffwVjix0Xk5A9e/EFETcibQ5v7XOF4LnOYMUqimoJzy4fJDBYSB5dRiWG4EkL1oUB8zH06I2mk120aw8CpGXLusupcX/SPM+LWwi+a4TGYhHzop61yGkbhTtfX7yUQYUpheg+RYKMEuV4E35bnj5myau6HJok5nbO6euMv2veXwltIQMjtWR75drWCHDApehxUQvxcH4/2c8n+Cb0AJvRUMvczRsmQHaAm50XbRLfj7XAHAwTf2QKns3wmIvlO/d9wqUfaPWMmlK3nnyKB1EKcKODcKnil5TlnWFwM3gCAErLlZ/UDmY5dfv9MolQ87oi9imI33nkABDZOQi7lkmezpPEJyo/H5ExxX8wkJGrTH5I3elCaM/kgRnhtc6t0EaAUnIdOXzBksJN4Tu/N5HHpdi/6DfE9bvwECpxUYu71sG5KyWv4fk6ldSuzGtteWPpgLzM6CWkMiK+RA2kRJD8o61Qe+c7vcsBP44lhA1vmUrS7tMNPipmbQ8z2GGVF0G+1msas2EeBzIQyjZnR2HdpUAiaav6oV48irQtvAw+sKgnTKvBXHEeUN4PGYsJNbtLtjSiUG1lP1L/hFfBslA9wb8OJxitrj6+epycr/g4xFjaVZTLfwEJO0lQ5j5zrPydrhNgLrexRKgXLZAW5J6wrnNhIiP+4yG+yU3vqskkrac9CKKgY/MB6AwJSVvfrg+XCVNZ7DNKcdVY3OikY6oF7fkgNJpccP7JlU7XRsOoI8h8YiAmwd1DctinNotAr4lmFkWSc2RNz+zET4pjGcXRhDXSdRIMklNRh5e6tAEhg24NsKkCxL687JJLn0b5QIdRMVfXXTD+DQeTpJ/HFOXU+dPuCSjqXtlE3VlLRb3zE9FnPqT+6NfljcPCe76SgYZLaz0QxtBZuYxWYQvXqFtB5P3Br4gUfWDSCFQ/SFdEHe5UJo1/8A5JvmE7K9LPrA4ZXwZusfhVEZ2jPtIco2/zHXzNy8a3J/mCEMeinDFAKxFM+6uiI59Pq1YWWKfH67FBlhc/xD43eNgSawEmr17PkHXXVvf0wZO6+1E5cpgCgdgToWB76gGDcw+mmsf8cKwxWBFpvCxpmGXxMz/3YzL/zclckxCnWaL8JJnSvVzYg/R9x6U55wY6LQ== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TkVlGjxVMYPb/nDsX9nQEc7JYol71tOdSND/0OnCZPCFiCvj6XNKzct88K7w4iI2KEDqXd0Q/IPCgGJLaNmmfcZuPJQW/F62ms5iZFKbCFY6kntW9+iz/VYIcbKFk8Sl+YEYVK1h1SE2bU1HHua5qBQ61cLFYfCe4t0TqgJ7+zKci5mP/YXMWEq7b2CIBzp62HqMOiwwyk3WghcwUBCnMVzk1zaFM6f1R/jKMvX44wkjgfqoKxTwDGMVk+BTDMRY5SGYo5tCEfStVc9obUpPlQBdAKT/apmxrQ+KVTS9v2gL96bVQpdgvwGUil7/WBHcAonRwybVu+s1trG+tbXo61REdNkew5TjR1qmJD032BiFvtDxJJU19jC5pSOr3/u/uVOnT2nTXmH4FYuWsjaKRaay6GEYKy6m3RzFJVeDvqQDT+FY8mF9upnrjWS2h66sk2jOmznWaFXXLyhjWvO/jr0HfQ/NSOXGIlySjHEnWmqFcRE78IxOt4sa/uRqvJHXzOMg8iXMwAhK0WiKtQiyVwbvw5+Zh/w2MfxHxPZxcBFtnsZQ0p0bgZOScghLCQitNevfAay1vN3cDDiivCSgMnJulj+pRnuuEs8nwe/T3Bh1AGCmcE8hHjXuhTMDgiBK+5phTm+HflxRRANY3rmr+mpt3bFULhLUONjKVUpK2a0zw2mQzDSrFIVOmOe0DXStA3i19l1Z+S70SE8/gzKexTRd2uzW2d0u3s4wpHMUxe/CfSZGyaW6FhGm6b8sKwzEosCB8F2lYYB6fzSI0U9n4saj1gGqkUEa12L3RH0/sALQNugepVM2qNh+JgjIyWupIn9/auREJIUZo66d8KCVDSckonTjMC8bAB6mO13hQ5IhhQ4ZnLbsAtsKoPSmXZC8x1sKc08rgeqy7iz3gQT7bbXxoDetlBG7AanAjpI3NVoY9HjKTaO4sgqWDpePElu87lYNIle24mRBkdNkki+3oebR1/umsuj9HSe9VPveFjLAzWOG3Tq30HMHaCZjhqyWX9VNoQoTw96sOJrSDg95r8NfntMEWmkWysZIjGAN/OGW3i9diRrqeIo6O5CCQ0glTXfmFMzV6+KluCGhNli80e1lPWx4apsU7WgBEOqveEs9l4jW9uMuNicsW316qRYSnqVUpNe9D9GAsdNpv35awKi+PHgxgt7X+3xEweewSW3SLKXVtaKk/FmTJDXgwElokNhT++8KcP8+7qwaJd2Z6E9vul60Ief6UTgdm/LeqOTWwUNBjHZoQ8r03v3jFyaoxt74nrkxsY31UN8qeVJsdV4ST2lrhG3Qv7fDAFd9FBF7KdnEKsGAMGWX9uxWEn6i0oUrUEg4q3sjPNdHVmorRP6dwiFehU8xtYPCMhaYemeZpZmVGWt2EWNmHqtK4/8hdkf+ODP24DkLCNf7YxDD4HSSJ4C8TKcmBOosyBcDcN3oDezb1kXCLD1brew57ZIweVVM+cYkAKoXb/TH3/JIZtTRmKiTFJ+dhaqf+/qNSAnYNCMOWu0fRANXf7aGDACja9CsJRRh1L0Ww1muMIA9SE7ChUa4VRUEXiueHxWK2ARUeg6xDEI6EYzoSgf1wzsp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c53728f-64c3-46b5-aea1-08dd127d04f9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:12.3167 (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: wGTX1P2We9z/A1cecxC9pwb0/e9NrlMWts/JmtCJ8shhcP8VWIDqC92Zw6dAxWZU6neuJGryMfxWLWSwjp38Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 i.MX8qxp Display Controller contains a command sequencer is designed to autonomously process command lists. Signed-off-by: Liu Ying --- 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 2 02:56: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: 13889868 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2058.outbound.protection.outlook.com [40.107.247.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F0C43BB48 for ; Mon, 2 Dec 2024 02:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108245; cv=fail; b=D6DCRqumrelP7zOZ7mQeu7QesBVQGmLaw1Z/tohA1d8+HIYwkFnuEixFaNF2g+UQ2ojp5CaRhXw1AliMT9vNp9y1/eOZVGwKY1Oxh0QOgF/39tnTb9sx+ohe9QrZ0xk3i6xBRfS08oWYZOmH2pS8U8xTUou0vI9dJuvCJk2rWXY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108245; c=relaxed/simple; bh=MzoYfKT8P6iKooK6WokVF+Vej0aXZtFAEjUhkyzcCks=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=nAIRGfwEQJZJqmpXs3PjBFR3hMi53RIt1ALl0+1JxMbnqDrqut0bfUuIsDyq0bjDaaQ0vNhkI9thoz+sz5Den+Lx4fb0EPnJzlykXPAuMyRY5wNDCszHJV1nFMKrajq3X/bGUdGk2ea1B268/eVVrxSyKd9sPaeBjFBeZ6cbUA0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=dkkL52TH; arc=fail smtp.client-ip=40.107.247.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="dkkL52TH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dBP1vhISjf75gEsvKqLwi2dXLpPNF5NK+0ljvvJveinclBtiBq3kC85qIKIGQOPD07WfNXh4HIlS/saSVeC1fZQNJB8fi9nf3kK3Zeh1LfwUY58Tr/krWJSfBWdApnfbJYM2r0SbajYWIAacbcCV+Y6XAwguBB0b8I4KwBnT7/JktR7M/F83kdebJ6EACSBnG73AMi3MfcXFNgxqUiBYjb1JPMdJCgcF+8VzorkycDWIA/ozkIsv9GkzcrjLIiTn1S2XqPl1i/vJo+zve+m//a88oSxlUVJ2UmdCAWv9vC4Zc+LPrfelAI7tjBkXwk6PKUXASQdP5Gc7Mud3Qy4Acw== 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=TspDlAGAo547NwgAFno/jIClDZr2pKfdfxf0JB2YyAY=; b=dpxqVlzYOHtjr3A5mpt+2NcNRYUlDZ9aauqwTc1BcpvBwIBNn5+kZT6M9s3X67xRctfPYcmJTnHOcuq0z3rGfI3/7hwmh3iN1HFhz0UN9d9dQlg7MHjuFAmdv0bznzR6CWRG3u7xoi8r0Ql1ArwBMCDJSGx6vDoUvSgj+4Iq8iL2G9kA8aZlYUPU6bj48JCXi6GGtO01f5LVdCNyX9iS6yHQlf/qp3UlIVhgM7SMRjFP+Df1lUSd7SGTI+8VOWXjVh7bECMIDn9hIv6lJDM4BRgt3CH1eFhPIPzUpK/YWFDDE3sYr7twsM5EBAJxmWf/D5AML7J4EqP0CkPDMp7p1w== 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=TspDlAGAo547NwgAFno/jIClDZr2pKfdfxf0JB2YyAY=; b=dkkL52THqoHBfFhQZwABNuPimaZhNdqGR3lH8D7IF6qOV9KxaomdpasOXQbcKKhPsjQcm2vvqQw+ZkWxpaZm42YHlVo/SR1cRoKpBxV/NCdJuNn1DsjqDIUG2JsewlKDCQBrjTs3rmUU4PVKaYoYKvDb7JQcqAToA9Ck/ipEpRWFLOIypMadUe2QDSTxNJPLOi3Fi7rESOu9avfvuCUHPHanNIR3cifCi3r58eXx3ZaKCyaAudh64OogwCXjkYVfe6fD/3MuJ0dTQqB0YPMt60oM480pgc0rQeqke3eE304ZphqLoBf6kLMEGu+qAuJv8YJAc6deojNk67Z9U6TMlg== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:20 +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.8207.017; Mon, 2 Dec 2024 02:57:20 +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, glx@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 v5 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 2 Dec 2024 10:56:23 +0800 Message-Id: <20241202025635.1274467-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: dd0d876a-9f76-4473-a7d9-08dd127d0983 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: TlORTwG9O1EHYsfuQjqFN9YbW52xEtoVpnIa06+fPUvKESp9Hs/lxvYCHSW+de48k68wkL6K0zCZypyfwTHogOB+Xm2wmSVunbUECQ31b516z9hGCsh4S7d/BG0IoyE+wLDHfCjOi/80aaHMRAIeZo0A7+5S8FepjUXygDtRCWwgaY0I0mkLfNXvdxrpWggpDvcBNw3HUKuMEfoqaIXoKEdz6KBFjacNao8UcjTxCWZ3amfY9Xd8FyMRlB4lnTCuZ+PgJHpmijaTvU2ulWoeQoiAPMwW7uqfkudJaNHOTeEpeInpTdlQp6AhO3sUh8sCYJ3bWCCdwdgPmjGNb+ZdGoho6ca7UAkP/DyKYHIzEG16SioKQNHHdb9DYDjtKFlsP69kJMLsVQHuELrUYFz/fmF6xu4ikRWi5FitSKBSAbp5h+Kq4eoWDqmVIun62J9ZxRL6UNOoNCdqzzBrPpdM4n9F7I8wGL0zVPDdkBayypmkd/Pvp3tRMASaHNokVWvAvkbXEQ+C/FvmbwM5bEG/YK9It3FU1MtRdROv8L1QtbnNIZT4aG5jOP49GpxFET0a7FDvRcE9s5Ke8HwK6Ywfha3sR9CebjU+ABoHNIv2K2FjKP5Ofl6tzZQBSquTStmeNc8eEgwXXpyPPqQ5TMCSQEQ91X8cUA/i46Aesiw37o7IkaOcRPVWqSGfR3/T36m0par7l8rb3oemwuONZ2FhVGuoXOWuUup9t5bRlEePi07M4wPVg58x7OdLYfJHjnpHtZifEXgZpdr1xV8rA8bNyZ6fO2j29j8fs/bQuGNNOrxgp4tL6KLb7ZMCHK91aCFBYcdG+xOtjI+NytcmgeKiEYbb6dohmPLoYC1c63iZDYfcxcOSNfjbeaCLK1hmVxzzLOwVdvY3MwPidn44DCkPTGO9Y31m0UGRZn53ZPGWS/J25s5kiHlOM4apkVPl0KikIX66B52BEEVD9kH4bQvR032AtdnnA+EFQyZpUkLJdRTlPCwOPlLFkU85LE3ksJqFTPkP5NwLPmDXr5lP3bGn6wc4CqPXoqbQIltbuoQFhaa/Q48BPSrURkPWYNg58aqpz7pSSoU0WLyc5To+DdBEjoCQHgyxAoAc3Ex69A76SRK4jq6tTmRSug4vZ2fHtb327sdmfQr4S8jwFzMUw7zH8JvCpHa6NYGN694DCKAv+vYjLbBxmL/7YrJ4rx0N8LXXzWzrV+5v/LHvOvniw8JH+hbef9g3LacAw65ZIrxQ1KKTWxSf50S9voVXWs3AYyhhrUC6LOEkG4s3HIBjgYblIn1jaF9XvnggTzQHA8123wCdsCQNsFjIYniaK7eZTddNA9d/H9HPI4AlWIizZ0f5F0XVunVu0wEhXdmmbPOtpZ8= 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GfXQzSK3UdfePD+hMU3stZW7frki7Lj4uojN1Vy9lr9MdtJtwU7nj7B/KYNkveIMc8y1zcINcCZIT3ufha0SdNXGW0vKilEM5jh+0OXorkCYb+iYp9O/5fK+aZmTJNQzC2II/ja7ZPsQ6GtBu+ZlzKx7cVqeFQtyLorwc7aCi1Iq8okAMmG7/v0fseKGws6Hl4IyYOrZW2NtwPMNukotrib76+LChPZNmypFuWExkzmEZywdNsDOiTG2xaA6/voO0UNTn0TKV27JnLn3kPZtZH8vGTrS35ftz9ga9kXlho518beu7UY9j7fZPfxCPoKsvJq2lp0sP8xTg2kltSBLdlN/boAInHh0qgzaFD5ngVZm4QkT5xSzLE1rG8uv5Vgru/7iHkrcccomEh4HXsvNYsg8nfQDOg2DhVZ8HAXzqqVPlRC8kM9cCjDEi1oRzlmgiEXVKBqxCULm2yWAPhtj3QYyMcBhElk66hkeVZfGTR0egQabNKUHsVbDeZTAWv+pIF8bldL7E2i053PLLNMAXukFLBeN2pX2oWSmySPReLKrF8i8jdLQIq1r1L+NHA9kRuG2bqRlEdGEBIDE5icw+io6EGK3ox0PkZzAuWRmPv4zrGNHEKRS6E1QoNUHpQ9rekq3xO+86UARFJC/h2oZ3XQWuloA+JRrii+QG7bBkGyd5dBHp9DBG7pUoiNlVR3AtIrZYONAnWoeXWi5uRPftxhYYXxfW3MZdB1iFuYTrzUSu0wtPwELntRpiUUPRWVYYn+3VLFAocwRN9WCPGoDqetfJm9+hw3PpD4rEV5wGpKkmh2IgnrOyAzEd3l79GSKF1klWjXFih10h23ldvqY30swPwsNLxjMx5suROgtKtn8Hk01hTFszFNoW4Tekbs7Kqjpk+mGhDZdKkViqYU7tIuUbS7kg67vpwup7MqGkcsYxa58dIuE4gjsc6Hr/dVXf2tV5IBBdGuGlUnwEqvXR6ebeTRM6oBcq5sGd4W8/tSgqoq+ebnYw5CYTMov3Aq/NXOoB3D8oK77AVkakdh7hwFyeFIF/GKxIyYzxtFYmTBWRt+1Lg3f4pu4adfquScwmndqWVbX0dsPznBYx3wfovCiy0s3HtNfY55U1dgB0vCDpw2sO7bzjaz9Pkvv71UdCrDebTlPVd++sdBuUAm228n0l90GHLeGq1Q1PVUAXSFJEZLvRdMFed4uNo+mhfbsJOc3A5MM7tE3UL/xQIrNSzegB60xK4+ERV3eGDR288AGV5zP62g7CA+mdOqjXIWdI5icTUFTVB+0HvbFX9KA9fd0SXkalh9X/GvsDWJkDMgfh+k2uKEeyUzV67O1pOsCwOcrrmzv4xVzdv4zgOVX3X998YbP8cbkC6KIsnWRDy+09TCmSctaZlRtETF9F6hYW792AvCWR386t+9X97ed3uGgbZPJU2//g3CIk89XwtzqwxY4ceUZbE247dyF/IxK8FJJ7JwxJYB9MytH8etDkN/dC6ND0ahfmwmjYlEJl1HI59tEiUBHhYyVmUxvfcxxIGyUWMYKOikiDkdlM9EbTOiOJjw2ptGOLXMmt1ZLjXL6x/7lVjmygTSEKr54dHo9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd0d876a-9f76-4473-a7d9-08dd127d0983 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:19.9603 (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: 15N4/5NnNomLBsrfHCJ2qcf7NEjVXo9XAsUupJyO9q6hpkvB8IdjA71mkidn3L7wqJA5mYdrZFX1lbr0rUdI9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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) --- 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 2 02:56:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889869 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2044.outbound.protection.outlook.com [40.107.241.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7A8A7E591 for ; Mon, 2 Dec 2024 02:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108253; cv=fail; b=o+0u2FK4s8UGH/BAMPvk8xeiXrZiyglVdYEGCWmCwFJf7hMjZuT2U1apgrg0zq/opX7AroNdZPuAezWQdNukMNSY+vXwOsuTPlKwVO9dpIzXYiJADlseQ44R5dYYqb0I3w+bEXAb//vr9G9yF/hrR3MiZp7OHr516LiwmztTFsI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108253; c=relaxed/simple; bh=xTqBQhAQGhkWtLQlOQZMw41k+LL1xDlhRjbVEKa/wpc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JjtZJkSKIALzhFTimgBvs/I1DdysyoWfzME3Er+iDd35TLCuRqFcVfVCWVa5163YgnlJ6QdxFwyTwb3QlkD1T70BIJY4lhZjOmh5NoVWEol1+JAGwDLGPywcZxTMzbbvdKXYPxAq+uoHd4rrkC02DEDlRmwxiLHUiEqj4XoSwRc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Ez5//N91; arc=fail smtp.client-ip=40.107.241.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Ez5//N91" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h7JjsvQl436zEUzButQK7x7kGv4/efQMEZ3Wb8a3dcXlC1ovel4MmT3FuSxpwuyCSezOyPJjC9caMF6FiXxhVs+Hukj6J34R7cyV5ZxWZHeHMXed81dOM4s1ORcFMA9+PjtRz8haV4ec7NCN9N0g6dCcPhN1h7XxpJkG6vRokF/hSnpPuojXlp3eKs8Y8thZTICY/eZE9m7GcBVHt1yTU7QO5T54iqJPqFKrSrRAcW4rX75F503XcFYVkM6LjoP6G9P20RNMwfIOi91/sTMzNJGMqY3j1mihDHXmyrzdvZmSLQWoGJTieQNpMSNSADZgcqAFN6fF1R7JKFFEywxHvw== 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=WUz/LVDUmuQszdqjF/odtsujg/l/8t8DxDbZdsR4qiI=; b=aFsFlx8Pfv7WDulzB8VKnAuYjww53X7+nyQnNtFiHq3QjW9prHNgCugz2HAUQKwE6JAlcRHDMqP5NcTVt/VmncCLTuNnaBhH9sNukX3cOYbwv9IC62e/yFxU4zB7X8/aoZlin8/QR4oNjY82wmyJFEFCXyhHw43Lr3tReIkgw706EeCdZ2Va2JY4AxV+KhffJhwcKQMJgv9QrzAQoTTOWtXQwdrSsPuolkMWKWfGyM2ayrPK0lKeuMeIoGVMmvj7FfySblTRZTTIwIXjmL1LVa88fG3q4umOBxKYyCAESZCycyqJGnI8zuuRagoSc6v+pu2o+jxkZygMrpzo9P2spQ== 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=WUz/LVDUmuQszdqjF/odtsujg/l/8t8DxDbZdsR4qiI=; b=Ez5//N91AfMgKQ866x9NsSO4rFuVmCxBkiIniGe1f2PhWQ0Q1sOWpjepdZDDkdqImMXSfcZFyXlls+QoFW5xuLwBfBefqjNp85rAxnjUmMwpnp0Fve5sY5gq5DrFAeHzFtmBD3jwFGX9SemRO6NUekx6CzezSM1uRQD0Fd1uBdKjlnQWCCMEb3XJAbvujKk2CckO/KoAJrlXkyrmew3mQ12WbJK8Sh1LoxhT38pkN3+5pQ3TH/Zb04QRgUAPSS4RjvFi5uCxNCTH5BBSGSut9JwUlBXF1ru4hoDP6q1nXgl5W7ON55amNcxEZNhZ8pa6KPB8UjWSlLLNNuJkq50/+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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:28 +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.8207.017; Mon, 2 Dec 2024 02:57:28 +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, glx@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 v5 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Mon, 2 Dec 2024 10:56:24 +0800 Message-Id: <20241202025635.1274467-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 557e0b99-bd3f-4d30-b9a5-08dd127d0e4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: Qy6f2oPvayEG206hPo29Gzv8+27EkHFuk7qZl2ca8UQYp9xkY/S+qeqAM3rLUTLPSegt1iPDSwYZayWJPhA/ux5tIi3aOtC1ox2EfTkA4xAqA9xLsTACr+4SpibLnDqSeDOSSG7whPfPwYsCvdfG/ZiS6kkIA64vc00Gt23FIoLsXc2bGr26R77JCLCsrYDDcjVFTImZBL613a4gB00zAd9CyX1bTNstqq6N37HAfQshy5pb5D/tHSzV1b9XalNrHqpx/+DFn7TwsCaKKyhQ4jzDdu3wfMzKaXSEbyGvLU2ry1Zq1pDzbz3o/yakNPn8heicD/3MwwPcWk0+yWKJhmmxFsS8oli6MtHVmin0pxEyLwoh+2AsoepmiUoChzyKtrGzQOdoDEskBaPp0uuBUhfufy+NbKbmXiat3JS0kEt66F4xiIiezqY/5FvJNsRwiEHSgJo3kaInTfrrBtLWvvmn6WkReJrWsi9T9/ASom7o7K7d8MX+gL2vJSZpKQJaI5PgC8VooI9/trL/enJ6S8tLf3AtRThuRfTgowjgvSr+sICB2rheIkFTNviUab5tv0cJ8DSKujcYL98gzO32ehpmt/3Li1M+y7UwnCKUxi2OjK+awQmfMPSjkd9ZkvZaigwmg6ozwzVbSAStxTbEVTbgI/iLf24d87eBssHQcCCQ0Imonkf7lbPGUIVDDeO+SZiSLQo+bN3v7koCChOuK9umXrn7iRHAh9EAK/YbUaeTql9iBfqMNxKlWv5L14hEOtsBIOi22D6DVxe8PDubeNoJBnTt0yaxoNX4+eEB6djWOJuiWkrWPvR/O6bz4/NYi9YUAz/1P/Xh+7sb41ynw01TKydLWe2eY9pOO6Lw5dEh434WOM1HIGWj0sVkeWb4xDKnFLMehTMjz3+bCHq5eVupS7WKJqU8cJ5pCfztJL3LkM75wh4Yd11kvTAELUiBrtXouZ3ziyPFHgSESkT9ShamzOExGcvOMV3Au8URoj5VmJ1yLr/MW4TGoJp0UX8bTq5jBdAXlueNSpPjyywYhI1/9rdzvklPH7D8uMsDQcNPeHhb2ztirmTcCzduyxLY3ue48QULltNZJjrvUKcRC7jQwKNXtevdQ/kEHaqTbRXgMIeQ0Tb3irwnvPtej/dimcvFUYMQDx7ItuLhLrnwvK2TUTT/ru8RmJ7ny5YrLjMhlVBvygeRTQ7Stl6lEMtiZZUkxJmqSwhr9dtzCQGqbLDcMjYRwZ11Fg8vpHvKO2jvE1PT1SREww39mGnESoqMhCQXkIiH/qrTcpuxq6enIywcpL3QJFnW4AAjZGd+NtpYi1yqTSM54HY6SNY8S8+rCHaKpJBPQcl1NMXJQD003w== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PkCbwwLdMhrxASprLsC0OoojVopmy4OsGyGMD1NIj3En4Tjdl+/Q2hnaFP1D3Eq+wilo8kJDWFZy7tOORPbsFKlKZ1rLZbV2hi0pbeRTOK9ZPLa+yJwG7D5y3CGkBeJRhWYO7mHr0hpYYADT3IM5wU33KC2YA6QLaCt2mCwmzEqgIYP0dN5AamW4nl6rmj0ExiUXuZUlX3dZ2zsD3AJT/+J5+f+kab/UTaFd8bOvfns3rd/vIGCSWfJ+/uUJDXgxUyMBQW0Rcvk7tA3F6A4sRxuBcCwf6jAm6+l7I7BhPV6kX6Db4cl0AqSPA2s017xJYcYiTmgEhb2Ohk/kOvRh6S/MhmeKTU8/VyyMLjagBrISC+LbjYjQkqOoajPGXuiVKPYpSRfeJRGhXsnTrwqJEnmTSHQYVJy8ThvasFO510cR3WXFv8XeZVhHfa3KCw05KZ+nVwW1nWuM9TrugJ/UoS9G2sn1xdYTvHxsbtAh+2W3k6llgJBSk6AjfnOVhzeRqq678JBlXy9FBIMlFevI0JgJpIvZohMX49VNVk+aU1CVnb8o6Tw/zj713DYTpHXH9wHGcdNoDFZB9iqcYtm7h5aMhMnQVfaYXzqujHdrh0IC2MeSCF9Xb+H2cPP6CBsLiYG7tQ1/5a9iJAzkaP04ogQ1KL4X3ASFXeX4kYjQEqsPmG06dT8x52xzzSjGQN4o+9aEgL/UvKJdY83IwGcB6PL+iDI2zpckOIT3vZysmKVrs6USLHxF9rw11z0tFqFy4JGVWnfM2WYM/XBgqUFfbJ3MbYoFV3jzmIwbL1uaWL4gaI8mL2fI9VKF6j/r/g853Rh8If5q9RGPsXq57OprtozqeyzIOW83lmeGHAI5t/1n2W1TIEtCuXOm05ng3ibh3UMM2Lof/X3gcVmL5DoE5fdmcsXKkMV96jQjJi0Wf53L5sUQX/tgyJbJbxTEg9U5hxhEzul7RxzAlo0Mx8xIOkAzHcds/KUuKPPD44dc+A7YQ5POaUg3srrXhE6q+k5XpQcLav7EgNIEeUV9YF/R+bFsju5LjkigxHoZukhU9ofFqLE+0DrYNSp+Qf+na0in2BBg5RnCJ0URXwcrgHydkDpr7d+jDoxeDwoAWViXDbM2QnHLKoVmmWViXD4zUEsqt+0pNgcKZDWCJgMsVg7/DwyGhu2/qr1ezoilv7DuhdBH/fQPUbyC/vi3iTAGZPiEO5LyVbICNy7Nr2P9Lf4ZFgzAzxtBvjxkF/7dYOIYfyaY31riZCsUAY7+6ooK3/nGRRC7N0quqTrg6vtOBPEXCZWtkmk9Gg3MqNZ/Z1blzrLVCrgEjSW37k+doc83EHAgRCv5MHHi5hE66t9f181HuQMuY6YtuwkTzHEy0emiTwuEq7ms6tB9hdDNW7otvNiuas5EbDSeCk5J0xCVT9SCuIyeBjFW9PHnTdgirVlRD1ImVKB65i69nGMpKZd8gDmEC7PvlrMNBINrruG1gRdapFRDIadDpepjZNTD47uI5a3fsitDpdOmjtlQTyZQiEqfAr+l2h7nfqYWbtNRNQYRk7jXfRDWu+/1TkUX9G6Zl7xZhmzSywiA2R6pTs33NzoI X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 557e0b99-bd3f-4d30-b9a5-08dd127d0e4d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:27.9634 (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: JVm0NgC+1ySehJijgJ6GVQJ8OuAsUjbYcoqnh8WXspdKp4KsEKz25Jokd0zlZLNi6aMw9QFMWyzgJcBV5e9JHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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 2 02:56:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889870 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2084.outbound.protection.outlook.com [40.107.247.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8B8B6F099 for ; Mon, 2 Dec 2024 02:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108261; cv=fail; b=lm14a8MAIi3LvMlqK0adz7sculi84smpeRsFQdiv7G5IJ253W/7RMmta2NTVCD1VkG2Uc7l9cm1rOw13U7Eg0NOU01Jfv1JN0hvUSuYIJvLUZl6jAQyJ/VpqCdbyszYHjSfIMWw/uHUD8PyYeZSYdELFLoPt2FHSbrp8XAKl6BE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108261; c=relaxed/simple; bh=ZfuJ57lWSMx6ueGHjlept/YyBW74Vs01Ci2p85zkqps=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=o70yZpffWS4Ko2TXp86YVFDUfzEcvcKGpcMMOYj6u4UgSXpNLtk4HjPIjXgzNR54C83nHG3HsIJUMnVYnRJ1mh1M7OVQWEB5x+I/FMblbM8D1ViOv6j4m0irCMA2ZiabS72Kv5aNv8QRCC52hrIo45Drd15RQqX468jEwFG2XGo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=g5kG2qVr; arc=fail smtp.client-ip=40.107.247.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="g5kG2qVr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iuJafuwsEzFeGHfVuCc2E3b2eRvH/YkmTQ00FgMSqsXG/paBVKj/s7GNIEdKYPQncbOP8CpvKmqf/bXtHSyILZnF/jzKBGLl3QhImS+jT6UwaHVDDcNNQ+nlSFWs5Y123wmHP18iG0CgyiBSDU30jnwIf3UcFa5qz2MlkALVptnq6EVWoTVSZCUaqgxz1/yyXy3/PAFhMnfwT1DfybyuoxKB6kK2P5ModNe4jON2euwbsYEH5BBwgzl0X2SO421P6B4oRGgmjQ0L9yBz3i0B18OZ4JHF9M0fZ9TQlABOJa27c1a/bXZGsR3mcm5/VEO/X0FSQSRkdUnyFbSmEZqfeg== 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=mxBvPbhID0warfXw52+SVhXXCbF1xk8wWYMe58ksnGI=; b=F2ZdNc0HAPo66tgU4Wf8MgtGp1qtE76YrZCKwQUXMflfngSvCMF6DMr3Mcs1yPKWSvkg/hIdHtnYfKPy+a9gErZ3pVLyMP2r8H4PwrxnFJexreQsC2iorUUOOVTJjyeo1NHc11geVa5RewP84zV5lAzxcUz9EDbVWES9AYK5KSOlFOYmcFmc5+UTeF+9hk/hPfjVNv1tQ9ES+7PHk0v5RhXZ5OizvuzO2PLbOxfEP6IoN3syyrmPo1ITcijbdol4nIfYt2/QK1HRlHc38WX3rQwUaoG4RUMEV4QOc1w+QmAa6gj50OW7AJrmeMZ5kBKD/s06cbLYoIZgXVkky4jKmA== 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=mxBvPbhID0warfXw52+SVhXXCbF1xk8wWYMe58ksnGI=; b=g5kG2qVrHZnmGmMLzqjCuVNri/EQvLQjjQDvM6XG2gmd+z7y1scpwtPt5yhx3qSU/3JFB51K9br02l0SYLBPtfjSCHCpcJot+EM/tmQnw6m5ZVGXOkhIVBvxwJxmNV/trzXKtRmC9PaActE9y9GaX5p1L3UN2O/8QJ/fJOVaxqYE9s2U3t9Qm1+Z9+BulrQXdvBhCH9KLR0WEbIBmLjmipTECqxasscpZO10y7pKiRG8kfSRCve94tCbGPd2hWqGxudrXKFVU4KFCIrwRN83w3rsWml2Ho9nuyTwuBAiAS5Og9XCA+JQmEFx++XeYNgvU2LULjhrvIInB2PBZiE7Uw== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:35 +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.8207.017; Mon, 2 Dec 2024 02:57:35 +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, glx@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 v5 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Date: Mon, 2 Dec 2024 10:56:25 +0800 Message-Id: <20241202025635.1274467-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 27b01dac-672a-4853-cf90-08dd127d12d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: iFd1VEaj4C70yBk2MqWNQaDIDxUF83i1UsrgWK5bt/8D9CLuRstVh4oS34Y4GK5A7ly6jgB/5i/6xMDD4+LUEq8COkrOtJfbv9h6cb52a06az9YUP1ehY3nMjaVpvIVqrTreU6faikKVnts2EOLkqxpCDeDsqZDNfy4SJFjPnR7WgwPLp/fVxnprCPC+XnYbqcyuDiaN3XBgprElji7sEQgqFA4vS5TqT897MoFnkMDL41NseCTlTZEevfe1ryLvWqe5UdPGL030uD5MBsZm2eyE6J5aqrQ8FRgLr4jjRQiLEUCxY9xIMW4zZVGWbgcIEG+KOq43SHgXWwb8qYxIxkNXL1lPY4OfgLSgEa5qmoYGHVnqT54XuKTHbWO0h6wQxJzvJI9cMz5cIksEQwqFyF1czTMdR35zvT0cwMfFTKq20AmWB7jWTWHO6doCsEhPqOtosiWoc/AHwfsf9Ue9ZYGryhONtCNZvKnfQQlN4f1ijFpOMAXJCGo9BU6LJSpypvhlZqz674m3Yi048/be3fFtXWWYZ1mWF5cLy4Z+lDkdOBSu4WmPf78FnxUI76PLY9dZgWZf4kSi+NQReEtwpMckGmfJnIOq/qatsLDWshh7khRNzZP4jW3i9V4N8qKnQURBuBAMKwuxHGAXEP0BfF0YG9k/XKjZn0stm61GWTxw7sR9YNn28aedpHsYlkHEvU/Le787uaZKlrXs4GuTKHRknaQ7Exp/93mzW1yWpByshJ1iUzZQDrvi2cm50O2qXhsV1qv9ZZt2qYvQRtUKWdpFfyyBV5ZARFUucD+PtYGBC2IqoHdHCucZTgntnvbO7GsVhrdQmN9zb6aQ22fy+zxWGLgq9DHd9NyeVpEn7XR1b7VgPx9iklg8DX/bA//H5wpzO5S4TcCApqyJIWBAIgvaG1GUEjWj6zvCcWslz4EUnRiglXL1LfQ3ZhKctfJvQSWu+F2dRJIHCIWUgzJGQoDzToxLivxEgFwf8AdrK1UrPSxZWsXcRKO0uVaN/wzvxKOVjhTsAzshLqGbyPT8jCY5Mk5A70fsPgjniKFtKVBFyAk78nbzOpm5mr5LpcqTMcFopfr0xcMQiBEujYUE1JhqaWZws55nFXg1O5odduZNASwZ0B9i3puFDvn34ZlcQd7rKP1hkUHXosvQ3RHnj+3tijFnW54dmWEBcIlVnvrZW8QOfd7GktE6VcEoMYB2LX/Rc0gKwzbNmD9hx3vFabbAkxJESQ2M9yQWSrpCZJknOPO/H8ty9FQ+7FAa1YnHHpALkdV+ekcSF3JYEelW5sEVAtM+AdYmXs/B6kkyUHa6k3tHnnkMYVeyLKUby743hraPPrnPMVCH2xohuPeIcfZ+U7cv7z/lNmAqffw1cEdxzzBGuhQ15exYucmj/BdZa020vaKh0MatYtQ6Xk5ZLQ== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IQWBWktT7SMYoBae5bd9Rb4di5UUj843kSASM7KpUVQ0OB2me4kXHIjdYqezmZckruZq6V1h2jRH3K0mYBwhxuanCZ7BtPBJaXkjeDqkiST2wA/GjaqyhiwylmBAVF1wKLxPsaj0NIsqvS72E+wswUNyCrB4pgxKjYqNgYwKfGz/wLho8KrbaOiT0E61HcxICCLzuot/3IR7X7ZAfjpEPdgIxV7A+i13j6bnSG8SYIWsDvMYc0xKC/f0ZmVtigG2m3E8inB81foiLVPcwa8H6nHx1I8eS0jnaIwLW+lJhjqgE80xsfMWOhk4Q5guLY03bgEbV8RtU6fHu2QizcEnYg57oWaYEAFO6WiXQRc+SEUEBivDAYjK+hSQR39w09je7Bwc55FPfOY3zVyHUofPWfDezff6G40kKsBEHfJq62NJYqjecnHRtT1awvA54aTkiLlIUdrmG/N9Vnmfn4Mnu4EJGUKdyD5OpoOYpAhSeEITZJMekerpgTpSEZrDm8udFbDgjcwjGzgFfHIPGf5yiE3s25fLfhoKs/+Nad57gFvv2c6fmub6M9rh/RnU9fdsmuprkjMsJXX0Oi4FHedGotKPngblQ4yrr9b+1a/sOw8CejIAJKXazCoubSwsrTMCjd2MPB/SFbFqY2UJ2M3xhOP1yOKmtLi6g8Xgknp4R8+H1K2trkFZuNSFphH1XhFA04mwXvjp/c84Qt5R1bKicAmH7jbUduQs3Xm4+2hw1tHlLVlZmkq+9RZ7ZtZbA5MFj13MP+JGDZhV5ul5aT+GQoL5BCWG7xBnP2BdZmiobNKfYPC/TdFjTU36/1VzGo/4Bj5zjirmKuhyaHzLjmXEbcAc4cTUn4KQ7QslTR78d9a0xzetkn0BxA5zwd0yxQdifz7xJKLBUJ7Zj20GHCQuzQdkpq/4jbDZKSFkpSa0izob3DSkg8W68JY2NzioLdH8MYPkGMhClOoQzRjXKzZjwxHybgpIlTPlVfzngcGAWUIdfs0hn0sh55vpgiVLePv1Kfuk7IOr57p2r4hhYrL+AUMego3M38HkWzqtGXOGyorXKr40odaaqjXqz9YpbOATVmulcgbIeHw26E/4+92EBtYF2gyr/8xp5VwlACs1G2AvAdV9tyiJ+FfQ/Z1ID8ZdDelolCWRkJV6wNAxRlIqDXqCpwmQzN0Rgh1ng/IXzzVLIDuNRZLez0zhPRorLWTZwdU7B2OfhpVyPmNlI5jDiqvooUZXrLTG+//MgZmNYCVpvmM+sSerOok04pX71yknDOhGJz/vqTigbkYpNWauRksEoDH2vf2/Je4hOlwV8fjb8BR9cUetncUe4VWRJp8iZteoKyPvy1qmseZ5zPE5i2EdlUdpFhF1TIE2UZHvS+H4tlLXCt25vv37FK0vNID57DfQyF431FLXrD+hSV/W7Sl+V9EAajsikNkGPJYSmDEoaCFTeSdU09AYOqgZ4TTQoaC09O/sYr4OwvIemuhzynUsCMRajE5LR1AZw6H6jEQgFC/auugYXT3FPkEcb5wAaQdKO7qwCsNf5BaUsQLR5c4p1X29JVv1AZopdNkRrJhokfEwGgyqDEnB/MQG27Pi X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27b01dac-672a-4853-cf90-08dd127d12d9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:35.7965 (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: lHs4BO3bsEeoff01WJxPSKVxXpm2WkuSLslVvjGx97sApod0PuDbyEowjmyEbV54CUcd8U6dng1oiZ4ccVMOIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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 2 02:56:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889871 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2056.outbound.protection.outlook.com [40.107.247.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 442B927462 for ; Mon, 2 Dec 2024 02:57:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108271; cv=fail; b=pzpQ0veuj/qJoXNRRzCRopqXPuXsNg4rJOqpWbaTDLAUa8xJqfAogRPxqD5D87IpDlw+rt+LmmpTLhNPf/6aw272eKi0GSwG0x7Mwgv7CtZk/2gSUZOL9RHIqW4QqnTdSKWOEX3/h8q3kanZQ/5pmJqLsyMhE9YO6UCnhWDtY/o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108271; c=relaxed/simple; bh=8LiYvAP4RirRdVSzK2/LqS+a86jCa85Yefjk99Eier8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cG+u43v8gtgNb7xcPlbv/VB6Pibuo8ji/qbyR8+sWCkPAKZtaH7s2MDbBLalY52npeA4rMM05APMnLeSKTWsWOoRugWTt+azUBW8VJ+M88FpLZMBKivED+99xEvtg3uj0hp0bsiZWUOL/iR27XjAJ7JxOGSUao4mb8jfs/QvkcY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=KfogDmdk; arc=fail smtp.client-ip=40.107.247.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="KfogDmdk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FNNW0dkBBkCssgbQO/8H3WrZwjg5F8zQ6L677hvLUxq4gaxArBSyYt0phwzjYc7pqCNsE1wlCqxZwx67OQfjvmb0VHQe9gp/wlgYfeKE62O6Ue7k2OYreDBu5NGQj0WSu6D41TW7wPsyUbqAiCAf5c/gW2vTcn4w1iMifOL1a7gQIKYA39JwzvC1IUoTNICvomN+ITVivpuJegKBzM5sQ5wnDS2pBXP6O76SEWWDss1CI/8zOtPhX3t4UxN3QJasuWA/xuyUjBwSmsgSTtuhnLfNVE9qBEX9S/mrAAxg8CKQBmEfb3NnZejcO4Ef1i+2MUkAQWKDpCNWfHluuMhaVA== 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=eU39M+zzs/w8SUmYZEHJKeiTlpXjwuJJblw9OCcfZqo=; b=Ys/AMWwVa8JtumhLZHijczDWPVKaxoYSkkUAU7dqxpyiPkCaQb9UFwhlkCZPuZQDd2RLgv0TMEZ6WGBJ6Cx3N6niNVtNTQIjIB9WrreLkZb1dj4l1FBqVzwZMlF385WZtA7RyDNDUCHwENoh1DpjCH60LLnSBfp/f7EFYEm1ao/pJp7aMrsnYbyp9ds0nSBdYgrcSwwmbNsExWzb0lPXXFeYvdarz4NBw1P9IgjeYOnnl+5ZAu3DR78y8SPFPQNH2nRozWSY8WOvFnwlIgPkMRZkqa2N3f5T7iQURW2TH5qGCDKimt5riEqAUAt4cEPKmZhveRacG5GkDDKx/we4Uw== 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=eU39M+zzs/w8SUmYZEHJKeiTlpXjwuJJblw9OCcfZqo=; b=KfogDmdkSsgwXTdC0wvpKWOiEQ4RaUIIGP4RKqTzLUuGQ7xC54v4AFoc8kdDHaaEIT9YnFWM5TsTNRbAoEWI8ollFjXa7lEzivBt2DnRSliy1WJy9o/HGWz9zeRuApS3ekY+WL7cuVIYziSLBqH/Q706iCDT9b41p0/rKSKh/q+leQcmFI2h8Cv78AEh1L3CDsOIGnToqrpj//624xWd42JRXCxAArAHiGxksE8hyu7PEWzRdJXq1UUARcBWRtSwHR/653Ta/CYWjv8LyBudF2JCmfvrAUYq+uxZfVpKXJ3j3z8e9H1b8NniLlzG13BO4qHpycvinWgT9PAzX+VRbQ== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57:43 +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.8207.017; Mon, 2 Dec 2024 02:57:43 +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, glx@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 v5 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 2 Dec 2024 10:56:26 +0800 Message-Id: <20241202025635.1274467-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: cfce47de-bc86-45d3-8646-08dd127d178a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: vqVpwgOsrN5ujIWIJbpXmlDqu/prO+VS0sqaIMD3TzNWCpkypr23Qd5xwuD6+jZqAmauDJp3CINhRZlzuzGBvyKIVlWIrr9B0Yibz30UQXLjf9x7P2mvwoJjHUpjNe63hJCG5zawWodUSKhzAhKtpay9QuSGdD/mNDxvA3y8A2iUQUeTHgSoWKfjVzL0SKWAkjvs6omTsiu3HvvxVabUSOJjXvm8kCzYuFCBG9Kn8hQ0rk6NLhZyxPasnLuwji/Mi+jXNZFUsSopGw8kaPRL8pyNY+1h2JA0iO8dZvAsnGIINPKVanLVk6mHGMsKH/EAgnLRGU58ZurlyRFWBP/+3xX57cyNfpm6ygGOSjNR5aCRYFnahExCowbGlIKRtLo2Y3P5F90cmLIzbiPSMycD8m9sDNH+xn14dePbjV6eLsUfAo55tRJyv4nuBwWTnVJO8Eo05fn3Y5A1lAIKu/UjTQ5ifLelvfqBausFXCFSd1L2thMFZwHKHAjmGMv+eHVDVK0lWSlEpMa3pOnj8ach2P9ZXonPERGEFZABKZ0KXUt7bCAUm6WWQzMT+G2nWoUJ1Y/R6m0odBlyXbNJVRoMA/WPXcgPKL522DCl0zF6FhhzHZrVpLVTtgV4nMzShVtpE35H+l+iI6s5ap6pKRL1jyWFAYP/B2FQkqau1fXSYtQ060kP1oK5AETPbP1z8dObvCRgmUBczcS3lWCgP/TRqMsk2JvMRMmbi2+jtMzNrwB/Qbnxgru7PtMVcW7p8JwVs+vyDF9Jh4S7HIUcvR0Rhnvg5DW9LzALQoCfVUk/l6DgsybkupoV5NjCWbqV9CH6s2TOZb2nktpwvHJPekOaHhvVc7PdmwWOIpvCEA9WogBW/qxFyopKr6ikTjf27Z3Rq1gAqF3gGbPWOqpeBRD0HWbqyI/2VCIlugkub/q9TXzlv/0HQYzfTs5v70pIIIpnwhzoXRUCS5Rj373U2zvYazc1xl8uTYnVUfTaJNwt1kNwYVyzXqGlq/UEIoeiA7wCEFXc63qC1R3OnlActE6dMExRD4iMt8T9MEazOvcE8Acqs3i4/ptvq2gEvIANprknsm1XqirN7EgFXZFsHR3lnSwkq4D6EXLkTEECr3OkwV6BXKvRGV7QwFizMeR7z9Yy97v0CEfq+UTIEiurYwQ19nsx9+pYanaXdZeZjF57AC6mR/nmM+A0VZtfOtI4ce2q2zb8lacRNWAtvib25wiuhbD5hYV4wc04xvUsXM0voCDxgRBh1r5l0duRezan/tWiic/2Gk2VPu+OPqx7BJGKTh0RRfeK+aYqgeBPF3TDoDLuqwAi0c0f1P17hLl8/oBYunP8HI7eHzNg5BQZOeDxUAdD8amJL0LvydC2vSpLaQauN/a+w5iDp+HB49YBYk1055mV3fz1c7tB3MGp1teZtw== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JQkP+He7ELp+3Qj3SA4bcP5DsXFHF7JhA2xl2fjAVS/1UmVAHL5//fyNoxe0B3hNU+a+XymPB30qbxqRLl1P3bA6YeuSiADwfarMASUolXYeO8K4UT7QVIpUj9XWmhXGCkXf6t4wBRF6HEssVQ5L9YR5grgfZMxxQjQ1e3Ra2zlLYR/85zkyrisam49i0WVcgcBbK2bgk2ChVq1eR3vVHk8nF5qQZrcHj+8lI7o/wC09jviBrOldpmKLmPNL4nAc3BSNadH1EkPbeCby3PnftHVZoRjznjMupkCMhXrgRvAesJMpXA/5Jm5+eXZPwSB7y2a4M5TcxPCoGoRWubNc3ZIjd06xUwr3umiIDCqzO7Rp5PVhZl31/EUM/bsBvWsudYGXg520dKJAn4BcJnVrgOlR4ZlKYRPYPy4K9vfQg7TOGo1RhEZPD2ibAtEX/1gQHax/ZRAKqKPkZzKdyLi9sCUBjKYsMAi/PS0hQd5J7zOST9kGgiA3ExMaSoud8NAI2+SO+FP748sMbzQb8ZxH9ze3U/Ge2iIVHhp0YzTRymcXK1t4bEXxBzsVc+2/h76ZTFsiXRHBO1L8S29uHp+ctrEAyFDUXi2LG41pPqPdB7BQaBChz0U5CGPmZKt57a6WTDsIie1tdQf02nD2sOwvT9RBXw2mb7zFHLiW0mldcZ5DdZoIeTJQQwAA9tG/TxjoY6PJGH2skS2MSltpeN9z+WoQ5TpWoVJIXOhPRoQpA5QQ0KFLRHLyUd/7pwRpBV8vGDKSZ8PCF5EwbbUgiFwdlT2MSsSbFzd5par7iScryIpILusTL1TyJ3Daiv2cox1slHSMwJ8iXUxYFrNBt0Esknd//bBsUyOBUKPRsHR3DpDXA+bu4I2amGeqb1ZhPFcEHbXhfknnr9oAxy0GE7tUx/6LXwohl42+zaSHMwgnNIObk2NMYGmdPn9laqhr83sp4oDjYfy8oU8zsEDwlQ/0rQe2kuCmNegR/powtXXDC1hCBKXbNxV0jRYnOWIW/8jW/0auEXo83N6DaFkDlNZwxWkl4C5UMUZi23h50PbFx4CTfGkfGxcmzxaXjByxdFesdX7+4MBp2uRQjCv5CLvwpYzdSK1z4w+USLURHzk6m1jSNXzbVSdwfe88rgwFD0iEMBRxk+rZtxBkT1uRimsuYEJeI5OpaBpU6tLQlqX8L8kRNVFl/F5rhgFPhNMVLJjU/8MOKvnf5UY47CMpeyldtJbzQbTxP8UEl6UVJVNg9vXLzhBP9LmrcDYXj19GTLjeWH+rzlHDrSiNY4nJNfBun7FkjkGB1bJHJxoNFYjmhf+vSlnyeS0eRq62Iih9wlv0DMpn+0e2Bu7jjXZerT/SMPc4Q60zjqJcyRE0siUpVGW19K9kQCXtx4e7NHjGuEb+FXPcqfhcQIe4H8gJyYijSUCVq7YqDS2xJRLkxZNri2jgi2LGYr2LRUynujdGDSQcH/r3qWrmG44yp4MyXoToF08XMyODurgsFhgaWEpkpr5OrqQUiODOBftDZ2gOZ2WfiwUB5iL2FXLiuoy8Yh3DwbEg4JY4Kndq78RH6cWCYvMA4DCXMdVcFx7ZgjWKITuz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfce47de-bc86-45d3-8646-08dd127d178a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:43.8239 (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: CChvk8OWattOpE2pvZD3b8z3VkKgQdJtQAZ/NGtqdhGB+2BkdCYABO871dAWanqEUW6ixsmgNSOkBuT3/O7X5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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..d5e20b132005 --- /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[13]; + 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 2 02:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889872 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2065.outbound.protection.outlook.com [40.107.247.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FF6B78C60 for ; Mon, 2 Dec 2024 02:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108276; cv=fail; b=tR1O1++yTmNgalhfIz2aDwtLF2nWWECaBNx6QVUsT5HPVhnKDTOq3QlbVNGMTjXr2LvOYBKOu3phPpPoo/60M3DcuKDDzDM0n0wrkvTKFKX0WcJpuU43QKR3i72ZS5Y1yApGUyGUu8q24i2ndlZSIG7OfwlRHdTtO8Eq/Qj3TQI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108276; c=relaxed/simple; bh=4DyzBhvVZ6F8rfp/XqauTkqKa+snDQNMbtBu+OZWWXA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ndm7ZY/aecGPlED0J+5BY68oWVaaUlE4GQwj/KOCxn7b7k3ZkzKGgphz6OBiwy5h0n5KT1GxnIfMBqFAMyGcxxHK6EDFwBw4MRh7U6gDSmIgia1wCKrVmW8f0+hvtIYnl0OfQBokxWu8flb6ERY0bNy6TCmEyDF2bqzNfZ82X4g= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=KQhxJ3Wr; arc=fail smtp.client-ip=40.107.247.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="KQhxJ3Wr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TIqym5byNHN6CJ4q8cFQdnYRCgLPByo8ZbSI0apgAElWUny45do5vzSuNQX8RvwyjYwHo1LM7wQm3IGjThVSYXaGtLELq82ecAtlWhYcBs+qwoBq1HjC7ZH2jL+ZOuAkZ1n7t0f3wgmEaM4N3t2mNuw9ssVWpXg3VDcLFlgaiEkZGZp0gqoCExVxp+JlfZM9wP0pZkmIifyd42kQ63f5cWy7QZdgZbzWA4iU28mnbqg+p/0TTnqHuI1qVdUB7LGWp4IE34LV86/PJNoVCD6cyh2FRlDd0dpiEyJCoDcUZiEatKVG1c6JZZidoEH8LoyZn3wtr4bsqgqAkpexkTqlwQ== 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=DT9jWUHMyqYCkceLmdw6GiE/P7me1nOJ5tcMxjZ8KI0=; b=reICcdqt4FtEwjskE0CTxg6PiIR7e9TluEvvrpwfOO2BGwBe0E+bL0DF+C2iI+hH0s7aq1Dq8LWwUItcHHtsI+Z7fvrI9/+UcG2iQzH2fM2VERj1ijSimgVQCaY/T3f23n6fy7pkRURvzDbw1y7N2FbLxlbiqXvmMc3ToOMc2Ax+hCYGezbocJaQtqFRd/1ZT1EvFi7kFJnLgKj3a5sTQl8YpZDIf3tU+sfqeXsI0fSAZfZki/0l3aeaDEBr8NnrNVeHRj4NUu/rO615uvWkMaAmN6F4axG2v1cOJb8IuLuMCEDD6MraMmUkSOfKFicPaU7jOxfVJkL8NzRPOYBisw== 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=DT9jWUHMyqYCkceLmdw6GiE/P7me1nOJ5tcMxjZ8KI0=; b=KQhxJ3Wr1X4Q9r9nXjFzQYlychdGNSOkQAsB+6Wz7Uz5dvJTMY7Bx+QimA0ln0i1WCSH/OYAsYM8hT2Ov9YpuFBc+8f5a26WbJNdXTm+h0R2gPZUD7i4Z6k1+qic4x2MWjjeE8MVX2Dyitwm4QHSNGosBzGU4u/d6Dc3YFWCTmFSRFkVS8zkrZS+iamni5+qq88vVuecH5wHabcWhvACK/gXcKKUDM3gFwIptyfPJIrs5TwT18T2DxVAl2zmTmFDH8inILmEtm2qV3CpBM3jwrDYLv+K2oxiuXiixaiRi+4sc0jQ/ZNalGqUXzHIYmpNZ3kiNvEIfcNUPK9YSxBPUA== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57: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.8207.017; Mon, 2 Dec 2024 02:57: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, glx@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 v5 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 2 Dec 2024 10:56:27 +0800 Message-Id: <20241202025635.1274467-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a4a035d-a023-43a6-15a0-08dd127d1c5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 88OIB0RXdkAOQBAwycxXpcGRlfIoe2ae1J/Iq4Ty+vdtcTHqwwmUcO+EFg0uFn8Og7B+NHdm/UVxs9frpSt7cAJoBADwzTOSNPcHBWfGSzGf3MKgnpo8SVyyc+AZ5/bOiADWJMYJeXu3DUe2ksvhlAk9IfIsf7+JjBKKJR9wf/3pmAj9dPhTsavfOZbDnTgcpc/odCqk0KIksqvIWisSw9sYxtDjjJ337DxelgMG1Lx6tJ5VYhDiMPxYX2W8FRdrf8Mt/boD5w6pkk+Dvw9qt0IFfLAlicexHibZXbuIDtM9Vumz2VtoXng+KmQNUWpVWyw+JgXKW/kAnxf29gkTD11WVcnlEa3ELmflJYWF48M3EFUMA8RUHMClpI4LaQkREt6SxLnfpegkb20bRioIePcMvNQPuwbkibKhkQNewIk45loACnJelcnSoVaSuZmwNu7JP3jgIxmKv8vUGdd3wOrUL/sO6q+BNOi/M+UwLPXj0em/g56oLC8qmHUioAJ/vrUzlfEAA+xkp2IJux5XK13znGrFgkK1EMtUOWu5NNr91Bu7Yzm7AclnFcTy0GyWevrXMBAkK9MkDHdt0Slx2PgZohgVomO0zaiYNRtLALdLHrmNWIvGWrqJ3QCaamy2CAs2PPBHCn2iBggtvgNEbDI34Bi1uFAU6QvAwRHJXTb/CNvnNo5JmqQ7CJsO0b/YL/3/nITYo/gsefFgeupfMlmoeSOFCPUYyE2aJv7WbJxn+ZDwfwrbZpCQLXs7UnQw6m4Vh4ajlUoX4+xi69NwrM8H5s8v1O4+t7JKN4I6yl/NqAbSpzkxXfNCu7rArxU3a7UHS3qnrlG5BXiBu2p/CwDgjP4RyBejuK3hlkH3+ffHJ0nSKCg41HkaGTW1mZMt/27sVOiknZfZtvIXjYfZr8kDk9w79bS/uVVX4RklR21kwcCyOSrGDgZtvmitdDgUsUyrxKCU80QE817nDnm7qsHMVRf/mUq5lDEeZCFBSltys3orK/5cLrkLmRHkz2vrJUsao//erccgsv7txxJBq31edz+sU9xO53Sqn3qN2cDRg+bkfYE65JXjRisAFvaDz1vdasfyjbeBPw1ObwbH0uNk6UOdzkc0b8GHAyRxn2toC57xuy4zLMM4LCTB3sa/l5PsAx0wmCTgdrJsYKOKXbkZbSO0sILfW/PJOmZWwjOWpownyxW2wWdXffAdH5+5hdajeez0p2qT6fFLE8iM9DrU6QipUgXa6Sh2uSiAsynNLYPWj5yofkF0P+BRzJv0tQqfOdQfTyn4NhL6KWqgk4RAYAk4/7C9S3JkQgdZY2cf0ODcaZplFpSxA52I+43pt4tqCnafFUvez+jJKmFfQl7QFomQ8e9Svei5weTgXpgHnKtg9twOAn3HzMhRR2qh1O/KPMIM43kF1I8IPZmRKg== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4oBNPFy13iKhJL4UeDXN4ldJoXz6oBcINoPkP2alm+/Tso2KUMtMGXY2RB5aQZHIvqi58StmZ0m7Uh1UfT41xw2brnCoLALQzpynhM3WkTE6cN937VFyCvGGUrC+RlqCDswm6ar2cchFBwIf3dJTMmd77n7iZTP/EDNHQaOG2gZNkRkbdGoJYMmbCBUFjLvYBHBozY6WIvVLoH1uF873O+FNRCkUQTas1IkvOKNYePSeC9bfxg9+HaKri14DUeXpYjeAxH1W62Hs0Nu7z2gFSAVtd0+9JppwXT66pjuD3g3eO5D/CYfxiEdXcTs2WavU7pdfdBmQOstHBF/gJYT1nt8iE7hvUfTGJTh5/456I6CwyqC7nJAvMxrFkGyXDTl0f/Ls5sWyda9Hhtwejy7AqfJ9Cnai/t3p1Tfxlo0QVakaDzpuhfsEB4MxPbotPoE7W7myKy1/ALK/4nAyGysT2OihoNDtSoHb9A1f7vPoimHSahq2R+bzjpwgZD3SQNPz6d2op9+FwY4wcNKzv5VaYNNB6CTFR1RinB4o/VKu8vC9m9YRh5AnalWziIrU2VdDML9UuOReatrm7T6a5QsNRdW4niN8QExDlp60/MBCOTNgshKA+0wYbYKBcn2O1QAZu5F056MDZU4p2C8EvE9mbnxOtfm4DfkhKKH/SCMUbdXjDwlykT1c4TYmDwpVaBiw26unfzupGIctpEP9sJbZXJRKNezJ3s0C55TXO41FoNNdu3EDClVsUcgoKSK2cuf1e59dz14RdsIDrWvOVYslkMA4wCtjT/8YAbSzonqxsjSHfFE5Po2lwCH0/pXhdqKedqrrV7NTSKLyqtNr37gGva0weJRDExAoqziNxBFtaWuVdw0MoidwcrOQs/tb0EU8pW2eKrH00GSJqqsQZtz919KrTaBBqAcJ+Ixva6lFLJkXmeF2bbtH7oOQP3sRNvhK+9YVSh5E33Wr5CVwx3F3fbQNa92EDBbt64n6tS+7z3WeWq+n8jT4kM3sAUT+rUxHikQ+az1/HW9q6d0Vkt1E54E9avhl+EZ9+ygCxVb4NmpiP5ywfqt4L3SDuD1KZ84oYbsWnBETToaCrbP29178gUTbtB19it972oDCE25xPD2ZqVaqLxdQt7XQmk38CKciWQS4CBvpKYqMh7IU2Q/5qlROIKQMkQNioRNkaKpMUmvX5QquW5HmRMIQUgv5k338kBZyq0nZ8zxeS1Oe8UCainPyrBGWthQr8s3gHpTCIb5N+ayF9ERM6/7PMuYFEYX5gYiaegh7juwaB+fK7aHG2djUtegdeyTgmHtgQf1NyTRbTTM5IRsynyAdpk1IYa3CV8/HEr4aqg6wrJZ+lKv7eDj9d8ENfO9dEikOc3o8t0HpMs0T2qheqN9ueGtR07S5NZrXBgjfbabcpCmkm6wfLJZHIaVlo3CwHCzA46V4TfHbSG4Hm9cm7Q5tnlkgWQjLPo7f+MXw9j4X8bO290A1GfhSurRk7J7EbPC6DMOoV7E0Q7hHk6BdUV1UFm1eF16AmOCv5TIla6YTUmAh4rr4CrR7ngrmAAy8HGegvKoAK2OJ1iLXud8pEmFwcPxtVVP5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a4a035d-a023-43a6-15a0-08dd127d1c5e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:51.4811 (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: 4wH4z/5KYijs6BA5/fEX8RwUgdq+WApxgbLD7LGxqHbiHu3b8lFhq26T5tsY/gJAqo7w7o+4dmZwV3bazmgQfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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 2 02:56:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889873 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2058.outbound.protection.outlook.com [40.107.249.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DAA955C29 for ; Mon, 2 Dec 2024 02:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108285; cv=fail; b=Q664dDSYfg2kcaRbwV2KBQ9XDAD/nvgGO1kw1GGDuALlbVNwf3H3L/eMftzEuqTCtP56m9GIS3zk7ZaRfIy92Q1EuTbcK0E4ZQHFjDnQQJR4ZQ0Z4hrrQJu+A0SOs5YOzxdwN3H/5wu0x42kdklLtCj8jAMh/rq8KeEWQPpqlRQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108285; c=relaxed/simple; bh=/jpv6Z8sZyvBzFB1Gjr/gQPla29yP9Z8Y3c/G08zHJc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WJsVyzEclquQvTb3NdEvYecrmun4rELK7rWR9fbRjAcqkN4ZG1qqySDu7JDj4bvGShYPJhBzZ6LAA4sZRfqN3RHpwhuV+x+BGtydT+i3+Mn5vfVp+Yu5cwDhtaoEPQ/x6sRnE3kBb+5KfPbMjJ7ym6+yjM6KVN/QiyKa39AUW84= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=EXFSgQ48; arc=fail smtp.client-ip=40.107.249.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="EXFSgQ48" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vcz7cWnDD3z/9A6I+Hupxhv+3qXlEisI4YBUlZyENJIU2PZUNHzUr9E9Kh7/Av4+wNJy5QhVUGxmJMDKiAI9v0mnPmfOiJghuUDR6IHVaAbUDpnvsCMsa7wecBTn5HtKnJduC8unptnGn//EYe4OwEfXsABOpOyevE1M04Gtm1QZ3Kdbxbf6r+/JIOWtGU6zAgzvZV9mG099g0rKmDTuUUjbND2eKAvkZGvVKkzgg9/rd6Lgy3180+XnW/G7302C5JloZSNsWHXeWFWb+LYyq18xh9ZiF2Xq5EFWJ6LgtMNUVUFsM5sGum8eDG36HbV6uLKk0njRhaAf/m79sM+EcQ== 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=zJkefFtRVTSeSYlFVJSuM7zyPrDrORLz6Gm84DTeO3E=; b=Cvy+6HavesHPSg4EHVRcb56IUrp79KXAYcoqNoQMHmWcdTJjN3iU8n7YJbqRG8UdUEvY182fNrN0yiiok5wqQ53ROIkgk6CYueX9lqGV2PmKwx2U72Lnmi4BaJ84peB30XA1Dkw1E1zHRNCK+f5yfDPILokFTtvP5XNz7856FmjOHi7asgLP8mmOv0dJoex4m76XNDoiKrKkXnz4XvTXrvDxPcixo3mRyASpJXTMXwvkRThojsPEnOpJEFklMCLlxqYXcbYnZxQqvF89aguC3zfuq1cav2MVdnLrCW+P8jzSiJynl52e/rHh/boXiFcUTn3Y/LbSwlom3ycQ2AdOXA== 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=zJkefFtRVTSeSYlFVJSuM7zyPrDrORLz6Gm84DTeO3E=; b=EXFSgQ48hN36RwhwQCLBfvUexZu9gyYtfRzgWU4fUzuCGkP+9I2W6r9H2/by4nZG6/Gl6gM4mE0tKBcWpnLFktz3aEgLi5xD/+KtP1Bupm40VF3dg93FAc87/Pea2YRhRT1+8AcDgDO1oO0782RdTFh+fh7vEcpG7bDH3woTPoKsNIdVKHqq76PP6WzFV8txGPxD9HLxp8bmslJ+wZygnMyUcYEFx0IkxxjiV1zE+QToBW/xfbqTLYCVJdVc486fQAj0lKlwp4542ZTf2vR7nC+59+MS6p/MjcztyxvrwAQGsqtnuPejLjBPaHWca6y6Kc6rAOOkLhT4b1NK3RqBbw== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:57: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.8207.017; Mon, 2 Dec 2024 02:57: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, glx@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 v5 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Date: Mon, 2 Dec 2024 10:56:28 +0800 Message-Id: <20241202025635.1274467-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: cdca2e36-9df4-4c62-315e-08dd127d20ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: LIbjYmoIRAZrMDpfner+1+tr9cxU0mbj35yORQVgyZ+YOXawBOWZmYB27eZjbxaPKC1l86OQ2P1TUROBTdD1IlbMcM8ZHroQTNr2qQi/qDi4eFwMYwqtkSjFrqqhHBAsbjBNXPPJ4Mf0dP8xcRwNEK6a7vD9tt7MTCBzwFQRJThmWYJKQWiji/VdFsGW1EsyzsSOqCEp20vLkkqyXdyswMhIrLxYwIuoX3U0vmP+UGNhC0b6Hy0WUoJ4QzptHLtQg7j5mIFdRrcCiD6yD+O5Aa3AMRWabRp3PtEIdnLt0F1PnZsOS8JAMSufp+X75sOXzq33TvV+V9jnmEVE4ivJvwdnZNZzkrPTyam9y0pTSW3J11R4Gq7g2BgmDuud3itfLnOxbnmp6My7vziYK3oZK8uSM08+yD1RS0kYgRNcviz9GqwEzG/z3+NdAfP+I0vsDxo73a9fax/pAwilpr9Iw/BBZewKp8/dg7ADQsVmXUkwlZbkI0KmMjFe0EfnkZYFhUjOkfYrKsooo55TQ4M++6u+bNKdyMjWKGXs5FYix7V6D0TFg2OCwaO40Ezn5RcMxfUVUiR05hVU8rttxaSheulOZvMv2/7Kl0RxgJiKR3zGHKXKLNdXMHBivhlMGF8gwTUaLLaLxKQscfFEdK13JE4Ue8nBolE9paUi7ZDmil7MQFCXxN2ACuWJQWaw119DcLsIiH2Ue1Ls7AtZi84+ZyjK6pbu1pa1+WlIDucoVGmqEmjuJ25cpt7KkHEwpBhE2BfiDM7GduHm6OKdc66F0G9XfKLZU4e/pXNxgrCs2EyIfOefwDB6sfky9BVc+ZMgY0YXBdoiXmfbTtRkwHL07XfQA22LzfQLkcNYBWSEMF1K9fWoF2JhKoJoJamLr0pfApDx7ggxaNu9+EAgEizA4jdfG0J/N3reXd0+vcHvnVtJ0U0Gqh93hynxscnpg24tG+etHXOe7MJaLFpkFMwvlA2MgiDwR22u1sZ5UdI61N6O0ihgqzwhsG6jPa4wZwY9pHoFn0kiJ6NbLp1u2Sapv8g8z+2xCOskIemqn8ZkdnzCj7/UUet1wQzxVKGr7XXsh7/9+mTVJiht3AyLwlihlANHmaOZsMZ282m7yFu/FalnY7KzU6oR2evxC0kSm38VPVIWH6NLi7ovgmBoQjmBujBiqQrSInKmZXYGRoBb0O7NBKkdaVhxVyLoBFjlT2BlnrZKuC0Ys0XN/KXGA3ue1hTD7OGxaWcqbQo8JyRUL2a+HHRSiiW83ooaGvxLF7xBiDzmCx1CYhSFttBzVxpug5SEQlfX03XCXew3bGtaIdVqkZ+nVBjDDGgEP57bYWurz0P+HAam083Pv4Zyq+f81wW7yoRKDyBNn74plAj3uYOVSqBJLJoXKfFX7qM52sW12bttkTNwVEGn2MSCfWVuqg== 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)(366016)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7Cx31QAAyDi78JamvC4hvPTYI1MErTd1oafrGcHanW3mKq10mY4PP4uby4oYP3wWOf6TtmRlAeZxCGt2/McIKeKLv0+VID360GEYzdjG+kAcHKICfuivfeKw6jnPfiGKu+IhJvmxkXTMxG4pFJEe5m/AZoesLbHgVHogQTXTGEGqdfUS7+LXXAljADtEyqzpxiqWj6bliSDCWBLKSbyGXv6Jnx/r7DZeyI92ASKXyFRG4W5dB8XxV3rUMST+MlS80a2RNYO5nwIb4r4xOR7JMeEH79bgQh853VH1XYiJYFiz46d+7Mqm+6C6bOU+XUZfJ7Hw61OA2lsE9Wq0dcJoqvm4K0O4CyG9XKs5UiOL67Atuz59Bp02ebdR8jTi6j64NEjZBIlvzSmf5o4+HYCQhNlzwwJl1VhIqZ6QyIY28AReFTW3Ipy2SbSFfCGXZan3pJ435Aoid17T6GzAHhn1aVSXRL6FAVgE9xCYxWRUfK3Z3VesfkIE5bgdokD7AeBgdBKKTv0D5qkd+iBX1kLFM2XJhZ6iD6bqA8n1dWKY8H33RWm9J/idwDXNPc43HeP/w+4+cvvQ7CPzk+AK2v3ltOx9t7/VwgRKGWwyF3l7PU95L+JU1g/DPGE9srFtCfwap6rfSsXe4Drf9Om67HZ8mcuGoR2SvtGI3FsYX+dIprNxyii9DfCcAWuHaHPUC4WoTGuRORkQxD7xor74Sq2DUiJx8f1S8lCLo2SVs7JV09Fhi0i1BOItSVH/e18tNUzQR4AQ4MiBDcbcILZZi8Co/gmKxKtRTiTGWghiAUvFv3GOAFsvrUG5SYseIgaOUVfOsO7kSt0rZAsjoPNEAEXAzeINmoK7PPmyqOcj8JXutm4KXiLMe5YnU0N7VSRMWqzp43NbBVqFUfmOLMrQagxRyG1QwiyPgf81QTXMERPYlpegpbusELwcr07lKZl0EdKROiU0sE6PkBkHHmMELdukXCP7451s3nJkejHwrT5UQO5eUmJXr5AdBqIBzsVZKwrkZbiPW4aCdiBFd097eI+U4lXFGvUTzxjVgVukniYZdSEvlTfaH+FHQbvqLxOx5esjSDtvyqgGx6Oa+92U8svtgmnnUr9uSevJV8sy7sUAUd1o2tUnZynrfnp4NXOkucODVxq1KaQHyXuYqwSgduaeLAHqCxyZyOmoNJxT4XNiwp0NyIGLekznCTfMtniw7Tc8v0aUL89Le2LdJREjq+yjcDF/2kD86aqubLXuJwQIJFaAqV4aaya9QJxmWTZPnXa5RqV9k0ucz0rezgVkUCcyp8iSaB+G6smJOWby2KzFBF53Z0u4WAzNnz7YYgYblB0tx2bhDJJFLxERGkIhxG9sMyxOYmorYNfLjT9i/xNGIH6/Uz8PWM5jIhvxA4AfdxiKlOBt6kAqBqqXEVvI3Tv2hBrQ1YJYaXGYNZRPAu2FGQnPSb25xTpUBXNqxl7OGVx5Q3YH82AnHdUOF4z8mCF081qjzRh9DzkwZuaQ6indPj77ufXkYD6WnL2lBSv890ontsKLqne74R5gMY2w8BIkQIRaeAadm5SehTKKrD+eqvPaqO61YPCg0piRHp5R6Uds X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cdca2e36-9df4-4c62-315e-08dd127d20ee X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:57:59.3654 (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: /nDkhMhvXRwI7bXwgKeE84jyZpnR37MHEXa359xkVKpA7W1lbL0/oLtykwhKMD8Tv5k+0dvVleT6tDitexWqrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 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 --- 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 2 02:56:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889874 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2057.outbound.protection.outlook.com [40.107.241.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1760813B5AE for ; Mon, 2 Dec 2024 02:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108291; cv=fail; b=vBwzB3Pg550/YeXSlsQFyw5MmWblNv5A/hsWt2VpaLj52BJ7bqZFeuXPBtOXZI3hit+1vM6eTbCBr5ECNmwgxBf2HAbgrS2ezScc90UAhLRpeDN2gDVIcgUivR/L+HTIhaQRIuDg+5zJ7z9uURl9kcBpEBcPj9okZI3BOj4+5Y8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108291; c=relaxed/simple; bh=SIE6dSuHqaE9zXFA92ERUX4axx54n9Y8Cvye0IsEd6A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=P/PzLKWvvdrf87/yDknr2OU6iJkK8KEauDDjZhQUQR3uNiKEszr2Aop7rosRsVRR02FGW5yIlUaEbgTUDEr+b0wIFz55w6AhjgDLEvH0X+2IsNtzgXUuYvOnLlo/HV3mbWuXwa1gEVTPabGEH8ljAcOMTStHewVpyeHba/XsDWs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=P8M1Mfve; arc=fail smtp.client-ip=40.107.241.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="P8M1Mfve" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BFCuZoHSw0qngSep594oSsVffwiKHudBr+UTbFcfnhqTd1Mm6iJTVBgwUnI1Zu+Wbg5Hba/zKajqj6sgV4etaExWD65BGJl2GVSx4xzTG9Ih59qPB/XshF3+IYtlJzhXqauFMWlM4qRGcXZXYcH7lFU6VQwA/+LBWRidFl4QNrZMhszKHJQz/5pAbtygyPyAdJEzEs/WhmSDnyU7t5ezuoM6VQVPrvagFKfXW83kxE6MpucCKWK7nlZ9Vj2a+mQ1w/OJvnZQ+lesKtTM/iDsfwkeSCmiI1rfFn5ku6WH/XQsLMvH8l/sAlxMB5F0xtCdGCw2BX1i7iseIU7IXWk+4A== 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=/pM5k0EJSLcN/apUz1KfqcXezVGjeb0AmhTr+1b7eXY=; b=XpWXnasfazV33/3W+v4Q/g/T0+0XWaNmzAAy/rP4cqCoDNkNOKX72cGZ1oc3CaruVjqLQThPZV3iXyzY8Z+BZgtwjonLbRlMHlqrs5WMVoSE1qlfq5V61zPaDru8ZJBtowyPcNy623q1Z8CC4hXq2ZR3IAKos2VXw1Y81EPnriQRHHH8A7k8fZSWr+wD6UalLLu8gKi6JdWw5cqWigbAnnr+jgZrpRz8sIl1HGdkwJELRN/1topl7181RZyhCQioW/Go1g5jGOLkHYwfkC3vSWsI8WUcwR/PtrYO10cpplAOsmKQSdOGP3fp3mMR13Jed0M59miNdjaIHPk2/kRvHg== 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=/pM5k0EJSLcN/apUz1KfqcXezVGjeb0AmhTr+1b7eXY=; b=P8M1Mfve+Zsrtc/xzUiLHkSM8cV9R/ELavhC8wsKkgUFuv8OKk9eaywygzclWnjlrTTuyNOXnt4B4Q93mk3QInWk5ruJJMdH3vzXInyLtnjcmMxd1PC5e/Cnbx+9IAKrwlBw+xXGpErx/Ouvp4eegzhmd9olZfdAqa7UahR1Pq66mGNWTVOPvfNaHxV7YTcLngk4jPxUYT/FybdUpKi3t+/EXGmWMHGofg7/3jRgnVo4VnyP2OpBaABr4VoLoGrXMifu1fKQsUnfqW2NBMtq/rp5GvqINYcQF0eB/g6VbEqlim4sEkBFKSPmvWd6x5lC8qTonzHj1MSalJZryGlAmA== 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 PA4PR04MB9318.eurprd04.prod.outlook.com (2603:10a6:102:2a5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.17; Mon, 2 Dec 2024 02:58: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.8207.017; Mon, 2 Dec 2024 02:58:07 +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, glx@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 v5 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Mon, 2 Dec 2024 10:56:29 +0800 Message-Id: <20241202025635.1274467-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9318:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ed231cc-ce94-4454-6f24-08dd127d2592 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|376014|38350700014|7053199007; X-Microsoft-Antispam-Message-Info: yUD411R/fnZDyKivkXGRCx+nfCGEPkuMf3GsWYyjBnI4ZTbURVVbZfNWWTsOUmyLK+T/v6wrSqvOTMcB4R63DGgOcHZs5JPuguyO7lgMXyNyRPEsr20Nr2tkgSCS0ixbZKBKmahYCV4lINFs05CueetE6XY7Bjkdc7K/jAKcoE8cn9QjKdIFKavga8WnG5ON4IdH8l8IU40mWU8xlFtYVpuUvm9gcICz69oy48c4Td6/d4SPlsInDFXcZ0z5HJij0WuQgjsQBicpzufRW3OMbwFnvlG+HGeaTcAk+8Obect1EyOMvBA6H5vN8bQnw5yKYzioA6Fp+Ix0grQnMnkPqcSFRovAJ4BOiv3hw/Pv4OzpI1yKp+ASrraAuEY/0r/6v6mz+hNvPUGuhXTNkWBGh7+mzIFrnFtVwmjYYI6lRNEuHrJcBktsZ6rmR/xDTmI8KQZU1EtPxSqXAAdnnJRMKX8TH78akE+1KvWTtfT77MYktTkdLU4Tc3Juapzvx16dH9fkNWrgCebINaYaY4bamDjPlOo4CfX+6sKv5GoluFqzxJCeMsTKep7lsex9rxkLR8XTgZHko7N0ulWuDbd7ibWNn5dissgU6s7MRLGwJu9pCr4YWBJWbOcFH14TTZgO7ByIAOzwiqXzB9/B+rE+lDaAYzbL3WNyZzuBvHh1jbHGqxHB6ySs77saTKZBECp7wxfcpPArXZpG7ELM99L3yWYsBqtkFIY9ETVT/Ijgtu84DfzTEiQ0jwfL7KRJCV0z7ek4ay6B/OdheWbxAwbE43FzctcVCT6Jtid9VYHTJzHeCiFpnUcuk1Fs7/X7sEGeyCguvVdQAoiW2Ky9la8Q3hFMYEWRNb68qpjO8Lb6FfjrKGSk1s5NpyU8aRSiCmoWlpWya6OOsYqh8Dgt1FRGMaropZf9WZ9FqerwO0I9EqWukN7ue1CXBiU3QVJhoN9tcPMis4ln962g5ovaT6t4GJEkwd2lVA50NhcpZPID8ciQcr3R41mwCqiawlswsU1rNFxFZOhNadyeXkwBhXfmTwUZ2roUPsegrM5J5DaoOsohAzy1sgTsBL65iA2dBsRXiBOVVYsVGp9VOc1EaQjJBeAVs08LhLsncD8a5vcmSXzCjIrAp2dXDaE7PuRqvjwdjbnBXqjcDbm5ItmK+Pf76TUYR432RvbJBaz3XDbV/wPFNtg5ISNl2dyKEzhemhLgkVyHfVJ7Dq/942DApOkMPJWuhxK0bxqypheNhEpjB5CdwlKUkp7ddh8rk6/E54SSnUwD7EmyR9ZXv6uaILxv2hcpXy+II0ifwOZJyimHdpjjiPDhHn/zlV4nJinJhakAV59LWQyu/grCKtNIgWDwUH/wuyrmImQUerfPLv8hto0= 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)(366016)(52116014)(7416014)(376014)(38350700014)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ukc8ezZfIbXd1jSRHtCm15NqLvO4QsemAO+oLP09cDus6Azx2XIxYU2eeCvcdQrR98YYpOH9n/vzTc9o9nQ1Fxt7+EUO9xQfNx1QaEi5HR7PxuCEYbCqyptP+byDxpoEEPa+uvVmca8pSfWIkfAgHt1f1CGK4Wk/SGDkzWqBo6B9+U11SfJO8f9BZJB/14gUIHTMfVfrglSaUX6CutxSPCqs2qM0KR5vKEjmLHQuZGuDeaYG/896dGYDI2UAVrGWnEMVqLn2kh9xtCs77VuXUDgnAlEnCdl8DcmHu+K/TzLtnv1IAmrq434NPApnFLDn6IFdtSNoluVne9lK/Uw581t3XR1/uHRfENzfqJ471tyCIg3SL7w6e/ubzdtuY4UrvfXXal5s48KPK0SWf1SV36dGBrg3bOyIfp4BK1COvnkbRg9Iu1CT3LZ2weYH7ImGZBrNc+qeTL0bX14AZFD1m5tjhk+mzVojoeEA/I1RC2kpPa88Ybcvq3ixzu9pEZeS40+8s+gXzc6efiIxHojl4L5WzYzhkO9A/b2jSKwyoATLlxm+6bKxUaWGbnlk05sF4ocvnqRNEJKkgP5/vRveUZp39Xv3h8ksiSa20vH08Wg1s8mSauoXwrRaWMdY5T+5TLWim8/oxB69xw7Lp+a4wLiEN6+ISgdusRrRi6Ntglvfx+tXEJInFBc0EntFIJ7qGgPWCEDMHyQjfwM1D830lSmoUCSXUY27GK/pLcTPBMMYrUeKUjCCe5nu3O3CweOJjf81jCjFmVYR7vLDESnW6moXobAqqRvj4froRcNScZAfq51urLfXPGo3xYTNeVk7EetXxev34D7+oCnnAyowUYP3N2PTV1HIS7zOfzl7OICJj3K0bgf0DoHPjXGQEESPGWeQyP6qTIlHnpH7IR3RCvZOCHAQWZd8H/HGrvxNjgcvkgN59eFVErS5Mt/9yNYNJnJNBnt+1KOt1CZbXqAO1RD71+B7R5aZ4aqK6hLrUN/Z1BaBez+gJCBjtv+vDenqB1yVgnDWNlfdvs3gs9MJgWGg0s832tZxxM8pHrYsHDFYaBfQYgh9xqJT0eu44ZriSLf065FQDtJR6KtDBXfPOFagjIx4XEUCF6BDLmA155ru53IN5nnILw0GoaFIKWVPPWKBgGxcPDsD4dMgEwa7zzrujG/Sr6BV5QYZTE5zTF114wXcHwBQWm/R/VIF3YjCFlTzmZCFfdFoBBS8gUzZsJpZxT40ZXsfJA44wAhKZPYpqZ5MzlDCr6CPpq/rHZWaIbfWW4qgddXFmtjeXcz81iqY+N3CzW8B7uTBWAOh+Uo3WMdUeWa0Kux6lEz07tE1ZudiKfxXMDD0qdcj+nZDWscjZJMsoe32gvptBYwOpDK/liMHzD/DY6wWAsqQgNEwneZ120lX9kKaEb+1Zm4EsLD3/cKBh8EoJ0/Pi7R9EdP3xuq1YvyJaIv+a0gvyDu/UFmVz54euWeVeoo+Uc87QEG9n3RRvDmTeiPmKlKKbE0AdEMx7ta8gBw5OHUFcq9mE4k6XuDDw29+SqgeXGB9SXt96G8bQPDZyR07SWVXpa3geAvub8/eWx1E0Z9EgZLI X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ed231cc-ce94-4454-6f24-08dd127d2592 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:07.0268 (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: i7Tzcq/n6W1wiBIC+nJ8nDwCYck7knJKkNHT1nml4fc7tv8cZrKajnf2JqBML48TnwKBfQrpe18lBHSlyzq/5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9318 Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- 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 1240e75ecf4b..f3f9655b2f00 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7675,6 +7675,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 2 02:56:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889875 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2045.outbound.protection.outlook.com [40.107.21.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CFFF13D890 for ; Mon, 2 Dec 2024 02:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108303; cv=fail; b=V+085rsMQF1lnpSuUDGZOyUsT0uwVYzMFWhf8uB+vbh2DpzwZ2Xp4sj/9lAmjNlisOeNvO13BVhyNX7ykcXO9ZTrJJ42cdW3Dq02Dp2vb/QOC8ptlQXySAh1gdyq8TuFFoBk+X6j5WJlRMwLLQSaq3nrruYz+XToK5k2xaU8Ac4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108303; c=relaxed/simple; bh=aInqMrhJvsFVMjU0EZ3qF3dNFojLohWfvybXAc9hLhI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=k8pFF712awGvVygzTpgz9O8uytGwKD+Cj8yL/GiD1USkvUzCREhDRd10kmKEu7qIp4dLRO6FsZ2paQ7bRn/L1DvfrXA3Ak+TD40dIKCdaTCLM9wZAepfV7Ys96UmRKpckK+KhyQzcRBixlKbdpW57+lEtHDxjmjlbT5A5DAf150= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=fgt8ttKN; arc=fail smtp.client-ip=40.107.21.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="fgt8ttKN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d4XhihVjspifdW4PLsVQRXXCSq+y+C4U4SWOZQHQ0RWuL0/0XnDUN7AXShM+tvxlRG75fn5EAsH83f55KBFCThh4yoPR+56uq9/CBZjzm6XMJ9euYQvmG2bfzbyRlNACY1Emcy+PtE/POL3IOklBL2u1R7ATK+sBMxnjXLq4uuTSD+UD9mxQyx2MPMQ8bYlcinM6cM6CF+nk6OOL881JHPGs0Ilw/JMouWh2/x5oteus+TqlTVkzdtv8J70kfgvXQMQi/z5R/viSeQTZoHAUvRxoMD2BseoVNxhgSGQo2xDkbOFlIOGyjqRk5Qju4zSpqtvPk4H+lOXkFquO+7oOtg== 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=3xSKwmLVZQHH3V/dac68pufnz3oIzK6qFtTNeYVv3KY=; b=CoMqVbOgdA5Mop/hJxkFKiy0SOJ2wX1xQv4nObPMTV7wOQupyMthIsycMq+rJtDUw7NY5MCBPqvU/v3K1fETyB1fFMd2IhBwBkXzi4VfNKx/sZ/ssZtupV2qJs+0iMLehji05aNceRTdeGyyUtQIJZSH+em40alRcEHgZp50uD667Qmbx6Ui3wbD09taSi/en8mswplKWoWp4oiNyfa3mvonn4AZmNnniHO1ctzQzm7flA6yO/A0k2DEMIluMcL2BK5XDI9l6aHdgUfJc0x11HolnMF3/sv5aRpOXjRG0osU3QD+n3tiPTvJAJsuuxJ89TpE/+VZra939LuM6IeU2Q== 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=3xSKwmLVZQHH3V/dac68pufnz3oIzK6qFtTNeYVv3KY=; b=fgt8ttKNxeRMNMWqSwpfdHQYArs+KIVENGqkhHeCaMnMYF9AZOZ0K7lTWpeIvCaviyqxE2YctIRgIFgQxr6w1NMzFzazUaiNNagmf7dgT+KaherhBJsbeD4i9eI6YnQByB6KAWkDq5vDBA1SnmNBpqctA8NMglKETuw9IF4Oh9hAri4sP5xP2cr5WR7EnGbzwJtBwsjtI19YtYL7lsi2zmEb6gqs6JrTWWFARqGaIFn0T7/RYtKzF7igve+KnbBJay/cj8+QqdhapQdoGPC/4btWFgMI4XW128/xT+k+gOwOMaWZ2u0WqfJYWHVHP4FDJ53VNYrj3V398h5MjFHx5A== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58:15 +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.8207.017; Mon, 2 Dec 2024 02:58: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, glx@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 v5 14/19] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Date: Mon, 2 Dec 2024 10:56:30 +0800 Message-Id: <20241202025635.1274467-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: 05957e5c-0fdc-45f5-45d3-08dd127d2a23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: vWaFo99e17AJGn59KB8ZD99T+fSKAYaCNBlUhNN07GQIJA+EqkAJuksUsYhDrZ3cIeS/LOhI2r+zhDHbiUdp0pTc0KfpgshB98CGUGszMLgv7SdY9FQDjO8gSFzdmd55InwzFFoxEpnfNACRn0HUWqgCbKAqgZVOTG+kbtaCy1K0ofbn5RyOw0BruTgoMl4eTWqUQC1D0prAFNzAA09LoalQR3p/NApYrtpqP2VY9bw/+WcFSX4UNdn08fDLuIymnyWHwKNKE92M3nXXE0D6cACLqP+7xv/b+AGDvkTV8ak7EEjyni9/QvKgNU97qx0o/BraArz7dAbRuL8YEueKXXJXglpCHYUXN2R3KSqZOCM+BRWfPvPPRqfhCizj0QRXzZVpXD7kjby+0k+Wz1Zbf9172Qrgt69R3g8YUpfiuS0D8lB9jWmeqAxM4UAddVRz7AVyulGl7c6OhuyV5daRO0ThoaEHO7WBophtBcW9NWPfmT0dPusktzzSPWQLDvNXdPrsYBR/OXzvDCgTRNNbD3eK7HYedQTljCSkf5fupvKbZz7GGd54d8KZ8K/vuLtP1DiRyXGEk2QjlMKAjvHgXa1BBWo46cIDm+tcCnok82BC4V6/VTtgNZwHYdN0Uh8SnhfvRQFIIPEjcxZFpejmcOfdNlbNmxBk/kyYhUNcoPLkwGi/7F6g4G3hg7/4ypOvnL5XKIKb5oVFkD+5BsFJ4aDDlJhr8IwC4yS6I0k62bTR6xj/B4Hdq4mJfhy0aTyA0JTOJAXsKX//4i+VQU3WnmY0v7IyQQJKlECfnKbUM+25W0PMxx1naF9L8pi43SLr+rrpfLeG2FdzBR7tVp9Wksxps+BZZC8HtO+JSqmq51VrilieJ1FAcScRer6Jdh/vkrSlxcNDPmYJZ7ELsUKLbg8SyVEa1MPJ/Aqle+1oH5P0P7JHkjWQ2O0tz44hpV2lRX0ZUGJYxKCh5NqGGqe4AzXTpMwHVI/w5cPu8kyYZOHEfr3ViY5L93GiQe87Ovpf5g9zN7UpX1SRUXAhrlYtaDHA4Mn0ZEQr+PoBYX2axXdfHBjWf88BEn82ZF24R9quS5JSkVQZO9b40bPxvVFy/GKxVC9k7djwS5KkMj+ZcWjBOYz93aWKi1dd7cwQfE6mzo6vqrM8izwN1wLyeKahzKIkYsVdjrUd7WTa7vFx1DNTmVQ+zNudug9ohVvil9ZkSUMWNrjioNN9EkuYkqlI3gAyez4prRIWzZKSTFm/J3XKK0z/xFuPYbY2oop3sUOqF+b443wmfpPylDx/mPpp+FsWylAHhPQfLEEcIzuqRO2ORZwnq7Gl77lzOfCezFS7429tGAOeLEF50sD8VM+XG0I3EW10qgklUxU4TSxEX+v4KEkhR2EsZSs0bMAlSOLxMOql+p8S/5ug/YVzU1Fymw== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SmLn9wmZO3wz+19Hh9fJWhLmF8auouwepf3MFlUWLBIOYnOtQuCcCbT131JKJVHGTMezkuf6991lfvQejyXzT6KARoI/4Dzc1R8Cfc7nYrrqi4JXe86zGtRoRZhos2XFON6O3QQUMZl8w1ZU9XEbpgS8uv05w/rPfTgoO1ZSlh9MnHAc3BJ4BKgWR73JD2lWAlLyraYIx9+XtAuGTg8/GA8qmd+pDcXcUeDjOyluvkrJAj+vF6aGL0SiGMUm4QdTODGsTmVNVhbYXq9xuqj6EkFviqLBBd8NVf4cuHaydeBhxD8xxJACYs1XCzZBk69HyRdowa9PdBYNA7VpgqPuumfCLrBHhniyfRfjE0pu9a13iXAzSljc4EmSMFaCnyo2i5ceGvqk3gA5mhNEE96UDiqWWvIBDHwh6bTY+oDv/4opzsC6sNo9LDthOsGVD4dGGFKDRhMF9Yi3Tc0yjbxXiHjkN0QoLlNYe1WlpRu4CA0w15jGok8isxiMhfmn9Q/N2gPefSc/WY5UuD5/sGK3MhMN79nzb6ty3G2bakVyLh31woKaxnYJu2yKdJKAYPNrMGLnjW8dR38vLAzQhZJ52VMneo5n71V321PMTRAA6OmRy8huKA9b0fnL4j6yPmZxvAf6I0yZ02dyIRSrYYtu0oDUoxDeBPGT0B7xA8VPE/QWYwZ5c2dGe0aaA311DiAUvgc6yO2obKta6yG4BaCNj/q4k3Sa/XEYT3i3ctUYU3Jk84ZW3CK5Gu9ALHO7VZ+2vbtaHf0WBfHD/NaTnCuznFi7/h2ivvcLZBpits6Fz05OtOGIx0oZu4hSd7OOLmuxbfsY3CpaKUnT+eXYqLfBo1SGvACODNRWHpUK32BO8vQp/tQktoumu++DmclrHTYCu0uRd6ph+SM0mnlIXRBfdWyqp4l4iqV2Sq8JXUoVujZwrTo7AnUAsx6vnajikn27Z++vd8QVzB5+NJlCVS33Kmu7luC5Nh3KRKUjCuKxnkh1RxD5Vwhz7qNTHZLDhuQkskw1aEBSm3NOUAGKJ+swG9iyTuCGEcNeZpzGoZcAc2ijcztiQL5BujPjgefm659tCgFudVSQY6GeXpx/XWm08waGFoGYCdhzB46bcAgh10ZipDjRkkfzPIoMRw+oz750/nZEnjPNPmLpbrfGceDO1x2BuwQfkv8SrzV8w9dSYZkUh3QK/PRfVOHTxkxsSbpreyDuHn6dhGYta5KAskqp7qE++LKgPR9quDlxBLjAgjqvf0es2nGhsuBzuWCaX+HicevIV1FBGZnBGtdGkFGfOiZeYXgqjXb/Cg4lbZbbSPD5U2yFtKhyuM6ubngiffra5gvoRzijofPyCHMy/+OccEqK2yL9UIBpryv7o/66T/aaQ4OCSzB00E2ySb0Ii2w6Q5INNxeHkJXomDFk++UxokewVs4FFKQ/qiCxQoQyyH+HDQ/SdJux+pJJB4I6AaEaF3jy9fV/BZbuYAGVJuN9hsUeAOjP45Ex30MzEDMimxtzhdhEMnWn6iaJ/SfyGz89Kr7uSq1xnhZCICKLcisYJNNzQs7eTy5iozV7Hj04Vg9Be4E0U49LuHBjYfQjyLP4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05957e5c-0fdc-45f5-45d3-08dd127d2a23 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:14.8126 (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: gj4zCrtXRynj5I/Lgkqen0Se2vgOR3Kf6cefdqNutWDlaC0WyLG0zXjLx9dfl/OZyIOH44hz9upAi5zkpeKr3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- 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 2 02:56:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889876 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062.outbound.protection.outlook.com [40.107.20.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F05D9146588 for ; Mon, 2 Dec 2024 02:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108306; cv=fail; b=lM/dv/27i3cmPtnRXY2gNZxzdjK+TjBu1Oz7wLKX3owE19/Bs6rJuxk3EjeudS3xKs4+SsVoqVscBoxrwv+TdI3qWiDoQNwMeq10365AZQcD/pk/mny6x9VZH0YB/HQMUEhRTR6Vw/DicRJc8sE7SIElf5LZ4lFIgDplm9J43zA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108306; c=relaxed/simple; bh=Q0yoMxuSSffV9rQAcb8rUwSDqS0LyF7R8ahWGef/SRg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=aIXDSwhe7wT6k1At6kP+XJVjN8i8rQwyctAUh/8kOfByWtQ4AM1ZrsE/Z3Yr0/pFFBYtf9IL/wki+tPdgRlT81U9wYIfw9UOi06BvNfXKeYNQTDp7jSIM6SOYaXSCX2ShCtSTef2R18rTNxlkaVMRBctuncRncMN2qiAf+pEX1A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jT86+ccB; arc=fail smtp.client-ip=40.107.20.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jT86+ccB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HuX7uVKAaJk60Hcgiu4VHtb+LTx0pN4xH6Vdt4ss217046Zk+N+Ttszj80UmHpHo2W2vD9/XpPqokm29PiSt9RCD2laPykWeGMQb5aE1KxCcjgNmpcXTxer7BPrceDxQyzQ6jyeAFFSUwKsoYc1pTFknNDvQNgGX3UARpVo6awS7VgMA6QPzE8cKo4/gzvHcDvQrRth+EIVC8msLIhfqnrF43kfGBCwETM2jYa+ZKXQ02ACTNNm/f2rpCFnCrZbX/cWZDNVAje0x9j6qjn6tRWnCNJgTTHQavCPyxC/V4yD+GmDZ4le1lNANJkvxQDwQeT4CGJ542SYJvaWhB5FQtQ== 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=E2rpw4+VdCzP73kx14mXkiJx7dXMdbtWGLz75wnBuCs=; b=kVUA1m2vH73cfIrfZbbb4lu3dbJhSrQgBRkUj6iHkWsnleC6YcVpAmN/ZAfbIdTw8qGelrpXbgXRFJKCWqt48BsctbTc327RGuBX9G4nn0ZG3hnEnuUFgHqMtUtjqlRbWLKmLM/LTSOxwe/lIu/ORt/wTu+Uz/vgHFw6HOrUqgPEyHXjGnupQrKv6hzmRkwZnScxPjB5yddSylBH/Z8ZMxmcJTaXRIXDAq3jBLo2kIzFoThm73U3ltNlbqAQUiMsy3SsS4DOe5f6yfa5iL2RhCVBZqlXAUb2GGHF4K9DZYP0cJQEnuHyPV5GEfT0a5vdJuvA7Jk6dm0yQN9zrpMe7g== 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=E2rpw4+VdCzP73kx14mXkiJx7dXMdbtWGLz75wnBuCs=; b=jT86+ccBzKgNTtzzfUyfRa+GoXg8nlI5E87olNxR5gwAAwLR79DNFo70ro5opFSnzOXTG+ieGbAK5hvAKFSATEuF3G+iSK8QCfiYEX0bzwQgOftkzfM5ruYNjIr1pImkdEvDw24kMtfhAi+RDhnEP4UjdYmOlVQjMhDEXcvHOgEKpkJzFZ2SrtELUXJ0fBI82dqXFbKQ3SB6rS4wYWmdA69L6VTwaAmn+I3mm/viq2Jmr44BC9+amztfdud/13bSHITK9za1NUPBSWY0lImBxWpmR7RtHuMCbG4kGKOy5tB9zw/xiiXrihmkCct0ghNFc5bEgTgpSDz22QXaaBZDUQ== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58: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.8207.017; Mon, 2 Dec 2024 02:58: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, glx@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 v5 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Mon, 2 Dec 2024 10:56:31 +0800 Message-Id: <20241202025635.1274467-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: 49be9403-b250-43f7-951e-08dd127d2ec5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: u9ia4ZGIg1s0LXVU7s8vJmU0B4Idm/yVCFMU948+59BXoT3ML7fTK2NEj6mUa+NXB7MizWmO/cBduHX7A2MIf/HB8WTBOXViJa1XurMo+OjIjMZR6kCzBaYhMTEsErdmA0vPmc7rcNZVcLFpmZqKfxQFrCQhxgtPjyYo0DGTtYwN6B5KK4E3GbrfzKj1az5sbqwqfKrv27JBdipvIxh0XT9ELKTi/S/9aDaVB+UuxdFEALj//kvaHzAar2Ect+5bvrNFBqnOAAqsWE9rCZviAW14fuYp593CME6oDuwE3elgiLNhNGBO2ZGxskzQ3wxo3oMsFRAya9uVa0VsKHGO8JpP8zRpJuvMgZu4LXMjIxloZVkaHMS+zWwsiVVuM9I1xYUO8q3QvZtFKKlBZHGJLdkJmpzF/4OR0D/U9HM+RxUvlYo7jdb/3WgSC0wNrsuNOjmycS81fwg1oe88O7fAvmWRY/HmOCNcMO+xCKZkpAFAdz4P74nCoVph0muf7EmBeAd9KoJCrj6hAoFCOyBGTcZ/oeT5MTPhB4i/e9vQh79x3mljPt5uaLO7RAgZ6+gqty2C7XK3cRbdBYTvW28QZMHJe24VSIvFBBWhIycJdezio7gXpuWAgl/ZR33my06E83x31YbAoEPD8ekIDIXhluQYB4bcmfF1Yx55dMn3Qeq0xCYIOHQFRg1E1mEmH2t1AEvk9VsBMnEvFasP/zMu0+0HWyBBkfpOTD7OiYIaTF0b4VQFZhrNg28lJm3kZStARSugQyqEyL440R2jkr9RXKwtv7IZ5j3QV29gQ9e5g6wiDLbjiH8SNt3Bk4bmYQOFd42zFIXQZzkgetwUjaBa9n7qUP/04xoXK1qlY+ihdIyCRcm5I4pN6jX3bYHj39TUOPGom3y2pAz09/RbGdlNRTz2D+3t9LgtuZM7HKBKT19x48rwi5CLvlTc7fD2eZrU3pKhAgu91j4XhFfjXXZGHbWscdOE5Uv6dDwFKlwxFSsm284YBPUCRaSNalsNxqvo2RBkp+KSJx/0vOdr5mFTQhnsJ75rB1XlYbuQQVTw00UBiMSa6nYkXcyJbGlNdNhnyqqDI0rV8zKDeLdkdnRhIkBaqfSBgXzxC3oLOpZ7r+qDm0QSUbdKc1p6GEUClcPRxpZRfb061y9u8/iNKimAXVDbKrheLs01+jgfkyfyAbzTaElX4Linzy4TPGu6SJy/aKE8vf8bEtbG/EovIybLrNSkR2kD1RmblY7Bhz3kG1W/tT5ApjeKzvZZmm+ULBj5T3N56lpT0yDbc03IrdTOQKDz5UyhURNdwIJb58/gaw5BJF2vEqO/Zd+CfpvpxgL2T2dFWZMj0dbh+njX7RcDSQJYhNiczQdtdL4vNQeF/TsW4v4I6WK9Z4ll67Et3LqmbJ/ws7CTafaKfeaDkVG/kA== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: magPwY3bVgANWP0oi33UBpv9sRRLStObib85/fUI6PKsUCAmY++7pZlOcmw/XdMb3IAZC1ARA9pJzxyPh6gYY5TyQihHHmpMMDrqsi6o9jIuh145vrMe1o6/Li6fPWUR5dojJZp3PDtHed08zjQ5lUydAzJecMBuWzOlGYmdiZy0zviGrxkYeto2Pd11JImncgG0rDO4UbFMOGrOLX2AVcsgmrkBYT2SUpMnj3Zj9CPSRCcW5DsLFZULGalABtidSS+Tw76ZQNqmBqYO+wkyDs5U+oUZtSgjbOPl9iNt46pJJ6bUYxbxnsecU7BudPSj6n9ZvnRpsnjZqOAaSw4efv3xbkGWl1rzJPYqf4mqPB5TH7G8GEYCc46GTIJzHyHzb2BAcuc1FReTGA6naRwpqezcJ4nYa6ZHTZXG9oku9nNV0jmTiQsNVQtw72lG/Zbcd80NPu5FrXUMAI9JB1DcQCgL3QYsLWaKTc6scsdn2qPhfnUDhMulYRurofYrXePzi1CpRcWucTOnq/KFSEwnxreHEYS8dD5mDHQ7iMTkeC/F2ywgNJaZstZKxTGnb/kDpnLsvc4vaaa9AiTK1f2MAHJqmB2b2ELF9WNld5ex4aXPfagDmnWbqoE/VH0HtkVxHxkpwxEw5NiBgI/SCU0qpsMYF7r/Hv6UUp3QUP50SySgvky5Alw9tYNpXdA1oblxVCLhuH3eqsUfm5nhSDOGl/WfxDezRqHJF1vKVfOnDUJJvYSJ18wW7crfmN3ERGHrIbTx7jrjVbiilGFjVUpziOORBYUKlpceAEGXcApuNJIFc/gUi2fzDy9Dxe6TFizu1/772lmJL43rSKpKNnHTYMKGRQW3P0WN+giw9BRRmmMxTySX1Wpszs2bFyrsWYsDY/PtBWOVjl8vU2cAYaEEIBh+Tn4khnaWetsxyGygvse+0EIal27w/g02P9QwXcR+/fQahuQKBMlgf4KJOwBAV4BzG4HxRdIUqaE06UY28HqZlxg4DzQt/dx/d6lDIbDEt2ixUCKDDe/IASGhs2y1bD5xGPhGnpx8G1TvLAPMuDiEXoxSFAOqIhIdd7eUJuhyeCHP1ZzAWZ7BA6UdzUR9RpAlPVaWRtq94tsTp1wqEMcKzuQ68z/qPM+4UtDlR+xg2QEuoN+Gwyw5y2rNc+zdk6sjVtJ5hrb2PvyYaFPQFLkYz10AnOXf2E43baAmf1G3EmSv17i1VdrqK0eilaG7wIvi012w1JCQh9P6nzVh75NlQs2u+XMNRlyDkUxzO4dnBGnGgj8oH/NStmr0Xhht2E+qa5fm0uAmJGiuXPiMiFXmUAbpQd2LFzj6Q2Ewrf6CxwqZD6qnyQYKLVo0xyMZplvi8TzVCKH+efUWNxbXEVQwsC3hZpxRehPY9yLNjktTL4Ti4JmuhFQX/nt9XWuOQIy3+8kVpH8nvepklhmD70MsLwbabFrtXcK7rFrAGz1vm+GZgK1+nehdhBkpSfAr4gD7JWC6H80Utz5Eyi6byRYTTIrmW5GWkUN18oWAW9b4mZR+2Q7syVG6Mz6prHbvrwuyoAaqVvjukjgFMo4yKm3UlbJOrQZSAodAX2eJTHSW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49be9403-b250-43f7-951e-08dd127d2ec5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:22.3138 (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: Qalq2sCxlQLsc64t0dtAj4oFkePYZYgjQAUKhzMF5VeO9wMSsO+QH6fWZviPAFZOaUY78tD0GlZN/4PvAC/9Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- 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 2 02:56:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889877 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2069.outbound.protection.outlook.com [40.107.20.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8E5270837 for ; Mon, 2 Dec 2024 02:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108315; cv=fail; b=Az662uDnpVQVx2yd3DJgV106i0PjbWS+z+ndaEcZEGs8RviAkuyZ2Vqk45l8yY6Qe2bD3rQR3IdYzGb+HTcGMSMVIoP8mrKztiC8a0qyU+q0IvzKb67AtXoRKFsT1I/aPDwtYN6cuREE7iYrBcUeAixIqkqCNQ6ulXB6KDhMsPE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108315; c=relaxed/simple; bh=+UBpUEDDI9sU829tkAzcaAT3o6n0LU/5NqIDfoAdt84=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cLOoikYZEpIg3iPAQh49gnKb7qDY22afmhba1nFsNchQGlLereLL4XZ9bLm5Ngmipb1Y1LxqJ07WTkJdocb+ej02amx9yxlamPsCxOrruNyFsCL3+HRzDocIUeso0+E8O5g67TdA0uQrPu5FEhYkM7VOHlDU3fBcaiSMXlCpwzw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=O3MsrhSO; arc=fail smtp.client-ip=40.107.20.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="O3MsrhSO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ob8U4vty68i4ZGtCj/t8F8Wcz05Z3Q2huXncdJbdWmnL9C7l8ul3gPrGRTh6L0vhSPKrxjg5m5Eglh4V5DWEETp9LbCcuFbDA5m+l++ZCLkI17tE/gd1K9zbHf7UL1d8mdgKBcpLYGFPtBGXmFVKQhiQUFgypnHiiKnt4DImUfTl6KyHsUNgdibTXTHeRFqq44cCOXr3rbpDYcCzpgs2K+EYxF7Sfq3DzzNJGr9indKs0hHvNYz2BdTyrbWgrq5YyGsyzhrkr+/eWT+yYaueBAe3zceperPETc6KmDaEm3gCY4PpvA3HUTDo82ijtDc87GTkcm6W+9e54x2hG0/v3Q== 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=eAWa0pdu4KjiDW09QDwcFh09K+uOagshDRrFKtuI4uk=; b=ZQvNxYTaxb66qQ9Rk6snd4/5nEqwAeKgaIBq6B6sHF1PUrCDXFacB6MGvctTV7fde6SdN0ObiywPp9NvdxsVK7XXpRPi2zwTlSks5mhQHzRhWM97VR36LE0g9+TPZE7ECqW3xBlI4sWHgG8ww9Y0g4IrtWzdRCJeaUWyzWm6r2kLiRabo/m68s5mUrrnD0PU6zM1sncawlqH4Ml9ljIeqPwXD1rFR8oVQzIx8x8Ebc1LMBj6kflkIWPoSmxmhWHDHKQTTrVTSlq/pHSuKruurlEOP7ue3eCNoUO7UrQUDfmW5ISZRvOiRVTF7hlxV47AawzoFyMgDMwnH/Bowgl6Lg== 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=eAWa0pdu4KjiDW09QDwcFh09K+uOagshDRrFKtuI4uk=; b=O3MsrhSOYZFTChNiZ+UnytfncFsD3HUXpGbj4zH0QuNCHIRSV3cIGWS0dcUQhhVzP2gQ0WnX+iMXfvly3bjIfELWquAZPzKnN3erTJiuaVSoiAQbS82MUJVavoj3O6vaPjCEPdcKUPMqnl/rf1Ork7EFkg5Bl4j7ZMvgwYNNTlNy4Ab9ki1FMo3r/suldYYdiXZPyevPuIAzKurq/39Y9LzSL1MdfzSlyQRrcRoTxVLlvVIVO9Vq64To2aWaPs8oV5/P4nMbaP5JnOFeVUK4+CPh/oMtgL2jqpyTTTPOlFDO/ahIpSPMj8N8Dx6frqohFtLSKWrTflfLnsFlzWh3Cg== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58: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.8207.017; Mon, 2 Dec 2024 02:58: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, glx@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 v5 16/19] arm64: dts: imx8qxp: Add display controller subsystem Date: Mon, 2 Dec 2024 10:56:32 +0800 Message-Id: <20241202025635.1274467-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: b6ba386a-9b7b-4ad1-6c85-08dd127d3353 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: xNuV1pZyLOi04qYqPDm/MtMZB5K8HtrlzdW2QZ0krhwD3rLYEod4rAgE1Ur5ZSBqgOnxWS45TwjnvZaPjJTIAViVR8s6VEsnAHuN+4PKSpllKrnk4AuFEStRyVCDSt0jcDj1BEU7Wx6Cd/f2GqWta1fnW9CrcF11i9se0vn1YBPhVuAJtO1FD/J960EuLBFMHWJPwVJKerxdUrz0BzfY/F45wZberLXgJI1bgN/44WepBh/IXEppsmIF316MbCBDMdIk3/ughA1NzCb6DptDmBpKnc5h2BIJ5ZEa0g4iXYbvDt7Q5xhWRVYZ1rKjyFQ7w2L91paS+ad3BzkjRKXxmcEkz4D/U2S8elTz3gXYeh9zYgrOaasyqTGgDQEEC+pVv4j8IMIr7OfjMIF1ta2LogQtYjoCzhj53hmybBfK39qi1Tb8M8HfEtGGN6TU+SPsgvEe2PZIaIMwNyugi00Iw2hg7ESi6LMUT1JjbDnhWdqUa90UdUgDddbcRcyjylxLabWFLgnTtSOp8ClisybasLsS5yuq/1TOi6Pn5++w7hdyfwUlaAzyYZ8RW/eMzJYk0A2VHcMIUf+ktH6y7R6tuBr36dg7c9WVaiF7WzuIS/xzxBP4UnIgXwjRZfy6b/9JgX4ukTLrn7+qLDljRcnPPWEPrnJK8tWQ9xf/XsdALWhuMoa+p4OJzWEgLU5OLS1ePbZXa+QOq641gq+86osH5A4ZchW0VLG2P4m/yHQWUSQYBWrwaVRwwX+gMTkAcUse/hgqTcr4WJMGD3ruUh/Gk9m5dgCPUvbpX4T+fVtbdccI8V4lfJKd6qsJNsNayVAq8LBehDZQwpAS06dKZMIRIVBOptVQC4NO3nKIw0f8ipF/rsWOd1Iytgx3CW0B9ZUjvej9L9FypX6/5iwdAINStx6SiaMDeLwwJHH8yaAVaITxN9UtMA/c0z3nTc98amDklR3+y5/HzJgBGRbsSDUXpWFrbrMvKbmbuvNjgNirktBx1Mxuf+5ciKqhbOHygLBlCYxJnNDJGLqBYzl8YD6eMHi4XFZdW7WKhAOxcsC8w2nZPFhyI5kx+w7PYT2KZWcSB6YzV5Tw684fuHZ9oPe4Fb0AwMFWOFTbrrDiWbA3oCuayufSqp4kMDlKHDS/+MtQIJeIH5AwdoDPO+YaBINVaIJsOOZUyYir9A2KZ9zmnERsSj+VBe03LE4oCEwYoQFOkjfLVAv2UzVfjcxdEPZ7tyGMrDYzw9A7yPVj8GXoD1jj1oiNmeV8p4gk91JmH9gzXmvKmjvNpYtFYdNiiDjp846SKm4RfurajG7dITDxPK+iGZMs0CLc97qnPG/E3/2ydW24DGk47rVlnPkxZCoFQVxqTbDDGJEr0UMbgJItlakOWdNFz3v/gmFvpeTjgL6jCCmMz77Y9KMIUSjnHhX5lA== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ERFWnTDrb94RcVPfmsy/xHT3xxF4gIhOoUFM8Wtj8efIR7zY94hMd7vIabY0vbkJsKXiOGZL26lQlk1k7/zmq91gFSH0aFkjZvAcMIDd6f2YXHQ9qIqLfBLJoOiDrJ8niIrevGTjPkLjJW05UBfUJR2M620TKGLG5x4jGkwhJgFAdhFS/dB9gCQWofRJkML8S+A+CcW+KEhSYFrrGqJg5ofRMFNhUw34hx5aTnPeNy9T0beCeJe1XbQsTH4yKCvVkOXkKJPUxBPm02cwZ294xrK3wKq7oDP0kojJaXmf5VWwy/AtAXIKhuF09mtDP7Hrk7FHCZb7bnTdOnT9ah4LA0Qh/+fL3PIozIdq5EYwgJOVNMP+XUyCVW7RMNwarLVqbkKg5ZW5684F9dq1vjNZpHdkuqjO0V1nYPEDuMY7VfDne7rpuakJXtfHHRuvw7F4PapLOrlWNmQKgd5bcizBdTy9Cd931UMve7aGrEDzJVU/w3yQDMzQcFJDDY46hmKrKVb41QyPWIPQJ0WqlM9utHTm6HIXO3aQIr9z3ViV2oh7l27E+PHc2rOcvDrhI20Ed62xdMTiLks/nYrxbkOMmDwHhCP4/DM2yCvrarZ9oUxTI5gjvHDQosOEsAgNxSzRC4SCWyWB14KsNzxFvpqOK9DNkCCazqVGlhG70SfpfPbU/+1ml0cPtrct7bSfgBQaQlOvNdBLyCaXBZNymS2U1gXRUnnqv2uh/iseivHUJT4OXVPtLG5FFLGgI0hQiBW1xPycqO8EZUG7aWXeKXMGhbyqw/cw+jBFvRKxBD2NlXKjzqioholdd8NL5NkavGEWBlIzwDqUWE6LMYoDao1+BB8XTSLKz1XFxgWzUW2ea88HKLLK4SNdUJyXjFPqSMsPWdGqZtbje4Bi5cfjcSE8cWfubUnY+gQnqRHSgbJ5I72bCc3ZpdH/kdxPX2k5if1zBw6u99zLNDy0wh3KE8RWG+phqfEOA+KFKyyaOjWjJfDnGRJdOICgYc/JG/0IT3csKR2wlb6MZM1/3bVh+peXYyXhgAb1FFiPPqV2jqc9tX0pd69Eedw+O8D7gEa/8IR+T+rbVwfNhRn4MQEr3Gdos1vtkMkDBoK2K6houxyl/Y1YNW5qrGSI1dDL4qat3F/wV1G09zJTs/bsgt2sY8hk9Sf6EypY4o36slR0DsF6vZjaU6AHZ/OHTZWD4RFh+B1kf6awjRf2zEgmfDOz/UcgHVOIuxK1PsgxoSN6JC/PpHLrfueosXSrUs0sH2odkn5TOhXhSSpF18acNmr+gMEXYkw+lbhdFBmbQtB2b/KgpwUe2resjNtoaIlaycJ8F7gmhcuM6MgIn42JmTbsjRIvaaEc88LUcNsl4IIVa9NmAVQDxgLgFnaLYmsnkSbgLIFywpaSby4IN2Pc5tH+mG9Mio/3wuiEUm0fB/Q+Tmtra2VfMiOkM34+o6f3on/vxW5cpfz0j4NsURqFhTdmXkjYG9mg6usGM1bRAQLapn24VrfuKMQ2fDfEU0mJohu6Gi9dGeQmm0OaqDbeESoRZBxBHuwYhOgVfXqlEuE+vtk2SNDa0xUYxPxXaqO3SSlR0t60 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6ba386a-9b7b-4ad1-6c85-08dd127d3353 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:30.0805 (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: o76dZetdb7KA8gKd586vCBc+qBQGv106mbXh2RFhzvSC8+tpYFbh19160/ejWScMHfdDljZ+jIZUc8ua6My3dA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- 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 2 02:56:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889878 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C68CC15B554 for ; Mon, 2 Dec 2024 02:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108323; cv=fail; b=OLkUcuNIQ5PO4S388g+LuyEo1X5Y6a67TWuRWhfxhVth1f0P/uhK8Y2P8BGZH5DdQsFsj2L88sDu6Qx98Cb6AEbVt+GhBt+cTHphNnRTAeCT6/2WgzFnmBeIQhKMlvzd/ozJQLIWe8g33SMQmzlJ3xhmDSo7NfSFe6Xqydfv7tM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108323; c=relaxed/simple; bh=mtg4VicZ3vdY6rCtOmI/0zwjT1Tlm2RF/1RBMdpA+KU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Su0Ap3brl2Uw18upSqodGd8vXalG/sXC+/uiRE0KsQj85PN9v3YJ83yzFa1MEbHU8e7ktjZm/qXGo0k0riOcVFbHWcRGQbhUpkcYJEgRGVTUknRFI0xZIvDHsq7YwIlzfAZJDSbZoOk6BTikLjibKg2B/F2f6yaEhVa1gtiobrA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Jwcu11GJ; arc=fail smtp.client-ip=40.107.21.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Jwcu11GJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nBDpOiAhE2UqBz1AZa7GQxGgQStqj6WMnXMdZ3tnqvVhzPOn4AQLHOZQQCK1CLUYXhJvXFpy9ySbVMNXGmnQVJPi+ahIluPQJRFqqQunNYax+PK7RUSynxumpoJMKIM8PteO9Ix62I1mr/V6RJBIZoF8++NulLOXnBL9bkV6ll21jvzmhO9CWcFqhXz0KytoLk2gNlK1DXqMhIrQv/dqG7zGBjBihhovpcGcAX8FdxiVTj0XEqIa9DkemhwBamQjaJqevYtxwns1tCM+Aoq5jqIOZNn94DeIuCMsXRlTJbBkkIsKiOHMaXlZAXswqHsFodcg7+RAXlwVmo8ApYYHBw== 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=lM6SJETtblSsgmq+B+GEYeY42x5V6WqYe+ZXBLad3kU=; b=h9T+YsWcFXzknBoo3c0cgDyxMvGgOcwY8BkYLsH0Ll+pKqG1ZseNe98MHkfLDzv6rVyYgtcLK6Cwj+vMGhVvc2E9hhKggzTsgfx4gzJEcFRBJgIccUV1Dp8CBoAO22BQVjhdE3DYnRpQSle1gwGhYfJzXmOl9u+1fIj4n8/T1qH56WdJ2nDawGSz6EMXkVNo8g807CTe5mqFMoLkwX1/5RijFTHgMeqSW++kRLmnzutLuwtUadXXIYWsJ3SJ6LMuJBZ5mVBIQQQk32tPBmpspnvntac7fcwJ2qzBDmpqN2nwjJF4eh3Cwtjkm4Cy40+klMWykH2tD1kqx8vMQLHU7A== 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=lM6SJETtblSsgmq+B+GEYeY42x5V6WqYe+ZXBLad3kU=; b=Jwcu11GJoL0gZS8PylFmVl0zVmrotEMhevDDMg7BMfGvZFGBGhp+Pqt8wFgUF30Z1JosBdNpiS8bWB//Kn3c/kY2t0GnP0j5RW4QdTrcraDLUi1s3sA9XFLddJBMT6DR9QnIlYpC9ZAnJO1Yb1wVURdOheeA30aqCANZWDNlrLTKMUth8XBXCHectGWW+VTvNVdCbGyrjP8HhdlO/Z+LXv1TdBZO84F1lz5/1RY7kwJC8aZ2xDgpzXYDv0b+TF1VCOAY1CqCCZ1+Wr9UYuSNH12EDfPvtb1QbX/5VdCW0KKCxPXGBnrgrPo1HmeW+kF8FFepX/6VK2r7B03kmn7EJA== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58: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.8207.017; Mon, 2 Dec 2024 02:58: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, glx@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 v5 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Mon, 2 Dec 2024 10:56:33 +0800 Message-Id: <20241202025635.1274467-18-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: 98bce07c-f3bf-4d8b-6398-08dd127d37e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: rKsi10p1MyRxmV6Dq8b362LM9c+VLzmD4DOlx3TjCmtp7vYxEvXrriHXF7M4uVo2t6A5CiQa5heOpLVF+2miIMhjTy2U8aLekfJk1U+ufvipUxhXCTZrLlIdVHRMbaKVoh6wz21PvNautnJH0FgT3QuOxF0K720RpEl7uU+Lky8iyADIFyALCM3mgi5Bqi0arG5lv7j2NMGqAIZR1NJZE3ERk6RyX5sPZR4V1wWlLyP3mHV7mdQAYH/v0QifWgWyX6mhe3XxDk/89P6KsdohweEnvPBhVJ86n+xGGNlWZ8G9Mk20EgK324oG9Q+2x9lEKlAeCXRkMjsN1CkfKHyqG5RTRz2UUt124N+WvBM6FSQJLRdpfKMx0U2lNIA9anCVukzVuerTvAGj+1KxRAg0drhZQuz2SfPk3qF3oeULGYCpvlaQjpKDxGWrZvrrXZLnrZ5v7M23ceGeorLqIKfW5qs2uq6e3zO8IPsR9HU+Dr9/EpSXBeZzooPQjJBk37V+w5DW9PJ+TKMyeFXPH34Eq0QDLktS+8t23RjVuYFwGwVhX6Z3Zteb/a6wfPURwniV8cvcn4aQkHRAdWo9Fz+mbn+F7/J20jaFxx8tpdatCKBTWpiiZxL2NnX5+69i/3YyKH2Egz4UqjdSKgXG/pLDsXT/snGLBBSE5sDxa6rVvc+PVzPPeSr1lFMgSnhR21NiufHPNd7HhpOLtZjN75YG8nlIjwfBoDmkM5I1A+M+IMhf3ojB5mu7DouBIwMxxUXG/jQO0OCR5jhP2m3CYfZMymS7tu41zp3Jvvujo1KTXf2BNFDD80oLlYKyyIbqkPrhHlP0yyyWX90Po406g5LxAZZnbY9KMEc8uYINAvJrggSQfm2x0BDqHAzKmrFhj0IgPw3IAZVZWo1Lqlbqz+8euRsgzDTQ7g/HXFIrfTgN7I6QbFfY2qPziAO5xuKibDYNTqBlMTPwAurj/Oadz6DNLyg0eT/TTy1fbazxKexaw/KY9ma/oNI2NJxv9/Q/IStpGRCQc2pwdeY3b++1RtH9pe482HPct07bYMwYrcVeQ0shN/yt/DvSpwHSwNL0KBXgVIRYh3VEMUKyZ1xQwml0prcm82Ge9sGBxUdY/bCSVcxHf56dO1m+eDNN7+xFw/ZaBPXoAB3zTKZLa/7GlXRqvJU4aaq1NwHzJE0bVBbe5Y3ih6bzJklmlDkJ0EgvAl0UhWVXS4lLi2grBpkt1PELkj1FqaFu/NdDhOBurTTCD3A//UURL9EnS2XTO6xMZBO5OclZyi2ulJN4EvkhWtoEeNOmbOL5ftVqWn2csfK2ob+v/MaMwadrU67w0KWWI8ii1X8GIWCxsgD3Z+eLsL42WyE0V75kJ9SusEJ5A8nl4hgaZGdYxkqwlgbOYlwpU7Bz9wUqJjCytS4PT9A0QwqbvQ== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6JPf8vUFHHInzlEzTtWlmRFLb1TYvqwVqCCT0dCKKXW3calSBycLb1xh4rYh4TgR6Ptz7M4c2z+5yyshChw5x3ZGnxQemM7gmOEOtJIDR6DMctHSaBi8l4p+CR0E0/Cde9L7xIwzyyrFUOprRgHeuh1hDA3gYW1jLIqje3oddIbLGj/qV2qPlXoBp7+Zzc/Ql55C9QVUe+y/eIp2wX/HtKmQ2ZW2O1hEbOF9DyMLHiQmjVKMof1H1T11gc3VISmA8AVgdndK2qHM3ieAEXJhaihvxKgibHSbDRyI1PxLFzqQY4y+/pfiL7AvwPOICilgpj98k5ZwrfZcsnduK7z+pWz+n6XbSvQykVupbt9czdT2RcNXoA7qQzEBvAF1MrmsWFAbkcXi6KmMupe8ICmTHvAXcE2iyjSj4H0taP2I55wixquwPfvSEbbuuSoVcVXxZKKs+ve1q7Pge5Ffj1HVGF4PpRiFHp/SmFUqc3mH8UTvwTZvP2iqrF2g6YpXtkmYVI+bq1/Bq2PE9UIuLodgGwjfj9B36oZOIM3kyK1pyYEjokKJAsp/hrr0LNPxlhH8cYK0Escl721bMrUYc4As2pKL97oZEOpait4eeQ+MRjdQw55r3DnG4s2MctrZjm1XHJhvCWUl8O3piGQE51wFymZxeSfT83ayEgPlzDIJRFUPK1D3/mP1IO1M56ZWmJr8kIL8KJu8ODaB9sbEEkANfLNxPn9POjnP/6waSGKtU7V7rx2lyHTIffEV8xXv7U3sflFwjs+XmtokYezrs/B6LxuJm8MXNVlN8AF99mS7aadVJ/VkYU/jYY4uzdEWNVFPBqD9un17dbmvABjhLlc3HmXGVKEjyiMtTvPJ/NWYLZzzUT6g0pYAFajvFz0pcmq3kLzHh9H3buB9UqnrNOxgRiDPVz37aV6QWd1CtmGz1nQKVsi5rt+SAwlZ/SR0XXp8Sluwtzj5gVvVLkG+yXidSIok7pzYCs457MAM4hEy26GASnWipbKq1IqZ2YOiU+Q8S8nIWN7yu5noQg7NOOH0hokdSv+wRsGi6drg/4VUz1BrTCkPE5bHCl9PkG4wbp4q2kqjaDi8OVFP/pbIkntFLgcTTtt3u2e2nqDWDp/Aq6JtT/ihjMTIzLg22EDaiDJj3Uy/YWnwTO3fyrGrACtzIf1x02Sppstck7uwh+GPmA4SvsmeNrKaJ1hhbizfvYrcKaI41KToN6aDDPOUmogCN3uWPmaOGH3f4+j5laLr+9oY7cIIrnpu65169i2kGKLRBDe/yGLFxieS81XvjMV6l21hkzU9fr4HR03UlpFmqW4nPV32MjPb4P7ntzt+SOVMt/g3xkYuK8SGEvLe0LpMS6W4Wp3xC0vjeSbtIeoXGnleYybDte4acxfWeKhjtR2g2fXg7CFPrekp0Jkwl1f5STBueiL+CQx8NQIulE2LGz14jmEXphDhQYYZMy+NdCcEt0qvGTQ726Jww5gUci9fvk2u3ASZc9slilsxwvbY+XO8UEdOAZLkLUKdi3ECWT1FvACpyMJmanyhZoHjaz4FXctKizVwr9Rfk9IsoPFAWOzjPRHyXKyAjSeXa2GGZkHM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98bce07c-f3bf-4d8b-6398-08dd127d37e6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:37.6317 (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: MVw6o64ZHfcFgV2IfVKsZn4+O3LyaHNz75UtVn7UXyFCkf/CfEoWK8IxnLxk/EHNZL1LR0u3uMhRyWGzaEFkzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 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 --- 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 2 02:56:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889879 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2062.outbound.protection.outlook.com [40.107.21.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61C8915FD01 for ; Mon, 2 Dec 2024 02:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108330; cv=fail; b=XwvZ8jU0nKJ+p9pyJzi0e+JsnJSXbHUUMyuferQYbPqCa2kTXljLa4LOsoe9+AiOUrVxCcOZRcX1l88+HqN/1VVSHcZKW19+RZmDnawaxIDTQUWiBcCfTUh9tWiWTc9MzDxJE9FxgsGUzHng7hi4TXd9VmxsYm7eZBQdXV0CHok= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108330; c=relaxed/simple; bh=s0A48DOE28fbXZW5C/Ddoq/f5S/xpt1sBYkXjdmZtQ4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=l1xTfhJaUOYGG+jWOTIoDXFnqBOmUkV9ctjGGnGwLtCB8SN4C8csqrK9p32dRbjaub3oi3G/NT+yUhApH1djeiGQ/nlNY95atTmnXKMU+r2WcVdluQfXKlpUFvBK+q4Qjj1M6/VM/vDdB75fJdIieYjjhX1OdCnnhnbM+O3+6Yw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=MxbYiJp1; arc=fail smtp.client-ip=40.107.21.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="MxbYiJp1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZytiNelWFuvNscBVyBRAsWLmH8QLwQ0WFBXrDofZpbRH2CTViTxW7UsfP7slDOADLFgt/rFS3C2FlomHsLGoL3cTHZEIWyeWlX+UvSvTG7kwenVG6W+KS+I6MgL5RtPI9gvcegzhKN0hQfNDYICXFvpxIcrUR3jQpDD8h1hQ8Dfj5W+dEGgUgSO6yODySFqlYJ0hOf6FxAv/1Ky0iDSzlMRO1mOr/7GUpHiItlj+iN2X8fqxJKpECzUvNI2D/tN9XcGE6QQMOiRYOujH42C+sI8DhPJfOV/3pNoZ1km8T/KifbVaIO6LiWBP75iCVJkihUpox9Va2GtG9oyHlB6b7g== 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=TcBrns+ovy8ZYwX7jDpkrPqacUlwwf6+LokRtL53c2Dl6aaFEwsqze72yb53bHvGUJoZnoMXS6dVwBRocySXR829n1LM4Ui8iaQHrAIkV1THIyoz64sZU1XlletiWfz9n0QW38ZhaRoTxQSCj+cBdmH/fqpd+4mxCsm3NGyP1rCp8kySrqAFf+YnfIuqH9kyqsHVvmjDNGr0vL6mMTK/jIUJxQWGcqLs2TmEqhLnmDUPThzo5FQH6tGlLcwPZkWn1Klo5X9AwZj0urPCEJhtAjzND7m14stJ84CqUzmtBLx8RpjptqBpCGNxKv/VBN6oFZTAo2pxl369SNLsQrnMbg== 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=MxbYiJp1hTGWJeZB7orG8CBel/Fdj1Bz6f4Qnm2/qR5/WP314F3CwNHiQGE6rPSEjYPKeKmTWXeF10NtGWaCSYDk70lmj/3sQn/9MP+Kp23km6mWu+R24qsMrrnoEM+FkeDpOOlcM/v7Xe15TlpHXrLQCBKeJJy+D0noxHSwbVWJ8GqbS7AJEgDRKC2velJwdppE43wVnZkpVxOxQCaXg53fARkuRlze7CU1aCyFzfIZSNUm/86V5r/dnOtKnRav5HHn2WxxtfLpFBFES7CHvDxVT7acxATEwDKlp+AqpvZLuMhDgTdaFDaCiQhcPp9ACcNPpJ7uJUu0RhtvjG+98g== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58: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.8207.017; Mon, 2 Dec 2024 02:58: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, glx@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 v5 18/19] arm64: dts: imx8qxp-mek: Enable display controller Date: Mon, 2 Dec 2024 10:56:34 +0800 Message-Id: <20241202025635.1274467-19-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: a2c17306-ea6a-4e27-1e02-08dd127d3c70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: haRK0MY9kdafR42yj5XnOwpb99M2JNUhodjOvoRQXBn335QTdXoYlh4rCBAyjosmOVVtwElWjtBGG/jgu+p2U2swUytL04rbWfm7pA9XqhlZRKoHOuwjrsAEwJZYgpsO4zMV1vE3CRQRAzwbLyVuYx3pU4NMw539iGM2z6zzT3OcIbGIdTCrj6yjSt9pL8RU583vPEQHRpcP7+kZtuOrCWqqIiRYO+XQo6H9XmNRO2T6Tnin1EL6mJvc/K++tPJnbJhrs9SVh//V79gPbZlsEFJ+HD23LePuS0EKdVcFno4aVGI+WOVEtycbtLwYZf1hFSN9nSR+cXE4808wIsM0UY1FhyOEFntSNAASJl2eT2GUgfGVp5MwqnjaX/YDnPYO70Zn9ky9jLrWTP4C5CnKqRhoOCheTRlGOzHoOWrBS5W64jqAN/Aajxd7BNhZhAsYpYCEz8eqLRp6V90Ay4TxS+szu6WjMl8CDndyBWZ7cxCQafbh4B1G0sVKbOi3/Gour4pGyS05tfurpme3FBvxnKWakjxl0ZqBtAUMdMgJuQWt20APl5UgQ9JGr7a/HkwRMYZYnbf6wH491NS4rzN26GNzr/HHNPb+A/TjTOilMR8uH83Udc1+nDJrHGIqZHo8p3Y6xzKyLWpwI0uNZ/Z47f2G92If498RoXhCXIRlN4qjOcj8aboM64c+9MU0zfaO2OCbk902iT0nAp30IVxHj2Q8hPiC2PjfNUgKKUu1tghJcBGVimUuScYmDOIQ+m41u6DZwK3tZ+3upUuzd1e8osXIk4RTmVTzSyuLTJfl1qdvdKVdxpFItkW3rwDdcOXc+z6cCg1+wQVN93JHJRrSLWRDP/YBc3B1ieppQDuTI82kSQxia1AX0+6OvQY+O0E3rS0CBZMLyLEOn6Zkl48ujdcWFX1rSvgSHgU8j0l45fOEGrIVdL2JcWqCrWSsuLGLkURBzQVv2VTYYyPw9/Pxdladid/8cUvQsZ3COQZHQwuL26gQY6rEDZc20TOOmcuvGUTX9OPn1lAuM65oyHIY93dHc4B4RGALq1b1K5tshIbCVaahkfnNdkd9mWJeRZanCe4TQ34Afq24kv+/RCoz4hg0j/hV4RvilUf78oq4Dq6GpkF7tOufraMaGdjNzdmerU8ZDiXmO96P4gqgC1M9zUBCp5SJ2sOUm6U2hLOTezRLN+WglpjbpJEMNrfvU6cgw+ENDaBh1ZboGsWIcEuDJaSeVrMX5WqBYPoOt00s73Rlp1RYi6YU62Y3BvbTNRoSjJWN8uXSgNOytWzZiHDtzKXk855yTP42qMemnK45ldxPAqZB+7PadD4DuhjL92D7Mv5+VceWGVGau5iUOi1fMfVbU4V69iMTDSXKAbRPCLx2YFanUKExm3ujciUtIIh/m0vOIhMAE3AX1v4VfcfMfA== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Q06xgY0oZAjp5FYcD75hex1YcphqCMuwsNFw6x0RN0RREbBdg+Rz3VlHn7yRn2PDwZwzSEcKdahs9Oim+URpj208BvmpwlSl8irb4nh+zVRpYu+tjI2u3XhmHimCDAUQWEyiJbCnUdT+t8Uy1IIcixLqgODQ8qpro76ozsfCV8ktsJczRccICTSELOhD//sxrrMvXNZoPmgVx+G4cAfam82+I1FFTSpc5ypXrW8d22ThYjTGBW24hMSe3Qw6BdSPTlIE8gncnO8RzKjsKM1RIt0vbgrLHe28DQpB/63X7saDbzltmcEV84EJof+xqaC7GZMPmgn349YT8QaWhuj5jVDWED24qIZTz7433LiIfzep/tDkjZ6KIg5hVGw0DGCQuNSvuCwg1Sx6H+M7MXtlEbXYf0K5wzlsoOvYqIznuY+qphHNmtcUbH+B4ZLMOejpU49jX2tHhnqWUyR/osnhKRASlvDQh2D8EM5fPRWuA7DKRgzZQa/YTD8nxT4DOHAYHvX1caGriP5BF4qdiN6nJvG/hXds8OYQPHOxVCk1ouHNrgqc5Dc+emvrNDxBQRieenI4oTrBaeC3vtVTpbqKq0oPMZd/IMikLcGCd4jWKHjoHLtaFg/gol8cx5KVGFjOAIoxJs48qKOuDjr9H8YE+9Mcy7eRrybav4JBXuWKz/ODV9cCkjT5DpnkV2JSJzEzWzfLmR3mNtEf/+CarWCdSxjON1XkoSXScZY4ZbmB5LqjnbS1d1coggL1sE9f0imtpBRiQjLoPqyENkYygjE0YJ1PgY+IvXpx9is2YqqD22lNMsMpzE4yqdse8OZZa+lKoxNlEw53Ld/pueDzRSRs/ek3vXYbFLp8LA9zyh7+DH+kzZL/bk1hM3/9aZQC7YdtjzfAbRf+fqsZzKxrOkKclQJy9vhDObpLIMVZFLO6Nn6YPsAQtWpcfUL0HpgpPRFGvOBaVxKRpqMLYUo20oI0FuZSIfsgzI2eTXaA88JJwcAyhs22pEg15WzF0r7rgBNkGNVfwzV0FH36ecWdrDp4ECp7ZmrE+SHoC5iiS9bOsafd/RSyT671RJHDNyEF9T1Qmi9fyfShG3Yfft4daT/y2ijZRBvBofeExZH6+rVLYjC73CZyyDvxp77W9akoF5+LnTYDUbY4xwF7BsNyBfH/th9oi+/7zKEGkeiDFlfPTeAtWuBxTDI/J9LNcS+h1kU896/TxWlioxAbQr88IwgdlBo4IsAa7IeAYYXPUNdGVfcMyz3JA0UYNjOSWOnghVWGnur2W6FyaCeH4hJ2cyk+R4BExbY4qcj27Xh6A5PGJrp5K1nPTxgFcWr/Afh7Twl9ZH83wznDdMZj2K8SZg4xPJQBhRv2XZ8r1C8tuCKe1/4i+o1Bsno77ltUXiH0lLNpbYJQiQnFJDEbovG/3tU+34bscacDj+AHO6Yi7jEAfWPbexT7yhgZcAhkXAUpE9gGyzm7HWKvNUJ9NxjiplyKLg9zXL0pBo1rl7+lBTAKdctcqXflmYtUF7o16L6mRwd91qz09T7FISbi9WVZ9kAm2kdYyG7swFTb+W3ICklkEa0JPZG4Px2hvi0zB0Sirgg9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2c17306-ea6a-4e27-1e02-08dd127d3c70 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:45.4158 (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: 7rNhT0abWANfueKfK6Zz/Q3MfMjKpQF6jFSnqSRVECLi8CmeT/AprJpBZtfWS9jC3WqzssD+gqvvqmxhpf1g3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 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 2 02:56:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13889880 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7EDD2A1C9 for ; Mon, 2 Dec 2024 02:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108337; cv=fail; b=fa8de2bCkujEP4/YBpPYEZNckBaITg4aVo9rKrvW1CwfnYW0LsekNug0eWVPwMukRn2a7CewZRHTRFq20DRYvhy1hx/Zp9yWRdNg9oTBgmlyKjljFQdcIs2VJ/jgP3FRfsJbByvD4STcqYlcKNffff1DCTKLT26SDbX7O0o+vAk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733108337; c=relaxed/simple; bh=0iQe3KOiq2cSYbaWud77vUnUO8Bqo/NeYOwFdm0IjZU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=CQ6ybdVUb8ObZg70Xe9tKS8nvedSdUsV8KmrI11pCVXD2IA7zHAr/tMC2SHJAxJEaKK8SNEm6WFpLCQxGmj2GLEzOflk1bZTnMaAXnfDtfVmko/1N9irbiKKIU5+tnLlwmFRSgik/b+puxigUAkm00I17FK/gW4iZ/5gDzTEKqA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Q4+oYf48; arc=fail smtp.client-ip=40.107.22.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Q4+oYf48" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hq0D/vNxysy71qvfOlKW3+/EGpx14rkxAHlQSnYi43W3B8EAo8g1kP6zwcBJcwoVzCVabJHf5iR+5EJVVTOdm0OFX0SRl26K5vJ0a801HdOQCnB6S3t1D9Z/+IrC6XeuxQXk4bDeVdxvkIbQmwCjqi80lMhrr45XKjhQREzZtg6RiSTf6aBfpIobu6wFEot9mjBXQx4vBHCZy+/LW0AD7ujTi99aGcuJ5obUvYkSk5/1zs1wzTI+HpP93QW7KD6KRU/bew4UjYukIDej1lZFw8C3B6LZMuytSlAoKbaJSpX/GVdS+a3S6wGcgPVdm1PAm+Bd53jiJIAt2wonRo1ZsQ== 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=4PV5SRwxuoZc7CYjZOzjkZN6pnNbixXimeGSwtdG4XE=; b=xYmun9hIAOs2En1W2Adwa7fC5uatBogAH2OXVRvXL1navH0dAYfzcEKwqp+WZ5bchkRlRad4KQrH8Sfj1xorvnODZtb/6ptr/D3X3jcwMWiUDKf3Hpkbqyfi9De9uc6FHsKLp4sqB29AhSV3omErlQY48jY6wdFbw0v0migtvHT7kZg3oTh71d81P/nrRq2XE6e1k7T4G2DttyM0jyycWJbU1FhSaYsTPR3WCkmJYaMImw7kSS4T/i3mbvEzh6FoHx4cg5QegiOsrGIKLWQdNnvxcAjL/WKn7VwCP4/fwyGE1sSMfj3BZoYxkiiahzVr+0jvBLMOyeC/W328BaJ62Q== 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=4PV5SRwxuoZc7CYjZOzjkZN6pnNbixXimeGSwtdG4XE=; b=Q4+oYf48rf5YGiBXdgvkBEXJzYGRLBF72L6ZBHFmq/n/UVC8vSibGXwhAK4HT/DibICVuBTGwg9YXYL3uJX03YiEHDMLORBXV1IDLmbv9+Aw93fLAT70vhkPONriem/aPoaq0NgYW74zobnhUOtS2l0vD3k6dSoXWXTG8S0TMgSU/cILJzmOZAuVDrF3Ld+EBliPF/p2cpO7rUbpkLcvZaGkEXCAfsTgSfNIGmEi/EBemweYHaJf+buPyt3sP/M99EXfCb9oJXdyx60/J2B9Jpi3NAweRqB/uLMXTkFjM5/K8j2pWC9/nkTjAjGnpI+zBkwnknx4/5IxI3qz64FeIA== 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 DBBPR04MB7643.eurprd04.prod.outlook.com (2603:10a6:10:203::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Mon, 2 Dec 2024 02:58:52 +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.8207.017; Mon, 2 Dec 2024 02:58:52 +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, glx@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 v5 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Mon, 2 Dec 2024 10:56:35 +0800 Message-Id: <20241202025635.1274467-20-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241202025635.1274467-1-victor.liu@nxp.com> References: <20241202025635.1274467-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR06CA0005.apcprd06.prod.outlook.com (2603:1096:4:186::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DBBPR04MB7643:EE_ X-MS-Office365-Filtering-Correlation-Id: bd10f0b1-ba36-4b5b-6ce6-08dd127d4102 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: JokQEZvpn/jzkVhiTXV2qdI2LrwIrSONj7x2DZqpEoD8d251ZAYCar7RYvpAAZdigNisEupMvePGeDv8EqPlI1MqofL41BTUlqYu62MS+2XK072U9YANqV0rCgkce17pZyIfC/JQjlwE3T1WKLr1jckCoiL0TQhht8XkDCPw98ER/m5d0PCmkrE+S6Kfrltoy4BlkW/0xKsN6mfgv+mkJZxAsmyxScpeMVeZmXiHtUCluuwOQBL1JYVhbbQvDYX926lan33sc8GcGqbDw0HK19+CS52zoirr0PI3CZQU1vMgdV5Ptsx9ubfLhT8rrl7OK75SNyO8VuHWXZwnUDjsaEpg4RPCxKsid9PTdFYPFx7pfZ0LSwKal8RKYWTL0+vbluQF2Y67yx2RXnidQzlauFQ4bNCteVjYm1X9Fk7t8bG9dV6TLn6umc4/nHDXH6roMa1Z1hLgUVf4IGqrDuUfkKMpX9OMacZ3hEYYu+uiHE4BogoGmCyKXTm+JKpP1623HPhnP5KjlAUWyimXHSXv9Krx0Jeaoer43VsoTP6SuMX/b5gCRCDUWgDBeMPtdxUSLJAIJZSWqw9LzWTYjfdshEUOz8FQxPTaSGQG0+jIjW/iZfco03aVOiuatB0ENpfXMCPBTQmMmsHOzlXk53J11ogruw11GxRh1b1mc8JprMAroasfyCOeDAPCwfCLYOd26nonstMwgB4s4MgQ1zO+USS0Au2QMQh44BBQ5DR1XPneA1itsjkoXxoB0UL3OdaWeRjRrdIbfrz7eTVDH0gemwxfegZziwJGG9kpopPL4aByB2v8+YUuBQfO7gnrlHVebOznfQFWTU+E4FeNKFzojIOZ4pPz4yBnIKUvHBBI5L6iNgWi7MrNkyfb9x0Yd6UHCEoGdcWm3lFOc12HwaeuETLmge3pExtIZGl68PY7Yx3DSe6kPIgA3y6VlkbO/EQhJT5yqeDNSbQKqYCIrOQQIhl2UcLEYvK3NaH2wQ9N/QPpb1dnfnrrsTqgZxwtIBO7yTvDE+3NPYgaj3G457PrqfYfcQak/XhcycEETkc8Fz8ZGr0PLwHIG+E1319ap0qAQ7a5QMFWngbmFEMt57h4oLwbFy5+ZqaXDdapxD8ZlaFbgvv/8tEmbn7iSGysER8ffWAGzDlCMUqFNvDOJXcv3x/DLfhi9bBUpLvSTp8ql1jWCNOMTSwRpah3yuDPFTvhERz8oNrYtmhFXVHRvUNgvjsIninBc0Pt3UEv0IXIeCBaytBAmf5QIcFUz48LMtsRp1Pgy6LSpN5ouVBQWsDo3bzXm+yckJYZq+5cj5i14Clvfbmru2LazbLHSwSQvg+pmjfdpmjluEjHM+0amdbQFSJ/e1dkn/ugJ1+5W+Wlx+st/+xYW1nj0NzcjhoTLHiVxu+OMbOsChmo+ebo660pSA== 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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0PTHmDRctTCl4ahS5hqsjfMV7sxXeZvh66A4Wr/M12/lHlOQu3s/nVR5FzlxTk+XEt0J9z/G3HY3S/YwszZwkl3D401UmIsJBdHEefUgfywxr195l0cDA7GxF4ieaKAUULKzYUXzn7l3Myzr0qvL5tyXmneVK5XzApJ4P0uQysXv5v/1sedJyqRVco76MuS6eXuurO8aYvOGRScUgBcMN6r+szQlgES7bpGvbaweqkqkcoxN+5AF+Io+eR22bI7tz9udc6sF/17vuDTxYcNmDmQKlWSHmiE3OtUy1un+3O6WNzt3c5kWmoP8I7sXk/OjZPc33jrYTD0jgGkKhKV48v+SngN8l6Do3ua6g//9eGKKdM/l3MEcafCOTurNbusjwbxOwmjTE5Pnsn6UMlw/FnQx+YExMIfwvQxuzrd+7qsbK/KOAzsvmpMH5RbLLLgdbQfUbJS5dKyxw/K4EIuHxTRFWYKHLXkIlCS4YFC14GCg8tvLlbzg08H5gut97yhyosQ6C8xFXM/2LNoClNJRIY/ZTVSajurxIxJerOULIPlvgqFAM6vszXqJEYMDFEfRprjPKcAfp9RMv/LnPtaFrTIdh9zTGuVS/yyysFZe7jXWUHV21M1lDCWABVhF5iBGaxUunGe2pQnYveZBsGfogl1rcE7NfBtGoUSkcKAsnDsSRWEmGtSdEmLG7KPd4PHM+9jJ1A55WjqN+Fdu8f9lXkrfrymbGJzkS8MOR6iDKqIRAZBLxQLZbtj5GLwPie/3Jurnk3pJhTI3m+2ZZXYEvtzX5WpvR7aqPHqGd/PtpE33MqSRQk6bKKuXv59D12NUnnDpIAHJoXQVU+Wje9pibERQOy3c4cCDMVNqKpEB2tMQ9lDC2f1s0iJs6hckF0GgwSN9jsqK04yfXbil3yK7irpGTdehMhIJMYEC55l/U5DNblRD1wid+4YRwal4c+U9dFKlqp4H9r1djEt7dbahQPX+THMPamiPQdU3VIfWzI05dPWKC8wy04Ez2FZyOpEzVHa8EN9lmWq2J+7oADKOPxjou6I+loy/kgAsOG4owLBvEFXek3GzYLGWtdvDx+tOCeOC8cfd5NKdGKz43L89gTxcyAHt7xDWsJirC16NnYiDLukjgGRZJfq5C59lG89uxDjbl5xD171Q1/aVZT2+qjTUhl4zv0ELfNyXU3DSRSRaNd4zMudh9AYGeF+VkX8yu1TYfdZ3m3h+WM00l0QKuMJXeJgr7zx4ivdtnb4YFh2Q4wAaLWHSwGuhhzAW40TfzBhUNm26HQNavBxmrGUOHCPqGQxoRtrMrBqQEx1cCxPdehYeY6i3BIpgjp5ofAEV3ujHis3FelFbLaPmcj1J8uPupmWfQm99veYDpMesAzT+MgCPCbSLza7rCz0LJPn1BZ3T93h10CPqoflu/KnOJnx1q2vEVBhG2m2/TuYNh+mNqfdJlOxXJdiUbQh7zYkNu+OFG9uH0hvqfzt+AAhJa1Xghf9eUOwpW1rXjlxuoSDNv6HGpQqhi20+4hpSDNuEQeIhfMoo9q1K79dmebCEa2reCM1D/Hm1CM8ArkRajuWTR47izjHXgsrox0DmBgLR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd10f0b1-ba36-4b5b-6ce6-08dd127d4102 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 02:58:52.8933 (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: CyvyvolLNqSn0SLhD4r4DMsCZu1DHJ0SWLEqBy6CvkCpdz6l0mnfMTnV2GEd/7DhUndyAMfrZ6a1cf4RvtVy9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7643 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 --- 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