From patchwork Fri Jul 12 09:32:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731477 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E90EC3DA4A for ; Fri, 12 Jul 2024 09:24:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB72710EC74; Fri, 12 Jul 2024 09:24:51 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="YK9Cv62I"; dkim-atps=neutral Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011006.outbound.protection.outlook.com [52.101.65.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02BD610EC74 for ; Fri, 12 Jul 2024 09:24:49 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xTL+hgzLWb39RjV7cD4z3wJRE9yVG+ISxmbxfdctczhAwqjj/CXFC1Wy1izLjTfqlKAQ0HlmuNsv4ZynWl08wOfTt0iyyY5zZoNXAflqmRFrL1HXqAIoIcwKfG/JjaQYdWOvQMwzHVYllPIjwChGP8mIcV+CouDAeLELsjCHAu/FZ5c3hejy60WJOvKmWyQ8wWX7WyS7A2Xu8M+yob7YDleHs+twfXOs37fxumEZxNeNtJnAcOOSeM5XK1qshBN4rwrrSs3JqOz0RPUGNEuQoysSiUv5pAmfmr8Ee+F7v1GMYJfKW+u1D/isuRpoye80U5brJfr0T0H5pFFXTyki2A== 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=qguk+D4MyWJNuQGcbsx4iuZVQLXTt75VlO3zS51XMV0=; b=CvrR8zQP7Fcdo1TpgMSYwiCSPyS27xQfnj8BpVlzLcOvHXFvsCca7vj4kjnVHWRxl4dZ6kxJ3mC/zKhbCvTMs+lCjp6kiNoo66+b1oYSIKfMY9K4NOzDiv2fEJfLjjAEyxHh6Km7fYUcvp4Nw+ndmZVhvLeIXmNCGtgBqddMMgbde7COjf2P8F/4b6BK8pSp38ExeZ38Xhq/hpxxmMmW4T5Z48dAHdYRAtBBJVmIFpLZhHDg1m6BXgtaBs7JYItbUg+mCBmk0WAwu0/d9oys29BeiIiQS6on7iCII3fXYyySohDF/mbKIjzsTztrl4RCVH2dxWe5uE1FpgzOjtXP2Q== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qguk+D4MyWJNuQGcbsx4iuZVQLXTt75VlO3zS51XMV0=; b=YK9Cv62IhZYYt88GYONW1/M7Gebvbc9MoEweVium+YJTy85ZvIuK5bCN54EY7neefSaCxCMpKwblyDyFWy4dx+S6M5OFkUJBQ3kXlsgqhu1P+O+vxG20Tp5Ny8FCqb5Ra1SyTxlai+KdYtlY2faTrbi6kHZfJc8TquAHfDQiclA= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:24:44 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:24:44 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 01/16] dt-bindings: display: imx: Add some i.MX8qxp Display Controller processing units Date: Fri, 12 Jul 2024 17:32:28 +0800 Message-Id: <20240712093243.2108456-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: f8d82d0d-41cc-42c2-1a63-08dca25476cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: /LrP+ANcpXPlKEa0Ipz5aLPIIm7oR+hkkChMBhEu6/vDlVger4gCxz1E23vYYxE4x/UdKXeSziI4N620Vv9TYugmCDxxtV7d8kRMe7vN709Rf+lEUUN3FQt30aYRfNooDd1hd1W/3XxAKnVkjypF8F81qDA1JQSMlndn7Vzqlp+/h/2IECC2pQ8L1s01J0WYTPX0n3GST9xb9Gn27lfh/IXfYt7ZkXi8pWlyxIuKJo57rFhcU4uXlT70U1TRyHU2ijEE4PxoJ2ZfAOy4IFdOjOvmvruzVYCRS4oXjG2nNsaYjbk6Pk8a32zELjf1ohMkJ1bTKKeGumGtKyrub+UZXpoaxOboStsrh5Ls/dSWEyUJsSQoJplXohm5P3nJRlGCAwPtNFhKwdTiL6IiQyny0KYxACUNPZFdysfQpkKahbhySZpd/vCJekkiENMIrJJCdwspp5WTgdSfZx1rW9+0aYsyXo1YTEgKzRk1UXID4z2mIEZWhuJ2Iu01A99WLgZtyLDoryIjIbzTd0SC5JrPaVdbxA9CEQO3iTHh/fwC+AVdito3WnIiGBmTUp+5imRKcwHQtid4UMrKkhmbwqH2Q19R2ybqn1MHwh6UKyUvST7VcW/ty7eeyE0wSDBCfSw7DucObz6pc9pNiArkGpCDpreCiuk6FdMlKT4YsQQRzqD+zD+AXYbL/LqCPwpf2VEmAwb7VM+oWYaLdnsWspABvTwkSU3yv4jauXazUN2yMK1eW4htBd3NkwNfDYnzeasCaAoDu0CZEpVLf4SmSuZOkA54SeTHIQvJYB5fVFjHBEybdsJUL+S8Z7OaMehKE4UIORRS0A7vq+aZzKdXA8q/rp5Wpr2A+rc9UuTM+M/lg559PSt0on9NWV7DnX6i1iiYeYxlFqqdJf6YZC+n1GLrgFf2ezmigXZsT+GKkmqfTez8epYAoCiN3nZGFV/N4b9RP/eETZltS3h+Oc+Ep8+bQjCsPytTvIXU66eqs+sLR+rTweUxxUJ5LFzhbfwxkgW++kbAx7QLu8C7/rS4KVN0QBn0DsoTZS4qjZDrTh1hk2HTFwSD/WCPRltnk0is0VLX3WDt4l1ezUFhJPd8PYvn2Wgi9ay6/M9JV0FPKX9ItgW3uHk4Z2k9jbZLsxhtEg4bkTJwqvpbX3X1F3woNTGS+upf/FQ6xPoy/HnEOBhl/AKJ2RtIPxnzbHyHM29mMByxQyOj8jH93Y+yPRVkx4EyxdFh/o8BNmdKVdMMgX0eoio8+YDxh87acvLzRGl9MUXTNtKLUtJzoKr0x1M5/cVnqkM4jYgYrtRtOWsz7iMKz/MTbMLuc+g8Zp/V6MD5e0jkg2zCz/dEAl6pElNHrTEDk7eUlyAQ8eSlmSkkktEPpQQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZdsW6QEwOvlPHrROVuRWJACaXR9d5qgj87Pu1o5/IaqiGxLJx4oaF8BLWQah6DkUWes285ETbHYItQyTtUVoYQDaz9Yu0OgG1loZEoVgvrOuEsVNZXYfPBsKHJtFf5FBPx9bAtiV8So+iRKbxwis7xphQTfBoDPZJNVx8c7JUz/GbsJ8RIVGtFTYXrqq90RVKn+bROXZyM1T0wI9bqoWp4i2fZgQOAbmgIoDojN7lGudmKAKwBc4Luv3sqJQIp8C7p4UrYru7+AxU1PZ4li+jBEm45s/AxkjVsd+p41CPmM8HG+rHhSYpI54V7kJo0MGR5hEABo0wwDqcW5CJr59wJhlfR2Ggjbu8vzETXPNfDJQxGT76KS9RlUh8nnKAy9R5tDVFqPUAfOdF8qYfgKTA/ppFvugmjN+HsHSUo/6g1zE4wNIaW7zCy+OkeZTipZZakE18weMunieaT6moWlRlPhhSgLqLsZzplfxlZfNIGbmbeUuADKVhLMB4shLUDwcpkWsNfQ/Dx1K4HdbRBWM6n3Fwnrp1tRSOGiadD/XmHrAtWCICIubheJ624XT3Jsnas1C8ZDR1QpZd+YiTpLor7erhse+otu1CPYeutsg0PRaJ391ndauRxN7s7/3Pms25SWFoDQ1zvDkXXQRlYY3RzhHKvSfTtx5s8+qTyufSsE0qdKtwgHBUiviGAgTBaaGWulONLw4kU/HdqRoc/8SI6YROM8qeNVdAdb9+Jeh9nlgFy36b3jFNFNJHkCYW/m0GtbV8JamZF/mEPmnq91aiB8og0BZ4IKgz20iP9QDPutN/PEuCThi7J9Gf+EA/onPTdmVh87HhBCtKJS2z9M0fNNv7A7a9iTcEfLg2/L4daLMzeou/1GyYzRaF5RhR0mb6pn4k/k+mNmk5oYwZViHYI3qEE8OoZJh0PfmGqCvgOG2FtvfzmJaOQ08nTi0masL93zwn37aCGFTf1f4HAfOOMVbtrnI/FycbuibQWklNdKNMyn2E8kSF66QGet3gteoRI8jLvY5vr4TevDmpBrPYZ88ZvEfEw6zUpfUgQ4dkfO49qCtiTuHhFsQq8d9t0PYVrI8wYxLJmjAZ0RnOeJa7ehNu1Dp8EAlDh+e0PrRPLxWnY1hvHdMVklc6T62R5cY2BTqNDwf/9kdinPqyTENBavP7c12URo6crf/uqL4l1qOZA6IwuIYKD3qwioYPQZ7KR8knq/zRPd6A4GoO0Ftt8LEPTDkekiI2D9qMIfJkcv4rND756cWHuHEPfkugn1qfkG5sSV99K1kqSSh71+1yi32WWjWwFjKIQ32tWhZaehlNEctj14G02MgHBfu/gqYwircDpTLmaMYapdYHH7oxHxRbxzOl6x4bukfU7qI8m5/7NRFQIUwx45S/q+6uV0eoEJN0y8IPcVq3deng9WiSNQJ0WFMUf+8cTW5v7EhM/XkU8EZiuovDGRqcFvSiEn8xBCf3W9XQWdPWMtp4NDAg/80KrEKSRWVNBUlUVxNg0QobLWElu11Nb/zdUK14o5CTclEBeF+XVvdtJAsg7boKt7TcJgS3oPAK7rYH5REsXP+EdI3TZGJX/Ka0wI01lKy X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8d82d0d-41cc-42c2-1a63-08dca25476cf X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:24:44.0168 (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: 6GCqzY7i3hS3XzkT1h/tfhPafeH9t6JWYtVfo2oo2K5g2kb19VRSGV7xLNug+5h25Een5FgxTaFj6Uyxaz3x8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Freescale i.MX8qxp Display Controller is implemented as construction set of building blocks with unified concept and standardized interfaces. Document some processing units to support two display outputs. ConstFrame, ExtDst, FetchLayer, FetchWarp and LayerBlend processing units are in pixel engine. FrameGen and TCon processing units are in display engine. Signed-off-by: Liu Ying --- v2: * Drop fsl,dc-*-id DT properties. (Krzysztof) * Add port property to fsl,imx8qxp-dc-tcon.yaml. (Krzysztof) * Fix register range sizes in examples. .../imx/fsl,imx8qxp-dc-constframe.yaml | 44 ++++++ .../display/imx/fsl,imx8qxp-dc-extdst.yaml | 72 ++++++++++ .../imx/fsl,imx8qxp-dc-fetchlayer.yaml | 30 +++++ .../imx/fsl,imx8qxp-dc-fetchunit-common.yaml | 125 ++++++++++++++++++ .../display/imx/fsl,imx8qxp-dc-fetchwarp.yaml | 30 +++++ .../display/imx/fsl,imx8qxp-dc-framegen.yaml | 64 +++++++++ .../imx/fsl,imx8qxp-dc-layerblend.yaml | 39 ++++++ .../display/imx/fsl,imx8qxp-dc-tcon.yaml | 45 +++++++ 8 files changed, 449 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.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-fetchlayer.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit-common.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchwarp.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-layerblend.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-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-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-fetchlayer.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchlayer.yaml new file mode 100644 index 000000000000..804a3ea7419f --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchlayer.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-fetchlayer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Fetchlayer + +maintainers: + - Liu Ying + +allOf: + - $ref: fsl,imx8qxp-dc-fetchunit-common.yaml# + +properties: + compatible: + const: fsl,imx8qxp-dc-fetchlayer + +required: + - compatible + +unevaluatedProperties: 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-fetchunit-common.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit-common.yaml new file mode 100644 index 000000000000..a7a568672dc2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit-common.yaml @@ -0,0 +1,125 @@ +# 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-common.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: + 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: + - reg + - reg-names + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchwarp.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchwarp.yaml new file mode 100644 index 000000000000..4c916ca7f8b8 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchwarp.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-fetchwarp.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Fetchwarp + +maintainers: + - Liu Ying + +allOf: + - $ref: fsl,imx8qxp-dc-fetchunit-common.yaml# + +properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + fetchwarp@56180a60 { + compatible = "fsl,imx8qxp-dc-fetchwarp"; + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + 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-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-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 Fri Jul 12 09:32:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731478 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3654FC3DA4A for ; Fri, 12 Jul 2024 09:24:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B06B010EC76; Fri, 12 Jul 2024 09:24:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="ocl4Duao"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011045.outbound.protection.outlook.com [52.101.70.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id D807D10EC76 for ; Fri, 12 Jul 2024 09:24:56 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eVwLh8P1AvEa8uiEEcbPtQaGTsAGfum///fXtNn/7D/H7zDbHEqWLIj6+bFZxOwvv+jbwvjx10Lb3vN2RWbfUhcRTRdEQUlORoZH1IZrvykNwqTSObsIxF+R3/gs08mdF7vesOSOkyMMf5IiUs6TN5CMTOfxo7t+cA1aAIxK+fRKamr5jsDfdsh6ommHIaKW/CULGViNvV+I49h9J4oqe6S6i9uVTHd9bYvPydW/FW0MD8tYXGLMMY/p8lgAISLQN+PVYzm31aXijaUOd4jGW7qaros/FxFGntnI3VsjIPqoTqOeBCNZtq9h5KiBZK6VKDU6EHi1rtygXr5ck6LKlA== 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=CENez7oAf0r0W0vQ5AX0ZaxBA18j2PHzB1COo4ieu+k=; b=NhmbL6NjJ67cTdacqEg0dpVR4cmHEbJZpBUczglV/a5g0LPJtD3+8PBXTmEGKTFBSc6w5q0KvfUWuZY6yfFHwwIysEba5eP04zML1AKbrBQAlocAbNu4RIJTxk7zNqiWizhHipx4abge8xfucOWEL4vFl3O78N5aqgby65eLEoXsSBTxxWfaZ7Ei6J2SqNT77ZZ83LHH8HGDpJpbqFb9tRWCEnUOGrCerhPn8Hx6KnXIYXtxgp3tYGnGq9/tsrUeO60dgpLGXHGeu9FcuClrkCrzYCK8vbwja58zPe6IipehgSFYUXVBZWF6xtPI/gLhomwBUToWiKv+IuHECO5VsQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CENez7oAf0r0W0vQ5AX0ZaxBA18j2PHzB1COo4ieu+k=; b=ocl4DuaoAOMr9XHe1TX3xNKDitihkERoAtYzl90HRV/CrB172u/Oxpa3SYbv1DL6VbLiP5hKOycwJEeesxyNOHvUAb/wWnrfFSFyUDELBLfAbF0tJQNK1omw1cu5BwnXuuHOizW1UY4+fXpn4744zNWaOozXFBEzKHDqLChzupk= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:24: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:24: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 02/16] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Fri, 12 Jul 2024 17:32:29 +0800 Message-Id: <20240712093243.2108456-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: 99c34d2a-0926-4a1a-8af3-08dca2547b6e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: 5ab8w0A7j4tpM0KoYlzvIhVw/A6Ze8uSad9vZ7KEBtfMk2DkfwFxhYha0ShNV6vDGJXN6gKLRG1aO4ic5ntnu/oe/f1JvpxEzyWqJnYBhFrkyZdNlJvcwjn5pfozZ1lQ4hq4d1bKE3DvTzxSk2rzobZd20m3Niry2WtN1r2gy2t+HdiuV6e6IV4PCxd3ejuxVrng6cXTzvxo2gtof0X4uNowKLpbqMbeBcSgUeD1kNTX9BJ/XcwQXpN7oAatNRY7MoqS79UDEu7/49e6/4bVOafxgoNom83sO1waPiSazOlVtHw255PW8Hs5TXoh8QxO3AcaUyc8hWo1H6TLJCCgpRswEUD/Uk55vHBmEYRNO6uzG+iFD2VVUtCfr4ugyvsnIOwlHhcMB3tFVs3EpxbPWHoBCEDseOS/ljpL7GgMmsqrqg99sb6zeIzagUDTtBKJIy0AkLSGH5xoKZUdhGu1y1Ds7cuAdAqGch1uEIlIDF1d61qb5YBQ7Mtlax/nT5BzPjvBGOs+CIBIGfp5NQpa8ofr74tma8DzazwVkyjCVE6DqpiFJyb0SRVc9t3bFdivxh/fkGLZExMXH+aQi+DWLQf8meNYUQKdPhNkHn5Ztfsmni6V1Y91I7+t1z4k5XWJnmmLcYIzylTfRPfLftNVWfppRGqMw2uVcS5uIEpq6j5YpRqC/XNE2amGqOfdr6c8CuaEXMdXJz27wUtN6srxQt1auxHPYM/WDAopVIxR5sk2zidg7D2YeI6Cwic4jOVXdYC33Ww8B5bmTPS327r/g7+9nknM6/M28TFU2qbnkvvMTq07fxK5N0iKXn1CtGlUDooPLZM2wRvsdyTURUotkv7CbTqRHlHfmPBzz9dLOqxZMUOPGvoDYPiMIdvSKNO9UuuJRcpL8pbrKuFu+E3dK5CukMcrzybmbpbic6gi5UlwsVu+qlWb93WTI9LVdv219fvdRtcA9Urz/ayf0JPGEEQ3dOkJExAdl9dqWwx/rfQQolftS/SYipTUPy9pYuxlqOPTMhbK7Fm6E2sKyPO1Tjcl8GKmaavs87yOUZXUir0Gx4dSZCJ5cUF2c5y+0tw63YuJklrTerpsMsLuYo7q4eedYfkas2ZsIi3dpCW+ikMrxk4m9oqlrmHEumuFx2EReeUdRBZhYaQGF2r4HtAFCKld5YHi4xET9WMhTBhqpF6qTesazRO9MgdOU9CCXSokpeN9D6JX83A6Q/0W85J4BTOONbmM1QIc3GMbb22XcPCs7rV9jwjII5cC+ngkuFLLbeb900Syxd5Bt2LUoOlSxRUMwS3lCoL3uhZ2WaU7mAOgBjV9ZkUbFcM3RQIdOFTwDVZ3cqsiUY013Ewa5k7lLqo6ttz4hoiASzTMXQpcQVA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: joW09tOUhtV0WHp3S58tXwqUuo/OzzfFup4E09he5hBuH5kRQZ9D2WetZgFpqcimMvD7JIoYCprDHxNHsGUWn1ezmUuztv5NZ9OxTgYItgurPo2Q1RqE03A4Wq+T3JEtjxpXAtmb3iKTG6jRs2X2KcGxXh4pbhwsNEeokkOdQtlHw/QdavR8Q3g+V4qUawugk/K7i8Z8oYawDyx920uMY8382xXLqmgeACY55lyzW2HfiQkS0M1HWo5SPG6iz/MirkV7Yk96aFV2UcDwOIeAozh7lZmoFqHcs+UyEjD6il9qo6OuLJMoRQ/OPDbR5g0s8jZ1G6t0Fz04fDnn9NOGFv+J8W0GRHOUOgjvSlMF7MeFKK3o4v9bFGsZ1BNjyNzG3wFg0afydc+O1rRUzjpyVkvg2/oR457mScueksmxLGVxEYnECvf27XsOiANVE+2ezke9bG9rMXVBiOYrmK3Xrelua1PPvr9buT7AiusvSfrhekRjFu+e/jNA6ASrHnxiFfEHxhhC/AvBnlbzLGhQ/ZTz6gnuomH2ZpVYsYJ5t3XZXrStVIyLy82bq9zfT4x15zUrkidUgUL3PpydahIl31j/GR8bhF4XPZ8ELn/Y1Rmoad53eMycaItvpXB+KHptf+v5vNkMCNAorj5/2hdmf9YD+SS30qohcfz3IGzwhLm6Zua6UEHAPpu3tvEmNniyCTEfZVl5BRNU2F0DwGkD5CJXIQNykAPJYulzA8ALs14yXitTKhDFTZuhRgalFBh8od13vm2e2DNGGkTnNER430O6pdca7ohUGjeQu6jOAtPDxVRSEGE+9PsgK9kLT1MNdPB6sPnnKf++D7UQDqC0e2fsYosZQxkdsESDyf8m2J7v3Uwf9Z09fHBvPlfAU4yCFLn5s8bLHmoVePH7gt3Dpb8OVL5pOrdGx2ur0h7IRbuwAdUyy6d5ZqwXDTd+MDMAqZVttTBG7xyqk84lmglzOn9vy59A4QyEzCELa1oJ+sk1o7dIB7PNXNu8GwmTs1QxlObxmCVaBumbmi2GF0WFLbcNi4RBuOmsHamUtlpZ02yDvmckLUqUr4+jwr0RNssRavlBOYqFGsyfHHPJryFYNELIgiLUTnCpsiN1rcYMD+kJfHHOQ44MT8UVij48+DifUJQHJ9Fs7vVUW2LZdAnEtBh7LQT2PrZBlrG05IRbB7FbcgdumwCc59/Qzsp/8b5dy7r1tOXK5socN2viYJ+eupjGeXe4K+an/FOKPeQ6SBeTfpXyq0kzC4158oIAx+vCQFK2w1pJEQMQTMBEdwadBcXdmhW6CUJMQXXGdpBsqzVHubyvz8vk6cBkSWMSFUKn6LNWe7vgfVitDj6cffttBgF9mZ7iiDHwBa6otysjDKLAYZhkItrXKsHcH0K9zULHVz20BtL2heBt4cTctyV6ds98klhAnNls4n5wIkax4RudybKXkM/eBEpHxFW50m4ff3cbsoHb3bE9i3W7TMgI4Ca1px9BqOm2LuN6ycCszHLfladL28BvJ/2FBEJOgciyb95h4hPd0TUAWM+UxPM7Mn2Y6EsM0466IeaiYWg2aE/NbwmW3B+bqnL6teb3OwVJ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c34d2a-0926-4a1a-8af3-08dca2547b6e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:24:51.3326 (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: g34BSq89n/4kQ3lUMPZredtZHJynIakyiVoMoEk6UjaINyif1P6RXMYSMuz5aBKIaUcWvZDdj3gs10LH1vuXPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying --- 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 Fri Jul 12 09:32:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C1A7C2BD09 for ; Fri, 12 Jul 2024 09:25:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BCCC10EC78; Fri, 12 Jul 2024 09:25:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="YAcdrkz8"; dkim-atps=neutral Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011068.outbound.protection.outlook.com [52.101.65.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3057F10EC78 for ; Fri, 12 Jul 2024 09:25:01 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lcSBLDDIT1AlMy5m+18REqwCSi/DlaMWs1RIeZg7OKbd7X7KiypWp/QnzwQyvqsfBymT61KQUaNS5FyrLFaXw1lMpUb8ucQJUyYan3uWLINnmdyef6hOqFF1bcJxFp7beHDGKqBdWS/wMcGVA7/cJCFtURvAgz1jDjX1r1nD86QHEgXAu31kVcXbob5FvLiSGz3QYhCJZbGZ5iDbz82NJ5DPg85h4eOzI3kDo19FHwVdh+ORt2OLQEel1XEqPitUEXmElcfcKGUu1MH9gckMLB6LC2hi8hk70wJWHdCEtE74CvsUE8OuEz/nPYydyPorG/WozGaeMp+1QUBXE9Vemw== 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=/KfSvTno9qe5Gx7g0CpogAeVq6qj0WVPG1gvPK3lLzQ=; b=xdcV1TylH/L4YU8pTPbrR8u4RiFdjh7Xs3k6zIl5lLcHOlOrkg0egSJsvkGwmay6MZ6PQ0oD8IdGVF6B/hqUpWuvxvrhN/j6jsOEKGSVsDK8fX0A1pHIzCOPh2dg65GByjoKOoKtE4yM3s16JNswLH/iDVio8PtjdFAKmuLG+z6I4fqSCJuI13TBcGtTRIM5HeUjnnN52LXQ9hiaypswHyibdZc2De+G89gU+5Cs0BjBlwM4ik9YNdp2+ljRvVAEO5uKoCkPDkIWKvS36xfNj8rB7H5PnRNp0CX7EvPnnxphhpohNnASsZ6U93LAHY6Y97eAyevLZhygJwRQRSiOFw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/KfSvTno9qe5Gx7g0CpogAeVq6qj0WVPG1gvPK3lLzQ=; b=YAcdrkz8iCyX3RBY5/nij6qqAV3UPzgc2Y0sbUNj0S2rqwxODB10JbmjbJDIY5Mez/+cMni6AlX5b+JX3xHc6dk8Eop3KjyJFmH4K1DQ0u3P7/n9JyWeHF/6jTI3y9/QOn8mS1FiCcbTz/D0xN1GNnGCcXPcXo1HsffM85L6f8I= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:24: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:24: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 03/16] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Fri, 12 Jul 2024 17:32:30 +0800 Message-Id: <20240712093243.2108456-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: 975c2dde-4b1f-4298-8ea3-08dca2547f96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: FBUh6UTHoBud+ZZ/+2QRQo7iLBHgqLAo/jOD2orqR3nNYYP1IyfLfvw+Y+DR2yTLj5npvBWjaoBCnwAj6xHyXtOJ4WhpwSq1b91hXNZ1/A/BWiAq7j9D/hdpDOAEPYzam/QfxffCjJvfTf5ICNF+dfi18P4akoRtWdp4jd5ns3hlnCcyWxpvTrlL6X0/5pw7ZivjLYuxZjVxYespLwdPhlPoZv1bdofLekHuPTD8k74c3jK/xBBkI+cE0JWEKRVUmP0GVKzSXzi7Pn7JecjtNJE+eowTmacI2POXcXBpmKQLM7Xy+zV7BIQc9rRwzo/3v6CZKqOFvWMqa+tRynFf4a0Vl9bZdZUb5bnfTJuJ2NjB74QaoEx8ynoP8iOC4UD625yg6FaXHoRGL9OYpBFOuQWn4lT42LAroCheYMZpm8nZIEPYvxQHb4UGD2xz4MEMWEh1kf56G5IP2ft3tU5JibIdNvNXTD5BPFTWAmyAynnC7Rk68rTz/K40pfhGOj541bPTfIjNpDCrsTIs4C4x8SFYlTSMjScQ9VOYMKP5pjqGXn9yMYJrgZYA1fDXTEAXGEQXvPGYgJiBheadHLbGMsMZ3FE+ekeOmbPAT5aqo3T/fGVmH2+BId/XQeWJmBegzi5C79vw3jD5DMzmQjfzFWZCwlrLqkGRPLZ8gfGYxqN0ertUWO/BIy9IOv3KsVDbIITDc1lJGXMHU48+X0vIC4i977aFQxsxZiLpQHfOhoyFKybLV5oFXqomolmrQkYdYjsDQL/3X/SMNagRRIXXauUMveIqS1WkjL8Q3/tV0w97OpvqoqPjfwUl+Ab2MPssQJigv/bkfGSHlh++i7SThvOPT8c2l/BbMb+VI4sT9k3YoI/fPVzotIeDKLsIzJq09yFAtLJStKnCU8WEDueLh1NvdDZKik821cFXUb//nKEK7iDgu8DL95X0sDKbTxhH9KJaKGFxqAGUKXenccZjEqMO8ynVjOibEuUxZKJ8HY4xDbpvyf4CMcJPQ+JGMcLu4JhTbFeaxKR1qKbyuBbOa1IC7pL4r40HsNNtSIEGX4BX62Ftb1K3R6Em14wHdT3QGIDr6197CVnfYNEHCicgaLG8iQK6AAGGCTkgYHYXYa3hxhhatjmPK/jgcTLkK4AS7RDDQ2TBZ9nbkDfifoRyLJ5N2oS7JV80Ppmo6Dl8ZyrLMqxG7ybjmJKEh8CbQU4VwCNWUptK0c3+r1Q3mryDSuRaZDpr1eBSxXC968l6KdVpJwq334x6otZJMzMZZe4feqF0QALjT56roGsgztcOxxWVCkNWYnn9P9Gaoeb30i3L6b4q1n+foK2y1E/SfPXfEjINDpc0HwLNeBRYxll4Pg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dhNs8R+N4pL0KNhRF3CZ1aCE7VHoeROgbZGNwoccnlWzsrBx/wTYWHXPIVhouSkwikdc+Nn6yjfQeCxRB1xz0Q1r9R/gvSzkqY0FlDI+p4iSEdc8h9M02R+7TBEy0fQ7yo2L5d3E/fVJkQgUruTLUSSs186EqDe6qu89JIxOAXJOmVSwTwkWhJJKXskLJ29C+sX5t11eWFcUrnZ6LqQBxNSwWdlVR2kBilQ0R9egsSWHQmaSd9lUDkn9J8lpiRBsOUFvYcXWgdkUn+lGhSQv+JdElcd6vvbMPy0syH089CwaS9L3uSfW71JFhW3BMFSjWg2NH5nX47nrh87mKrdVy2VvfGivmBOXaKwlOLk1rJEtm4jA4tXx+Lzeve2N4u47VQNIRDBNHIJqCFjvgtTC0eq4Pn7QdarbtVNpIyrVq3l0Xv6yOqC4MuQAbK4i5r85fAdIQUgxOSATVswpSa4kErPcWeSrWEHlZNp4gad4I3F4DRDROkWZcWKMFN3sd9lVys+WuZqTTZfpzMZZK1HAZPnyCARfoWhudSpG1jlMXMJlusrLYvAIuaxR+wJRihezplQ3aByyN5/7lN4YnswalQgZisO45d8k1lovfRGyBGlERqo9GmPh5NzTiTY+BrDZvkSC4DOamJeniKhCURnKCwZtiNzXsszA5iaWR7c8PWdH1XVY1bsS2s5it/e4INbOgaKdOyBsreKZWk+kFw/RhJFYZBwe85Jlcar3zKSBIBn9VoZUmJb0PG0flov78hq1MwUklOWlVhABhTUXizEeBe1EQl87p9lJ9JVJh1GmsLQyHVLMdljyP+5V/GX3lwZfVIfJTdjIp/LymzJM0kytatLTswLv10w6gXJKcWGoQWvIJTbcJ/jkGh3AZbkhM4kyzVIJvjYJ6di+ndtTt31f67xqXGZiGgMChXXeNYeygyGZqsf0sMI/GC2N2qIAulGb40ZhyyH0z+7WSPYASJgwwOCuMKZYNY8MBzhZ6+MwT4h4J60U8pe3O+JV7HUp5ovbK2Bgi3n9rIRarm6Ru6lmj6nvWXAIIEDIzb+bYrQA4EGToN4yEUaM/ZxVsr/90IPX89/endW2hfrs0TIbb8MNEHQUNcU0cd6pD/SEpUQvYBzS4Ut4PY3PGXjFTD2lfYVq62PzuH59dU7ojFN26estGXjzEI997iG9KljWbW1BOd/ABjGpI1HXqCEB4bw0qUQw/E3Bq3xHZC/fGLBjVcjzeKBe/7o1r2LRo7iv7dU6GNL1luKdOQdMwunuHh8uHSR20PGxUJTWuEgBxYpC83sD13yPjJu1DsNAQkeMCcYZYJGpOZItwRyXGMZeWIoizjjI++w0e8TGU36AuutPCoonT5g8N1NWL5A21YntcbzPOg9BPl6xyBmGQeHWkVgycpYrfQMizwS2jb0xC/vRMxc2II5GxGRuJGdVftFYWX59Hw23798BoEDvRT8C3rY8zy5wuT56/kcnmt292FBFjbk1V41dtnaqyWcaFnHrRHhFPlQZu6SAxj+30EfLdNBOYVx2eStwrGro9VH67dpwMJSy+VZFWlygyGHI1pYrAFJa8ZZttyXKa5N0tHAISGOU3Uuf X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 975c2dde-4b1f-4298-8ea3-08dca2547f96 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:24:58.3072 (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: Y+aKLebGYqvYhNtlyl4GIf6Tr5D2keSUPPoGpGNhyHdFCItapvirbxiH/fxlj1YfdbGJo3+LqEpGN3VFKk564w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller pixel engine consists of all processing units that operate in the AXI bus clock domain. Command sequencer and interrupt controller of the Display Controller work with AXI bus clock, but they are not in pixel engine. Signed-off-by: Liu Ying --- 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 Fri Jul 12 09:32:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 766C7C3DA4A for ; Fri, 12 Jul 2024 09:25:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09C2B10EC79; Fri, 12 Jul 2024 09:25:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="C3M66UOq"; dkim-atps=neutral Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010062.outbound.protection.outlook.com [52.101.69.62]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4FB910EC79 for ; Fri, 12 Jul 2024 09:25:07 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rCLHKtplAfWO4hEjIzBpdp9/mGo60IA6ROrc/4KEgCa0RwZotSItx7KCpzObMu/F/FHrTtpqkqwTked3AKfjYc88aJEC9/+r/Y753Ly179JRJ8nTcqbeihbNC1SFm6Rv8fxRONAjAv9F2uR8dsF+knmCkz85SO2Zf/V7+QxGXh8OZ64vL3YfBxP0Ry7BSU5c62gN6SC4K/urBLWCt2cDiCZTD5Qs0U8voRNqZLmUsVkDr7W3T5j5Ufzc2RZAiN83FTv1lBg8B+CRuIPsX9sKhJFlNFt6/JfCHbwLKLgH+EnVpOc/2BuLQ1FBPuzuQ//5+wXJczXKgwo2A9wmzfsvcQ== 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=nY6bm5X04FAKjKBuQsIZczLpr/uoEuECxbsS1LHIXjk=; b=h1jmL4fcTDfssZ9HglS9aAk1xIoxDYl7w5HOH/3nP75ptpIhTiXaA4b562npNRKnal5dX671r/o5XNXET4VDezTsdYbMLNFakB5JoSO7ohccnOtAg0PJxbAB/rS7bvqMrWFKnbBJ4Fzh5DHOKEhqFG3bECLHh/P//2ueCPkLWIIgSsb4ACILKCciJmAWWiDI+fS2VrRxBmyKFyjRMvDGmjzt8Jw/mMQRm7w0dk/PcL3p+Lw//sWHcp+9V/aL5zsKOeYMcVrxCZjnkwD6ougSGut9Oy9AJXr9i2nOY0WNDZpcuC0sBWg7XxDDXmXbfDJx0iedHAh5IbZISf3jc9dejA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nY6bm5X04FAKjKBuQsIZczLpr/uoEuECxbsS1LHIXjk=; b=C3M66UOqTSIb4FMnqmpS5cKp8w5hfwkgQ4J8Z6hzbgE4+Ymyhiqed1jKJRzTAYi5yJp08+RsodbeYcaPUrGgQ2oHieVlBRu/jsEOQWQmgJYu9w7znzu8+DrGYl2Tp9rylsIhnj0vLxNQ9RQL9/HLwCojCiIzuntqBiSJIT7iLTM= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 04/16] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Fri, 12 Jul 2024 17:32:31 +0800 Message-Id: <20240712093243.2108456-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: cdeb5bb5-ad48-4821-ff70-08dca25483ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: NZ1whSw1kTbOSyNMVx5jil58KnQgPgNNpO9us1Gb6JBFeGgcDSHs/fyUOUQ3+AkWCVeuD4xv8F9lB8a1gA25vGKRCzqga7u6931iF8tY/epTstLopFUZXtEn6kZCBKJ/3xqs0+8p/m1ttPPjmN7Ia88yr2rT4KUzBUh5B2hx7Es/FoOdqq6tRCb5aaG41ksKo2/AuCpk3oBpu77knPbeAHHa8wff+PKx7GBHHpANuy8FmkXs0VfauRUffE/WDlqqSfOh3nYQIK8MWqptRZ9KGgdSrDZSFIeKM0C9A9njZmG1SFAYT4XL2QOOGpdt/uStnqDbI1pOvwfqeacGPAsQ2EsqjiJC4KXEtk6nKoZKW2b84mlOXX90KSIA8MHt0NMw3pXO6T3wTGzFowFKhjfph8mOLIpLf2IKit6hCjN2Eex2PNXE3kQjkWqz4njLQeT4j7KiojBGhAHRXQbomuqYtUBPIVobWNDueMxW3Hih0ktAV7TsRvR78VIXf0xeUrTWmGDDkCmHl1+CXDWLfxWEolZcP7aRsylulwEW7VcE5UlvIf9mxH1jsPJL50hNrX2uhv56Jn8FrLjJ6pBtbEUhSth/u9STJzaZEKnw8tM3j9n9zfYB73LYPZWFj49OD8N9apFoeW1pQcdq7DDmOslcNL/ynDbGQIq9LeuK3Q6ahlDnGgncHzyQoIy2y/2fKBnv/aQmwB1rT31L0VCUpr/wBEbwkdv/TtjWwUcs4iPUaUTXWiWn2j2Qk2RuCOG4ur/TDJMD0mRBY5j1QtWB1OlsdmI4XgQBjH/Bj0mavqnCoZHZoLo2w491xDO2RXswrBCDoShuB8gPVF519qyQmg4YkcS8gn2wwvtmUSxlDlssw9P4lBf/mh7UxS3qCLs2Lii/zdF69p4qNTI2C7G03K4EHrzIu+HVZI/hP/bWx3PYPfdxrp1YHFle+KVNHF9UxG+XkG5SrQe4Puz7sHbuMCkacr3GI7MXufy/laclUebCPNIP1pmbz+8XIzjQIfmKFuOQ1k7UALhqpHXS2h2CE+nVB/Dtsu/8bQlQVlpugEf6If6L/ZqrGcMPex2FCGT1pdLq2hXIBw1rVPsJXQTgZnuRfnyFJ9O0qVMGp6f8YI326To2NMw7qKBfwCSupvMR2aGVIAWqMc3T/2PKGL0mJx5lQC97V2B8DzvZNIHOIDPl0AIzuTzDtQs/OxQ5/b01mRsaP1OLlyVucPkD2a/1GKpikzLetJqUreHGpISFGQo02dl/ptc5oq078pClK+LHdyfstgRTgKai+hNdqEzVSwMc2EelwjO+OH3GIrLe+y85RvR45tafeTl1xyRSnnnLQgbPc+C7C9hk7ZDaWz9hsG5Tz1c/GcvzDQXiCYMeLeDNI+w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fuFOrMiFXL9qdDSRSBZo593P2rgkxh0E8Errun0M3mIFnoSUXko9Uk7+j/BqA1PNf7Bahq8oS4UJC3ws8QmnUVykq+dxmgZbQ0Z4Zv2gp4wj3ahB0pZltq9ck4MUu4HQF1TsLl9/J3TDAKn3RsGOUM0mb0cF/vdt0Jix9hOnyETGJX/CnkVSlAjHLZ/8jdOjBPplQc9Kt2LXVsDB64iX0QCw14e4GzguxH37SCf3FbinvpsOafTM8qLo7ll+e1JUuBmoW5gkLjg2v+jO7mkoMBn8bRJw4+OLbHTc6NrFD8vLTlUWtOtLFQyaHd49c4LK432rCREaPMUkCdgQVnp2EpCKPMsKsi/D4Kbwqg9ntlSuq009uaPuCDQcp/u64ej5M/UB9baULLRLrWGq8IotdaWbDLdT6tTFyAJf8EMDMoFe7JU85fPoZnrSH4eW1tPxsRKjWuRbpcqjJbtuJlVOPIoYyxVWr293c0l+BelFrTqG16ytBgb7nGC00a22kRJbs1ydBxEX0RnXLBoC4uuDzBexmgfI/nP0qVTTaZ86ISaumLceTF2Vs6y+KzwXkJg5+asMmpgHJ2p6OntPHRufp26+no/lLzUQY8iZf1bI16+zaCAWTuRnqV1REjLlEWpf1Yog+vJLMkzb+xTnWwpenS4Lxj5Q0hWGI1HPk1xxCSx7U9vNfqMrav6gQNB8aCgRqJL3JI3FTTcU/3W3Ug+Ggk/EILB0JxfzRcuT9aqoR/dj9+r8WtKnC2+YMx7FN41mCi4NIvPwQUEdu+Dh43pTyXRENF06IajSdoc9p9Ev4NVXWZHvM90FFriC19E7acpAQYxncdgy8PFqOHYpsrQbvKy/WKd+sd6JJwmHFDx1JxjM6JIU2xkKbEZtdm9T21W1fTDmiAp6P0PkzkZqwa3864uS+mjYjNhfMQZlxGmnsCsWzhUOk2bDATC7FkCK7hqU2kO74iea/4kUSstecqCmW5lbknisjWAAUBRu1+zyITy7/xnCntRWeCeb8EIzTmRQSoMcXDqvFGUHGLTvQUU4hpLVyR+Ockysk6OXsnw8l52emdTP2hiUvMeGRgWayNiZQRvwgnh5NGOfz4/mdUY0mwmFhFNcNKYlNhkkYObgxH3SNxzwnqd67GpVv43G2xZ+vrJSKTsJk/bqpAA+K7t0ZRX0v42cY72JUUtVUVALXYD9Bg3OHiIqhfc3LgZ9c8xZ3Y9vmpyAYij3a2PWFbAtiFaFXcrGPNmaIFIKxh+HN//f6bkpOyiHMgx/hmR0Da2wiErAtyn34TLkeLQ/3FsDnm/8QeeMMtkaf97oAbhHDOJsvsKcyDwlTXtHfeZXXZ7Aw1+ob/zicyRxJUIrwNDdxWgCG0ezzbeKFl3GDSKTITMgrcs7tpG+A/kFc3G8gx/mD+Tj63q0BISvRpui6jgdya8Wdg3yjnBufGl5YYYow7RnvZrTIcZhYM16JRrPBMV6iOMleUiEOczgTLdmTbh7MdCW+wgdcFZLp3wkwlpapjT7kxFy04QHukPh7mvnLEZTGG2QaunKQgZLvCOfelCPHwpWrzlnv0AN22uxt02L/mp80k1KoDxZwctOZFqjl8B/ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cdeb5bb5-ad48-4821-ff70-08dca25483ba X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:05.2640 (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: WOqiXY1l0p74bB9JiWg6ddw0RmJ0ekRnsxMPc8ucZEp9d83xIF1jT5SKDrSuiB9tr0Oyrvr+gRNKiN5Wiy2skA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller has a built-in interrupt controller to support Enable/Status/Preset/Clear interrupt bit. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- 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 Fri Jul 12 09:32:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27807C2BD09 for ; Fri, 12 Jul 2024 09:25:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2BAA10EC7E; Fri, 12 Jul 2024 09:25:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="AmOMmu6D"; dkim-atps=neutral Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013011.outbound.protection.outlook.com [52.101.67.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id B482C10EC7E for ; Fri, 12 Jul 2024 09:25:15 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qubN1OMQx5wCweUtfK5LwGg9BTzhR8Pl8WSVFbQI6TFpA6B1mLPQdO4H8CjY5h9vdg7cK+CEKnz5y00R5+SRQSsdGWpor26QpMoTZnRaZhUjuVJkledygH70POxyTSVd/uTcH1ZvhErxg75VxzfwY+sefyVVgf6ssonYldxdddXal0IhIOHPoprGoaB5bdvh77RcGlkFkct9TaWV3Wuem8cR+4SNnlfZ7EvJTcdolHP8RME1KXWJ7hbFFp3SCY3fyOM8Y0gRASzZaH7hgWrzLAI6i1hZ3s6Re/iP5F3X4uHGdDhXE/WzaTkqrsMY56dWVmMsS9F5FQduwwbld8y0QQ== 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=fTqGwmk22v8Cu38OSeyXqtZgnTvOWbo/OxP5Sbk3PWk=; b=pGTQi4bUIUwDeIsQfp7mbYl1w1xdPMRLjUT0LlslzABL7Pgz9jzFhwhOK+cJBUNbxY/q7fZ5/3OzFah7gt4nNGvo8KU6hq8sKtQd6XT1wRePS6Jk0Mn5fTpVUw5f2YyGLXhJ+Ivb/jnZzdPMueWr6dwc6qf/vrkGYhDWbE0VCGeVkn3+z0BHBvYPZFN9vIpakKGOXQlQApI6qZKAcNIc5H1ligKZb8YySnblAWLxG+IAOysCr+be5wWZgYGVKa2IGMYcW2mBPZrOx7xbZQ4beNf8pHNe3NTluj0coBCnWxKPoQJTRZ0u05BJambN/ibUsQ5tWlqT+gotPlcYfw/ZHg== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fTqGwmk22v8Cu38OSeyXqtZgnTvOWbo/OxP5Sbk3PWk=; b=AmOMmu6D/9KeLC1vQeNnHOssTxgve77bax/Z5fqOIkaN0cBDcvSPGTGZqrN0E+xN5leC5hCOsQ6wMb3Jb4FJcNX59TDEZhPiFAVaoBS15UwX4+y905+n0KhNlVxY5Dlj8uVBcelr3wA9HlTI8m8HE6nJoiOXlQ8Z3DgBGRhLaZk= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 05/16] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Fri, 12 Jul 2024 17:32:32 +0800 Message-Id: <20240712093243.2108456-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fb801ba-b6aa-4696-c033-08dca2548817 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: UL1/XHT3e6+XNfEP9gdJUALvShPrSdD5+seHVUV52by9vOQdA448FYTDNV/xu9FT50qILg7HEPM9ssJ4joO3H+mqHtd4uLjeJYkdeIZdylBaoOuY840YUyn1Hqow0RazLhJWYl6sSmMIKNDAuo4Upfu27NetMOGjK46B3OZlj1uuv/xRcjnro0zt+Iry2zvp/gbXXnsrrB0HzFQeKyvWzl8OpCxP7Hj+aYpya8Yv1qPhUXwhPj5v/iLZcE0g11L/QDPt4HKV2JrveKFVTmIm3K222AkjEP9GIlpu2ZDPuYcoa1SmGR20wYNzyiW+VnF/68xAzGs6GCrTuIX+2gJn+DvfsSolHN7eMedHMj5mk5OjLCuXm9NZCaKz44gpvW4p5FE/O9rPIPlsQIDe1fBj8r1wJbIUThTKNKpvo6VDhEEQ/Fda8G8s3//y2vsrTOEmDnYD1JNkI+woVgcF6dQ63gM9tW/G0YYw+NDiQ2n8/JX/53guYUiv6be7N9vfCQETKmtBsjplnXyU9dPiBupPld86bx7ea0Sy7gC6YufVWKnFTnUyEztQcT2tF8VehuWbeKLsU4vhxGMjwexO9GJfE6tk2KBE74lyAU582877T1+193oeGN5ZfZPUDSYkm0mKiBWlwh4O9ccF8mOxkDVfEjVJuC1pxZD1g+Shd6oMK0tqbGQnfDmGk4Cry1IB6pDlxe82YamHDG4ZheIKgo8pB0DNSpHbUXyx60bVFLrrXozu7aSejoCN9oKqIt+Hi2nMZrrYrsa6A7VSd6UZifdj7b5j7zUn49Dg8n0oRBkJatn4l39aPfx2h1JosJXcL0Is7+05+OqQzlRKIhJNKxIQXzwtd3394iuaAtCW5R8AYlxipwYd24cu6U+L/iiddfBmW8578SsfyB/uMgD19HcpsKkPrhpx13yhO1RsQT3U+4RUpcZe5edM06SKPWN/x3DBMveJzjQ0vJvEmrpyhU2s7NkRrQROOY5LWah6gXZPltSM6oaThmA3GMuooXaeG9hUbvIKpB/BTxHlQJ07DxtSpZxjkINFUcZkoW4mRxHqxfnVgwSB/cP+x7b7XM0GdUILNOFFEjDw1rqiylL2/w/xx0Y1bpJtd2ZyykeLlkB9dIIW9JUmzQ6X3PqdM9VXKHaaQxI1+1FDJY7e05RgBZ4FUW7IKtpYCzl4nq9L5/psFyiqsAbUtVrdMAIjgGrwqxmndnGmoF/JF89cKDNrLLD1v/ydnhMngIzqN2ZUbzsgjrtBCQZ7l1QSzAep9c1azLFye+ISuypInOpwkgwxUthsvCQv+362buF+Aef0CjRz4oo5KjTO7iuys8m+fsZnud17kzI3wy+O9I7jH9TFB30org== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K5rNKXuwr4knA/zEXPbF4YVHSbFOLPGrzXQLGpPwUZZIhSwCkFjeblsjj6RE89IJYh1kr7n0a874yajolhVLdBorOMZ/IXb4BaoKVUh2uJ8g6URDP1OA6Jv7wyqOjplKlrFWG6w1pAP44T8D/lqMdt9a/46O4G/+2/PY0YgR60HvNnvG1JtfE4y3uGoGZ/5OjTZDC/i8XtMw2bbySFSP4uAAn5HKPR7E8FBCMThqyYz3Z4uZMGXeUqpixsy2Swx/HtrLLBLPgpwGC+uBnClSsiuqZJEx1ki08OkYqUIQMi+2HEaVxFdn5qe0S7g/sWXovoY2te8nTloiv0X8Cd6xraShFPOPsmpU0VTU5rZGan2h0VEf8hZv2Jjop0z/d0WvG7AW8GjAXiTLru4pEnZjILHDsQLjWKNBSmUAsKEjrgGpKbQ4893lsTISok8l1Elrd5eTmfUPLDRbWNZx459VsGrh/l0ZIqkOIcNiBPgCn8dEEbvtUZfAzWr2ebxlmzu3zWG1olj+akKUZayTWerlraVXDrRh0XRO+CwiSp6byzJTR1t07olP0Tzz6/9P9k8thufK7D47G6ql236eTTb3dpMd0g2CilCVihkO/RrPS25qZTpKPvTDuIeinO2fOsuYV3sBJDBp1pQ5h5TDDFmtHbEc9t+4qpXxVe6DpaeI0JLDCB0BUEpBYBaHDvijuPJ7XnysTxtzP9PmfqutsQHxtWiDHO7kyQ8H8zEvABi1/84kCnF1KNICoftHinoIJyPqlpRLdrWE8tUJquapsYe0z+w3gRp3OJZ4wPQKEdfxzisq19BwzAgxTr7FG4TDB5I8wWm2opki1gKpj4g1qVcxWo7ltyIq3Dd7EaXPRPsC2BQuMv6zBhuduAeeLSVptFI5m34lU5Wzgloa5TuODrmLHpxOZknW46pQhzQGCWgUD8rtSC1IGdAHxrvh8sG30QHKxc34WPlsrGaAfGW2Dh1njX/Op6WB4tIYU9losBp6QV5Ftzyuz9vfKu/q0jsk/vlBEji3uB+VbGo6ssC+yQwTf2igzqCmktGxaMvDyjJou4pdlnjdPOdPwcDGBScio6LYoPfvC4v8nRT88ErJk1nybxzXOYY5jjfJn8Rdt6SaYD/1vdLw/htmUiiyn8dtHEbfzfqR9sbGR7cUDSH9JiXxQajwgeFhMQ1+h1bXNT4ulfMPxnUzEH/+JeV2HgfWrTuDbuF3j33VgEy36XLTi7YnfE22Fnba3L8ar77wHdNEYMGYWF6gQ1GhAevMHO6ao11a2ptjP84Oz/5K4LuoE9NghphTUyAQ2ht2e4qbtHeDYOR6kqprfNoKm9PqVA2cQraY3Mana0fecfOKf7kPEnfKfHcNRUKy8WOqsNcvUjZMvCfEr/orWqfLWliM2eaZrl7FrgeyOvX4B0IEz3CSpkY85Zb8za3gapyxUh1a8mqghSu/AqOQvhDZWGFSUS8Kh2+MfpKTRHb7neT2YYovZ6AI+PK5PKtWdHmsiMW2s/liOmlmww4xeF2N9cUWkVPDY6tOt+sDZ1p5xmaaAvEHJlMr0LvQk7G63L97ETL6xubCKiw77Prq2uTHTo2eokYwUHCs X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fb801ba-b6aa-4696-c033-08dca2548817 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:12.6709 (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: CbFEBpPBCx4eG5hn/gx9BJy/GCcwl3f86Pc2mhs9i2o2X/Cb592KVKegHlyUzB2LwJkZiFgNrKMIxrJsAli7Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller(DC) is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as well as a command sequencer. Signed-off-by: Liu Ying --- 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 Fri Jul 12 09:32:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80B6BC3DA4A for ; Fri, 12 Jul 2024 09:25:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1202610EC7F; Fri, 12 Jul 2024 09:25:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="D46eG4aY"; dkim-atps=neutral Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011063.outbound.protection.outlook.com [52.101.65.63]) by gabe.freedesktop.org (Postfix) with ESMTPS id C047310EC7F for ; Fri, 12 Jul 2024 09:25:25 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wdg+owAC29zmpQGc/JLl684FmN5DjL4QV3rqJmR4IgJwTf2guEiv1pmBnjog4Y1jc1HbIcuikm/pIAENFaxJxhzUH8xZbgR78hEG2NRsRTyxWdb6VHrElVF8vA82IXm/7BKKqV8t4Kh2nWfS/vH4jTf53VnfvAwHWMHIo/EV8maaGC+9XUdUWi1SLLgbBkwx3+BMdl/ZRM5ZeWwScybr92WEEhdCjQx89blRKMvSB0ZpgtgkUD503OsAGivzk/snH8/pUa5+moWw70LxmpRdV9GJmmm9ccrlgmSIejD4kEA4/DCKvDbKWZyh4EsBPIqwQy9wmUa427xRFKuBe0WzxQ== 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=QQQPH3K37fQRuij33BqLGUfpnnDu6fNuRXWr+w3BrOg=; b=IbfhVj+eiEMSGOgxaWLZPt1uKtR20LQrGDhCHkXcCxTHizPibqS3z6c+Uab6+Eda5ZfeB/5B+u+1UrPt2qGjUXJsoJ8rYDF+uKeGN1k8s1RIdDuvV4umCcTHCjpdtfWb+9DrYKbjurQjOC/SzqNzWe8HmC7OxtnPZcQSi8aoj4ZR7U6xypk4eA7fSGYgcjO0Gf1kZa14fMFr9m9OEwTPEicILTM5KceAnFc9OFprRDf3k4jiVvXgAgTQ5wQXSreNfy8ugMw00jxweP9f+GeTV767r0yYtSD7ld7gIinuahI3FaEzjg9x4dP6FRy32knK7hVUZWfj5pIiiM3hw7iw/w== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QQQPH3K37fQRuij33BqLGUfpnnDu6fNuRXWr+w3BrOg=; b=D46eG4aY5r+g9RTg7y9Krp30f1J2m5YVwfCjwIGK+E4c+1dsSn8WBuzRI7NZdfttDTSFHQrpEgaAlsHLlczLGklFcSwPtj7UB3Cz6Q12wiA98F0zwq0XM3lt0LYMDdZv/0LMDjeWjEsbUeMWSxkEx8qLkOO+WE2LqS5s5OGi+vU= 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 VI0PR04MB10289.eurprd04.prod.outlook.com (2603:10a6:800:242::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 06/16] drm/imx: Add i.MX8qxp Display Controller display engine Date: Fri, 12 Jul 2024 17:32:33 +0800 Message-Id: <20240712093243.2108456-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|VI0PR04MB10289:EE_ X-MS-Office365-Filtering-Correlation-Id: dd31eb28-4293-4cba-c085-08dca2548c7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: izBI2SWORX9fBuHUeqOZzkL2L70pSQhTVW5YsleUTDhIHQJMB2/weg3TGvUOBeFme5vYzqZkRq/ig0I7feZYQkpJ9S4YmY8JfTFjym4ZS235zSN4Xx4517BBqgHwNkdMCVtQmeNv/oL7OF+0qvx0ccPQVlQj0SaoqPrSm0voFh1aiDoMbJnhvsuPKzNokMS9Iq9jHPrqYsnEjmKJNvNWgYiRHgyrxfESEDRMBLApCGeRBG1Ym92v2PdCBT6IGEErUoW1ZejiAp9JjQ4TOA0q+SJsptCyT1qpC2T0C32UN00GCnJv9hI6aHXTYSX87x2R6oOSvAX0Ug7oEIaEL1N3vA7UNihU2awuQg1Th+g3zngD2RpbpSr1ynk1qLamyte6/kW/8iCj9T7LwR5qDheKGGIZCM0FSNMjlAV7DOtEh+izxi8HBsIp4j5HBBo8C/ten3DosE4Vq6aXNiBvA/qycRHbjKZk7TlE3CFZvWTq0/9OlKzrqYw+Y+h0CWN1D23oYKKFBTLmRyhl5Ad7PCEs1N4WL8gsupQLHNUVjxvC0CXCvL0/g2JmEfBnVxxVeYx9XVxUFuy1czhWgE86sObxHVPBB5WUqhZwr9SSyDaeSyZQH095S6WJYM2p48nLqYbuoVyt+WphB4pS0rKyoi1+vIiB3pCx2D+qiw8RziSIHR6p+LIR8IzE90fqZx/gZ5lf374zyICusGrsEB7GDHY/9PJn33EgzgNoSxPBW3khFm8+JaWiiPGpGH5PFCnPubjcM4rFKNTgD03QHfZ65EVHeRfz6D7MkG6dl8EokLBYZ/1lMous7C3EVCtCv49QHlcOka0n05wZ7eJfEHqz4bGMiNS972QRrKJdcYSM66w3+axlIIizrcjJccGGJlZ8ACmpOODwQrvZpIsO2EAN669au6pIZH6KfNRKbd6cUc4e5WQiMj9OEyy85d1zxZCbmbWn7qD794xLNL8qJtAIAahvQj+PUt8Ur0oL4v7czIwcH0LHsSZG9I2D9JeMt5p0ujm7HjXqrcLefQm83+gMipGvZVsjFcjC7PCZK3shuYrNe8zKL/+b374T60FztTymnL4sGQRc/Y5jtuT3mx+wQ6uiSyRjTsGbczWji/FYoaeDDJSkfCIri7B4sIrEtWNcVX+Phn1qtPp4nJIRIrhkraCqbRy0wka6+MyBF7XqMXHKtgM7x7ly7Xe3NNUJ5ZuBuHdjBgMZiMESmaFCsoZaXah62rMED4T0bKmesBfp+mwDRLGFzGVJajAXKWLWj3jhI4T7mh9ABhaSZ4QY7iWYG7aIDDfwjej7h6fGS8lwrqNaC5Yrmu0f2Lb7vEk0nBn2FWNT6A5dLDYDEHACuDBTDocGOSLfaMQtPa0dgL6hQhN+atioTgPwVCknIEKaxOgGWAYjYNPqoEqIlUm2FXErL/tnNw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(52116014)(376014)(7416014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 32zmUcwhwJw6ynHcCCR0izgqaDqFPi+6RJRSgoxgJK3kWcBbFdY84kj/j0XJpgx/YkS4vvQXfTnmfQDNdFQvO3fqm+o4/2ZyS+PcO6SaSa/mSzew3pUJqKPegUil0J7je7q0AegoXbU5husYT03d5c8LtLPgDSDRfBM3OloTnOHz/qmZYgMuw64uE7Yb1gR2MspnPhsM7aGPphgDEYVY+1Kqkxv/qsubyxNjtYtSvT0VBXoQrmRr2pyxoNVrZ9ObI5RbgpWgVKRLEegI7ZR+TGqAYebja/+n1cGPkZsaEwkYpanuAkGNSEif96n1Vag702uELQZfMPZ5z1w+iCer/uBn7lgqFEW+vSXn4FDWfr5RhjCeyIF/gbhGL79rB+/tNKCr98g560Jo6k01Q9JPufF9SPEjt3p7h3a2TyKh903S5SVKSwaOhrmN74/RvGHFe/Bf2fIoUDBNNBAVO7ItegtR/Xmde+xsKhSxmzEygWzfABV+X2Einq+YVpd2rkHY3UqryrfM6vkmImobKcsXcyxDfcAt98oqa4UfvNp3yxoDdlb5gCwHhaACDPFmThd5WO16m3hGQSsTgwUhy95AtzvXAbzGughu0+rsbQgAlMUuxPBMvmSDVy7+gFpoLMa35NhvyBmMjejTBObTnxPPefAsVKOsmlfB6jwjuRqbUiaLpY0y+L/mhQ9lkwQl+S7jZxJiolcLBiAH9vN7++sUtG1koCSrFPNi2mGv4Xkau+7eP92Rld31plmV3xlOdKJYxtuNAYYrlBvSL3UlUGUxhy78oG7NM0NkN57Wdj/ieHwV2gq1FIEN3FAxr2nkHqfVykiTwuNHUnU7lb3e3d38T1WhzN7nf181m9gRPT4ChfAfP/w+wqGK14i1Qj8IAF7DLmtcRhJTGAl8RLYcIjGVlAUX09PV/kiHwVduUnVpFyJlLTGTb3p1/Xe8ZZBG/P4iuZXe4f66t3oA4wdnwWpx803KOR0XDQ2xLf8l2XCAeI2k2PBYof9zVN0ZG81GWmX65h7IcALZjUJQXItw+wUVK9ciR/y3d+8r24hhSdwGSYfZ+KMbSHrKadBOUbYwVf5PzHl541amVnH/mWQDHeufEtDSTv2vcWWU1VkyrTKaw4lUQtg0xb6XmjGTUpPDy8cQTO4DKdcgORqkdZ+vJIm3MGEtwmNfyASQ4PDkht9SNilcGd/lSsIy3gmWFTqhVjeETdcV6gUQ16OEXYXnpMXR7MhYGZElQ6R32f8IWVB3E28320hVu3JvknMxyw11k2cIJDwODESUfhuBfYLMtKYZDIClL0lvjOe7K7unrIntoTSFmnUCSduvTenr5g4fobyXaUcny9/zTHpA4pCb3MPtvLQ9Riyj79LfMMbFtnEeJdukfCHmdjEEr62uY4SbBMIdRRR2ToMajSjBm7scUSKhTHkiuHmf27cS3nz6te7VenvCGGY41nXPp79sS18E4/CFlSV9wjqXIj4Qj5OOdRQ+CLfisKgXXfIiaW/hK/AfJbEMduH8jYOlKApNfQ9Gsyw8t2h8lPW4fCMdiQK8mOFoDwCspWmehYzP5pjf3pJ57yZtpxY625RMEUMjJVHablSG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd31eb28-4293-4cba-c085-08dca2548c7b X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:20.0317 (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: DkfOzYtaoMLIX7qLUJXDkqS+3cXijOtuhlnIxE+M7CUKHX21xWQYmobA7j02/0eGOgvxQX9bPcFldJJBRrkoOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10289 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Add minimal feature support with FrameGen and TCon so that the engine can output display timings. The 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 --- 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 | 151 +++++++++++++ drivers/gpu/drm/imx/dc/dc-de.h | 62 ++++++ drivers/gpu/drm/imx/dc/dc-drv.c | 32 +++ drivers/gpu/drm/imx/dc/dc-drv.h | 24 +++ drivers/gpu/drm/imx/dc/dc-fg.c | 366 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-tc.c | 137 ++++++++++++ 10 files changed, 784 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..2c8268b76b08 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-de.c @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#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) + +struct dc_de_priv { + struct dc_de engine; + void __iomem *reg_top; +}; + +static inline struct dc_de_priv *to_de_priv(struct dc_de *de) +{ + return container_of(de, struct dc_de_priv, engine); +} + +static inline void +dc_dec_write(struct dc_de *de, unsigned int offset, u32 value) +{ + struct dc_de_priv *priv = to_de_priv(de); + + writel(value, priv->reg_top + offset); +} + +static void dc_dec_init(struct dc_de *de) +{ + dc_dec_write(de, 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; + struct dc_de_priv *priv; + int ret; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg_top = devm_platform_ioremap_resource_byname(pdev, "top"); + if (IS_ERR(priv->reg_top)) + return PTR_ERR(priv->reg_top); + + priv->engine.irq_shdld = platform_get_irq_byname(pdev, "shdload"); + if (priv->engine.irq_shdld < 0) + return priv->engine.irq_shdld; + + priv->engine.irq_framecomplete = + platform_get_irq_byname(pdev, "framecomplete"); + if (priv->engine.irq_framecomplete < 0) + return priv->engine.irq_framecomplete; + + priv->engine.irq_seqcomplete = + platform_get_irq_byname(pdev, "seqcomplete"); + if (priv->engine.irq_seqcomplete < 0) + return priv->engine.irq_seqcomplete; + + priv->engine.id = of_alias_get_id(dev->of_node, "dc0-display-engine"); + if (priv->engine.id < 0) { + dev_err(dev, "failed to get alias id: %d\n", priv->engine.id); + return priv->engine.id; + } + + priv->engine.dev = dev; + + dev_set_drvdata(dev, priv); + + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; + + dc_drm->de[priv->engine.id] = &priv->engine; + + 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_priv *priv = dev_get_drvdata(dev); + struct dc_de *engine = &priv->engine; + + dc_dec_init(engine); + dc_fg_init(engine->fg); + dc_tc_init(engine->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", + .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..3417059c40b9 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-de.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_DISPLAY_ENGINE_H__ +#define __DC_DISPLAY_ENGINE_H__ + +#include +#include + +#define DC_DISPLAYS 2 + +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. */ +}; + +struct dc_fg { +}; + +struct dc_tc { + struct device *dev; +}; + +struct dc_de { + struct device *dev; + 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_syncmode(struct dc_fg *fg, enum dc_fg_syncmode mode); +void dc_fg_cfg_videomode(struct dc_fg *fg, struct drm_display_mode *m); +void dc_fg_displaymode(struct dc_fg *fg, enum dc_fg_dm mode); +void dc_fg_panic_displaymode(struct dc_fg *fg, enum dc_fg_dm mode); +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); +int 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..3e9a8abee93e --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fg.c @@ -0,0 +1,366 @@ +// 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 0x6 +#define FGSYNCMODE(n) ((n) << 6) +#define SHDEN BIT(0) + +#define HTCFG1 0xc +#define HTOTAL(n) ((((n) - 1) & 0x3fff) << 16) +#define HACT(n) ((n) & 0x3fff) + +#define HTCFG2 0x10 +#define HSEN BIT(31) +#define HSBP(n) ((((n) - 1) & 0x3fff) << 16) +#define HSYNC(n) (((n) - 1) & 0x3fff) + +#define VTCFG1 0x14 +#define VTOTAL(n) ((((n) - 1) & 0x3fff) << 16) +#define VACT(n) ((n) & 0x3fff) + +#define VTCFG2 0x18 +#define VSEN BIT(31) +#define VSBP(n) ((((n) - 1) & 0x3fff) << 16) +#define VSYNC(n) (((n) - 1) & 0x3fff) + +#define PKICKCONFIG 0x2c +#define SKICKCONFIG 0x30 +#define EN BIT(31) +#define ROW(n) (((n) & 0x3fff) << 16) +#define COL(n) ((n) & 0x3fff) + +#define PACFG 0x54 +#define SACFG 0x58 +#define STARTX(n) (((n) + 1) & 0x3fff) +#define STARTY(n) (((((n) + 1) & 0x3fff)) << 16) + +#define FGINCTRL 0x5c +#define FGINCTRLPANIC 0x60 +#define FGDM_MASK 0x7 +#define ENPRIMALPHA BIT(3) +#define ENSECALPHA BIT(4) + +#define FGCCR 0x64 +#define CCGREEN(g) (((g) & 0x3ff) << 10) + +#define FGENABLE 0x68 +#define FGEN BIT(0) + +#define FGSLR 0x6c +#define SHDTOKGEN BIT(0) + +#define FGTIMESTAMP 0x74 +#define FRAMEINDEX_SHIFT 14 +#define FRAMEINDEX_MASK (0x3ffff << FRAMEINDEX_SHIFT) +#define LINEINDEX_MASK 0x3fff + +#define FGCHSTAT 0x78 +#define SECSYNCSTAT BIT(24) +#define SFIFOEMPTY BIT(16) + +#define FGCHSTATCLR 0x7c +#define CLRSECSTAT BIT(16) + +#define KHZ 1000 + +struct dc_fg_priv { + struct dc_fg fg; + struct device *dev; + void __iomem *reg; + struct clk *clk_disp; +}; + +static inline struct dc_fg_priv *to_fg_priv(struct dc_fg *fg) +{ + return container_of(fg, struct dc_fg_priv, fg); +} + +static inline u32 dc_fg_read(struct dc_fg *fg, unsigned int offset) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + + return readl(priv->reg + offset); +} + +static inline void +dc_fg_write(struct dc_fg *fg, unsigned int offset, u32 value) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + + writel(value, priv->reg + offset); +} + +static inline void +dc_fg_write_mask(struct dc_fg *fg, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_fg_read(fg, offset); + tmp &= ~mask; + dc_fg_write(fg, offset, tmp | value); +} + +static void dc_fg_enable_shden(struct dc_fg *fg) +{ + dc_fg_write_mask(fg, FGSTCTRL, SHDEN, SHDEN); +} + +void dc_fg_syncmode(struct dc_fg *fg, enum dc_fg_syncmode mode) +{ + dc_fg_write_mask(fg, FGSTCTRL, FGSYNCMODE_MASK, FGSYNCMODE(mode)); +} + +void dc_fg_cfg_videomode(struct dc_fg *fg, struct drm_display_mode *m) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + 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 */ + dc_fg_write(fg, HTCFG1, HACT(hact) | HTOTAL(htotal)); + dc_fg_write(fg, HTCFG2, HSYNC(hsync) | HSBP(hsbp) | HSEN); + dc_fg_write(fg, VTCFG1, VACT(vact) | VTOTAL(vtotal)); + dc_fg_write(fg, VTCFG2, VSYNC(vsync) | VSBP(vsbp) | VSEN); + + kick_col = hact + 1; + kick_row = vact; + + /* pkickconfig */ + dc_fg_write(fg, PKICKCONFIG, COL(kick_col) | ROW(kick_row) | EN); + + /* skikconfig */ + dc_fg_write(fg, SKICKCONFIG, COL(kick_col) | ROW(kick_row) | EN); + + /* primary and secondary area position configuration */ + dc_fg_write(fg, PACFG, STARTX(0) | STARTY(0)); + dc_fg_write(fg, SACFG, STARTX(0) | STARTY(0)); + + /* alpha */ + dc_fg_write_mask(fg, FGINCTRL, ENPRIMALPHA | ENSECALPHA, 0); + dc_fg_write_mask(fg, FGINCTRLPANIC, ENPRIMALPHA | ENSECALPHA, 0); + + /* constant color is green(used in panic mode) */ + dc_fg_write(fg, FGCCR, CCGREEN(0x3ff)); + + ret = clk_set_rate(priv->clk_disp, m->clock * KHZ); + if (ret < 0) + dev_err(priv->dev, + "failed to set display clock rate: %d\n", ret); +} + +void dc_fg_displaymode(struct dc_fg *fg, enum dc_fg_dm mode) +{ + dc_fg_write_mask(fg, FGINCTRL, FGDM_MASK, mode); +} + +void dc_fg_panic_displaymode(struct dc_fg *fg, enum dc_fg_dm mode) +{ + dc_fg_write_mask(fg, FGINCTRLPANIC, FGDM_MASK, mode); +} + +void dc_fg_enable(struct dc_fg *fg) +{ + dc_fg_write(fg, FGENABLE, FGEN); +} + +void dc_fg_disable(struct dc_fg *fg) +{ + dc_fg_write(fg, FGENABLE, 0); +} + +void dc_fg_shdtokgen(struct dc_fg *fg) +{ + dc_fg_write(fg, FGSLR, SHDTOKGEN); +} + +u32 dc_fg_get_frame_index(struct dc_fg *fg) +{ + u32 val = dc_fg_read(fg, FGTIMESTAMP); + + return (val & FRAMEINDEX_MASK) >> FRAMEINDEX_SHIFT; +} + +int dc_fg_get_line_index(struct dc_fg *fg) +{ + u32 val = dc_fg_read(fg, FGTIMESTAMP); + + return val & LINEINDEX_MASK; +} + +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; + + val = dc_fg_read(fg, FGCHSTAT); + + return !!(val & SFIFOEMPTY); +} + +void dc_fg_secondary_clear_channel_status(struct dc_fg *fg) +{ + dc_fg_write(fg, FGCHSTATCLR, CLRSECSTAT); +} + +int dc_fg_wait_for_secondary_syncup(struct dc_fg *fg) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + u32 val; + + return readl_poll_timeout(priv->reg + FGCHSTAT, val, + val & SECSYNCSTAT, 5, 100000); +} + +void dc_fg_enable_clock(struct dc_fg *fg) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + int ret; + + ret = clk_prepare_enable(priv->clk_disp); + if (ret) + dev_err(priv->dev, "failed to enable display clock: %d\n", ret); +} + +void dc_fg_disable_clock(struct dc_fg *fg) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + + clk_disable_unprepare(priv->clk_disp); +} + +enum drm_mode_status dc_fg_check_clock(struct dc_fg *fg, int clk_khz) +{ + struct dc_fg_priv *priv = to_fg_priv(fg); + unsigned long rounded_rate; + + rounded_rate = clk_round_rate(priv->clk_disp, clk_khz * KHZ); + + if (rounded_rate != clk_khz * 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); +} + +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; + struct dc_fg_priv *priv; + struct dc_de *de; + int id; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(priv->reg)) + return PTR_ERR(priv->reg); + + priv->clk_disp = devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk_disp)) + return dev_err_probe(dev, PTR_ERR(priv->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; + } + + priv->dev = dev; + + de = dc_drm->de[id]; + de->fg = &priv->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", + .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..29f42496a409 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-tc.c @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#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 +#define MAPBIT34_32 0x438 + +struct dc_tc_priv { + struct dc_tc tc; + void __iomem *reg; +}; + +static inline struct dc_tc_priv *to_tc_priv(struct dc_tc *tc) +{ + return container_of(tc, struct dc_tc_priv, tc); +} + +static inline void dc_tc_write(struct dc_tc *tc, unsigned int offset, u32 value) +{ + struct dc_tc_priv *priv = to_tc_priv(tc); + + writel(value, priv->reg + offset); +} + +static void dc_tc_set_fmt(struct dc_tc *tc) +{ + /* + * 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. + */ + dc_tc_write(tc, MAPBIT3_0, 0x17161514); + dc_tc_write(tc, MAPBIT7_4, 0x1b1a1918); + dc_tc_write(tc, MAPBIT11_8, 0x0b0a1d1c); + dc_tc_write(tc, MAPBIT15_12, 0x0f0e0d0c); + dc_tc_write(tc, MAPBIT19_16, 0x13121110); + dc_tc_write(tc, MAPBIT23_20, 0x03020100); + dc_tc_write(tc, MAPBIT27_24, 0x07060504); + dc_tc_write(tc, MAPBIT31_28, 0x00000908); +} + +void dc_tc_init(struct dc_tc *tc) +{ + /* reset TCON_CTRL to POR default so that TCON works in bypass mode */ + dc_tc_write(tc, TCON_CTRL, CTRL_RST_VAL); + dc_tc_set_fmt(tc); +} + +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; + struct dc_tc_priv *priv; + struct dc_de *de; + int id; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(priv->reg)) + return PTR_ERR(priv->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 = &priv->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", + .of_match_table = dc_tc_dt_ids, + }, +}; From patchwork Fri Jul 12 09:32:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7ED6C3DA4A for ; Fri, 12 Jul 2024 09:25:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 73FB110EC81; Fri, 12 Jul 2024 09:25:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="L+aZqnkM"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011053.outbound.protection.outlook.com [52.101.70.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id D54B310EC81 for ; Fri, 12 Jul 2024 09:25:32 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zibys+W3WYxwZo04682ixnD8vAeaAUd8UQDhnC6p0NHWf95EGFvYUCxcAT7AIESOIiqhFlrEbvOIFA+4g3SY9B46AHXGaa8L/3Y1pWxYPzub+4dck70XsclZqpCpPJ9W95xJbItpqvn3w5Ky0BVlIOSaqtepXxCPvAlAWW7qFagFf8mgezOML43QY3N5KCAgg7uBIu/w8CtRyRpywJKGxrqmWjDhRADPquWQ7KgEQkdSW+ggzS4hJwZBlwC+Q90iq5mzKt3VlVLScAkxOB/H9rAGC3sGqZ8siYgf/5wltY/30B+dcH6jJOyRwRyic5Dlrvb7qxKAc4UTSi6sDaaEXw== 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=OJ1IvKhIn9B2neFjBTIcUSi/+uO9Ep0X/jaJ930yBo0=; b=BLPQ38wXt4UrMeEHm39qEIglIe/YeavBFK1PVhq5Sc4+MEm/HV59ztAL95OuJNSqP3utjshMyvSskr2en3vlO71k4wuKn12XPuEw2iCMWjZA5u+zl4tFMjJJiK9hdkz9f90Tbl1fZgtK49xYvcfy77QmLybzB3IHaghgS+Yq/EUKtVgUCPFq4C0pl1traILgN0sq6Vl6hMxKB8BVF2PQ+7v9YR5rD/2PGtIfQW5mnQSieNZpn+WmVTLTiz/XefaK3q3iqZmnrv/lCnBl+U9mL9vERLrMDHy2IglAXkH0t/4bqN//a2r0OECy7+eqpaUFXTBaSyotbQ3oVYoLO8hwXw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OJ1IvKhIn9B2neFjBTIcUSi/+uO9Ep0X/jaJ930yBo0=; b=L+aZqnkM1TU2Z5JBIPzjkOn6t/iD9lQ7XWw2tq6PjLleXd7SEYugvG+h+T8rREv+Pm8cHXmaWfUi6zeVeIj4IkyvNo1PFXC1xzwkx10Zg3CFQdOeTRX958qQnED3/iVnNGg+KANp058yquth7I3TslxlINk1KTIEdbxm98JXVvI= 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 GV1PR04MB9183.eurprd04.prod.outlook.com (2603:10a6:150:27::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Fri, 12 Jul 2024 09:25: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%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25: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, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 07/16] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Fri, 12 Jul 2024 17:32:34 +0800 Message-Id: <20240712093243.2108456-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB9183:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a29e900-5e8d-44b9-ec96-08dca25490b2 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: O5FTTer9kr3FCu9hHNsYbbPlZ6mEvp2xNzWo/RL4HOUhOXE9PRcIDxaPoIEQneqPD+nU6MD3TEc5y4/L7mu788bMhz5n4sFJ2/CpizdSA4ec4qKuBe3oUXvvNjDXeds95uOZngIVdAiMSK0fiVbdRtuE53zucPN1HGF3odwf3Pxr2J2HZyhK/aPvMFEvaJrooiT3qtu9Rczz+5P8+z89kTegsxWWcNTspnGjlitnH/LsmrS8LElYg1BLz7sI890ZhvaCeLdV25W0/YzLADtfsndIb3OGS2UgUBwbzj+qM7Ktc81lmDOxl+tX80TMYdhWYF+LDYcq2VuLHulO2+lzcjoIpivw4Us+BGuDmLkOKL2WFXOgZ30iMO4K9vmq9qvVChbS+eyymLQASjfJo1jVjPe1gtZV5kSxfg7QMrdkEauzmD1Gm+0/BLYFY1569Cq0oWyApCLWPsABQT605FdMkzsD7RVtBXG8w3gudyX0dOOisXZZ+Zk/LVwNK8jCgCYpq+F8mFY4Rh+k53HVxMXOs06ANK9zYGHamQS1VUVu8+xFw1/YRdL0fysT6AGgH2o7EH23obPkFFI8taFG+MuWgBEqex4FMZl8SLwsklFjzMvHCPhNfFiQfmiCK4cyLPmttNglzEhM6cs0kwbErOJkeBdml3Kbppe6pjDMNg6A5tTkmNc17JbHJTEucL5ILq+Kjs5G2cfXZraivT/jOI49GbwAB3YTYK5qduDwq8AJKnl2eGZbfFPMzJkfAh5w9ouvXPwaaEkcBRrHBc0w+WXDX7R2lspxVNCHZ+B8ukRQeyssQOt+gm+XtTAyGX/l6xfAOA6cakZT90VTUuEAmBevwVlqpCsGP+BNZA1BdbG4vxpwZ4q5j+KEXhyeq72mZ1aSGBxG2aY50DIuP+Yrej0TJKM0NF5DfWptPaIwVGbRlTGWLu7WZ6wpjcqBPH6Z+5P6DiCkTBGN0krfkmyqGmpzklZ7GlDr9n3/qUVhSsVnA2XgOUmMrCklexdG599sRd/4rMF+U/8z+BzDl6ZgIodbXfa9b1T+uOM7097S/KVqTe3R5nS/w1IzzUihaTxtaGrIbFXlI3fNGZOHOsFMs74bDllm10SJyJUW/hYu/ryG+8Pyz/tbbVqdDSNshq4BuewNG+ZsO6czsKOJMs8VglPYqMQQkoFBFXU4ExQCiSm4FsBmBAukom1weKXAnjuaXSKfpDEnYx8eeUt6C3pJUKSe07RgCuRBcR/WfXXcI+gtmmLMAeRAl54qQwv9M7FLCYqVGHYWMa0TDATJvSeJePiDUhZkE5/pCELylvf4IzgBxkrTRd3VWW1yecNnP+F/E48mbpNdFLMvZDT8CGVobT0NFuiLqUNAF3U2mKoeos5PAIq3P2gPVNnC/3tYsrY/LRslbMAwLK4MdDZFQupFqEinYA== 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: ocPwwXQESOMmgeHeop50DQyHn1HJEQfWz4A2AtSkYYEAljoilySX3qQkFeBhqhXeyaCblUc6jtqdTonpdPCWXztK3hj02gvtcL1uYU+FlXJtp83HzippNRy5eagEfTgtbtamVgPfmOgxCjPPVNAUVLU+LQBJgWxnnZ8iq9c+F9/Xs3fQFqaZvLtBT/a0MW2Ema/d0UJOC4cNDOhsiXX4bYqBNfuduO/sdCOhMyGfa9sLFsG+jCG3NLR1bDuWJYIRIf/0iz1R3Xuyv1AZkbHJ3pbVhwm/ph9ltl8t4M1c6ZurXc39euiSDrrsuurFLHN7nysnPpjuN8yuosDvx6MrsQv7WzL8cBxX7Ober9JaFmS09iitR4kAWa9XFPnfgmfJ0SW+Dw3KWBiXoLrY94WEQHKaDRt4mkH0CA9DOVUHHwh8bpl36kpp/5+q8cO0weUGvJkxP5uNEvUoHQvnxc3tVUmv8uaLSQh06ehBzoOYncPoLVdw1MW2IGN8L2sr0S/cubCmB6CIGDa2A0a+loCQuwnQGy0eBjGniJ5pRjaH3pt4NnNMtFWfwsXsGR+qevG0Z1G1ZRMZTEk8RfTRnjhhOvPTpCH6nHiex/OP7XA5fNwlxWvkVUoNmfQIZKDvuWxhAy4QvczytGHu8RePPRkLzHOqaMdAMQ4j0wIhCsKceFPUIxoN41Oe8chUVSeoho1nhnU5rOckmBdiG9E89sU6PwBDmdL3BBVRWsVAT9Gcqn2jJcPJMo+GcAS7bzE8VfYueJ643y4ChVDTHmEBn1Ltp5AhT+E/OtQECNsSpXX/uivbeuWKnQKX2eFEmBQXVwSWaxn510OJr2VFLBMk5e185EBtSje/2A3cHZOSc7twd/w6afsNDrcw6HwsPjshjZTAmd8V+DXEKZpVCocS6hhHtqbE+liRcCkEtI98Iy0S5VP5ph9bL/Nk+CikIaQS0PwkuDENXPHXQQ/VLsiDGJidRtD8gAatAKCwep+axU1YPbJxq6BTtej2RduEtry9xW6J0iICwgK51enWMI3cp0mZ7thM9zXfBpN6Ao1LaT+TXefzU8p73Bs4lG1OsG4OZXJFjBeSK8zhoICN8wFIsCTjmrUbUgcD5xiVR6pVg8to+PCcAQMmgY8J5DA5rw2adAdYhjgRAHpZdcCnjkLDClXTWfPEye0Dtb2AKAgbnY6v3pwayKQzj3iDvmZZXbcVkk9+xDGOpqSwlwIHKIL5jywapNqvsu5GzhWlUNhJv/WwyW/vglkINUpkiRy2Se5Qr4iU4NJM0G1DM/SFSVRih1dxC89TpHv2eCShSIRK+mkhD5d2ShVczoPsmEo5aN+fSY5EScr+Gf1G1ZX7GEc//ZZl7BFqg+XbfWzuzn7qZysV7zBD5QpKjpbaFkxVyrSZe2efHjmtoLcoeUBPFMlRBjfU1OklC1fXDpl+WxFXjkeMOV7GqZjCk6avny4Zvm+s6KbCsyoTG2b/7sA90YTHI0Me+iyMODwSePbApAbfZyGyck+DxPRQIJCFZP+QIlsqE1i6GGIZzGp6LMWzq5aBlhj2qfdFfP5wMDEyAj2NJp+5UAT/SyTLFguDfzhyr0B6wA8D X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a29e900-5e8d-44b9-ec96-08dca25490b2 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:27.1277 (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: grnY4rTkoFodYjxrAhPIYVw5RNzzenNaA2RS60Lr4EKWRXNav+BnhRSG3zplq2BmYIy+5p81mAFXiMO/UrLu0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9183 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller pixel engine consists of all processing units that operate in the AXI bus clock domain. Add drivers for ConstFrame, ExtDst, FetchLayer, FetchWarp and LayerBlend units, as well as a pixel engine driver, so that two displays with primary planes can be supported. The pixel engine driver 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 --- v2: * Use OF alias id to get instance id. drivers/gpu/drm/imx/dc/Makefile | 3 +- drivers/gpu/drm/imx/dc/dc-cf.c | 157 +++++++++++++++++ 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 | 266 ++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fl.c | 136 +++++++++++++++ drivers/gpu/drm/imx/dc/dc-fu.c | 241 +++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-fu.h | 129 ++++++++++++++ drivers/gpu/drm/imx/dc/dc-fw.c | 149 ++++++++++++++++ drivers/gpu/drm/imx/dc/dc-lb.c | 300 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.c | 140 +++++++++++++++ drivers/gpu/drm/imx/dc/dc-pe.h | 91 ++++++++++ 12 files changed, 1625 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..4fb2bbc67b4a --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-cf.c @@ -0,0 +1,157 @@ +// 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 WIDTH(w) (((w) - 1) & 0x3fff) +#define HEIGHT(h) ((((h) - 1) & 0x3fff) << 16) + +#define CONSTANTCOLOR 0x10 +#define BLUE(b) (((b) & 0xff) << 8) + +struct dc_cf_priv { + struct dc_cf cf; + void __iomem *reg_cfg; + enum dc_link_id link; +}; + +static inline struct dc_cf_priv *to_cf_priv(struct dc_cf *cf) +{ + return container_of(cf, struct dc_cf_priv, cf); +} + +static inline void dc_cf_write(struct dc_cf *cf, unsigned int offset, u32 value) +{ + struct dc_cf_priv *priv = to_cf_priv(cf); + + writel(value, priv->reg_cfg + offset); +} + +static void dc_cf_enable_shden(struct dc_cf *cf) +{ + dc_cf_write(cf, STATICCONTROL, SHDEN); +} + +enum dc_link_id dc_cf_get_link_id(struct dc_cf *cf) +{ + struct dc_cf_priv *priv = to_cf_priv(cf); + + return priv->link; +} + +void dc_cf_framedimensions(struct dc_cf *cf, unsigned int w, + unsigned int h) +{ + dc_cf_write(cf, FRAMEDIMENSIONS, WIDTH(w) | HEIGHT(h)); +} + +void dc_cf_constantcolor_black(struct dc_cf *cf) +{ + dc_cf_write(cf, CONSTANTCOLOR, 0); +} + +void dc_cf_constantcolor_blue(struct dc_cf *cf) +{ + dc_cf_write(cf, 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; + struct dc_cf_priv *priv; + int id; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(priv->reg_cfg)) + return PTR_ERR(priv->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] = &priv->cf; + priv->link = LINK_ID_CONSTFRAME0; + break; + case 1: + pe->cf_cont[1] = &priv->cf; + priv->link = LINK_ID_CONSTFRAME1; + break; + case 4: + pe->cf_safe[0] = &priv->cf; + priv->link = LINK_ID_CONSTFRAME4; + break; + case 5: + pe->cf_safe[1] = &priv->cf; + priv->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", + .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..5357ae33c505 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ed.c @@ -0,0 +1,266 @@ +// 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 0xff0000 +#define DIV(n) (((n) & 0xff) << 16) +#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) + +struct dc_ed_priv { + struct dc_ed ed; + void __iomem *reg_pec; + void __iomem *reg_cfg; +}; + +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 struct dc_ed_priv *to_ed_priv(struct dc_ed *ed) +{ + return container_of(ed, struct dc_ed_priv, ed); +} + +static inline u32 dc_pec_ed_read(struct dc_ed *ed, unsigned int offset) +{ + struct dc_ed_priv *priv = to_ed_priv(ed); + + return readl(priv->reg_pec + offset); +} + +static inline void +dc_pec_ed_write(struct dc_ed *ed, unsigned int offset, u32 value) +{ + struct dc_ed_priv *priv = to_ed_priv(ed); + + writel(value, priv->reg_pec + offset); +} + +static inline void +dc_pec_ed_write_mask(struct dc_ed *ed, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_pec_ed_read(ed, offset); + tmp &= ~mask; + dc_pec_ed_write(ed, offset, tmp | value); +} + +static inline u32 dc_ed_read(struct dc_ed *ed, unsigned int offset) +{ + struct dc_ed_priv *priv = to_ed_priv(ed); + + return readl(priv->reg_cfg + offset); +} + +static inline void dc_ed_write(struct dc_ed *ed, unsigned int offset, u32 value) +{ + struct dc_ed_priv *priv = to_ed_priv(ed); + + writel(value, priv->reg_cfg + offset); +} + +static inline void +dc_ed_write_mask(struct dc_ed *ed, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_ed_read(ed, offset); + tmp &= ~mask; + dc_ed_write(ed, offset, tmp | value); +} + +static void dc_ed_pec_enable_shden(struct dc_ed *ed) +{ + dc_pec_ed_write_mask(ed, PIXENGCFG_STATIC, SHDEN, SHDEN); +} + +static void dc_ed_pec_poweron(struct dc_ed *ed) +{ + dc_pec_ed_write_mask(ed, PIXENGCFG_STATIC, POWERDOWN, 0); +} + +static void dc_ed_pec_sync_mode_single(struct dc_ed *ed) +{ + dc_pec_ed_write_mask(ed, PIXENGCFG_STATIC, SYNC_MODE, SINGLE); +} + +static void dc_ed_pec_div_reset(struct dc_ed *ed) +{ + dc_pec_ed_write_mask(ed, 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) { + dc_pec_ed_write(ed, PIXENGCFG_DYNAMIC, src); + return; + } + } +} + +void dc_ed_pec_sync_trigger(struct dc_ed *ed) +{ + dc_pec_ed_write(ed, PIXENGCFG_TRIGGER, SYNC_TRIGGER); +} + +static void dc_ed_enable_shden(struct dc_ed *ed) +{ + dc_ed_write_mask(ed, STATICCONTROL, SHDEN, SHDEN); +} + +static void dc_ed_kick_mode_external(struct dc_ed *ed) +{ + dc_ed_write_mask(ed, STATICCONTROL, KICK_MODE, EXTERNAL); +} + +static void dc_ed_disable_perfcountmode(struct dc_ed *ed) +{ + dc_ed_write_mask(ed, STATICCONTROL, PERFCOUNTMODE, 0); +} + +static void dc_ed_disable_gamma_apply(struct dc_ed *ed) +{ + dc_ed_write_mask(ed, 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; + struct dc_ed_priv *priv; + int id; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(priv->reg_pec)) + return PTR_ERR(priv->reg_pec); + + priv->reg_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(priv->reg_cfg)) + return PTR_ERR(priv->reg_cfg); + + priv->ed.irq_shdld = platform_get_irq_byname(pdev, "shdload"); + if (priv->ed.irq_shdld < 0) + return priv->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; + } + + priv->ed.dev = dev; + + switch (id) { + case 0: + pe->ed_cont[0] = &priv->ed; + break; + case 1: + pe->ed_cont[1] = &priv->ed; + break; + case 4: + pe->ed_safe[0] = &priv->ed; + break; + case 5: + pe->ed_safe[1] = &priv->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", + .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..7a535be32cbd --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fl.c @@ -0,0 +1,136 @@ +// 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 FRAMEDIMENSIONS 0x150 + +struct dc_fl { + struct dc_fu fu; + int id; +}; + +static void +dc_fl_set_fmt(struct dc_fu *fu, const struct drm_format_info *format) +{ + u32 bits = 0, shifts = 0; + + dc_fu_set_src_bpp(fu, format->cpp[0] * 8); + + dc_fu_write_mask(fu, LAYERPROPERTY(fu), 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); + + dc_fu_write(fu, COLORCOMPONENTBITS(fu), bits); + dc_fu_write(fu, COLORCOMPONENTSHIFT(fu), shifts); +} + +static void dc_fl_set_framedimensions(struct dc_fu *fu, int w, int h) +{ + dc_fu_write(fu, 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; + struct dc_fl *fl; + struct dc_fu *fu; + + fl = drmm_kzalloc(&dc_drm->base, sizeof(*fl), GFP_KERNEL); + if (!fl) + return -ENOMEM; + + fu = &fl->fu; + + fu->reg_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(fu->reg_pec)) + return PTR_ERR(fu->reg_pec); + + fu->reg_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + 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; + fu->sub_id = 0; + 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", + .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..88793b2366fe --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fu.c @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include + +#include "dc-fu.h" +#include "dc-pe.h" + +#define STATICCONTROL 0x8 +#define SHDLDREQSTICKY(lm) (((lm) & 0xff) << 24) +#define SHDLDREQSTICKY_MASK (0xff << 24) +#define BASEADDRESSAUTOUPDATE(lm) (((lm) & 0xff) << 16) +#define BASEADDRESSAUTOUPDATE_MASK (0xff << 16) + +#define BURSTBUFFERMANAGEMENT 0xc +#define SETBURSTLENGTH(n) (((n) & 0x1f) << 8) +#define SETBURSTLENGTH_MASK 0x1f00 +#define SETNUMBUFFERS(n) ((n) & 0xff) +#define SETNUMBUFFERS_MASK 0xff +#define LINEMODE_MASK 0x80000000 +#define LINEMODE_SHIFT 31 + +#define BASEADDRESS(fu) (0x10 + SUBID_OFFSET + REG_OFFSET) + +#define SOURCEBUFFERATTRIBUTES(fu) (0x14 + SUBID_OFFSET + REG_OFFSET) +#define BITSPERPIXEL_MASK 0x3f0000 +#define BITSPERPIXEL(bpp) (((bpp) & 0x3f) << 16) +#define STRIDE_MASK 0xffff +#define STRIDE(n) (((n) - 1) & 0xffff) + +#define LAYEROFFSET(fu) (0x24 + SUBID_OFFSET + REG_OFFSET) +#define LAYERXOFFSET(x) ((x) & 0x7fff) +#define LAYERYOFFSET(y) (((y) & 0x7fff) << 16) + +#define CLIPWINDOWOFFSET(fu) (0x28 + SUBID_OFFSET + REG_OFFSET) +#define CLIPWINDOWXOFFSET(x) ((x) & 0x7fff) +#define CLIPWINDOWYOFFSET(y) (((y) & 0x7fff) << 16) + +#define CLIPWINDOWDIMENSIONS(fu) (0x2c + SUBID_OFFSET + REG_OFFSET) +#define CLIPWINDOWWIDTH(w) (((w) - 1) & 0x3fff) +#define CLIPWINDOWHEIGHT(h) ((((h) - 1) & 0x3fff) << 16) + +#define CONSTANTCOLOR(fu) (0x30 + SUBID_OFFSET + REG_OFFSET) + +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 void dc_fu_enable_shden(struct dc_fu *fu) +{ + dc_fu_write_mask(fu, STATICCONTROL, SHDEN, SHDEN); +} + +static void dc_fu_baddr_autoupdate(struct dc_fu *fu, u8 layer_mask) +{ + dc_fu_write_mask(fu, STATICCONTROL, BASEADDRESSAUTOUPDATE_MASK, + BASEADDRESSAUTOUPDATE(layer_mask)); +} + +void dc_fu_shdldreq_sticky(struct dc_fu *fu, u8 layer_mask) +{ + dc_fu_write_mask(fu, STATICCONTROL, SHDLDREQSTICKY_MASK, + SHDLDREQSTICKY(layer_mask)); +} + +static void dc_fu_set_linemode(struct dc_fu *fu, enum dc_linemode mode) +{ + dc_fu_write_mask(fu, BURSTBUFFERMANAGEMENT, LINEMODE_MASK, mode); +} + +static void dc_fu_set_numbuffers(struct dc_fu *fu, unsigned int num) +{ + dc_fu_write_mask(fu, 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; + + dc_fu_write_mask(fu, BURSTBUFFERMANAGEMENT, SETBURSTLENGTH_MASK, + SETBURSTLENGTH(burst_length)); +} + +static void dc_fu_set_baseaddress(struct dc_fu *fu, dma_addr_t baddr) +{ + dc_fu_write(fu, BASEADDRESS(fu), baddr); +} + +void dc_fu_set_src_bpp(struct dc_fu *fu, unsigned int bpp) +{ + dc_fu_write_mask(fu, SOURCEBUFFERATTRIBUTES(fu), BITSPERPIXEL_MASK, + BITSPERPIXEL(bpp)); +} + +static void dc_fu_set_src_stride(struct dc_fu *fu, unsigned int stride) +{ + dc_fu_write_mask(fu, SOURCEBUFFERATTRIBUTES(fu), STRIDE_MASK, + STRIDE(stride)); +} + +static void dc_fu_set_src_buf_dimensions(struct dc_fu *fu, int w, int h) +{ + dc_fu_write(fu, SOURCEBUFFERDIMENSION(fu), LINEWIDTH(w) | LINECOUNT(h)); +} + +static void dc_fu_layeroffset(struct dc_fu *fu, unsigned int x, unsigned int y) +{ + dc_fu_write(fu, LAYEROFFSET(fu), LAYERXOFFSET(x) | LAYERYOFFSET(y)); +} + +static void dc_fu_clipoffset(struct dc_fu *fu, unsigned int x, unsigned int y) +{ + dc_fu_write(fu, CLIPWINDOWOFFSET(fu), + CLIPWINDOWXOFFSET(x) | CLIPWINDOWYOFFSET(y)); +} + +static void +dc_fu_clipdimensions(struct dc_fu *fu, unsigned int w, unsigned int h) +{ + dc_fu_write(fu, CLIPWINDOWDIMENSIONS(fu), + CLIPWINDOWWIDTH(w) | CLIPWINDOWHEIGHT(h)); +} + +static void dc_fu_set_pixel_blend_mode(struct dc_fu *fu) +{ + dc_fu_write(fu, LAYERPROPERTY(fu), 0); + dc_fu_write(fu, CONSTANTCOLOR(fu), 0); +} + +static void dc_fu_enable_src_buf(struct dc_fu *fu) +{ + dc_fu_write_mask(fu, LAYERPROPERTY(fu), SOURCEBUFFERENABLE, + SOURCEBUFFERENABLE); +} + +static void dc_fu_disable_src_buf(struct dc_fu *fu) +{ + dc_fu_write_mask(fu, LAYERPROPERTY(fu), 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) +{ + dc_fu_baddr_autoupdate(fu, 0x0); + dc_fu_enable_shden(fu); + dc_fu_set_linemode(fu, LINEMODE_DISPLAY); + dc_fu_layeroffset(fu, 0x0, 0x0); + dc_fu_clipoffset(fu, 0x0, 0x0); + dc_fu_clipdimensions(fu, 0x0, 0x0); + dc_fu_set_numbuffers(fu, 16); + dc_fu_disable_src_buf(fu); + dc_fu_set_pixel_blend_mode(fu); +} 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..c7c84db85d87 --- /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 "dc-pe.h" + +#define REG_OFFSET ((fu)->reg_offset) +#define SUBID_OFFSET (((fu)->sub_id) * 0x28) + +#define SOURCEBUFFERDIMENSION(fu) (0x18 + SUBID_OFFSET + REG_OFFSET) +#define LINEWIDTH(w) (((w) - 1) & 0x3fff) +#define LINECOUNT(h) ((((h) - 1) & 0x3fff) << 16) + +#define COLORCOMPONENTBITS(fu) (0x1c + SUBID_OFFSET + REG_OFFSET) +#define R_BITS(n) (((n) & 0xf) << 24) +#define G_BITS(n) (((n) & 0xf) << 16) +#define B_BITS(n) (((n) & 0xf) << 8) +#define A_BITS(n) ((n) & 0xf) + +#define COLORCOMPONENTSHIFT(fu) (0x20 + SUBID_OFFSET + REG_OFFSET) +#define R_SHIFT(n) (((n) & 0x1f) << 24) +#define G_SHIFT(n) (((n) & 0x1f) << 16) +#define B_SHIFT(n) (((n) & 0x1f) << 8) +#define A_SHIFT(n) ((n) & 0x1f) + +#define LAYERPROPERTY(fu) (0x34 + SUBID_OFFSET + REG_OFFSET) +#define YUVCONVERSIONMODE_MASK 0x60000 +#define YUVCONVERSIONMODE(m) (((m) & 0x3) << 17) +#define SOURCEBUFFERENABLE BIT(31) +#define FRAMEWIDTH(w) (((w) - 1) & 0x3fff) +#define FRAMEHEIGHT(h) ((((h) - 1) & 0x3fff) << 16) +#define INPUTSELECT_MASK 0x18 +#define INPUTSELECT(s) (((s) & 0x3) << 3) +#define RASTERMODE_MASK 0x7 +#define RASTERMODE(m) ((m) & 0x7) + +enum dc_yuvconversionmode { + YUVCONVERSIONMODE_OFF, +}; + +enum dc_inputselect { + INPUTSELECT_INACTIVE, +}; + +enum dc_rastermode { + RASTERMODE_NORMAL, +}; + +enum { + DC_FETCHUNIT_FL0, + DC_FETCHUNIT_FW2, +}; + +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, dma_addr_t baddr); + void (*set_src_stride)(struct dc_fu *fu, unsigned int stride); + void (*set_src_buf_dimensions)(struct dc_fu *fu, int w, int h); + void (*set_fmt)(struct dc_fu *fu, const struct drm_format_info *format); + void (*enable_src_buf)(struct dc_fu *fu); + void (*disable_src_buf)(struct dc_fu *fu); + 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 { + void __iomem *reg_pec; + void __iomem *reg_cfg; + char name[13]; + unsigned int reg_offset; + unsigned int id; + unsigned int sub_id; /* for fractional fetch units */ + 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; + +static inline void +dc_pec_fu_write(struct dc_fu *fu, unsigned int offset, u32 value) +{ + writel(value, fu->reg_pec + offset); +} + +static inline u32 dc_fu_read(struct dc_fu *fu, unsigned int offset) +{ + return readl(fu->reg_cfg + offset); +} + +static inline void dc_fu_write(struct dc_fu *fu, unsigned int offset, u32 value) +{ + writel(value, fu->reg_cfg + offset); +} + +static inline void +dc_fu_write_mask(struct dc_fu *fu, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_fu_read(fu, offset); + tmp &= ~mask; + dc_fu_write(fu, offset, tmp | value); +} + +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, 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..5f0b6ef11b17 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-fw.c @@ -0,0 +1,149 @@ +// 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 FRAMEDIMENSIONS 0x150 +#define CONTROL 0x170 + +struct dc_fw { + struct dc_fu fu; + int id; +}; + +static void +dc_fw_set_fmt(struct dc_fu *fu, const struct drm_format_info *format) +{ + u32 val, bits = 0, shifts = 0; + + dc_fu_set_src_bpp(fu, format->cpp[0] * 8); + + val = dc_fu_read(fu, CONTROL); + val &= ~INPUTSELECT_MASK; + val &= ~RASTERMODE_MASK; + val |= INPUTSELECT(INPUTSELECT_INACTIVE); + val |= RASTERMODE(RASTERMODE_NORMAL); + dc_fu_write(fu, CONTROL, val); + + val = dc_fu_read(fu, LAYERPROPERTY(fu)); + val &= ~YUVCONVERSIONMODE_MASK; + val |= YUVCONVERSIONMODE(YUVCONVERSIONMODE_OFF); + dc_fu_write(fu, LAYERPROPERTY(fu), val); + + dc_fu_get_pixel_format_bits(fu, format->format, &bits); + dc_fu_get_pixel_format_shifts(fu, format->format, &shifts); + + dc_fu_write(fu, COLORCOMPONENTBITS(fu), bits); + dc_fu_write(fu, COLORCOMPONENTSHIFT(fu), shifts); +} + +static void dc_fw_set_framedimensions(struct dc_fu *fu, int w, int h) +{ + dc_fu_write(fu, FRAMEDIMENSIONS, FRAMEWIDTH(w) | FRAMEHEIGHT(h)); +} + +static void dc_fw_init(struct dc_fu *fu) +{ + dc_pec_fu_write(fu, 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; + struct dc_fw *fw; + struct dc_fu *fu; + + fw = drmm_kzalloc(&dc_drm->base, sizeof(*fw), GFP_KERNEL); + if (!fw) + return -ENOMEM; + + fu = &fw->fu; + + fu->reg_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(fu->reg_pec)) + return PTR_ERR(fu->reg_pec); + + fu->reg_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + 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; + fu->sub_id = 0; + 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", + .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..9deda4c18a0a --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-lb.c @@ -0,0 +1,300 @@ +// 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 0x3f +#define PIXENGCFG_DYNAMIC_SEC_SEL_SHIFT 8 +#define PIXENGCFG_DYNAMIC_SEC_SEL_MASK 0x3f00 + +#define STATICCONTROL 0x8 +#define SHDTOKSEL_MASK 0x18 +#define SHDTOKSEL(n) ((n) << 3) +#define SHDLDSEL_MASK 0x6 +#define SHDLDSEL(n) ((n) << 1) + +#define CONTROL 0xc +#define CTRL_MODE_MASK BIT(0) + +#define BLENDCONTROL 0x10 +#define ALPHA(a) (((a) & 0xff) << 16) +#define PRIM_C_BLD_FUNC__ZERO 0x0 +#define SEC_C_BLD_FUNC__CONST_ALPHA (0x6 << 4) +#define PRIM_A_BLD_FUNC__ZERO (0x0 << 8) +#define SEC_A_BLD_FUNC__ZERO (0x0 << 12) + +#define POSITION 0x14 +#define XPOS(x) ((x) & 0x7fff) +#define YPOS(y) (((y) & 0x7fff) << 16) + +struct dc_lb_priv { + struct dc_lb lb; + void __iomem *reg_pec; + void __iomem *reg_cfg; + enum dc_link_id link; +}; + +enum dc_lb_shadow_sel { + BOTH = 0x2, +}; + +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, +}; + +static inline struct dc_lb_priv *to_lb_priv(struct dc_lb *lb) +{ + return container_of(lb, struct dc_lb_priv, lb); +} + +static inline u32 dc_pec_lb_read(struct dc_lb *lb, unsigned int offset) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + + return readl(priv->reg_pec + offset); +} + +static inline void +dc_pec_lb_write(struct dc_lb *lb, unsigned int offset, u32 value) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + + writel(value, priv->reg_pec + offset); +} + +static inline void +dc_pec_lb_write_mask(struct dc_lb *lb, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_pec_lb_read(lb, offset); + tmp &= ~mask; + dc_pec_lb_write(lb, offset, tmp | value); +} + +static inline u32 dc_lb_read(struct dc_lb *lb, unsigned int offset) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + + return readl(priv->reg_cfg + offset); +} + +static inline void dc_lb_write(struct dc_lb *lb, unsigned int offset, u32 value) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + + writel(value, priv->reg_cfg + offset); +} + +static inline void +dc_lb_write_mask(struct dc_lb *lb, unsigned int offset, u32 mask, u32 value) +{ + u32 tmp; + + tmp = dc_lb_read(lb, offset); + tmp &= ~mask; + dc_lb_write(lb, offset, tmp | value); +} + +enum dc_link_id dc_lb_get_link_id(struct dc_lb *lb) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + + return priv->link; +} + +void dc_lb_pec_dynamic_prim_sel(struct dc_lb *lb, enum dc_link_id prim) +{ + struct dc_lb_priv *priv = to_lb_priv(lb); + int fixed_sels_num = ARRAY_SIZE(prim_sels) - 4; + int i; + + for (i = 0; i < fixed_sels_num + priv->lb.id; i++) { + if (prim_sels[i] == prim) { + dc_pec_lb_write_mask(lb, PIXENGCFG_DYNAMIC, + PIXENGCFG_DYNAMIC_PRIM_SEL_MASK, + 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) { + dc_pec_lb_write_mask(lb, PIXENGCFG_DYNAMIC, + PIXENGCFG_DYNAMIC_SEC_SEL_MASK, + sec << PIXENGCFG_DYNAMIC_SEC_SEL_SHIFT); + return; + } + } +} + +void dc_lb_pec_clken(struct dc_lb *lb, enum dc_pec_clken clken) +{ + dc_pec_lb_write_mask(lb, PIXENGCFG_DYNAMIC, CLKEN_MASK, CLKEN(clken)); +} + +static void dc_lb_enable_shden(struct dc_lb *lb) +{ + dc_lb_write_mask(lb, STATICCONTROL, SHDEN, SHDEN); +} + +static void dc_lb_shdtoksel(struct dc_lb *lb, enum dc_lb_shadow_sel sel) +{ + dc_lb_write_mask(lb, STATICCONTROL, SHDTOKSEL_MASK, SHDTOKSEL(sel)); +} + +static void dc_lb_shdldsel(struct dc_lb *lb, enum dc_lb_shadow_sel sel) +{ + dc_lb_write_mask(lb, STATICCONTROL, SHDLDSEL_MASK, SHDLDSEL(sel)); +} + +void dc_lb_mode(struct dc_lb *lb, enum dc_lb_mode mode) +{ + dc_lb_write_mask(lb, CONTROL, CTRL_MODE_MASK, mode); +} + +void dc_lb_blendcontrol(struct dc_lb *lb) +{ + u32 val = PRIM_A_BLD_FUNC__ZERO | SEC_A_BLD_FUNC__ZERO | + PRIM_C_BLD_FUNC__ZERO | SEC_C_BLD_FUNC__CONST_ALPHA | + ALPHA(DRM_BLEND_ALPHA_OPAQUE >> 8); + + dc_lb_write(lb, BLENDCONTROL, val); +} + +void dc_lb_position(struct dc_lb *lb, int x, int y) +{ + dc_lb_write(lb, 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_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; + struct dc_lb_priv *priv; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->reg_pec = devm_platform_ioremap_resource_byname(pdev, "pec"); + if (IS_ERR(priv->reg_pec)) + return PTR_ERR(priv->reg_pec); + + priv->reg_cfg = devm_platform_ioremap_resource_byname(pdev, "cfg"); + if (IS_ERR(priv->reg_cfg)) + return PTR_ERR(priv->reg_cfg); + + priv->lb.id = of_alias_get_id(dev->of_node, "dc0-layerblend"); + if (priv->lb.id < 0) { + dev_err(dev, "failed to get alias id: %d\n", priv->lb.id); + return priv->lb.id; + } + + priv->link = lb_links[priv->lb.id]; + + pe->lb[priv->lb.id] = &priv->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", + .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..a20a5adab231 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-pe.c @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-pe.h" + +struct dc_pe_priv { + struct dc_pe engine; + struct clk *clk_axi; +}; + +static int dc_pe_bind(struct device *dev, struct device *master, void *data) +{ + struct dc_drm_device *dc_drm = data; + struct dc_pe_priv *priv; + int ret; + + priv = drmm_kzalloc(&dc_drm->base, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->clk_axi = devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk_axi)) + return dev_err_probe(dev, PTR_ERR(priv->clk_axi), + "failed to get AXI clock\n"); + + priv->engine.dev = dev; + + dev_set_drvdata(dev, priv); + + ret = devm_pm_runtime_enable(dev); + if (ret) + return ret; + + dc_drm->pe = &priv->engine; + + 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_priv *priv = dev_get_drvdata(dev); + + clk_disable_unprepare(priv->clk_axi); + + return 0; +} + +static int dc_pe_runtime_resume(struct device *dev) +{ + struct dc_pe_priv *priv = dev_get_drvdata(dev); + struct dc_pe *engine = &priv->engine; + int i, ret; + + ret = clk_prepare_enable(priv->clk_axi); + if (ret) { + dev_err(dev, "failed to enable AXI clock: %d\n", ret); + return ret; + } + + for (i = 0; i < ARRAY_SIZE(engine->cf_safe); i++) + dc_cf_init(engine->cf_safe[i]); + + for (i = 0; i < ARRAY_SIZE(engine->cf_cont); i++) + dc_cf_init(engine->cf_cont[i]); + + for (i = 0; i < ARRAY_SIZE(engine->ed_safe); i++) + dc_ed_init(engine->ed_safe[i]); + + for (i = 0; i < ARRAY_SIZE(engine->ed_cont); i++) + dc_ed_init(engine->ed_cont[i]); + + for (i = 0; i < ARRAY_SIZE(engine->fu_disp); i++) + engine->fu_disp[i]->ops.init(engine->fu_disp[i]); + + for (i = 0; i < ARRAY_SIZE(engine->lb); i++) + dc_lb_init(engine->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", + .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..82fee7fe112d --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-pe.h @@ -0,0 +1,91 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_PIXEL_ENGINE_H__ +#define __DC_PIXEL_ENGINE_H__ + +#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 dc_ed { + struct device *dev; + int irq_shdld; +}; + +struct dc_lb { + int id; +}; + +struct dc_pe { + struct device *dev; + 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_blendcontrol(struct dc_lb *lb); +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 Fri Jul 12 09:32:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 675E6C3DA4A for ; Fri, 12 Jul 2024 09:25:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E22F410EC80; Fri, 12 Jul 2024 09:25:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="eWPV7BwH"; dkim-atps=neutral Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013055.outbound.protection.outlook.com [52.101.67.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id A065610EC80 for ; Fri, 12 Jul 2024 09:25:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GljZOUEgSsPA4Ts08SUT46B3KYS3PR5WTPDqfaBmVgYgTYA0Ntv+XM9Rvn1AhMsddFZJuR0wMcXwmExquTGcnaagvom+XRNEMM1v2tWORM0hH4zHBn11SwwQAff6Cd+gaegGUSxnLCio+Un/V1uKLGRplTL/kM2Da/8e0F8gJDeUVDz0W8h325aJp8eCGvOkLJ24zDNbtebq8DpVjb4ydFZNDCAhNQQ4fkxTpVoVc05yBexdPieIcXXr5kPU8qhSZqaHGIOg+hBsc3ZovAszwQTRLW1v7oU9czO610D01U7PUcGI+31ew3Dd4is5pUSA9/w9IIRL8GISbTQY6BIbKA== 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=7k+ddR49ukOMTj9E87tZVKQ216l7teCBeBnwO7gDxd0=; b=ub+vqchgaJ7mcQ4unFbeCMieq58I5UNlcdc/b8oMmeNdafjmlrJS4+jefo3PUf8uCm7nDYau9BNOcerMataCVUOGjYdl4W+cs8oHatTkC7g+ZnmJhZSaqyOQwh62X97X0zGTfdNRvXlQibDRYVVgNe1fc2/KohxEwGjLt9O/z6oDXn6uHKp3fdg250HyZasoWh0kl+v4+BUES2znR0z7TCu6Vx/DbiXBQpun5BNXRODXFip1zpXcX5Nygg1MUSVgkyOE9QGpyQmO6g0FnxYAwfxpqVXNR7X2rSfYfFPdGmqDd/xW6wTjXcpO9I5+3ucCCYLHuTsVEJpBTBkiX8cTYA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7k+ddR49ukOMTj9E87tZVKQ216l7teCBeBnwO7gDxd0=; b=eWPV7BwHYzmg4SU4jYlK4oOgst/AwbGTHwcioLezvwOhmUTwUeMN7JJvCjblLkISwVe0IrbnSNbRomRlX7beGEypZer22JHZCDhZZ2jF58MEKyZx+KIDBKcvHNoKGjpXPvOvbsCly575kJOQZ97txmoKKhUTYDPWKjh220gA/I4= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25:34 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25:34 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 08/16] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Fri, 12 Jul 2024 17:32:35 +0800 Message-Id: <20240712093243.2108456-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b995a70-7b11-4a8a-06d2-08dca25494ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 19yGD+ZbW5zoRXsplPdqwFGanWLCF+0PpEMpEd2e0tIrVOBkF0Z0BHEpAbop7X0vsI24Ximc05rQITlF8xEQwjSmhcxhGSC6CjrtkwN7KFDx+zvf7tuSftfVfuGNZfESm65NCWv4Nauh5BFdI1scYFuEtA7Vx7PJQIV4eYEV2dzynyysqm2YtddS8z38e42Kb7oOgLKOzGoj0WjxlyXSKE6Zt2+8Tr+4RvpZ1w53JKzUIJg2O93Twv0rOJPDBloBnnvkunH66YEa3p2fbLCAkmE42N0T3SXjITyS1TkM1A3t/jYYF1LZBZxFKbqOEhzN2jXzbnZEwi+g0iBTstuD6vHoEtiHl6JpBekNcAoe50fUSmED7nh3JtXmki8QOJtYDIwmLOAFUkZvQfRF+/SUwXjGwZclKkMOz9DY2RIX+okgID7bFy+V3Juvz5MCiGnnX1G9Q/cxOwi55N2iVTCu+ScpWEogfmgg/jP0kPuo6SB0q7Nqta7Y3KTrcIKSZ+pAGEUDSiTJjRZzlnAhlLdKvP5AJ/XomLZMPQCXrXF2L6UXRYjZzpnExjdoeWv700iC6gyWuZfPufBlxwXr0Enzbva6CFUvJY3CebOAvg8hn/UiZFNC7ThHIolu2Tn0aRhg4M3QFdf7+Apj34YFYIgTl1jJhOBrcfY6QQyBGejUzGDdsW/Ew5CULZVvV7DrlaSbXZGRmyWL5UvmTIHJ46LCQCnRmIMiqyW8QYZmrTit5JnM9rDHk+zn+oZt42iDTmdyQ2XWxUdW8z7c6dKSQhMkOxJ8ikNzHktoUI4DRprxEphngbvkyuaFXkyEsLjM+zNtfd0q47dz/w8nEVLE5jcuWoB9ujElwjETSvOQbBt3OephNwUcdl/nsLLcQsoekH0SSNyI9fEogAiteSHRnJjq6TzhKHOw4JCYZ9r2qSLyYH6afDAHw1OaZ+Hu8Qx5zDegR8BaP4JEi9I44J1ivimCuGyMoJnGxUyQ4iZ4YoLVrfKH6CgnHGU/gzX7a96ykQeVtVuKwgcxDQdGW/0ItcheE4tI4glEl0u291M8rvqTRL0FRtUdUJbYp16IDyIYR6cyNSCyTkVTaQ/lSzDFu9OKzLFUBAA/yGu+sqBRh2BAxxKr49FsMjOsdl57/FT7oImzTDXD8JTN8qcQvAw4W+p9aBeRb0XeDC0LLiyMUQKaSK581ZTtE8kn18S9yEwwg6q7NKNvQalz4cBFNPHICyW2YlzqXZnE+bTvkRI98eVVsxAqbdTQw5bC2cjf9nOFLWLsTtJ5RkJ0U+CgPG+1XWZ6ddrDTtfAXNailRM3t5f6emw2VvLyVD8Z5m4J9Vw9eUeoGzbgaCu4aymKrCpPPBAL+my+OpoS5y8aPUTf7yBdBL3BPnp7sSTAc/6yHBQq/kTIlEpHBjVGlJnDyR6WL/OuDg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S6fGw02i22WuE5NDJzaGbkwkpmzJkuAI4Yh6O30fVge2Hw5sCmlVWOXW04mQ+A52ElzmGpgS73TioH7GAIV+vgLrdNnlQczhAqigw+1DK9cHAd6wrEBkjoXhF5269snB3kfRKeAgzvorGnzzjuRJTQmc4zXjOpII2M3xnYcMi4tCkWes5b60zYjx5YltyeYhBLTKXrRFcbGqXDPr7FoSoDyi4M1qb04Q5afTfHjUUurZ2PfxUYNSU1zVif/DNRiTdPcDBf8GwhyKd0SNnKpkmAZIUX/1z8zDfM+xojkVSG5DzbXGvYZtcNBzRIOIQyfFccKbg+nQLOq6tpE9C+mUHs8J6bFgZF7MXoDs+rhLbRFV47AfGE6vDZMFrsp39wVgevF03Y4B+yAe7WNaWTjbtbb2ckpepWMMoKEWXvtGUWE9BEvuo6YntUEq7FMtRKmXoRJ7hVB+84/iDpxERidnX3Qxk8ryJ17vt87q7q3qRt8JFyIEVSuw/zWOAeKQl1M38tp+dPwwCsNsNlSgP+/03WtfBMEzIpLuGtP947lFyI1TuHYMWDrbGsp5Td8nayo2qI39ABc01jOUjUXI9Vhv8RsISRbjzAE6xHgckgMqgasmgU/6WFDhWIar0aHYo+afWSxV60XBzU7Tjb7uDtdDlhp/nj+3vbdqyUWyvARVDZM2RJkWqp8Rl2V7DKKJrmjBIw+M75SjgydJPy7MVkRB/Dfs1Py2cAKbb4cWkZhZZamM5H9qCLdq1hYDQm3rbnFoWRcu6zbWGv7zXfifwrxnf/HdyIuQkjHc56AxRwuMuzB4JQ4X2wvrJ2K5KPOybrk1deHDw8YA/pt9CuSe85NmNi83wQp1155+aVAsubK6/xyNaQJlp9PXXe82j5o+ZQItDRjfRPtkNW1to1HIoULEBiytJAuSMLjrwDsVC3itiwoeNQyKPXYB+JPq8uyVkdAHJj8OR+Hv9PBswfHnslynRFGm4QuKVlniETPCxSxmT8X+danJ6NdD6IiybihUKdZ5+bPXdo/hXA80STLCtEgPcoRyGxHOJD8UXrTPTkt1BrOXYjC2/sPq0EZaORqpt509Z13f8b9qKtdi43doPiTO89HEk7Qi3+EhrL10l1B6aelpVuw3nXAuqL9jZCwv1NAFnn7eZk/ZngrLUZiNhLX1uf//Uc9/m8s7yVyH114mp2jLbIxkp9yRs8EnQFbFYtf98dxc42P8ra+Q7TTvAnYhaGJk81CKHci5k52afXwx2P1ANnYwcw4z7Bk2NSFXgx3dFXba4mfyPYVgMbKok3enwv+o1BV6oLK2aYjaimAfstClNHJqKWscBdgbA/p6e2+n5Y3ykVwlEoXH8nkpbTRR1Y6eM+y3NYSG/atQKv+p4RX2e2wXf6G33kLZQq6eA1QoYQwbHW3GKiwius401526plNj80UEETwSVJA/JHuo+ewjXIjy5Z2yrWFffdthJbXxP+TuhhflbLAAP6C73/Ng9I2p0BkEHonN6Nlo9kmSUtq0h8lF9WEP8MwO9QbH/4HCyo2/qcGfk0ix6Smbyie4xykOBW7hXJGrJDBiKJESNzGyiDaaGzvu9NzhHxYR8D3w X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b995a70-7b11-4a8a-06d2-08dca25494ea X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:34.1582 (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: e+3v4zTOUuNIkxxrICmNDE/uHduk1b9wU3DDzDWjmBeqJyzoQvAzjWt9zvKmwT93Yu81vTbyZFVZ7AvSg4K/Dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller has a built-in interrupt controller to support Enable/Status/Preset/Clear interrupt bit. Add driver for it. Signed-off-by: Liu Ying --- 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 | 249 ++++++++++++++++++++++++++++++++ 5 files changed, 253 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..8540a0414b39 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-ic.c @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "dc-drv.h" + +#define USERINTERRUPTMASK(n) (0x8 + 4 * (n)) +#define INTERRUPTENABLE(n) (0x10 + 4 * (n)) +#define INTERRUPTCLEAR(n) (0x20 + 4 * (n)) +#define INTERRUPTSTATUS(n) (0x28 + 4 * (n)) +#define USERINTERRUPTENABLE(n) (0x40 + 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 { + void __iomem *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 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 virq; + u32 status; + + chained_irq_enter(irq_desc_get_chip(desc), desc); + + status = readl(data->regs + USERINTERRUPTSTATUS(entry->irq / 32)); + status &= readl(data->regs + USERINTERRUPTENABLE(entry->irq / 32)); + + 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_bind(struct device *dev, struct device *master, void *master_data) +{ + struct platform_device *pdev = to_platform_device(dev); + struct dc_drm_device *dc_drm = master_data; + struct dc_ic_entry *entry; + struct irq_chip_generic *gc; + struct dc_ic_data *data; + struct irq_chip_type *ct; + int i, ret; + + data = drmm_kzalloc(&dc_drm->base, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + entry = drmm_kcalloc(&dc_drm->base, IRQ_COUNT, sizeof(*entry), + GFP_KERNEL); + if (!entry) + return -ENOMEM; + + data->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(data->regs)) { + dev_err(dev, "failed to initialize reg\n"); + 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"); + + 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 */ + writel(0x0, data->regs + USERINTERRUPTENABLE(i)); + writel(0x0, data->regs + INTERRUPTENABLE(i)); + writel(0xffffffff, data->regs + USERINTERRUPTCLEAR(i)); + writel(0xffffffff, data->regs + INTERRUPTCLEAR(i)); + + /* set all interrupts to user mode */ + writel(0xffffffff, data->regs + USERINTERRUPTMASK(i)); + } + + 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, &pdev->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 = data->regs; + 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_unbind(struct device *dev, struct device *master, void *master_data) +{ + struct dc_ic_data *data = dev_get_drvdata(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(dev); +} + +static const struct component_ops dc_ic_ops = { + .bind = dc_ic_bind, + .unbind = dc_ic_unbind, +}; + +static int dc_ic_probe(struct platform_device *pdev) +{ + int ret; + + ret = component_add(&pdev->dev, &dc_ic_ops); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to add component\n"); + + return 0; +} + +static void dc_ic_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dc_ic_ops); +} + +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", + .of_match_table = dc_ic_dt_ids, + .pm = pm_sleep_ptr(&dc_ic_pm_ops), + }, +}; From patchwork Fri Jul 12 09:32:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C00D0C2BD09 for ; Fri, 12 Jul 2024 09:25:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 478FB10EC82; Fri, 12 Jul 2024 09:25:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="bwhfPK3g"; dkim-atps=neutral Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013071.outbound.protection.outlook.com [52.101.67.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4922B10EC82 for ; Fri, 12 Jul 2024 09:25:44 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LhhOjRogBe+nTkDRWnPFe16oaQkys9pAum4z6kNpmMaT+ARi7dX4O0iT8nOoQTj70TzR94IAAzXjF5B+cs3V6Rpln8I5dDcnvDOPTBzr5aeJeNaaOqkjmsFDRSHwbgpldlb/rjDT+Bxzg5xDwvcs2VHRkjw79RRgJhz4DYRF9CnuOyCzp0+6uVEFIOdLehmvZvI07ammXz7S8wgRkV4azjJMmgwlvgw6ITZoLk2eaYLcwb0V4VCbOmFRbt5GJl1llnAPCu7pPtcWaoAXgLjjeaTFI2V90gTQyFQj3Lvb4k4NDaH9MMX9O1IFzOETOgVt8lrfqSrJdgikgctO5ic4SA== 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=rvitL70FRTOIRfAzVKwT3kHLGLmlWniVxqIiBoo0y2Y=; b=Z0TxA/oCLL5777cZM7vgKQTms1zgNTkRovbCVAMzYE0ViJ9OrC3Rtrwv2xr000eBpLZjMpHCFL96IkFMAiI27WIo343F9g3E+xJuf/W6x0ziKEQkBumcszHvZokGsGG69CLuNA56u5HQeY/m7OnGXcTvl7Qb9bS9xsBTkPvcCStIAG4awisfEq/OKoOLE6nkOfu3DIgeGEsg+Q8kH3xCNOutz59FVqgtlDFWrlqwgb5dfs/iYXBwqYXF5A3JYhdSpto7qVNKTmqZaY0+OTOuCrRdrBHT7f51/7t+NnP1CybomZUiN/13+BFn2BNG6akqOjmJ1uYlIwqIbeBG4pSJ2w== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rvitL70FRTOIRfAzVKwT3kHLGLmlWniVxqIiBoo0y2Y=; b=bwhfPK3gyLAMsVGBZ6ZrTSB8NcqRVQ7sLC4zCiX4gGHwz0f4ylYWhid82aP9mbm+83mDA/957UM8gFAgTfzHr5Dc952xMFilXWxwMsQLnpSiJt4vZnAoUts8IaMh9rWTRKGE+3BYeuemCpXAK05Oa2mil2zH7q1Sp0UaZdWr8hg= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25:41 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25:41 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 09/16] drm/imx: Add i.MX8qxp Display Controller KMS Date: Fri, 12 Jul 2024 17:32:36 +0800 Message-Id: <20240712093243.2108456-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 700dcf11-f9ae-4039-5355-08dca2549918 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: Ews5UEt3Ru1uYaehSMBi4RkhfaSgweuMQQKp9yUgLrmp6nuhBfx9RKOrjUXi8qCxAllhv5sjJAiekuQirvYcxcpYdC532lVNrzsA0rl9LLmafabbQw1GzTChpnX9/VhEo71MRA3G9rjguNBRtroeLqe0GOW8t56p6fAjqluXQhjRzay6SoLGSkKToGAvgfH5sE0b3MyIWS2Ugujj10U59T37rRQipqldp8vqN4Gxth2z8kGsMVRZMUxGzrkbrp9H1L/u+QDY8HLmKt14x8/wCKJ7W1wRKQGpbtq2dbfH1eeIzVWbsjZA+yy/FKekvso/XxC9hNmAEt+ABUMHeqQWmPiYWCZgIFVWBEPq7vT8eEhPRNn00V87243eUz5IFzmL1BqfUOeGwdmxhUJU1oQoiuZXeP0XcRw+/7gA9ScLtnR+8/LMwcsZfGe7aTdhdzEx/xSYEnMaCYtgUoBpEigMvpb41Ye0tW6w20JkauNxMxanrGRrTdZiOxGPMVeB/4lYfSVHyHlZ7bnWBscUfzzLFHP20LzIqZ37imBWkSkLfE9KIqfTb10/eEmov70pfe8VGR0TFMkY94HP3R6KXpCjk01Gxo4KJ47y9ZK3qhlxVF1P3JcDUb8uXj268HT09mZhiXi4PC9vhmYoio5UHKKSF82BS/8Zbmfhaii6OaGsSUJ+BLRXRutDmP8/rNG9Ou5ELhcug5G+Eq0qV3r2Ga2LQpYiP2G8VOfSLzLgLu5BqeJ9kx3LU/59jDLbX/BmtaLkNsje54AveV8KhiWfD6T0mcSpa0wJ0sHfcBmd7i+C4osVW2twtfa535eh9rew8xBqPeC3jQqAJpO56M9ydc+m9eLvZr/eto5FkZESurtymyDPwFOLafSeAfVys0yH1gzERSPBT+3H404MT8o3khkHI37lYVQDnbNQQI4RqKetWxc2aOGzZd9POR/f/cpDu9zerKhQ6ocTqBvQCEmpTZlJrAhAZe9is+xWgtkXvBC9yKGAxjIsR2uTMtiuViLPIE5mYzsINX3IP+3c7o8qxlUBD/KaxVFxqKp9K/YXfhy53A5EYT4PyV7Wxi23q52sBHcKbzjBK3atY5G4/CKPjTyQR1KF1v3VqPZm7WZNzyKYiXw1bqAkHbR2SQX0zOG/e2Ns+MvPlZDQNdbTQLQH7f8nC6RYpj46MWHjdIZUR+2dMek0MPfPQgLPjtzofR1XsxDY7hJi15zGjPFh1++VkUP7FCT5MeB5FpXN/ceygYJwdnwF1o0dihdnUzFfwU/gwaVCWOr76BoHuCneoe/GtBcrf4yWS9LEUeZpUyrp8pel2z7CNMmScHtpaYuInYuMce70rjtx8kbKHzo0Hz4Ry9L8XrzMruuDVV3mH5VTW5heg11evQkRPDfYmZzh9VG3EHNYiuRumczE96L1YBno0EwXWQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rtZpXxI7JmtPZJCovaOKQ8Kr6UYjO7o0Lp3nvBjLHeiKzJ6kEPONx8LKn73fwqVBX8GLrCdvt4WNX3PNcnE5kzdfr2Pgy7BQufUW7zEUIEk8oqdH7rHbT99KPua84mdjYp5ErUh0XcBtFWaoU/bZsBgHCYXUE9CwEK58JbZaA0veiMVl62eDV1Rdvkr1IA+a6WsRpaJqlLM6qwJnpI1LufYQkj06y+ZzhqjrzHIK/y/btyXmwOGtURmCrJVvzERArG6/t0i9Rp7g8/+HbsnQhEEyCwQtTVfXzky6PJjZb/In3+SW5vK5+rlyFvoVNYj5KnrSBO0GN6JkbipjQ/cd5h/SiwITEP3MYvFDgMTzQU+/D9sUwv/ggOrd93UkZKz3wxgMSvRh9GAjlu6B3SprSAfQ8AFA83u7f+Y5v99U6AtoNrFuN+YsUWh8oYzHLUDpyC4fpwahsDTQK17lpW99WNC88vAmJ1EVfnJzO18wj0oC9xjqTJ1+Vei/oG1xrXUxhVvNfffF94zWVAkk1htRpdwyUTlXpEiaVS/FsmtdsHOv3Ps4RSc22DBWJ7K1zcRcd6IycNvEdtiyEHBlLNm1mRoMRfKMLCr7OraE2c4aJWeLcVouE9N8kfuRBV0boN5giNE2/A0x84rlRLulTc8rUXAL0v5mxugquHGwij1vhjPyJFU10TAFJn3qYFAiQgRCrxTTdU0NI/9SC8p/TThvy/0EwV7ZTHgluTZSopL0drsehU5Zd1U52vdSFZ18l5vi5a8K1NfwDs1PnHblGFmeWspJxSjYa1DXfq5xuMNs1XJaOAbBedBD1DvL9lpAx0uS5Ro3aonuo1u/yTRRY79hqmKRUKawWmGl/yLedLq3daAK4hoN0BdVa9d9F2iXSge0/2mzgQsqiD59ymXcAgzUtvtcKtVtmeeqPu4j5HJTlN9YFPrq5C2a27NBTyhX5fb923+eGlxu1eVlhpt4p8C0lRfEytHusqJ0k48a5jrpdY3qsekSk0NyRq6eT3qmwyLFzE7jYrpU25n54RVlW7I4n1mk97m+GgjnTl8Yf90R9hI1ZR9s3Nmrhus3sJvXwoQ8TEYlCQrw17GmcslPVhjJgDqnb3CCNJs06xu4DpTTzPJSAcJ3943yE0oyHgR/nZDA7d3wQuEc1Q8arJ+PX5R6mAo2D2GbAfrgI8f2ezNhYbe47ExDms0Ah/YxDbQtQJj+/4hsyst933JXWrCORbg/+jbFF3GXkArToRZfNjISi5jYx7QEWURV7JFKv54l6nCWuJ9c/kkDLFkKyOhiybHbLgV1XXbg2jcp7OHrWhtemsLf10Mu5xqYXvpqX4N+hLNN28cqG1jUdWx8RCW2iFIbYQw7yj//bz+RI5+bYWrP5GdhyF1dMjzGsKEM0Q2ThkL0Qu4WnXDijSlmAEUQv9Q++vb2WeUUW2U9ke8hzry3Jg8vHtFtREpk5LlO3RIjeR9wOgpZO99x5szu/Ky4J93DzK7S872hIsdN5JJO8/psQay1sC8Cu87A6mQfb5iiYXPNOpsXPRbvePoTisVg9/UnBzAOjDhQAteTujcTO4LVaJKeMtWcuLzad3ZDdzc9IgRP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 700dcf11-f9ae-4039-5355-08dca2549918 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:41.2083 (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: rK0HXPWQGNJ6Ga6ipyn8IPjbpVq53G8apSMNq8aMzqQl7miKqIOaCWvZ62zuR3D5V1XgGaTQyF9rNeR7ei8qTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" i.MX8qxp Display Controller(DC) is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as well as a command sequencer. Add kernel mode setting support for the display controller part with two CRTCs and two primary planes(backed by FetchLayer and FetchWarp respectively). The registers of the display controller are accessed without command sequencer involved, instead just by using CPU. The command sequencer is supposed to be used by the blit engine. Signed-off-by: Liu Ying --- v2: * Find next bridge from TCon's port. * Drop drm/drm_module.h include from dc-drv.c. drivers/gpu/drm/imx/dc/Kconfig | 2 + drivers/gpu/drm/imx/dc/Makefile | 5 +- drivers/gpu/drm/imx/dc/dc-crtc.c | 578 ++++++++++++++++++++++++++++++ drivers/gpu/drm/imx/dc/dc-crtc.h | 67 ++++ drivers/gpu/drm/imx/dc/dc-de.h | 3 + drivers/gpu/drm/imx/dc/dc-drv.c | 236 ++++++++++++ drivers/gpu/drm/imx/dc/dc-drv.h | 21 ++ drivers/gpu/drm/imx/dc/dc-kms.c | 143 ++++++++ drivers/gpu/drm/imx/dc/dc-kms.h | 15 + drivers/gpu/drm/imx/dc/dc-plane.c | 227 ++++++++++++ drivers/gpu/drm/imx/dc/dc-plane.h | 37 ++ 11 files changed, 1332 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/imx/dc/dc-crtc.c create mode 100644 drivers/gpu/drm/imx/dc/dc-crtc.h 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 create mode 100644 drivers/gpu/drm/imx/dc/dc-plane.h diff --git a/drivers/gpu/drm/imx/dc/Kconfig b/drivers/gpu/drm/imx/dc/Kconfig index b66b815fbdf1..dac0de009273 100644 --- a/drivers/gpu/drm/imx/dc/Kconfig +++ b/drivers/gpu/drm/imx/dc/Kconfig @@ -1,6 +1,8 @@ config DRM_IMX8_DC tristate "Freescale i.MX8 Display Controller Graphics" depends on DRM && COMMON_CLK && OF && (ARCH_MXC || COMPILE_TEST) + select DRM_GEM_DMA_HELPER + select DRM_KMS_HELPER 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..e151e14a6677 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-crtc.c @@ -0,0 +1,578 @@ +// 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 "dc-crtc.h" +#include "dc-de.h" +#include "dc-drv.h" +#include "dc-pe.h" +#include "dc-plane.h" + +#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 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; + struct drm_crtc *crtc = &dc_crtc->base; + + 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); + } else { + dc_crtc_err(crtc, "invalid CRTC irq(%u)\n", irq); + return IRQ_NONE; + } + + 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_drm_device *dc_drm = to_dc_drm_device(crtc->dev); + 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); + + atomic_inc(&dc_drm->pe_rpm_count); + + 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_displaymode(dc_crtc->fg, FG_DM_SEC_ON_TOP); + dc_fg_panic_displaymode(dc_crtc->fg, FG_DM_CONSTCOL); + dc_fg_cfg_videomode(dc_crtc->fg, adj); + + dc_cf_framedimensions(dc_crtc->cf_cont, + adj->crtc_hdisplay, adj->crtc_vdisplay); + dc_cf_framedimensions(dc_crtc->cf_safe, + adj->crtc_hdisplay, adj->crtc_vdisplay); + + /* constframe in safety stream shows blue frame */ + dc_cf_constantcolor_blue(dc_crtc->cf_safe); + cf_link = dc_cf_get_link_id(dc_crtc->cf_safe); + dc_ed_pec_src_sel(dc_crtc->ed_safe, cf_link); + + /* show CRTC background if no plane is enabled */ + if (new_crtc_state->plane_mask == 0) { + /* constframe in content stream shows black frame */ + dc_cf_constantcolor_black(dc_crtc->cf_cont); + + cf_link = dc_cf_get_link_id(dc_crtc->cf_cont); + dc_ed_pec_src_sel(dc_crtc->ed_cont, cf_link); + } + + dc_fg_enable_clock(dc_crtc->fg); + dc_ed_pec_sync_trigger(dc_crtc->ed_cont); + dc_ed_pec_sync_trigger(dc_crtc->ed_safe); + dc_fg_shdtokgen(dc_crtc->fg); + dc_fg_enable(dc_crtc->fg); + + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(ed_safe_shdld_done); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(ed_cont_shdld_done); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(dec_shdld_done); + + disable_irq(dc_crtc->irq_ed_safe_shdld); + disable_irq(dc_crtc->irq_ed_cont_shdld); + disable_irq(dc_crtc->irq_dec_shdld); + + DC_CRTC_WAIT_FOR_FRAMEGEN_SECONDARY_SYNCUP(dc_crtc->fg); + + DC_CRTC_CHECK_FRAMEGEN_FIFO(dc_crtc->fg); + + drm_dev_exit(idx); + +out: + dc_crtc_queue_state_event(new_crtc_state); +} + +static void +dc_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state) +{ + struct drm_crtc_state *new_crtc_state = + drm_atomic_get_new_crtc_state(state, crtc); + struct dc_drm_device *dc_drm = to_dc_drm_device(crtc->dev); + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int idx, ret; + + if (!drm_dev_enter(crtc->dev, &idx)) + goto out; + + enable_irq(dc_crtc->irq_dec_seqcomplete); + dc_fg_disable(dc_crtc->fg); + DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(dec_seqcomplete_done); + disable_irq(dc_crtc->irq_dec_seqcomplete); + + dc_fg_disable_clock(dc_crtc->fg); + + /* request pixel engine power-off as plane is off too */ + ret = pm_runtime_put(dc_crtc->pe->dev); + if (ret) + dc_crtc_err(crtc, "failed to put DC pixel engine RPM: %d\n", + ret); + + atomic_dec(&dc_drm->pe_rpm_count); + + /* 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_drm_device *dc_drm = to_dc_drm_device(crtc->dev); + struct dc_crtc *dc_crtc = to_dc_crtc(crtc); + int ret; + + if (atomic_dec_if_positive(&dc_drm->pe_rpm_count) >= 0) { + 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); + } + + if (!dc_fg_wait_for_frame_index_moving(dc_crtc->fg)) + return; + + dc_fg_disable_clock(dc_crtc->fg); + + 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 void dc_crtc_free_irq(struct drm_device *drm, void *ptr) +{ + struct dc_crtc_irq *irq = ptr; + + free_irq(irq->irq, irq->dc_crtc); +} + +static int +dc_crtc_request_irq(struct dc_crtc *dc_crtc, struct device *dev, + unsigned int irq, + irqreturn_t (*irq_handler)(int irq, void *dev_id)) +{ + int ret; + + ret = request_irq(irq, irq_handler, IRQF_NO_AUTOEN, dev_name(dev), + dc_crtc); + if (ret < 0) + dev_err(dev, "failed to request irq(%u): %d\n", irq, ret); + + return ret; +} + +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->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, + }, + }; + struct drm_crtc *crtc = &dc_crtc->base; + int i, ret; + + dc_crtc->irqs = drmm_kcalloc(drm, ARRAY_SIZE(irqs), + sizeof(*dc_crtc->irqs), GFP_KERNEL); + if (!dc_crtc->irqs) { + dev_err(drm->dev, "failed to allocate CRTC%u irqs\n", + crtc->index); + return -ENOMEM; + } + + for (i = 0; i < ARRAY_SIZE(irqs); i++) { + struct dc_crtc_irq *irq = &dc_crtc->irqs[i]; + + ret = dc_crtc_request_irq(dc_crtc, irqs[i].dev, irqs[i].irq, + irqs[i].irq_handler); + if (ret) + return ret; + + irq->dc_crtc = dc_crtc; + irq->irq = irqs[i].irq; + + ret = drmm_add_action_or_reset(drm, dc_crtc_free_irq, irq); + if (ret) + return ret; + } + + 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; + } + + return dc_crtc_request_irqs(drm, dc_crtc); +} diff --git a/drivers/gpu/drm/imx/dc/dc-crtc.h b/drivers/gpu/drm/imx/dc/dc-crtc.h new file mode 100644 index 000000000000..9f28d0d4d712 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-crtc.h @@ -0,0 +1,67 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_CRTC_H__ +#define __DC_CRTC_H__ + +#include +#include + +#include +#include +#include + +#include "dc-de.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) + +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; +}; + +struct dc_crtc_irq { + struct dc_crtc *dc_crtc; + unsigned int irq; +}; + +static inline struct dc_crtc *to_dc_crtc(struct drm_crtc *crtc) +{ + return container_of(crtc, struct dc_crtc, base); +} + +void dc_crtc_disable_at_unbind(struct drm_crtc *crtc); + +#endif /* __DC_CRTC_H__ */ diff --git a/drivers/gpu/drm/imx/dc/dc-de.h b/drivers/gpu/drm/imx/dc/dc-de.h index 3417059c40b9..1da24c59db3e 100644 --- a/drivers/gpu/drm/imx/dc/dc-de.h +++ b/drivers/gpu/drm/imx/dc/dc-de.h @@ -11,6 +11,9 @@ #define DC_DISPLAYS 2 +#define DC_FRAMEGEN_MAX_FRAME_INDEX 0x3ffff +#define DC_FRAMEGEN_MAX_CLOCK_KHZ 300000 + enum dc_fg_syncmode { FG_SYNCMODE_OFF, /* No side-by-side synchronization. */ }; diff --git a/drivers/gpu/drm/imx/dc/dc-drv.c b/drivers/gpu/drm/imx/dc/dc-drv.c index fd68861f770a..31c82379b73f 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.c +++ b/drivers/gpu/drm/imx/dc/dc-drv.c @@ -3,11 +3,246 @@ * Copyright 2024 NXP */ +#include +#include +#include +#include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-crtc.h" +#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, + .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) { + 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(struct drm_device *drm, void *ptr) +{ + struct dc_drm_device *dc_drm = ptr; + + 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 = drmm_add_action_or_reset(drm, 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_fbdev_dma_setup(drm, 32); + + 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 +254,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..827318f1dbf3 100644 --- a/drivers/gpu/drm/imx/dc/dc-drv.h +++ b/drivers/gpu/drm/imx/dc/dc-drv.h @@ -6,19 +6,40 @@ #ifndef __DC_DRV_H__ #define __DC_DRV_H__ +#include #include #include +#include +#include "dc-crtc.h" #include "dc-de.h" +#include "dc-kms.h" #include "dc-pe.h" +#include "dc-plane.h" struct dc_drm_device { struct drm_device base; + struct dc_crtc dc_crtc[DC_CRTCS]; + struct dc_plane dc_primary[DC_PRIMARYS]; + struct drm_encoder encoder[DC_ENCODERS]; struct dc_de *de[DC_DISPLAYS]; struct dc_pe *pe; + atomic_t pe_rpm_count; }; +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_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..f426684ee37c --- /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-crtc.h" +#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 device_node *remote; + struct drm_bridge *bridge; + int ret = 0; + + remote = of_graph_get_remote_node(dc_crtc->de->tc->dev->of_node, 0, -1); + if (!of_device_is_available(remote)) + goto out; + + bridge = of_drm_find_bridge(remote); + if (!bridge) { + ret = -EPROBE_DEFER; + dev_err_probe(dev, ret, "failed to find bridge for CRTC%u\n", + crtc->index); + goto out; + } + + 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); + goto out; + } + + 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); + goto out; + } + + 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); + goto out; + } + + 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); + +out: + of_node_put(remote); + 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; + + atomic_set(&dc_drm->pe_rpm_count, 0); + + 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_CRTCS; 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; + } + + ret = drm_vblank_init(drm, DC_CRTCS); + 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..4f66b11c106a --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-kms.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_KMS_H__ +#define __DC_KMS_H__ + +#include "dc-de.h" + +#define DC_CRTCS DC_DISPLAYS +#define DC_ENCODERS DC_DISPLAYS +#define DC_PRIMARYS DC_DISPLAYS + +#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..a49b043ca167 --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-plane.c @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dc-drv.h" +#include "dc-fu.h" +#include "dc-plane.h" + +#define DC_PLANE_MAX_PITCH 0x10000 +#define DC_PLANE_MAX_PIX_CNT 8192 + +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 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, fb->pitches[0]); + fu_ops->set_src_buf_dimensions(fu, src_w, src_h); + fu_ops->set_fmt(fu, fb->format); + fu_ops->set_framedimensions(fu, src_w, src_h); + fu_ops->set_baseaddress(fu, baseaddr); + fu_ops->enable_src_buf(fu); + + 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_blendcontrol(lb); + 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); + + /* 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; +} diff --git a/drivers/gpu/drm/imx/dc/dc-plane.h b/drivers/gpu/drm/imx/dc/dc-plane.h new file mode 100644 index 000000000000..e72c3a7cb66f --- /dev/null +++ b/drivers/gpu/drm/imx/dc/dc-plane.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2024 NXP + */ + +#ifndef __DC_PLANE_H__ +#define __DC_PLANE_H__ + +#include + +#include +#include + +#include "dc-fu.h" +#include "dc-pe.h" + +#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) + +struct dc_plane { + struct drm_plane base; + struct dc_fu *fu; + struct dc_cf *cf; + struct dc_lb *lb; + struct dc_ed *ed; +}; + +static inline struct dc_plane *to_dc_plane(struct drm_plane *plane) +{ + return container_of(plane, struct dc_plane, base); +} + +#endif /* __DC_PLANE_H__ */ From patchwork Fri Jul 12 09:32:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C1A6C2BD09 for ; Fri, 12 Jul 2024 09:25:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F183410EC84; Fri, 12 Jul 2024 09:25:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="Xy14BXzJ"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011069.outbound.protection.outlook.com [52.101.70.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F3DF10EC84 for ; Fri, 12 Jul 2024 09:25:51 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jlLAXh47rYhdgjfc0kOwYua5VadNxVNeMpufQs23WPGwI4T37leY6rpY1xPhvovsqyjfDzx0qF6p/U4rAZDPAEHuJPFkB0It6BSPwJy2wt5dvZ6MGpw5MJE3v9Z38frjRg9rVDg1fWjQ4JmI/pIms6QH6n49MkXfV1xrMN1MeDcrmWeV174T2iaMtVEAm1lCNHEWR1gmew1Pb0xbj8ZUaKJnL7hxcFlMO+IlwYNoQVUYzfjBniLr46NwdKcwh87QB/yvcDEgARdIGcbGGFzFR+uALLbiSYkaQBTVKfXykzhO0lqMSETjZMLK/UNeVKfKlLuQGmjek6P5hpTkXL+Vdg== 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=WmvX2scr93brJc2U9InTcLVs2K0BGgJzpqM9K6qFG7c=; b=D359NeIwCtC2q8Kh2s5L7dDEx464o16WIf/btyfb6QV5u6jxD+aekkmK8zgMQ6/YvH89J++GrIWy6esZbXhFvIkNj8zIWkPUBHtPhbcNvRymqOEEhBheb09mYFomR/OODdhrOF8iOpNKZpObSnpoHYGUguWxajotp7npDmjX2thLzKRJC4A8KR6fQeEEP4grPMknkL3VMc/8OOrmpjna92sPIGVzC5wSMgWaW3Xfc+plFhhRoGxIoF4w3OLJ2n8YaUge7J7FuIRvpCsGECQ3UV2IZ2oWEzFrqq03mP9nEZhEBmC2o45McSmHD28mbXBieVgXMjeWllg2D5ctadN5bg== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WmvX2scr93brJc2U9InTcLVs2K0BGgJzpqM9K6qFG7c=; b=Xy14BXzJbJUQx1r0rszPAA9MuZiAxsxWC/0afurQGFkrgYUn/BMtZsw6ltxCF2TK9E1AFdbMkR5FhInAWJPXk8iEMkM4AQg2ar8HJZMkxppQc7Df7WLzvTulgMFTDQt69kOisi9blCNyBAjXwNW0IvmFx1FnpPifU+OSU3RW58w= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25:48 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25:48 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [PATCH v2 10/16] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Fri, 12 Jul 2024 17:32:37 +0800 Message-Id: <20240712093243.2108456-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 853a5dce-d4f0-4549-7a7b-08dca2549d77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 20f4sgIeBN8NY7Xp1OwRQSFZixfRsJ+jyj+4HPFMc7v/pAaf2RaRsY2mS15M7vU3WOBDIBK4swvDY9RhyZ/z88oXrKdxNLfCY4QOGPVIE+4mKsyPPMA9o0NPrJsRo1wcWq13JdCz4A7O4gEvGglfqFG49FTOWBcORu652ayv3YHGVG9j9Vt/CBPt3pWwG0qOUHs6dPNWsLAc4nNcdEPTmeQgQCeTTLVzzh1joNN9nXy1DuZwt1yMA5176K1I4oqeM+V/+iWaGnwus9fxpdlH/9hkg74PhPECH64HghMTDHpvKQz0oaVRsU7DvUfQs7uFWSrX6sBnGzfHfnelNYb/1eA+5lepy6DtTJV2fH05DofwJ2pfq/8aPyleWDoQ4kg98cz8+jHPyjEZtT9hhnzvM1dK8jWeneMJE3vbN1Fzq4Bvo+aG3yX0AjEqoYRpl1RwAiervQj9YYoQgdFF3Puj1I2it9+AVPI4kaiyvGfqjtZBf9n4TrGux8jlKXPLfwwqUrYNUuoiaxjFyG10ScObrFV7M9E/MHpaywl2RX2uMT1/1MqrVfng9ks9ncBy0bhvwLyrBZ2vVekyVvNqZrQsgBcxs6ZFKpWZOX1yY5+ZBNc8JaVxeX8TLHT/qp9YS1b1R0KNayRbXiUCPJzDHDcFdaBep5208Fz1OChnAXqHguUKUsBbLUiU9d9Y++H9lhYq+fmnSaFjEpWprOVcUk4V5d42lPZpkeXLVb1qrbriifc+tokMC35n3Lqd0XZsEfk7PCJ2/es4fKSbKTj9CuJXYgq5sCtHAXBIW6FJr1VbaPfTdWRMgN9pYP5fbhfdj9rP4lUAU0hzgrwwO4bNRYCGZsJwKrXyvzGBLarjsEEW/FA+dMQdmGGb4nULpPlgqihXz1a9LYghnhEZ2IZslvMq1SxT4+iASWvsBltYlwtCsRAPNLgWJdjC9TmkZ5LmAwPY5gBNtopsebR7ju7h0DPYIOliQbGJUDLh09OXOBbnCU+RZpTw9AeQ2soab05KNldWw6uWVMx25mCCdRKUj1mxakz8bbDolqb9espu0aySuBXgSL1jNRchCf/NUk/gpawm/quodrKrR3Wv4Zzw60TPoP/nPF9W1z58CCVngMIP+2sri5nUv/hvkAszVZHYvPVOyhLi7PAqdPBMmoSsrKQ5kgEod2t0yH9AV2e054nIXNBsfxywor9X9w6NF8eKRER6hMBx+Zm42H3OnTk75vbXxMB0fVIR0fpU316mXWzfmc3wsBLPgTOXrul24cken+OwFofSQzqJnKDdHkvBCKmmtQSdu69jhONSkznC0ZCCyNdr90e/UAHMWcwaSWODmefXsOwr3EsM+PoMsMFydt2Z3kMRkd04wf7kcFVn9gAWp2I= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mE/xK87NgBsaxTU6NZY43za/eH5R9MwKP0hjh72WUzUhYvZE79jNrnkmg/o4LbE2m4Ubq97h1hq3H7E7v+Q2W/x0obkHVWjXz+6t5o6iqHg1EL/13zRvfKKLkFWBg5s1QyPcTSnPWwsQbZGE0uNxzC56IsIBvej1qgyhFbTYZDjIIJgSt7AuHXw6vttKkKWojZVRVPUZt2tQDcSNcydiJUMDcXAGlUaJ2uT1yWljQmq3fSJ8SHAQp3QaGFpFn5SU2lC7PQ+S6Ux7gS7wo8C6OT0mKw9i2o0F62F4Z5Hm9hLOkKRjLVyUd4flpMZAgczA2waGBdxhUbQiHqLCFBkFWJHneOHNbO3+8er3ExdFQmG3zdzBXcl0gpvhSSz2RoXENv+E/slzX2SLqyKgjq59f169rJlySnVSQMwbBW0F6rsmdMpUMzJU/sILSs+jD9A/OQlDz3t0LojeD4YDK0SHRO6/yqwRoUob1+UCKoaV1XxSnq8yOqUHV+nYWrlzSFdI03zCtaBhCMPkQAWbR7LQj2lY0Nb4TbGWIU1W//j7TpxVMqkrYq6cpvdpIK7bE85g6MxoHwWsQZ9woyrrOt0UNGbHXgNMUc6AFxLjSa7RN4c9rax7kRxYuKXKvv+W343dfu+oUeFrGmGN5Dqk1xdy2vrgOMLHjy03nh8Nv2pXxdPL0V4KOKJ7qRLjLDTrtywbZv8/Pgz4Wdz8j6j6dQlWUncL3a7YySFtsu72Cddu+27ONTeHOVtxwAwHrBJ8aAi7skSGJfA+DTV2K9sJtIVdodnDNBdIhLoIwrzmO7JE+2kL5MSjlT4oP8yzpW87sOmak8y4QRvThuY8+B1zveX2Mhgz7oWUFn48SI/Prt3rUCc5dm0iOCcla7ehYm2H01/pKZKpI/rLIzV7NU9r3kLXihZo35eKwlFPKjL7guJWt53sT4/svsox5fa4mZ4ieCMQasye97irJo2IIGV//Ia7a1XXmk7M8C+veRj1kpeihCJbggDoNyPhnjiKOI0QFVoc3HSkssukb6AB6IpYnK71rUGmI8Z+CnSy/XmWBuEcov/JN8dJVZPGddeBlu7JsSrwahXXfgGBSp4sOK9Szd3ySKcfdSy61LsDcv0oAL/tTlj+OIIk9tS1qT1IvdgvLxyRYm/e/YD6WsO7HIi55tjtsk5t3ZlV1RM+DQIutl2fgsUYlgec2caA8H0LH++il0uVn1joJpwXdx2qEA0Rt/gIqKGhUuwEBHlXyGRfkZ+YKC02w+0OZ3dEUTwBudILu7GNIVvlWXD13SI69Y24I1tw7Kr2OoUgvAsd3MFoVO2QfaQvf8RjWsb0IJqfKzE0H7HEZatGXeosxYheHP/9pZc5DDwGQObovR6z8DZ5XrYrdJ8P1jYWhERsEioLr4i5WfreXzMY54qpOczrXzUdkizkurD4Mb6aTjTvLHwv4PzceuMjyx035tPGy7wUoO+DS/9hTT1EWZTVzYg+0AslET1Go+mXYTg9EWDICcgjUbDUvoqO7QmGM+bEPea4JBibyzWilUK8FBzWMNlC2MEf4I94GBk5hvh6hyQAmulYTOXlErQpdIsNsNW/IhILDeKO+CCn X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 853a5dce-d4f0-4549-7a7b-08dca2549d77 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:48.5523 (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: 7TpwbTaSW6gCvVu+a0tBjlAbK5uTMzLCnuk5OhCqr9VckolVXJG2eqiPKP8W6Y5g1zp/+hXymjWbcWty56lI3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- v2: * Improve file list. (Frank) MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 278c1ec148c1..487fb417fca7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7499,6 +7499,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 Fri Jul 12 09:32:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29782C2BD09 for ; Fri, 12 Jul 2024 09:26:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F16710EC83; Fri, 12 Jul 2024 09:25:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="KGrLuyjv"; dkim-atps=neutral Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013014.outbound.protection.outlook.com [52.101.67.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 14C1B10EC83 for ; Fri, 12 Jul 2024 09:25:58 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cWFTo7/SUri8pHBDL5u6NcdWaHTjj3yZmPNTnzL9jttlRXJyNFxs1vi8qd7l2qEX3M1uiFeum1fwv3vYPJlxnz2PeQ0InVQFHvKjeQ+TQKmpbBwc4loZhk8O0biEgoD+AX5be4C6kpN5tLHyb4x/Z8fC1F1HzRUEJ546N8rIqtqPieBYvJ2VRR/XwH4yG/EXeFXkrc1MiZuf4VWbJxFZXQxewDckQFaFUO1RgTVa0otQSq1hv9WgksFQ0SMjlLHFoeqPiZ+CT4bbdMgbDxtmA26CWeMyIxUaZWzGIwj7Tg3cQ59KQXckLHYhi7dvzm21i/2fAqgo7SJt9/E/7kSsYg== 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=rsoR27EhRa5ewkvw0yxDrD5VodoM8LHWAQwUfmEwT3g=; b=u9gdjuEMlEaHWnkaIN9dTWrRAZtCKypO7cH7d6dqJbA5SfWHyeX57X9s/ffq4xzRlgaGrSupbIUoBWRFPSTEnRUyetfAfgy7oJhRM/RxRTbtCG7SuZlnETpG/qfNjqaSOnZr1B03i+s6OcYOcA2sXbR12wPEB7OYORNnnl0LV1VjPvOIbXLKAIcFMipRCMlFid1z8dPw6fSsnD/WY0nvJJ7gLRp6VtH0LeCGifQ3SPKlVsos2fhiVWsOIx+I9zyxRWvYWJe6GYAUmbV59grZ8+fx1uOuUVUA9bPva21TSAm37nXBKhSBt2i7NLrX154L8QjBXdY4Bi7b+ozzkemXEQ== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rsoR27EhRa5ewkvw0yxDrD5VodoM8LHWAQwUfmEwT3g=; b=KGrLuyjvjJsJ6KvJuUTBwrK3lXcqjKgVC6qtlyiIKmNaYrD0p4E1DbbDek0ZRxcFveNjD0qhfgjPmQDloi0uXYQLb3OTcZrdhUIU2xXQuz0/Gm8vS/xisVhUuxodvQgUpZb5RXBaOtuFBE/Ikh6Q/xpeqQZjywvcUGd/I83KO9M= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:25:55 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:25:55 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 11/16] dt-bindings: phy: mixel, mipi-dsi-phy: Allow assigned-clock* properties Date: Fri, 12 Jul 2024 17:32:38 +0800 Message-Id: <20240712093243.2108456-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 8190bacc-1a97-400b-bf98-08dca254a1ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: tDfoTL3lu8IgOxnU6v8CSDZ1278s5s8VTKfVMNZQKJwKc7igUnUDrcJEWDg77DA6hT0UsVTCzVD3jXW6dFEcLE5/Twu0niUcw64KiPV+YZ5gsmhOmXrZaswmk1VA7oBR03f6i9REQxOou7FBMnRRANFsHNwGKYXqcgnUpZE79mS2BOuxrVgZOFL2Z8Gm8daWB7s8+ddbks7dw4aoPZpnyVwSu7nYQIbnuiExBu91uMuH7Qo8BDx+X1J4IcuvOEi36t2QVN83iKv0f9h9KeZ2QOC6vgVxW1CdFggX/664x9noJA2oyRADNa//4wddviOVolJFZ9HdWi9Cd7+TIsG/VCY5sfArACND3f0T5X9wKBeto9ZhrIvLEv4SJZQNwEth+AFx0gqr0N9CtAKmiEXaYO9HwIuGh6nux5GmDmd9N08eBjsFKTlUMoqirwrTys3z8gXhY9HjS26eE6XF5bxJclVGgyFIAtkiCqeoir0hnxlCiHaAnBypquxTBj+IABreUUaIl1soImAS5H4Ve6aMlzCYrtMxEZAKuGxlL+IVEcK/6/V19WaQdna0bhQ+kXFXIdG8IqrcRkQptE1uaY+4h8UffW9moehIUVHbbBlANlTfx7KHo7t+dHQkWobolpTRQ8apNOT1pM0NoJIzmMLgq9qBvrodE30aH6ZQ3Yxxn/NmbSKI+/Wxa9f28BHpO2uPD7qhqbjvlljOOxaGFebgpH5+dI5wfsJQek9hypx4DEUckXmFhJUX1xjJVIWsNGKOlNkNLIAm57IXwxLjYDVlh4Boc/8iXViWB5+8EEmAY0wzf8XFu4eGhyAohLtEXPa7UpAJHN8NSaQOnhyvWznILKgtOvTvIjAUkRGh+f4ThmUSWFDZ0P8/lAV67tTmMjd3QiJ3Fbenv+Btw2CdcqsIVdciSLhjEnFYaWi1Vq3lWfvUN5/kQO/+j2qA65nB1nKzppBs0o/oOAXj0wRUtpCux0HAzfmvYC9m/dp+akY/ow40ycNw9RaVLqDpFtu7m3/bCRoTxkfcdE1BomxfO0hENIYTlD5lJE0GKWZrPBIxggkRkoVCkN1L8y/6mX+p05Rfyg+/SrIMx/HAW5Vq2dfbQYaS/1fUr0oxg0Mhj346K3ZFBslNKYp1xbJE6usJZZjDKzOKnbV5muocOgly1GTXbdgKnqUtOg+MrxQmoiWKsGc+BvhmwctRRfTuUeVEM9qShI2VOW9MPSC6ck9Xmr7dRvVYT4tyKd3LK+JaUnEYrV80WYIRWiZ9Ivzk3qQsPdKCHPFCgCbVhgzC7c1j9d9VEqCm9lxkAM6kkTbQ3zMVoJJoYhRcifXIk9PumXetSoTqOzVIB7Nv9Slnk/9avw92rhDbXLY3Px/25QDrdwLMSa6bJeER9CEKReIxL4QrHrYwE6hCfe15y8CrdMI4LMjRHg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3r0PmHzy2kTToMQUIK8gKblvsxySfq67jsLnyh3WTQxeOTVx22WPoDkDDJCNcOBTSIT1tJdu/LEu1JECEvjEL/qJwIEmRZlIKLuTgaGT/fRxKp9JPJj4heepVM+zOPKWMpAjBQZjmX0Wh9uf1Oon8cK/pzp6m7TR6nYVOvlyTIXVfvgJIGnTGXrRKhh+nBKhY1uGODaV4RikwgXijpRzLyXjMttr+JuBrCoUwqrRs7g5mRPVpbQlny4SSbEjO/37VzQZg3b3xFHswMPxU9tjlzC3tuFuK7M0GpBrRczBRXLiWrNEi6qNyhsDrW+XWpbMVaTrfzq97htbrtKFw/7QdgUBpsUP5o0J2I8IJYRYIBKGqOEbroSmXdsPw0MXPu8WUH5JZj89/ITpK/Tu9VJnB4qa8GH+tpUmM2zj9C03QnE/85gP24PsHIQLEURXiyR+LL7Z2v1Euw1+hI1x0eVI7QcWcuL1rM9GCHk0D4EIIICEJWwHzRMBcEpWSOPhSO4gO5h3OeXUnve7wOZ3xKxtF2RQhbuSBztpZA2gaHA1xxkqzjyFmEy5IZMPnaVj+91A4PazMz8rulj0EqzWYunWbniTWQhvQpsfEMXIBD68FkRM6KSejY4vM1XekKy3nNrlLpLAQ/n1Dvsiuh35R0XPTlYqrhbr5AIgV1GVjm3wF2n8WW9sICUKcQoI0m/wIs/YvdMJm3rWDtZ6qdpPbrFqfjQuqg4N03c2XGmohBnbMgymO0S1GC5FuBMJDkHxUa9oji8p0bC0bFu3gAeQgJ7pHc66NWegpKM1aShQf7456Yti8NaeiZk5sEk6vLzVRKopeWPBGKGucwWAuRdqOFGLvSdQ8d/QSrq8hd6Q7EPuJenNXAmZ5auLHjCBQFsIjRImFG9rOVN/1YDHR8/xUBSPHWxiARgMUoREFo0+QA5nt30UqjIA9ssxwsJAZ15cJIeonnjShTQJIlXSWLGw9PjWDGB8N8y+vFneqPub2aGNJBl+UjT5oqKcGkX82vBTNT73qPqctsPjw/PaO+8ZmQMU4TWcz06G/L1+qm/9wB+QgzBTQrp+HQ4pArwJ+e7zUUrdPsy/Jrik5uPj5JJsVhwjY2aby4eWTIAho0JtvZR63Mqz7xih5Wgbs2ZJHtMB8ADpBli+UjXmvX7PTshEJLh0U6TsqTH5oAgMcqElxKO5im/ZEUazkPWz5YFC3ym6AWjUMhtLWUH6Gc2E1sei+sv57twqoHk9yDtaBPJNO3yMq44w1nCJknV6YHdXBFWyhNEyaQUxmj+jFWU4zDZIbsFV+UoKOZPSLa4y2iEEpDU9ecZi3Wli1yTiB5/WLy6LDeS9zYz06D1NU927HEAQZz/NdQiB4Se0y8D4lFORZ3MfONHA6EOwhpbH5lvU+GvFvhGwXkX1JYI78s+DawZoKCzAid0lZYCuGms4BNGsBTByuikVbDXrRZEMXiE8HbRkI6o7wmsOAzS89DJHvTwzBmsgv6ogE+oFgBMmIO0FId9FMt+nXF9ZcBHpuAfALu6fyLuPAdFmCRCnYwVCGo9Q6naNVZhC1L16FR2xQsljWz7ObRe5T3NmR8bWY8JXcXJSBGf8 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8190bacc-1a97-400b-bf98-08dca254a1ca X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:25:55.8281 (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: UxKxg5xP/cKl4JAMrE664mdo8U1PZu13TC9qKvMWYWZcW9iQ1JwAANx3SZfStTkL3WLlg6nAzF2YYf7kdpmNxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- 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 Fri Jul 12 09:32:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AECEEC2BD09 for ; Fri, 12 Jul 2024 09:26:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 32D6310EC85; Fri, 12 Jul 2024 09:26:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="q/bqBxT9"; dkim-atps=neutral Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011065.outbound.protection.outlook.com [52.101.65.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 364BD10EC85 for ; Fri, 12 Jul 2024 09:26:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LC9sBJbq/jG36ILJALOsx/97rVp57dpstOjNj3OpBTQ9cHCg14UGEO/kELyN29cOBCjDcpzFthQmvhkrFniUBWk3b7dvBpI1z0YEub7izYJvxJD5wfdiB3ePl6a4c6LrsJqRvjLyDlAydOH+WMFppWKbrnbfylnhhb7XkpC5AcdKAVFllS/K2AnEMEkYIAQCX9bBcs1cIi2E+Z5+13LrDYSpeg3QiOqrlIQAwBxZNYYnnlgXMAncpjPfoT2/9wEbgB8YF7TztbnhEv2nbrFemBrOCuWEvr7m0pwBVuFjAD0trSk/XgA5FS+l4JvitXjDDX+KedZXtNHarCk7CuZUzQ== 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=QzrpyOOR+2gqKLgvTPIzMIoY/IS0ipZtVSdoA2aVQic=; b=XQiEFBAK9APWnrlAyznWa8y6ThSlXVSqfW8syatOWE/p5Ri06Novl7S+SzTQ9kCV8N2oMdk4zI4w0+SHzOjsVdZTsJRNGjkLDfWeZOc950lIvpZc0Ue1iSfryh9Z1F4rXYMLWcPNRFuPCHVUPEYwvwO24aeLChTODzXTIArUNhMHrghaVVP9xkgKa8eEUB4WZlYziU+rF6bO+n+IzrM8KkJosgjp951cn7u2aa68mE378OuU2j7Vh8rKN3VZoKU4Dv0vXtBXgw4+NKfpnB2HbyYE3G1s7pS8e/x5feXTwGBWpFLbxXBioM8m71dYojfRTgDkcmd+0O7krRc0+95V4g== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QzrpyOOR+2gqKLgvTPIzMIoY/IS0ipZtVSdoA2aVQic=; b=q/bqBxT9YyLMlYOiz3jom8WgSYl4SzfynG1YGNTF2fYH5isbuQ6FnpDoQ9rth0iFitSLYntYWsGPG7wN33skcJBbk90P1+UK3N/9N/tM9jB9cPpMjQB2TRNh5708vZq86MQhu5DQs9SrI/TB28yrhqr2G0Vg5JczNwpdleHeAgE= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:26:02 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:26:02 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 12/16] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Fri, 12 Jul 2024 17:32:39 +0800 Message-Id: <20240712093243.2108456-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e0d22cc-ea2c-4741-06f2-08dca254a605 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 2At3d3jX4ezONO4upq8pORasdywsWwn4/vC3vfjWnf05EohflMPhM0ACgPfBPtLLLYR+7e38455dQHAAfEelPPXtOfj245a7h4VWK0bArjQPh5aThXsKrZ9wQP1l9qDNzNXGl7Rt4a4TB5hWT7Pou10Ll+i1rW0juSd+ScPSsBheL+rvD523W9LVMsh+O6nruMVf++7sKlhVwP4JwUNPWeLrIevf0d7f0DPXWlq4RD/gWRAubh+rD3x22YEg0XdnnfeQM+JmkkERldezJH5veDqhxgc9Hwu5y5wU7XoxOzITqMZEhpS/kqfpuWg8VzDiuvNhjOTUibzP0TNyUIHQ7fVlR7cVQaaZCIA2Z0rESYyihH950VILAjw6ZfUfobfuB/4GwMdVb22lQaGEyaGr6vhKlRe2TQ0C21XGM+7aY8vH9qWAwMyHzEcPUFzDp2UZfi7HxQEiefaXYn7i7n7N4tlfQCIPqA5gwDPrXQkF9W1zWn7FGRxtq0+hWJFwt0UJea/+txSS4fpY3godJ6M4xhKULX8mAu/eiPNGK2sLjsUm40j7g4da5IfS6nCRIpYMo74zay+bVSFitqxgK0eTtgEcAQ4n3kiZSNPn3P0cZq8YaZguFf/PWas5r+PeuU26HAsBVDxkGb3uHyf4eYXuNU1p3h/neCNAmGIcx9ypsDECzdWrQOT+8iBbSr8wLVjm5AKWgVN4CKpIua5acT66Bl9Iu2erY0Qbstvy1m9LPLIxBRMv2Gc0Zn47GKTmInmA3FjmequOf+Grr6nO28PoKvhDhnzTt7sDWG11zbWHZ0wR0wtxOF3okRdW2Z7naGAplVqFlTZp5XZ1j8ZU7vfZpu0JSEFs3A9ixVsucX4dUMRdlS657ljCYuKdXlKFChPH3vMnGyPoF6aE+c16jezHM5qN32vEYbLGzNxSYQA4+S7g+vEZ7ZT6XWva05L85xAPSdRiIzp/OEG13Ey5aVlG1KzHVlCRN0J0fba/am3upDOaPi81PZvifIwe3koiJDFP2734o4cz72SpW7gZnEl6BJ396aZidmyDNqBIEkjW5ltmYWgAaKH33jmt+HT8HktN/lM1Wf6t/ve4djwSndbhVidSsk/kbWeLpmkKw4GD+btiPuKc2l139IP+BpvCnTzv+FIKeiEGfZ3LdKwFsEVW58wngtv/wvA4hQ7W2NZ6z8LIdsb+aPBJOLXSZvFGp2jXkmHdUHHYZsUjWmbNQGAqQqkGv2V9Ts3AKjs5lVWNUfavllTFqyoyZxfCA8sfmEsEYyTcaF+HEVkH73cu+MVITTLxlCRneebXhDJJIL5BCtoJKhWDVdx/dQAdf+TkN8DhtrzLnUC52hD/EQkb23n+0QPaVS8AGFp5hfYRymojqnpzsG5AcJ4ziiG3R0dfkIPLIMQi38sRY9DU8Wjs/pfPyA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gOYZZw81XNXSVLyBkqWiuwWq8b9x6jQHSUgyQSroroEOL89SFLZIMhdu3qhrodKGWXLuLXhE1H63G9uHG+UzZjaegr9nghMDRyx87v9TCCVhF6kzGp2R77TYR5RRI14Lbfj9lr5E10TeH7VkzYFksOjT/ilh0NInITv2Lw7qzswld61KZxn20T5+6yiU12gwGpR1YVNfWiiwURUxoesIdvq2PgUrTE1LnuUsP3boq6+nLd96EGdFaOyKBTKnxqj4TPfFRzBQjqVqa/qOCwvyk/6WImtkoYXlyP5T/Jvlx/YsdkQY7x007H0xv9JK8gToaspZUYG9BKIUx/0PO7NDSMves9HJ65hiaDb39dw7n1QLAChifOpzrVf6qH9OU0rGuuOQioID15y3481MIy5Pg5clk3nB/K6ng8z/M5FacRmuPUEGbkwk2Fctw/UT2mMi52oebwnjbKAbRDAcUfHXyM2xN5mlw/QJ+E++01WiS9lU7q70fkXZD/jEoxsdm949r2flTy9I7YXxASS3uPEqMvADNLyteH2pCsnpNW57myjtf0lFmgSdFgi/i6b2LJSOZx3prSxNkZbIPkn5sclQMZfLBf9igSRFWQsseLaqfsZd6rPRTNyH3avuecs0y56ryOeZH2MuNSzoBhjie9KGHH/TPzeSCi1EqnlV2usXHqeN292OrMILXMU0Yn7cWIlF1+ZhCppf86N0suij+zfR1wTZcHr2BFJFQRH3whTE0X7tvHKM6xxq+a9x0Qhc+dSiUBj6r/H+y93jnYBUQdLHe6LJUXtA+oJSLs7Amo7pxigcmreKKden/idlFU6B5yK//M5mGImLyC0gxVPTv66R3YdJ+35In7CHGMKYaXtI/XZTcQv4OHjDuVPnQStJujgoM4K4d2bDYHTSjFfIX0QoDBfHJUJBwUq5ToYbugL14a5FuxXRnkYW6hTVdpfF56STqUSHpBaS5mHrDSF31kFq1pw/M7ot2f1VVahcrfLR/7Bu2ugQ/26+N3sFB8GBXG/RDN4tCUSf7Tus39j0GOVGXAnLI3cnJmmIOEVmb6XRvmrlmc3PxrGnMdip9DjcMEVuAdJVBoKpNDYC83gxAEaas6yx1cPC/N5X+KY5wnTs45d7G2cOaFBVtKIxacxTJs6XbDWDEmbNfDcAVIUoE1+r/CoTE0tbzzIZh3A+n174qVMwTHiA6hLovJ0pOog0VNBTFujL0S/ccXUnQK1UCaVCGrIdyWyl1G/H5XfeIzdqZSH2GyhlIy2uMNUFl2h20EL3uU/xm7uxmMqpa9/AHZyHwlip0IdjatiEIG/VOxjuzM7oTMtEkeq8CUSbCE48DTZHEqqemPiLbNxmcHH9LxXcAl2pxQu+/XiBErVXtTGNrR6G9oBM8vtnQ9rUSH0G0pHI57UJ1Ho2WIqkpghQG4O2f1elWQD3jFaf9zEpi3UnNRA1oDv/iYvOstFSyU9+RkM8wwr51i+y7mBkuTp7YtW4gNlBMNAU0lOrPip0WAEIBUlVBm7D5GvcNc3nF6D2OBwExP+FAus8gAf3cPFs0Cmj970T+a1NXTAjOU+Gb2rr3Qu8vxHngsAvUGi+otz9YM1M X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e0d22cc-ea2c-4741-06f2-08dca254a605 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:26:02.7583 (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: aEmx9sWY2Ptg/IJ3NwmOs54wz7HlpJ6seFlZdNHjOWKgpoBnHCFZ5Q9Q+ei1i6JRB8S2pvDc4fSPzfwjwzeL4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- 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 Fri Jul 12 09:32:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731489 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06433C3DA4A for ; Fri, 12 Jul 2024 09:26:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82ABC10EC86; Fri, 12 Jul 2024 09:26:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="ckp+GJAO"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011012.outbound.protection.outlook.com [52.101.70.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5DE3C10EC88 for ; Fri, 12 Jul 2024 09:26:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BEk4VhsemUwwbjvRAMuWjgr2OuqdFLvSQTRqcDtd635LlP13fPC/IXboSV0perTZtnUa/pKY4KAxXojvzZyoHlrisUYCiPcmdp/xleQBXgTTzduRReGmnZk/q2nBhzD6QsmxsY4d9ruG4Z0dk2dwAgWqvf5a4CTcz0QeHWyjafX+r601xx99iGzsLnnOnYb9Zw73bOqcdYUFsPxbW2H6oY3O8W5s+rATi/Uw1oHyIf70O7WD2TUX50N27QUhW6Uj2QOK7YO6QxL8EhzRiz+JSIzWhQHxljOahDOY1rXNCn92PUQ24G9lSVv4Wf9ceTcBWehBqUTZo848isdIygWarA== 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=dPs4HJAkwh/9hjGFxZs4MzR8DfXyedrExZB8kYWa3fI=; b=ai9OQz7SLzIZgLXuUo611wUhomNBpj9JnuQnVh+jZXcm7KYUFPOr2EWIv+8vZzu1deIkDX9lSFjbVvTNY0PzHjGQkvBxbac/NQDRigqIgdVaHEdGjZ6CDavYY1V8Cpe6IXfXSc2C5BV+SPJnNzwZqa4qN2CqlcZEYAJqZDVmQ1buGvrXmsP3zG0EzvKeZ1/X0XGmhtqUDvPBj+NUb1+Xz4B9xYUFhV9QwZYpNIQDkaj5AbjUY4ny5BJWv+PqZnOGWgn0XwyPBZr8yT6ycrAoqoYXm6juvftkZc6pmaOCmbeGkmyav1eMaych3Sr5ntfFeR7cEM7cnOqBfldJX77C5A== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dPs4HJAkwh/9hjGFxZs4MzR8DfXyedrExZB8kYWa3fI=; b=ckp+GJAO+kYndLTzegHLJ1y8YWg6Qh/zxPrmvhLOlK2x3TJeR43TqsMqiukQn4ppFSW8AfY5iR68+si5baiOd+lV1RNDst9vF7673uPrQH5PZxMVrwh9E6pM8fUDTevOJLjK35nwtiGGPyS2Qtob7Kgs74eC5gSZfxZYnW8D+0k= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:26:09 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:26:09 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 13/16] arm64: dts: imx8qxp: Add display controller subsystem Date: Fri, 12 Jul 2024 17:32:40 +0800 Message-Id: <20240712093243.2108456-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e24c4fc-63f7-4345-c063-08dca254aa23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: EZrqpuCZIkHnEhP397ynhdX97abZFdDyYukqOOdWN73l0DEoDcm0rMmsWnqinOcSV9nbsqeh9+cXGD+idGtSV1uhxybexWrRQfVyOupCuVKbcJoEm8eKcp/9lIIv5Qxom8SHyWRs+Ckgtw6in+2BbFoeKVgkPtIEk5SCKstHkKw1YndAYh4LMc9MA7CJiCzOKzKAzTbAoEAZMeWX6zIRk3kZfh5ZvOZ5yE5qVYQlWqlFZJL9y+MEkTQbD4me0pnd97gIsVuI0lHn+Bb/kVfEJ7pucF2SMGmtky3hU3hZSuI6R6rxydP0R7kJeg/R2up1ddLFfMrF+VHTwGItchT2NmUUOLgTmoWqbERzd/1hPX7i5iqd0LzQetenQx+gvMvtKeOyXsccWqVnUqZXwpo1pYHfy7opnQkuRFxp/wslyjFi+0L7Pnp/YGt/cjMUnvzR2zwsjW0vITUUD75wn13d7dLdiY7iemOJN8FOqtmn6gJACucFW3aL3Z1J7uoQhcpZ9NITO2hxLEI9G0O9e5fSpg3bxokxD/fCeRU2WF6/6JdvvYpjPOwctrzzXcWaNPt7335ZKMGQF9gn+DkSjuk3BEIgeob3WAYOiEGCTfMF7qcekRcqqF8m+f0fmXt9JE9A2Kb0xLBSsaKvyftj92Bzr4+rIUNcU5i8k8zvGm6G6QNNmwBAoQnUb/mcwSHy9qGg7rLQJI3i7eLCaP9D2lsKfaGgZ3dxp3tvhy9uZFsEFlXqtygtrS/vaFw6ssxbNze2UMbfQzbNRFVB0LoptKYAtBexGQ4EWUi5CnSsmd9VZ4iK6jruBco1KXQzkhWiVsjxehaazbNSxc3y0u45N631b6SQIViXW3B6apeZ9v5FVPR5NQGmbRWPJM9BiG5eqbE57bOKgAxZMAenxvModh6gUJmDZm3N8JrYjWQDm/6m/2/HCPF/qAYQBJcr9AoYyypsMhr7MRYPMNUM0+/EvcThAKsFgtF/4D8oUI0gjCnlhXGTBUcIY6PqHgco1+CMNDjlqHJaQ9XnkVcApNo1TtITQNe9Moxrr+ULGDgRjKaIpeRqzGijdN3Q6cWtnM8OtyTU5muadCI8q1fLA3VdjMinOs15MxyoCCtazGdvM3DiBdBPt+T8FtGxfYG/EWVIli660HOxLp3IbufDe1R7dTHeJqZJxKLwwyoMLc9q+NmqCueHDJAOwiFn7i3fqghqZ5EmBAk5aGgTa1QSSeoD7u7C8BrWXm0WgjScBL7d3fRN3RG4Os1t25/qk09ufpTJjEElJaZ72DbbnHEpqOiUh+Kqj4k3kTZbO5JdCVsjzd2nD8/vdBjFrZBbLVlEIB3EtpL6KUcWyHB1Uz7wQ+CDzpVdEtEEcFLe6SqyIta0X3pyc/1ibcW20pDcy7wGZmwCwXtdtqU37g7VhCbbAEQ7voWXUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A1NKsWBEkzBgvaXmvRnNnQt+2JYk/ZS5OSj00VbpXKNlpeZJ1ZseBnVmkfVkq3CjwrYFI/G4CgCbErdgQK2w3QcXonccpmdnwncu/IUWskC/olD9iL9NL/XvZk4SoFaWeUNuHUwEK4mdjK+/xWyNKpl4+YyTtU4pflfCWoIWvB0TNdijNdxBHM7IbT1oy/HvpJW+v5lOtvhCAlp57kzNUGwWUHeqzrjWDAjYT66BPmd6Ff1x+ZV0YQdwtwBTXi2DKnLcPNDeLpon8RkJUXoHV6hoUZJNeVQOwVUwZALjxyNvrPw0EOsrCO1L45h970tz9pNmgGdQgK8BYIn4+g+t5rW+PtoAsZ7v4lQt3fpOPBb2WguBZRihJo81BjRNlH3i/0yAzBcTBJ1GfvaefG7TvppiHW9rCR+Ev99lSuWOrQwawLcvlReB6WftsHKDg55gjPfDsGcxdlvAOWxoMrf4gIne24UMGlk/9bYciOS9s4GgEjIP9OSZkmx0mZhqQS/kuwIJnFRoTgjcD1Ky8RKLyN0AvcM+NuStI1nF97+EkTj3+gMCT8hEoVEfulAE7UC+mFDo/wOrKEacjHQjYDr1NUXvp9InRi6FrvtSrUJleVelzXzMj+9l1XACR+KF2hsIrPn6seuDnX7VdJVyJZ847hk8jso68zKGyBGHZssN3wXy0sbUsRJzarRc3qXwn2xyeAgWLgdgvHeGb2VFhQ4s+F4ICIuOw4BS1VGrx1emoSB8ynBKWS2uFivzI2GHgkEZYWOR/7AQLduh0RciSMmeQbUanXU3BJ45rdRoHb5LxzYb1xochZoR9YqTmJaONZR0OBl8GKXBi3ZP7rWhFRCFdopZRA6FKPDSrUKwbKMShtwTIPs0X42LYdwkPC06+jKi3g8JOeolRihi83ycQkF6EFnqWawIkHk4qUGluIQnzdW+VKAXp3DDhprYmJi3ylHc4SHRmwUHz2dyIWDsV3tTKphvqof59pflHnW/V5T2onL/U+JSiTL+PSNPBFg5tgxA9plBzlYkPCcJayFozBENA//Eqc2XzPV4YOZZH7YpgJeTxqPV+87FyUrBRnKMKuqKOhZZ/kEG2DpVIkBsLMAAF84/lqO4Jg5P/g/hQlZ6KLg5SZIGSR6BufYMH16wwYaqEZPxge3wLDntjVtizeywF1r+R0gAJI9JJatWDoc0xdCiQlg9rqudYyVzomhSELQKG7+tMzCXDIf2gcZtU/GYCAS6quZr8EfxgYdqw74uyfvNhpsTprsAXgsOmaO4N3R6ovFCggLbx0j2+705JNs+ki0v4JsruYSEOAhLJe+Mr2E3Js9PjaqztC+vbq5QorCMafKSd68Tui3kZ+5B4V0NDO4awXkdoeSelaUrSuYgqmmHzSMoXIUmSyj3HOG3dDRqaPZfPFQGWkLSosRiZr6aC2W5ExLzp0RKUh2N4U1XeqlfmuqOTa20Gjp8BOMzvi6iJEv4bWjXWJoHFYWf71VQp9r9N7guTsT92ohJwAIWGyvUlJwQhbgc70qfwltno7wNXbbq+Gby+wQluMir5WgwqYYCqHxItgn/d7mBiEYCqo4z13lyf5WbeKUjKkk1UO9Y X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e24c4fc-63f7-4345-c063-08dca254aa23 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:26:09.6926 (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: LI0o4PxUdNsiMEodGazrZhby3ybxQ8gEW59JzxVq+TduhKJZqaLnqZi9+W8s/SYmhGTSeI8yl0jkSsCYIN+51A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- 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 0313f295de2e..c4e6f1a3ac0d 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; @@ -202,7 +223,7 @@ psci { method = "smc"; }; - system-controller { + scu: system-controller { compatible = "fsl,imx-scu"; mbox-names = "tx0", "rx0", @@ -319,6 +340,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" @@ -327,6 +349,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 Fri Jul 12 09:32:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731490 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EF71C3DA4D for ; Fri, 12 Jul 2024 09:26:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06E2610EC87; Fri, 12 Jul 2024 09:26:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="IuRLDiaw"; dkim-atps=neutral Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011054.outbound.protection.outlook.com [52.101.70.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 377BB10EC87 for ; Fri, 12 Jul 2024 09:26:19 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yhCwO9hq/WYsbinj4LNcpMj+aGGsOyJ2tsk/whLvSTIRSMJeo4XYH8yNUt4U3L89HkehVmKLjDiwkyoyMQ8l4vZBxy/0m34C97LJQvhX6GwSl4nHbIatEHh+b1fxuTZyfylBk9+9n1gpPJiuWWVUiLQUf3ad+l3HsumGnmtdd4KcYxhk13jgpvQ41bop9Zp1v0qgVXD6MKrYH/7vlBaMU1L5m9HMkIKPbb+zs7KKFOE/v92r70txTik2HdZLhNT0l4vrGKns9QtOLwIhKZKXw2v4ScQZFW1wmyMUz0yQRxNSxQgK7PUqAWzyn9tPAxrNyHBM9XcJztrdnAoIBLK8ug== 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=2ejPAM1aw2aOQAv8srW+vQJyD1jcn49ajeKEnPHCn9c=; b=mNzP1H+JEfbjissadQ/GsyX8qXTq/OtTCoFkRPgedCNrJEvRQSQsKr8H0LbKO0RxHuESk2VoBU14dyScR1G/38unyMQSjw2uhOXxc++5jMiPDqUZnI49JPUdyOfCb3Autx+mYhTzJyGElDFC/u8hei8S/OlZw9XztfWCR5wVg8W27ejpnVD9SEXntfURe5Lay8lUBmzUjiVhzPVi4mMoA1X0CePRq+i9mAPcZmwjiKe8clvlxtU1Yw5BPHleOGVkUMMd9HpRWqQxKy4Xtf3CKXGPVkDWsrVKyZOpWKOBCrJ6P8z5m3tm5I2Gzc0uo6Bo0vbxHmol6BaWL1Vnx8E8oA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2ejPAM1aw2aOQAv8srW+vQJyD1jcn49ajeKEnPHCn9c=; b=IuRLDiawRmiiJ/SNnl6cFlShqaBBk8qEHZ7vTa8qylrZAS5FkdJMTMFiS1yhEztyvELDQgXZHwzPcTma/1drwW9RqUXIaTXp3NM5m85umLnUyg7qzMajM9CeGJjtTnA4VGSD1nLGiNK+C05gztU2oyZRKQUQiP0HFraEk7z9N5k= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:26:16 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:26:16 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 14/16] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Fri, 12 Jul 2024 17:32:41 +0800 Message-Id: <20240712093243.2108456-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: f1907982-a5b0-41d3-93f3-08dca254ae50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: OkqInNrxZpVIxFFG4ZTH+wRIipGVcIle6CY4E30c5dakAcdpk1TPB/RZGMo6Q+GzvSCxwm1knKdqZA0MmdFr+5ILP910XGMZu+sMQWCKJFQGKJ+Z/FU1tFlrThnBzF6FNOgOCJ4PPhG5Y5WLhFK3PKUORV+8EUSZOTDaJ2bNFb2tW09ATs7ResVvDj6fiJ2OrlrHxp/SoglrGIou+3CoeYjxwlOTF88MPXshxNGCusyGJ8m1GHxwBwVhriN8+CBJSUymfj70gO9MmsVsR0ppk6+MUjnPvcyaWq87IRsjwNHOP9aevGBMlK89SuCeXKFc4dPbkZmnTW6CN8YM2LpcJb4e4UHYh0J+SvAg9cEZEmoxmDHhNKfRuXjLF5HWEVnUVU6Dy0r8HcXK+gAmXb5ajaH352VhcKe4aJU1wDu9WgyVfS/dNKRsUX4SmotGl04aEJs99evjAqbtcxavlxois2XxkbTqLpBnVHuZret6d0vamSCV/3cI2SYuc5beBjRSZ3pMi5oDXavQ8grEk9esgrd1l3aFeLhEHpM+eeN4yrXOLnm14g9zSNiLDttzX5RJ8HbQUtFug0tum2k/UvhSRFSockP1esWslCIJN94pHjj48RhEvnTteWmRijDiY3qDOJMtEVOrkKhiwqKi4PSdON9U+MMSgBPx4U3OTZRFmjybRhavl63JlA990XkSw4lUSjtHh84FBquD2IP07fQRdNEyOTwcQasoXNgTSM2tljgqwe4QTM30KuwhY5endFMjw/WVSFDxm491bewAQwkxkH01QzpjtJoyYF7+a/tv6kmPIxeWSUitqZIRPIYP5ZsRqtQjGSiep9EEdiWDYXEfoFFLa3VKte3zv7zSCDlUWlL61xpOmniipPh5xBsdoCSdmytFJumXyZZ1F1bvozqXvL377dDUih/UV1mifrcWc179sXPPXspqG2AOAu0FQAI/8Rr+kZLJfF1rMpgOvlPLwLgDadbpXi7H5vOuXqqLs3QLvv2Q7XE4enLJew/gE1IFJQPitt2ucK/6WwNXfVTpDjuphOvpTaDWR1kbMQQnnault3MXRV3eQ57p5GraZTj4ppqUwGeFxWXpmdylUYBpY3xiFij4RzxE2B4SkAioFWC7JvJtvouOYSACJg9ZQV8GboHBh74+cVTxjuKJYbC2Yr+ahAXPw/Hpl4xoNe4zp0rWjSVgkv2Vz60xmEmi+hQFWlVHO/rd5/cml7fIa8Xoj7KJp5vv1ZoVmmHYG0KIVeSKp0+5S6F7u6fJFPfUb99ZzMEe4VAWk2ilX7UI1laF/GSJwxPjQySesswn0YYysz3QcxOJKav67Ke27B0YjdW0hjI2nftn+pYXkDzhkwbODpyScVGF8tdS1VeNaFuUhJNWotIrS6lBQv3ZiKe+3mpFWjP/p5C2wpeTkI+/5mbk0A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +HTxOeFGP2NL1fBg51IvUkJA0RecNTASdDREjsrlgsGroah2Zz9C6CrNufGHNjj3wIO3HT1ZrpSQFAL5wan2Tr+KZSWbLDxcfXoE2w46a9AoX/l0IkGsK4yd3LG7ePeXl2SY9ESXNF0pttQyUPMpsL1QwjpWt67kMv8yFRw9kziV+dRJANUYkBqTWaZ5Tc92JneKsGD7VLLT80hKOiVgoaIpCWg3uhmqbe0JxrFuULrnKQaneH93Lzu55RYljLRKMy5koHKrHLxkwv1BpE+Ng/lsF5SYOWBZbxckXMOifwpv6xVgXJW0Ck/Mm3v65IC1LkSLvYYT8S9cKRUQ2StwbA/i1dFvnP8AGXDxP+ziUsEiTULCjTpBgwCVrmz7LHlu7OMTvJjQ0I4ZF8wCFeC3dQhGqVBsZ2u0mKp5oLBAV6vzr7G4hHMpxeFO7sjmxMyPBs03wGZcd8kgTt62C9MsKJ45263jZkrDginIx84EjK10UlPcw2VWvfpMrTrbygS87s9PbcwJRDaQM/makif4n5bdyYEufP/WAlUgM/em+SKlClrYljlGalahp2sg7t5a0x58kICWi+6P36uA7VLPBlTlnPetql1qAuQdr72OKjUcZJco9zCm5usjfcG/vkLSJUWCYzaXxmabHCQiVkCku2bYKN/cWMLXwEqt9/MSpi1P+L5aJSfOonl+8O3j6Y2TSRYXsCGsw1auc+0NmTTMHqIZsIYclk2fZWOUUTIE23rNFHDB2UmhixT5bGryq9R5EJO4VxRv6vGkwKfPNq2xw0noblkt5eI7XTKcFGGt841Ar8vAofh4+iY5m5k27oZB1MfW2RMk321cjCFGz3Fi0R6InKyPvegzw3EtOm7XPnFNbSivD0A9Qs4czggoj7fyZaFXmU1a4GvoE9bztsyy1uXB3o9EYP1gP9RSVBeUm170Ocso5tAC5gO4GmT/pdLSoPI4xQEuxxzTH1j+W5RC64LHeEdaYe8LOvHqymsHsjvYYBgGpoeGyf4zF0ZLUMADYQeVXRq6qDM+AbSMWKI6ziTEW5FVDr0y04QcP2L/Nw/Tl2Tne0y4GAXhQb/rBL+ecdnhrKcAXD/4IqVRib2Sv9vfCBxHWlgoujCXe042tV64l6nMMUKTeEm1aK9fYNTl8oquGlJtuIuviDVDjJAj0sELuIHGtHGTE9n3i0l+AKtocQQX/X/6U4mOCP+V49sCT57atbhtaMxhxWRiGLW6jgztFespD+QIKzKbnHDeIHBj1EwOhP7M7d1RxS5coFZPiICY/29Bkqs6Zdrggl682VfgLJw36lqt6xQ+kilLi9JJuSZlhrrL9uj3dT2elnwaLThsELy2EBYHfAck0JYc2/p7urG+WjlcKeizDcytaE4vhcgJSGOcdAYCqxM3CprRQ1SJpxb0XoQArBujkLBVuy8y0kCfejtlQXOciFyBJAGgqpKhWONA4ymGOTfUtvBw/DJak669S/TOtrUFCg4nrBikSpHk+lDZRZDaLlDg1DwAJSG6RjUgq37sA7gXxO7jYpK1CE5PEzyEo0Z/ENVmPfsy7UylF/yP/OFau6j70dtL2H8WDvJOaoQwu+enJQZC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1907982-a5b0-41d3-93f3-08dca254ae50 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:26:16.6852 (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: kDJiU0y/y0Ls+h2md2qb4JlGZ/s7/7L8S2aMdQKmVpF6JpZZ1CJyR2rm5bspb06Hry8PRB6Hk98suWoiyaQDQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The MIPI-LVDS combo subsystems are peripherals of pixel link MSI bus in i.MX8qxp display controller subsystem. Add the MIPI-LVDS combo subsystems. Signed-off-by: Liu Ying --- 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 c4e6f1a3ac0d..5db458f1bd9d 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; @@ -350,6 +352,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 Fri Jul 12 09:32:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1576C41513 for ; Fri, 12 Jul 2024 09:26:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5122910EC88; Fri, 12 Jul 2024 09:26:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="J5rSzOi9"; dkim-atps=neutral Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012070.outbound.protection.outlook.com [52.101.66.70]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FA4410EC88 for ; Fri, 12 Jul 2024 09:26:26 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HyQFDFnU/n9UGCa7L23G2B2zuhj9ND9w8Cw1cAqEhZ9uV/63D2ngqEuEHj0d0ZzxRSdg7GCuD/3OA5CFc4rvNEbQQuN/Ks6F7JIWS/46hJ3T8rR/7OcGgfZVE0I3qpm3a/sqYj6qQ5l8bCJ28zEtaSDkXNlkdCkQ6H4ENEk3cCXsAWA94vynU/I5gUNcGJmOHWxP7LERqNA61vtn2BsuESvs5lcTiFA3zJ5FjQsELVIVFCvQKA0zpWWQgris8n6ZhkKAtc96aF5p0SVHPrkIkJ/hnCotIx/ttyC/E3iVbTAdem32Lx27p68a/zjDhbVF5Qv5tT6lpceeqg7H9WIUpg== 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=Jf+JBLtTUoariZ8BlW5QyW0/lLdRtbjVSMi/zGKTf/M=; b=SddawfPufEwPOsbDVBfk7N7tS/VJjdNMzSEIzedXeWmp46U6O9SGU1wKYNen9qbF3W+lcuKBy5A/HLyW3iDSKZRD4yYb6aalDlbyiyyA+FaGpwLI+VXogvm1iff9WDy05Xq0wfG0PPvlL+DXNIzW4dvYH2gxnDH7F/eXIROuPTsBwyZiSNR8pAdXyhhQxzHOtEhbowzbnrWzS6V07yb0kdBGPx4kTy/67ZQEsjoMYbfADfv4hua5C14VYWkNc597JuV5iAqPTJSQ1GdhcR7SRqnV3JU5ZFJzrVH/Ey7DAHYdWfObcP+l6gyOWPIiqEQagMANgbfFVTbW2FJpfyTbsw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jf+JBLtTUoariZ8BlW5QyW0/lLdRtbjVSMi/zGKTf/M=; b=J5rSzOi97uSEvO99jvalGPKpCviU2HKgto5obz+MGLUaMosBL3te6yQjZZsXHTMOKXQhFX2SJkaq+CVnqWpcmBQqgZjouIixOXxzwuQn6RDt6RIRQhUFY1CVwO+exrgWMHAGyWP1xYTh1jUFKlNYijZfvRAASwJuMecm8TYG3Fs= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:26:24 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:26:24 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 15/16] arm64: dts: imx8qxp-mek: Enable display controller Date: Fri, 12 Jul 2024 17:32:42 +0800 Message-Id: <20240712093243.2108456-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e1a79e5-77cf-4ad4-dc8f-08dca254b29a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: BHuZOcpn02RzP+IC5ktKxfQWP1zBeGcrHpftzcyHC8kv7GtiR7Ng77TMiggpMIfIeCxalUtRBiPPug+oDKgpLnoBZZ+PTeYGdXE3/x5FhEEsb4o0VGALQUAPJijuHYk5OWwSqIlu+Q/Yunh/PRIjsIy3Lec7G45moPxtaod/HUKBiGo2j+oKQ+Fr9t06SfpdgyHH7Md9XePuewRjNZ7TiWDFxyUIhK8rbmgoszp1K041W8MZLYlQd5uBNFiH8z7jJGih6TfzHlLomRNWuGbu1k34qhneJKloMYUQs3UYovRyDxynqDpRE90VT/1JbSJPXjdMXWz7SDVc1/qVC3Em0lfgEtS103HKmcmF2FR/6YPJL/Vta2aOEZwp2o7uv4BS9yn7BvomsXPHamcPjOYXTMtu0xa1YB4TeJwEsQ/TAzqeLcgHd9OGwYFs4CNCLIjm6/zi1f7gl+WDNOGxlmz6IofCkVTMJ93xm8f8f9V27l1HeIattRqPZDq4BQjFhC2+vONIC7fcuCklaEqQJrSJPMc3VhpHL2xLvJ4udK2qppgG20+AW/Y2JbV6zX6BA7mL9R7X86n2m8zTUmyAuclSJlvYASpB8AiwY12ptnSs5jjH1DqCTANlmEoEfzsZ1lUqUfOZDz+8p0FRAF6+a2KBMdmHd41lD+QlBFv5KJekQxkU7Eg3GaQF/SVLOexrv2cVJRjluLjo+qVRMRdEPs3Ae95BQ47JToDAylRvvYGe5FVpSNVEQkt0BjTwZLCnJZ0fV9L4UfX4dBk4rl745yjmZcqQxqLWfC88xhQCVvWAVuOzc62RdVUdXRQataZYxokjv6a/Z9z9bBiQTJEcVIuGRbrdy13ebkstc0LlGziSwJv+c7cbInUSOrDiJYjsY4H5c0iID35VPk2L8lMnTRMCXvcV7v5hRIHcTAAekewiqVPih34nj1BGX4fEFLRgrStttxmAAF8u/X1fZ536PV1P9xXIGgADXWgY5XfwWl6eIZlfo5FWtIsTI9J4vNrTeGTdmL0I5/WZeJUH0Z8jmRnJy/yTwcCqrZtV7uPWi4hM749htMuw3ixhMsM/B104jre7q0LhR+SwD+uOYWsVo3nTraLYGgSodLmKHZEsHJWV7ODqEQXQgyiEeocUNFkBXy+p4Wh7carDus6/vnDxX0P0X2U1Y0efpxGnRGH8NoGIpZYE/TEaooekdejSq+OsQ+H12peIEuF3QmJUMTV8HBYpdMWO+1gn+l4N5GF3oBCrcEwozgmZeEhjkJumbufBV8A7PjA6BXAwXnzwrz/sVdiwaQ3JJVnmoV0B8tGi45xxyKoxidRd4j4Z94mbSEz0iqw3uVeGJrpTq+TgA/bgzaWc0C8ec+PoBbOnKtBFSU/RAcg+kSKBICcoRYF7XeSQtK+U32+oIg25fbyJiVoFE7pYeg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LtdX/H0dt17VjPjVC4TSHsj8wkDTpJFcv0+7gJ80jdMbbIwZnu6w+ZVVcnq0kelBt+PKB+cwuD7wOYONI7hfeuhoPm9VWtLT0h7+b3gCowNdl5FJNYWzcqcHo5O4o3AuRqynZ97iGUBYYGrMxb+Zc02VP2YBCiy1MI+wZU6ZAUD/Y/SbTzsRz4D9NMsSe/pigFpsgrJZhuB9uKJjyKfA13Xl/Q7PRlRPOkNSlXxthTjL2Hit7fDM/hzWgRYUUyBUF6GMekNexUb+mbJQHa5tuE+spnVxW4ykf00VPUY1bGNazM6iToeKnFOrlsaadMQ9KWi3t7UuU96KO6OuCPBt9aKE0bdtV7h8abqNG4efVduy49T3wsy7BkWZF4P0uJSGIHvbvHdmj76WIDpwyqGnenkU0WxqUyKSIH4FVo5GWse8yti0SdaPnNRKe4obXNgEvUW3ki0Od2RD2WQhShMwzEhfghLahKFzVQYysrBBMSjlXBENEbWNekuHMlhn13UxyuEAyRUtVnrb4tivUZvUg9YJHU/gz+LeBIVDlkWsghx2OBCG71WPoPcSRcpFfRm3EpefeP3R9j2voZ+tQkAURhh+a71V5wpC5vLeAtiyYqyPt7EjnlwqNZQ8Mp5JX9EwKGRnV0B+kYoRyz54noBSgn2P1XVFi6S427QcpFBtrxH4M9sog99b22t6yDZHY1IVI+uxUuq3Uofgu4vh/NP02hqfV8nw8vjmDOfpQb6LMkA0vGgqa9rJWQXxQwEa/VREfIFSINHCxVzzwJwBd62Nh8Uyxzbyd4p1fWTFIqEhIlYZ6UVWESllqixN7BuNF7pklAD43z39JID9pX75z8qz9BzfhVvZtRcMdZQ4m0S/6ij0fainWgY4DUHPquYEgfsVjUbhzsYZhejwdG2BZQPC7xm4Y5HyJ/v6Fkr3c0IGjiVOzVqqknr3tAuaWDN+ExKojSpkhvVmoTtkBjIycBYFex3bEjd2HD6Bgw7bhgJNfBVG01fMO8Ol6vBIDC+vN3hncrh21n4GzcQGzqKM4k3+AsOcCbfBp463gIW+QzJdPyNZw6wV86v1H1lTJVG7VmF3v7klvV7wlYvQCdOipGJDGqwCMUGKyyvC8hRKr3eAyyjSTlxtXcXlVzLCf/hpGUdJAqMhOBXYN7/bAFT0FjVGULgW6gQpfLqmUcRNHfqHqAuRNcUO8SpTwd2bBpbuMOhJ1I+SQsx4sCtGOBPfVNDL8D3GAvtZ9Yjdf9V+e9YvAw6hWLSKJpiZw8dUpM/LvrNZr8C+Vd+IVn3iVc5yl6tVb9bAXD0zCW13LJOdUKsDM8Xn/4wynmCD/ESDjP4r83mvqmttRg2RHybkP6rdMlDvSU4Usz943jjSSYNoMc8hv6/Y+adpVGWLJdbSw3SN04tL7KQDbbkP7gDe0fFdJ9lYvRkTqgdxK+iJMbzzrZfeqVrL2VQzeZmF2mzUas/OWGWoNGNFnegxrofjRPt/vKJpx7NWW9ZCwacfd122R3yDdS5e+LgnXaCN2BJ2Nkuff9FbCy3xo7zYE5P6Sjk1knBfl2YmEFU3/fT8OYjhxv8uYS9Qu/GGNvI2JWRmJL1HE1VF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e1a79e5-77cf-4ad4-dc8f-08dca254b29a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:26:24.0227 (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: o5lxkMNCfWg6IFRhcXg5q4ALC1P/DbXqU6q17oT8S3z7LAE/0mY4O8sSD8mvR9kzKhXdADLvT3QcIllaNlxhJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enable display controller for i.MX8qxp MEK. Signed-off-by: Liu Ying --- 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 936ba5ecdcac..bf88f189c6fe 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -62,6 +62,10 @@ sound-wm8960 { }; }; +&dc0 { + status = "okay"; +}; + &dsp { memory-region = <&dsp_reserved>; status = "okay"; From patchwork Fri Jul 12 09:32:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13731492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E757C2BD09 for ; Fri, 12 Jul 2024 09:26:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7DB9510EC89; Fri, 12 Jul 2024 09:26:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="babR7y0T"; dkim-atps=neutral Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012009.outbound.protection.outlook.com [52.101.66.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3626710EC89 for ; Fri, 12 Jul 2024 09:26:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IozinDbC+sA/WatyxNjXbOVIDntYO/PoHIa5EKRBLHb/0bUnxzLI5pQ0ESZ+GCUNH5B+XRofFOPgGj8yLBpsPjg9EHCHetEv0epXLzMCGdV1+H8WMo9H/0PUPmZm58FYX/Xzg0/+CVppE7hDUNthYag1zA4VBf0i+Yr3M0ZsFI3k2TB8cxmRRbzAyUKL7OgkLKVYb2pQjC1KrD32zIuhQ7ep8Zhp3s8MVrgXxAJAyuOy6HHFRnlGFkV1GpPVkqYPJAkkpTMhrub0fTOCr+H9I222mokSOKt3P/Q5G/HKqePLHmXXjXUAVyHBM6vtVDTNg1fPzHslfibRDUgOngi1Zw== 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=gxvJmSbW8JauPoVbLzhu4Vb+YpmEesx3Xp/kZ30aEHo=; b=rCXBADRV5L74y1X/+L4L1MmtioehZ3RvpmpbNEsNbXF++bdJ5WWhKO/C3JYeEXg/9BrPOtKuybycYycRykaQiIoXQ9DpXfVvkcCLep9KzUuCj+O29YtNxKlCLeQwh1KmSUzz47P4+86iBmgxgH8fxBIXxBR6M01wMpG9TURYJWLeeJWDh5VOam78ntxxP4SBaG27ss9e71eV6Eync2l6L77XRL/ajAvn3g3PtzUD4JZ1RyjAerMDGAH0Pu0JQJh1R8pSeUuQ5/OYm8lnK71/iIajYXFHpohFv4vT+xxZZ7XbnkGCnTi+MhUFKZbvyHosH5UePhqiS7onTQkAXikV2g== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gxvJmSbW8JauPoVbLzhu4Vb+YpmEesx3Xp/kZ30aEHo=; b=babR7y0TtKB/VH3c5sFi3XFgmj+TbftBdOBtFrAOgM/H7CE3pTE7C7vqbWP1CdQ0iwLnteYHa71GmRsLMBWXK1svvd0NwdEVSQ+ZsPOEkZOhQxe5b6eU5APXcrs5Ehc5LcQHs+lN/HBIWmtZJslyq11mOk3NlGt659+uTXQLpc8= 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 GV1PR04MB10242.eurprd04.prod.outlook.com (2603:10a6:150:1a8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Fri, 12 Jul 2024 09:26:31 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7762.020; Fri, 12 Jul 2024 09:26:31 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, tglx@linutronix.de, vkoul@kernel.org, kishon@kernel.org, aisheng.dong@nxp.com, agx@sigxcpu.org, francesco@dolcini.it, frank.li@nxp.com Subject: [DO NOT MERGE PATCH v2 16/16] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Fri, 12 Jul 2024 17:32:43 +0800 Message-Id: <20240712093243.2108456-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240712093243.2108456-1-victor.liu@nxp.com> References: <20240712093243.2108456-1-victor.liu@nxp.com> X-ClientProxiedBy: SI1PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:1f5::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB10242:EE_ X-MS-Office365-Filtering-Correlation-Id: 256092d4-8da7-4dc0-4008-08dca254b6d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: y8G/rRwvZ4q7mc/viQ/huduXwT92sVVGcDna7M+ULGMqG2TPv+v6h38JYwNFkIDql/s/tSvdBlrfI79TE19YXBBYsmOrkw/ulT9KrUNa1VMXPmGMYwurRzuuDWvMlFosVFpR6vP25YngVZC9+FZTpVuyr4jG8Nhu5gC0NIssFp8AVhytpQCe4bF/jVxg3xnePAQ9QW+aTfqZiuQP9xZpt6CpHoFmDEU6JNTDhnGYqUBpIkEaL0jvKDQ51+g6AgTws/MgbXSL983wFyx5gA9TzhYd6W5seuPFHB0gNrZIjDidjfGbswZS3sdzsqknVdv9aMvtNsDVpfA0sADGFkJWqSWm6LEha5hqslA0oZleB3DSmkqsQ4uMIbJ/4Yug5/y64oSImFzn1b71aVw8/JL9d+EUTQwcEUktEF7sENjtIMLbi2xNoIYXZG9Q+i78M7akIi9hPMTSf0Ed7aFCgLr0HqYfy1pHXnfBc4N05H9fwQDj5pYb3GwhvOz3Cop47WmLBkRa0laC3fxxoKRvW8/ncNMOZ39booH88lvnlCnK24cdTcRb5s42bI3fV3Kyg/qXrkPSBzvXyJiBeuLGDmX/AFbaQatlqkKoHe/N/0oSbrEqmBFKneY3PGPGuM426B0x77/4Su2E+N8/7ag1l9Zq0QatIxTNGX93eciQxywcKtVrNDuaTsoBDiwZs5j/EbwVPPAMXf++FZLLzQg6HkmGE6b4DHijChyIxYy8B6tpjhR21JamXRB/NKbm97VsJKpo/0A1bm3ACHprNb57vAsDOlNfN58aW7MgNNZKORJ1GrNN7LiKoI9ud/FLlHDr4+Rc+EmPqJ1F/JPEW0911Bo/x/YDv+w5Irn5O/gscHgvMI7prRCKi5gRnlqBoOSBihjjqazqbJXHVgmGBf6rk9vHMIAHW1fmjIS6IXCnHsuexh1M+6TcKtJN1gfUN3BCv9QZYG+5+PhusL20U4piHH/g0xJ5Bu3AGjNCBsUS3HloRwcmTM9a+HTS3JT0Nu0ISkxkU1M47mbpw44E5kRk1wZC1yHe2MMuglX+sWYblSCig8YF83u8hju5l5k0Gwf/S0YifbmVT8MjgtkcwU0vZoNeok2C8gLBS7iHMaFUu85SAPGRwJWUd+RxFUXG21iV++PyLrrVfcfZtew3feIxAzWqR+FcxQT2VphNI5omJXBDJ6jSQqsTGTsLMUglgfmIRcJCMisDL5229KdLCp2hppXubeqennSrvlVuu8Vdua8kRTp72j9KcUJBfWsbfA6V4+1nDXrSILl2YBzJnHMmyam+EWRYDSQ0wtAFOsMOhhrRe7DxZ1rkg4loTS+cipVbkTm82IXT4c3nuIcArN197foM7eBzYzEzPDsqw7v+CNUL+y/g8xMGzqgy1qUk2ceJ9Z5OzzdzIE0dnusYi3rvTr+PUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7046.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(7416014)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ebo8UCXkL83iJYDNkpXdG2x5qZh8oXv8G7HU5AWaGAaKw27UkYbe6mtYQBCedFdQY8j34LgSvlAytJbD12LJ8o3N2atvWNDsx8rUoTof+jfUaCT67twBV2+oFY8PIrR+G8Q+q8ODfYZ9cFj5mvQsZOhu83R7rwB3F5vZRdv71Qyx1yHP0+OAkQovNLVMVslab0L/Ols3SvzW6DSsVPeOtqTK20pv8opOQ2OLQ+c6U5T6B11znjEkPjqVODLCu82OBRUfKWIeBe+xGRxlphLvnymAseL4ELi/QAhCeNJCYqWrz2LObuGbEhqyam9m1nlLGId3xU5U7K/TKWqDxrZVxmEU2g4EG2Ko+Z5Ha/38YK5PyQHjgtKkjK2PJZQETf1Xpt2sqWU4zgGrf13bTQyTQYmtSZTUc9khj29nT0UuA593ygMFiiiZAla+FCBL/cZT6xk487otTqEpp6mLXp8IkHFOtZnOhUOi1EmO87GKeoAzZAVEUWIJZvaiqTDmivsnDZyymC+GyXfwrnPLdnAZGUsg/yOkPxvWcZJvOG9UaThIGGYM3gLxnKC+ZhKiakyjXKgtKk425G6Ka3qSavFuPxccEWi0yNCYueW/CHdglBhWpmf/H70lOoO6a5lFM9YCY6ri9g1HMDsJGWnTNo2UyyIJiE7g5MDYArupjXHWfypUE7ymIPcp30BLxm5nvIdyX7GteBvDoJzw87h8k+B2JEIk2YxA5lwEvThCzOcaqBlifoHy/ipnpo3lhXiXBeOth6nq9ip99v7VOtOMBXRrxzARQ3T3TzQZklzHSyYSJkQL9ewxd6pQEe/+RMj/d6J6XmyX2pTpTrXdGkCoIjHW1nDARiCY4IgSaj9U/kaSVhwevvak9RbLEz42MJ+tM0Pgc27v1CCQY0gvkPH5uCB+9nkwwtyH6s8Dp1zUT2SJXTg2KkVOUs4NvqJ32kyxuDnW3rRqXNXchZa/fyvHwu5kfLaeWgVa5v5XHRqaaJDv9WbONcb9HgTNUPb54vObuh/vh33zzSQ6gq9NZHPteItTDQuu7SbpbrCwQIDGTpJPkpFVvqogh7fYwBXhDSUAX9KiuWrpNtkdJPFU3hJOmEWADx1rStvQhl0A1L2GOnaRBlMN3yRknfEcOVMl+lvZvwKYdh/a4yBQmuohbDvh5iKf7++KodUkS1z3ioC9kIlIfOccwzpyMk24Doe9q7WceIJ6eRSoy3sxN5yZVigPXE5bulfxjfkVJjA8yNePnwSD/3iUbjIf/dZYfQj02kwFP6yAv6+O5M7uRMF61GgjekeK1RO11W+v8/F0zMmN1Ib1mR0CBvp+eVgfrkKmXbkuBxx7LxT5kyZEc/0l7I2meM842GvfzApg/p5sYZy6OUTwYAI4n7sDMfGPjhzrwX2m928nSV+w06Dl6mwJr+cg1XyBodWyJAo5nxSAnuntnjKAGEbJxPKBvX8YjHQ3LcyD4OSaKW7/kdb3WNfZoAxdXnRyVaiBdxeKmwVWeFtpEawp4YhDwqONWTaaa0RXlOV7OmKiZJxK4bg5KM+xbBofT8NIq2JSQZgwdMO6+JtbDroEWeyeLgwO3+DwQtZheVUj/R5S X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 256092d4-8da7-4dc0-4008-08dca254b6d5 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2024 09:26:31.0366 (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: zJLWtVEf3vxBvF2cGSMTdAYH92zI/vkMK1maKxrTOiDNcLOPi7Zjzn+ZyRJuwxQyqY3gGN7nq14uSP3YGiIqqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10242 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" MX8-DLVDS-LCD1 display module integrates a KOE TX26D202VM0BWA LCD panel and a touch IC. Add an overlay to support the LCD panel on i.MX8qxp MEK. mipi_lvds_0_ldb channel0 and mipi_lvds_1_ldb channel1 send odd and even pixels to the panel respectively. Signed-off-by: Liu Ying --- 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 f04c22b7de72..289e4b2b4f20 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -234,6 +234,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 bf88f189c6fe..6389c32eb910 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts +++ b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts @@ -16,11 +16,35 @@ 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"; + }; + memory@80000000 { device_type = "memory"; reg = <0x00000000 0x80000000 0 0x40000000>; }; + 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"; @@ -497,6 +521,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_typec: typecgrp { fsl,pins = < IMX8QXP_SPI2_SCK_LSIO_GPIO1_IO03 0x06000021