From patchwork Mon Nov 25 09:32:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884628 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2073.outbound.protection.outlook.com [40.107.249.73]) (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 5E82D1917FB for ; Mon, 25 Nov 2024 09:33:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527202; cv=fail; b=VVUlIZ8C7Bj1LC4VkLTbfywsvku/mvAdFVmYaND6Y6FY5FyxymY6ovuMGgDf2jbHCw/ppApzk0OyqHXp71+2nZWsDW28RuQiVAIqctkDZ2lEa0szP2KJYFJ/P/qiXV6KYokCBDXohAtOxSfH011drRrWBH8nAQVdKp1Xi+HrZrU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527202; c=relaxed/simple; bh=T/mJIUxAoJW9LZPn/AVl2DXPN+96UK3EvEHvoRZroJg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rDEWqcpY1d+SeqU/rnPP8sTYXV5vNh4GPVvchSkU9CECFWOIr6Z596kiWNqm3epEFfIiGVu2en8w6yEmH4iwtOTasQDZQnh/rh0o1JNeLWxO849WBfy/h1nbB9LPWDMn3GDy5uLsXyQpxfypg/qtzY4HU/Mpw11CiQx7E+KaD1U= 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=Nbp/n0Q3; arc=fail smtp.client-ip=40.107.249.73 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="Nbp/n0Q3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PCXqY43hy4T3TJBKowadQZPL3p0fk6jK8PFafftUR78Y4wUiSsXNEgyoj9/OKm2zvlLjDrlmOedsgpfFJfEm0GFl8k0z/48fAFtK7VyYbkj17Gcjn9MHFXHSnFBU3rrbS38gKQL5vuuyO6ezNkd47L8C/RL0ZdBrcibxlxjZSb4uDrzvMkOKp7okOYKSMJCmquFpk/KFHobni48TgOKHSzk1LUFXTvnxdqpoZGddkvmskUIZtBhkFZKMGJLvs6WhCmHEtoLVV7cJkNWRZbWWYDfWigsPm3Y7VwJ+2bvF7FpgZiBworDpMlYqjU1mb1atVfH749fXtczClv1P+uYSiQ== 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=NYmvrn33uIddjt+cJNpDrqkmjnSQ4Nxd+Va0+O73XSc=; b=ku30e2aam2yIJM6o2gr0KNM8eIHaUBg37EULo0riXWU4Gr24ylsa57YRK6uCkl+6+vVwXweayLbzLvbzvgbSIKE2ZFzUEPwcHSNc9z6F5qNnvl0EhRcqLK1at/mL2dEn/SMNZ3HMqEgQIx7oi+lgX6U4r6Q+zEIVOh4q+7p7QxIiaudDBg31Ct5bu3lKPgBYGVBpPX8+aBB6HvIhs7BGyyM0JGCXppM1EzpX80aFMF5L671sOizbWKeavfwYbqKCceKmsw++Kc9pSFJckbET+cTg6D/vHMMOWDaryW0DmjkhIPPu5npt39nLqDqKrMAcj6HHTW8BD35PvtKZj2ghPw== 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=NYmvrn33uIddjt+cJNpDrqkmjnSQ4Nxd+Va0+O73XSc=; b=Nbp/n0Q3tNa9MTxH9plF2nXLFFQ20XRcjHBrBnXFbOSEL4E2bRwaO8crXanYZ9Q5EHIJ/LckHfb0GRksOOOmRGfD+TGLpwxEB6CeqP60WmeB+dW8WP2iphtfNkEO6TOKHmBlbVYaFnX1U42n6Gffzx6aU31BxUM3Vq5n6Sl3YOLfTF7ZOrOMeznvAnU8wFhWp7UEwExdoOYTuGrmdHUZ3jm0Cvjs1Ziv+7Shw4Ml+aRxVcYn6Ny1Uvvdpn5yx1W325gfd83l6w8bSzBYXylJ2MYBWCEEbmyN9pwcsAhOiyOrE+k5/DKsJYzUNgCWNBlz+D9maS+t/nSSe3P1o4uqKw== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33:14 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%6]) with mapi id 15.20.8182.019; Mon, 25 Nov 2024 09:33: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 Subject: [PATCH v4 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Date: Mon, 25 Nov 2024 17:32:58 +0800 Message-Id: <20241125093316.2357162-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: f1ce9b5a-15b7-4463-8d6c-08dd0d342f51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 64cQcs0lqb1Sav5ruAozL7as/2omijNmhDmMIua9SRRB6cFVA+NGr5ULdEj5JsMr+zdu/rPCzEI+yi6u+KuWzigiICFB46l9r8l/SD6x6CgnMOfi4Yc3ixmxj34xjYfTXK2ZGRMIeN8+NR0lOESFinfBSoQ/Xh8aBzh4T90bKhau3NHR59pub3EY40J6/giBu8v2iMoFfMf/cZXEyAQC1PQSctdEGedpXI8KUI/p4tVK8KCDzI2Fxjh3LrEhW1SX9p2qe/2CDuneoAKZ8xavAflXYUXK92A+b3IEVcVrfBYLRzZOYYKkccL5D4HLynZwf+SXqoSngZpwEQRRsl0McIg0UEsQvcmVfYaEN7FD5/r8Qfje1kSJK72FCC8uAy7Ll9jzuj3fEJpjyQoUvSljkxxyQJewCg87Gr32Xu8GCAsdL+UoyZWb3ahtY/DqH/DXudQ/hTj1FBPlJtM+5bhVBd/315KC3NNg6J8svMF+INH3XsRttRU4IhYqw7qLwAYqtjitzVZD8Z4bJzAzDRhUJwtmsevKBkz0HYQ2wMq77cL4yTGgo5w7s+JtwSFxHMKuSeta+sWA16ROYKnd+1O1wHi5P60pkYv5gk5WGGDncpgaNe5rhUAo6Pe2A4JZEPYQiMasGByFyjvkdtZ1Ao0tfsI0owNC7kKB1XQJO/Fbz0f4wBVyUNXmhKx+u6dMbNZBvVBn3QVupIYLZeWAaU9doVekeVnELWP5SZoK7xuPI9CpgbHsxrr1xyoEE36Z3HiFuVfzV+r/Y4tgaDw/3EpV2T6SjtmBbhIpGv179K02TBsxhfbbrd7DcKWZFBwCfIegYcHn5zBdQNSGeO/aU3gZJp85ytkUnfUcqdsbVc/jn82mWVi310SKSS7DjQ/eXYowcnqgj98bYVP5BFalrsj1PzaqN+u7veQMu1LDUMDgT/NiNQycRJTjZg/Ht1Aq5y5ZxTJu+849IjXfUh9bTksvLnkQ7d4ukKYu8fWDmZberIUP5yN6oI2mHvjN61taFDC5TsGHOlMNcXl8rhazk6l0UE3mGfve04gr04A/bFtCRKKn4UI45kYfXe3+S1Pog2y2HK6lzdye2wTe4KEXo6jcFrEB/o/jcK4z4ogRAWedpBNy531nQa35xLrOupgoN2Jd7h7wzfBBMg0j1i+qo2Nurzpw7SZKeHlPQPzh1D2GbX8fIWSG4x18H4IN+G3v77iIeJ+ocpAqDaUyQ2geiKTO+tzupn4UxLuI4Pgt9W9Ct1vkXu2lphPrHaOyaP9F6DY62MumW/eQSChOAcb91KwqOYyufLvKWH4xJvr84lgmVBQaD/ceuIsxHIscQUVP4hqK+/I8OhpOeyMRAxgHz46GRLg5gBlSsZuyjwdkZLMMgJI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XTj07+AsBTuIY7qXJS5zkUEtc39+ZX5TmaePZrZTdhpyN4St7IQ2RzRzhJprXWU6kvP9e4+8MRGmQwrgzia1aiyK6rJtUewFNNgo5e1thOdukL5atqq0QjcNCcG4CpJ0j3Ye6Jio4NOOOy5h0jJc28F/dc/oU+BLaJM45DXLLMZpLDwB4Mf4Bd4aPRFnnhm3wEZvx1FxEXNeka+ac4VzAAyLRAGJ9zC07LzTtgPbSYLPxbmXA/dwCBKreQvxatB3vO1/FmyO5UJMeLDHkh4iLkjnuByIBSsrIDKWWrS+XXCaLEWLwtFO0Sb8VWWPWOBX2krnDe3LoxDQ2kexUv+iSnTIerOe7VzOPrcxPbASlFVpVv4hzky0q9M72RS28DROFhP6JPWuHG6BVQWeL9YI/Fbw8wtzATPephJPOK3vuSzoDqzfnOCq0bce3GHaKNVytJ887oo2AgMjf7rOSIAf3p8HHgvso8WWj05du8qordPxurVmaY/01fDMjK3S2M8jusFnuIt4v95OdBb3gQoOUDsrJC6U8dPtizwJbp12SdwOy+TqGXaF49tOW+xoyn8IBScUFWsag/5Y3zyf3zwBEaY9bleNhQTeUYncgrJcW75VNT7XLMP29NPK3vL5eAtOpjFx+i0Q8Drefg9FEBnXfheRxET5SdqIqswLNsuOLWvc5rY1yv+FZmJqK9OKjJhBm5+/V79HcdloBn35309WvRRVl2ERl1nd0dVCsCgeMIOf8l8N35EB2/4MVP+VjHEAjM6QcKyuxO+3//zvo/baqEEAsN6Vqdkr2XYQ+gefEhpK293y2RzmEPo17G/LfA2169RGFWGSLraviFR46xJXePp+jKql/NERy3RLZHo/BSDRinm2LU7cB5Xe3S1xcPmo7Jvi0kWL14+WyJu12ZVbCuKPnyT4ZhPZmGJDGD6RkXgVaul0XjpXq2Z7Sn0Bv20ZCbx8szK7FnUOQWrnUWGfJ3T+H42OdT4Ru/wDqYlL8yUCS2LwC4mhfWjDEiX1OPgZxTbqW6KIrcJheRNtrJrjnr/WIDw6QPG1YYMC/RqCn0XCdp6+gy71+PjR/+QcRpc/suEcw7YvIIvbS1DBF8aUt2tLyv57Uiuv0/wZNjvN+6LLeM2V/YJG84e1ZQ/1FYEO8+fXEZYY2VCkR81pySv8dKOMOTRfYAWfht9+Tvu6HSKOKjUKb96yQqqxOJMkq+OMutxdTTysYdTuVHiz7Fe+R7uF3bwSq0wC4iGwBBL6SNe184X++9W0QAapV+L1f4+kmgyC0BWbxKGeC8bCCG06+hbuvcpnr9TBlQeyQvZtG284/RHE6mBqlAmICqxcPs0gF99Wub8F/+M9oj4duAQuTH8TQprOhDXMuoV65HNy/Ii546GRp6DwG8ttgAFEVt7gWa27nt2Wv5yFg9Ua8QU3o5IminmmBZTvRD1lGlYsRukFJ7fb2Q3yMgJr7mqX71NIve+/eCGKW7xvsy6UvaOwUwwHr8MMQDmGgXlAYJ4Xt6ytPS1b5mKBMopnkRPRD0Bv/DO1ov1bAEyF5qOx3+5eZyztvmHBQcAyrlF69+XR1rygBc6cxJ8OyvRGf6ULwUEC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1ce9b5a-15b7-4463-8d6c-08dd0d342f51 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:14.3703 (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: 5Aec6o6x2Ca9G3itg1dbUm3dNIUmAUxnKpGcxiTuLlgzp+3vasL9zV/op3mnekQQaJgGHrj5egJg+3//0JkyVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 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 Reviewed-by: Rob Herring (Arm) --- 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 | 41 +++++ .../display/imx/fsl,imx8qxp-dc-clut.yaml | 44 ++++++ .../imx/fsl,imx8qxp-dc-constframe.yaml | 44 ++++++ .../display/imx/fsl,imx8qxp-dc-dither.yaml | 45 ++++++ .../display/imx/fsl,imx8qxp-dc-extdst.yaml | 72 +++++++++ .../display/imx/fsl,imx8qxp-dc-fetchunit.yaml | 141 ++++++++++++++++++ .../display/imx/fsl,imx8qxp-dc-filter.yaml | 43 ++++++ .../display/imx/fsl,imx8qxp-dc-framegen.yaml | 64 ++++++++ .../display/imx/fsl,imx8qxp-dc-gammacor.yaml | 32 ++++ .../imx/fsl,imx8qxp-dc-layerblend.yaml | 39 +++++ .../display/imx/fsl,imx8qxp-dc-matrix.yaml | 44 ++++++ .../display/imx/fsl,imx8qxp-dc-rop.yaml | 43 ++++++ .../display/imx/fsl,imx8qxp-dc-safety.yaml | 34 +++++ .../imx/fsl,imx8qxp-dc-scaling-engine.yaml | 83 +++++++++++ .../display/imx/fsl,imx8qxp-dc-signature.yaml | 53 +++++++ .../display/imx/fsl,imx8qxp-dc-store.yaml | 96 ++++++++++++ .../display/imx/fsl,imx8qxp-dc-tcon.yaml | 45 ++++++ 17 files changed, 963 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..095e65939fba --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..21d42aa11b52 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..94f678563608 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..8e4468d91836 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.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-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. + +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..dfc2d4f94f8e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml @@ -0,0 +1,72 @@ +# 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. + +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..97fb6a4598d9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml @@ -0,0 +1,141 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-fetchunit.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Fetch Unit + +description: | + The Fetch Unit is the interface between the AXI bus for source buffer access + and the internal pixel processing pipeline, which is 30-bit RGB plus 8-bit + Alpha. + + It is used to generate foreground planes in Display Controllers and source + planes in Blit Engines, and comprises the following built-in functions to + convert a wide range of frame buffer types. + + +---------X-----------------------------------------+ + | | Fetch Unit | + | V | + | +---------+ | + | | | | + | | Decode | Decompression [Decode] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Clip & | Clip Window [All] | + | | Overlay | Plane composition [Layer, Warp] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Re- | Flip/Rotate/Repl./Drop [All] | + X--> | sample | Perspective/Affine warping [Persp] | + | | | | Arbitrary warping [Warp, Persp] | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | | + | | | Palette | Color Palette [Layer, Decode] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | Extract | Raw to RGBA/YUV [All] | + | | | & | Bit width expansion [All] | + | | | Expand | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Planar to packed | + | |->| Combine | [Decode, Warp, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV422 to YUV444 | + | | | Chroma | [Decode, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV to RGB | + | | | Color | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Gamma removal | + | | | Gamma | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Alpla multiply, RGB pre-multiply | + | ->| Multiply| [Warp, Persp, Decode, Layer] | + | | | | + | --------- | + | | | + | V | + | +---------+ | + | | | Bilinear filter | + | | Filter | [Warp, Persp] | + | | | | + | +---------+ | + | | | + | V | + +---------X-----------------------------------------+ + + Note that different derivatives of the Fetch Unit exist. Each implements a + specific subset only of the pipeline stages shown above. Restrictions for the + units are specified in [square brackets]. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-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..5c54d5179ee3 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..9d1dc3a9de90 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml @@ -0,0 +1,64 @@ +# 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. + +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..25ad85742912 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml @@ -0,0 +1,32 @@ +# 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. + +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..2a6ab8a0ed7f --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml @@ -0,0 +1,39 @@ +# 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. + +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..d773389dd0dc --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..7115950ecae0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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. + +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..76cbe11a6364 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Scaling Engine + +description: | + The unit can change the dimension of the input frame by nearest or linear + re-sampling with 1/32 sub pixel precision. + + Internally it consist of two independent blocks for horizontal and vertical + scaling. The sequence of both operations is arbitrary. + + Any frame dimensions between 1 and 16384 pixels in width and height are + supported, except that the vertical scaler has a frame width maximum + depending of the system's functional limitations. + + In general all scale factors are supported inside the supported frame + dimensions. In range of scale factors 1/16..16 the filtered output colors + are LSBit precise (e.g. DC ripple free). + + +-----------+ + | Line | + | Buffer | + +-----------+ + ^ + | + V + |\ +-----------+ + ------+ | | | + | | +-->| Vertical |---- + | ----+ | | Scaler | | + | | |/ +-----------+ | + | | | + | | | + | | | |\ + | ------------- -------------+-----+ | + Input --+ X | +--> Output + | ------------- -------------+-----+ | + | | | |/ + | | | + | | |\ +-----------+ | + | ----+ | | | | + | | +-->| Horizontal|---- + ------+ | | Scaler | + |/ +-----------+ + + The unit supports downscaling, upscaling, sub pixel translation and bob + de-interlacing. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-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..c495822fdc80 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml @@ -0,0 +1,53 @@ +# 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. + +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..42d1b10906be --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-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-------------------------+ + +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..7a3b77ea92c7 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.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-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. + +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 Nov 25 09:32:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884629 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2061.outbound.protection.outlook.com [40.107.247.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DBBC191F84 for ; Mon, 25 Nov 2024 09:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527206; cv=fail; b=BZb6v/jaVQyLd+KLBdGzfQuRC/3mEtn2d2v/2jPhfiQf1GMKKsNrUFT35ecgncyCq0QosF9rI6fIhA3FAZNUCp00sKxtAvwwGF3WmLzZOglXmEqDR1DoFQRd7vHaPNIcyo4rp2gpkIiajC2jtsJ72M2Ezs7Zy9SFCfMg6XThxRo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527206; c=relaxed/simple; bh=04lncmczJQAGJRVOqyhbz3YfsosVrX3w1elhMcDQC04=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bAG88LvRQIYiXOnMjuFu2J+D02WZBQNBrnusy7SRILENTPf0IBgUyFvMkuZZjPVo9otYfRqRmQ9ADNt49wqWMaGRGrrjHXiBjZWrmfQIUZheEWmYICKr9EWZMZhWCV/ehFTpzgoqb2jtrjw/uw1QqM3LswcR3N70paqufTL8JkU= 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=dv4xNX87; arc=fail smtp.client-ip=40.107.247.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="dv4xNX87" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gnDaaxRtL3moSlGd0lp9o7lU/CUb46GiKYReFyNKd1isszxniPntpWkglS5KGwDyB8Ucgm/dEHQa3msiEhlY1ZMo9PNaUjUX3wZ0/9LY+ZhtAZoA5wtW12uJzLYNn/m6rYPCQvoc4/d8vojqQ9rD3jkqkuE20jfk+2YJWGxUa7M+tdPUHklyxfzrt8Ro8tkZZFNNgl5UREcIQD6NvwysyFUj9Ab6qqPtGwZQeSG+YaDuAt7nHjRmvn+3A46aNhmJTcaQCSHgLRz8BxWxSyH+hzqtQiDhDQ4EBN+LENfdOk5iwlBZudHKOZ+KqPPoKB6jePjCuTHO6tVwdNU40bLXcA== 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=espCUnrHoiLKKN/NVAOKiZE6b9OVjp6fuUrI2Bto1T8=; b=IOML6iVsuq8VfvWH3GbiVSWnG7i3udFJtUK8+/ukt6GdGGqq4Wvn1u7poRoOACMj9kfpRYqS26oaCMWCz6in8lFR2mV4IgMJ+TcVyR9Gu4nryw0jE/nqo/xbWy2b9jatUI+hfSmNL3llgw4L6kh56AVbywCQC9ApVgoQKDU0xpgM3eVPXm4AbdOE4DPeCno0wZ9iFmmK2zCQlOGxdVNFiAs6DSiYf9aOzPpqhRGJsjETweHzgnhACYpn6D+ubo9SNZO81XYKDJNXHBe4Gyk5q78mXa04HGLg3FhNn96q1YGYzKrPPO3KBEwwZoC9dNwEIIv5fGuwfkAZrrYoSBy/nA== 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=espCUnrHoiLKKN/NVAOKiZE6b9OVjp6fuUrI2Bto1T8=; b=dv4xNX877R/Cdvq414KxZkmFJ/HBWZ56utNkcg/K4L+Q0JBq1fQxFPk/W9zDKfhrarZ4cGz+3YcuVtaO1cI3/PtZ+vCccnuawPca42Zu0St1/iMSub03a6Cxkr/8pFVLDLZ/u317jnaS4VCDjLVRMLvwB/tmpkQjnL0DUFm224u9U/561F3znF7W6GbMdLzBr2b0ZAJmr4OgC8B/z6CfF2XHHA2w8qTYlswrJg3JQ8R2utko+/DmzlC+O3JVOt9d8hvFkvBc1l7pNIyhl5/Xz4Yf/gC/Rk5aEvIQ6DVmlKnSumtRE1SmuBrpdQMmwEASuByMG5DuoMDiWFMgDt8QIg== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33:21 +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.8182.019; Mon, 25 Nov 2024 09:33:21 +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 Subject: [PATCH v4 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Date: Mon, 25 Nov 2024 17:32:59 +0800 Message-Id: <20241125093316.2357162-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: 420b2b57-3c88-45a8-33f0-08dd0d3433c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Ic6y6wQyBYDymknL52m4NGdrQE2l10276VGXGMTSmWDEyevPBaLg5sv2QA62lzeM4MQrjpJyTMnthzJwZi9rSoAbrgDQ/JFJ9w54CmLFmfI0/CWnprdQjL6fsbLr3UFo9yZ3MrngXCVrgmwZWwQkP1Sv2c/yVqTds1IVruE0F3CuHER6y7d/+dKwe+uzLsFcYYkuwQBxWPnA4aaSfJHUYWs+3hf6k4B+XvXDkLF7iKMsXfPyTVzYses4BmX4WkLCk06yYPEGsyZ2cad/X7IRbJoXLYlUmbLvl5Fo5p1SuRELmTVmGbBWzV1hs8j3aChNphMhegxePznULNmbR7hRPibaEEWH3o/MBsPpClNEnLDTkri6frPr/30pOx9DTmfQ87maJWhHJpOmKYraI/OG38Jmd7qgGvI72ZRGIoV6pgMyS1VI/W80sljv8CanM0bUf+PykAXuKyRXqNSfgdhrmPpRK+6dxk6hldMZfK5X1oH+C56NdDFLqAhL39GisbuKJUXZAdoYxNoSiGlfRImHbA5PBhh7oytx+buWBUvFd3meE3O4+ZqMenURtwclxyuDFjaT/FY8shAwlVZiTmEMxeuT0N0fTX3xcWMlV+9SL+IeBqItJyKukGxNuUHFZP4byaxGh10gbAK7b0ZRatnyK4PgSh+EYhaJGhVZKhOeavakV6UTgqqjJK4ARrPaZUx4FkZIP/ZFwqx8lXmDXXkR2CwVhnDmUEL9H29mO4tHVvIG18VkJzC7ZWFvU7fDJ+K1KgcMheaz8wc0JvIpyhtxLS8xlBQmpae+Q4oDkiVkD+OZsqc8zpIEeUeDKUtjx10WvKe0VwZJreA/TFsc3iloB2YCZUNBa6h+0oXJa6SJAoQc32+o24pH7Z3JR91opvP1hXU/XLX9JJrGSv7iadpkPtB1XoJ49/FJgmsPeTm2Napo2l5lBWm9Nkd1iivmOJIP/hlInr5UeHK1ux0FAQOh+v7p4BJxEaHu7SIywUQwH0XeyIz69sqE1nxc4Uhj99JREuaO+6V7EYnUwP+jpgHbQ8dBKNsNoGwoMnKnGjZirISmNxDjJhl77pZdmzdAhXCZzegPpgwHm7JXPsJ9LCd8o6d0xxrsJ+GD4jMY2n+Kow5My07zxpI7lO9d5fhEqIMYcAo/x91L8rDed3mUjlUy66InWFrVoWmvjezVY4UrCpihi7U5T+2lRImCGiPCytguhz4f95V0vtLbE5oyAOfg+933oq3Oq15DTU1kZC04eEduynuaucFTtmr9VQ73d+c7gXfcPDwOaalgQn6RcWTBx2kDrPGizZwuq4+shflN1O+kO9P65dgvlg3nzr2SEv51XngahVp5X9mWwlZHXNjrzg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZOlsLTVt3HbOeO4iPq0zjIFZsHvIrFq14PGFwmmvgPXdXVYmv74Pnq+39AgNrxyPjbP4W5BiWhwzXRzjuOPvogo+zupbqocxR3DP+nYV4KnLUHEurkz4a/p8A5UWkw5h6tBkuqIDNx440wmw5ixTxTajoVNLu3MriBNahZ1Oyai6A74lLwmizdjkzBV8Q3tjt2xflOY3gAOjYM8ady7e0PBpk13Vm1xHSy1d7e5jyRgNqYMPcBSRQrOLLYK1E+0GrfBj2XWJXZMF6xSD+ByIak6ETM6ekDKG0WBduoiM2AKLr2wqsEt2zE5fsc59ikMoqo3FRl7LFhCapBqxw8F0DQ+i7bCKJqw9ZKNPEkcuVsXl3u8a1VNw2wnHhO2rS8XV/EhIY+R3ldZQZ11sUEs4b4YezfPHU+Pbe235BJR1Rj96Ryeyf+F7/1Qw+F3hl2HsamOlkZAOQx3yXeWYKOFkYP8uGS0Z2KcnMIRUlwr/WgFTzh6c8VbGhSr+tDwmaNhZUV3LVtCKqFmI6zc6iQS9APcDQ/PFsSFwUti+P1yF2zumow9gODfz3SDHr4avG05TJAJprpYhKJ31uU/vsKt/i474ZaVb+BWdREvwTzaESppgNr+8b6DKkW3UM0/FUiQzMozQtXPV7ZXrXD3oRxJbUgMoY0tyY+V+meCfwZLG5Dyu7/nIzK4ckx98cTuHlTEZHtjx2P/acGSValQpSU5tnLgYVzvKvruzmKdHGlYqaA284bOLHR/euJIhKNB2dUN0RkGTv3MKrwlrhj1MBBieN81pON+5T7YsDRJ9DGgW9pYIKafwGoPNWgr2OvgrG347hBHkeHPe/ri2ZgudL/HGEC77xwUicEBTrOg7mkaagywnf/XzdvX+tqDxSRIDwStwq8bFaBa7iA5uYIiTMLMslsUOu2uPkrQN7f2ysKI61BkvcWxLCG0aQpYLOl702NlMEM3H4napsL68YAEcqNTno2C+QJYmo39Ab+iNDnpfjOE3Ejgg1tK6JCJWv+iKWjxefIqozhtivwXTuKGw53nygOg6cHGq32sJb7sYIKPvM8MUrZmrtIL7ROeCiidVLf2Kyblem8/W9Ie3jAD7Vp0Tla3T5MoDo8EbPi6vsZ5S1fikj3xXaCCXpKjQGh3Aa8C2s6YwtrMiTWowRBhXG0AqedW77MtseaOvPXc6M5I3QTS8FyhKbOq7YBjICDqTUdwiqywF4sHkZyxyn6GIG7FTs5WeG683rF5tye6AKEmWfmByF52T/FPEWh3cV1QwN5p7VZimvG/jz+0pHGZXmjCHH/EwWgTEDDzIiX1YVcNrhfe8m/EmooutLeGB+OOCeFlnbl7dOCk95JK4b3N2rkbVG37rFYBE/mDANqMJC4YKmDWGEHdA9aIeXkxk8AJIgzCpB2n4h3BFj6e9VZ1TJFcecma/Hx90f0+H828b8WvXRrzOhK5nNiHEP4WmltmmlsTcQgGIP0Px1IqyYnqTGPiwwVb/rNdm3+maVkZNnk9sevsnlxay3s+HusYT5NyiXeyf81eys8IK0LPZqjVWZbofNRapgzuIpept4o6mO7DXdhHAaPQBhtFq2YUjskKqE0fh X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 420b2b57-3c88-45a8-33f0-08dd0d3433c0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:21.6169 (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: 68t7NC4cUciKz15rfs2PS6ELIpY22HmpSWAzyUMnq4bX4/zJEcNVCyhGt3Iz+o4mhPp9n7VmiikkI0OnAF5UvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 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) --- 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 Nov 25 09:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884630 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2041.outbound.protection.outlook.com [40.107.241.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C404F192D65 for ; Mon, 25 Nov 2024 09:33:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527215; cv=fail; b=WQgKlTx36IDTEt5PEA6QtpYXrEipr+eQFumWxNjb44EEKtD4NFBYSzjA4CeJKug1CPjjgSNNnS9eNyQj9H7Iw4ZSlKUhOLephsmY4Q83lZwghclmynObOdRD9Iwl4J0U/aN5B0XaX8HBdCuGoAlLsCr1KUCjzj74tTRjrsmhgto= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527215; c=relaxed/simple; bh=DS7Y/BiV3f1L+Fuj6BE1axnBekmLmhaglJ3n3uX7rO0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=R2RSgemnp/Vmk/qy84MSk85emxfLkfyp7XaHDlu9pbBMkLQ7LJDdGC4sco6TYIgyINXlPn/daB24Tu+x+yQPxEqA0VKNkgu/6W5Jz6KrHVlWY/ThSGuuTK5WV01JbpuWC5+6WflUIY7U+6zVIazRW3YbKgP5qbZRP4EX4fHGHAY= 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=gB2JP+5v; arc=fail smtp.client-ip=40.107.241.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="gB2JP+5v" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RZaBorrESA2lwOIOCO8DsFyjpS8KHQRfa0fmfGao1ojnelCmq3KK5lM2m7ODPlo9wGO5K4DVwjrncDPHsYnLJMuHXPkvrr2TjAvN9Tt7QKLDbQ6QpDpMu1sb4V5GN1/3DVmtPX0ie31auQW5k0KPUrJuk4V974DERiNg1Yvv1zxVCY7bdh53o+JA97J2jTy7hd4FYoiEyoeMxTwxi+GkBqXUQmvPfcPan4KJKEitLu6VbBn4u8EMR1qo0NIgZG1htU8Q53QSn5edyb56y1vOcNkoBs4kKk8dkB+0QqsVw2ariZ1mWrzRp+KnNKPHP8oyQTK7dhgLp12R4Z6HxOmfOA== 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=gYsJ70fQLkj4LylT139lES0KvUmGHk1J/dvMOAt40Qc=; b=jJ78ABOSZ9khSN/mXE8gHn6oPW81inAZLsCXikluIHuqp17OaH43kNkk6YjGdWa6Cr94111nN8lSIWWadxLDE69mhAIsWWpLinQ6SK+bKaz27IKl+up0gWbIduXS928XqG/+zgt3hSIUri+/u5MudgnLPtZAYBs0550OxKwVTALNmaAccGfoTj8fOBzraN5rEvucFglonWDRcHfumUg85Rai4ju/07dN1Cd3CUPpii/AhLdTP+6n84nXGr6rvpEbnQzdJc78rId3GHOO3lyheG11VBbKuwa7LpAEpktFGy2oN5sKf0tr+4pB8JsbjnYbP4GXeU2mOmshq+tocivulA== 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=gYsJ70fQLkj4LylT139lES0KvUmGHk1J/dvMOAt40Qc=; b=gB2JP+5vDztpony9QpFy9EPKNkzvr447ugrh+gV4Bu/G1RtlFilUemEwNYo28tcEZddvItLnFV4xyR9BTDIn8RXvwie21doXLvBdcok3p/azn4lVBBXLMtGynrIaNxDwlNghlcdE+MS7WAPBNx10A6gJp+CI/ixxbCjGs1v4ZgBqf4uuNWH+LhlrzwyPhxPqMUpuH1kTsuxmBObDxRsQVx7qNBTeqtoSlWyECwPeCIj6zVbYXSyIMkj7hjEYPqKVTdZ1f7lIgMnJbjNB9phuiHNpOYHAKZsVQRijZTl4ZrkUWkR2oqZf2rDWMxcJEvFNITL93CeYmztD6RbWnxvcaQ== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33: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.8182.019; Mon, 25 Nov 2024 09:33: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 Subject: [PATCH v4 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Mon, 25 Nov 2024 17:33:00 +0800 Message-Id: <20241125093316.2357162-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: 26d692c7-3307-4537-301c-08dd0d34380b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 4Z1GVrQd5+hly2kGu3Vvk6nQ0E4G1kxbYTXpZpCaUZQ90m4reZIgUMDol9Dkt9xdchKvbO31i0ieJ643ujErMkbJHYdz2ArDOfP6I0yEzFXmLabNXRGoNcW1o7TLR1Kij2Vwe/Ir7lb49btyxZVSIks69pjFxDvtgosgmxGPhBtQ12CNbuGBH61uGkQ8wCv26ZyLL0RkEc7epzPX7pvG3WJh9zfDRk19MDixKGNnw75zYooPfVDSY2+lS9/KEN0mhdu3oFZnoyzdTtbZZUhjtKeMNksSzwv0TewVdMjgF1GxgSzkuVBMMUesBYqRPAM5Ewm4ICW4/Ho9XvkdtF8esmrIVwn3EyIQBPR7LCdEIssqy45hcumxGw0b5rRbZuXfpveJBaq/L0xIITZVX4yBbQCbeQ2pKhWoEnrd5cQ9tyiKCHs6kH9KrdFlZd/gwA7j7a7kHGnd7CZEjhmg5gtypwEarGWxYOEq8rXa4jEGka8l8Ko8varvvIWF3aWAoootGZxHPKy2xaQQmmuVVo6kKd12x4pRX4eqydK4mff1XZqOCJPTcl4n1/98HixSYS9cvJ8VGNZJPl0yHy+9R3L6Wnp6lPicYgU0lYJ4b1wiJ7JkwjE2G/AbvuL2NXtSVc9lGpK6f8p2MPUPPX9UYsI/bsPkyQX2RxJlLYnsERovOlr+Izbn4LvnRSv2TXTir3hUJwSZoNL0CB2kI0Eo9oFz4iN02vmwaD+qXaNNftyWmALRCnpP39eIzDU30iTMB6aMkVn7TyvnL7BvW0OsKFQgglTbJfwGg0m3Xi2Mw0+cRXHFgKErVpMA+8Pv+StA2KxzXSX+C69f4LoJxJnq3xwMgSa4k9h85n9G+oXU71juNhoVWaMAdZsAMARvRSGLRNJHU31mj+AFH0iCkY5Ivo/dq9aPyjphHVcst4iNBOfqMn2CjyyrTM8HCFdrDZ3NUhrlxuLBwta1p+WBa/vbtHzDrwSmjehK0l8WetQTaZRsyEoUmnLPQyu7TNBfQzmKtMIwEixEx7zAEbkTTu37ZV+FUFb3T+vWytJTFqagMKH3TGX03/E/5DQraVEWS+RacV9SJBJdp6nCFa3nLQdAg1jmtEm9G70i0uoC3va8vGtOgbgBg+aUOYpI3nr4aLUp/VdeDM6gh+VMnmhjdqh8fisYSJPkwaT0cKnQVIkPuPOKiRLwLqPtT/MIZsWpO+phpHRLvT19BpZkgE46LVqrr4qjZ2oct+bwlZMI0aOhFahMmLyNmaimTzuGtniwaPIhnOV0/Huxyuh0sSxb+Oj6yO95RWqyeDyhEXTdR6vhjL+qYSFlxlUk7oqPPIjlOqtl4xcmH+luWajwq0MXEYOYKVO6CFXBeo5ZjSsnn5KRbyaA7DA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xAb9xTfV12Qgm9A4EzYEmnplX/TA8Rz9L03SDJhJ9VlxJcXB/LNaZ65OJXm6HWevujeT/8krD3+JJYx43+g5eZTe0bK91ziDF72vVGD8plqhc993Ar6uNVgox9w+m70CGOmSxVGcgbnzwUfiWl4RJbkICgEuXZWhDESM/KC2nr+JEgQgxTxqhupmzmWNHljFKRRoKP08Uu1uIGyXPkXwOMqsQvIkTs/8j/PKUc0ByF2A0vz+8MpyPpjArW7/U26UfyOfQ3CKq3xUJ0XXjvdCF1cZcDiF3te4UmJNoBeq5M/XTw1dr3E6MK3ufJVjWvFf/+WU7KJTWAg+mmFLwq2pk20RY4BgMDpAVqPgluz1iWZZCftgh4vuW5y66/WNOhsxZ0TN7UWAkNxwecKawHerNDb1gr02fUhwzSEZGDx99/nX46+HS1clPov6GfduIzyhq4zge1YHoOlPymEQTkF1hcKrD/JGCwe41JuOPFxJ77kwSra0CxMM1E/Ve0j3yOBuaGY92C9cWZCJZ8eFxzLlXESimxVuEUdBfOWddjzvxewRyT1V8404jILpqdwlmuzFdGAh7Dit8645JEuXNQUlI2cgwH8dtvP92hIJZZp1pBhSVamDY2dpsh8IhoB49ixZwv5nE6D0vCSjChuQUKGvmyY4Cf84dBw+5Z0zx03P6uC1EMgpozs5fothShz6S6vIsIXTm/aVouBLvFbFfsDrzE1/bj5Lhba5Jaz6fqRjmm8Fshtvw3nrfPbFe1dc2twIMD3dC1WlnZIGPo+FVMe7SSVjeH7S6vJRee94nIThkcQe+8863angOwucl886zvi0rhFTYXNKvdyaSdUvHKLV1ueQQsuOnWHuNhXnv/AXEi4H65ckl4dUc/nREcgRwvTTMJJ0v7Qeo60fY8qSonQaS1DHGaHaU8kRl/ZkGtDnC2a1FbDWTXpaMOMwz1y86QLjg8N5xs6XXH5k+Ph6ZSs3tc0bGtvpxStZc+KkjTFQUmRRlRX7D6hvm6/0A3/O7BFKDljrnWI8Bi7m8zCBiwuj5Ge0Oj/RGcQwa1OyKTogYZvsZvM6HalwI1GdVrXxa9QhP0lRCafJVjhxqkdsyBS+j9daFTDcTy7v7+VuzaMKOT2v03/TV7KvBDqfqjSz9/58g8G8RpoCxm1TXwH3syNR31NorANVbV0V/OWoaxQd2ofuUCjDvYLpXl4uf2CrcpHLYFWQ4MjbTkMV42HD2oHwnVphTo+2zwYubbEeWlbf7YVK34me2i982xBRN80gMTLyLXR2diAjT0Xoy0TRXCp49kvGRRpi0KtZDj3KD9MtdCe0RWhUMDs76SfntmHXJH7RIQMiR4prjS64qNEGmMSe6uHxZenSbaexhwfG81IzneRvDM+vSw4CJ44dqwoSPUZnoqjU1fcpLrqsMtBPMVE7VhmNd4asfN1Z3/KGdGh7kraTSm1HiRZIFRiRa65CAVudQHQSalOQ1RwNEcxARIOOBeeNOSTN/ZV+usTCSGHwgGvTWuUqJ0wm7PhApsg5Z5PuzEO/8IEh1j7RnSoyt3nYsrDafWOE/UXjsBCNNeT3FfZfk2VzwTo5Z2fK+kVs0ZAV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26d692c7-3307-4537-301c-08dd0d34380b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:28.8205 (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: KA++CqIMJ4slGoVkZNtMtuoMoIWEZ2Gjvy0/26OhWvlh4nJnESqHC/uivUqlrftrmXVUUBmDpg1NfUYrdtSd7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- 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 | 152 ++++++++++++++++++ 1 file changed, 152 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..91f3bb77d8d0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml @@ -0,0 +1,152 @@ +# 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. + +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 Nov 25 09:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884631 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 723AC193091 for ; Mon, 25 Nov 2024 09:33:39 +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=1732527221; cv=fail; b=umIvbCsaZxe1AMZSSdSnJsnb7ktmZP+0801X7Ct44CjT5R8mqWQXLNyzBWd5YiB/nlajGtRwpjlC7V71xI8nrvQlmrjgUe9takhB9K6MZH5OQDHSIXyVLVeBBPKBJ270lQ9y25KDYXedqCHzKFh7Xj115J9jruZwlrWvCvZudlg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527221; c=relaxed/simple; bh=toa0KYG1lcsX/pN3XwwSMy7kYEb3ys1Ysy+pKcYiRUo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=RCndVBkWAGukCacpoK/T+LLcbDHq4Iq5VMCx8j+XVYQBZ88x+MLU0DECiJLrLfpuV0po2lmzHvz17JEksxZGVgCUHOCAzjG9/mei1zBJpZdXjdG4Im9IdmTb6dfcHH7H746gVa/eGPWKSfK2bcaVqChdsI5zGtIWOtT96Y8lT04= 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=OfJt46K/; 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="OfJt46K/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=r+aRfQyt6OBGnid4mXMtxIsaIZZHn+xr2XMn77Uss/UuGBDklSrKaPhT3NeKMc0R3YBF5dGusRcDX/dQsZAQ89M7PqeHam4JxcVQ6Jsp3Hg4HJVlOeHPXipr+k4BKenTrL3ze/24OfDdZkhG7kXdKGSTbEl3yOZjw32J5gwAvrXb+yXyDRxwWTjvpDOMfzjBdj5+/73AYWu4G1z4qSqmo1IHnEmjQEgDwLAOQe2qfGbYYeJD1VQ5HnWfbdu/me+ArzL0NPXEz2fsEgoWEn7m32v6GUUcNzR4S3Weu5PPpdjFHPttCDow2yevyMpbfelDHhD1mBz9kmLI/6VNbsRmkQ== 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=FJ+B2/N03l9c78vsCZN5PzmZB4ox5S6YcNX/ON4w+fE=; b=KOyVZ5AF5dmXPBqXFxpZi7QDSAiEHTNqn9x5dUN0qyC7Wbpm2GsWTH1XOhEYgKUt3mMmlh8XeFYLiLH3DFC/uKUlj/AUBaI/CKZ6opuK9F+7MeotsNzdkcU8EjL6dhPUNciI1skk1F9j8xmCUAQZBs5D0q2SjfmhhWVSbQR0Kmoq6ls7gahHm1Z7z/V4AJVP2tgZ9w57emZF6jU+D1J0WamcnigMHPYl3vFKe4Y1QboJSlXzJieZAyGaW4LaRrAool5BvmNm5bbibubOJDcP+F8M5qNzIgtFJAU020Y7o02JV1BRZk6KVW4AxDKcgf/EtsYrjBx/Vm9C8igXOFbviQ== 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=FJ+B2/N03l9c78vsCZN5PzmZB4ox5S6YcNX/ON4w+fE=; b=OfJt46K/YCQMoNTe4rJra7luQrfUxdzlc4bJlbDSlBUEjj7rdDsrcmN+hk1tNWYmGez/tutDV+BgtkdR+yhqDfzF0h8DcZ/35BwHB/VQ6vvr2sX+GvkP9stTlG3epcwGI01gO570Xsm2tRshOwi0NR3q95FvPSFBZKZIPTC0G/h6PMA0y3JTyv1uhHnA3TVVOhxt7gDhyHi/Zx729lRMB0hasjE+FIBxu69OAK8mNZzhPAyjdYiZQu/eI841bqHUjfpxCcjn+GNnoz48iVoNn5DwJxYy0J/5KttCs9870sOz9K/R71FeaHgDBnLrsD5NxzMwgF1yzTh5AkGhc5Ur8g== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33:36 +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.8182.019; Mon, 25 Nov 2024 09:33:36 +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 Subject: [PATCH v4 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 25 Nov 2024 17:33:01 +0800 Message-Id: <20241125093316.2357162-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: ee338747-3f59-42e1-4422-08dd0d343ca3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: UycDjQnzxgvotxWUQQJIy+Kw53VNw0lHaFQEbosWr/yvzC4p1peQFypvfMXG3oBDe59Hwfm12Y8RN4qrx1yG6UNt1Lk9WUrYzAdJHOEyH+aEIBm/Boq+43ebBeYu83ZbgIy8EPuL+s1Ap6W6eWf5lr6TyTUFsrAZ7r1tMiujEaK3YGBNlc+UREC+MsloP+Sr16+qYnq6iCosylEJG9/UisofWpUHC7gBmOmzz+zmQ9ejueKnSXEM3yryPAspVWTzbndXlZfM1YamPWUqDNm4YPbOBESm0uym63ZDW6LFe+Lxxzzxne1RTwp+B3VFDNx3kJm2YjkQk5Iy0u9dw7ADG1Pp37k/Ppup3yM9+digg1HS4dEkT+m49x77zGUH2Tq2cQONmCbNnpT1QIL6HBe5QJD5ofOt2K+e7kejcykJLgTEdsqVq4uQ4TZu9THE2o3oGM2GiUtcmdq0EbXan+d8j+cvjy9kwzDjXBPGQvSPhG0+YJFgvkxFAks4NqMyi7Qo31u07lq5eKViCpV3xsG6rzvN7jnXcVOsA6ShwAq+hNxv23KhiBtXFUMWmF1Go7WdNWb4Mqm5SxDzYCanbgSNqxqqWWWA5IcfLMbXrMAU/t1OnjIF8ul8Iq6ZvtC5yDeRL2tPO9fS1pC8ZYOI5PJg0WdnI7lDK7I0ijhpfXgxcvh7tM01iVnnohTCzLeXF9w625q1rkW3mf5gWq5n5YMMqN90RmqtUC/eKUowv/G8987s1Wnzjf8LFLnZmXwLtgcMBHEH51kRrnAylORxqSYCr/dINf4H5p1Ko2xdYktmzPcQj8ld5QBjycvmybysI//qNJXYxFfs0KikOiy4fiDc1vmLnHid0LCoy42lLdn6vkCNR/N0Yis4SW/ff9IiDE9XXPQuGgT9cXywvTZPpTcC+gfrLQaCI5YdEvblxoKHedCc0qKJNLR+bDi4WvIBqz7jCXrE8DYIqV/3ZEpwuSHXHX6tBwSKD2YXMOxGEASsSwQ/+Vx47tLlin4C44yI97Gm1N4D3PB3EvGKq5af150nIXpoazKv5VJqqUa0IosAyYA7MEby8NQKxr2tlOb4qQjlFLVx7oybscsyQSrRv34WHwvSlY6zOrre/wRw9Fd/mD5xmC4rHEWCiVW9tn07AThf/X3puR9tat6kQHAQZFSv+oQZAo8ucjkoQgcdLIvDKqp/3t9wXcz9bmPW8VBojE5xD8YDySWgXXIReDxN5ZYTwbZS4erPzK4eipHZC/dJhkjyyca/clqHajnX+nbaXAzLWoRRX2GTdU2EUXZcghIDG+fkOG1rdiBBeaUZyO1T1YSM0YgJmGezf7gAAiUjkPWR5IaR3SXGh6aSigkDuUxh4A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uZWv5FErGCs5wQQr4t8NP7bNGMxHDeLrWJdaUEb3JQ7tOgclxShNHe0MULWwgne/K+oSU+GV8O8QCF5dFIyS2JMs7eipAnmJ5jugXyBRbAL7Z6GnGOWsnnUZhew5Sh8PPI//ozeX9o1g8RT+cVqqrNIymJIIkOShWR/Uk2/o9hNtCbEbYwokBIXcM9K9yDUGBA9i4NHJlucGHe+pa+gGMBX4iTG3elYn7wPzpXXOsMon80MMM2NKYSH1tXeceY7YO6MskSetJS2C8fdKN6i8Lk3LCYtXdjc+hi8SNl22nAg1uq+O+EmSOuBccUl6NZ3ebOzSJlfjABXgRWTx82rb/mOLkt50k/mR3i/Mr+jOPZ+3pflMfUXGUd0l5gZTDHKmhL9JkydcltzKVJWIVJhQvndbbANk0lekPdwkzeNyhPcaWi3zcsYKAbzv5KPwwr8hAtLtdcrihkmCoduLoJYBZFoQOPqgkOs0bDdimWestQKBH0qQYbmh7qUdOf00yElhFnEhkRhdaZ1a46NJOzUsGMrciGQ13LuEE8bcP4kXKcIuj32lHHgHy9oOQTjY9h2hIx7sLm1eWV4Xuvbsd6vJMVzgnQrs7RjmzAtkxGm2YS0jcMbMsoC9TyR1WNmKMnkPABM9OfzCWjum4KOGU43VJnvakx6EaPIrhY4kFAVJlj/MPQuU7tlg/ALcv0sd9N6SbFjxu71dYKdPB8yb/y2Vz5tQkA+iscJqa2bR0Nt2Ijv+slXHtQEaAUH5cSCiEe0W8SYygT+1tUCKciCJ9KrsaljdKTCrdE5rtC/tB+G2vPN2vpPDisU2NTReQ/mHvEK3VSep7/VKMTrDvR+ddohGDia7k4+9xLzIRyT5p5rbY0bd+fQ6fQe+TN6RgSXzp4da5ut/e9hbcP6uoCochr1SiT5p9a4wg2XEl0MqcQfyfeMeeNu4FZuXvzZe6IUZghDxpmGZbCc9UL1ildfMns73T2ZinWkkibIkHbCbnKeUISjCP3FuegWyiSCPKcbztbjPz9jnUyvWtJSCXbeSGegUPdQYddU08tiN7j5n8vCiVE3hXhKEqljixJtFP8xWKq8EBBv/7H6f8791lJL58I9R1H2BjuAsGvu4q/dTj8rwLGj8WQlkP+CxLspccjhmR58hv4C/r9nNfA61YR3SHipkkixDYywWpgriynkZsuQi25t9f8B5xeltZ+mOUW2AAbuJJyiEznr4aJDzTXWZcO9DT06nJhqLOlhmLMFbZeORa56XszdpKRfMOj1L4fH2+bziW4SsM0Vtk/nZT7idgjwmVmSUvXGuN6DgzIPo2eK1kaqMbialIDDRtquHrbIl1Khxw9tJtU3CeznGAqXPz5V0KUNW/Tia5o43K3CcDLSLkiGyUcpEmsts43PvgpMkjGDqxXxb0g4VCTx6zn9gTb1N8n7c/lhRvp2UFzlUPsliK2vI5dScEJuPYeX8hE6mcpt/SwcSYmU194kvMYe4Wl3KEsRs22IZ1YPsxhOhtXS+Kvvxy3KA6OwcfY+n7Jwe4dPMU59H4NtB3ftlPKEt/EPzMUq+SdyqyluxNh/OY5jdVMzyNZCop828ouLtYmbFga+/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee338747-3f59-42e1-4422-08dd0d343ca3 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:36.5972 (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: T+2klOu0a+rVo3S1ZQHNUf9TCTxlGB44BQEOgE9mZqDunalYx2ADKT3+jxyZniqmGeuMNWKXppVJV+kmvQJMWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 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) --- 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 Nov 25 09:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884632 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2061.outbound.protection.outlook.com [40.107.249.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C95E4191F9C for ; Mon, 25 Nov 2024 09:33:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527228; cv=fail; b=INd5kL3g1Gw3V+Xm9M/4e9mV21MBPQ5MRVm88eGnbqtJqrPEiHb9fpmmNn37i9MMjIyuucs7q8kEjBEmz3bsoQH0pwBE7AhPt5E1Mhug1fAo2TzxrAwg9OSdFQ3cEwkUeI5kGelNZGkKPqpOBv6PyJPP/SnJW8pv9zm2XDstjio= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527228; c=relaxed/simple; bh=Fnb88MOXSdGs60yk+aueq7iqXjD6r/b62L/xKeLY9r0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=F5/cdI4xPTYY8z97BGWOiV9igR+DQ7vLxAzm96/0Hbmxww3RpRqfi/ZIJJNoFjOTHN9N69P3CPwGI/ttEct9s/6B2uWpVZvrUsyt5IibTbwMewz80hJUcnjDq1JgdWkDlAaXz4fqPZ870LCCvaxoQ9qciA0rZ7lPLC7z5KKH0DY= 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=JnYxOfkH; arc=fail smtp.client-ip=40.107.249.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="JnYxOfkH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HBvZ4rVzvv2WFCBb+aufUSU8diMsfixHw+3k6Q2Ji3qmmhG90proOPNbo2bi8H8wXf/G11uSk72bi1Kv6eVnVFu5RMFnIyaUfsXStK7JhfoiAPr/bC9rbVaVzjTjSNuPqgQ643gL/RljvRW4ZCozSzstL0BpNEq+/wMwbFbhd0n++ppXujCJ9zVa7gjwnOX2JNdW7al7YxLq2qBIQWc42L+ni7wZ5M07DGU8gk3pcjcxMsf5QzVdeupzwIgv+S1XganxUCj4lunY6NhU2fNYYU+N3meXY5N52H02WJziHuUd5mA85JkDE/tdLWzhMrnhhSavaa9kwjYsIwMCGMyp/g== 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=HWG03yrViWf4FsOOXxx6SxJsBkutdcLvr3s2QyQx8Kc=; b=ohBxZ/38+IeufoHDbMQ1j831dOg+EHqDk+etE+6wPGNsanhH5ZmUqyeGWA8u0XloIQjjyDJZZjp5sfb4HwcLmZhPLDGW7rB8djChAKNObtOeK1AxOF3T5kFza87HZq6Paod85H2gk7zMSoA7FcqaH/osY9svmtKYNrHTf23osekFZSgLyQbERgh4RM9UsZkqoG/SeYJtChKzUi8b5HNzHHfqwVFD8uwpQ+uQyD4wiqUCUFOdMpyUPmo7E3j+ZCKuuMhJO/54cRQ7I+dyAuS2m0icQSxEH5iEmPaS40ZHxmFu6z1ifJHEkCTh61D/9t9LYHj+YlgZ7WPjTHWKDqHoWQ== 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=HWG03yrViWf4FsOOXxx6SxJsBkutdcLvr3s2QyQx8Kc=; b=JnYxOfkHpcejeRgRGDntM8H+qW8IJjFCIMgPL1W1FAyg/AGi5OOuoVVsWrHO6EhKQsVoCCaPF6B0UZ7SFlaCFiWekl4bjx13de+UDHUlNjvX834d0CRWkFd9e4NiY9AIAz9/9SAqYrUAumhy/rUVB93DmtO7uPfBd8+9E3VLFv2N8izWla7sUX8MwiWr0vm67NlMqXK3TM838rhtyqUu7F0xPU0r4Oi3BoZI2qWfxxUqgkIfxZzlviCvHC9WoKl2v26SW4B8LwjJ9t8y44JGSYXogjw3Gm2T9ckuf9EywrLa+ZfIF8YHc1r2SCxuQ+5UR+QOPJvOWAcV7J87FHCvaQ== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33: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.8182.019; Mon, 25 Nov 2024 09:33: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 Subject: [PATCH v4 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Date: Mon, 25 Nov 2024 17:33:02 +0800 Message-Id: <20241125093316.2357162-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: 54b585d1-1b3e-4d9f-8c2f-08dd0d3440fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: niRtE8H++1s2NX/gWFdbRu/ervj4GCudAeHQrOIwdvZDYW2bOihD+5hYXxlKtYuPtlckxWTUzAJW+BPVRshUc6YD8rm688AZRtcegVzgoXOy0Kk7uw9KpiJzvOgR/A6WElgwPcsfaU02md5bRMOUiB+1ZkMEO8ZkmyFzHWjVxAy9/weXFJgj7FBGcTlr7vcbzprvbvhBG47aCmCprpnqx9j+T1SXYTQiRlh36yaeXeVUzx5uY1NbhhwV5aoWelF2tSHkuetLrT/tYd0lJKPPoKEmnp+yiaKl6tKOJxtVvsUmye7ti+CmgJc4gQEc3vlUAp+YyW1kJAih7f9UIuYURzASgLvW4htev2pVB0f3uBtXvh0ydqslPf8iwsISQKju33PU4vy6Itv7W2qsFbBf16oORcXZgaGUpODz8EG4sT+79aStH2vynCQ9bxC7NywFVB8vQEe/MNIUo9aqmFRJsB+SSk1WrBpGLQDG112dS+bsNSVgSg9T0UN0n8P0SJ54AQAwkojWs9nz0xBp1VmvtSwL8XXMoi3kNrUPOQMktBzEee/dYyez83sU7vcitJEYGH3z2vmX2fxTAn9uH/bxm0qBobyucloX8lFWQF8g5lcjTztNjBcbWNnZxnMD4r/l6GOe1utTAAae3k6ydjzsr4D7TUV6z8rEOO2W3QtDHl2bUX3SbMrZ7IwZqw+TqSPm6vm52WtN+6TGs19yEk5FVcK4Ii7rUkSUJ/pwrXRyGH5LPrGfVx2ngRY8CHZa0K7tOX2hE/DuYwqoWwTf010bHBpCuAItCi/MbZu9OM3RUn2Ffem24V0mZGTMdYMW+Sc5fnp1jUDF7R1LnYfmtc92dh0VbO9ojCyv8rrzMxxq3ZX9QfA/iV+ZWgT28zXT5506vpfFFRVu39MvSknw6tHA/+UIHa0e3fRRlGhC5PnvWPFb8Lfaaqv7HDL0TM9etlZVAIj3l4MK7j6xPR9w0LjrOxNBDga12aiOZ0Q1lw8SatkM8Y0C+kd5DZUZFXWKbOxua/47yRsqt/0gHBOkYsLhQG5euc9b6UhRyghsYb/jPH/FShosPsVbQHbtt0QigemXyURTAPSZMY8F0hb4E1N4id8GRrTaABW8yoMYccp3iEwqK3Ai1kpSA/r9vqRw8ekrUReizVG1UcELaU/FE+icaHT2EcEKF97OmvjNzd6lr6Gue3V+dzSD6tqPmI68RyHGTeXiByUaBvSvqr/2i1rXrtbwtFOrf0vsAXcwi3hcqpbJBezvW4JcC9sku/sD0VwtnjDbZmJuQqS0YwcVFoVlCmgerOujgwowp9GfuWBrhpxBVEJ020ZXwdFRONwCBSoixltwPJpQ5RlJZ4rmPgVWow== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: azN0Sr2IsIIARdlu055yBr4HN0ALL6oy89ECQFYP9x4Q9UOW6gZwp0pS7s0FYQUbu58vhSLikSsy8cKgpAhNVoj5a2zUnjfhFZrCo0y+l7VZlfmT4JMB+MCfC6l15hguzE+Cc0mOZFqmowasifzAmE5hfS0WtybjxDXEnJs/sPs79nhv2H12nWggMJ34xJiSMuvOshwXPVNNwk5Aw06qFbgxqai8rP7GVDXV3bOwiA8v8buBED7O5+mNq7+Y/v46+yT6SCvn9KHDRROm9KEIUFsyQl/XGMBsr9dj0aBrSBUv1ALNaB7mYm+Jy9RL44zH22iVivVmk7rdFlfeRbhCRQJ2vJTfnB+Mw0fSwMLLK8/DThKZXMu5AE8QtbFtvL6CJmm9qzvah7OaS215VSBChODVgMQb4LzOU1tTBtCAud54eopFs8SpLQj9j4EWAT5jQ4LsDKMven0OV/WIPFsV95fX2QIsQMmnfwua7sXgQ++PQ9NdJRS1Pqx18NQBcFGujsPLvgAi2bXpGI2o7x6dPNYn3J2EcCVbVjCnIUFiGCVO/aeaqUsLp6WuzLmkSZiWdTm/3U+wIKLBkRKdkxYs1TKuv2uaT3r1BBX2o0C3LTCrm1w9k1ovWWHfqfckjY47224Ko8uCTba0zMb6j8IpDtCKOTVM2ptZGnEWTuxA5zNyr8fhteBYIerQZGbr9ZMKB9uKWw0ODpcxvjpZtlXqYJ7m0E6oQgYTfglykYOjOxhSdSojB4wdFYwX11w+c9i1/kAejTahIpvaufI0TwWr/sDqNU0ropVoLJrTzXL4KYD7kw1g3Y4Q08RXpB5UMaRfxscFOjiECuXnYTMblzySqFm6QQlhlXnq8msF/DLrmJNo5hzjEyPfoAH5Q5FK4zwOL/MAwu9YCXnRkft2Dr+7SzhqhwL9BoFCHOVoGpnNomncyrfLoAc1P1Hb4qsZ3sh8mDZDwjMA50ys6Q0hpo9nwqckvFnVks5LqeSgSReZUnPxSnNzlNQQtn5qQqrgzv5kBhNAwAxbV0lTcuSBTRstRsYCYd4kjEoyKZkzdU3mYoQhnHrN9mHIB7zUX7K2KjyWH+Ua21i8SuRM6pIuIWAVYi/hlMdOlmeAp/rJegvHw8+NdhZ0Ja5GowxzqVYanN4F7bpu1x2BguPpq0gtMnSMq79wOeess7pZ2IBIVTguEkMhZqbeo7D58fkhQv0QcKrrWh8ccIkJOKOhoPW7ulgVO4Jxp7K22YTIiarTlutIch3bugGsxlcPw7/DSZfR9Dg5PG8GPxTvtrI/NzIpwzs2cqcR9rcbHqPp5f7z2FlyrBRgZjY5pPUfep/jjuXbiTpo03mSZSc/gQ3szEw64B/B5pmQeFWttywMQ4sUMWIEQ2S2GwLNZZJ3Yry56w8FAeaww5UlX9Shvi7vwH/Bp8GS9+LTAuwvYI25ncMde7nXUX1aArIxf9occcO4dzdGLEfFHKfrzGeYvBB23groCb9uUCVN5xYhEqLZYH+uEhGE1DaazZz5elLMmtvoz47W7ZY5VccZHLkimi8VZpYABQEef9t7Lwx34ubdDADecbTRF0KpK+hqI3hFLFz+P1zwjh7u X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54b585d1-1b3e-4d9f-8c2f-08dd0d3440fe X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:43.8272 (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: LjIFNXkjQ4mUCMSJvZs0cGoyB/W5XQJPQHvtDZS0Trx05SRPQKN3IGeU6kB3GlQXUpD0+NSO0z3FmYinIhVNuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 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) --- 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 Nov 25 09:33:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884633 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2043.outbound.protection.outlook.com [40.107.249.43]) (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 87E541922C6 for ; Mon, 25 Nov 2024 09:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527236; cv=fail; b=iGowqzjVi6I/iNrglwpavBt7hj5xYr7BhFdAiUXcdj3+hNBu1NzVYZd2bRGUgLpaCw8NotXRqjXNhnCAUpSx3NU23UMZqrAdmEqgGT9KviSN35QInnXSvQTwc/BzlVkbsdwjVnwvsh/knm41Kkapj5g4q47GfMWl9onqzxsxHa8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527236; c=relaxed/simple; bh=x0x5bULOtYYkTEuTlkpMRYTgOeltmj37pfmncH+8dQo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ODoICeft1vuefB9xXt+vWATlH4A89ZRtcZFxqYQpeuy3u0CH7G0cROXmjoGTyGPp9QUHi5yA2D7IqqUXsaGxDomjXvHHORrm+wjDb5WnyP+Bva3qbscP0hK7XDOTuUZSBPpxkylEwQoaUI22V/P4YTIifVC/SPMvVUyeg925edA= 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=eQKjXPEm; arc=fail smtp.client-ip=40.107.249.43 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="eQKjXPEm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q1cEz07s0mc24MeTseyjzV9CslGRLffFpg3PLr7KSAwPwtAQqhd7vbx8Vg2oLwRN0xKCirRRfoUx2x9J8tUnDvefJ4pXOm8pxbfv26JzC6Z59yGAiURhGGbbgoCzqsZn/k7nofwUQg3aRM2q1gzwNoJljMG4H+J/VfycvZaz6cF3OyMLiI0W9GUvEqCgfGm75bpuEsnN2ad/HUy+GltfmpQcQnbcfBVzPanXy9yO+g0/uTDQog0ht27YKJ6G6SU8PVNAXzFxgPp7+e/734BwTSI5rCtsBWWYB7xaKYYVFdai2mcaeBwRhjCexze6mG9IJKvIXbgSu/kGoyRI9VpxWQ== 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=0I5FyeBk8jMYDJ6WmZ2e2HaqvaP/Fo5SJbZIyerfwoY=; b=yXu6qtesr18Ajkm86IB0otJW0sweuuCQ74SGBbKpAVMfJGMCKNOsH55BQW0XfwTU4COsHvGdPFQZA/ktwCQ/h7tdszTVsVLl4U8XR/LhYC39MdxJE00eXFh/luH5uG2P7iAScS+iW8IwLrk8l3robsZNlstvMuwRkYPnTh0uyuLhdTl7Ve3EBW61mxGy/FGf6SF/XHJOZ9bto85DB+PdKrjnd3skKwA73i/8YJoy8wtoJkyo/RCv90KkKxST1ZRW1zi08hX0oUGRNJ89buO5hgw2J+aWAWprFhhS3e6U0cSXeF1KGJp09m8+RBn9qaaidpo0i5fGL+lZrZMOujLc6Q== 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=0I5FyeBk8jMYDJ6WmZ2e2HaqvaP/Fo5SJbZIyerfwoY=; b=eQKjXPEmYPGyIB9LHifpqtwhHYHS7k8RUI/MagbWxxX6t6Qp/sZwC1zc/N+qgu0FMdKO6XmHAitg+GhiZNGmPRBL8DLJbJE+xKPTExKh7uDkbel+BYmVjGdTf7cWvjynHAXKDROUr/3P1MKFMDCfqUFd1v+R0tx0CThEUzB6Kt5DAb3MVjxTUhELBGS62J3I3OrmhY2k8dGjrrrW12QuDTcpznwX4KkM4axWc7c71oXMbqscaAPDPQJVszy5/P1KPug/e5xCKLxvS3aa2/xaCTwxPBg0Nj5fsuu/Nre4XwR/VPWDq+3Dty6ZVP2WraeSjNfUeRopkikl2HbGYqEifw== 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 DB8PR04MB6825.eurprd04.prod.outlook.com (2603:10a6:10:112::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33: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.8182.019; Mon, 25 Nov 2024 09:33: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 Subject: [PATCH v4 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Date: Mon, 25 Nov 2024 17:33:03 +0800 Message-Id: <20241125093316.2357162-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|DB8PR04MB6825:EE_ X-MS-Office365-Filtering-Correlation-Id: b8438431-3139-4770-664b-08dd0d344552 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: IC6Hd8b36KJibcuBGTsBgnyMkDMk50OB6BDVLLUQ8YWpsFdaoTWULpuwLQc/F1sPqQrdNvHVun7w1opy7khaXld+Na59+xe1i5+jjw11DOE7+gNsIoN3ZDJUtSaxSuRuMWtbx6HvMb1bs+OTZUjBRCBLjoL3l2ri9Bd/Osrq70yc0oPXLIGZz6pQHApNJNEI+VPqqKtrLLAf1+ZixBxNRgGP1Qnk77AbpT+mZy7wh8gIkqGB/Eet7OAg68pagzeGTJFXpnkGZ82Eih65RLbG0GnePtWZ/xwgGtSjy1g2Frc5MduUzHvRZFeEJ6PpMxOD0RUXuFFmO//I2XXt4LjPOhrAQ7Ssg7O0Sa8Uj4bJcc+eMQkRuLaWV3/bkmfO+s8Hj2hspzmDuDJB0RzUUVvs5/E/eJGE+4tkp7Slf8cClhOXoX/TWwpsY26B99V5psfqlXmwfqha01pD/70KjdgAH/iciVIkISPNGawOHNKZcsoCIwIvVW3YDKx6ckOFegKQgsau5VMKdmDlkSLHGCc1wST8D6upda3ZFswR95uvm7+6z641hCVxDs3MD4UZ9lJJ/Icp9ZBzTqx9G53C+d6oO18ujyXY9l8JKV/FdIrdT8nn3gfeiuz4mEkF5VAFYLvQVfn3rIiXLOnNtqgaSZAG+o3BnPfUdCuBgyWbWgf4gxP4QciETBxmOeQciyMejclJchFLHpqahCDox8kMHHA31i1EHJibOleam4TXTluAXBAZy6zp3vCCe1JCMaHem8VKCDOeWUHUtgyB5FN3nCsklEBYxO6/N86KX1rt01I/p38krtcW+3yM1VAyRKeF/MRyt4DmRE2rdkgSKmoQDEVXbbXxR1bRlPHh6KqjnKfZWDwu32qERrPR8cr1rOSmKxoTwpJ7O+MQCRcQmSJfkF3nYrfIu+GJXPYilzrBiBtt9ayTzYArzvGVDee4u5caAo76P9fBA/STdmfQFAk50llxu5PVYHpY5hc139e8t8jMVTXGaProhXeB209fITPqyshqtHscE7GwtMcOkmFCQzumconV+5ZkkcTyjiGYcSyp4uUoOLH9TNdl18TCPlvYBGPyeiM/sxZJOLmFqq7rUWFsR8hk6WAbcH5hQwzj+v5UV14BDlemSaDLKjzQoXmKWHJ8k0VDDAzF2WLTr6jyM+L41nXIsNe5RgenNIZBsR+gLX7/YDLe0u7F7ybYsCfCjITdayswhst2hBWmEccF6lB598APTCb7gOjDClfMOOIi9if6jixtfbm7Y5qvuesXo63p+v+BMf8g6Rmsz7ncQM4+AhCc0cKAc7Ly8Awa4TxUotZMWAinou+39z/ro3rpuAccdbVvZrmMsAd1/+MwZVEv5A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UGDirLkkcjaLnmn5Ub85ykh3HsfxeZEmG332xjmnEFLIjqYizBW+VVxNYBuqwHA6vyzLfSPFrv8SxpGKBVtXm0S+0QtpmZGDhryVwr/xCFesmHNuebOCEXLVOw0v3dIKFptlG63993yEayvMMhsoDzqVIig10rYaJXioT6wNrX0tesfo1PMjUIJVpsKShIYVYfjBSf0RZu7fjmFGI0iIJ5cZgAQmNhKoxbdo+YtRbG7GKFXl9qpEVilce9nHsZixgfuudvyvqUvsVYE/VBoxtzuIVq/ykfLhsmg070s7V6xeR49U5iWvsY9udSIT7fxIRkexrpRYCroqu5kdnI87Yb2/54P+I9yc3E+5ckKa1rBee9qb4FzibLtdduQ8snJE+OdvsXZj6ASny/EyP5ldrXqsMrG0ZBnRT91RAGgf2BarJ+demaxldc5iLujVMqqmK/T9LwBo+IjOQLd8N7cYI0QNu2WFMeYpQN82QlwrsQIZBDs8sWtL2gxOzLffmxL59yJNXj23NxnlN+qBADgRTO7oSY/AdmcxST0KRqMEio2ww9aJsz7L0wnYE4O7LrI4GxqNej1dXZJJiIRdQQTT58IVg6Y7zUIM2Qshcq7YCNkA4BuCnvbALrgacPFBerNQvfl+EY4/scVkM+uTYhNFNy7EmwPgbEEdlkq7DhszrUcYauxOivYi50iAojZ2GoiEIIeMuTqzLL5EKO92pG/gMacqJXOXaOlcvVD+QWStw5KHi968R1dAmT7uBkMLVkFclA05GKstLb9GXtlwocAEzsU2c9bwMnNsytT0DAlopcUmO5VjyloVUwKyPt0ZWONhHOfNHO4Hh7kbGujOhBE+wAiwph7S3pIDMxjD6x/dUdUhDThcrKQrfcjKT9nD/Yw6G0ncBnQVM066H09n9WoVDclUG2Hr7KfLr2XJ8TSn48kAxUcmxKyPvlF9S2wpzCF4KCaSmDzgSkUUFnrmGNOMYSCD+uyI8hntL8uhhmMXXQb1igZkvZk3bANqN1TMEcserxoi6dQ0LBHSuWREGq0kU2Hg7bE46gyrLebcLaRNIjTeRB1lIXk+Cft8Nz5sYev3LgKAvBV6JMixICvjW1LHLoFjU4LIcVj4L3y0hgHBmVlQBjQiVsuCCxd8en49QZrQYy7AkDKo4o6B+OHcKBOf8+95GW6CM7TTnUEVBIZ0SjJdkmmLvYhOO2zRnUpduRWtBbnBE6nuItVBzNKAAFnzCVDanvjL91NEKLvtYlbSIWt2mf9toy+/BR4lYr+qfzUzhTwzGxhPhS4VW8NlD+a0Aok/cuPIi6a7CRE9iOq6WARMLJLh6q/Hj5WiGwebhAAm5KQq5vvrVl7fXzdjGAknmMEaxr8KycfmbwvheWCO3YCckG0wbtt1Tig7cGPeXw4dkHMqJQuscvjO+TM0zziLurtuq4/fiGnch/PjdV4unMYp6gk/vTSg7rKLId+PEt1JQF+qgPe+46aViWduSPhHDn8/RhA6aiz3p+rqgPCXyeNdCcAqHJ5gWm6KZ+anxnvrBBsns3Mz9s2/HTHRgeZlGYqXEaaMlq9XsKMHll+X6wWZnOkh8bhg4i9mZgh5a7EA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8438431-3139-4770-664b-08dd0d344552 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:51.1121 (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: JgD43DY4RiaeDmXq+Q3Kj/9E8ghOH7lmZ3JWTJUCWUtdoQm+/p+t1ar/UuTdI1d61SLqf9j0XlSg7C2CSylskA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6825 i.MX8qxp Display Controller contains a command sequencer is designed to autonomously process command lists. Signed-off-by: Liu Ying --- 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 Nov 25 09:33:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884667 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2067.outbound.protection.outlook.com [40.107.22.67]) (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 71A6A1922F0 for ; Mon, 25 Nov 2024 09:34:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527244; cv=fail; b=DB3qdPaZeF6ycVswFGZOaWdylCn1Z/e+emZO5BvgUNZRa5AVQPkaLvSrCaDTqWE9VGhMInbtpk/sL8XEEAgViQIc6UJhgket7nphie79y3SV7QqDDOqFnwcfNccoiKhJHzRI1ECioD7To5gwakH2FJTYzoZ8LebQiNvFCA+A1kI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527244; c=relaxed/simple; bh=/OaegFKZVF+GIVwuf7g3pvuT6NomeZ1U3KtcJZXx/yU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=DXnvA+ZEfAEhlLE8HXHMTo5PAW27p1VEQnAs48km08wV5Er+EAnwNaHjHvmY+tBWVXYh3TnRHK/FNqqRpSC/JFpjdR5OMd/h+SrxEio+mYVFNPn8IZquz6PiVH98TG8BjvZB+J1qFTsdQnyvNyoUxNrRIBtd4enZ6fOGexQZhMs= 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=T1w0GyYc; arc=fail smtp.client-ip=40.107.22.67 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="T1w0GyYc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NLZyiyzPwuoUjVCjgn6pDjRhd6KB4W8PeauS/Mozy911CRRzEEaSPN7Z87y4oAbTLUvr7JpEFeu9fKel9aTGMOhri4S/xeK8hIlKLXiH9Kb1kGzaUfR0Ozf0R/mY6Jg4kgmazkd0/0Awf2UOejT4h7q1EGKRXvp5iajro1OMBTsnn7rucPRkPhb5GlFvt6qXfVBtGOCv/cbOVFwSoHbPhOIXySx3sp4TilButJ+gQNyvSKk9V2n+orOg/t+xl6UoJaTX3zZrnA6S1k8o9APtQoSKhftNc7lzxDAud+6+ZiS0XvHGSUOYaHmiPDv9kd+NiYheeBUJbTr3eprrJeXzfA== 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=uAB7MCPKP2xoTyJesBIxICqSSRhrKqBvk3FTP+gVZr4=; b=ywazQdLTRzF6OPQICIG/HMhIANSpA7JQru++KskV6Tqpbcss8X9Y7Maj03ZaaSNg+kab//r8P/gy+O12YYXtWB/nusNgnD0HB5igDnRaON1+XVx42CDpDXSo2DiEiK37CmGSRxN80vFpJZFg8kAI17tnhA9CvLCJVa5O/XL/PXREq62qMiP3QWeTuyQdbq+/2ltK0w52416V8CYZj7wPc+Jyy32m9e++KO1cD3VpmPDtf9huHBElz2B8NVSf28wKHgypqxjPsfqGsEx9U3tT/RLD91SZTSuAi5NJSjtdg/D422BVbmAxI6TtwDJ3nsbBMQBXhd4QdmdWOcMt0vHYPA== 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=uAB7MCPKP2xoTyJesBIxICqSSRhrKqBvk3FTP+gVZr4=; b=T1w0GyYcH7Z+vQN+l+R6lFr0AL49lsFWLAXqxc+sxFkTTwoCt1xhHs/MDiNtfC7ZkARtHAyRyi/kpyBHCD+o2Ggqw0jghpHH0wnSi5lTfPnCJwPUvwfcpc2cloX1fgP7Co/HEh55oQF6Xtgv5QGljcYg7fX6ygrtomITS+vet+yMJiypppMJGKgxGy6DsXYCqG15E5leubgsVnujfRtSWA4G1TM8Nhgt5ahMLacb3zwPgf3ty5AjzLVmxsVaz4wkT2IoGcsqWO+zGEhlprOJ3BreHdQb8l2vQJC4CK4CKpJRZzBT24lh68kIiTySFMUXwYNNOfp1sGHHts2sULciEw== 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 VI2PR04MB10930.eurprd04.prod.outlook.com (2603:10a6:800:273::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:33:58 +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.8182.019; Mon, 25 Nov 2024 09:33:58 +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 Subject: [PATCH v4 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 25 Nov 2024 17:33:04 +0800 Message-Id: <20241125093316.2357162-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|VI2PR04MB10930:EE_ X-MS-Office365-Filtering-Correlation-Id: f6e503ab-0ffc-46a6-4ec1-08dd0d3449aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Nbzq1yhlBE1Df2QxLK928salwwf39XuVjt5u3+2Gv/HCIDYU6Fn76BDW2j3T9gbBR2VWzeX+nEBuhE4Uzh3YTbrSWfLmheTKu6g/he399uhydldx2Rc5HqFRs946/60sLpOyFQaMc76biOjElchH9+ZegwcNSEqyNj+vIhUCbthHxY9KXcyc96Z5EDa7X6Hkdw/keuS/WYlLH99iBskimANhCvR1zdxmpXHO8mi6+qZ3MDMljmUh6p7qHFELZii5A0aXaTdnKxJwWsB8N9LOh+uWCA0H220rkyNCuuPfiWjZp5VSopTaEjoznVnjF5Q0ptsCgLg4vblW0dGgYlrbpxOieAA876TYIa2s0EzT568F4XBl9bPWupXt6PpG/w0Egfav6FXy1A8upkHOggnNqUUodLDwkVk8xYXbJ8H+BALnuVGYe5RpJiejtIo8ctueLGAzdGa2ff8JXHQyEgieuufl17NwkcZDejTjb/I4jYg14SVpnPpJhSEca3tatg3UUsWt0UgIUth8g6XJxEaYYlmIHV6/ZAMlRQOgdFk3qPY7FN8bf2xnVzqCdPJFNe/KldDQ+Al8NuJiGT4tC8xE6g971eoFPPczC4k8JKm5NP28m1Zeq8Nk1b4vz1dEXVWPVsbfAAtf/31Rm9N9Df9mlTvM1GscPz8r04N/GFq4g5qfYECqRHliQIlow+z28qJDuUoUJEBbfuPQRCV0WycMqaQQ5uo7p54hmZM2FQXTcKMyLyoU3Ue5szx9rNg0wy76FvRBO7cGrQEpzVZW+tCFEoJeUzJ6NSOaTGqItil1L7W6VHdg1tSoQnLr2ym/N4jhBEfG5mvQqK/gEBTvQgK2fUainmPp27yZ6rDJeHPKy7862amWqeMY8XEgwsNLrP7U8jidzS/psDX8KOwvBX/J8J2yZhAzW3XsTmGXYAtSYTXuGqBBNjYl6GE/KrON0M3gqIx42TgfXzQ5xpsSLIQwx1/etgnsEnoGzumcxRwTpiCAvGAVHu5KICNzaqboPZqTKU5sIaZRdrgSWjbJbSucM/ZM3PiuFW3ZrI+RYNj45zBWCpD5OJVzA4VkJdaYN8Z7TqOxcPLl1AZs5s/CtD+8avRsGwZC2zjRV3ssYDqz5ZJ6n1nd4R+j8rI/TGsBgSuGpRpcNS5qX/Get8Gqtmpkojw6WSK3lpd/2WN3OfNWtOwUN8GuAueK7FcMEu+MyhPK86K8LHki9riSZxOtQLXacfaD2YhX60PD6aXdFM0TRpvxogQlkk0yQmyE1s3r6QslGUdeSZNKg0tOq0jNv1VFmmERbnU2aoYton+cBVXjW89Py2zyFECd1jRuluycY2I9/yMY9hKX2VRDs/27jVhXBCyHM3sfJPv95ZosBSW2BVw= 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4bVj69/acvrMA0NlCcIPeUTtSzns6ItsL1DdwmDIjjsnAqaducsW3BOrI7a/XdIMLBSwElkN/xeeB7QvImns/WX1iyBJbVIvVI258B460QMkhbGLjAuwfv8VVJbLYyOvbOmx3Z87XSnQHLGd8uRiJydHFz+CHi2aqmwWiJMtAlweiC9Cz06cSFWnL4efM54DciHbG4oCo1pjyJC1Z1Mbb9P8P4w8B+QAkByTD/i01vapa5t6aglp4+vXsn4aWyGj5ErEoAPUOlcZxKe1+jzRofIMVBUQRdeBzgC7NfXKJwegMLSwvx7q5a6HQIlQTA5jyVLUukJuSQxY9/aZiUw4RO9zfXs8QRex3jyX/CBzWCJHu0f90lmE6QRUFBqMc1xFZr5Z7xhQFR5ELcMIJzPEQp4mCvCCYme9q6puADfyN13TNP5/FTvVykwbtXjCJ3mRjxDQzUX/Jhfi9ZlRWNlrIRCSE39dbhK6e2UWJRQhjptdJ0OF843kiFu+g3vpBpknwccZ9Kiq4U4xAVXAOEgxSdByi3gorrBD7SVzHT0j9I/THNRb2lojsTkReuJD7czPutt5xKWGJKUPokq95TsS13GHPkv7oR9jp2PJFC77pCPGDo8WWL3m45yk/NCrUTjQ3J/mFX+buciVC3D0GSJWRzvkbGWueDP5paPRb4o79jAJViOz6HoBGWxOM/PU21ql6lpZCB1EyDuiHg9nmxZ3WGSBzNpJiwKEMGF8e2CvTGD5cUoqETE8TrTnA2DJDW7YhIXuxMRvkCSeHELnq6aIzAMBcdwRw9jnDXgPAIXHGE35t/DbPyPYeEE3cneuqExDuWQolcKHatLxQV6+bqt2w2t4H5Ny+Moqr4tx0avi4ih7SENzSgjHo0lbl1mPZfuXPH9FABLzLi19sYvg/llDmequWbMaWuDy5Ir3rOsgsA9t5IHijYn5nInjS0awP+Rro0EhfdQL9s0uq1A3ZLazvHZ7GMHwNxi9sxpP7VfO/rqdq0T4EGgj7n3NCSZD7iG2du2oeb/itCouzU0TXWZ5os/QixvMroyD4vTX9l/PI/oNzSwFDCtPPAY5eYispAU9My6kz6PL/HGZJZJd9ltzwmn09wmO/HDF+7/YOn6TlZCXD6UZM1sD6+UW3HFn6YLCCw/zltYh8ws9LLOC4Px7XwcQE1jAyOZkbEVZR5WU0AKCDoDlzCDyywTdtv/q5SsBzbIskSa03+pVZWGmf+p7320RJN/u3DjmkqJLi5IVh2GIBZ3B0vLzq4TmfcXDK4gZOnomR5v/OHQeuNC9LSh4oswai4R9gyVy0KhDr+lrQd7LeV+aKtHT7V80564ADjzNiUZyRaew54HDs14B+IiacOrVspz/+jNfCOT7jMlw9geJ7vAg8QAGMezgw0W5Mq4Xq9aYf9Bul1dQXFtN/GeyodqUrrPAFFlog3GwEmg4jShITbHAfVTmEYVb1quZn22P4pGz2L7SuFwBIhwibDMO19a0AdLv4z69oR9EDdkPNYEP88NnBKbA8fysBeLeNMXzN69k1PqkQzi8gSnsacSP4Gy7pbamna2UEBqIMepJz2T/SQDZV6SLQGEFtmAJ7YT0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6e503ab-0ffc-46a6-4ec1-08dd0d3449aa X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:33:58.4079 (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: L8IZOZ/89X9vWAJjUOvCd5mBPFKxWYXz/2rkhye0PZ9KYqCCTevyy9gaW2PT+C08xB1Mk0CeppkEQlOFk54Eqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10930 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) --- 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 Nov 25 09:33:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884668 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) (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 58541192B60 for ; Mon, 25 Nov 2024 09:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.85 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527251; cv=fail; b=pwP5kBeWetEwXAEYEHnRGmx2ZEKMEFTot32nSORfpsdF7Jf9W6Y1RK3lT8epqH4Zp0bFFWeEyIqwTdRl88eaUtES1rKrUEUL3ai6xis2HdjZORwPft896Tt6iUUBHhM/84sBIB0AW+vuBIxSJzU/1mPjQd+IpDDgGpuYCd5PITU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527251; c=relaxed/simple; bh=sITozGpeDr1ETrEXmuzhJDz49DG+fJnh0PFTvhcQ9gU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=gTC2qqwB/aWI/BRO+SXD8MVInw39uKhfYbag950etgCnMWLa20JETO+gW4+RXgsSo+U00EFT2aAr6g3x75zfqqrAkZV18tYzbhDTjhVo7McrIKm//UtAiZVQvFDS99prZl76wOGQbGnaufCKrrWFtJYAW6AEcG/soK7n5GWuqtE= 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=U7fCPoKs; arc=fail smtp.client-ip=40.107.21.85 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="U7fCPoKs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aOCDGdCzz8bPpzUPllETMhHXJFwKjkArSysjb3PhYw7i1uccjboITE4yQtL7A5js5W540NSMKceV444tx9uXlrZzCRAeWQ+aG9tB8SHnMgV+nDY5mrqVPP7arQnF99AQeQE4DLelfHoA+up2PbaKLPzu+UuVVsqHe9iMcz2mvaScucm3bsm1l/XVajrLH65JF4BWyj+4NIIC510pdcPinHXnA4VHhiq/JZI0d+OKvwQCWRZ0VAig6WuBimeg0bH+vF16cd6HMvqfXwZNQ7nmzadsrADxetedaM4cG4S1tHTV3VdKiGBbZRKRsfojEEtzRC+14QyaqahKjjOJGehZ/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uYW4Nd6BZSBAb2mPu34qXqHSb+jMo8+WW84N2LOy13U=; b=wbl8suMEkc2BpvEf6S0X3rIyGOCH0kqST6emG8v7VXefkpWghmhD04PhuvSX5A9gNdLoi66Ng1m1/iZcfAGjxn3h+t1moiIK6foZuXjNlWxZiwdc/POPVpSJkwhlLAe77h1ox562bVbK52T/EcjhjJgWQBcHHrmrh+hPXzqErWAvgX2yoj/12P6yWaggE+BNwXToNIRLF+/IcxsXmV4QxoxkDXvfXOhQGNT49weC05/YOb9BcOSWTu5dv1217JmuxApTDhfOwuLdotaA1KhNAqCrUcPMuP7klhiQ7JQZpxS8zHZo9xjF4vn7qvr+Cj4AQ5W8nU0eq0XTtYhfHU6jEQ== 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=uYW4Nd6BZSBAb2mPu34qXqHSb+jMo8+WW84N2LOy13U=; b=U7fCPoKs86Eez0dMgPxD4rqd14dbm/wfqu+hgTwnLJWxW04gD6NlcdRi0aW9LIPZJdnP96vphwusQ2C6jbBja4gDsSLXQUIFYE/NeSR7GvQWOn79PQkm6qZqflETv8ZLAIrmb4DoBvjt5kIjysRr9q+x+nUQlMpoXNgmXNHrpucT2TOQkCqVRijNzwGD7KPTFzPMDYLWAqClKdf3vwaBASV8FCXxrFjRdcsd2PlOwiWUCgH76OKWXyqZRz0lcroCfcFjJ1ezOtTrwpvCVlUY1XSQp12xLicc7bDfn1LDqmP7LakTO1dED//yXTp2I1EsBy2tLh/7Qawjjl0/ClpTTA== 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 PA4PR04MB7919.eurprd04.prod.outlook.com (2603:10a6:102:c1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Mon, 25 Nov 2024 09:34:06 +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.8182.019; Mon, 25 Nov 2024 09:34:05 +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 Subject: [PATCH v4 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Mon, 25 Nov 2024 17:33:05 +0800 Message-Id: <20241125093316.2357162-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|PA4PR04MB7919:EE_ X-MS-Office365-Filtering-Correlation-Id: 0faa4d25-8483-4dec-0a22-08dd0d344e08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 3TDInMo/hF+xQ3bSF6sAinwcZr5o6b2lj9emCtPi7n4RVd/RP5bxcuyHyUONcLTVqxzssosZnE3GuqRO1VKHUpkd6kNuznlK6DjRCr0X4gItEXYRjHF7A95Qvz29TmD/MXcwmcqyxq43VAOobKEUoFQdfq4+qSsKH79D4axs63ueaMmwF2FUZ2a6SADxUj8Fi4DfWG+9FhOEIJn9v5cloY7R15xFZ3IiRqO+G/ecJblryCBs4BAi/S57e0Cal9yBMDJC42+HAwWfsK8fMCmFNxmsDlvt/cFPMk3YjTH3lJVp9AJgrH4zm2Q5LM3bhkzQMT7T3dMKRR4p9GDWwAZGwdSUkDPXwVqVBEQh/RwEdcH9If7dve1m9o64YxQ55A/n0fRqAKPF7w/fCPbBqV2ZkuhkprRehvQOr5olG0bX18n9pVsF/jouyVu/AjyXEdSTTucJbg3OrTewVUB0Np/U0/sCCTJM2Z+tYhfAj3sL7V4dtp+CgqA+hVhq1o0IORFnpMcS9m8ydWpm/lfhccXQN0zBGo61MpnF2y1h+EpTXCX8z//Nlqipp/PaZnOqTAU4V6ajN3lYveTkI/jZeCesidnquYFel6a8mKNV6RF9PGPaGg3jD1tn8f5cFuczxpzzuCxfz5HL9ssKYb8/K1TrnUuc6LxfEamGQwst52HxI+sZKkwqAAP3sEsmgAGhfLBwqxfr3fpUP/+BYp09FLK/5zAz4QRt2Ad/wBRk4/1+cXvHuryXboff6f+khErM93qTiebmdJpiu68Xo8sD/MR103ufhpK0xrP0rqeIJx/jS2aEn3sy+nEopmMHQtD6q58byCESblF5A2qaRxb+ZBqfZS96Iy7P0Ar3NfSXjU93MWxNuaSkyTBarBcjxDWmkpTx2yfhX7SQbvoRqd++k31EV3UeTm1XcjXYDwb97cUcFTYircSvBah9W/6SLbHH4hy3UOuNFv6+MNnUXRhbyQZxQ+MFCoD6QVFNOudksROwJMK6L7LWe4JLdd8ivkULXnS1ZY/hAcIIm3EDKwzJsQfGPAoqsSdPDL/e+xM3QgHmneaKGeJuEQzaAEoAGgKbMYLDYzMDVDrWD/4ymZUhhCLE7MiUms1AedzG9hzh42c6Pxjd0nz21OdN61nOGruXPBX9HQWzpaHtsr/8r7Wj5HCkLqw6Y6ToFEgQW6Xk/qrLvwkUbo4YgKXRTXKLFcbg1160eVHLoXzGBMOPC3F3sUnAUcbtKuA5IYlZERWMc7SjIWeidWCBMJqkJKgbh0c9LZLOA8Imv63IC0ARCP/moAgbMF/j2OJarje0sNABJLQtR4KictctFEPZvGkHPaVR3R4CQnEBKi9R+/2qUQNIJaNizg== 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)(52116014)(376014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zPrZkfDU9N6fJZYnQhTFH/xe2cb70O0u3Ldz5iLkBT+p3NlndB6VQj6WtRNl7MN4TgAlpsY9tVDMr0iPjuwM2ZMSHOg2rYqClNAkrLH89AfLrzLCRh6ZdfRvpM/nIUevhl/4PMC6YS9f2dR8BM2/BTUocdh/9/QRhGriTVkt34ZzxZn5zeIG+FVFHAyocihL72y7N5Co5lQ2NEXCasgc/kCy4FuXSPLl1b8uPTpziIkrtFik/83rQat6ZHSkMWbfbJlEqfyfLXIsdOBPOZlDrWcC7kVFU8dbqwrK7DpIzxQn97OwQYt0DBOMp0pGEzEQz2PrbnTIVWhyL3Ifl9Zv9Ql/oUM+g1+Rs57gL0zzZVicw2dV4hC/QfU9wdyEvZEUeIrzo0VJ6ygR0OKEWKbIgZ6bADilp1Eb2PfnDXOHo6B+XsxQpQWJg4xEqOhiQS+EKWVXWvYYCZRejc9/844bYMfHhA3T3HieWOhDo+3FFr7kNeYvtlARuKyfSNCupZMK1UcxG6DJKrQrxWgbQrSO+V+P0bWB5cX00AOZr3qq/YgcSxV3oPq9Te1irl12XUv4D7j1NcOdKA39/OYnmWaE6f4qO1VGlJ61ss+tv/IgdjcTCEhTmp8Dy4VvVw9I8SKPUPSy3/6WXM+f62Qz1jLKq9IDbKh64pIjRrPqZeiMgrWKkuHEZXPVA+CcEgk8579zDpKhRTzfVjsr18gqnQ4im7WwfHvpV6vxGcFmKcVBonhHLZ8C03/aMvqPab2jKLgOMJZGhNTQ7oTG1zBqkxNbY7d9i49Ha4fTcUm+jIKZKkCdWxan1Hne0eMZMi+wurLRllDNAHhrQG8IshWQpDDpIDxKAPFQ0XYzct4c40fKzd+HPO+Bi9+XsoC5rfB/Fjksvdty8iyGW8DWIu+TloKvju7NDpFJHvXcBdESlONPlkypuBl4xlBML/SOVinzm2tHNVBwITMfKf7JWyfwBSs3oUxxnkJMuqeqBp5X/mhWvDQjD43FKdtlBDolx55NQdlCMDZSGCSkPStJqVYlnmdpMBUI0n7OFQ8DO6zlIlobuICdptCZNWmzdKKrWUZUQgSxbeGcX4dAxwy9q1P4HCV5e1Sf8iiUSJSpsGH8VxU2BSis8pdgHm2nbU4LtrKpMxDa3vjiMWwmteusddtbic8Ttb+NDLt4HLmlkSm+oE5k6HWItOTWLf+/HuUyN8FHZkwLrkeT4iV3afQzZgIup4xxvXyMtD9MZRl/Q5spy/YksSObiZmIjlj+4RZfnaQ+Kr4k3vnePDtUwvmnEMg64qrDOxW0HoqDGsVgHx00sb9en6U08xlF3Vom80tCw2MCkvMwaQZwwYpp4L5O2Jz4U24KjTYHDw+wqpXoNuioDTBwMOfFjx7WWn+jJsL6KBe9HBUAw6jVO7+xdYnJ4/3FDCGkOfIKyS5o0HjA9KzsPfZsN5g5mSdEX8rcpy2KbePKKZNUsgfUag5lvNn7mlop1GwAFwp9TAZ4iPIWXiZcJaboG/2w6Ck4+2Zl73wT5feioFG6S2CGzndx31OMd91wKNL2B644fSw0b/YPNdoqQgBYVYtmTbV3gka+BE2zSY3JVWP7 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0faa4d25-8483-4dec-0a22-08dd0d344e08 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:05.7318 (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: umO8qyMRc4hvBJE5l9PuNFg2XEE0wCf9UKyDV3A3b/6n3RgJZhsdemXYSnSO06QOhVK6XseGSFDhvxqSRGvC/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7919 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 Reviewed-by: Rob Herring (Arm) --- 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 | 236 ++++++++++++++++++ 1 file changed, 236 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..0a72f9f0b5fd --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml @@ -0,0 +1,236 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller + +description: | + The Freescale i.MX8qxp Display Controller(DC) is comprised of three main + components that include a blit engine for 2D graphics accelerations, display + controller for display output processing, as well as a command sequencer. + + Display buffers Source buffers + (AXI read master) (AXI read master) + | .......... | | | | + +---------------------------+------------+------------------+-+-+------+ + | Display Controller (DC) | .......... | | | | | + | | | | | | | + | @@@@@@@@@@@ +----------+------------+------------+ | | | | + A | | Command | | V V | | | | | + X <-+->| Sequencer | | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | V V V | + I | | (AXI CLK) | | | | | @@@@@@@@@@ | + | @@@@@@@@@@@ | | Pixel Engine | | | | | + | | | | (AXI CLK) | | | | | + | V | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | | | | + A | *********** | | | | | | | Blit | | + H <-+->| Configure | | V V V V | | Engine | | + B | | (CFG CLK) | | 00000000000 11111111111 | | (AXI CLK)| | + | *********** | | Display | | Display | | | | | + | | | Engine | | Engine | | | | | + | | | (Disp CLK)| | (Disp CLK)| | | | | + | @@@@@@@@@@@ | 00000000000 11111111111 | @@@@@@@@@@ | + I | | Common | | | | | | | + R <-+--| Control | | | Display | | | | + Q | | (AXI CLK) | | | Controller | | | | + | @@@@@@@@@@@ +------------------------------------+ | | + | | | ^ | | + +--------------------------+----------------+-------+---------+--------+ + ^ | | | | + | V V | V + Clocks & Resets Display Display Panic Destination + Output0 Output1 Control buffer + (AXI write master) + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 2 + + reset-names: + items: + - const: axi + - const: cfg + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^command-sequencer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-command-sequencer + + "^display-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + 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 Nov 25 09:33:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884669 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2052.outbound.protection.outlook.com [40.107.20.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 568C7196455 for ; Mon, 25 Nov 2024 09:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527259; cv=fail; b=PXJR2cG3p/poo1V0nWGJ6aeXUhd9CgtAEvw6Fce+13fldY/zJeROrzlAUuy1Fs8JrY0jS+jd8bM7FLov7Py8T8OmfN+kDA9T0sMBS9DBK9gWgvUZ5ipR3WkCigekuwIeWInCgaV25qE8/EFCWQZLhe/xNtC5mJb2rDtLLXsEFCo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527259; c=relaxed/simple; bh=xQb0aph52CHiu7Y02oTn+dP9UcWmSDSn4TvpTJj7D+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=oDkWIiv8LFhKA5v6I9kePO6B9/umPqDgMT040xb/ri3kd0IKyKpJKKJ8JYZ3dbiMdu0FCKtcz+F5r00EBoOUK0KYkNICjfGRRVt7oNwswu1iB8djZRGMHx/CvPq/96T7Cc1u4Ac5CdD2MFxJF5DFEeAcseyb1WELeqFv+1w6oTQ= 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=hb6hqUWE; arc=fail smtp.client-ip=40.107.20.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="hb6hqUWE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dm4dVXfHMI5RqXB/YTqabeVAWQE0a84M2qY2s6UCrwElGe1AvADIV8DkDcU4RKZwQr6K19fsbhYuqFQin97xwwP/0mZMy8Oz0k7JlM80eI9Q/biVNHbZVOP5cOTZlDK3kGOwqJVQvceagZoobsnZ+baBRC96RfWIpbftc6BOPQjOdpqjs3fEUtLAV3FQFsT8pAxNrkp1anUUaii+bW30ua7OHeGD3zPTMf8yW5nqLIQr3+tFU7lG7Oi7FEhcICAHt9By58tjMg5WJNO5NvQWzJDOjudvg7eYs2D2zWQiwjjNzxLurZjuEYmZ+jdh+dNBbHQsilWlp7P6e+IUfGWEjw== 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=8n+JXdV/8xKybkaz3//khAp/P7xQQWjJoRYjAzelgWo=; b=cDfmDxDixrWyXyCSIwOeo7vdeH6OInbvjbyYpta1SYWB7qlVwnjQeyPKineJ0vKAaZ/0UxlC8zQHVlfvXA7+JMZ+rGz6ZobIULQeHeFxETUQcrtF5DYWw1ciAVJvl3ztHEPlrNhbKRRMB7C5tzE5VaEC1GwwXZ8nDGpSJD7CQJYs2xCZTsFGk1FZNIXp/J7cKAbfEQvFXfUZnsthuDwr6+LZPmSXX4YfwEFoGebdtQyHtxDnZhhvDS6+bFJsFyqgj+dr/wUqQ8iXStcAES84j55LdzEQTldD/xDuqyPQWT6vAg9Hgit9aR7+oU+iIe27G9udctqmwedWlGXgfRhPoQ== 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=8n+JXdV/8xKybkaz3//khAp/P7xQQWjJoRYjAzelgWo=; b=hb6hqUWERBLCExGRK6HW384TjL3cqhJ3rV48pj3tIIf5bxdhxSVOIVJg8vd8M8fHGE5BAgnU7mVXI3wyA2jJe4MOd5at0gxvEH3chvU8SB1D1zXFI9TDs50patLXGjds7RCLWIL4ZFdnnuLORqrLE2kDFHezXZKnUGWzW+iFzSOnTRK6v3U0va8hv6v4ZKmMNKbKoqCEi4t/GMMMFqEvmaj19ZDf9mWG+g7grq3I7VNAkhaX1jTOq5UwjCHuSgZqUqNwCIuI36T+5FW2BAAHpC9Iry1UZWA28ib9w/2C/IQW9JpgjAq+ugKdzsLGw8lN35RIZeZiNxRMyQkDCrZONw== 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 PA4PR04MB7919.eurprd04.prod.outlook.com (2603:10a6:102:c1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Mon, 25 Nov 2024 09:34:13 +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.8182.019; Mon, 25 Nov 2024 09:34:13 +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 Subject: [PATCH v4 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Date: Mon, 25 Nov 2024 17:33:06 +0800 Message-Id: <20241125093316.2357162-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|PA4PR04MB7919:EE_ X-MS-Office365-Filtering-Correlation-Id: cbd999f1-f11f-48c3-dce0-08dd0d345259 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: RQHi/gz+bc0Rs7CA+EwgjEw7ySHfeB2I019E7vP0Z9o5T+YqurLri83S2YX64OWdJXnBNRQ3+BzMKxsaes//hqFimutzbi4tomZDo81p+v0mZam1sdjRGTsslPGxVMTtapzNlZO9bzeQpieyprt7iY5+4hEZKUwISdQqcvRDsptvxUZOViFpoVCcR7Vcgjubyl7/nT2MiftTRoT9y81JK6nEJlsTgD4U5JTMs1tIhpBiY0vxrqCIbWbtFJ25QasO7L+7v4EvS/bL6N/yl2OrfXKtwQJLeb/+YKWNvOLe5xxUqOud+ZDvt+nRP5nKzjKzKqOsVP1wBDNCztku5imzs+tmntd6ahUexzhOqkQzE5AHPikCIEVnErjrznS8rc0CCJmkHdngGFfHGp/rdFbUBa3y13u/rshd9WaRSSo8TEdHnMeWgFxdvy5OPAX4HN/n3urKNOlSYNUj8OSdz86Odfj/AhZSmqvu13iSDwmpmmGzY3nYLJraeG6F6D3wlLT3pwFSHKD+w5GiCzU9deHYWSvq8G2Isfn4x3isIGaDTtV57bjfLOBABhhUY3vpgZ+YqqlJgPPCrpJ63fIGa7jgtkDKywvN+6Z+ilPiU4b0/iHqx7b5FEXCOyYR+9eQ8+XYhjCxRzwwM1cX9b+rwRMp6MITziLFsDkn2EvhOgQTJ+8K8J/uAyRcWCFMyuIYTlRSYgJe0kmBHfYiUUQlAqQQDYY+kUKl/TJUdqyx7j2Fycpsrn4aKgu1S/2FiVjfli8O/jr2kudoKB2KbskmcfgGZFee90omxOYW7OXQ4D4GEB0gbKXPjzR8lAa4y1o4//1y96wYoivDFBTYGMuDB71MK4pAX/AuL/KdDJVADsVs0m8s2DTtpg9VuD8KOuMg/nSDPz78T2mFJK0v0QVTYe0gu5ogme1SUrz8/YSneLs9ljp8Xl+iIqKNfzSvwH+yQfHlVE9C2CyO7IRRJacpWAhUZ5fLTGFsVfvLalou/E8iEtqklFt2t5YYWhe3X0ZY8UaZuRG34ihi2trm4wEvzhSvSDZC/ye/BUHB1Vg1VmudTweifR8AOMd1NzoNYkgMN/b8pVnkMBQtwsNPtKeemE8lrPcRteXuznMHf2xj7dFU06Pq0KhMHq6nxZV/9wHAEEPR1IykdKEvkDArMefEi/Kzr8Gglf44XXG2aH+53XLSOMRBHLre1pj4LONXK2kAy5RtaZDODO6ojmRixJg16UFAKhhKg5i1yknFiwMgKdJJexA1eVqDcFBYlxsFO807GIK3PSqB0y9PutM5tQloJ0yzbgW0j/p2ZPV5ijJBsP+eF/yKvw1pRDYL6RdwLFtQV6XoQzgfQoSehcezi2to4+/sEbeIKXREU9PoBt1DjbuCslMTLsejs2I6x61gMnFj8dGbDZwXAdYb6bU8iLZX3uFW1g== 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)(52116014)(376014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fVJ6JoPz0I+3g7z8yQzy2AeB2zbeXlhwvCAoKQF5tvRJO1l9QwIBmnpJa6hV/oHpv37aKwBySz+oKrWma8wOUGIxgP2uKraVizDDx08/wxn78kBiGsl7/8R5ZKE4cOhNtgcS/LzpvkB/z71zwRpSRSwGtTl3nrSJNRGC0q12c2HRyvLTp6M26k2vaUHNBC77rlH4dCp/EX1jV2/u84VLpcUOBl7Q5QyZK58k96LDAKRLzfwrv2QuBuX8D5LPr423Xc5u7+Eo2FyUZ3JgQLEuwfTYPoGl121ieqAQuQZBPbyIsPOkD2s7KK2oPf0eQNA+qQcc5JaT/06PfB2mifZ1RTmX291pJxJWJqSxgnisH45++d4YhX/yvAGnmY8OahRpUdKjsr2ivG/xzxJxmaOFoihXiRLKUGYw/cKw5npzPPLwK3fFt9mpm6JQ2LnF6+hrz4K3bAEjHOHrJJn00dYlEKELWJo8MyLsojZjG4kwyjryd25xTjzc5gzsEsLaqD5qWGFcDku6hfCO5KjGoMhlKwofxw8bvm6hcob0zYkT4cnNaYxODUrHBPCXaVftaQxtEzc16hQs2390L6jpDIiTOIFTa4B8dcKz3lRoibOxU6pNKjuVCYCDzYgD4GE6s/0ga3hOIIbrEkKWdkKMT0l8D09gumJw3s2sPhLEN9DUFzZSHlTdbcu/sxZzkH4W2y9kPKWK4j6ll0RjUzYG5urGVauCcjWSd21WEzNIiEVpeGx5m1V0oGkMs5HhF1o0E7qiPMbErr4ySY4aRvorKW7knS3ja3ieVtTBMWJtEoRTx491ggRx11j6vyrIeInrGodg9IUfZ1y7QVoVgVGZQG+4Q1eUFBxMYrduSv/yQYLcZKZ8v4//YTb8cQol2NXO5t804vREKyPP+EFSiUobnTZjgtMov0Kqn8RR7JufEXZ94xntQTRr5Nhd/6gkBtcXU6nge4qmYyDK3NpPjv4G78yRAPeA4CfUnotJuiKgMdFVcHacf6MKZ9jZUj+F7TnaCRpb6ZPefAr+GV+kCISrtHs0aHmZDXBKNPQNuFgbkOvcPlvEF4tpH3Qc5iUNhebAhJ3q19fN2QlD611wIL1YJiyamjjDbYnFThlsHoN1fuWWOkKcr999IuT9BePpN1dpvwUHaLQLi3KqyxJm85z4PaRfwIXgM231Rr5qu7wVQUtSaZoGwtAOxjPErQ5m5pUZthRQv3lQhAMpI0ZBe0ztW8g3oJ53XaCH3S5KZhA/LqpW2NIA/NeDtIJ4isTBY6BMyNLi3bg/6VTFAy+7pFLPIpv/hApeIjxfEl8ds6bXttR08Hn/PTYeEtMEJw5RRdHI7eiAI+n3Znob68RlO3nxnb8lt9MAwRmJkdHVo2JlJ8GqT3ZrlQLG44hZH2GsOCGFPxh/vhwKCKdgX7LWcyJgM371Z6AvcSB0aCg1q+lKyXMDNdMx2HwAFmc4FmsKuvhFVPTBjJ/jn+0RTqn/cCzAENnnXXgZJX3WN+PSLK2Xh+Rkwc3JweH1lbEHDZLTlq/Z/imNW3vA2VQ1LBKszNDtpNDzX8xYT1pcBoF+e37nQ/7eHzXMJDVq+Mh298dpXf/aH9za X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbd999f1-f11f-48c3-dce0-08dd0d345259 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:13.0703 (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: uKOeJ1P13P1qcMlBD4iWdVoMO1HPaOEskKzd2B3hxs/fsu9ldFl3bheC847yfHQoKz7XrINxcHgck0ppQJrCGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7919 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 display engine driver as a master binds FrameGen and TCon drivers as components. While at it, the display engine driver is a component to be bound with the upcoming DRM driver. Signed-off-by: Liu Ying --- 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 | 5 + 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, 790 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..32d7471c49d0 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -0,0 +1,5 @@ +config DRM_IMX8_DC + tristate "Freescale i.MX8 Display Controller Graphics" + depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST) + 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..66b8918dc156 --- /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_new = 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..eebbafe39d7f --- /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_new = 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..05b86f41ae9e --- /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_new = dc_tc_remove, + .driver = { + .name = "imx8-dc-tcon", + .suppress_bind_attrs = true, + .of_match_table = dc_tc_dt_ids, + }, +}; From patchwork Mon Nov 25 09:33:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884670 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2053.outbound.protection.outlook.com [40.107.21.53]) (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 66A76192D7E for ; Mon, 25 Nov 2024 09:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527268; cv=fail; b=fVGjrLhSxfWN0MVCJqddZKa1Zxrek4VZQFyXWVXv6sQlxh7b9ZbyEWB5aOfYOnFKogPyTvZFKpySi+le+vO1lMZ33nOlhmMMyrvrnNChw/sYCbD7sAm3/fcBm0fj+eOSybA9/REIzl8y92MHQ6kXJeHJaCuTqHW3nsKiMYLdw/Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527268; c=relaxed/simple; bh=ZShEBY/WSlTQ7mCkXPcC5orpZuAwDSU0RiilAwYasuQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=bI500zLyo4xG5o9BKuNQ5hrBQ+bOmkHwqv+tgFFi9T5HDewj1RTQ6qlzugLCePDFG+fIBNfp/mGWHu5e0l19VpfHQQ2ZW8PjgZ/JisN9JkcFQQJc78uQDhm300x1Txscis/w1yZ/0/xPXO7rVuTv0ogvbHW8lF2aM+nuGygXOFw= 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=mTDJdUYr; arc=fail smtp.client-ip=40.107.21.53 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="mTDJdUYr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U10LF7Cr7N87qRhp39Tu3YLrQdFbE7dXrfwZZdWbTs6CqTlKAaUFTCvJGhC745qRmrvuiybirobrxeS/dVjHjwv16iyF2ugrAvh8lAb+r/IdHQNS7t72GPniiO5OvsKgIjLYzpYxrJ5El47kWroK/hIYWH4aVzB2AvQPqz9jJ4HxLtDuDLr1ft4SYEzNwZDiuBu3KyTaOzK2TOLmC77NXdWr5j1mqWd2Y1xkNPVrKgg7wyv4Pyz0f8MdbCqdDR3wAWC/zm4sZB3FxjBnJ/tmOsF+gAj+W13lQmiCZb1X67oKAEmOhCk/Cj2k2pg8lohCn+xqiT11zKT5YMp0qeTTWg== 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=KugDvRG4a58luOEHFLhtaKT6jgj6V08L3FRn6QW0alw=; b=jEcSowEgUOGuCUX/M+x6jlm2qxPdFPlihA1LqKPNrRn7fdEprSCz5NT2XPkFSgSRRWWPhUretCgpH91vZk1ifTd/jqDXah4V5ZRtbDB6triElPuX1axY3GRK2SH2I+StHssxZHNdHEejm3uegRFI6ZQEmfz2rpXrOuKIK/EabkXgUg8ozynsHI13t1jUwm/cO6FZjJG5Fg2tjl6bf2pUrv2yi08CdSSbVv46ndSPmC10bGuoqJyKV42b5Tu7uExivlwXlIbxzgPch23S6y3lbyskrrLqznJXZw06Ye2bYfjzddeILI9pK2Gfc/K+eVG5q50czslK8W+OK/2Rrc/qUQ== 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=KugDvRG4a58luOEHFLhtaKT6jgj6V08L3FRn6QW0alw=; b=mTDJdUYr4uVseytNZPxsqvhMEcVfPE/KxAnSZOzHxFXeLEC8qy9Wd8U0NoLts/hEjbQBo/exBWVdX4GADuPhMB4799FE23NwYVUQJPk5jmfVMO8EL6tbwJkKYCpugZj4YZwuIJ+L7Z9n1Kol/KAH5noKcxs4SLACQ/UPGX6isyXz+YdfFreQAODqO79jp48u97ejPc3kMFbIYqQruFN+JNQPsOFUSjnKNBMtX6WWbypYGDdqf4m/u62SI4WTmGy3ENPI1LfIjzmyZocOrrGvQ72FYM+Xpr+1vAgsTSIOOyS2QSjGhxI1NCzXYefDXRCjjRTpCiNk6j9Zp37wNEX7Ig== 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 PA4PR04MB7919.eurprd04.prod.outlook.com (2603:10a6:102:c1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Mon, 25 Nov 2024 09:34: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.8182.019; Mon, 25 Nov 2024 09:34: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 Subject: [PATCH v4 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Mon, 25 Nov 2024 17:33:07 +0800 Message-Id: <20241125093316.2357162-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|PA4PR04MB7919:EE_ X-MS-Office365-Filtering-Correlation-Id: 4827f7d0-6c28-47a8-e579-08dd0d3456d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Hv09ziFjtRehP41LKIcb0Tj2F4r07mb2+D8W1ShlD93We2mV+Qo0119V4VKny5lBrMkQ133ZL56QQ1DrXSj/dWNUJwaVrIo9Q5F8fxVr4al5nxGY+e4udM6tsJEVSY3E4mQNeJihUK+Ri109HtGvpj2mPJlAHzXTR5F+dFT59cV6mrrasDjL+lcNhsIaiW29GaHR9DkAaDED1h0CaENKOtweziMzZA/zP23RspWh8DfJdvek43WXKzx0TmuQFKEerF+0tikBr1iTJsS9GLBgR8Cx1snNSFDFZBDRBnQf/dV9W0rw4YrG3mHjIGQIK/c14AxUiPMnyL5v7kinya2WI44MI4mMHZlYN+CQJlxQhCvDFHY2oYzMBo/s8ImKHrNGIImwnhrDksQEQzSgbRSXGTCcOeS/1tI21F6WTzRpq+FjnA8nR5dm0NmjHM6ieBdfqsgoPUINBGZPdZD4dVSsfztGs0oumwyseM1bitWn1Pq+Za2TGV76jYd6da51bzcdDaMf3sNBbZD0o8c9mLFlGHVA6OzVm8NdNxx/NmMr5V3JKz+fzfC/5+ZaeWrTqNShkXX6dkt2LWaZkwvimxFvgZiLFwx726RI44EpyB6/OLoPGF8KCqBke82P9l5hHIk7w4xaHVbtKPQwh1VIltDA6tChFGr/kF68X+V+Q5jGynaao60AEqpRzlilxcapaTl/Fou4pTDwCC/XPdbg+pnADAYX4T6ZMpr1TNwtd3Ziwm8FP9e62dVjYwXXQca3fiQKeqP9gxWkKM19oJN8T2VoHLnQpADK4AIykdwKoqINEO3tQdSiIgEPP9I/QNWczO6Pll6zZ60H5d26ri1a1mkgj/FfHuOPXl79ZSFSdy6ft0V30vMJ3RUw/Di9k7XeiVjMjbQx5HlUkNidm/P7TAlCvqHBM5EF7vQ8Eh5HIw2ggb4ISMAhwhuHdrKaGKhwf895DJ6fbmR+5w24eFyMfL5o9AB8lWZBZU80YJmShMgvyi8MqTpQioHxdO7fLvTjnc5L0tXslCzeSzH16SICTTIAPsY4pe10wBFSHTF7Pn67EHk/sLUBZE7p1iOnpFQsilvMnlrje2PPk4nDtArvs/yH3NfRLtdwWdpG3KxaGN0qgExRyE1EoaQUehYUxBALqQtYfL0+mhrm7+evXaMJmf5QydcMZ7cY4NcZznBuO/IQygsPcRC2NnavUS82l/qp0DIS7sCGkd3+WRub4oF2ndmD/yYXi7fy+HlWIceHzGASwhkc0RUZabvFnVUzfx7qVhH6KWWWYvwnXckzFP1mUIVwPmYINbE2Ws+dfNjldosc4UmJbA68Wh42mZfDOuN1CtvkPY6IC2Hl2ScCRgZ//zmt7uPMsyIBwvfE7zCT2CaWSh4EwxJQMU/Ox0uq/WoRxZ7kEBEJhfX6T3SLBSKHgkb7LQ== 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)(52116014)(376014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4w54ZWOGBtkkajJfP5fvdkH2yEazBIjq+JPWZci8Pid849Cid+GEv5FRl8F5+xWJD92nW4q87+B+N2HD6MTyIG8dbSoZOKnt1D+Nt3oCkd2VKTh1TPc/tomrmdXVBfegiaxU/qV39EE0ZT2juKuq/Gwx2VTsQPx0Oai21r7p1Ff9Q0bhzGiG3cEtG4uOnL79pwHbuXG8SAUW/ra2mSi+zIwx3Uff5M+tw6UFvFvahw1/yfB71NRDe68pIvemzfFo3OxsHLLKwoytSnCFaqJV9umeQK04cuIvfe9xKhIglB9S4CRInNGlRya/waz1bSo2+rcI7PL8vdteNUdUUyLkZvpe0gdp+uCzvRHOsyEf3sZN97/TTGayDQvh9QOVkkiOfXaopxm5arw3Nn46+mR8ePcW9i7ZOLDqTSAEG13vEiYAvTlUqLhw6dTkCdWDQzlOLldSY42qkazVo351EQI7YGPKUhZLyJUefCEsFlhWw+vDk0e8QQAFxGXWZfdlAEQFn8P4uyB3XMlcWOgYzrV4U+zzrQ0D78ZNkvdzz9m64JRNGzHpVUk+rl5NxuyVUJWJwEd/o3Ht3OmJGVRgUlLwTuVNNoyoBr7TAhsIJ9cYhV6i7eZFjpSfdwKI/OboM+hzh13XKRu7Hxc+iX6HrhFqfC+PqLSScu+TpLsu7atGRpBGsSqtTL8t2foAMQz8lYvQzfQKuT3QUVB+cclL3B4ftmMplcoVLql8uXsnVA2+Cy3NAFgtf5byQaQ2BcZq+vehHg2kNqjePLSN4kAlyqUrIL06RVsyKUN4RfAHw6A8irLh9Db8RCzN5Fkel0Cp1DsFUubTmn9cyiP/HunmwR+d1iybxZky0WbPaGo5liZLmST370cAJG/hwvsxuuFlJW2Y+bfSG9LAZVeaedG8KGL8Au19qYLM2j6xjjpFpfBcddKt1pNqQgOnyXabTAe3csznChZNrRj/+A7u8RamXq1KCv8UDeY+URIMS5m23nmuacSA1tPPvkudoa9YWlI+OZRPqA/v3a+F7gSEmkvCAh0GetcqrbaPXPVccjqx6zjjB92y9ferMnrLgBQr9HDP7rg15a8xNZ2bWjEZ76nMsto5mA0i4fY1bAWM60K5S66k6B6a79vROJCK/uCTFamRT+626wdTpBYxzIXHCmwCW16YdKK+OI1HvKgpjB/A5DOenSpiUTEiHvltj0CWQpl/ffHf39lm3N+YEH9ZPZ3yhd2d681gzqRKaSLHdXuY258nYV5iAU1y3IgiWXAi5FcJDIaCt3LanSn0JunO6LhAUsTjCj+OR+3xm3A6OZ5SXyYVHpykugU4h5qOYGbUzvR2SY+V87KOfFjUrGkoDRQRSzwW8KSCFvhdZsIS6drUYVk3Myp/AQc2qFLfzqdq0MgS55wnIlnqBnEJMopJRNml/9WGbtHOHH4ma6CL2fVP8sFeJwgGm+L39f8QFwdvsRFNOIXH4/gkj8DPJByj+WpfF/f73AC24L0+LjcJPFSCbKw2dQfRC/n2Bur1VqD6KEDkwwKiCDSiJe6NKkvIHlCKzzayv2NgdJv/umqFPl5myt1gdwnMShO1CaBOUPi3lknd3nf3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4827f7d0-6c28-47a8-e579-08dd0d3456d8 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:20.8140 (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: 6zIjlA0knraAkH2GXXLPcn3O0rAuFUQKASpaPvZQl+9/5Gap7tdmB112HlXWp24mRSOM1Q8FIbqb5ni63Ht/hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7919 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 as a master binds those unit drivers as components. While at it, the pixel engine driver is a component to be bound with the upcoming DRM driver. Signed-off-by: Liu Ying --- 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..b02b5441986b --- /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_new = 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..de8b058d5462 --- /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_new = 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..6c2e423ddb4c --- /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_new = 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..c2717e5c9cd9 --- /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_new = 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..bfa4978bd592 --- /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_new = 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..8f186b95dc06 --- /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_new = 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 Nov 25 09:33:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884671 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2080.outbound.protection.outlook.com [40.107.21.80]) (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 57188192D91 for ; Mon, 25 Nov 2024 09:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527276; cv=fail; b=U7WEsI+SOasdkqFThCP+qMi6sTN3KZWwGb0+i8H+O/a6yXH4MlHWKjxcRJcfqjY0iJ88/bYag2Di1xvGjyTneKb8cWdUVfERWS/IecH6a+h7HLJRHOmXxPndPxgzSY/vfIuEx2v2wfrOi00/PRDI/TwE754LEAa1oMGJy/JdHmU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527276; c=relaxed/simple; bh=UkyAUqZy60Yr5tA2VO6vA2UGoqN2T0jN11Ms4AHuBV4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=H/UtJ0Mq7ImexLtEivADG4esTjLqvCTYzVVJ/V7SLmvRrfq4Wy9X+/16L3NK/BxthrbmMi3UZg6r1e7MgEOMFgZO8zfdiyUulbeP7Jpzg5nsYhmMA1H7AompXzcCJl2ZJpoyxxiegTMZiw7yswf5pWNqrLgkKSKyf11E7nUTM5s= 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=l5cFAAxS; arc=fail smtp.client-ip=40.107.21.80 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="l5cFAAxS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WzDeG06NvqjqGT5gN1Duh/j+ve/ah+Hu5vViBoOBbkQGfNanPnmacaRk/emmD+8/75ryuUkxdbAIlSIuO2Y+SEMUXG3lkHnjn//g/LFNF7D3a127Uk/J4yNw/uP/PRG/AeaD7awVfJHbJUH18T65Vl+EtsIlO0q+dw86oSUcYSZssjwKRh5c2zmOlcu93BzjF4cjaD0RXTrosxZB/gLM8lTsYq+4hVjC80tzjLkdg37Tvj9Mc02mu5flHjOoO+M5KgXLcISdKvat4poUYClFltNEniLc0ghCc4SBIYmtw+0AOaM2r9UpFXulc9XNv9oT7yVHhd4cLqzHsy0ubzUR4Q== 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=fljigbDzyBMeCjJBogNLpbl5W1t61lYcfeFloXMupQM=; b=R4dWMhqo2yLleMUPBKry031Si6x+H0V/e0bk3sVyexc5vR7T3lD43g2o1GynlgmeM6J2uiFp9WJGEho6nWVbmQ6KldRADUHWoBa4zEPrczDetpEPUU4XVWgTE9n2MDyS+N+gK2Ev02+bgsbEpFbJXnRz2oWsimBQ+7DoPK0O9jNSdPUEftAucZmBmSMEaJZ4O3rzXET6UsO1u3CGESB8SFGf35bss5p3hsFPBuZsZmJ5IjTFMqDrPfFmxR+ROfVJElp796ewOtUR2TcuGdr5mBInMGJLguADaj91da48NqlF00t3Z0TCx89E3XOS2C6aFBm4aTeuTaZ8u2X+qn3bqA== 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=fljigbDzyBMeCjJBogNLpbl5W1t61lYcfeFloXMupQM=; b=l5cFAAxSoQYFwNqu+YDSrvaQWed/PXjap+9MJ3LTl44hWf5fghuovOO6N18eDkFGBaJjns8EbCwzWmbaDk9J7743r42lirr1Bbx7wwCecL78IvWAKWTuEw8+NN4btx61or1x1ycto/8HrcOhH3nH6q9rXnGJD3/ZWoZu5m8dkoiIlJKaGpsX1CgTbLV16RYFPFT7kTp/6AEbNR/Qg5oJa1X9gy0qYaqnfLJiQgJ+9AP3OL+0oRR4aECFzdEtA5w2d+ItfY+sjcd62Ux7cuKXnxeN77urAhW2nk6qN12LwEEgixYDrOaDQF0SVZLreWU0OUsYA1dQig4DuoWK32lK4g== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:34: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.8182.019; Mon, 25 Nov 2024 09:34: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 Subject: [PATCH v4 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Mon, 25 Nov 2024 17:33:08 +0800 Message-Id: <20241125093316.2357162-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 902d60b9-855d-4410-113f-08dd0d345b56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: WfHGBlVn+7n8RYLUhR9h5qtYeW02e1mAsz8+Eh3jHWOzT2UZPhnofiQIZhC4XJQmFZghDhlgxyy44poxGNV9BTpo0I/+WvexDlCLRpd6TacQ7HwG02w63ZNiv1SVMC3wd/k9jzKaGI9hH7i7dG/azsWwNmoDXUSJjDNuPV9+LRXKocjSxYJsnPRlZXcfHiRhlIyaet9GlRUId8X6vnWQkUjg+L3jeHabFeO8HtgH3Dp8W8GOjZdDIkSDjmqavlhEllCLb+GGV4Bp4s2kS1HSkPerV9z59hP/6tivpVENzyyjnDtABV9icTqArEmIJF+I8OwAj4LE4zQU+mDiO0n54BaCEQj6bPW/09Ifvpx2Xgn5z3N914csggN2IhjAdCMJioaxnLgj5MNpsBTnLayfD0WPvGbZn0pynGAS8p2yctoNYfYXQVj1DYRkuz/zFZV+Sqd4T8SuVOYt/mOckAbPUHuGRGKuDTfOFFYX2naBtdaNgUIbyVQKbe9IOiIlORSXzrnJpn7occNzqkO70yVVdlkbnPPYSRwa4DBFDFIn01scREf5NCi6sSZyqEGhSSDTluBX9V+X5hABGO05dLXMD3CxoJO6gypl7odEhBrelgDlwN8/nsznu8lQtd0sx4HKxMm+LK/fG4rHnRVf8tjsIIj1CsuYp4BqQb6tngcrAsOQ9iqcTwfSG4IpkiZZ8b8ky9IXIUbO1iZbvcgwmhaWE7TiUzwP9uMACWocbh1KFTMJNMa75TPF46y5ku2JwIeUsTtFCY//9SO+LFeiCzGdE38ZB+IvPGDZoxRmVGQdlHOgr8x9/19NE6viARRQ04p/RhJRQkKW0OJle71kySI0uWw/LuruxIVQeibmwTW4rgVVL1plHUzeXpzBqVkcD/ax7R0sz9sj9+SmWq9kFG1vtVAlRSyXdHOxiG0Isoyx78gwpb2Unxy2HzMSAwDRDIWEvZnbpdhGy7wwr+6g4PFLzsVYEi7psah3/s2f5ocFStZGfQZwK/IACOvWRFD8GVhIPOSn2k+l8C+sTIas7PLvQmed0uj/foDQWLmxm8mXXMppPteK+0cFxQiGTjaDpwak6hvdCUbtuJwpbdFbSdcHI5R6QeJwYZ+uxsrDwuP7pldiXqGNWzLfSoXpp3vVywtJKY4HihWGsw/2xhtFRSLEqmL9Co6It4lZa5PCa6xZx3UINLSaPNELOUAWEbP4/fJUiOhJBIj7XykXhpA2UmS1iWUGLofUpcmIU0AZiJg+frVWzYJ/KpVZ6lK/WoGDavRTjnSvFIIjWC1lKWuvT8evbg3ravyOWZcXc8W00oGwIKc7jGVBbn9iHC6/tHw7I8k0hJ5q7g8D9+Q2kpHYmjzlb0Fr5elahkNR/TZy8yC/+F/qGeQJXI5gxZIz0yUh9CdmhIAybcCPttj04JfYpD/1WQ== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j8o2Bcz++XSbxLoMFggp4wOZn5Rk+f6hBH0dynOkaqfaUvTEVcc+z5HwQOqe6zyD5KNoPOA+GrwyfZoUOUE/mu9wyfIzPaB4muC+rojGmXMpbrn1lxp45smVPPx113BRPm5kYP1NqjIvmmhNhK5TEfu5PPyVaAeAWs9mnansedELkPxnrpnHbd3ziaxsyvCYHvLP6kwY16P14rcVv0W0oOXwe6lihLCWpxLad2SwroykRpxBuBLiu4Gay6w+IxQtx9qelF7MjOtNrUG7InhD4/sEN/ela0oIzxz23wyxg8GCWhwsl2CDc+F1MFqCMu6Ol5l2sGmRwkuOadxnJ5Vfy9idspIoZBlnCEjDB/JjIA+EeWn0Ec7I6HKli2wxzNK7+NdEFyBYqftZ0aE6Wb6vcReE4usW8xFnLeMqq/fMXNZrRhiEB8p3DnqMITDd8qSZrJefIIit93/5cmOOdvCx7QLWNSnJtOtfQBhvAIEgA/SDqOCEbLGj+e9sE8mQnK2ntuhsxGsyM+1Z4kyCRQisVPtaZMq0CjJItsg0S1Nocc8hK/cYWRAeCrclTW2so/V1Rvo7FyYUr4uTSbtyKICbT/zgutAmjRGbOSMp/uzgGss7HbBtCw9c3Pg/C4Ze8lR0Yu6bg8fZBqh7OQ8DAOxtxBV0CIL3iKQOSc2ykO9UdfO85efWwWsD6qvnGErb8YQPyPm96UVew9gJFMV1lI+Fe7HwjzSHBcEbxWrEPpPFq6TxFTq7eOCTxrGvOd31WZn+Nkye981IoHDQtnNrtExtLbFGMzZ8Pi7ScLsa0Hf4GbTtD9hnOyQKs3hvNNAxKviDlRF8xNM61ZRrkRebCx/qf9I+AqkwwCJ3yW/FEJuYldyEh80K5zOd+KtvDJrd5kVAFHsF1aLSAdrhR9Mh5t6vHAs1RTTLEanXIN3bCuRcxFNYfmBWms+we2zOApPCyklDQaT5He2LqqemhMGlLJxiLXR1csTV6F5nz1WpDyxFgX97pduQ0jf9vZ8eO1U9GnPdBh9vnHmgigkrBZTe8efohn23YFo7QO8frUktEFPIIst08gUCJ0LxlOO/L9OiPlJgS4/siB+6R7T9q5J4mEN9BqAN0lqFgH83HfVBAD4fhouYv402S9vXhpqhLDdYJM1ugM2YzHY6noFRr+wFUKSNBMGAKZhBFsqghQrY3QT2CHPl0f9aLL8YEf222c2qZpEMzxE2HZdNwqcTcpaE+2jHKBtgp7kEZ4D7IOMMu61Dv0jkqJcIlIx3WHoGUQJdHePaCe4xSm8zzeSLsPreBKFiiXutYi3Yfey6NiTF3QLi7CgAWgPSVlPi+555Alqb4B+FxzNFA+vbt2yYXaI2d+kopJo7Hzg2SzCprlcMMkA1yCDNL8CC08LkcJOt0MHnwC35p4CCvQ8ZAxLQnMAUHpb/+EHhsNvphO0H8BPOEMYaYxfhel+/bTjU30MzQIfkSfSAVbGquP/V+gq3WlWraa7pe+1m6ebjGJuEV/4yGlTRBX7N00HXFFs+Yo1KCY++6Dde2p3wsUSp/L4CnTX3m3kBKJJnlFlB+P2fCPweuau0vlj5/0U4ddZJpqJrhtgBXz9j X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 902d60b9-855d-4410-113f-08dd0d345b56 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:28.0313 (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: T5zvLo0yabRimMVMwGzR5KR0yydHAZIvBmxxHubxNxbc+AWRZOvJumRLYpgOTYXTIiIA0nlLvZFrt1skNJlyaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 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 --- 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 32d7471c49d0..b66b815fbdf1 100644 --- a/drivers/gpu/drm/imx/dc/Kconfig +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -1,5 +1,6 @@ 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 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 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..d2469ae9a23f --- /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_new = 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 Nov 25 09:33:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884672 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2077.outbound.protection.outlook.com [40.107.22.77]) (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 CAF5C190477 for ; Mon, 25 Nov 2024 09:34:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527282; cv=fail; b=OqfoCd4hSfpHsEZZY0QzK/y5dne/HKKYWp2psU8h2ijlKKPOZvxBSIH92Q4QcMoSBIUAXbfhRXrEUEixZnteQJ7arRZM4o1lWwXsCTZoj29gCH97uRhnATkdvue0HTxsSbJLVJhI2YYcnqHbJpDYcjHW4SifpByHMhNPHMryhYs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527282; c=relaxed/simple; bh=vdgz9mn1ML34P+oqb07WKttY2+xy4OnU/3JpuXOwV/I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=fsnWveXGx/Zltfn+3lPVdU8tBN6y2QTIvqB5kskzO2tWdbDNB8iKByJIDeGXUeVtODjAwtCPxfW9kwMecjWyltJ72WvjRP4NE1+liC7zSlTm+gaaBXvds53B/q0jpDsOqXV86dMxbvqFWACJe1zjoJVPwUmfmZ4oC2s5OY4MFbw= 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=lMb2idhC; arc=fail smtp.client-ip=40.107.22.77 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="lMb2idhC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=le+zinezg+A2eNTrfLW2EiaoiMN0mP2Drfnd3uFJp+yny11yqZoZXrD4iO/lSJMr6sSchbsXCKxFAsBnRgpxendepAdDDxJ6c7GgQN9x1FUfaoL/a9Jh+otYgGxaLYfIOiMYZpqYlWF8iAk4CiwcA8EpiWcJnIs4lqIBSVbsiFRR2f7jncWfQ25/5lJrvZPODUyDxUlUMyKCwhsIlnQ6MbdFEhYinegwSS23fDp4JYf8cAklmSuQ3EXgdzpnnaVSoi5YQi87fNS+vHPVK0ifz5j6iexUp9Hn8jZ0V/Ef0Xh5Fjg/HErlRQKO3IizGwaTnA0vaY28+3QifzevHZzg7A== 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=21NOt/xvlSJxuqmvod9ROurO0375DU5S6OY0Ifg97wo=; b=CFZl7WEa7WyZ+H4cTokXQDPzxD55MEKynT9vLmTR0aH4s8ltUwfbiF4udXLp7Si/UimSDi+CfQWAoHBEdmK2uK1nRPKOR8PqnH12lvWK15N16U96IODY5bVeeKIyF7jTbBCzhf0H+9+/xkqWfkPDdmxXBDFd5Pgs9WiGp/kcJx5YJn+fki2letE9BVjhduLWmBZ7Mv1brFruRTbzo9+KXd0MuCsoCSl9v2vSs5nqUzCDCFOQlonC0ER3W3Uy0XVOK1A5u2MGT90fy3/WLIeAbiMnJ8yuFRTWdPh3B/loywk+8IjgsAV0nD9qk0N6i76d6KLvwPzru1x7crQN3yF9Eg== 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=21NOt/xvlSJxuqmvod9ROurO0375DU5S6OY0Ifg97wo=; b=lMb2idhC8ICWaTRuudnO0t2xMRXq/0jRuKxWWRn6VWslUlmQVBwhBsNq0ZD+xKo27EZWC4rzICkhrzRsjEEO9oTUQ/GdoOSZAWvPKV8/zMtNmi7K9GTVdFq20qHV41Rbz4FNQbjL7PbvGkQFSzC6DIKTnvmrvbNZC3/slk6uBhBHygGUaKsQG2sJH1jD4PLQVNQnZvxu3031sqH85G+4MvVwoIPHC5yAeLhamOaEtpq1qFJ2XqkcPFrYcudp/x6lJxqtw/zRsdroBtRyi5ldHssPT/0YD61PIjW5vTZcpBVJ2Ok2e/eatxr8OKZOZkXmWQIksm+YATLpunNphz+vmg== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:34: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.8182.019; Mon, 25 Nov 2024 09:34: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 Subject: [PATCH v4 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Date: Mon, 25 Nov 2024 17:33:09 +0800 Message-Id: <20241125093316.2357162-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cd47b55-2eb5-4828-9743-08dd0d345fa3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: RcTQTFIoAAaiSbfHfhLWwwH9ftTPc8fwMrbZNXDffuxRIgycqMr7tDEOsF2ZCpQpPTwJBMnsfQUeG7Gw/fd/NaYcL1xK469VrcqS2J706yHf8jigilXFvEj6jUX07EJ0KAVtK8j5vZQIa0zIeV5ipeqLIREYqHxEi6IH1Vb9TJW+x7hvqdesFzCHq0nDUG03kasgNHO2qLpLbfqvqnGtstLJOljYoG+YEjs622Mkpk0NzM7L+/ka2nSVrCurH50kl5M2UtQ+We7mpFnqmUBZeoA8ddfjOCbgHbilLmvQQiiipgFEuuxL9nldy7YYLzz1wrErjUjh1kNo53Ykb31XB3g+p3RNqlIJImzGgCxjMMKmDtSy2Bw205lx7Qf2XmKd4Gcg2+JefeIURWdAUMaN0Ijn0ckkobbc4w2nLUIIQBGWePfpm/yBir7X1Cf4vQ2zv9bBj/Or3Qm6L0I2DD8Jjanfx8uRr+DPckj1xFOHOqJ5igbXu3KIuhB2nmt+G67V90F6l/+udYVs3X+GmZCjM6jmdC27jpvAOJFQ06iS4zQqRzMd6ywmHXcLN55AQwgJIOzIX0Ls8QCpvPzofOkZluyfE5tIQHrefbV07/9wcxHejW3SnMrHvHBpcg8sZtcxFU1bBJKYOY5UgEb5we9y3qIAA1KsDxWbr8U5MQaai1V4oLTPL5KsAsq4/puAF5A2PKi/yr2CcMZlOXGUMWkYaWuQGhyiaThbLB2OcQM8LIsc7SGvcwK9E4yWBk87kNwy+Dfy4rmzSq5UKpzhDOTWE6HPydL108C+f+jA/HHNo58ww3PIjghz1p/L20K5/VzC2lSdondBm8++zfezV5pExis9LVZlocH1YaQySFPeULdkyk5tQHn60XzwMUCurbSp9RurAUxkbygFoe0u2RhOej2AmAxeEzvMfxNS4JdY5q1lSnHf3BiqfIzkkp85Px/yMvIc2VHoPCk32cwjJLY4RQFOZ5gAB83v9ngYmAiBicFszRdqpulCCw/4FKOVfTOXKXchUfD+NKnC1tGI9q9Ih+URvd7o3eVecaVJJPGsXo9b8R1SFCdgR5OwhSsVw1fCcZOEqFzBHBQBvM/+xgNsQ2+WKxr1N26kQD/bo8a6PhKv+9yDL8t26NlnGHJcWOxM9Nwvpuy31YDBfPS1En4WylCLQbcWBH8CHGYtI4APV75mfUqJtKIfLEowAjiUiZ9qZzCCNW/Jl7Xbztw04VlmJFWaYTP3YNOHUch1S/dI5BXr9ED42BU3jhaWh3Fwh5dHzshQtfKdTtncoSmYi0RtsHdJytnAr7BCrcpt4pEIfuVlg8c3LGCHA2DytJTYDIn97tAGWWFIxakH5ds98oQ5psKrXzvd7TqjEyCWmBjwljmV134bfzkW7a+nUOuxjhOBWuBpE+RjjF+Tg4oH+jof5w== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WReO1Fx6uUqcw7GOcg0XKtvhPlUpkXXeZjX/GU1oXkU1z0znjuP0R1c88Y6NTqYXna8FnEY5sPoM9FVfd5Q2yABiSgQnaCTOJc5Efya6sF3ejn/Tyil6W9Xv1xI9z6JDst0vIcmg/iCcifFJ3u6bTeFJaN6ZAGKyN1kbye1MixfinoPSwCwWPSON+VsW/hSBfccCW0PnkgpqslU6gOO/GBQFQZnyy3IP/3CldsKaPLHfQJLporCcxRxjjyR0wxKtc70P/jduNxu2J1Ms649a/jag6WQqa0QnyG6/6o9R/I6Tf+nGPgjiuQwq6NenYryQFEq7CS79CI5nzUJICKKlntBwJBMOWc+YiaDBPDxrp+5g9KXg780aCh9r/qNdjkPZW8DT6vmRI2JL53bA9+ni98Uk7PC6TGub8UND12bBKiIC/YtFq39mitbSpzKEZXIxhvR62M0wvgCuW2MrPc8nrsqX9ND2gK8J703QWLV9sT/LGzxiCrN3JQ3P6pU8KJMviFg0O+TOd4wnpGcBbx6yIMXEy3YU4KqOUIcYGnTk6q/3wius9liE9o9kOpKbWfHXmNq4Xc5OC0RGy3wXLAKjit1FVn6B6Gz/znVrGADWZyEKGAusKBWfiCdaDkhYfadJ2N/In0pbWdN2k5VJZdQeTUxTHK/LxiubNlB6JEQxNDDxPUk/mqkJoPukPBtPMwTOjPEriFaf+JTg8g+VWYhzrMt19O5O+jZVzV3KxGkOhFQfh43U97RjSLnlOeJuv9uGIfKkNGUoI34jCG54GUav4Fic/D2/k1yUePfytnTdOeYKTI2XBTiCdHzXgnHswmMmZ2ZGp6n/fJRuyqveAbRHlccOqqQ8CSD5Q8uGAuUecIU9/QIVyW1VmudmN1m/3qsn2BPmTBttmEkoF6NcAQ/pipDdN9tCnz6KGMwnIExnigkUc4p0vyx9+2TklTAzOvN89M6IfIuZYFx5cUPXGF/fCa+Giv7m3QXsDMH+2LU46ID1iI7lcsRe13XboWVVK1y/CdK2902g4kueSfnggZBHgr8ehTHxcECpFzpAoN3igUABjwaAMaKettCsnWfcD7sDuyb/ydFDGRXLHWhndDjQHCun7QgMROVSFe06z6LudFuu1v3qklN+vAu0YWXMhEXAxMJTxYAaXvyyAvug/k259xn+9tlutEzZln/+FjseByDm7rhCDgy7l/Jtw5m9X8dbapKURX4WqrUu/u57C6mYOFYum+tkCPzMHURMywTaXfE55h76+BGGuvrlkEWmleKA3qgQsatfiDH3icERNXenhjmFhcfgAPoU/+ND4YJaDUwBOc6XpJUBjdViIe3q5jMvD0HmoQOVGhXO2I/Y8uGQs05waTY/bYL+0zBwpX/Tru24GXPyXw1b3fekE5RnFtsNlbAUNmM6HqtduQXk7p6YWtG+IdweqcphqHGwf33T5oAkTffkNJ0d8hr1HsTXdSGBt3WNDzjieMSjDu18SgFp7IRcUV14DD0laS+fDC7xcpd4lVyJFSakg5CwYZq9qLgZRM8nvScdrWgiaeWiqwRejQB/2umup93TL7VW1wb59MLO9bKqZrlvqRq0TyE7Oaxt X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cd47b55-2eb5-4828-9743-08dd0d345fa3 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:35.3562 (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: jVByxm7hHrWnb0Xpi5QpuZNL9nXB14RU1gFMdmomNGVF2L3hDEIHKtuLTgdyyDk2yhCeXHVIT34KjIqyJxQCwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 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 --- 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 b66b815fbdf1..4b0d1a14d074 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 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 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..f26f49077907 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_new = 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 Nov 25 09:33:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884673 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2080.outbound.protection.outlook.com [40.107.21.80]) (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 982771922DC for ; Mon, 25 Nov 2024 09:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527287; cv=fail; b=rKlyTPpM8dbfD8IYs+Qy10sCXDUrNMDwL5jP8rrDH3mBkcWdgJmDKoauYlnAdjxpapMQZ9Zj+2oR2wrvJnHq9g1CcNnvUUL0+CIEzKCPkbRzZTwlppb+C5zBWBgZFaKc8dZV1qgDFrqhIFC8fFs33JpinRuy3d7vqtL/heA3Zy0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527287; c=relaxed/simple; bh=XhFgXlkF2QzyVuT1RJtJCKNamfTqJFUmYVWNhlNx0iM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=JPSm6TzWsaiYx0yi7bHfV6APCK8FkF28XwOHaSLQGRobXfUOvGyFywWtqz/WmS9nnC9Wr4vZtKIWwn2/nKhFTQiYoeosyL0nlE7/BLTuTza9I5MG6Onjzi/9re9+Ok89q6tMrYrQ+QPr2DWVfN8MaziMElLbxCsF//sWVtYDVdU= 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=fZ2yfjLg; arc=fail smtp.client-ip=40.107.21.80 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="fZ2yfjLg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N1oHJr0Av0R3WadHrBl12nz1dTwv0xeNDSUAe9/HCwSAv3Z89PPtc6RCNUaOk1WPzYCL/iRPWsnFdyIFfiIpvBE9QdeuuITBg9OKZtx1BiIC4uCB+Qn8QptY3aDS9WJRu7RDYZ4fuyfF/4cMziK9WVUXfQkA4yKX3kUf5GSj5LFyQuQ3VOn1yOCIDOZ8RmwdUeV7gx2UexUUuYQdLkZSKpekTZsJz6ht/e+m59gZ+aww+DqVfRFVJDigt6zAqnyioEv3FDPyuuc9z1rgVMPobLEQO5p/McuK08kQDNQ3jX3KXw42gBjD1r9FRVbl+x/xHqkojAFe7ArKQ7q7VAPycw== 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=ShraxEBbCC5O2c6noH3HRMuQla3K0Cop6E5AQptnTpA=; b=f/yIN9948R4IIthlkhd7zRTgnSgmyUxFjMTk74u1j3uusy8Sykuk68cBmmK3JaG39h2XJHACzOmj+dIlsZ46krQj3Bme588bhT3lr92DVdInMAcvBJqyjd2cNxfxQeh9CQ9WPJBU+pytOvHs3uGNwOJMD62jtBuEVbKYY4UbbPQWYoen8hRnkETi0AwEhPoUtKAfE0+XvatHIOG1nth9O2W60Pq8LaRjQdVVr0hRhtRhrKahSv1BtQQc/BsfHsgiilVOueAyOGA0tu5AR4XbXc2TIAn7UayPCOJSihs9Rc4edMWdUJsHtUZmanGRblcnIJuS2JCaAj0r+aof00LwXQ== 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=ShraxEBbCC5O2c6noH3HRMuQla3K0Cop6E5AQptnTpA=; b=fZ2yfjLgyMpEnBnvIqlvyaBdwjXiuEbkZkQteRz1VdAqPdDJjG+rfOR6XjOfSOvusrw7Oxupk70SsOuM758VPp8F9Xvcyp6Z6iEiq59+Bp4iZnkjkp2U5D5+vqJdzovSYts8unaT8EcDf8qOF5mqZ89Zpqs/XjXpPBnHY6u+jmMAmQPPbQa1MEyov9Hhnx5+Ej9FJ5mZKTBSqGt09z+60xmquL6+FExUix7CmSUvmuueIRTMCgCMZh07g4VuBrF52J/2Ad1ovP/Lm2vFcV8tCRqV3cD12HqbvrW3hBeMXGojC3qKCuMLHz/yhBItKDeQdRvlGkvyv3m5v6hHBH8JoA== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:34:42 +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.8182.019; Mon, 25 Nov 2024 09:34:42 +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 Subject: [PATCH v4 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Mon, 25 Nov 2024 17:33:10 +0800 Message-Id: <20241125093316.2357162-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: df89ec27-1995-4e6f-7805-08dd0d346402 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014|7053199007; X-Microsoft-Antispam-Message-Info: Dp+gRvV5PHg6iPtdXJynDcijEeAofy+5emy0RMdEKGT39kP3y5rAbPtVBMFZb5V6stPWFgfqBZwH0mh6U/5sFzYfn1E+N2y4m8uK1F+ULlkJXs/SfFVhf+Y+KDYqwn5EeQUEuf1jIUVqmraPNKU2CyX/riJ78NUtsHCTlBnEQYUt3yWP2lRkoMyCHkOx3URAM1AyglCS84XAKqlsFHdGsNcXh7p5v6qcYB3CySGqMlhAVR7c+gOr/xuuVxeRthIuDaXpsOdf+Y3+5audYq3T9Vx+1LZZCwdw2FkCydPMnlk2dW+VJ4+ccX11Y6DqBXtrehH3hklyjqzW5VXroRn5q1kMYVaIsORhy96VuMnR50SoVtmzWQhEdaLGfNYSy06KKFdc5FDX+NaLSVBldmBMag7m69zD9SSIisPynNuITMbU3R/azHQgbARLvK5hIHtYpuQAChHp72WOaQxScUyHYlWfPUCpjO6C8SK2lTKpO665vHq/axtd+7id9smpMKEvAx9f9seGFRtFvbIKvn6ogXCjzLs8UohqUixN/BRQ9yao+B36wKUe3kgHLo3tl8dhcwcfNeGWwe7NKbyFEBAbXvYftf4rDBUR8eHbc79jIEoEkjxO6oEPXHvfIQeezZ70tOuhD1MoJqGi/GylZbz/m8jnVl5bXJxLAVwteSwEORVQd3y88eOiPzxB+FG/gjGa1VfV+ZMC9jIEfW/G/ezgix+JojZeWlGy57HjTu3nV+5VJscl15yEEkeAyHQnDjiPXhzjaIRJ2j+AopxH84furEDNbZ3czrmbnYUddYLR6hkx2u7yOS4tnqPnpl3E+eqJ663fqr5lw/41ECnkcP/w2jinQ7M2s7oUcbipS/scSk+4as9D+piVRtQiMN7F0CHh5F4m1iX0Vzy44NxFEZ+LIFzfEyMRQ3ysiDheIy8M3tdJLIycWCHgvxPnTBpqkd8PxSDZKHw/RJQoFBvrZSg8UPV+I6QFlKO2mdI6NKHkRw4dWI10Bozfzq9hCnJic8qEODWaEr1PssfcmG5xdEMMdopsQnHT+T6l+3xjI2d2AIKzj37hNqv/XsZV5enBixmQ1fa70qOrqvKT6PcUiL/NiqjaWyPHkU5/7xqbekSc6nePVHS32kJLiQfgCcsLGA6jIm66AmLNz5G0fjbJHZuhmnEsq63hBO0izj0ztX1m03dFCns1j0N0dwGohmsg9le4dnJUQfTU5+De5FWm/gnd43JdSxjxhGVo+Gj2+fvLTOnVrEZhXv1BikFMLhy3CmgCZZxPcmWQUXFjRAgINdDRZEysbVmCjFJhpKti2XlAL8BCWaJFxOzqtYZd1P0ZYq6aLQ4y0PuoSZno7GPVIPRsQmVoeV1PgKDh8xSNZi8HiY8= 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XCQKFvs//zApz1DMkNIai71dakGb9BdP2kulyM3DVbj2sJtfKSy8pdal3eXK5CoYd3JdrBcP/cjP0xjpV6B/Mqph4TWQR3+2lHDdf7iZplPiZ2y5nLKLV+ujCgfslyC14JGbO2znM3o8bXmyaRohR11deBjhs7hYpc+rRn9AM3PhhP58qZdsZ3Xu5hHk8KgEkPvW9Hqw1G4YQsNdrAPrvyrF/9az6uGpr7A9mZujvlSRA5JZPKm9ZfmG7WarjWotlDHLUjhnL+OTjTdpii1F5WNDCNzfqX2SNyco5jadKqsM7q5Ney68rBAQmVOpvw9e1wgqp6rLYu/GQecBffrSEzmHlRk4yh4jup/cgHrE79rl9RSMVYL1fv9Tf+ENoBxjSnBgEqJSCAnIDj1jyopJuCOG6t9SokAHGyIdTRahnlkYlmu3bNAVoe64OlWJuMmlhRBzz/C7/sNka+tbPhQDBXCkVVE5jvbmIicDcCYs3G3bB0sgIU4u/YQdkLUfAzLaNWbFHfOwEe/HV0z5BvrJpiswqtAk7LGLz4YxrbGpzxlmxviEU8+33X6NnNjQn+FsSaEw+7Xds/oBEo7m+Dhq2S5RTjOx2XWVmzt+l7MgGravUscAVswboGkDJ+0T/ZiS1g+xPwd3hVDsxFgMuTWJRr1w9aABp1x14+BnOCIZOzDvRPN/3ip+fWpbivpLgst1Zxu2SIyqm23kcEHghUxXlU8ENOY/l61juPwXVDO+NIPHIBpRykZSwLNc59QkpsOcMypg77C/yH6F+t/5FAFx/AG3+FxylfIuqh0wnp+4koEBPgZpjIDJW8Ti08eAyiRQJ37d6fn/zzdriAWUkl5HtHMkq0g8F53oiVozFs+yJ1WzEeKBIqfFEdXmFUNi0BzbU9FQL5+62XBfyK4JI1HCi2kR4c1ZmiRUNd1ksiA2+5rpUVHdKwvWISRJ3Uu+dVWiRxjy7GxYhIv6Q6tD6vI+i+5XzUtZ0SApup7mXuecs+sL6iDm8yJ7tVv/RoYWAaxzldCNN5Y1TiO2uhUOkX4+CuCqyX34Z/qQkOEWdm8ZqXjvw+eRY2X4u3POoPYYmeqPfMPMw6uztawPokcZ+lrRtv7K8E7y8BpWK0/U1nH4Me4SXvJsn0Zy/MFmRwIc+aCLMJlzWmvgfpkDhhSlyz0Nyrs/vtE2eQafMrRdUv6sdt6xHsXUL4CqztN+LbCQjaj2ehA1IYEwY8kSslnA5wW2FVxemuqaHwx+WnlzTWvbWHParOPHx0bYnq7qwpnkd2txikvI+i2bkYPjppZx50Xc3ua7hWdIGKRtJraGNfB7rRfxylE/jTD6PLaQli7OHebbZKSiaEbNcQcll8wQI8HdWYOckA2/BH/6DWNuCdKr0pQYPhy0Ypn7FawdXp3PoSGhgh4/EF3CQWf8HececqNVPRMPNcSdrKbMSfWy/c8BBhye8KtcimP00U14zLV5b0wpcGmSrM7IZZe3nOBFQtq7MVmRC52CnaYBCt0dhRpohDKNePXcdM5F3yAjgmQP751BuhcHslo3/i3mYBrvIil0kF+AinTQgJWZ0Nhk3NU3RFfcdPgxRE9LWN8ZEogjWLxU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: df89ec27-1995-4e6f-7805-08dd0d346402 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:42.7383 (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: FRffq1N+CouqD+KuQCx7iwwF7vo7fRRLotlXKRUJr248ucZy22N1vZuK50JnrrmUuXROjbXgbpVPdw1AYUFjDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- 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 cf1d81bd04a7..3a1489236d43 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 Nov 25 09:33:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884674 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) (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 87EF2194147 for ; Mon, 25 Nov 2024 09:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527295; cv=fail; b=JLo7AURZj4YdNz/xZURRxSQtoC5QBF577HYcpx2FaHTZ4Hj7cbA9G10QQ4Ko7452OcaluD87Ba4HyGiNfw/6VcUgwBoG5cAGn5kOWFO9GGhJOPMvaF2XRVttMZPzreFBo8KzrCtiHOW1WwMDmEFEuVg/01rrWE7nUs+BtMo046U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527295; c=relaxed/simple; bh=pihCq92+Uqi9kwSiGqqlawdIHnZwIIQpOS2HCkbDYfM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=GwGXNcXWdx00Q7cULDDV1qn5pOY+otfS5COO05qah8DXQwOIHvX3iJU/78vjzjoo8O1UIzIxESJm5blwo73WeceBQp8egSutko0aK6WM8zsTyXaDZVKgcJwAkd5sfobTpb5s12d4I051F6dIaI5pSoWOaB1VkjAbs4tJb3FVtYQ= 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=jzhJUzK3; arc=fail smtp.client-ip=40.107.21.78 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="jzhJUzK3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W+cOnpoCS8LypjMoAEkRN/k6pnED0yjFkTXbHLqAsUn1flSU+ITxgNX5pXY3UeWKXkHEQDlvOJ5Vg7xalBk1M+2jQA5FCgogFtXIWFHEjWMXm+GQH2q5THBM0VUZhfQdFNJd9RSveSuPxe9XrDGp/qDOXa+6k4vPJ4k1RcGeWyYKqJZsRfKGlWVX47j2VvMc4xGSOwiweu9aL5Oo3TCISbGNzO/5C59x1pIMa3ikFjOoEP2iTE8a4R7HDcHhCO1/WpquMBV21wV0n/wGYNCnnI4thS4BlkPQSG9oIdnj88CqsZM+AXgjj9iD9mUUIhpKBzMU36h2GUmE964giPVPZQ== 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=ZfjosmjOElM5vcLf8zbCCH2Ii7SeSSEo7yq4Tfpx1h4=; b=QiaQ1PttjAhyWDW9/Bp/Lr7IkyxigOwvGUrM5thukk3Cef+BUbJlRTV63aXqZR3SJ/Y0xPWRuNERLzy4UJEyJbXBoWHnqNXoOTTxkhTO2GWctknHe8MRyRrtiJltiZjSM9DWda/mib2z6XABRYPDG0olRad85AtXJXHg0nJP1Ce8AbiIaeCSeyX1m3qhqG1amGRh70thRqETXds5Pd4sJU39lGwOwZzlPLxCDklb5H6NtNiEn66k8YuXHae+FMv4hr9i+rcwjunqzS1wJSSU/o62YvcyMKfffMjQIg20AqV6r7crk9RzGXIE3n3AmXBVQuXEm3ROqqAhr1GxGrr91w== 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=ZfjosmjOElM5vcLf8zbCCH2Ii7SeSSEo7yq4Tfpx1h4=; b=jzhJUzK3EXdUgux/fzg706R1m04cUm25kG0ytSzQSEkR/ip3zf92pOr8NIQrJQIZDB5FqHnmNs/fvXehlKx/LzkmowXKoirz4VY/KTeOJsSc+XRGVgm8oN+/Lgmw9pDr95w3eqPlgVPlH1h9DrehDrG8vo/p9A+QdmdrAMIS7lQNRnxS4Ekbtanh/wChXKUDqLNDPm3pTytMa/AKcROWTP00sJ6S7gsHh8Bwm9f079LNlw2WYoSFECRvFtQmbG/gdc3x1TBWp1azMpuQlqsndPmeUfW+oEHh/YGnTGHY4tp6rM62pJqGRj9qpOyvh4Md4L5nSedX/s14OlAwvppxwQ== 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 PA4PR04MB7919.eurprd04.prod.outlook.com (2603:10a6:102:c1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Mon, 25 Nov 2024 09:34:50 +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.8182.019; Mon, 25 Nov 2024 09:34:50 +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 Subject: [DO NOT MERGE PATCH v4 14/19] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Date: Mon, 25 Nov 2024 17:33:11 +0800 Message-Id: <20241125093316.2357162-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|PA4PR04MB7919:EE_ X-MS-Office365-Filtering-Correlation-Id: 063e7c78-9a6c-49b5-cfc0-08dd0d346873 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 8/Mq2w7DObgPvafs6xtH3nvT0siwJzffztlSGqk1tWZ1iWaGWtbzGyDP0bvy0rzx8xGPps+qwQeushn/1TMJvlGe3AzZ7hqXC6PEkty9adG1eccepufXYNq3v57HJtvPVhNLnzcI9v2PlhRV6bf0aUJbrn4nCO1p1HxvgkuehE8MfRxv8TsxyIPt9ikKqDPsdd6tGRClRhaUA0UpCDTUn49iaozT9oyGwKpMxRxKyoY9C1QUD8zcl+mQkISiaEq3lyCjQrKHY4XtKSjSm5GhoG6fj7tJrr6IV9cq2+HrF92wQGruJNVIYM2PqB3jaT726UqfBOjD1Mq1sDqExA5CVAf0xtxRfZ27qUIpDHgEL+50mv7SDNctdKR/xbtQsbJUbdZOONg7kBinb3Wcxpdg4fEPZa6ezrywGbS4OWfr8zaWi59Xil55h0sPFxha/pJBuJ1qmis4N9csxnFPWH4ZNqlq4wTLHomLbf1AyKVuOp0wj6yKLgs1P0Te8an2XHVuxWkCBhZPadasgoiqUZN/U3jNELErz5hGRaSJ5V8++dAYASLtr7XEP/dl4A/ZwOI4v2RNoRNmMDoM2++g7k8JCER9kh3/mHrAiKGs+eX26ix9FBTF0dfSpx9oE90w6hLjunp0wvuCceOXwYSeXDRViZltNygqs9vow2IAV/B3RqwvS0/IXaS20CY/doWGSKtplulJlN73+m1vaEe/DvoQ7J54MPcNx94KvQisaOln7VKDWIAmQ6MZDZsX09kvpBT68RxDRtxsb09wb+hWN0P02krdecF1jcFvpnkRWvKaUz34uxIv1Y7umEedPo4WfxwaXHUtm3ASzebZnyszG8FK6W4bCCOEHUgq9maDIrkNbtWyq14P/E4Spt/TLjmjrWxpeMNixr6ogyZmZlsd0TAYF46bn+OKo9m8f7CXA5MNY4xar/MqMiY13E7hJnVPN0mm/br4lR3JkTybNYVxjcBTzeolzI6mr4ZOCSYIRc7HmSpNWIoaVpszHfTUtCr4iywQlPsnaef4NsjzSo/KKOwc1CwFPUinwccIQrocGmuWq6VMFtJx5gmKrHhWu4SK+YfWk2Cu06GIhX6TPAEdnIKyKK1A+Bjbt3ngoLQQCAnYO7kt3L5wmaNr5goFturegAVwS4a6jt1A+x7kWZ+3AVmW0Gu5a2WIkcRNxxO5k8hTsdfcznhDhRkSSLyVQGetolB5VwIECGEd8k/2R2gBKZwnTf9wPkQOUkal5s1Ao7S0M3U/LMlqfAVby9CCsdgvlsdm97ya8LBTGEnqTLnQmGids1JI/zSxyqblucG93aum6RpxmhTuojYqlt2i60WaupT9AGJ1hPktHhDjAvmu+9fHtLzyj9a5/PGgjoWfxRF0qW0q6DCMMWti9hF60Uheef/66JSeGayOvZFp4LqK1DntSw== 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)(52116014)(376014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9FE+850snuz4y/plmTJMRBQooEeT1T9sUIPyYMNXhT0Kr43pec95eI+0XE3Oxru2zPmIEq/DwGdpDlOIzuxydspKERCpN/9Qc7VeeFu0FRP9Vhp/TM0mHc+Pz8IAneGwGOpYt+C2+/YFpeJMvaGN+VgZkCwA/TE+mTI7kBZI4FNsM9ps5ONrFwyb+BoRZbA8Lrxp1xeCLErBI0eWYVsjReh7kJ/qtis72cT2Y4eXFqG+fC25zmjjUz1wKMvudMprzzN/so/VKwbKUw1CYX0aN6TKJUlwJ0u3KRR7sFQaKL1WhcKrzp4tDQhu44EpBeMJ1G9s+h4Az3zZVmhxPlCUuN4Hz/PbaL8CWWpC/RWo6sEfR7bNK5ILmyGtiyn6GWKVONu0S0emCMgDfz5sAETiaBWPg8XHfUeyuI05mnWPAv2WUdfm1Za3zueX1U3Se/QhTAIWtytOQszyeMvhJDUZRLiZCnRE7sKCK0GsRGsOesnA9zlHbyX0ZVGLBEhAsuUK+6ckjmFLzeI5Ay2sW2h2t7Lqbrut7/Sd0iP1u2aas5ZburnwnI8PEiDAVhhRCRYTcDEMGqk/N1/vHuSVGKsA5RgPv98lf13EzEnhnrs0g8Bnfs9B6il9r1X4IqPasEGztHasF/u6+hLVsYl05Jc6xStVBXK0thALdF6emHG4ap8fTsZNp+hhEKY4CmQbUj3zKLq3mo7CnaCa1X0oM1BtakdjrO52YXSGPFLNAk6Ar9miDLnOescBX/9vkzQCwbZxS+JFK6G/KO5bRO6glyU40O5SQzOcUGA+w1If1bcSg2BkE/mOn9HInUY1VABx10JgFZovxlKpZtQ4MY1G4jEwLNL4o9zS5O0wiSz/SyNbrhMUZ8EW/lADMPAALHsKu88HcmgEmXPbHao+DlsaxMkaR7Fj5VhYRaKhqija9qu+HCTCpNNiiMLO4v/Nck69gS3whT8Hk1Fn3ADw6+PRd8sgQzQDaTafdzZseq4/bbIMvBpbed/V8Z2bM9kA60q0m6mX+eOAs+1SLgWacA2sMdrPkLpvBwBM1GjKcZOFVWI06D46jYl9wSgsSHYEB6Lb8bVDiZ5sZ+xdDkXHBaFlGgOtMHAhsZ9n/J5O9ajdMRTvVUWqQ98ZwVaZ/oZZv8CeYV7R44Rmogl9zw+OfxkFVfFpOYaQCBlRDEOQVG7nUaF0TfP8eTx5dO0cHFPgcLvhoEPFJ/U+xBxWeaCuNLuVkew8ttF/0h5bhWW/eDhstuol/3hzLsPqTWZoKzJeVo07z2v9xYw91WGjcdunl9ZSjpni1RLG+pbJTsO5T9a6NqUufmd697gQsBvXih5Z2W2GtQdwi9S58AU1jVaN0XcYbrG4j9AtZJR3lUqudxfzktgFiWmU1ITmgC8y1elGv/Sih+cK2iDVfPUuJAbI2Gs3WXNCk6UT6vsZgkKXytG/Gjxj9h3juo080TH+qKhaQ5e33doEZ63/zgXlku4He4SeyHYPTLpaQ7OU7vFYJmrZh0vGhSr5pNddb3ryl7sRffaYTHlDXAQVDgLFoNY3dOw8bjii7/R2uM3wx3VkBYZPMHzJBOpW+XOqB+sppDjPfnshSTqe X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 063e7c78-9a6c-49b5-cfc0-08dd0d346873 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:50.1793 (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: Ku+0zKh/9Klx5qb5dtNDNeIpKQtj5O49sYxTKZtJVW2YTdcjXI7zWP2pUVHXV6rmviQ0vipGMi+h1VguWeG9CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7919 assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- 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 Nov 25 09:33:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884675 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2071.outbound.protection.outlook.com [40.107.21.71]) (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 CFFE7193419 for ; Mon, 25 Nov 2024 09:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527303; cv=fail; b=h/6rw4c8U1EJZ0h3MverpsoNXXITOtUbxJ30fITShiA10J82bzd/WFtfCxfUGpIr63NtFC/0uoZblHTdTKdTiSibU6uqU8Q/NryBicq+GZ841gLNlIw9WPUl00Dtorf9khy0nD2/B8S9P18+bVu/vZI6ttOnuHkRk/9D8418rFI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527303; c=relaxed/simple; bh=ElW6horMYXRlmUP0GsIzCZZxMAXrD+1X/O6ESPj2x7A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=jE0MNDCh2LkdNCkaZpqdXknG2siVWY2SL302fIFk8ADIxn1yJt6lgFOnSbBPFJ//xV4Z81lirjZI8rejNPE3BeUDxvcG+j2uF4TbJuTJT3D48W1wNKQibfebI4lVDsLlu9Wrw2+KQKNYjU5MwaBT3iMIBx9xYE7yjJr4gJ+f1pw= 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=YS3XNjsJ; arc=fail smtp.client-ip=40.107.21.71 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="YS3XNjsJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x+9GI3CvE8dx7RH7Vkeni6q9EmvHzlUyWUTwVJt9Gg23XXlBZ/rhzLdHFqijANckiv/E+ikq/1SYmbPXitDrJnrWZGDGBB96Iq9B82SVCaYb/3NHYohDlbtSzKSHSKLBeo8F+R+GOBC/8Z+1smXG2AJyNuEZbXarRMUYRU9ykSUMH8SO8V7yW13rkvSDrWzS6wtoneX2YkWXGbwp0Inl3UNKmZReN+h5j7OCBjzYAYSfpI3A00/3YjRKraXuQcq0lBsNl+hVqleL6lcOXoaBlhjHlBGKoNt/1KJh3L5ZQEe68vkMVnonBtT0atHfaciqkfcUHSNlawQ9tiEHMurQoA== 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=8U+VyueZbbIe7DHgibQ2VZ1ABe9yTPnjDJr8njEaX1k=; b=a/Z3eYhibO2R6ZXEW1Ed8UdP4jxYAFmznI5E5x01lzzSLA9bXTWnMG/AJDn+y8ZTRRs3ekH4Z7UQggYJYwG39QKUzy4HlXbkPquf9UR32uBEl1G+HDQyUdU86uCfJ36MnC3DpYaq2k7du/Fj/qCzBh9UnRUJ8cp79w7E9wg0IAYkzS3k/lQKupTSbrcmxydu3CNPHHyVXv0skL+xkRJeAww+a3ISFpD1NjZwpVVNKWkorBUkVm6ZIMK8aqk1m3Pef9nuc5POc7NhVjH58zH/2jSlpgxGi6rNjS8t7cvLxiUpJwcY8rAQtKTOthAiNxPGAj1MMTjP9uoZKMLgpcAALg== 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=8U+VyueZbbIe7DHgibQ2VZ1ABe9yTPnjDJr8njEaX1k=; b=YS3XNjsJbeFy8/o8vOpuratIKeuCXCJLg/E/fO3aUeoTNsfrZZ+gQwFQgBSZGF78B9q2Fq3kTmY2O0xz/LQiFcnsltfjGlVh6gfiYgT/Xe1gRqQULWJATaoIQUC0T3nkTLgEts4T7gqKhPgWUFcagwDXnP1Hl3K4J30yL/rp50pd36XDbpb9fCCRFkyzFr2hGuROO68om1Vx/sAWsuWBzMQ5W2EI3irOaFOh1rtEVdUeGZXfr5mXYCHlnmAMI8puDVFRXmrZjQRmIqnJOvbrEz2O98yA/42kisOSN4ppQMrSgahbtB5tqemJb8Wu5P+zV8JF+Eq4np3AtZHD/vXM6Q== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:34:58 +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.8182.019; Mon, 25 Nov 2024 09:34:57 +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 Subject: [DO NOT MERGE PATCH v4 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Mon, 25 Nov 2024 17:33:12 +0800 Message-Id: <20241125093316.2357162-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e3c834e-7058-4662-c29f-08dd0d346cf0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Ps7q8cvhhT4DX2DSWhc3nvHjZcApMjLa09f9fwgQQDCDxyyz/zIxkg+enR1ox4xTzplEsZJW99w8Qknh+XBKMO/y74+hLnLqJJS7wxpnccnwtWo1GirlmaFlNkK+pNM9nZNSZUTvvR3aBk/NAy+mhv+LFLumPAwzj8CHlB9lyuKRyvBvkhQ/u6aOpP6J5utDNdDP2UTCtROKiEIbYZnALvtbbCQbnKQK0PSHeT3qa7x9awXCO5/HuPpWf2ZFRmIRN/re7Nh6a+eU3/uJvXvvZaLA55hLngj3pv+cpHkMTodYpqgI8KsqHmXBk2ozox2CKlaF1rUzQzcT/Au4DyGQokix87C5scQPrvB6xb7DkXmpmnpyWlPO76vibeWee8yU/okLkGLSQ98Nn0OzJ59MO7QRBIuwC3w1qAboEzFJGZFYQTO0jyZF2U0/nslcGNjl2BzXdOTa0SJoGAUHT7T1WiC1Oi/khftcC/eexk3bKNwiV9zUHZS7eCWKzEmu2JL8YsqGqkDCFHPHQq5KDIAh4Oo6BL8CwHuyifCwwiLko5TMx2GBr6L/G8vitBvuxDLnWViIviU87+nnVdAfzcf1nQl7ZJUz4noZmy56iJTtI3RnM6UmaHdRGoC+Uxxeav8jPnL/e3V19xTk8Mx8wwsdVqbTwP96VEIvLcdOHJlTOTS6/6yMbawDo169VClLZV2a5+bmNFxFUY90Wlr1RMQOpXFVJeo+eqyf4YmS+0o+8IKXygWHLYvVwA4OPnqgau7pZcTUvQ2pmP581+hQVRlVKOJKbKwtEniuuJjbBAai7bGYXZ7+PrY6HEhTmJOFVb6rPRPXVqS7vkKAxgOqNbm1Eg4fyZUmPb0pyJJHnpNUmSo8MrHg3HKVFra9vX561VPAK6pF5bZiymRxquwcA2SPD/oqkBeSobM1Bk4Q1Yp7p+nplqavYA7v6nN41qhvAxpPrMpmEBqfDkX1MDuU/ZGb85xH+1XEL8hI/FjVjFY3QTEm7n04NRE5c8QIVEfBMpuxvIIhVVKFkew86Qwa3iA5yHx1tIZqYM40rOgyjraPyxB7+xNVtnto4EzC2Kt/Hru9bL6X5RBThcHUT7RnyMCEvOLeumGXXx9FL7v/fFJzZ4j0KsnDuIGsFtbo/eRAi3gdxFe4tDcqaSvziFazCFcrcuS0M0TS5/Wd7vFBePm6CphPFgBma0jzz1HFG95eXGs8jZ0CB92WQDDCc/XvPg9ub/5fuT0XZX+a4iHc/gJJNzV83k8NgZGrK8nDc+iNMS+nQC5S7qQqxIOJR6VGzfGC7CEJw2PpiK+1WAEDS1nl14a+A7W0F1KRK30dbbUrziRi/MCbW8dTwXkppvcNWDF/iW9ejWBV05+FZQJku81yothzjW+9y9DXlW0GijRLnxdI7TJzmzQZomEqNv0kAnJPdg== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Xnx9iwmUTWrAOs9BJqnUp0yLtrelVc/BQRUtUoarWE+NfvrYBniIIPbfx+DNR4il6BT39OMJerF2J8e4pG2VKZukrTIhNZnicK6m8K3ugaQuOmRKsYv6P1XaXcECUKcxz6Q7Wc8IhnvCKCyWRvW48+83tc4Ikm07tbM6F7aHOBgVOoRDCH6uEMVWOrXw1M+ypaxTzRJy9PAaJWwgtI8aiexST3qmXCzjIhXgJm2k9VxJlVeF+gPrJIG/W+h59Usy/+1hPn4iKOn9/k+hILp5UV+kHjLPmU7B2DA65m1CgWy3ThOFMc24fJdbMXzxdk+EGNEteEpKaSSpvGyzJfrl597Pa2qhZDE7/YQ7Ux506zEj9zj/e7gYUszFMSJsna6TLuTrlSvro2boBlqpxoHHk0DjRWyQ/a1bxFXppRmPheKy9oZfOj0w7PqvK8uQRyZfp/WU1RUblkYrNx7ggVKhV9qFUrxC0AeoxVxvpCpSRa+oVFo02CNau35i1ZCNpp3eFvEtBbzP3uZj7i5rsjuJZjLwoyZOSrBjtu/A+rG5QQ1hLLXnYyrtPbYHcuUra37chZjVya//1x7VsOPaWvIMqwyb1ATctWaMpRtJAAqxXWju7bTMmJRtt5sKDbw7Mh7UzecmL+ZcmYmgJFmXhBT0itptroQgTkxt5kSBuDtqdoo/h/MutIZK8oG8W0BH+MKTyTRaVk4YROrDXQa7B2YeV0a2P3XXV3JDjWsowiUpCyFGvZ10on5c9Gj5W67oOktIcKrvGHzwRyofmVV5J+xqkL04z0Gu+AAbMQsngZmH8IZfvuOWV2+8h5teEzkeBZPuR60/rydM/aiizfPwZKmuVn/rEor+MbX2c9v8vtCwmWGqxdRhHqnHSJsbmrFwJkpnSaam87d8r2F+X5cSeQhUhmGKkDTk+oN0qq6U5xOiHyJMYGAechDW+1VOCGM4nxcmDQ/HkcUyIKnvmW7sen38bf+Wct2FGruFXrsnt+jUdLzkeGOt5uGihHjYGbe/dinFnbnbHaveJfB+7rO2RHJkLIpM5zIhcGQQ5WyDmCHuZF/Io+ES7MTsGz8DAmegzv/s5SLHaXBXvq1U8CB3+SwoPygj/6DUZ/WFleQoI3gqAbKfPHvppNBAYVLI3qQoSdUxrxAvIGyRsiE+/yB71G/JGOPXB9gDdIy3xvbDBbbdILDIlPtFWM8JPMuB0ibqKy6g8OKAxRRBlmhkgyC83XGM0C6qNmzsLyhE7jzIJnp9cEYSw42YwFAvThxvtjzkOGeF77qV3csrPWTqt84eIu/MOlCzpzuoXze5yHREA4iqpG7tePYNvvqgdaqQ+0Ep5RIOfmk+VocEgpRCV+vnelyOKZGv2yNI6wDybsR+5e9jgPErin/UWRtZAqBlnobz7CNU5WOE61zlBNMWDwpWlFU/Wzeh18La7qw8wCzVpZvScGkzqYkf0KodFhQH10fsUSa0/E/BSaavnD/zzeAkSIiqJdUVg87Q31130L8+fZnGyla7+z0SVqUA4lqIT/Cf+Nob7PngLbZ2ZZpCw+IhfDuY3S1FDQ19bHP1uyxZPL3vI1Txup+a6XWw9GZYUZBGcLZX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e3c834e-7058-4662-c29f-08dd0d346cf0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:34:57.5671 (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: lCHExVPaBot/Qnwl2NZnJXOoBrVqoKOf/Bs8IT8cjMaYVrDZ3YaY5zaYsUkDovXx/udh21aHDL5vVHsyrxMu9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- 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 Nov 25 09:33:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884676 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2076.outbound.protection.outlook.com [40.107.21.76]) (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 59D4C1922D7 for ; Mon, 25 Nov 2024 09:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527310; cv=fail; b=cx97l4gGDPGGiWAKdIIiWwNsBWuYVuRD2Wlj6cC/MfdBfYAXg/5tFQX/TeKeIIL4AM80V4ZshT+W70wE8p1zGGuYV2ZDD4dUimQ0WdPImhDcGwRX9+cFwGTOBl+bD+e5dj591NOKlFEh1ySVLrgQqEh/lnjzxdmSj1hSDpBgbZs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527310; c=relaxed/simple; bh=97k5GWyOnvpEop55UEoauX3q6vqIMOn79OTA9yH5kxU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=dIxN8IOnfTXFjuZHi/1avgmvwZvv5byC5jARb+VST4WxrruJJsGWJpmhLgfU5xy8XqT8Nd61qP7MaGD4ZDuEXWXXXtoPKU8IltH/giDuMvV0Yf3b0DZLxyoZvsjtUh+vz1GXJeNyhi3ODjLI9/iTiSkaI1h+pXIfv+90udXiOAk= 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=cmbUYNBB; arc=fail smtp.client-ip=40.107.21.76 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="cmbUYNBB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PjsQ7gJt2S1iWpgqK5o5G8W10ppXMtLOYQDo0HNnL/2/cPN7LC6ci+o9gW72NwOM1qRBEyjYPmYVu0wQm4UvT/tZdZp7gz5r5oyIrWR9uVsFchi4+KSui+/y0e1/siBG/ZB4PQ+teEEKrRHoMpc1nL+Fa7S0Wmw8ZftwGGsXHHInKzjHW1En5L/HPdVR+QjKuMSqUbfDuiJboDFP5iFZ21tFnfP/5eLZ1114R3PP3vyScMRMMMWK7GhLTh3pHhJbzfHu1ybGhQhZrtoKMU7Uxv4C690+LTfgi/uEl8G1gE8/RxjR92CfYjq6y8PjrPudmLCj0G4DIdn14EMQb2Gi1w== 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=ybjSntVOs11JS+86K+tTOFEA/SyUurUDzekiYH41EAw=; b=f8WOGI4YsNOPt/bix9ff++dZvNr2M08LTv9JsDp/QkWghNObAicfqfET74ndqtIiyTYENYPN2ICWMqs6VeAIC0Sr2PF782zZPE/78vSvgIN5T7U/a6fFfz9MoSBbhyGU8MfH7qoB0dPZkGEO5PsHdpCbxPU0Bq7+Y6DqNkh8wKX9uob1cg7BUUPRZ/TpPZJw50KJGrpH8/t7KJhaSYi6ycbpgZmzWMG6YJ/9segYZbKwGBWYQVZF77VG3MmxhhP3C79Z2Hgy5NauqLxpBtIi/iJRtmbjiqEDtxyR0Dbw0kvPx6LrDJP2K2CpV31bo6aD4xApZpJcJRcqRwoCXv0XJA== 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=ybjSntVOs11JS+86K+tTOFEA/SyUurUDzekiYH41EAw=; b=cmbUYNBBNLLea7m4SI5xSuasWCwclzgyAotcmXdDASJLz03bIVsNzONdp92BFK6rErlchCic+rCtFTWpdmorLrqQCwCXmGUnEUSXqlpDr4Tbq8VKFWIE4WPFQnC9IRrlWfzJJG0O8ZUbxVcfZLJbzy+zQo0QmlIu5/edK97GBKBF81534rhyZ8keNxv1Uw2ZKha7G9iWNiGQlkla1k0TfcwSvD7hwOwqfuRRlMrYxCQGz+di5NcDZy6kepLASEiXXt7/1Fj/1gw209pWH3tGYK8oE3Y4D6EtuFDlxcGxV97D0Toy76wFvZEhAabf5b2I+YhPZkM23fYwo7JYqAICsw== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:35:05 +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.8182.019; Mon, 25 Nov 2024 09:35:05 +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 Subject: [DO NOT MERGE PATCH v4 16/19] arm64: dts: imx8qxp: Add display controller subsystem Date: Mon, 25 Nov 2024 17:33:13 +0800 Message-Id: <20241125093316.2357162-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: c29aa4ca-940a-41f6-2fae-08dd0d347140 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: IIjCPiEwoBPgGICF69YLJrrTWmQte523VUcQjhfGFwwsogOErTLXWlXwRkm7FE0J141T+koCC5hdElDjZKlc1AtGa+INKUglwzDHu4+mrGgKMHApw8DwU1Vm+myiULcbRWPBC5fk7fn37zBfJRYZ6qPsMZJhy1k9xiLlr6xjvtHXAB0qaJnuUJKiOeIr5VQq95Q+kyzmC/wIsbAn41/j/k3lhR0qxRJ3j6e/+2lHx44H3y75YXw81ZowpxLuV7R+h3dwNiFbr9d5inlZPlwWSAS1nEn1+6IZEdtknNqjXqoPW/Kb3DKVHR6EXHAnkjLzW3Sa4Bf0Zxa0gNFbK3NO9g1XLcrvFPoHxqcRofMdG4lXHsOaYhHQFK2a+VGVBU6mNJipdEiisjME6Q/H92M7Jm8irykVrCILSYI+pzNRzxnmexuu2M4wD5W+K/GsLMrZKMWzICgI7oXeRId3762JsVL6ar2x6Hge9wBY30OUdy+EvqgS8YbvzrROiMp0M6b5s8O/5ZVvI8ILnNY+KKGN2vbI6zPvk6zvBhVUe63nescMMWMcmByn5dTH1VL7uJOp2Tc/xWPMsopF9Zfdbuq/+hGHPdEt+7J1Pev05sKdg0dKDjRkipn8KDNLr6t0w2bUs0k7ZG73Mz47HD7yW0cSZq0BQPGTszD8+Zm7LfeUdpsKrO/9vjC++qvPt3+95H6HCVyQBIobUQFu2oY9LKYe2y6uAR93mNBcV45Fbu7145q49om2JcPClnpJvGoI3/E4UAfKzfw+R8B3RHslskrZx7GeJZYoF4VrQxuFtcJwG/gKu89Mf/6qc87brVwD1W4FrOS5GNivLXYkjg4mYFYuFgcSbHrbK3aZBhfkjpb9Wv2m3WqKjBUukN5Qavh2rqNYOU0EEJyM+HffctZnL9mFG+cJiLxWibXN9dU0gP+xBbAdaIlocuR4SEVnh3GcgxN03O6vLREYADORQkqrTNjQyjRKM92tGSbn9w1XaT/Z/kXhq4DJ59/CeXzyhRTjBI2Megp0eNa+KM2oyYIBB0iJaFY26KawOV2LFhmQIlAxwDxN7zM/eQrWB34Cp8dhPnkCRjY8KKbH8q90Pc9egC2dq4HeWBj+e+7wczPRQrYxeDz6wBVyO9smPW/yFMBkpVuAH2zmg0Rjoppt3l6gcFxsA8bXGwGk+uKCNrf1BArCffFNDj6pL7m14HTgJ/zRbJ+tkuCGpvktmSo14sROfw3oHwHl4lwCzsGvcyoEFIB+SJU2NfMW07CRTgomd5YvkT+I8950G6ig1WtGVJ67zwgNVVAEqJ6Kz5f7XKCRyLpgnfLeHz44ISzIjq4EPj5aJ4c2bnuw7oF9kpzyXynn9k2vmh33MfmQqRKLl2+yizJLLeYp7krvtBZNyXF25ENocnnY5DmnLTRbkmFBn9VJYp7htA== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NQCWyOdWur0qGk3eYRiYnIj7a/IC1lK8Gv6aQGu39HVWfdEEbQosob6eOINhjpvW/XsrQP+oBYiQ+35KZYBGfzjujDNwpQaT4ayO6IxeRBTeU7Rr4wKbtROJL4oBzh52IqcOnwSlmWgqRRkGiACjYxhSkJZzp1GZXfF2aeyTDOfeeUp/ORh9m5/RHSiOkbmTQwZxlyO9joKuOwbA8XpqgHZPDwgT+IOg023m35Vd6pLtQXadPihvKGqRrjQSXMYpA7NaI9jOoGssPHdNGd5O7BTHTHfqGPFNo3PLeOjTqXpTitw/x09taEs7enAPHUbJDyaUu+aPWGSWIRo/CCGXrmD1Ga5uWQ9VGyIcIHLT9+DaJyMmg11Duf2YDa4mt2nfg24FSq+viwmfM0nF9PoH6Sd9ofb0gow6Vn+m7Dhou962RZUBS7IIReqJ3BFhsbqoXYYZYd3sk9HMSTto+qa9SQgg8qQB4mlZC0nVfazcSsluVksVwXnCJXTV4djcD/4wNgFicAhXV0Y2LLh9MhOaMars0lYKtGI2c2VpsqRZ0hDaFUIuObEKUl+R6XHpNIaz7IGG6nw3XERsFTW01GwPIutNj+yn00gE1LykTLQ0SjXFn8aFVhCNXG6n6rozQdTJxduvYQD/JgDk5xdfEpdxIkOC4GnRXCYP9gvHrDFAjQABYLmpqmW5FPBygjuNLW9Lsz0eKaNdIaObfAAb9v4OzBHixnF0zofmP82/qcHRbceQXActk6TvXG9iGh4mKLaA0pCXOb8fJZPo4U89Q7LhiIdd+hqgWUf6yvV8r/G5+eOfpFKpM8xteoVTqgr5IdBo4V/KKtFFsrmiMwb75JsQAvD+IPKZSx8dYlLoP5ro+CDAXhUOZjSxNou/XzWwecJY2QyQgO2UEVFF4N9L8NJt4JcfXa+jhZ22XM/uxb1eI3PoLvaIOWiGFHDHnjHH2/DY0m3hJV7KM56K2E+FXF3v5gUEQqRX6nNKLxdsOlSrHcUiPihQeSYzBJRhBOYI0tcUTHjl40el4SMdxxLwiiixLWf00BXGM9H48hW2H/pTpzvW9kMQCZ9hsezTVN0jpedKp5LFx4tCH2SuSOxXwkOBBx/qr+grR9uLn1l4F3XN7ufwf9le/GWcpAayjXfTg65xmJYMJrscvqyskGlupBNGT30T6qVMCIy6gETRNes2xFr/xWbPjlyVJ9291Y4ePYg8SC6Ulj/qt4qV9/v4LQXUlspcm6wjZ4xRSRqx/TzdUlYsTQNtwdQpMuaDj4nuYfstkr5F94FNjuJNK8a3uDPEyLcA6kepQ1+lH6cTIDW/Qvx94U7KCNI5pqtyHAe3ob7xWIgIVYJuMvw2RblA5FXGYPGpsP6jiJNYuO0hMWLeSIzQecxRm8AX8oi4AfH1z5KKUgTvZq5vvmtaS0alIRw44jLJobLqJpL9vuj2vvDo2Gv4bQXh9DkmG11thIiWTspw0ho4skNq37FFAHHpiyKNiu/Q654pregeGgzPz5wSBHmISFF0Rtq/0u8I8ldCcOGQ0q8EtGw4fEfzBP7hC1ZHjG+L0ENJp4jbNxZhkoVBRmh5gr5gVTATbROQZ3AFX5w6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c29aa4ca-940a-41f6-2fae-08dd0d347140 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:35:04.9860 (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: w59zqcJjfAbdcPWD7gKMTKEVx+WhuGkg+r3LoKrYu0LncGCd8BTSuYbMhZeL0RmdBRxL6R4Fgw/LQ72cwZlD5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- 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 Nov 25 09:33:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884677 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2052.outbound.protection.outlook.com [40.107.21.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 AD89F1ABEC6 for ; Mon, 25 Nov 2024 09:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527318; cv=fail; b=rIotPNZWop7hGE5EmwL4hwWBGavRU2Oiwf6p4wJ24h9zh5GAT5gCPFCxe/W4Oso/3el/q0r3jzgwfUIIyNBoEJVAZO/VxVkXLA/19rV0VCX0R0x63Gt9KlUHmGjzM4oCfDe+TAzID/kl0Jac2oGPFCvLhx3cP1YA/65MbqVd858= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527318; c=relaxed/simple; bh=CIlhCE+T+EqOVPD/yoMDpTGrK621bGLO2r3sj5fp6Bg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=iMsA+LSgrdHvSepxonCF5XTm0zm6uD4mgH+zpwANgFjaZFjovUMZhhwv5VmaBnfvnpPEtV11pg46YVzIJppQ4MC6dP6yfxS/+Tj+dX9efZDq/sxHjk8HG1KQ21FIgi868zsXL6X370XGB47l+xQ89Vq1/gr5TWKwDyEqH2Rspek= 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=isoAAVsg; arc=fail smtp.client-ip=40.107.21.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="isoAAVsg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=skvxkUTn/9IySCvXX05OWLqHjbhN0MTQTXhxCPM6WyCEJ8Oh1aktFxPg0N+5AAXAzfef/71CUw4lwrnKABhPfMdMcJcS3Xe2bjuTB5wh/zZk1oIc9Nm0m3FvGDTSycmwrJgDW5kPclWChOa/AwTP40Vt3lqpQrKJW7v/Qi+sFrY0Wxbd/BCuWuHB1UTJzPtuJYrBo2Nom6fOmJDHB+EO5mNEQZ62x5conK0+t1PaDH+98SeVgWqIKoftSvt+DExW+s3JTHOlRIFOEaZI20TWHmXRmTmxvoab0YiDG1GJ2On3fa8FnWS04LUSPAL8hrg8Pn32ogecWgUrLjcMZJYkzw== 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=I/VhZEPBoIaJ+QqSDmKmNhEmPSGdCWPx52wcRoAdGe0=; b=PC+9m3cB7kT/kMFAtmPHQDJuYZD7ASHLZQ3KPofkU93KWybdBE8Ndo+wmoFJKRFlCb8/DtsHMVtQpc9CQEhD3bd/x2kLPOTF5/L5CaWd2ViTPod3HbktqmKiMjwIxUHKspmHKICgFY7CwcO4jGQmya7tODfM0Whr1AskPCE44VnSc5pILHX/pur8Ynr1T4+BqVl8YD/x9DLQED0SRpeY1Bq2PwxhU5bPb+sIbOIuLyRYrkOk0hZDlt1xkFT7bnmLh57/KzHQA1cwtQPyoYdkFPKlnfSw8B7EZ/dwBjZ7Q4joFlKjkI2WUE443PcMNCHjZmOY8bls+gmDY2OvrlHM8Q== 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=I/VhZEPBoIaJ+QqSDmKmNhEmPSGdCWPx52wcRoAdGe0=; b=isoAAVsgPqGeAq80mb1CLQDlO7xzg76PnHqHOg4+wXn8i4IWoJowSVvHG0nTnKaNKCQqgZwQN6RuqSkoZ4aMIFWDDDaYm/gxiqYmJhClpOUfW7RHZVra1aZGfm7KwmZA3uxLtRzdhpCb08lPpzGuw80tXT8MbwOsNCyyUD/HBVVD/ZZ5RIs4cn8CuxIbmZ+DVcaSYoPLWxaJeopc1rfnvn49Uib1qSmrUNKMdCZbKnfNoV53N/q40Q9IwNHewoTlApM2XRgEagnYyBTvCIHPSRJjtd9Bs51SrOU9gxJL4A2+SHAmC0MQV7NNWrBkGlEFkzhlO+f8GhI+hAq0v0utCA== 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 AM9PR04MB8384.eurprd04.prod.outlook.com (2603:10a6:20b:3e8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:35: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.8182.019; Mon, 25 Nov 2024 09:35: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 Subject: [DO NOT MERGE PATCH v4 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Mon, 25 Nov 2024 17:33:14 +0800 Message-Id: <20241125093316.2357162-18-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|AM9PR04MB8384:EE_ X-MS-Office365-Filtering-Correlation-Id: dc017914-52e6-4486-1841-08dd0d3475af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: AfvTrplM52GiNXEMAUBTiqFJ6JApOn7pKWvHQACRu/iw9v8n4VuW3GGi9shB4VpfaeGjRXOLpULMs2Iaf2FmCYkYFuKqoN/3OrfEJxJcrMgsUYgqhVzbVtUWFUM3Y/P0T9mcCcPS6j3SNQ+77A3QiUBtzQAMoIXJ/N31I5ZHI5pclUmpr0kq47Haax7oLleu/Dsg1ftqfg639CkEzHrUGVhfQpQrkORCX6zCV5mpHZci0QfSdet2pSxsVRAZqNLlQgyIeW0Nef17DKngyU+HWZHCjurooMXpot7j/KXXjragYqsdp9p0ceaHaH/EMeZG/HxkdG4zRT9yevRuLBh6236EjakD1D+qOfIAky/UBffGuvhh9klZ7j1U+z9znt2CQIZPdRZXuJ25PfeGfglkvJ2dyvOF6oj/CeziAYeuisfkL3Iw60sGcWTffRiNZYVrvt5GyZf4MrBXZwbe6tenA6un8SXt4a+7l7tbsJFIqoj4K4l4e6ox7ZSySq03bEtCZ7q9QVHWjK/RF9Xfj73LwaNwuLlUb+IEW+LTRYAdnXWikPVWiQiNvjNGATi02KqW5vCaBX7hXJAjgwHqUs60gYGnfYr7F5eaIDL6QZSIx11s/b+TqgZ/CmWTqv4phNfW/whshjawXgdX/5npaJ34qJCcnElgdF6bR2BxN8r8fw35kCCpGWmr3joSuP457D60CQr/fX4v/YSV9bjiMTekKou9kj9/1hSlu8NH/qlezvS+hmcBcSR+lE/u3yJdkMRWKN9fci1GmGj45NDGavKG3OxkAKeHExB2v8LGfxqKNgBU0L4W01mCUqbocjDAn+OKdsLKWpxG8yqAYyYwOyAk9QppbOfBd1Jq3leyWVcfIYg9y2ZKeCUXAGNRS6UcVxB2UT3JAkwk+AYeCLMw0HV7SJlK6ABLz2Nr6zls+LHcrBBuhqPOc9zgRMCpfDCLRa5ZMQPmg8vmTCVjbG8kFbiu3R/fi3INdTMZugSx8EL2r6xZsPhMAXJ7r1sjN4WdCCG/uYo1erkORHn0Pkl9fXbhc1yl5+1rGNYrG+VSQmnKbPd3hdQ13dVZ8i6psP6bM0NRmISc4mHDmHS0slG7ulKjKSvcjJPa7rnWZFcPhVP25jexFtUiG12ZAatF08MrKLCFC8RWzwdtlX4XGW8CA6PiXlq69g3X1g0gEWL6Ow3tWAYGGRABjZN8YprWRaA6CfO4CD/Y5Yk/nfPQCto3wWn/bJOIOoMJwqt03t2L1OQ69XDsn4EyLDIH44E4IWCtZqks//ar4Ltz/vf6+Khkx3NAJRKV2TJmQtlUfXtCDOuI2kDWr0E9+7Fp2TGYNm8wOOiBU4J1dIzqZFGe5Euw4NSdli8qnw1XMKWnIAuCTF+nZyw/XBToXtxRDzjAAGw5Day4idiyCdqj3WpfCwBVmGWAEw== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bzAYT0xETkhxwgI9RpA10bJG6rkTn4MlvJVVReVWXQHyj9lOntG+h8ZNDadQEv+t4RhyfbYWI5uCDzXmX/d75LopumBOBF1Z5QKYX86LAQvxz3B3eeg6GMy8Or6LhXae1K6p9pcAHSdH6J6/c3/LS5K9ZENXn2mLXOoImh1QMXhkdk7xYOOSXJsNmUgDlnErCVYYkBkTazoahEdEoJFJIvspw52kc0hOIvmiQTyKL1QQxc/XDLDFq2qYDk1g/K1hVtumotyeMDiqhRUzpo9knh6JFYVqsVvdTYPjPTNXf4+hSTMDvuCHx3et2hxoHRfmqHU+xy/4OIfHdOcLTwpQ8x6hMjKtp4uWNDfnxH9Ht+4gIVKRMjNRETKv/q3vgKtkAfy/xon7mGFnGItFb73PWDM275Ske814nMuY/4avnsnrkbw1mvijCsxI3j7FRdamR1ayH5AVGYoFm0gqGb1AWvmVGwdND9lzMn3bXtKvhFtbCh0y4ASBkomTEOEhC4kvkOY/F4nYGTok1MTvv+5gVKbXYdcoPeQeT+/Q77ycgFvqqT8D+usjCxCBkk5LBPgZpJmQb0SuRU8I5PJWMk638nCF4WEcTF68TH+Mhklr8FnOO7eSqHtu98WDdbPvE0mrAfhV7hM9ajdDc7hea2AR+U2795ZLS2XbcQeBgj337kNph7mctFdH79oFOKf4b9tnRJyteTVFiVQL9WdfexbfhxQD07CyUSNLgu3Tn9tftENsIyUf1vtzbQPPv6zKWrY5P7PZGW7HCg0za3QzHldZ94Hr6V+heBrvCUO0qSHzbJrQoDeBIxgP8KHG7Yg/OekjHdA/JXZRwEDYmqBfqaeN1HPoZ7+HRDN6TBpEojpTzzzhMD5OMG06rCj6RTgm0jOIxjqB+09V5+tM8jq+8TOEvr0GmQwyKaYTaGZZ9z5U9bSXvjsEzYpRQD8tq9OtcypTwsRE68n024a3mSypjymFWDOSwQRTkHEKkdXcF/2D4ULCe/frfzwGNtYEqRBgXtKg7euZiEC3fhAOMnSBr4ndwMJ8riwqvsBHGqr/UnBQMx6tRhitVjzFn/O00ceM2MNbyluFVdv/9vaXg4aL2wOiGvKpf/+AWFizZjbVxDw5klTbm0/OX2L4Rl2lJL7dqB8dK3vRd9gWIoXzhZmvRvrRXO0FTmZpi7VbHPahyRBmVzPs27+eagSom4Mbd1P6s5tTMJJlKciaPFwqkHZ0bIpADFQ/RBt93bKYYH9sQz7wwpz3kO72a7cx9fF4vbOTJr6StxO+Mp/uuWqTS+Sc1xaxC4htt/z+9JgYFzHLiQUna5K4SezfJmMhjD0cHhAheLaCT/8XcT9s0HgSh6paWufJHPqqj5s4ZFR/e/4+fuoMjaHLWyAflGftVI9405/BFL/g6HOLT8aLI3L/p57GPi5T0JEo2psDI1vJ8G5TmqpoK5V3CwPzS4MNjory6QcBBGPUoWtunSOjfqAe5DC3jZoEDtNEwyVnAr/26hKGR7/+ImwvSqenrbGAZTugoH6ufwOZ0GpE7fu0AyJMKP/SCoWsHMYaJq2b57fT4nwkbLlgnH0uUNNYI0bbFTjlV2XwROCy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc017914-52e6-4486-1841-08dd0d3475af X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:35:12.2574 (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: /Us3Xj8IcpD+JSsiFZ6o4aGauC0UdwU8leTt7fYr6dPVbfp0N8gogiyh33aOHjrp3trRHW9WxQ23UTKqk30aHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8384 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 --- 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 Nov 25 09:33:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884678 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2081.outbound.protection.outlook.com [40.107.20.81]) (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 7EACA1AC882 for ; Mon, 25 Nov 2024 09:35:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527324; cv=fail; b=du5csj8uiwtlgbfdg+56CzyR4g5vo5Cf0p1/5/1ZWOPyv10V/6ir2uOAqUgkHVVFmzh9Kg9Iatckb16ekOxHF1zeRkB8FRjUNC5vYeCd9kKzVD7lcgTqy7CBu6aaVfuCuivMs3NshBUCsxDGMBRlZ1Vv1BI2FnrfcD1jEdL7d+U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527324; c=relaxed/simple; bh=rljyuqGtr9fFZc3tq0rPDuDrkdrpCFLomO8LTe5P7jY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=iXx/Jwoy1bm0RZnEGOiEj+z5/VGEd6zN3kw1vkxbvft/47R37/XnDmAg21cEj+bnmIdSVf7Mm3FRo5syuVbBDonazXe4Ob3xkeyiMkdHBDnOxXIr5GSQVHZkpnficiRcnAQtapVVrTWLHFUvMCiNeq70lARt7z8SKMXnKHJsxFw= 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=bjS6nnxl; arc=fail smtp.client-ip=40.107.20.81 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="bjS6nnxl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Jsqv1LCnxP1aXxnESxrFVbK7Zzjvq8AfefhdQNLDqSH8g/rxiCFg5V8Fyg+uXFvmvQj/M1P1RygnNMeG1B85a6qDxU3wwS50iOI7bLKY4vn1hrU/id+r8e72yN0yjWWoNF/9oWf9V6Bp0T2tljJwjEhxt6OgPDS4kA95P6am6nS5QEukslk4TEcoqdlfwPHGUBDudBVeZcOQ9VtJZd1q9WT3+2TVzg5cTITrOFyaEkK3IDxGEbxq587005oZm39IKRIrIEbtUht3xeN6Zo+tSkMG/2FsEcgf8kaVwcJS8RLntN/vn/H3kG5IP9vgCyaBXWEtM5tyUHOwLBxzCgLanw== 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=T0/DlqsrHwJtdwJbUm1kInoXl14XLLppggF+PBhSObY=; b=FqMCx0BFNYelOE15TUG8de9vFcpKlP/Eqh38nr0DgBjZDHaJfY3mFf/fKT0P/2pR1zZLyxcYCGlQO09a7PtR3vnY+/Fy46znbBj/7iNUVdJQURSTBmdurW2awdlshZoGGBPQIEdcVGFYNc1oEie+SxUJH/iVmGQM3HVJhQa+joTuUk1b+pHgcTLA7602HA4hCqQPNcS5MSRx6EXIB1jDTrf03hjI1ZvvFSIK6VMH/LowMB8mEd8omcgvB8VmJkvEBDBA1rtPFpQM844o88q29S6c8IMKecIXZpdLg8b+1fqPiQr9iEdwhQ/N02IyCzD97//4MCF3u36F0Qewk5a0Og== 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=T0/DlqsrHwJtdwJbUm1kInoXl14XLLppggF+PBhSObY=; b=bjS6nnxloKn75fyc//Hb9c939oJYvpyvaBN6eTtTUpCFMalYPpVjkRJxTTMJlRFPPmW1Q6/YIqjfzu2htqiYuKwSMMZ+9//kQinGiEySsei/Dy76bdAhXFUuzv6Z+QuLb6XEKYlpKb4/KGPEKmEzd/SbPT8NmUxgMCV3K1/Q20vo4xaSMoPzLTCKxTA6OdVkrQMpHc6Y73JBKmUONm8SI42xk7m3Hmw2Zt64m5QFeUE/XGbsQ1xF0GH059+9eT8OmcpgSMHOr2EUaOy5Tff6NlSSlVeLk1R9N9hI6hy1kigQQGgI5P1o2yjyKZM/sYCYsjnRaeEijvzV2kg1VOObWA== 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 VI2PR04MB10930.eurprd04.prod.outlook.com (2603:10a6:800:273::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Mon, 25 Nov 2024 09:35:19 +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.8182.019; Mon, 25 Nov 2024 09:35:19 +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 Subject: [DO NOT MERGE PATCH v4 18/19] arm64: dts: imx8qxp-mek: Enable display controller Date: Mon, 25 Nov 2024 17:33:15 +0800 Message-Id: <20241125093316.2357162-19-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|VI2PR04MB10930:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a1a99a8-6085-4038-869b-08dd0d3479fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: bwdk34rD+im6dOJB7rRfPVlFVju9lsU/uq/OrA4AGNJOEAbFO7kW2qmChjeHha4/V3N6ZmY65KpBfme/XGqkJjMn5MT7HVF1m0TBm7Ys/a2pXRqAkHBAJq1tfAbBrAonztP0CWhbC4kmnIj3iwtttPW6kjt+an78rQC0BWlbkoNWM7as07oaYGo+xwgXJWecer8c7tFXr1JR5ZKw8Xiot3HWTFqll+PsKrAofRMw2pwqP5cjdv2VVYn7fdHDHlXU3NM8L5EwnXvUKe8AgfswTmg15hronMe4orjVFrDXMymIDLvpho8AgEF/j2mtVVVdhZWR9uf3guEHQeoyUc2yoRgjIT3aGafWZqoKGMXLhkP0yRMrAFaldX3yqCnvrmhtibu0KPwyXejmvil0oOZOrMRxcMKzmcGXDFvXgxXVRYfnQXb51jdguJ64OdDzyLTtVREsMj2FCWFYYsXsdpRy4zPWJRCilz9ieP/5uELKX/d6P707kSnVW24IozLUKvP2enDoIfZoRtpsUjrN0XVAtR7R8pbt8r3SugsRvBUjWo+JYqDLBQXovzAwMQM/jHxrhGMxYRhHf931UPbnupKbgaamUkrZB0Vz9wHCJKQP8CUkHjAAGiTnTjlCsIra/6nzjSklY70a77PxPEnG1qaB8D20rRUDwpRXVim4m+eo66TLMzf0uxQddAx0S6a4O2hc4UnrXUex+rXImVLZRPgezVAdFGOu9i4lSS2KyEmzNdCOI5Zx7sGO03NM53BmBPOXaCgT/a7sZ+2G7leeAyTVsFHW1qX6W5Wz6Ssb+bzys9WtEskdN1Dukm+S/bdbbxJm+CjGX6EwmGa3NY9hywjKv1AlICgfUB4utAHJPnKMcHWrthx3TNAQggpBnE/8uOiiohph/o6muZfxUlZU5xuDDibdl4sXwS7Xr2ssa1Og43BGDqdPkUW7aiYCUYP3Yr2oY2BN1k3spiwqf+KZXIdgFhzTV3tr/87ETO7Jkw2GfQgShcTt8oOADJN3CjGz6NqRseg+SpnWNDCLxwCCBXD8YD4pg09Hdvtc/xbQ5bRJ8szTC6ohghsSKErlM/QteAZlrCQ0eW2prDObLc0IKLgn+HOC+H0K8PrSYNvdJH69UcaDNxFyoHhQSgJPHhFqFpJchdpYFR4OFx75/Hx5Whaer9QCJWHd4MtYZ5RzJ+KEkEROq2jrIfvsC3FlM9eTONEq14Ifq+zN7O1M0hDCf/A66QU9Po+UsmiVL4BO8seta+xV4HP4n/xdG1G3QEfc4TaVS+WxLH7tImsDEPPQoe4DzCErabOWy6nQTLL7C8sfLdSRTobhF/rQHwSEhgirVsB/vjAPzdivww/9XL36reDvl3joHum1oaWtKEr0QqD8sBbVD2GqnsAusG+sZZHWAytwV3fBVjOkj6hi3pTuhbZnEg== 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)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bNRO03tOor//Wt29sNBdCEQtpJDxFjb3iBDizuOiBPsWygWtypS/jaqwvDMoeSBXb5V2wNKViG0dicacYj5M8KZ28l8UlSkJ4fq6IzKcf4cjcG0fRuKbwK1L7DLI6z+++knY+wlqQRN90laSuIWJYukypvXJSCEGdh2T4aULc9Cw8GZdXPATXQeOe1katAY/iaFF0gqw2EzWLdP3YeP0NisOSb9n6mMTeDk9rz0sCHdbL5fg1gaSEL4yP3Yg+Y0tpwUpRcG5BtPEMgTtE0FVkN+Db1IhKpSdXomvWMsihZ+igT99c3whT/Ma0GqPVqWjQABA6j4WqaLoO+Cb8cYCIJJ4CS0ewlXqi91Z+yHdJ473VcZmEavhL9nneLjZndXu2zky06mROnOsO+O6+lVvveKNzyiq36deKg16ogKc+f5iHMedCke9gVHwz9dDWxYNa5zV0QCsY5H+oqkhKYUBA+zzqnYykpPjNTZ67jFq8pSOc7XzpaG1IyXqBw5tjjGWa6eBNmTEsk3rsg62evl7LWociHBxfz5G6BOSvnvON/6hd/oExCIRzouvFdcQ+1DlDLu1fdjhfA37N2c8rno6+Y5oYyLss9vo8RiHeNklZvwYrsbgVpPAeFjCuCdFcz7S9fxmtB6J1CCQ3Z8rul/D94gxNL3o6mNHXpw3l6YGlcFLYdRQkq/GoTkWifOs8GLeFh0ZkVLMhvzIk01LDIOtmrcw99iF2Ugb0VYZ9naMxQ0QqDNSvehfPdzaVlXL0TwltBQFBWLl7Qo2hrzjn725YO7Fz+5K1kfmCA5LxGLTG8xsMpFbKTBZZbE47SWzMdWqhXiuIKfCBngmKDG01UHfnT1sZ25rhGuc5ovF6lYkLkn2f1QG7GdpWF7Ygd4PxKu1/NrLZu/md5Na5QqjNgvbHvaHsB/bhlbFvaD0wDRmfHcpET8jsbxkqsF1sDOqGyBJw4tglJ3O0Qt9T7/2f+HVtO6gmT0sYVDeaOr8oXrE8NT24zNRHUTNfUoySY8za+DZtdiJtD9tGlkqj4mDzoP3rjFsPIsgohELbJNxXI6giBY9zM8DD9X2ECJdZqiCrcNzv0uAfHL4xNd8b4wkn3Hj3CNIbE3XZSMvDIE3s6qoDF1tp0xXY0mpUYNFu0OEF+b2tmvAqCX2rLO9jAjiZJDoO0wcqTF18u4TQkOv+Ta/dXEWEP4LmQR5O+CW0j0CZ5PNQcODdc76a465/i9VL138Ea7AD6UZdxyLFfUT1KCj1doTYl1mXdjmjWbDgEsldst8AeyqiDkQh21obK5E+CxrWDXAN6LPE+sAmHiRsr/xaVptR8CLYUvtSvHkcJjzPdE2uqAkTriDf3uRYCecLI+azA90GQCCr7/kFsvw+QmgKa0OKyZBV7iQLbKz/Hf2kZ4nGRJJDDQVbNyR7o18TuoavuSnEaiCLYH43jEDx2I+M+5tUp6I3kuWTtNIpDie0986csX0UD+im0pqtm6us0IzKSkog1s1eew5bMxpTHfxlsTdfnA0DWqfzo9SovBdqb0Q1yNBDO5NZ+FnUgv+ja0H6dL2ViEwocXyfMILw5lRMyHRrJHJZ+dv9+oRO7BDsLSe X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a1a99a8-6085-4038-869b-08dd0d3479fd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:35:19.6426 (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: iyBukiqppE8M+9as/NLs7RdeVmCdGtwPSa2/DT4Jhrl33EdlwqJGq64QQqJKzolKVBoPTYu/gSzPY4r+sAN7jA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10930 Enable display controller for i.MX8qxp MEK. Signed-off-by: Liu Ying --- 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 Nov 25 09:33:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13884679 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2067.outbound.protection.outlook.com [40.107.22.67]) (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 C6E1319258E for ; Mon, 25 Nov 2024 09:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527332; cv=fail; b=X1trjiXKJh+QPln1pRW1K/HvQgJVXvXOrhVNADjlTdalur+owP6+qlKrbPWiB4dic1kKhJzNfbGsWsILuO0K40NFaHceUXhqg+Q+TgNl30rFYpQj9KreQ1v7Te91EluGxsnF1UdYsBzsmLjXOef1PxWocdbLE0SVoWTvfU419Vs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527332; c=relaxed/simple; bh=0//Ac5mIoLtyfNFV6gBPcUrgkrLVHeGtygx4RkzlR6g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=rv/2rmDd6Ijec3tOQx/8qI0h6MWrU51fbPKnOsvlVO037qn3gqR31SE5r0B3V2xK49dlRvk18Xg6/sSx4iMXiIT8m5dWEwOXVR245j7864HqPNdxDQkKVBxF1GSYuP0ExclTxpJAGTTYJ+sKZFsuqXiZJ4TmIgb3SzgQSeOtxuM= 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=ATPq4A/N; arc=fail smtp.client-ip=40.107.22.67 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="ATPq4A/N" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EldOVN05nDd9cbi4BrOBzhS8lJNxmO2QmFt42XYoBVMVGhUT1ZUFzqktepFbqocB1dFfHsEfLZ+xIH3djqsGm1KPKS0T/PXqZFlPgWgb8JIRS90u4pFQVoqpAaNcsVK7afntAgAs3QWeRAmpKceOEOJVBD16LeeTrML9Hj2M5+gTrYJET9khBFJbZW7Z5Z70wahJFHD5XV0OhrzsYjlVRAXmliryrpiQTK3Rb6aI2fQXnA1ZFP4bfTNXcVqktN/iAjBwETecAT1GlFX1xkB+rEjZRKMsOe21x2NbXh81baGmidSxHOPjHzvWnrlyycjPwgQ1XCWIXut+rYIJBgMF8Q== 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=KlDRWuyL54wp6gCAfR0Z30yGWUbPwOprkje730daaMk=; b=QdWXXsbF+uIF2Y/lS8QY7VEmAA3eTpkM7yoN5Fhzhy1TWTd6TXNBrpZXfgYkoEXGfc0CzfQsu4PzOw2CANwCJPYgSxS5gao430lv41ifTE/0AQPdeGJeYCcU+npFtxysPnQ6uqL3XK9PFnUnfYoBcnfE+f8rZ972h4Rs5VyKqZBFzgFltv6vKEp7xEe2WMA52o9PUvqe5X267ZJiuQV4ZiQAk97F9Zd5KDk0IrbotfdEuSzorvBPM/LdTcY7NC9diygXiaBa+ePaZOnyeN+9hr/qkT6hgR0IdLm/quCRrtB8e06dteCauxkTsYq5fmzdRR44l7hxJrDVNkdrxByLjg== 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=KlDRWuyL54wp6gCAfR0Z30yGWUbPwOprkje730daaMk=; b=ATPq4A/NwkMcWbdLLi5PNZZw8S0o4m2Dxi7/ohWQsocIMhHZuryNf5VKJV47QRtljzoz42OxtpBx0VItRa6hiAPSqSnVrXaV6sPCi7G4bu3ZDObjuZxbMxnN8TzQYyMBEozabig7lVtErBgsfwY+lE7Rv6Bly9RZ0R77OkPs32s6YkIDmZoJxXhQD1WoqcutV2xH7mlRRRPvVApRSRJp3YV/nUaTQtRhNDg0WO7PkghHn41ljDqH7zOVBHpM1AYmG9AAXO/EdafrWxKMeNE22wTK3auZvUz2/CsJIk/CuTccGGRayi7k5NL+nHJLAz3Kx7rUa2f0XfbP22yu/TbiUA== 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 GVXPR04MB10754.eurprd04.prod.outlook.com (2603:10a6:150:225::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.27; Mon, 25 Nov 2024 09:35:27 +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.8182.019; Mon, 25 Nov 2024 09:35:27 +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 Subject: [DO NOT MERGE PATCH v4 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Mon, 25 Nov 2024 17:33:16 +0800 Message-Id: <20241125093316.2357162-20-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241125093316.2357162-1-victor.liu@nxp.com> References: <20241125093316.2357162-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0131.apcprd01.prod.exchangelabs.com (2603:1096:4:40::35) 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_|GVXPR04MB10754:EE_ X-MS-Office365-Filtering-Correlation-Id: 72f34ec2-4113-4919-1f92-08dd0d347e67 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 4/XeDlgcN+schisSfs7xT+rwRSSypRJ9LR3U3C/NdHjX1L76Xzb2dlGItLLvJnkBczi0b9WrP7aIehnHDyTrvbJoXirebAZLImbjBMa/EKRzJVfVQLRw4Ez7AnXl6eSbrqSDblPhbgp6FYNnOpjP4h9s/l9WLi7C0FUi4WvoQ86TLBPi2kkU3F3J4dCEBGN4T1cJNmDmb3AjfA+eK+xDb1zz6KEMSUyALMs53/z3hF6YlGjoonNTe0M+dHXLCLYF1tTdPvhk5CckxxySZGGY4fowzRXiX79EbxuzHRoLHp2K5zi7yGA4pxtdalb+os9FEapF5klO/ECTg9JrMBVAyxIaf1sqIIj8kbylGvkD3Owv/+hPKCzsXUq8ufRtmAqcE8cwxstmmPzoTNI8YJ1i5gPO4daSZn1bnHAJpb29duqNRhff/ecJRMCN2kT+9xL5EgfJnW8tEPJOv2gaFQLZo1LjhVTbUFtXwQeMLzbH/UFIu4JdPo9PtrnHO9dbf9qYAudYMMc6MgM0aAsPNlxGjJEFwGwO04Dydwfoqp/Cy2fmjPKYa8sKquJj3HXKm5PqQ/zHCDnW6JvnhkATDgIrXBJrtEpki8FSYZgMutbM2eSJ7tXHd5yt1xY/QlxM5XJy626zF3Nbb8iab8AQosmpiIiX/Fw/T22tgtRQbKhVFLhjgqTTBvq5iv+LjEC34HDWIsgoVGCN4jaBCR1tkHLpZzgfABdYUWY4Ppz1urWo/me3EXnvwcj4LNB0nWqW2zk8muAtrwbtAaMHElEfGeyxS0cACfS03UBum6aQ9Qq7ayUiAgrd09AkRzruqxndcOw93ra/t3Eq5EmUWmOhft87pBmNQw9YRGQgbHWbV9Ltzi058uzWVrCpVtAFmahiNosatCgslORtlTWkRIMAGUamKkr1utqPJvSIhc9pBLcr+o/LU24grG5+FivSShpYmDMJIR0FN1giKS5gFscCwcxVkAhTcMwBv/VRPluNPBOcUjPh8Si7Fm8MptupOchkKy/lhNZ28s7HPcwXiIOVOF9TeI82gxgc51TXXMTmuPRun8zzzt+kMbHpz2Lfqt3WVNcNGe0BX44seiIzIadxiYDXhGqrV4CEaQHMJEN8Ll8jwA68Cy7T9JOt24oc5vLgz601DVMcBqTVxSxZr7hcMFUwTcDQVqWFM2NGto+qBdnMwGgwPz5tmUM7QjLg0bfvU2eNEgN8NWtgSsemELwcEERGWP35gDSeouE0NPWE/CZ2onL+l49G7dJD9M0eeqFwnJjZ/HtUn/kS2n/sktydq6WC40+UJ1mwkKDFMbycZRLsHMRVoKNjHKX+WgX4RyiLWSU7TJ4NU0wRfQWxdZvc/6j7xPt4H3UeBTU7YwDE/z60KW8j9xP4AMuGXEsJ66zdHHxqF/JM1Xt5I3EmnWzzsNEiwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lssQBRCgOvSw3bNnhUxwtzSMmrnUxHVvQa+9gKI5KFxoRL5Sj69jqBGR0fB9t8SJOfkwOrbz9ULUqWuzZSpiWZvftc6P/9mpajLn4ZoqrBY3nrFzLpjMOrGmjgmnmUNxEaolGULJwfTAEUp55f5xyjleI5V68HvDQsOX/jR54RkJ8TUR4gcmF0IiOnkn8zn52Y0CJ7SEuubIMBpqGHUYgnq/DkR04PiFPeaczS/2PdTLrua8Ra4fr78FFNH3Yri4FrEjFnwdfvnCY+FjhEaFO1uSolP07U4hFRxo2j17W3De1baRyx4BG4t+jH8od4IpaNiAbwN679+Wf+jzmA1ovWywPQzXoVO0DrxcaoCdyx2TQAGh6l/Z3qy1n/eH26czj0GuITw/7R9CS1MRfA3Ovcgn7JxvrgEcRTqDXa0rNWPmESVF1sneDtqrBJtUIeF+PzERfGj8+vdJRjR10ZZp3gqRbmie7muR7lNON0jlQfrzhknTmZZvmrnSe7c/ug1F28OIzTnhcppDCvB5oQ0QXuHWXMPEid9NWgXRwTVScaNXuycQDXuHFnWRj6Rwd+PYIliYVdoMqLaDOvHT8pUe//OFj3Zz1nMvmCiTuXw/9ikBPvIIRocvt21jikZIS4C1YojvMq3dYwrFss0Vehvi+5LiP/k+Xd1Z6PmHGMn7aLDio+68f2BVnd23+3plS29m9vsEaEKkr43p2IJWUY7j1QAtG+5ycMXd6YBnQ0xzcu1PLLFQVNnbXR6vnjWlKtYY/PxE6rWxC2NLHtvwJ9Vmn1E/Qz5faEA63BNwaLCitJ8uhxTIMy6GgXuP07sCBgQSCi7srcmnj8bMOGAQ4Lj1ZylAbE+LwEApeZaetEKgO5WUfyCKjY6PHSVd+qZETs3Ik/tz3uKeFsw3EPmQZQ3BbKIl/AVfT6aukqoN1Ceoacqi9+Uxn7h+43ew8WPZvLHKu+PITaAVzm4yjpfLl0wyW9GI1/yRkTTOyAk6ZJZ93lpPlAZc++Syljk2t+H8UJrphy2DoCH8JQGe24mAwIzYbhpKfQ0kmZTuJ4pj+LQxiuFahKMb1oAPVcun9u2zGkk3gK803yU7EM9QwCcqyHg2/lhJwnpLdNllXRsRaUZvnNZluWzIXaKL6KHTdeqYj5cx1+NiZVyk1fouu6VoZOLa2ZE0M5rN6Fhg4ls/m1a/iud2C62QeGcsQmt328VLi0hE5OTvX7YfOOeGfjelUxhwvMH2WFPpDUmT+vaA5ZW/hOy1u/9+M2glKDXaxCYKvsNnMJ0gqfh0MBqaVljOu/iNqpl0CkIuNtWkyoC2AHduNw/LJe/a+8HykCeUiy6c1GMjIpWYrSq5OhgXbObeYWWrvVcARmISt5qiAhLKWTCvBuuA1uz2sBlmgpvYGwV3TSE9xJyobPhJF4MqTtlGVfdT+g/v4CqaQRjgsX4QMh7mLpk16UNH9SINNbFr4Iq7jZ1bil0W9Ynj0E7ozdANOw7YqWspaQx7W2M+k0QgGN6kxM8O96vtTccTOMO4kIPFQBD+cr4RFuwQ+4NpjaU86DpL9FMWDV4EEtIznO5ECMAq5UxaxTnEAYFhggHFE1+a734T X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72f34ec2-4113-4919-1f92-08dd0d347e67 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Nov 2024 09:35:26.9759 (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: k/fbLJ+W/rK0xtp5BRHrzdDBLili2tbip6NOwSPMXthYrHJl8PJUsE6KEfclv4tnd2RMoQsX73BtJOeWGMUAOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10754 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 --- 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