From patchwork Wed Jul 24 09:29: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: 13740721 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013065.outbound.protection.outlook.com [52.101.67.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B40E153BDE for ; Wed, 24 Jul 2024 09:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812876; cv=fail; b=l2/5jxKY8Epk9eOfgGLvpfLhgSRlGtuyJvBiuGwW3gI3xwWwswYC8yeJj0sFKdXwvqZcGiN7PhohKUBWboT9MgEx5o8AB8GhGicsxMlHAribRmdbJAXM23xxRVEIeYWhOoSefrazTAnmE/oKI/wLMjYFWH/5tgLB3C/cUmtu0Sc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812876; c=relaxed/simple; bh=zM6OpGTluTakyU0+pwKnhs7Btgmw+cRsbOLd+c2f3kw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BhY1fESscPNeDR4Ewq/PXCYFvPJtKnkME8VgO6sDFpincKFvRiZmA1iKzOA9CcmfERidF3vms82Cfzt8nqynF0v0G+aMo9gjnhdEZqwFlJkQulFt9MnGO+swtNz1J5yJ9VmdFoROy6xEByGt2BdkIrBVzo29xgHa1ntrA1/pI04= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=iISdKiEw; arc=fail smtp.client-ip=52.101.67.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="iISdKiEw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XDnW6sgLz6dAS4ZsinYP0rmKFuvPFu5r4WP43GTeXbkdbHODz44dWygQV94x6SwOUyHejTbg1GufU7mP0da2IydnIFFdDg0Yc7Es20TnFxV7vjF40zpSe1P8nk3sHde59EoJ4YEY3ChPRKw1k/AFq9kkrYiWKtRig3r9UOxy0/mHGCl+EPZA/R5uhAz1P1L58VqYBzF1ebwpCXezIMx2uISvA3sv3QDb64xmiYzyp29Y9NSztDbh/IEeIGjATC2mmZYA17Dr4FhcMGEYYII9RsgJkCvgVXfl6EEXcKq49t9ubJ8rpDb6apf/sdm1uJmzL0x/mfP1prPzn4t3Rgp8sw== 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=JFyiPIRg/qXwAFvta4t3IAUqVdUyp3NrBY6wgaSaSUw=; b=W1fmVy/N8f/AMD4xk5009f6oc4f9tZ7EdE7Phi/1QIOCgQl7XhczX1EvMVFDstcSlNOApGEOXHtn2sP/hJHqa2EKjZBrDZAPJx+IVAwNXvc5468l3uXUZV4dMT2XArB/nkpfhmVsPcrrvhKWs0vTmEyzoHYcOXvTABQsLR4hvOnyFn11Elp/aeJG2sa7MzLoi44S3N6Ue7lbspB3X+ljPW3jRHE6d2eC64BzdwQ4Z6ksEBuLwSh/p8CjdJcamMlCA6SrG4HXqNHdpJ8urwzPRJUY06oi8kQ2QD1I8vgO8uUqZ0K5A0+Lx34IL6vqQkihfUvzq0UV2DWBFmhvALYfCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JFyiPIRg/qXwAFvta4t3IAUqVdUyp3NrBY6wgaSaSUw=; b=iISdKiEwmrdzUuGPd7C8Si8NIGwNa5iAZWmpQcta/9lNSfAFDzW0E3baT8+4ocTqg4g9n6kbJ8hWEq3bgFk58ZE1gsTxm8JE/DqpS01roKyOVSU+CXV5DxPH5IlIXDaZ+YTiPrPLOzlSrWkMcA06lu/tDYT4lI/QVTLp0tNkfLAL6QsZdnJbxMpF75WH/PjHvnOhdiges5lsRazkUu4LeSEtR1YYG9M28fqQWnIdV+3Lw6USj1Q+1abuvvGpnejpdSA6fGEuFcNIRw4LZaPCKON/o66y8fo6VwC/j+TiCFR5SuuUpTQecIOGmBkD+noVaeq5yTsyWuB9T23BOZjGiQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:08 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:21:08 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, 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 v3 01/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller processing units Date: Wed, 24 Jul 2024 17:29:32 +0800 Message-Id: <20240724092950.752536-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: c4e56839-9c5b-4231-a995-08dcabc1f31e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: hknSyG7jTi6noSNQ5Hc208d4xeampj4ioO2ODrg64vy6WGHtw/bqTzFRinrgZCqDeuJfIgDivm6+yiHaMtHyeNjhloSKTIl3xfw5kK+DTyRUpoKY+xP8AsfGbEqc0F7uvZpnFX2O4D0RcmUs/w8tOqXGecKUz//HmgLLLft4WAVmpXVxPz8vNrH+nkbcqhalEWgRCt7BMA5PQRiasbiA6gb7BLDugzlztwTJ2ay2gtfNZ0RIuapOjp+EYbjaXxIvPPO3O5TF6CS1CRfB6iUJdmpUAfFb44at328lO1uNITM/WXEb5Ll0L7D3yC1HcqLAQXcJUBgaHJ4K2+kwN9w8hnr4MvxKT9p9PsZ5a2ucJzBq85gTQiOAT9gKUVpSle8xN4Z6OAL2KujmeqMOlAJKVuuclH0dtXU8sgvaMnAUqWxS5hKDs4f7h2GZO1v1QIj3SsT4fghDI463Ck/+kuRVwY736qkcyH4nnvEtCKpTinMUoyWDHQhEtIv5XAylJVQndrsgK0y5WMjvu1tR3g70wBFbt9f9p6bP0LRJeMeMilfrQ5SYorLAQ6mUACXamfXmGqnGnNXx+WN5UR3YApGHTtGe87B4Eml9D9gOcl4QmkQjIecPt5gJkmNj/3OUjzQ9Y/BCP5BTOZYvnr13ezxI9tdPecD6wnXYbh/21ORf6YgOvwSxHqDo68uOMNPtWVonGEPwA6Jw779MpA0XkP/ljY34Y73IiXDM1nrxvNDCLQiLZlfO+8BqwCYL90/BTTO3O+/N6HG40UxgpgEtEShptPXtalQxAOjUK8DGROA125zoR9Y3wdDicIFCk6qJJN3ExaD8tO7bEhQu+4Nh4XcugkOL9yiAvUkgDFPyEEuhjEs/0ETuclWgzt+pVYEG5sZOp5Ms9m2Ee1Nt59XV9TjuCfACh9p17B/2DIqwtZlPKz3Q+781mNbh6ByJf4JT1g3HNQpCvJdjK3rAvZF0IARo1W3zFHkJMtmuMBclykhBw7x9klr5MWUxBMJFGZhYwrfpUCm0nv9UMp+Z1UQ+FBfjH1oZmt4iLg2lPprPCm4tAMSu1/rLv8dYA6Lmg4iHpDPtJ1ziy45/Kmn3oywSnmvoFjj/kY+J/JKky3Z920W48aW50oVFyjiG7E+BqN+A/UsL9xfpSfErtCRStx/c1g01+WhbPXx6nr6hsJwfmUrvN9UZtqU+o8KkYrFqxCyrnHhJmQvZNCoTkrkYdRnPiOU10S6f1z++X5E6Vog1jiVp/ECTXtPpk5t64LaAMpVahtiUVNmTLc9TbPuJgYMhgjq+NeJgpHyzgj/lDEata5ywulYCKMCOFX27LArp6AZkEnZLSYPucuIp1nTd7e1a2VvjiYzU46IlfAYq5pBrQeatcU0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vuMoX4xDJ5M2t/1BmP+HpDmJIpwvOfi5LZZxw36yP7PQTuICbEyD1kjdfWcxlVztj0WVhkj3ADQ2N2+peR1eFsTQDiImAbr/dumAQJJkmsXp1pbR4Lrwm4RY9PA0gksdUvO770ZwtLpnXSjxGParSsezhPkrQZXMvjjcBWjSkc6gLRKIzBM0X1HAhzRG8uOnyaiesYI3EX/bwWjv50Xj6AJxaCQPFAFqD041BgH6a3rNimE+hU3EksiW6xeB29fJpCDdEwmQOGN37mMC2HjBmvwwnR9Ug9UPl1HIAfdOyIpm0nWq3wN0AlglQIku9shNeEXhq6iwhH3Xp/V5KzmgutNiED7ewO31MHGsaOdFY+xj6wIIGYzIsLjMvmcguYFR67x5H8kCm+qs7MEwqv3espCYoxU2Uvg5UDYOGueHCtL73udLXw9v5UZqkNATq0dfQIc1R3+Bza9Xh0w91wlKyRwYLjj2pPRnh5Z8fhuI9OJBPgNzRwRMaPjXJ50kTeZC1cLUq/p1Z9ZpeEkKeFd5cDWvW5/+paJK+3mkGDH+rd+NJzgF9KyvlbV6RMKccN6tHMb4N9u8pejsz5SvuvgJdW3KE9K44HLb8nt235TsFi4EUn1nP1hNXz/qAGwxa1KzE5ytIKeXDP46r/PrwQ7WIybVjn8R4R7bR9+7+Gs23G3Aclc9wsGyWkQIbAeo98VDLdlKMIvPAbQwLGwLT6ZzwzIKW+ze801d5X2abAyvhBteQ0WlOBu8c0RqzGyTmZ/Q4bzbe/Ec/eRoYMWtYrte7cbVF51GLl9tSjI+jdZy4GBFH08hkl2V4fr/FIvgHZACgFkvshG4g4dd6tNekuX/Bls1+f4+9yDeKvKO6oU6TPepIbQI7qko5C+XswsZ+BDuP3qf5jTMMU8+o9H3+4Y1uKX2q5gOMMPFVy8BOAGN9aKzZVezvSMrQJ0K/1N0kmlnLWxG/BbLqVOhXFgDwuL4v+SKrKG8f+Z69BVAweaUOEDstNWSz76MAE7Vbjb7isw8zGRHFG5qDkK/8yQYmsd3ghPVUQp9FGB2YSQD9Rv1yRED3AH4tPwoB2NH86ae7MKcZBEJBBH2LwLKOQzNw6OGJj750Uzt6284aYjijUzNdt2nO2g/Bn7l/ghPz5nslvF63bkiYhbhmEvUlj6IBl11LRd3Ds02V4aHHK4c8qmBO+iO1uAsAyWFi9YT4pB34/cJrTZsA0eGDBhdbSCVodz+4t/l2vqLpJGd4OtDwkAEPxGZzeKs/vYuWyCB6Pkn4Y21NocOQNY9KvPxjbyNjO5mF0woO3ot0VNvCvdFjoQZ8DGhaPFvd2WF3hHQeGwC1ZCn8cGDRfAXtvcOywnl2K0tPXhga41fyD5ihPsMyuWRCgeMKsseyrfc744Sn+HTsOAdYtG22MhxeFA2feQmbHAbkldowNmcJctXf2gjMHAq3t7ZJYhCnQhVsa7pRjoKE0ODWQMpWCa9jceXw6ttDthzfvy8FHJd3AZkMo37XrXz0vieg7LvybUZRR8Vuo10Rbhoiqd0iVX+/I+aBkOwyZ7B4tv4cb1i3u2UQkcp4sNj76bLJsDy31EypDqeDX6msxe0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4e56839-9c5b-4231-a995-08dcabc1f31e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:07.9899 (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: YhV+747DX+1Vo/CbsnHx2VX3zwzk6W21mW/FOnNQUsg7WSUMOGPQpqden5q07m2EhSxjyob5Asyr11oiYWuJaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 Freescale i.MX8qxp Display Controller is implemented as construction set of building blocks with unified concept and standardized interfaces. Document all existing processing units. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * Combine fsl,imx8qxp-dc-fetchunit-common.yaml, fsl,imx8qxp-dc-fetchlayer.yaml and fsl,imx8qxp-dc-fetchwarp.yaml into 1 schema doc fsl,imx8qxp-dc-fetchunit.yaml. (Rob) * Document all processing units. (Rob) v2: * Drop fsl,dc-*-id DT properties. (Krzysztof) * Add port property to fsl,imx8qxp-dc-tcon.yaml. (Krzysztof) * Fix register range sizes in examples. .../display/imx/fsl,imx8qxp-dc-blitblend.yaml | 41 +++++ .../display/imx/fsl,imx8qxp-dc-clut.yaml | 44 ++++++ .../imx/fsl,imx8qxp-dc-constframe.yaml | 44 ++++++ .../display/imx/fsl,imx8qxp-dc-dither.yaml | 45 ++++++ .../display/imx/fsl,imx8qxp-dc-extdst.yaml | 72 +++++++++ .../display/imx/fsl,imx8qxp-dc-fetchunit.yaml | 141 ++++++++++++++++++ .../display/imx/fsl,imx8qxp-dc-filter.yaml | 43 ++++++ .../display/imx/fsl,imx8qxp-dc-framegen.yaml | 64 ++++++++ .../display/imx/fsl,imx8qxp-dc-gammacor.yaml | 32 ++++ .../imx/fsl,imx8qxp-dc-layerblend.yaml | 39 +++++ .../display/imx/fsl,imx8qxp-dc-matrix.yaml | 44 ++++++ .../display/imx/fsl,imx8qxp-dc-rop.yaml | 43 ++++++ .../display/imx/fsl,imx8qxp-dc-safety.yaml | 34 +++++ .../imx/fsl,imx8qxp-dc-scaling-engine.yaml | 83 +++++++++++ .../display/imx/fsl,imx8qxp-dc-signature.yaml | 53 +++++++ .../display/imx/fsl,imx8qxp-dc-store.yaml | 96 ++++++++++++ .../display/imx/fsl,imx8qxp-dc-tcon.yaml | 45 ++++++ 17 files changed, 963 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml new file mode 100644 index 000000000000..095e65939fba --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blitblend.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-blitblend.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Blit Blend Unit + +description: + Combines two input frames to a single output frame, all frames having the + same dimension. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-blitblend + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + blitblend@56180920 { + compatible = "fsl,imx8qxp-dc-blitblend"; + reg = <0x56180920 0x10>, <0x56183c00 0x3c>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml new file mode 100644 index 000000000000..21d42aa11b52 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-clut.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-clut.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Color Lookup Table + +description: | + The unit implements 3 look-up tables with 256 x 10 bit entries each. These + can be used for different kinds of applications. From 10-bit input values + only upper 8 bits are used. + + The unit supports color lookup, index lookup, dithering and alpha masking. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-clut + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + clut@56180880 { + compatible = "fsl,imx8qxp-dc-clut"; + reg = <0x56180880 0x10>, <0x56182400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml new file mode 100644 index 000000000000..94f678563608 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-constframe.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-constframe.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Constant Frame + +description: | + The Constant Frame unit is used instead of a Fetch unit where generation of + constant color frames only is sufficient. This is the case for the background + planes of content and safety streams in a Display Controller. + + The color can be setup to any RGBA value. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-constframe + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + constframe@56180960 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml new file mode 100644 index 000000000000..8e4468d91836 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-dither.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-dither.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Dither Unit + +description: | + The unit can increase the physical color resolution of a display from 5, 6, 7 + or 8 bits per RGB channel to a virtual resolution of 10 bits. The physical + resolution can be set individually for each channel. + + The resolution is increased by mixing the two physical colors that are nearest + to the virtual color code in a variable ratio either by time (temporal + dithering) or by position (spatial dithering). + + An optimized algorithm for temporal dithering minimizes noise artifacts on the + output image. + + The dither operation can be individually enabled or disabled for each pixel + using the alpha input bit. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-dither + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + dither@5618c400 { + compatible = "fsl,imx8qxp-dc-dither"; + reg = <0x5618c400 0x14>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml new file mode 100644 index 000000000000..dfc2d4f94f8e --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-extdst.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-extdst.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller External Destination Interface + +description: | + The External Destination unit is the interface between the internal pixel + processing pipeline of the Pixel Engine, which is 30-bit RGB plus 8-bit Alpha, + and a Display Engine. + + It comprises the following built-in Gamma apply function. + + +------X-----------------------+ + | | ExtDst Unit | + | V | + | +-------+ | + | | Gamma | | + | +-------+ | + | | | + | V + + +------X-----------------------+ + + The output format is 24-bit RGB plus 1-bit Alpha. Conversion from 10 to 8 + bits is done by LSBit truncation. Alpha output bit is 1 for input 255, 0 + otherwise. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-extdst + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + extdst@56180980 { + compatible = "fsl,imx8qxp-dc-extdst"; + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml new file mode 100644 index 000000000000..97fb6a4598d9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-fetchunit.yaml @@ -0,0 +1,141 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-fetchunit.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Fetch Unit + +description: | + The Fetch Unit is the interface between the AXI bus for source buffer access + and the internal pixel processing pipeline, which is 30-bit RGB plus 8-bit + Alpha. + + It is used to generate foreground planes in Display Controllers and source + planes in Blit Engines, and comprises the following built-in functions to + convert a wide range of frame buffer types. + + +---------X-----------------------------------------+ + | | Fetch Unit | + | V | + | +---------+ | + | | | | + | | Decode | Decompression [Decode] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Clip & | Clip Window [All] | + | | Overlay | Plane composition [Layer, Warp] | + | | | | + | +---------+ | + | | | + | V | + | +---------+ | + | | Re- | Flip/Rotate/Repl./Drop [All] | + X--> | sample | Perspective/Affine warping [Persp] | + | | | | Arbitrary warping [Warp, Persp] | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | | + | | | Palette | Color Palette [Layer, Decode] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | Extract | Raw to RGBA/YUV [All] | + | | | & | Bit width expansion [All] | + | | | Expand | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Planar to packed | + | |->| Combine | [Decode, Warp, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV422 to YUV444 | + | | | Chroma | [Decode, Persp] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | YUV to RGB | + | | | Color | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Gamma removal | + | | | Gamma | [Warp, Persp, Decode, Layer] | + | | | | | + | | +---------+ | + | | | | + | | V | + | | +---------+ | + | | | | Alpla multiply, RGB pre-multiply | + | ->| Multiply| [Warp, Persp, Decode, Layer] | + | | | | + | --------- | + | | | + | V | + | +---------+ | + | | | Bilinear filter | + | | Filter | [Warp, Persp] | + | | | | + | +---------+ | + | | | + | V | + +---------X-----------------------------------------+ + + Note that different derivatives of the Fetch Unit exist. Each implements a + specific subset only of the pipeline stages shown above. Restrictions for the + units are specified in [square brackets]. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-fetchdecode + - fsl,imx8qxp-dc-fetcheco + - fsl,imx8qxp-dc-fetchlayer + - fsl,imx8qxp-dc-fetchwarp + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + fsl,prg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Optional Prefetch Resolve Gasket associated with the Fetch Unit. + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + fetchlayer@56180ac0 { + compatible = "fsl,imx8qxp-dc-fetchlayer"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml new file mode 100644 index 000000000000..5c54d5179ee3 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-filter.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-filter.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Filter Unit + +description: | + 5x5 FIR filter with 25 programmable coefficients. + + Typical applications are image blurring, sharpening or support for edge + detection algorithms. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-filter + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + filter@56180900 { + compatible = "fsl,imx8qxp-dc-filter"; + reg = <0x56180900 0x10>, <0x56183800 0x30>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml new file mode 100644 index 000000000000..9d1dc3a9de90 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-framegen.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-framegen.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Frame Generator + +description: + The Frame Generator (FrameGen) module generates a programmable video timing + and optionally allows to synchronize the generated video timing to external + synchronization signals. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-framegen + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 8 + + interrupt-names: + items: + - const: int0 + - const: int1 + - const: int2 + - const: int3 + - const: primsync_on + - const: primsync_off + - const: secsync_on + - const: secsync_off + +required: + - compatible + - reg + - clocks + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + #include + + framegen@5618b800 { + compatible = "fsl,imx8qxp-dc-framegen"; + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml new file mode 100644 index 000000000000..25ad85742912 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-gammacor.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-gammacor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Gamma Correction Unit + +description: The unit supports non-linear color transformation. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-gammacor + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + gammacor@5618c000 { + compatible = "fsl,imx8qxp-dc-gammacor"; + reg = <0x5618c000 0x20>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml new file mode 100644 index 000000000000..2a6ab8a0ed7f --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-layerblend.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-layerblend.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Layer Blend Unit + +description: Combines two input frames to a single output frame. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-layerblend + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml new file mode 100644 index 000000000000..d773389dd0dc --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-matrix.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-matrix.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Color Matrix + +description: + The unit supports linear color transformation, alpha pre-multiply and + alpha masking. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + reg: + minItems: 1 + maxItems: 2 + + reg-names: + oneOf: + - const: cfg # matrix in display engine + - items: # matrix in pixel engine + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + matrix@5618bc00 { + compatible = "fsl,imx8qxp-dc-matrix"; + reg = <0x5618bc00 0x3c>; + reg-names = "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml new file mode 100644 index 000000000000..7115950ecae0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-rop.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-rop.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Raster Operation Unit + +description: | + The unit can combine up to three input frames to a single output frame, all + having the same dimension. + + The unit supports logic operations, arithmetic operations and packing. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-rop + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + rop@56180860 { + compatible = "fsl,imx8qxp-dc-rop"; + reg = <0x56180860 0x10>, <0x56182000 0x20>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml new file mode 100644 index 000000000000..66c12948ab09 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-safety.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-safety.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Safety Unit + +description: + The unit allows corresponding processing units to be configured in a path + leading to multiple endpoints. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-safety + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + safety@56180800 { + compatible = "fsl,imx8qxp-dc-safety"; + reg = <0x56180800 0x1c>; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml new file mode 100644 index 000000000000..76cbe11a6364 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-scaling-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Scaling Engine + +description: | + The unit can change the dimension of the input frame by nearest or linear + re-sampling with 1/32 sub pixel precision. + + Internally it consist of two independent blocks for horizontal and vertical + scaling. The sequence of both operations is arbitrary. + + Any frame dimensions between 1 and 16384 pixels in width and height are + supported, except that the vertical scaler has a frame width maximum + depending of the system's functional limitations. + + In general all scale factors are supported inside the supported frame + dimensions. In range of scale factors 1/16..16 the filtered output colors + are LSBit precise (e.g. DC ripple free). + + +-----------+ + | Line | + | Buffer | + +-----------+ + ^ + | + V + |\ +-----------+ + ------+ | | | + | | +-->| Vertical |---- + | ----+ | | Scaler | | + | | |/ +-----------+ | + | | | + | | | + | | | |\ + | ------------- -------------+-----+ | + Input --+ X | +--> Output + | ------------- -------------+-----+ | + | | | |/ + | | | + | | |\ +-----------+ | + | ----+ | | | | + | | +-->| Horizontal|---- + ------+ | | Scaler | + |/ +-----------+ + + The unit supports downscaling, upscaling, sub pixel translation and bob + de-interlacing. + +maintainers: + - Liu Ying + +properties: + compatible: + enum: + - fsl,imx8qxp-dc-hscaler + - fsl,imx8qxp-dc-vscaler + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + hscaler@561808c0 { + compatible = "fsl,imx8qxp-dc-hscaler"; + reg = <0x561808c0 0x10>, <0x56183000 0x18>; + reg-names = "pec", "cfg"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml new file mode 100644 index 000000000000..c495822fdc80 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-signature.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-signature.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Signature Unit + +description: | + In order to control the correctness of display output, signature values can + be computed for each frame and compared against reference values. In case of + a mismatch (signature violation) a HW event can be triggered, for example a + SW interrupt. + + This unit supports signature computation, reference check, evaluation windows, + alpha masking and panic modes. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-signature + + reg: + maxItems: 1 + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: valid + - const: error + +required: + - compatible + - reg + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + signature@5618d000 { + compatible = "fsl,imx8qxp-dc-signature"; + reg = <0x5618d000 0x140>; + interrupt-parent = <&dc0_intc>; + interrupts = <22>, <23>, <24>; + interrupt-names = "shdload", "valid", "error"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml new file mode 100644 index 000000000000..42d1b10906be --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-store.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-store.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Store Unit + +description: | + The Store unit is the interface between the internal pixel processing + pipeline, which is 30-bit RGB plus 8-bit Alpha, and the AXI bus for + destination buffer access. It is used for the destination of Blit Engines. + It comprises a set of built-in functions to generate a wide range of buffer + formats. Note, that these are exactly inverse to corresponding functions in + the Fetch Unit. + + +------X-------------------------+ + | | Store Unit | + | V | + | +-------+ | + | | Gamma | Gamma apply | + | +-------+ | + | | | + | V | + | +-------+ | + | | Color | RGB to YUV | + | +-------+ | + | | | + | V | + | +-------+ | + | | Chroma| YUV444 to 422 | + | +-------+ | + | | | + | V | + | +-------+ | + | | Reduce| Bit width reduction | + | | | dithering | + | +-------+ | + | | | + | V | + | +-------+ | + | | Pack | RGBA/YUV to RAW | + | | Encode| or Compression | + | +-------+ | + | | | + | V | + +------X-------------------------+ + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-store + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + + fsl,lts: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Optional Linear Tile Store associated with the Store Unit. + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + store@56180940 { + compatible = "fsl,imx8qxp-dc-store"; + reg = <0x56180940 0x1c>, <0x56184000 0x5c>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <0>, <1>, <2>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml new file mode 100644 index 000000000000..7a3b77ea92c7 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-tcon.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-tcon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Timing Controller + +description: + The TCon can generate a wide range of customized synchronization signals and + does the mapping of the color bits to the output. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-tcon + + reg: + maxItems: 1 + + port: + $ref: /schemas/graph.yaml#/properties/port + description: video output + +required: + - compatible + - reg + - port + +additionalProperties: false + +examples: + - | + tcon@5618c800 { + compatible = "fsl,imx8qxp-dc-tcon"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; From patchwork Wed Jul 24 09:29: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: 13740722 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013065.outbound.protection.outlook.com [52.101.67.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AC7F153BDE for ; Wed, 24 Jul 2024 09:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812879; cv=fail; b=Puq1GHmKlfdCCArJmhmS7eHEIk7nzYO5w72U9cKv5H3c/gtyqnK1SWl/GOyMF4h6XZY0NVGQScyHdFid6l2ayrBFcjaJ4z41slQ0q6IYbPq24QCP+l5bTlZ06nQC1DWzK9jDElU+D6Z3WbiG0qq0UMJ9OCLv1Csh/FUahSKuQIQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812879; c=relaxed/simple; bh=wDzgQrrtGpk5+6LGMPyznvxJiVKsokY4j7JPdYxpaoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Kay0OPA1ll026uHxMOdxSN6uAEAWRFqB8K0pA3PB+lQw07XA/trmNUKbcUzmRIt7Xe3DMknvez33JvJkc885zd88GIuMemqtx7su65jEiSHfEkcLXmKUuJ/dNMq/MYDiV8n4TuPhbUYDBkP4YcptrPjFsdUA7XqILybiQhbxtWs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=OX2vouLm; arc=fail smtp.client-ip=52.101.67.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="OX2vouLm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c2qEKDNNDL3lt9a/O9WXW5PB92BhujQBLIx1G1zRoJuweIDroBxFEIdEXdMmC1pEGnu+xgn0hJ/x3M8WqiyBb9AoEMtaqgHScaHcTc2C4y8wUdqzrhuOnd6h4++BpxpIgU2+TzI5ZH6EvK0h62xS4oTn4RTcGmARvHC+u3MtmCE0ksMnddjrSWX7m1NIwRkCorJAPiWB5HQ3V+2o2Ju7tO22vshA0VVlu2WKCNr93CnAQSbJe/+MlGuhUTrGGEBLTVtwApEskik5orhEzxk6Uk6Qu222pVwI4eA6m2q44nE5PyqdEwWrjXWKTcDPyR6YiC40mjsK0akarr+H6nNBYQ== 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=VoIk490rb6d3ctxZmL2CTX23KKQGKq01L7B8sQF628A=; b=YW7Z9Bxc2u9jfqHh0tbcclxkPEv8n2TxwcsRQSdpO019eQZbhJnD9zHniM3GPwyX44ph4X/AfL9o4h6lnwbX1rzCEJfR1pz0xjVOjg2EAfM8ydXpo0NnHhO5VcCz5k9Nkit73R26TnPz5YF8LQumppb+sdYCBimxgJXQLq3EdD/ynjPYYRlphtR6ZMRiYLkVii9Edxror1cdKjP32MSPYRZ8q/O8+dcLF7jFtiSHra/hzhneBsspwZbBXXpB8RSJYDDTLhSLr2onP1beZe1AiQkxVnydV96cpNqGy4QI+OnL2X1YCfw8nu11R9YnfFqFaNLDxdUc35C0Q/7Nn69Hfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VoIk490rb6d3ctxZmL2CTX23KKQGKq01L7B8sQF628A=; b=OX2vouLmmBxbqj2XdeHn8AY88XSuPF9o3SWWgmOc66RPkQP0dXB0RAkt5bMaP5S/9VnSW1uN04SGntQwgY7m6LZADanNGRcpYV919OaZdbS7edXiYdbBR1UAX+l1Mbp2xuPRxzZGM8i75sJ1Zc4sv6UHfCOG2gv3fmCC4zgUKj0rkZd+5Q4QGC+8jstKPtfJz+Hy01Rv6W3lnV+cmWFdi5uzb7ohp2hvY2c2gHXx/ryO/X+InpPTOSrnMNBiDZCB0Tz/1kV1Rk73Wl9Uee0xWeaKmJ/mhalzrQIhgxgWviS7C4CzgNg2I1KIjMlZI6hKWM1686HIxEJZXA2xCR/rhQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:15 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:21:15 +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 v3 02/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller blit engine Date: Wed, 24 Jul 2024 17:29:33 +0800 Message-Id: <20240724092950.752536-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: df7f2d28-ca8b-4c5c-5af6-08dcabc1f76f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: sdD5mu0iAU7iSBTYtn9T451KCUa5oawKupLhMFc+l6g39CfScdtJSoyrjQSIUgIN1+QEqiwXInXSjOR+jS5gxkvGDB6TyHhBUvhzSCq82mZRtkNg67ZOIBo0j5Ca50BAekTSpxU3nXG1I++HgFNl6V6HS+OmZDhgP75YllY9hXfdSqBPauwAnEs25ftDd9scUPIvUgBpkDvp3EnjApvpOZahHHkZ4CJe5epogcqEsEd56NLcIQJEu6mW3Jl1UD2KIwVYX1QY1WsbVi10UP77YHXfReGalqLE6leS76v0R8wFAiYY165IuAOXrw+49uPOrNuSRLExsIBDF8hXN/Cl3EDZ8u1tOqAnrnQqK1aVMX8vftOw/BM74j6Dih3HVKfgEBeC2RuoSHaHjUWNgRSC0/z1sOzqUYb0vBIKlB95CsYoFT2ATmPEyAZQLfgLhwXo8LerXPZbV2IdMKLuWziux6OSgBo/y5wazv3eApqN1/O01FXjOA6AAYoTMLVolgUMLCvpPcWK50tKE8XHkkxtjyBfFxU6yKrthhVx+lFUc5A7E0OoaxDRtwds10kb0U+FsKb1lhcX+OXZX1ivVtkq1QB9XtSPGSG1l3YADzrMoSMhWAshbtFRJwfjdjm0dAIwwx32s5pbZkg6WBzviZqOaBmG50WgfNn1/eqDDVAxoGuR0TrpsGQSPnyw05xlzRm/z+3tFNuMPg0E5WAWjHbvsixf+t9uYx1QrRIUrn73GhjBsdNZAOP6pvtI/4O6DSkIQI/vgkxEdeo81vHCUC4XJIgxCq60/8Q1febE3gNWVNib0iJEqLaASVpHi8bnZvKhQjzvHzrJYRRK7FZp3fRq6pBi+ZYoc+PToaboFdI9e4EtTx9b4J5jyyH9We1j/SibN0PnZ/m0MXDUzG7oD1pREV8CAatoDK3IxVzFYEjl+8DMYb8aUfXv58BreJIo/xr8InhEeQ9HK+PZpBZKHpSN5ciRudG+7SI+lMffLdYiudMcdN5y3wKfZ/KHNj73sFmZPmZehRQ/q7ng3YPkXkMZbeFPV2EpU0HOJmvbLr0C8p8orzoQcY6COE5tOXkjbLos4NC4k1YvdB9tJgekEnjUP65BlAYOoigLgA4/E1IHVUOw6w09luJM0awPlHa8NxfT6oCGRKKGlf/RVVxe4vefDjhO3V7cs9YA0EvcV277REKfTYN5eIUARX9JnOZnS7WU0Yf2Lj6gCBpkAO2UA4YfSr44KTvFRmd9ZBzkN9kAuBdZxMc58sFhukn293kuq15K2IrGnyrIFVqt6amjDvO0+0Q+hXBvDPRSQO+H3nn4VuwK5IDqJCRWqm3KP7b3jqIPs556klzAl4FWUJxUg3cmbw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 11NOZXzP7YCs7iT41tBEKwOotZSmuHuIencj2kLWNKxmWHnqc7YOa5k37/RZl3wrr8QwNSrXO1XJe7fNo/N5ExSBrxoYYMEZgQvxQF0TsJN/pDUwIi0DURSCFQAe62IycfmhFix1DidRRo8UzlemTWStHrWpJAdycqdQ7H18wRvt+oIjMHhPDJlA6t/g54Xkl+rw+6zllDjJ5TecitY9rPkxUQFqPxIP2yJz3+h8Vu/keuu6lit0NSTDybykSOu7NdAzL3O/8L67aKsvLYbMQb1h46Jc34Wo0gByRacn5aFboplkhGjNHpYIiWKsMdmR1SoiUpUloHx6M5tnbYjgMCBhEuEAZtd7+KhMn4rcSxKXpi3WHWBY66TrNOhmcl27qKtvOUcKxTA7IUigxTCKm60GyaEUK7GysfFuovs90ori6FwricPwuDhLRxBOjiK0mWciuBaxBCBZoefcNozwXuUku4CX+vK7YmR48QCEvAkfZ80dKkqAD2wuX1HZS5YvD8U/l1HsU+gkIJeBcO2Zy+G1bJrleDYMNZko3+iGIjqrXisXqJB061NjAS9eqePMGRRI3FdNeoOxhdOosfcuT8IFNZQnteAHtewmp9Ez5n/gt3vQRTuJGCy3sCV1NnFTKpzh8UTAaXG+tAywmULjicY6ImQExRMwR0dK4sJltmuWn9VM0apk4Bqgwbg/l7b8fSxHdP+OX8yhm6meGdLR0o3tbwg714hC7LTfpCaOMmQdSy9kCHl4EHhi0DwjPor1Q7rH1kZMBjE1fsE7RV+vY/qLxVVI9pXt+ZSEJbMBSnLCDNbDNNjXXOs2MPWku6YWgMGPDKo2iicqfdqYdisfdnM0/LaICMWf/6ppCnLrueDyGJtUSMdjJMAUf5REHI9V1G18pWKeKJ6cocYsGNcTG948KFbXcJ7loyNfX+qkm3HY29lKG8kA5zzwJY4MkTQPedO3StWNrMo/iHIDXXKYaaXCaj4X6OpNQthoozkDbYQXi+KY55OQDY4pDQxc79lqUl+qCxMsmxwF2Eg0/Rh2uGTmSSMN74xyWddf1KWSPSOSpZYkq4pocYk5x1DPB6sAZ2uP1I3AKJWd3U7SxQvufrd0WcCnJpzRQl1mpEwCwjqJBrOijbHY6Tl4kLXMkOwINaAy+bY+S1stXf21uvV6kCBTcXdKyQM/ICYlylYCFBhHu27/z4xaD8PTzxG3XTCw/0772lLxNeMOb9V9aTtILpJwHXQ5wmUx8NpjM7qJqtrsrPia2YXcLgds7GCG51LoTWZ8zhRPYSj3eDhkJGKOXcrse44yp4ZcuknEcUP5qXaONJ29+gCtGIuxFq8KAojuwo0kPsPlB9ncSSAURvU1T3vFqYOEdbreK6Y46FQw5EE9efE0x5mVpwQh3Pz47MYqPnGvbrYkCgKJdC3Pmrty40tXN8eqkqkUDK/XtFiIrg4YFqoXof5uMGYr0ZHJPOy6Fmz4nm2HOdbKixDcbldNrztMBiWutafM3nyFVHkP+CItD2JORY7nxfYwubeCIaa4Tvehvv55NjpSLL56VtDYWFEcxlbtiCTVwjdNRA+rr3Z2wm31tuU/aA6ZINU3W3tO X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: df7f2d28-ca8b-4c5c-5af6-08dcabc1f76f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:15.0006 (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: Qi67xRJwyccQf2ED5AVoBxnTvUWQW3ACJC6hGNpt+ZScvd9zpOuriwYCXkI8Bmj4Q0K3FyrgaESOkR+cC0vqGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller contains a blit engine for raster graphics. It may read up to 3 source images from memory and computes one destination image from it, which is written back to memory. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * New patch. (Rob) .../imx/fsl,imx8qxp-dc-blit-engine.yaml | 204 ++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml new file mode 100644 index 000000000000..45db6da39e20 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-blit-engine.yaml @@ -0,0 +1,204 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-blit-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Blit Engine + +description: | + A blit operation (block based image transfer) reads up to 3 source images + from memory and computes one destination image from it, which is written + back to memory. The following basic operations are supported: + + * Buffer Fill + Fills a buffer with constant color + + * Buffer Copy + Copies one source to a destination buffer. + + * Image Blend + Combines two source images by a blending equation and writes result to + destination (which can be one of the sources). + + * Image Rop2/3 + Combines up to three source images by a logical equation (raster operation) + and writes result to destination (which can be one of the sources). + + * Image Flip + Mirrors the source image in horizontal and/or vertical direction. + + * Format Convert + Convert between the supported color and buffer formats. + + * Color Transform + Modify colors by linear or non-linear transformations. + + * Image Scale + Changes size of the source image. + + * Image Rotate + Rotates the source image by any angle. + + * Image Filter + Performs an FIR filter operation on the source image. + + * Image Warp + Performs a re-sampling of the source image with any pattern. The sample + point positions are read from a compressed coordinate buffer. + + * Buffer Pack + Writes an image with color components stored in up to three different + buffers (planar formats) into a single buffer (packed format). + + * Chroma Resample + Converts between different YUV formats that differ in chroma sampling rate + (4:4:4, 4:2:2, 4:2:0). + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-blit-engine + + reg: + maxItems: 2 + + reg-names: + items: + - const: pec + - const: cfg + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^blitblend@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-blitblend + + "^clut@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-clut + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchdecode + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetcheco + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp + + "^filter@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-filter + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-hscaler + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^rop@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-rop + + "^store@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-store + + "^vscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-vscaler + +required: + - compatible + - reg + - reg-names + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + blit-engine@56180820 { + compatible = "fsl,imx8qxp-dc-blit-engine"; + reg = <0x56180820 0x13c>, <0x56181000 0x3400>; + reg-names = "pec", "cfg"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + fetchdecode@56180820 { + compatible = "fsl,imx8qxp-dc-fetchdecode"; + reg = <0x56180820 0x10>, <0x56181000 0x404>; + reg-names = "pec", "cfg"; + }; + + store@56180940 { + compatible = "fsl,imx8qxp-dc-store"; + reg = <0x56180940 0x1c>, <0x56184000 0x5c>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <0>, <1>, <2>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + }; From patchwork Wed Jul 24 09:29: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: 13740723 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010041.outbound.protection.outlook.com [52.101.69.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91D001527BB for ; Wed, 24 Jul 2024 09:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812887; cv=fail; b=U3hHYVayWrjChKUgYOQIN01oAYec8Ya/l+8JjKku5We7SbdMf4A/0oNYy+yqegrk1ZAP2u8NHBJbS9ZwLvET9p2TCGlDgAs10x1/uQ1j9cdLt0XaNHc+BexOqVEi2Uz1lL5Qsq16zRcllZ0bj5aNsYEkw+6LWoKkCwxwBu9HHm8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812887; c=relaxed/simple; bh=tn08eO1/QMpTiIPBpqPGth/e+LZar6hrNOKMlmYVHIw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=OXHy2W5ZdAL7qNYlhS7ffUyoPGCsVMml2znQJnvtQ+1Aj8sY/TvPG6ANOKFcckMWbwTnia71dcxTVeU7ID2xIs7meYMbxLoPPsh21lmHgZCB0gy64ckzR/3pmbQQ5HVvbNqG6BPiHyYx5FVGTDkyOedZBvwCJtwMJczPyitQV0Q= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=VmwyFUom; arc=fail smtp.client-ip=52.101.69.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="VmwyFUom" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vlTFrQIgB9rp7WBx1IGxI2i6QZTtPLIEHkAlgzPcWoISMMrBhewpArKw5xe8wV1d9NnRXoammrFXKuil4S59Q9xl0+ObXHefhjms0b1eGRlOcKglmJchlsT7WcVXybzQlYw9vK8Ac4BIA+vgSapxRfha/ThAd8nIc5yXf4ZcSqCLxths+ZDxHsU0rKgfq1V0dJ+b7ksJfHBk0Lc4N869kgjXN/mmITMpvM3Dh384QY44VC20s5lunAiGU+o9+XnMiCHQoKqWQaSjC9vO67M/f126SeGfijlL+6dr6BKPiDrMDugURA8UlxbO0OORtfwUqHqJh+HWRfPIJCiHpQ0KqA== 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=iddFpx6nvD4WYbN39qUdLm3X8vhYiAoliqnbdDsKZR0=; b=km/6m6nSlJC94v+G/lj+JYew9fX5CO9HEA8ER5tg4po2RKIBUiMLy1cewb+LdNkjm9/ZUDfAE82l3tsa6UKYBEBjgdvBsd2OHhr6Hx586T1vd7ELKobf5kKqjz8xajXG83fO4J+7U3o+cLEjesH2RleQZMGCLIQT8/V1/4yUyFVCGslLjNj6aSixPs43BXMN58fWdjnIOkLkE1RIzQZYKLwIf9tz/v62TUuGwCm7aGg1VFXYHrao6OC5EZANfvm0arwZgMwToeal12zs62tQ51aDVWH7Q+DHzRR31xYaUdlAroeaHJbCVLo64R8HI1P1X7EAbPjutP8NWSx4qBXTaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iddFpx6nvD4WYbN39qUdLm3X8vhYiAoliqnbdDsKZR0=; b=VmwyFUomnEam3Taap4uhf6YXmgil/kohGt/BxkbvIGzDFqIPQHhKzjyMNMVgQKsHC8VGDtqLjdN3Yg2XqAS9MMJPB+0SMrs82arye5LimyTU++dORpVlJ+/P9uwY0eWHlmsYhRrBN+vPMuZcUyPmcKJp/agDqemj6sg8yNa796XK9Tvvfizu/Ufj6Nsd7O+Sf9miBECnJORIPf64UTNC2QpmwH7/U14oIll9j4gYx8puvKoWChKChiJt+TWmQreKmGQ3B1RNPn+rd9vAJ/lbSVasuayXABrCe7GCJo95pi5mfPkbM8QBjRgh5XqBVBxygwHHOdE9+L0dJKD6LLFSKQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:22 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:21:22 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, 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 v3 03/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller display engine Date: Wed, 24 Jul 2024 17:29:34 +0800 Message-Id: <20240724092950.752536-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fb811ee-9d68-490f-5a3b-08dcabc1fbae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: pcxFMrp5pFf/ZGwCuMD0fGbarkedoJQ2p0HejAzCBH1Xg2bm8XpdCXagl5b7IEMTpwegBmMYbuQh1coO/xLoYSEZW5UcD2qfpcIyks/CoZK2bYkPxClxaHVTTRsJsMPZmVMtQjVPgo0ESKCagzy6xxMMJU/A6pSMZ5x3xLLPF560ou9IFEbBmzQqnIKBCffRhuJo0H+5MV1deHXMIWyF7PL/aEssMjYnCb+ejRJmtbdUPLU5z/ftz1bbP8tuUGznCRM8M/QUVq1aNdun1tD0fK1Af62IGvQZn9fTb5ctVxygGeqEZVcO6Gca7GUGFfzKWi0TFIcOahIxZ47/nEoNhIsLes8ryzKpKQUGAP8MrMnsTHH+ia+3S+bEQ2/USLyjJ8/9s76eQkyCSy+0ghACkfANqRlT5UEl4MTliH5X8FrepTcEC0uZvnf3slIuvMmPbl7S4fgzmY1zjTynQz1z+fGTYUjtUeEAHQBDLdMb6clfVdrLdB5l1k3wJAq8rGxiGDHzfTCFQlEJrnIC7NIkkAWRMf9fNb0vipYS5nH9baXF7cUFLTcPANlpdTnHBKtqM41Su4ri+OsSawGlCqUcwcj+9zx2XftALYEZYnd69QF3mLFaLEE2Tfm990Z6/XdtP0FdPuS91Nz+hFqclY6e+Tl2h8++qDnSlpWV9z0eSn5R65g2UmNv+QsrMkPOcoWJXeqAYKzDy8GIltsO7PckljViUaVgRNJaK+HHISEAO/8mwrHcmKQiVe8vA5rtmGBmymF/9e2HWktg3HBMuDyNgStUFf9lYwSbllZQiNw1g4N0ePAl5zZCwqnVrfE52MmiXMyEv07WHnsP/uxmlxgqWqkiYVHkp/nWaE3eDUGxgMmpzQWrRX1VtkD3XSBTv51KsocZkymWmRe74xxrBMNNicG+933peQdEtsn04y5T2dASpXgjvpPji1kNns6tUUy7L+lMsjJpj0vRmDREPYOPrTfgUA7hbFYoD9APiQf0tcbQIs1pox7+Wbw5HcD0s/zrzPm24BP3RsB8GZGOpZiZAv8NXZrpf+Tm0WBOmk2KDAiLwYu9MpH9oLaVvpgPHixB6naihtw+S585pSRoRZ8LeoScIS336iNdrLUvTp+6bY8PLg9WEQ14/nOYHML4C4AdckNgCEcqy1IidEKocdLJxvIUuBiSuBYXoSY4F8v1obn9uZDrITpHV/qlPbcumB6/DxXcw4eVj1QTZ2UTU30JE7cIZMucmk3i1EE+4BFJzrOjYQzpw96lbYLaOGh2RETeqH8JD6H0tWqgmOC1ZhOtsvacANfP24Z8byGndeeZvxDgT17L/BMGF0jouy3RVtX4XbyS06GFvIVoksv3cp+wkVjKrhuzUMbvx32kt/gUvuI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zucM2Q9z0ejcjyo5nioqmSODkVFgQHM/cDm1tuqfKW5Ou/8UlAPEq1ckTbBYEdP7/Oamz8UHvHXYCKYzeDcgLPw25DM0hvAsl9J8XsjLH1KfHM5P2iZxMmkTzJYzJDWfhXH/zhBhOojuKgtrrp4x6B2pLrbxmFLD2h1eAiRKvqf93/kYNp2yMNQZcRasaCKLD/F7AfyoWtClYBw8H1uXJOVdpaoBpRkQP1wEub+VVo0nqjLcjCg07YWSieEU6PkmokcrnLUBKowAsercZp0/E8S3c1NCSdEUm2oEJdUn0/qPrAm1hIG1Ji7VTP3/vwFVcSPgA7j3bfJZZbZADFL8BvkSUHjMmpiTIbLwGKzzTwFt2rbfZsOJ5I7gV3OCED3MNrm3ggcTNKIDSq75WbnQLf3LrV72TQYVMALmkZVTJ2xycPH3qpGwLs/fGwYf1rdZyuS9iDjo1CYqtZV9asEkX1IqmofS4ze1IJ4qzn1ZkKRK1rv7MywiSdz7R53Z7w8lqq9d/7TzEgiA4Xzxrz48ygez6rXWxQWbaT4vNP723XW3AH7qYkWFkRqfpOoVRSs5FUVY9oADEji4ESzJAwu30tycRpHEnRWQu2cVSqrQjCG0p/x+AWNnb8gUuOF2Bl1+yjUixe6ay2nIN8A4zRDYlwZag7o/xDojmhen0SIvRmd5cenQlU0YUBkfnmsJsMNOn5q9WN5Z0b5PAIimOxa2Zxx0zcglgnBjBZVgZc1Jf2ACxjFHn5EVgFQ5ZKyaROn8p+fWZWFLs4dBmkwVXsOI7Kqhj/emVuEVLcybwv7iJkJ9nYXEyb7vw0DkY1PILCXMh15xyOgUI2L9PkN8it7OvBk19jOCBBKuE7nKfNlmcQAWCDv3nbHaXNdPiRkBgvqKZ4NwdAoBKQG/EXmHp3m5k4Q9dtBVamsZOrkhVhZEaC128LnYC97s4GaRjV4BUFvuL/39h8ZwKBjSYygJjWYbhjiVvtsW7BgtofsWduPV0Nilh1MDJpjGIEXw66ASdmGtYEDS1mauEET3LG9raqyC8IKns92E9JDYaWQbKU8QoKFwGqaG51A7HOfioJWMuYztkCqRI/0Pw4VlVUD2a6Gp7K3cLZwKEbuBYxRgL+BLo9Xcyk+opoFhmpLM5fYWc0M7Ef/FbSZx2Klo5rvJcD5WO+ZeKXvMMyPg6gHR6Vh7w+Pdi1Fz5mRS/Iw+QHoE0r681tERgQrV16aFbFIgiqRliDx/xIAVgzHrNOSAJmeGAFtqipMHp3eNEh7OZ6WsPZPldtpbV0jLpfKuR/j8DD9aNhL6W7GlVLrUxn1cNkNNOGE3ic67HyfrkqJQNcLTJJaeLEgOOuGwS/drbegls7zX2JBFrCgr6DtsTwVijUnyoAoHlqCmqf86h79vlTMn1lNkSMoC9MmlhIhORtZ7OYyI8GaQ6Gli8YzB/N1xJylXUHysu+MyWvgEpja7DfhvH1z4tExqDyz/RaUiRhDWD9D5XG0+7l9SMiZtQ9jUSQgO6lSRT4IG/nnhKU/j2Xm3NzeKlkx8QlKi7e/YB3BWqDYn2uEU4rdybYLULjR/Nv9c8+QRIxxKLqD4ytVEWqh7WuDX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8fb811ee-9d68-490f-5a3b-08dcabc1fbae X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:22.1143 (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: fagZS1tKR13M31FKMp2u8EDAne4maxTeyoDWVcE0Djq8BARB0se7cnHfhcRTCdOtALzVEInzy3JmYtEHGHKqUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller display engine consists of all processing units that operate in a display clock domain. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * No change. v2: * Drop fsl,dc-*-id DT properties. (Krzysztof) * Drop port property. (Krzysztof) * Fix register range sizes in example. .../imx/fsl,imx8qxp-dc-display-engine.yaml | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml new file mode 100644 index 000000000000..91f3bb77d8d0 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-display-engine.yaml @@ -0,0 +1,152 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-display-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Display Engine + +description: + All Processing Units that operate in a display clock domain. Pixel pipeline + is driven by a video timing and cannot be stalled. Implements all display + specific processing. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-display-engine + + reg: + maxItems: 2 + + reg-names: + items: + - const: top + - const: cfg + + resets: + maxItems: 1 + + interrupts: + maxItems: 3 + + interrupt-names: + items: + - const: shdload + - const: framecomplete + - const: seqcomplete + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^dither@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-dither + + "^framegen@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-framegen + + "^gammacor@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-gammacor + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^signature@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-signature + + "^tcon@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-tcon + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - power-domains + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + display-engine@5618b400 { + compatible = "fsl,imx8qxp-dc-display-engine"; + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framegen@5618b800 { + compatible = "fsl,imx8qxp-dc-framegen"; + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + tcon@5618c800 { + compatible = "fsl,imx8qxp-dc-tcon"; + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; + }; From patchwork Wed Jul 24 09:29: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: 13740724 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011070.outbound.protection.outlook.com [52.101.70.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 167B713BC26 for ; Wed, 24 Jul 2024 09:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812894; cv=fail; b=Jx9mBbvow+RZitwPKuEh1+5aDkvhnFrTVzykNE8A5CHvqWSyqzoYwtwo7IGZIGKRUhWmm/x6a4QIDdUuq/LqCnZKv1EqU/DWzcQd6epKRI2bRpR/mKwVDOSkKmCEcQCnuq2baq0qbWqcY6Cy87vL1Au53WNNYkUP/VtVsli37wU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812894; c=relaxed/simple; bh=rvBO36KyUbQ2rrjW9L7mJcwTSnt7UscKEhEQQHDF3uA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=PxRieu0/u7vk2u0Pnl8NHcVp8q4JtqQOmbRsStE2ykIpcyR0q/0Hv6V/O+RTwvhe5LojTfNhJN84X28R1WXvn7Rc0nt0Y1U4jsY6FHXj7Q597chVQoXDng4fZSZtJAb4G5WT/g/VUMueJ9PlmHoFERKMSwEyiOun9WBg84t16rY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Ha89aRMT; arc=fail smtp.client-ip=52.101.70.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Ha89aRMT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u0ZdaSIYc0910/+MNnx6b/a9AVUhhoIbn2PFWNeVTLN9f8z/1AkWIf+A9iBdsRMGn236H7g23+wH3VRG904SrFd1BGHbbR5BQZMapBNQWhnmcrXGFQ6P+/uIdkUtaxbpVdB1iGVnLL2AIc4VLaNJzAuspTbZeHIJwiulBRvgcKYjozdoMlSrQwozxDcff2TUowDge4XJdCdw4b9L2gvOjtviQg0apu1j8rqEUIDsM/XaDjBtbc5cYKHfkCS4zKIOBzryrOklAbnrdV5WCNc1391zl8TKJ3xkBtN1Zgu5DjrKsFddAUgEBlesnpPio6GrFhCdsUndvl1Z7iaR/soqbA== 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=6szHHknNZnlVSF6Luci9HMpdIea/V+TdJHht25nx4W0=; b=HpiQKZsGXIcRif7m1u7Efxi0WTqicdXMOw62COeip2tzl1+QZ/5ImRLEOxKRTHLpknVoQpo+/Ei/mjWEbnKnbum8StR9u9C96eelgnFs4TAfX7vbqmXnNKq99HulJ730t0how8K1rwVZmzpa7woy87lLvu6Ks+D9+SO1O9Seg7DC8H/3FjLzs6Qk9+VD+krjpdDlPdVh7ucKL11armGvSthNP/5qLFvaW/v1BMBcFSQeKwlTMzgMngf8ooNdopgb+Vpgylg2cGfGbdL+t96LcdAsI9J/xU2yCXHF+2kH9BfWxQWnaCZyw/JkkWMforuz5uRjsiAkSdRYPHroSTa/7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6szHHknNZnlVSF6Luci9HMpdIea/V+TdJHht25nx4W0=; b=Ha89aRMTOj14RLKSbHbz646yXYc9REngYajeW2GCAkBBXG/hW+4AsLr7IbxMWjqMr/50JNdKNESm9EohWKVCWMOPHMpN+ZK9Y2A/ghEAXHCdy1/sgVokrGKRzwyY1i/JJNbe6Bk3YuXngpC5elEGeKEX2t7lx01FQkxo31DhdSZCLHYzAH1aadCSkYhx9S21pfMk69AdR2bfpP3so0CIyeWEB+eWeU6b+8h9NcZV3qqdPlYMY3hRb1RSwMvBOBaRAo5eWiIwFQ6x3P3eeEm+fWj2iMu3v5wjwW7EWprK4bKDR0vERT70rJirZhRrOAPIejZIlJnJsMYilZELq2WW+A== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:29 +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.7784.017; Wed, 24 Jul 2024 09:21:29 +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 v3 04/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller pixel engine Date: Wed, 24 Jul 2024 17:29:35 +0800 Message-Id: <20240724092950.752536-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: c40a0edd-d077-45a3-cc72-08dcabc1ffd8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 1TxCsFsK7NzZeLAV2ZEtR/kq4nlrSdcf0QMgdxOsZ/qtPNyjL/MMniSkbU10NS8INW57voEYZ9Zn0pSpNP7YCz7QznfpIujg8K6rF4pCGqWRv13mdZ9sfATqjH/I5/hK0VZW/zCjQx8409FfWjra+9mrAmb7eiNh5axTFvvDxmYca86GXLT6WT7ZrEMyVQ11+KL6oY46Wsp53uIdxyhbn1yhO9lUtbrpr5BQUSEUyeUQvp0kUsASpxk4HvSqkrXqBHIeyy8mAMn/MSLuKkYul65uGeW4TqX0+sWo2pZZqUI+DZfgTc9b7dGriUvdCXrlk2prU38+nLorO4rBjRQWcxRamQn1+UpDQ4WzYfRhoR9g+SNYKtlxYz+p1UDciLG+w8FjknLcgso3Po/WbELGpROJFfkycuYvDWc9CamCiX5EGTZ2s9zVGMtyEDp+2u+Ofb34fWcjIC5ykV14PaTHpG8wmKkK9D2y0q/WrWMlDR+wK5w6L1rD5eQQFdQarCv5w4gkFoKa+dG/IC3g/IcYFCw5iLjdW19BqygzP01Btp1SyojxP654o4VRV7bqR5OLGEjT5mJmt/6MblbTVI3HsObhlEZWsm/yLyZDg/HAH0ZOAWxhT67BSgleUHzFeITvPql9y6y/HlbXWbZ48J8opscNrfszxtzpFbAsePUHqActHyKA8aAJ6yID7L0+VVxliiGtAO7YoCQM2m+ZSVK5ipPcID97iXV/stUlGD+owC69H8eOpN+wbZFU4AbbEgrJa56q8INSEAbf4mvynJWf/0D2vWB3WqLAI7Mj+5b96e8olG/lsx9BAX+S+RT/YCDspPwZ0ToHabUMOwC3Coe/oVHi97s380JvByx3154J/CbIb/CfJp39jjKaEBHYr391kNIA5v6Icryiv7o/Sw8qfgzZNGhxXUu06pf02a+3efiz9a27Z/oRfUv3SohsmW+Ht+H8HFhJ7EN22KFadYunyHvPe4tGT/DodEVtTVKsxBuurr9WRNS/Kxp4uhP3mPD8G4SQ8+2dCKIjrlHrzgFw8SVC9iAevOBoCxFKUO7iMWu0pCfKdcJ6eJurj8Yn495kzcRDgMYbgDEphzYnTIvwbU3/WqEiJQb3ggIrPE/Misei0tBu/VrxUmqci1ym/VZl2DvdJQG0iS7tjkCJBniDp58GMk0wO7j3iqOzawI4XYl004XHOmUBNIfbHHl4AcQfbUbLzeLu4aQV0V9/3vF6Pr6KbSCLGA90oTgSqEax8qMRmNb70sCI+RU1IUfTdxvhuVPMZwfNJikR8HrnP8nEgYLyJJh1zwjwZXuKKNV+TSUFWJQmqyCRc/aorY+fSR40vtSgMFJEwzJkhzymDiksiQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pvqhD+tk/VptEZRdYEiA6zRwNuo6LK0jb5AA8lkQXFaMmIzUlu+RwdkT1V+VZNFb9MXUGdPUdt4dWU2DoRp94qu71BDXB1Nexv8EuELpkv4sEgpNYhnUFCixJjGlvXEYWZr0WELCx/Sr3ZJ9WW3Xmyvb2r7UYADWnQssMz+/bNaE5sN6oyBoaYMUADLDcRcT0o/fMsXO3ZTfzv8puL9LSPqairfk+qcF2ZntsKfI1p9R0gfoBn4/iuj7xrD+zpqyKDwq4suAb9HWUQlPm/O9Cv7T4QyVF8rPY3sloPf0GuMJXL4CHJvWvZTWyOKhaTv6ZTc9/jmsX2yMv3hIxJACH8i/sOXWF09BpICB5PnEV575vDYtr6fMnDFxW+dXxAfg++ec2gsfDDDNoMIIxXNOWYoQs2+JM0XKc/9LOmiFhOjgpwZi3J1kHT830lfr3b7Y8nRKBP8VaJ6/aPHMA49V8lxIunkmtFYBqMHFUl3jDs/WgMeajMonp2k4PsEt0xAEIGC3uH4xqy0RMTEUiklaIK9wLcVfu2oogtlbKz4vNomAEnYxCOCSBRt7ZXNJbdCqfCZzw1+gDWJ9Kne6LcDiqNec9y/a2Zw4FBAN4TJ5DHhDE23+r7kOWiFdkZqSOn0EjrVpqyDE7i4kFONFA6MowzouS7WOhRsyiqIocp+1CJcbe1XByBwF8H8PXNql7dz6J2Vw4QfAxO5Vlqc4BQRTe31Auk6PAUbtpWos3STk9kmt8E1xDmtEqvr/TSFwBk9P7hqnyhuS1ncA/J3Mh2x8RE2brMMFi6VZk8nc0UYzJVsDhC+cMIMlhIjQgXTNCLgWDNvSvEnG1Vzi0ow20WmvRnOcNPtxplyALoJ+N/KFukStaMN4Kc9xyzpUnOh/SRDwbTizeT6KW4EA8NAPVZvBxZTFbcOJTZ0ivqAwN73eR8TvBB/A0A/WKq1IrnQcNLf6qQ3ku937TRBXtIZ7HdxKKY04d1IYDyXcAcHBgn7AYYLjXE4XnemmuxGE0YobVOvFUFca02evcYcIqMq33Rj5FpR/pjRL7vCKbZdYDpnXbTK4CXvOqTSo+dDE+WjhCPjCMLtMd/FYcxVTttELN7ZsX9xOTBqk9hoZanfXdzZQ83+0uriZNERfkQXp7fIUAqDKJgCNT3rYS6rpZSqXScfWHNPlrqvV5w4Pdqrk+dC6532+pSr9NFQB6ATUqv+UXveWFV6CmwMZUrHvn5jEMIrvCrWJL1+xCe+G2nTbC3s/YZCXDahzqVKW7lf/gOryV57qTnkwaNNJwI1Hh4W57FpQiI3292KbVXh14VBp5utiJ/G+GI3w/Fsy0YrUupyy6VNi/ucuRc6ds8tmZgSFWsTkzgzNMftGUHWQhoWnchTBl3ZLJSx6x//k0QkGaJyoH+H+IFX2xuuDj7AYOsfKupA0vLAFOoMtKcTMKS0qNsiAq+GEOzVbRHLUCNzT8Ue9yllfGRQn6MQDc32lzshJvrgFkJvvM0opFdlbSmMbZudjjV+TdNtJd4Y6/7rqmBZkEcI41cb2sL7+1T7EjTCPcUkvtYYC35nPUlj4OGVl5eLluGZID9CXipbbzsH00XN9PXbs X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c40a0edd-d077-45a3-cc72-08dcabc1ffd8 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:29.1205 (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: vaP87UcHyGx9pBOeokYBj5VEIn6MaWSrb2rlj3bMHkZHARlmRSf8edZZmxkdpkD48h+Xoc9F1c+JSJFjp9hXbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller pixel engine consists of all processing units that operate in the AXI bus clock domain. Command sequencer and interrupt controller of the Display Controller work with AXI bus clock, but they are not in pixel engine. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * No change. v2: * Drop fsl,dc-*-id DT properties from example. (Krzysztof) * Fix register range sizes in example. .../imx/fsl,imx8qxp-dc-pixel-engine.yaml | 250 ++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml new file mode 100644 index 000000000000..633443a6cc38 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml @@ -0,0 +1,250 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-pixel-engine.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Pixel Engine + +description: + All Processing Units that operate in the AXI bus clock domain. Pixel + pipelines have the ability to stall when a destination is busy. Implements + all communication to memory resources and most of the image processing + functions. Interconnection of Processing Units is re-configurable. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-pixel-engine + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^blit-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-blit-engine + + "^constframe@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-constframe + + "^extdst@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-extdst + + "^fetchdecode@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchdecode + + "^fetcheco@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetcheco + + "^fetchlayer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchlayer + + "^fetchwarp@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-fetchwarp + + "^hscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-hscaler + + "^layerblend@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-layerblend + + "^matrix@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-matrix + + "^safety@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-safety + + "^vscaler@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-vscaler + +required: + - compatible + - reg + - clocks + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + + pixel-engine@56180800 { + compatible = "fsl,imx8qxp-dc-pixel-engine"; + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + constframe@56180960 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180980 { + compatible = "fsl,imx8qxp-dc-extdst"; + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@561809a0 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x561809a0 0xc>, <0x56184c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@561809c0 { + compatible = "fsl,imx8qxp-dc-extdst"; + reg = <0x561809c0 0x1c>, <0x56185000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <6>, <7>, <8>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@561809e0 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x561809e0 0xc>, <0x56185400 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a00 { + compatible = "fsl,imx8qxp-dc-extdst"; + reg = <0x56180a00 0x1c>, <0x56185800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <9>, <10>, <11>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + constframe@56180a20 { + compatible = "fsl,imx8qxp-dc-constframe"; + reg = <0x56180a20 0xc>, <0x56185c00 0x20>; + reg-names = "pec", "cfg"; + }; + + extdst@56180a40 { + compatible = "fsl,imx8qxp-dc-extdst"; + reg = <0x56180a40 0x1c>, <0x56186000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <12>, <13>, <14>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + fetchwarp@56180a60 { + compatible = "fsl,imx8qxp-dc-fetchwarp"; + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + reg-names = "pec", "cfg"; + }; + + fetchlayer@56180ac0 { + compatible = "fsl,imx8qxp-dc-fetchlayer"; + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180ba0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180bc0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180bc0 0x10>, <0x5618a800 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180be0 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180be0 0x10>, <0x5618ac00 0x20>; + reg-names = "pec", "cfg"; + }; + + layerblend@56180c00 { + compatible = "fsl,imx8qxp-dc-layerblend"; + reg = <0x56180c00 0x10>, <0x5618b000 0x20>; + reg-names = "pec", "cfg"; + }; + }; From patchwork Wed Jul 24 09:29: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: 13740725 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010047.outbound.protection.outlook.com [52.101.69.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34EC415532C for ; Wed, 24 Jul 2024 09:21:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812901; cv=fail; b=SgVKyA36rvfcGVPZafYkAnpo2IUAA9CRCqn/c4JF+Kh8g3uH2ewQHwgpbl0JidzPtzjq/Np8JCn5xW0QG/Rs1wk8snXUGOm+wAZ6HI9l/DzgcWkR3KiALb1AQUb01+HRBMtyuRc12T63Tj6rlh3DrVtQ8yvDQBvWy5jfmziuZHY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812901; c=relaxed/simple; bh=JLiaNCtrBEH5JMo3z7gVv+VEBk2n2+p+2yj1gvKDfCs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YQNBY3Q9tFylfoQ6gnwuCKKvVa2AWIRZYfXFshv6jqvHPmVWFb45o/yW342HC8Y6FypiRXj2X0QsL6KhRuAFaVsQjcF1z/R3LOfy7G1hdCscgTEKcWMTxQBZ01fgowiAjsX/tBIwODPBbuOtBuq9Q2+VDwFzdk2vmYDNvTGaX0s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=L83/6Ow7; arc=fail smtp.client-ip=52.101.69.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="L83/6Ow7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c6H/f2bJbaxpzAiZNDXriLvnsvnERA0ahNZpRN3WRJK3II0SxtPzYHCnN+gOzwkzdiGjhoH/YhI5t5gO4kvcnlskdaibc2xeJslIA8WYWNcAGt3Dzpsh+jRPlCtLlq4lRJxkkieBP9TDjQF19i7drbxVOfXJqaJrujYksCxG1cSxdIR0dEGQMen4sYkOflQnx7ftMsXrbjWyDijjLnrO/iwXmBP/w4hb5UaalXHqereaAvFN3MYpAPRm3l42StK/qXP+zZQlAkEZnMUphOdCiyqsofj1TkagePslJSJ1rQR5O+IvKHdXx5DJNde8GA/Oh+jE7Wmpn/HdVWgCZo8zNw== 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=Evr3+PtWF6Swhq9XWIO7OQj+wE1GEtG8uOLe+3FqIY8=; b=l+M062NfQ7sAkqsnzT5pYWq9ouX6OeR9yN8WMA0jyv0x5IinLW+heUFFn093x4610rFu1YzyAxuFijd+aDOPBHPQU20kMmpytSJDc68Jf8mDY1OalNrEHfhxk4/GjdiV+tV2ZcsvJDHMnOXS1PsmOYhktcQFa3abdgHa0oDuemy3S+2U3NP0OIIjejKiLNSacubmmFrBiWNLVeBupr5nnT4jNV0KZHi0abW8KYA0RxWQy9advmNVITzyuoFX40Iyqxd1zEyfDEQfDVc3wN0aBMkJxPzQ/WjAXeHScpWZSdXSzbYtdncht+3W5fgoio8KQW2Np4ppN8NUE3wCtxeQpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Evr3+PtWF6Swhq9XWIO7OQj+wE1GEtG8uOLe+3FqIY8=; b=L83/6Ow7/tQhdHCwSvTiZui57jRiT2+LTGUkKQ3/0jDYEj2SKujFvTNTOO05/+m4ecfVVc6TEMgTbexy6TnBUNW8/WgaaWooUBv02zYupu8pzgFWFDIyfUdEBEcO4maZaZVH6pQP3flw1Uaz1QTRizUSPpB0mbx/syuxnuTgEHU1LWPBTMmecjpre7foR95zmYU0NsznZhK28/VeOPTvsfjPlky7r3neLdOEGKAtD4rORpsZaLSJOHIIH6/rwnx+3AUOvgfdUXrOipNfdKbt24OpTuAiHhvSYM1Nxo36rXH/pHFyj5gZCgpxB8xdMsR6UZ2uMP46TGIzUmeVB+R5Qw== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:36 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:21:36 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, 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 v3 05/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller AXI performance counter Date: Wed, 24 Jul 2024 17:29:36 +0800 Message-Id: <20240724092950.752536-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 2eabb3f0-113e-43be-8c65-08dcabc2042f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: kk06ijqEleHUFB+cBNpzphRlzhFBY9bwzrjxDcJKoVWCPkvLrvuVeUsXBXyagp51STKLWDCnDIQ0TuUfnQ5j8RIePmiGkKX5NOkb0RAipsfhHorJdgnpsYoFXRCODKRfXDxK9td7ROLk+K4zKaAu8ET5c+uTJT69ajGI/0alCHH8m+BMBhOY/m81eikp9yCmHodcqHOIMmN93b5JFd6jhSdk7bvTyl05Qb6+YhLLwbCa0u/3Xqy6haSo1JRrB103URW1+OaIJzKNoZXSKt5eABvmshzmHK1L4ak6h7JZvnEgrZP/QDhYPyom8oSYBSdtT/Nq0sIORv6u9YmgcHaXEOCQM+fA7cfW+W1xibgcL4Cn3WEtnVbrJ2mH1akURUiu8OGsFLgzLhLgUVHhtfViY87nbVKCwCkcS5iKoZ74J0/be2Yhmbjic3e3HWrjjxoTSWc1ozntc1fEJNfas2oZTn4CkF0Gzx+8Pxu8sle6iFai/ikusukM9lr0ZUbsFK4f2178Z0RT091w94knL7cf4LfsDRMgVoOH0Y8KM1RzZGdti88PXxufvD9dyTqTfXvApok59HG4aRvA+9zzoHzHySiJrs0q5cYlmuhM4yPmIzT5VDQJiEPcE/sEDiA5gMWeMAfdq/ldNxTCbN4Ii+sx5tGRP6i1U/gTtX9BP4OGU4RuXEM/H/vy6oG9dNKjAwAveIwVItTVGCt1AujU5QfzzsIHvIntj4otJhds8bdOBqJIlhjXrfuZwuwb4KxTAYH57o2M7khnTLi+ZyuZ0Oet8Oo7o3UUVykN+aLSaJ+/jq+YdgpF3yBCt6EDjpNStYuVPWlPUWCJuB/E1/QiUBudrSk9OCnvcqM7q/p1vlK7nRRA6TP39ET/YvenmaBAP2ix5cCQAYHj9JzbS0ktskb+AYY9ml25tO6XSARgHxaQ2mF260M6UfXapbKpKOcpJOqzg4xAAjBz/sNKVpa9U6a8xsKEjyMZK7ogv3Yb2kQXvdwtXGmy+rKIgA889q5Ls8tiWJpR7l8ha1jLfH/SgNjnY88oyn1wumJTXYGw24ovCBxDhf7OWvk4ehNfj6g09E0pAIIu6JjjcYhbKW2IZBkVv5b8pqJYTF3hB+CrwrFxWkzzafuaCNFcIlo3cy2yWFi20gUvh7iI7Vpg7mbp8cuPbwxBRpCMVH+KMeBw/fhSZoEiAPCyz1yOXFnt44xGPfoZ/l17Nnzjv8b2fezcsNOuO2Os6jfyojNV+GPrrcbEuLYEwqZgXc9grXGH0Zo8YvZnISEd7nTB26a6kqf1nYToFVIpFFQee5roKv3mGZgDIReBf+Is3sb+OVpbdNhFmzWZ9e41pX6Inz6GI+r5bR/A1w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: f3flbGwH0peu1+WDTlsXJ5or2Tkgt/nTdkzFbMTdEp7eLXz3dx7gwn+U5efcDgeFb8AHC18nuf13tptMEHUpDNOz6udNp/aStuPs2rQWgyrt1qhyw766DDbjdTbH55r1hRfhjKsRoAj3x+6u2Q9q6hdOnaFfvxuokdpPSZISCSWHkrL0v9Baoes2K5DVYupXvZ2RWjNDa8RHWmQRXJyqioNTbcZq9jlTR9cjlgTSTSeL5J/uaPZmmeV14LulutSRIc0OrbwX+4a5S/e4+eSW8Z9/MITsbXlyc7ZBEatnNCvFwexqtUW/x+XWKoaQKVlpA47hgN9dMsSKL/+It1U5M0B1HgmMgkZJFzrwt6TUT6MNvYX9X1p5ztnFAg3+DR3zgWwvT/mePBWT/kHl8+dSCX30PBtuizsqLMFyUzlMsMcsFwziRmVUT9lUPlpPNNG0LF86Z9kpOqfze16afVeh9++ZJtoDsj55Ggj93OqfbucCQqg+uBAC060NOLGQSXF/v7fU9vcbogJwkSvo+eZmwpM3V77iSyAtsH8JVIUCxaBuqJiqsZutpCPwbsfpPIAfHH2RUwBGvvvyIGYDAEKQ7rA9fuN1AajkBqNuvZutgczXkp1uOnwe8IQZSTMOSK65fyBuB3d84F9rNW4SIV9yHBDaZLsU3/SvX5anNL2neKYpO4gzELauALJ8LS3pHn7wl8+qkOJ2vGSA4mECfFz2SXBBNSPwsGrdw/G56NfAnVtiC1r1M8fmhyCO48G374SAfnw7zHbkqMhvZ7O/fxn3sCyYfYbD9FmY7Zjsc4duUQo16Usqxc6Ulh+rz57h2GrCvJIiUctLIAZ4wmgMK95LmofhrKKkKUO12ChjlfvFk0kKF8doXum6WlykqxavlOnn7e/C2pjJ4EGDJOcNwMD+htFAIa708UUc+h6W+4nBH/UmsleEqjTJtZ5cqRkqgtJdXg21l2U26wmszRq+M9vu77XSnxyc3bj0kRIC55JU7NFhR/s08LbLMju2hIdJI+L51v6AZsyfxcEhw8G8dqR2nqMQI6/KqvKDlBd3UbCLL7uOJ3yP9QCmWyCuM9vN0rLnbfKf8+5pazKztWW9UAddWIFVZdVgt2+ZvXJT0ub6kwj42nfvVXre7P/AEzmZdSUMRJ9qNrmZEjuiOpN6bOjMb5PWpQZsRrjPgP87OD1LsYC7Ksip8gJnE/4bOohbmjm4NdWAHT5InnlvRY+ZBIxeFkwOgwHZXgu8DZ5pYyEW47Y0AIVrlc5Q9Oyjdam0Db6/GSzRdhAng1AHVIfeSzUB67EGVZVQmSGNBciQAynaWw5MBhy1nkhmUr7nc62XjZb7hO0dvFWFtmlWtegYzvn4Kxhn+CJiOZMFOwpuhhZnEV8TM08XzbzZvnL+JCS4MRK9AacLogw+UBLPwECkBpJNYpJPFNLCtXdYnBFDAv1uPMVnyklbzdVSlVX0I2jV8kmRCymfpLdQAypVCylNr+o8h+lMzC0NMPjVr03fz/nVmpPjwvQnakiZKuWsJifmmDJNfJlqSuNvPhINN1HVX3gjxBejLkOPUPL/RqZdOc9u1RCWn/UyY/JPmsGswRVhygyU X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2eabb3f0-113e-43be-8c65-08dcabc2042f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:36.4704 (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: 2EC4nrHalsfY/jaebM9XCU6iex7m2g2j5vfSnPB48douA9MM0mDz8NhJzhpyiDAM8EYd0J/SPQYkoqmWc+DRPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller contains a AXI performance counter which allows measurement of average bandwidth and latency during operation. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * New patch. (Rob) ...sl,imx8qxp-dc-axi-performance-counter.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml new file mode 100644 index 000000000000..1d6501afc7f2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-axi-performance-counter.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller AXI Performance Counter + +description: | + Performance counters are provided to allow measurement of average bandwidth + and latency during operation. The following features are supported: + + * Manual and timer controlled measurement mode. + + * Measurement counters: + - GLOBAL_COUNTER for overall measurement time + - BUSY_COUNTER for number of data bus busy cycles + - DATA_COUNTER for number of data transfer cycles + - TRANSFER_COUNTER for number of transfers + - ADDRBUSY_COUNTER for number of address bus busy cycles + - LATENCY_COUNTER for average latency + + * Counter overflow detection. + + * Outstanding Transfer Counters (OTC) which are used for latency measurement + have to run immediately after reset, but can be disabled by software when + there is no need for latency measurement. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-axi-performance-counter + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + #include + + pmu@5618f000 { + compatible = "fsl,imx8qxp-dc-axi-performance-counter"; + reg = <0x5618f000 0x90>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + }; From patchwork Wed Jul 24 09:29: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: 13740726 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010055.outbound.protection.outlook.com [52.101.69.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AA4C152196 for ; Wed, 24 Jul 2024 09:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812908; cv=fail; b=P+vYXzU1xy6SXaLIJ0U/jn2fPCcwqSRrVZuJMNgTHuby59gA1hOtbtU+MizlNghUT/ZcTI+IDK6GwchLtw3XiSGK8Ub1XtjSw8DPOCG9jmx7/uoH7CCazCtp8me3VSYv9RpjB+JaWuaNWsQ1/HoP4JxAnrtHyeMot/t3WgMj0LM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812908; c=relaxed/simple; bh=TXUS3+384qUm8et79dC9v1+9wt9dGi5DOdrOb+ecyms=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=pajQFfl29sl5+P3ixagAKzvdsCBIMntqN3C1a0zZua/C1ovt+Cl89HvvN4AJFve/I/qeobvuE8j1MXPc4G29UJFY97OBKsALehjXQeTgrmeGcyJ5Le7FAkCTal0sSztUJeSepg5GwmKzid6LRB3YyIA4hu9cxYgt4w/B1jsSoN8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=gyCyaUyT; arc=fail smtp.client-ip=52.101.69.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="gyCyaUyT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tIS8MRMjGY7NMifdxZ4HYL44Aluqm3v2fOW1Eo8UDp3pUDixQ1+kOi6OTqlM70VGlElhc0Si8XdtfCfzYc4Yw5rKNOhvBaDitrJb9ceaexRfYfbT8T/gfwOvsTVBenpypxmHd2UTo3XjGQn17efyCeofelhQhk7hnzn+nmJ11V4ZcZyKAbsl1ZrHY89rO95Z0t59I8LkHIshjdp92rv5AztYn0PJY6AgSk6+2p7vMnER4TXzxX4RqRg0xr4XYPSZw0JJSfxcxWhBCqg9ZTrnucnAzVa8Or/NQ7luXK1MxR3FzOWY+GvoILAthwxvzjV8FHS3oNRsbNnJQl5qxnzGpQ== 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=9e+JPWQgEMg7XXBJ9fix3X7on5bgdO53/+bnJWiHz/Y=; b=G5JUz7VU8esSZ4X7COLyvhVuIWPYW3YiEFuKjky+clO5znH+EFbcz6sj9nQXQ7UyrrXH2Y0cMekputApqnuCchlhRbcCHqSyQA31sxQQ/QefB/ZqZ0NBg/at+smwcHlOZI7OzYYHBNZA0+8dfQ7wi1YC7IIkYdQwJZaKUvcrBv0XxDYkMDJ6f+OJGOoPoNAcbT3HI9iSdej9A9/v5P+GjOQDpWqg7lTihdBU+ZfGDEgESAWxUqqeE9q5pLLRjnpzaMsFgsBHXarnxXHe0CjYCSONv8KmFouA+PQB7iQY8OpaDapZcq6uVzdj94OcmRP4/A4F3kciXtBHhvPrSPPyfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9e+JPWQgEMg7XXBJ9fix3X7on5bgdO53/+bnJWiHz/Y=; b=gyCyaUyTXHd8AylVDpcEeQ5Aw+Yx9T8M2ysYTSX7xmS95Qhc+aLu4BK3gkQGh6gCfVnAiqrBfH6XQizmiahkhpWcmyQ1f7+0dsw/Oi1oxMEQhHT3jpbsz+joAbAMVHVG7rMHSAAEae3D0GI8qIXwNHL/p4seFZ5dqV63LhH+un7k6kAaQoTT5f0tN3J/OiONO4s7uGW7TV1uogE0L3g/0yk+Tic2gJaqWIm3xqwGp4qfUUUOKMNA7MIMWu+B9ZM38CFfXeAWF3cju8scZAXdN0I4xYbLYFLW97XCBN0fsIPKDnDgBTUDCkusmcI7eCDrJLZSQbO9QjBrE8y0jzd2sA== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21:43 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:21:43 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, 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 v3 06/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller command sequencer Date: Wed, 24 Jul 2024 17:29:37 +0800 Message-Id: <20240724092950.752536-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: bedf2b29-67fe-41b5-17e3-08dcabc2087e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: v0MdfmGNh96+eaP7XmjwLYeyfnFrdHwv89M7YFRHSv5g3H8l4HBsEGgxt15vsjORN44eplZi3Ef66uWZHJlU8xLR0gNTXvx+l/xlsxVKrRjEXPp3OkPaDkPLNqu4ZsqciwI+IZJ4bGzCK65JwComJQGhYwDLrIn63/dXK/MjzWOPdzdoNgGYKFHoj9nhNBz0DeSepmu4pCWmVOIF8iCQkM6D6CAiPyNk6HDOD5ErSoA97zf01oCmUK2KBqW0Xo1MyMrSQvfNEoDSBJcbYvuxI3N6pHaYpYfJGCGOj88RFHabs49lu/ij4HFebZkCt6VsNDdRuYsFZ0jlKI37UysQVLjlxgBduRYoz7w7yBrqyjuWw2+4whf6ppWyZoGPwmpk9yfCyO4f1E0h62h8b2rgGJ/L0abR6tRKK8+tjHCTJ4HiEJ4sq0l/3tOM54YqDcfpGySwO32Gt/zVKO9HJOQbj/es7xm1Ka1eOAuyGPye7vNB56BdIwkFlcXYCXTJZhHHUFqFv7mOf1sztodRUdH1CRjgUAzrhpnuBj+4fPpLuNV5/0wDXMQwrifu0hYF9Wkra9HfP0isdpGNL5339WpeXY6GN3j7KVEGvo0mPwWO+hCGnmFZvfM+Qon1mlRsodz4b8IFkaFJIeZ2BcqVK0/UaDKICaZnC2V09mVbSnE007yJBNe9MKRqxAWUvEeZMmBiYSOvYiX0KZnfnyPB+FLp7dBGwsNW32wtIcl2wMISaDggBjzif8DspoOCaIuoWcU5aA6LsiwiAyEZfMM8R/hIAcvYETp2nIgDnwyNtXdqEOm2ECG4IAE6tpKlLgJbQtEzpYhfJjRDOcO/5HjzfEmcr8LI6X0OFk46wgHUCWV/pStPOPv8aAT2kVnNKvQgmeXYQkWwWSPwq8sR7K2m0X0NtcVogZKxiHCxb037cCwQamnvLlO367/haha/jjbi1n7jMP9hb3/dXt9XjFEM2VFrEeUKjJokZeWeIpnO5LxEMqA5OOWCZJIezBN/VadOdzmq1G7iHJUHP8PMlUoOAI5Vdr1yGdrwasXKybik5U/8xOvT18bpNdXRmqHQ3PD9OyjYebDI5naZx81W2tp72NZ6+/hpOwRIZru36a2oWDaUEdoi6F6rJqrCBg/CfeLAU/cziXSSdC4FoTlyBbNnrIyo1QhAK4TTMFKOgCW7chjK3aheavaMVcrlBfk8/Q5nrh5qWVx8ui/oP0ysjC87mCDgIkSFkBjTYkevCfgtrO9mHtgxfEXalZUOjreCyMh5QQbsQDBelRe6Ri4p7F0cK+WVMSePEk1iaugCDUvnl4QXX0aHGJpPlj+AVw3yz6Hh2bDNlp4OZO7wWT7RpdiF8WAKwg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TehHxmwG7CBFMU6OOFa4acd6mqmxQm3/PzfaK/C+bp1xXFqhTFZKIEpLIOXicNbbIL8KoW3chqByAYF8lkmK0gj7+98RjtAGm9m9YktKFnRRcw8r6WpA3rZKO9M3un2ZQ+PXgcsppbDMJoStrHMLDhXwUJkddDdWpZTiXnw5HbId1YxFAy/0TjFm4DlIYI0vdYNOEmbKlocq6yAbfVAIvJR3HF+AMZO4hgMyVw7hFmKJIiNhLh45bc2BAlHzYU6VSprIO9iosxEwf6ccf3qVTT/Uw6KBZh/5kOG/H/k36UOPWhqTAwlURqqiCAwTmiSiBdtIDBHBYvG00ggnlhpmj2iV3RYEv3R3uaB3FZbtGCxImh7QdueNwjlFvJWDsTgYrEfVG3XKW0w0+ti39TsXcszoVzOudHFa01a6LBodVj+XiMuUZzRqRLpUn8NgMsTcLrfkXOzynmpEUxwIScRkjaDG5G1rPmyY49RGe+C7eEE33AY/XzHxc0Duy+xlRtPt8GYNPeENOwkhi9iyVzYlfo2aXrAkStsUbteKnY0aiXWMvdU9Vg2lHjMMhU/ltuinp9phbQC8XmmmQKzCWLQ7NTjkk73KE74rLEYJz87wPwvIUrHASnCTZJE45K50e7bSKiEiEIxUMUAWExu0+JPbvQqBA2UdCJT3XJJPx8eUYLtZHhyWF/c8lkgx2fXIVDybvl/1ZQ8KJtI0YbGkXAM/e27o99GkgZ7tYEWMvVY4fad4Rq3tJDHU/gfIiSrzyDCIZD2T1ZJdHoNbL8Ur9l8b14mkJ16zFDkJTwTjmtRlNTnTVlMbdUec5uMXxKtr+7rJcXzguD5XPHplcA0oIb1DHNnSG7CyUv1JrEEz7gehuhyLYIv8rvjUjMwAUHkaQyNohOocbxZbM4s0+px7eXPYeYYSMsiuHp/KUCTUu8EICQM6eAGd3vGGyOJ4lXnCJ5umgsC3qLH/kR6S2BpWzJ4gkP1Sj+o3yPvlSvqbMOqn5mq1IANTrwRq5JOauq2/QVLxB8WnwGrOhuE+L2ht9YgxR3wkqmw2SjeeAOmYAvLHjjihg97yIG/Obl374Bb4J+/FvucFaXNWBqOyPKw2s+x7srIKGHXO6kiZRR2JaQElpUO8D95fZuMpd4GdaSvmfAMa+Fa6fk6khB0idQGxiSE1D+FxblphSV5emOQzueCIDb/qFN4dSlWigI56plDkgXKcxpHjqs+WP5aRg2UdHdE8r1RyGJQywO2q6ZNHDS/5ESpbX0UbJ6YsUXPIhvi4CE5wJ2pjVduTBkfCTL2RA8tJv/ly+6sF77J5k+5wZK3jgcdokkQlHxTTGfDiRSIIrIoDuBYJcWX0hzd/nFlqM4RCtDdgu4ZnetKrWKaX8to/2Qjka7CqUrb5c7wb50OXr6+mhGtTORSYBb7QQhOI+lzdBpe0F9eq3f95oq3y5HM5NJGMUvTFBR3FF4D8OCt6FUM3dOmzi2jOk83fenolnmM2ukRXbRhHXBBdLOCLrOklQh2vQwva6KDktQI3wfSsaKk5zj4wd1LW6yh5SnwG6esj5b2/T3qE/p+i1xQe/mE2ko7X+WoE3JIxGNjtneJj0Hpj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bedf2b29-67fe-41b5-17e3-08dcabc2087e X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:43.6829 (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: c8uXhtbNChK/hjy1WAYvD3BuPGLhoTRJUpomOOkt+ELngD2gyk+7/tAOQeKsFMWvOsk7u6wgkOTVkSM1MKBpBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller contains a command sequencer is designed to autonomously process command lists. Signed-off-by: Liu Ying --- v3: * New patch. (Rob) .../imx/fsl,imx8qxp-dc-command-sequencer.yaml | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml new file mode 100644 index 000000000000..2e0e8e40a185 --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc-command-sequencer.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller Command Sequencer + +description: | + The Command Sequencer is designed to autonomously process command lists. + By that it can load setups into the DC configuration and synchronize to + hardware events. This releases a system's CPU from workload, because it + does not need to wait for certain events. Also it simplifies SW architecture, + because no interrupt handlers are required. Setups are read via AXI bus, + while write access to configuration registers occurs directly via an internal + bus. This saves bandwidth for the AXI interconnect and improves the system + architecture in terms of safety aspects. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-command-sequencer + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupts: + maxItems: 5 + + interrupt-names: + items: + - const: error + - const: sw0 + - const: sw1 + - const: sw2 + - const: sw3 + + fsl,iram: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle pointing to the mmio-sram device node + +required: + - compatible + - reg + - clocks + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + + command-sequencer@56180400 { + compatible = "fsl,imx8qxp-dc-command-sequencer"; + reg = <0x56180400 0x1a4>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-parent = <&dc0_intc>; + interrupts = <36>, <37>, <38>, <39>, <40>; + interrupt-names = "error", "sw0", "sw1", "sw2", "sw3"; + }; From patchwork Wed Jul 24 09:29: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: 13740727 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010039.outbound.protection.outlook.com [52.101.69.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BA7D152796 for ; Wed, 24 Jul 2024 09:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.39 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812916; cv=fail; b=AoO7jKon9Dy/0PGY86hZRKwx23475DNEAjga+YwXMyAHVpDN+azKvE0Yo5UWpUliTiXIrbz6KnkD6RvsOb0j1s78/p9wkc6V6EZNlpkEWHbXFMm3oFXNmN1rt7ACN7in8kyj6eil1oSdcl1DYeBkzje8ffHcSo8bWfArEZr1HyY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812916; c=relaxed/simple; bh=PuUeg0KcLB/d9DxshpcgmtptjOWWuvdVaxqN+BOEaIY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=WL4NZbwTtoE3m63Bq3HcpHqLiP256L1v8GmP7rzTF/8PemTseZXoqRfAtas3PprDPlvyvzpTPGM60lIKSkh4ZmuEAwqvcsC0UYnVpsdw3y961DEJMwrF8gSGrMhGwbcuHBT1kOnfwYqZWPLzWIe2G0VP4k4C9tKwkThJc3p3Ro4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=CuE2Xx9I; arc=fail smtp.client-ip=52.101.69.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="CuE2Xx9I" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PYwfB4qa8+dp7I1h+FiwBXsYIboZIQerGfxfE1yBk3tskQA9KhRPlwpp+nKfYeqJ7I6qKT9xiA/F0++IiWU4AyS1m51hN9sQm1soHpqxCW/W7w1sgS4JAmYm82zXwcqkp0OrAe/nBkAsSBpOwula8kkqU0dqsDFM/46o3MyqBfCNvme7cpNf5aBXWFh8ZxU2Ohz+Gk/ASfHPSD/S2pyFFJReWNi/n8Tz602tpeLNJInqkS/YD3sgwt/y56zRkHFLWbU5zP+o4W7LOcOJ7sQAR8mZHUl1fswH2BWSgFap16bISGBLpbtZCKVzEIN5e3VubC39DkL5oDe1nxxW6qsm4A== 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=HNwSvLqxBgPyuj+vN99YQxyKL4magz4agxfOwEekEAs=; b=DOZyohxCx/0TNIJEALEJ+5LvBlKlLEcytRgnef2n1F7iDHi2W14frn0bHJG3X1w8XCZLIoRTFg0hm8seAFjXi5jzkLYBaUnKwZcnuJ24FJPmPuAoDtd4z+HqoUuE+6jnsqiAQEANmVvfypd6Sk03jVVW55wKTkxj/TMDsZtSXBcy5EaZo/xig27vAWT1PRwWAkVkFDB7EFljJDZhB9d6tB+JIU5hJgGsgl/+sBCAWFyON6fm0890G6jkmupxUApdc60HmIVSEBqvQtwY5VaDOU+PuOnj/93XNAUNA2+YzUdaE8eXlh+8osKDMWE7GuzKUPOL2smmqM69i7FV3s8bnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HNwSvLqxBgPyuj+vN99YQxyKL4magz4agxfOwEekEAs=; b=CuE2Xx9IXoOY4Fn9YeyjcU6ySJRwcSTL87d5z6mTZt6XAxAv64zkvsYSBftHFIa8QsmwhaN9TpyTHmn4l5TlyRF7cMXk/JS+M8+oO7yNBLftehe+WEBP/X3DC5stAvZQhmdaCYuTRbv0FicOsmWjbnpTgXvMrwoPYZgLRE5NKrayWt1WpYtqK/FOwgPLsMs5a4U+PA4LXvYnUICESp4UrNO2NmhEW7PaVxvtJvf8Gt2rJa7dOLaKS3BRzJ319LO82sBPCws5H+3MjbO/6Y60L725zmdlbmF7Lcqmn+fSJpGozEwwGeYGgQ9Vcd58ic/cXMH4gEh+DnvtTphUDMEGKA== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21: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.7784.017; Wed, 24 Jul 2024 09:21: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 v3 07/19] dt-bindings: interrupt-controller: Add i.MX8qxp Display Controller interrupt controller Date: Wed, 24 Jul 2024 17:29:38 +0800 Message-Id: <20240724092950.752536-8-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d06aed2-f30b-4e4e-f6a4-08dcabc20ce0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: llfuPnxRgAdxywM1axo/nHKgklAU6fjLgGJQXmlWeVqHTKnMwSUoeJdZ5SAeDf8PkEFds7RHQquVvEvciWycv26sCT4rnPQ11x9ojri5/mmt1OoysV0QjRHWXfm+lAxW9KWyFtUrQ5lx09P2za7PYN5Qsmj1qBJhSy79IfyFaOxqqamkVLZeD2AN5bI3R3oihGX1GsslkEuxcpjZ0alV/R9wvvwTcfFOQeiCjIDwfD1JK2sil9ihbD5QQt0LjshTr4ZSDZduJMU96ZhK64T8Y5K+XBfXXaO0c1+exHVA6cLxhNcUnfTrvcJjh8sGMRQQWrhJJz39xB/KzGOksjPb4/uWN8CbNFk3gA/zQMkG6Cou7JTd1SUOXVach62xzsMQGBdUSWdXPKk7yPsOtnfDfCUoeOAadeygeLc+2ZzjDMeIUReclRe9j0cvsNluaRAZTtDvqaPJaObM56ru+oR0Wk+C17eKPfmEDYnEqmIwALqsLzVhbZg3UOqrLfmALYMF/vCYaCGHBTGP2Z/Nu4O8XLGJsy7Aqysk5khIIo8EybzKRdeD+RR/ed0DA9wfcQhkhdSRTvfSWN1otTS+6A7gWJFXP+xDb7Ya3aqAu6VuLEuYNeTNXVq5sJTPQsXj+3CxoYk1GzPn8Ainx2Z0ZtQyBaZIfEbAUVzLaYvuJCKMq4okbqlXwp/WCZrwuz9WyCJxAxCF/g9Hu6kWo4gibbvn8idy0TwCcjVh3D3hy+/voujm/IMpH0dIpo/qFXJNBxayCYwm/rh5B8zi7dC0RVm3Z4cCgwxslYq8kzuEFyHVsU887QeEof6AsnYYxb72bwrea4RkrAjkmfSlJyENs4Lvgt/ZsGa/C5D6aoFvwsNTCm4Nf9XFju3J0mCLflnfsqLWqr+jxGb4yBpi4agCu+il7r5O/VXCIu+GyqpmVbwatCs0M2SpbXL16uzuZQhs7QwYjeNkqmeqHtBhIvi+OulwzOaYSmBwz65GCPzKSb/4jsxDTiDoIdxNtk/dzckOeUtjuZyAJnVFG8l12YxbjWxwkGvl3HR6C6qQARdML2kYQIu+9G+BluKVX+1q8TBJhwTWWHpbZxp8f4MX5I+dTOMC7Fqy6DKJfVOsTUeTPuvY3Lsc3QgCWX5EUzzaCUxiQg1RF7mtI+dFmsLjwemhM+TMUD64VJbAeLvTR/zzRTde0Uu4EynROa07nEsZ2O0eY/N+2lOJYXT6g+MkEcDe5BzcOzHcaMNgjePB05xu+iaZUEMOcd5ED899XsSVeMimaKKku3neLBt3tjAT4zwEr9CR0MtPIbvtUr8tKPh3z6itWy9uqIpsrMXZCIz8GMlqYq+wYYaU2y0IClZdXHA0f6Ym/NIqUClYLtpPiwvKq4l2ZWs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JmaPgTNPovHkZAvQqwkwB4AfN9Qd0QCcdWqDevWTeAK/47ckCT245sqAEWiOemR+KvUCIW+PYcYfd9y6A89c6OrwXx26mwMeelKACkVhJNdCRwH2tS0CYomilqRtpxVivVwmSdmwezMspLpD2ppmGkjnsvAqmt7tE5TgqxjAE3c9KOgV9tEfjPmfYnB+VS5bylt2bLlVr3TIrSUhb87LT/po339cNB1qhoqiVbdfqSJ1NUEnRZbRX9YRqXpedbFDf1KO5YXrm//MMdFMTZyNCfJIa9MAXAKNQclz2x7HYF8WVvXqoUtPUM6cMDu5lVdTdynAEDnnvJ26P8sRrrcTTxLV7qPm41ausb4mENXyPuPGt7GeW+s6gr+BXMl/IWUZQHDwJUvsCrEGrEvmb8ZBvEFncLiHIc7B6qrWLS6DWbUQHl7oz28DANzr7ioPP0X5TFQfPKrcxwvqMIzV+TDUJQ6yZvw19JgZJOJoh1wmAKV7mUWNZePXrZNQIiKzi3YYqoh7ABM/ipLkYpdC8IhFi9JOK97JN/Bpo5E6xUWWhAdraEqItgKYXEpNvZOXW5k0iBoHDKKsSNbed9PVCJCAKKF2/FEvlqbqGgeyngFIeNxYoCN5ENLlvvWTvSc/k9QJ3HW1PpLJmVzH/TlTXmEVC0uf72Nndis7w3HtZoEYWoHzvXadCER193sQ6z/CiSZ+osHZ5ez36hxe5vFWDV7vQheuqu7yyA1ngi+gxymz9wxz122qyE09gWcoQCga+UkOa4N2sgRgxebJ/8wm/ccblphUztR0v7zOLugx/NIAticMvYK9yMzvCwNPoB0SmEOjHmhqUyxLFtLkco4dMAnpcgfHNlniXCMCr/TJ8ealqpBTeR620hbyf7wLX5L9KUqfdmUz3rZ28TMvEgfQ0hinzRyw8rg50Z8Yuv8WHwViUhcOf6vpOlTtlsTWXopm7pS3EatyvAjDIPSNOsuVhIfCluL1BEgh3zbE7H252Z3uFJFUnMAuEP2qxuyfSSzyGgHablKPdmC8cE3oJ0RW52InlQooaTtTR0aO50jMN/b4PQ9xhlhlMqlR7aIDqcOBSONLiJTNRvgQjCAOwZkQxaof7AMskKkXJe35zo+jNbudugRDoqHYbGBQZBe0EuAybgTPEQ4ilB8esifajP4jRxBLplUVjuxrhIFGywGKlxzoobNdvha9LQEZ2D9h7wjmfcPBuoA8QeR7wxNp+F8DSDPf3wtj+AvSs/DKcxsQSlRR5MmE0i1aGDNaTd8/n/SznVitKhqmHzAoDgv0DnzlGENg7U+xukAIRsxy/sTExSQHucMJCixWbLYLfGqARnhXRKLdLq646WKmZWciiiwIwEinROo/iXnzuK3iiSYcSkwU2TO9fwj6TZGMJAuewJTRWHbEtEx3C5ILB5sKugLpYmVpx7N03rS2QvREGNAIIvdlR0xJjzof7B0mOR5hpJvgoiugcdqRsFDn4wxLr7J5k3yUkU1O91k3x+lEK5tuQc3zsGs8rPU7QZ7bWG/Z1DT6a0yim1XKK1ficM+/XvoR1acoemk/MRKIt3PcWcTPI8ee7hosWxF+dJYw0uFRj0NJ9yIb X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d06aed2-f30b-4e4e-f6a4-08dcabc20ce0 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:50.9527 (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: HO2835BkUoGIzuE1S43OBUdp5gRbSX7ROAer6AzPeoDJRE9FjMcI4MTgf7B7ZAX9/zcVfpWMuPrp96mplfNkwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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) --- v3: * Collect Rob's R-b tag. v2: * Drop unneeded "|". (Krzysztof) .../fsl,imx8qxp-dc-intc.yaml | 318 ++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml new file mode 100644 index 000000000000..6985ee644a25 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/fsl,imx8qxp-dc-intc.yaml @@ -0,0 +1,318 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/fsl,imx8qxp-dc-intc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller interrupt controller + +description: | + The Display Controller has a built-in interrupt controller with the following + features for all relevant HW events: + + * Enable bit (mask) + * Status bit (set by an HW event) + * Preset bit (can be used by SW to set status) + * Clear bit (used by SW to reset the status) + + Each interrupt can be connected as IRQ (maskable) and/or NMI (non-maskable). + Alternatively the un-masked trigger signals for all HW events are provided, + allowing it to use a global interrupt controller instead. + + Each interrupt can be protected against SW running in user mode. In that case, + only privileged AHB access can control the interrupt status. + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc-intc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 1 + + interrupts: + items: + - description: store9 shadow load interrupt(blit engine) + - description: store9 frame complete interrupt(blit engine) + - description: store9 sequence complete interrupt(blit engine) + - description: + extdst0 shadow load interrupt + (display controller, content stream 0) + - description: + extdst0 frame complete interrupt + (display controller, content stream 0) + - description: + extdst0 sequence complete interrupt + (display controller, content stream 0) + - description: + extdst4 shadow load interrupt + (display controller, safety stream 0) + - description: + extdst4 frame complete interrupt + (display controller, safety stream 0) + - description: + extdst4 sequence complete interrupt + (display controller, safety stream 0) + - description: + extdst1 shadow load interrupt + (display controller, content stream 1) + - description: + extdst1 frame complete interrupt + (display controller, content stream 1) + - description: + extdst1 sequence complete interrupt + (display controller, content stream 1) + - description: + extdst5 shadow load interrupt + (display controller, safety stream 1) + - description: + extdst5 frame complete interrupt + (display controller, safety stream 1) + - description: + extdst5 sequence complete interrupt + (display controller, safety stream 1) + - description: + disengcfg0 shadow load interrupt + (display controller, display stream 0) + - description: + disengcfg0 frame complete interrupt + (display controller, display stream 0) + - description: + disengcfg0 sequence complete interrupt + (display controller, display stream 0) + - description: + framegen0 programmable interrupt0 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt1 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt2 + (display controller, display stream 0) + - description: + framegen0 programmable interrupt3 + (display controller, display stream 0) + - description: + signature0 shadow load interrupt + (display controller, display stream 0) + - description: + signature0 measurement valid interrupt + (display controller, display stream 0) + - description: + signature0 error condition interrupt + (display controller, display stream 0) + - description: + disengcfg1 shadow load interrupt + (display controller, display stream 1) + - description: + disengcfg1 frame complete interrupt + (display controller, display stream 1) + - description: + disengcfg1 sequence complete interrupt + (display controller, display stream 1) + - description: + framegen1 programmable interrupt0 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt1 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt2 + (display controller, display stream 1) + - description: + framegen1 programmable interrupt3 + (display controller, display stream 1) + - description: + signature1 shadow load interrupt + (display controller, display stream 1) + - description: + signature1 measurement valid interrupt + (display controller, display stream 1) + - description: + signature1 error condition interrupt + (display controller, display stream 1) + - description: reserved + - description: + command sequencer error condition interrupt(command sequencer) + - description: + common control software interrupt0(common control) + - description: + common control software interrupt1(common control) + - description: + common control software interrupt2(common control) + - description: + common control software interrupt3(common control) + - description: + framegen0 synchronization status activated interrupt + (display controller, safety stream 0) + - description: + framegen0 synchronization status deactivated interrupt + (display controller, safety stream 0) + - description: + framegen0 synchronization status activated interrupt + (display controller, content stream 0) + - description: + framegen0 synchronization status deactivated interrupt + (display controller, content stream 0) + - description: + framegen1 synchronization status activated interrupt + (display controller, safety stream 1) + - description: + framegen1 synchronization status deactivated interrupt + (display controller, safety stream 1) + - description: + framegen1 synchronization status activated interrupt + (display controller, content stream 1) + - description: + framegen1 synchronization status deactivated interrupt + (display controller, content stream 1) + minItems: 49 + + interrupt-names: + items: + - const: store9_shdload + - const: store9_framecomplete + - const: store9_seqcomplete + - const: extdst0_shdload + - const: extdst0_framecomplete + - const: extdst0_seqcomplete + - const: extdst4_shdload + - const: extdst4_framecomplete + - const: extdst4_seqcomplete + - const: extdst1_shdload + - const: extdst1_framecomplete + - const: extdst1_seqcomplete + - const: extdst5_shdload + - const: extdst5_framecomplete + - const: extdst5_seqcomplete + - const: disengcfg_shdload0 + - const: disengcfg_framecomplete0 + - const: disengcfg_seqcomplete0 + - const: framegen0_int0 + - const: framegen0_int1 + - const: framegen0_int2 + - const: framegen0_int3 + - const: sig0_shdload + - const: sig0_valid + - const: sig0_error + - const: disengcfg_shdload1 + - const: disengcfg_framecomplete1 + - const: disengcfg_seqcomplete1 + - const: framegen1_int0 + - const: framegen1_int1 + - const: framegen1_int2 + - const: framegen1_int3 + - const: sig1_shdload + - const: sig1_valid + - const: sig1_error + - const: reserved + - const: cmdseq_error + - const: comctrl_sw0 + - const: comctrl_sw1 + - const: comctrl_sw2 + - const: comctrl_sw3 + - const: framegen0_primsync_on + - const: framegen0_primsync_off + - const: framegen0_secsync_on + - const: framegen0_secsync_off + - const: framegen1_primsync_on + - const: framegen1_primsync_off + - const: framegen1_secsync_on + - const: framegen1_secsync_off + minItems: 49 + +required: + - compatible + - reg + - clocks + - interrupt-controller + - "#interrupt-cells" + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + + interrupt-controller@56180040 { + compatible = "fsl,imx8qxp-dc-intc"; + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; From patchwork Wed Jul 24 09:29: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: 13740728 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011016.outbound.protection.outlook.com [52.101.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FB8C1527A2 for ; Wed, 24 Jul 2024 09:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.16 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812923; cv=fail; b=HSFBdHu9jTx021uIKvRgH25uEyMSfm3IX3hUpHLeY0NgMfkipyHSACw3ioRBkurQ+8++c36sqStY0+oTpgHnKiLNHPMrHhJgMZ6ONr+U9ufY2apiSUr4xmDEfJI+fiWFbH/D7/xUFF/8NipLt5LC9epjdeRX8oHzkWyPQT6LDAM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812923; c=relaxed/simple; bh=ePyNkgw1L0RfxmVzyrS8yDmgwIMnsjZGFV47pu76OZw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ES8jef3lQ7vfPbqt22F1a4AMCY6ca1KageVdkuim001CXeX9MrpnKZr50j8XbfXVSHSgCscTqOXUBDVspQMV3TDwcihHcD5OjoDuhvGpCaNFwqbKIQHyJYBFEcmW30RFTnhIyvLU+s4UwzAiYEhjLZnR3pq+FdGYGHWRrmcXFFw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jZpVovH1; arc=fail smtp.client-ip=52.101.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jZpVovH1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eH0qftSqCo/3pcZ2KB4sc3m3d8gIuGGho/OaFbZZNI5kHVBir66OoSU5rJFBi7zwCFWWdLy/LE3593QiZs0NWc1exUizF6INz+6z73OoS9K0ETz05Xl2u6BQEBGwqeViJq0e0B/CYIhRW8GsHy76C9Eu6IFb36cyIfFZWhdmU6VKn+KApf3j7ZRdpF4cky6FWaEdQF1UWZWIjVWQXsIMUzd/fUR78jPBd0DkEExThLqzxuax+Q9ozN7xMVrRbcqvsQp/hLESa5cpHbmwC/wh1COntqXfzCsQ5r3ZKKTCWHfobxd0xAQMSkKqd6s1yFMdDOfoRPcPkQ/nI9HRP6JERg== 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=SL8LsBibdmF7//ooawnphJQevOv1k5AHVkf0eax+55o=; b=n7BDmrzkyLKEeJC1aIqSP+fsY2eUQox9b7kLzsdXlrN3mXQ/o9M4s/4HMonz236E5RtfUvpdgS6I8dziIMfLBpux+pP1/YpIhWFjjl7/JZs4P+HNBf9vymSy4Q4qRAY/rsPwUiQ9ww0bIzsWIYKj0T1XyM85ANcPtoRd1Uhcr6lAqxeqI4a8gd5Gv3+M8NaeJAAyIsq1FhkoWdq0XTxEVQ1rv8/3vMVend9njV0EQxiO71X58RIuDTHNt8W926Zmxq13CFiv+MvU75ti25t8snxiL4DSemub53Iq/f3JgynFdkix3Do0fVUb7g3ssbpRnr99doQh7U6W5mPxpEz3dQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SL8LsBibdmF7//ooawnphJQevOv1k5AHVkf0eax+55o=; b=jZpVovH1A2aAVVsHK64EXUurKxVSXFiI99fQIbTcZxIzMfXUPYXls5sw1yY9QMBJWtMd+n8nAX5kW0Vy+dMLv0zhiNLPcxuublWv/k5m3cAF8W9HNf5/qpTZfexHL9XaRp1IyBqsr7wuKo/Ua0OBHw0D8cu2Ft0sDLIyP10A+lUVFNJuk/Sz5Wg7bh/jWysEMhlJadod1MIQ11IK/bHlUHHfbigbqgosnh/H8G+QY7J4C07Q9lDqtsAC6qPmElaYawSbukhfQEC/v+xjGNvPJUVUljluPFsaKYs9jNEBhDzG1MlC1tQQNDckd9ZyUTM89ryHwaxyjoLuljoddWKQfA== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:21: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.7784.017; Wed, 24 Jul 2024 09:21: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 v3 08/19] dt-bindings: display: imx: Add i.MX8qxp Display Controller Date: Wed, 24 Jul 2024 17:29:39 +0800 Message-Id: <20240724092950.752536-9-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 44c17a18-3d49-4d55-27fa-08dcabc2111c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Z816E2WrstYkXJh3mNDB5NbJQRRAoars5bB+g/vMFCxLGjQYFhJ630/qU5hLKyLlgzDcLCctrAeYDaIrlxtzDexQxvkgVZA7mJ3HDFvDSTm1tpKU/6L82L97NvmkWAzKW/h20CPExGv1L9lV3GoaJ/MVz3v11uvkAoZnRx7VAzBOmtDImRPKgT3ozjoysqxTTAhgrI8x3XsaGRpXuA+vs6k5RmldLB4XnxB5YFTZBIZyLB0Yij4anjzAwT2/xu9vjpxRfRTbNRwjuCDgzb2iersPsq7QxgFM1f/NWJKv2cf6D4FxCpA6j0d60N2GhEXDJMy4LdskJCdnrdiS56F4umOVhEpT85NggTwOclC2JmjZMT6yAcEOxdHPBfcXmt4fRLLyR8b6hxJ2tLKN/YoUNUBJP4vMdEhdOLffz0mYoFmkoeh2MwrJ/xDn29MWSBTDQXPF8mwzgwPytLdAl5GcpsBrjbBJCMkV2VIN+C3GzNH1t53yvIVb6Ks4BJ9+MLSwOOGAGGObo18M2RCTXvEjTOBekjS4f13pEwcOlPmykdivb7jz9GuDR0BxViHzW/SEUPk+wl/I0v8erWWcwnNvspl23NzFbKYndPdv6TQtK2X8b7a1pORWqNXIbzpLUuKpWQGXxfOjd1Fc5YDrbBGkdTNXodDZCMMt2pGd0h5lcwocjKxqnyOtMGikqX/dqZMrd3+ZKp6FMiMnp8Gk352EcuboLpUBcFlG11mYUZ9gezIqixbPvXhL1RGbFSCNklkqx0g+kLmelLl5X4xNNVXp5HGYlKCVRlYIdb5hN8H8FgVGjCueA700TU1QwiVIfegoQzgUaG0qay3j5+0HZkku0NuiAz8A1204tiG22fEpAWEenI1dVNfmAzRxxJtxzSzSsZymCyTnvN5Cp6eQJFm+mJbQiENvNKSUqdPmijuAf8/RO/S3kA0kfDUhiOdChjbx9Sx79N4pGqIf4DfniD5tuDsOhfezRm1VsNuM6h91R7AQQeVIIN5/RHm96jf1xgdaa/Rp/Gyv8/4ABMWFVIluOdAk7lTXkwEcoNUTIijEs3BX/W79VjqS+ln5BucvVQooFpOjTACrD4j2EwIfqEM/Tnqy6CxNuFILd+W0P8/z0gmFkw8etKtQkS3Yqew2+q4zzpBanFtSs8HUmRrYi0wNZeRTDnnEKuk/ACGGf+9/FhQKFq9LtV+ic8dXVZhElGKJ25nX/wUSq6D7T4h6CMKBippUMWrimxrVcT484aTMADtWtaFXbMzlgHCV5evo0afRv+nrtIhAMpz4EPeGvm3yq3mmhKyBPlDwdPHPryKchYgd4kVtghEoN80L9+YFP2kqcTVeJ1rfDmScu4Ydgzn1Hg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gQijwZn44nCuoV7ulTxKAhOr1xALMlzqBzOMnbNn0rturpbMFyXv3smrVmQqVaH1cnEOX0zWWHkp73WeWXTsuF5cbuWOJpVdS9ZXvTVnBmA9qmQ3wDomCBPvC0uJq2b4a9o1GKWR81pRKbh3dDlyG4ynrBUuQPjslvwceCk88qUYowEfhkWcmxYe6p88rb9DmqzID/VerTyPxesDKOjSvPrBaOdEn8E1vaoZqVtZs6EXPPeRlS1ACsokvf4dVonITUDzTiVByXMejUYHzHnlI2Xyi5HWW9kHTCgWO5/SK5i2U/JMoDzAEGfNGmYX0yro4C1kgh3do0jBkeqIubpkLz5aNWp3T9+PLru+UVVNfBAJz7xLuVYx1hGDPg/Y+FJ4tP+HcdYFR8kiiPNgdQpvXEB295OAR/AnBI04WU+Sl4IGTev37TqXfZJKmNGBIvMhzvKYBKsZ3g95ih9z70m2RKr4vbQdMNTaBrwT3+trXOnT40iXK2eV3Qi8MohSCJoMKIW5qqy6Z0jPrrD2EGr4ngCl2D9WWivdemxCHt9JJlCLkTzScRICl9gIJDo4IRTmbqz6aNG+PR/uUIvuxbC3Fkpggm68fo+SgXPfROCDDL9kz5j9xx0xbb9UjhTcpKCaZ6SdON0hiT0XNpPHb8BaxSh7E5cjOGrYbBYsnK3NsjTZFW6eFcXIaGW/FhF5pnweF4KJ9A6hAi5d/ZooOSFjvO+p2kaMiOg18oeVUALmOXlIu6QLsLrfx3F8j0HQyRUR8xFoNOnPmShD0c1UkMDs8eKvcKtvCNWzAB6rDgR/iub5zzPoai+bmcOGrjRwXcjGbiQvnOVw1mckzh7h+N3IUn8VbWW60R1KdAIguQyNfGTTiLFJ2q6HFfq9g8LIU1jEL4GSi7MbppZnyjAWoRYNRNRh8czdQ7jjPIL1iAQxYQde6iN5b9j8u/dE9pQ9Q9P414LzXc01haJgUpZKo6tN5Uej/aOWNrJ7TcDSFG8LmMC1BCjCu/v+2rBEySJ+bRq8/278VnQItPMzfUX2GOaMVpa24kHNm4Km0yLX8cfsRq+8Iw1eDMGvpEMD9xfWW2DtAtn+eW8CvlDc0Pyzp16ydbILdnDKt8J5M4Mega8WyRRy6w0zX1IjnidWuih6zBs6TSILshAuvrSnj5nDHU2Gsr0pWJieTUHKHX+OF5h5HFEGeqovJBJu4HgPITfkuFyYO25Imcy9VBmv+B/y2UriHZkl/ENp/TMb2RFnL2EO1XVSstG39RYrs+5zhe3q8WWwXHbcL4wGkcnQogU8xwVvXwyZWt4slOSVbkJPjHAJj0DECJKiueA/MFNC3xs5N4Ko1MpQa3dXk//Mia0v8NNpKAX0VDJDsMDvCLRd0avMcxNE9AXV1XhXd+tBwFHwaV7z0VBp6PrqcqgGZZh4klPprFGfjkv2qRsH9ocNFwfD9XJ0tuCyv7h0n8Kp8/49eN265UCgdDS6SYwF79iUnyeDK6nyeZg8Dlqee+E68X8gXRJlmB5qBlBZLINMeFfgpTdS7pzR49bKWP4981Mj4Jdqxj180/Aadmc3EV1O264/7hD8ndb570EyXrfq3vGUyKm+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44c17a18-3d49-4d55-27fa-08dcabc2111c X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:21:58.0618 (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: An7H+zsKVM+SJqCVyVSoXQ+UAEC3KJgT/uq39ct3hfGD4oKxme8d9tC42woWuHLIKaP6+JrAKW1Sbxh3mH7l2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 i.MX8qxp Display Controller(DC) is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as well as a command sequencer. Signed-off-by: Liu Ying Reviewed-by: Rob Herring (Arm) --- v3: * No change. v2: * Drop fsl,dc-*-id DT properties from example. (Krzysztof) * Use generic pmu pattern property. (Krzysztof) .../bindings/display/imx/fsl,imx8qxp-dc.yaml | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml diff --git a/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml new file mode 100644 index 000000000000..0a72f9f0b5fd --- /dev/null +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx8qxp-dc.yaml @@ -0,0 +1,236 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/imx/fsl,imx8qxp-dc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX8qxp Display Controller + +description: | + The Freescale i.MX8qxp Display Controller(DC) is comprised of three main + components that include a blit engine for 2D graphics accelerations, display + controller for display output processing, as well as a command sequencer. + + Display buffers Source buffers + (AXI read master) (AXI read master) + | .......... | | | | + +---------------------------+------------+------------------+-+-+------+ + | Display Controller (DC) | .......... | | | | | + | | | | | | | + | @@@@@@@@@@@ +----------+------------+------------+ | | | | + A | | Command | | V V | | | | | + X <-+->| Sequencer | | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | V V V | + I | | (AXI CLK) | | | | | @@@@@@@@@@ | + | @@@@@@@@@@@ | | Pixel Engine | | | | | + | | | | (AXI CLK) | | | | | + | V | @@@@@@@@@@@@@@@@@@@@@@@@@@@@ | | | | + A | *********** | | | | | | | Blit | | + H <-+->| Configure | | V V V V | | Engine | | + B | | (CFG CLK) | | 00000000000 11111111111 | | (AXI CLK)| | + | *********** | | Display | | Display | | | | | + | | | Engine | | Engine | | | | | + | | | (Disp CLK)| | (Disp CLK)| | | | | + | @@@@@@@@@@@ | 00000000000 11111111111 | @@@@@@@@@@ | + I | | Common | | | | | | | + R <-+--| Control | | | Display | | | | + Q | | (AXI CLK) | | | Controller | | | | + | @@@@@@@@@@@ +------------------------------------+ | | + | | | ^ | | + +--------------------------+----------------+-------+---------+--------+ + ^ | | | | + | V V | V + Clocks & Resets Display Display Panic Destination + Output0 Output1 Control buffer + (AXI write master) + +maintainers: + - Liu Ying + +properties: + compatible: + const: fsl,imx8qxp-dc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 2 + + reset-names: + items: + - const: axi + - const: cfg + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^command-sequencer@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-command-sequencer + + "^display-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-display-engine + + "^interrupt-controller@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-intc + + "^pixel-engine@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-pixel-engine + + "^pmu@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + compatible: + const: fsl,imx8qxp-dc-axi-performance-counter + +required: + - compatible + - reg + - clocks + - power-domains + - "#address-cells" + - "#size-cells" + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + display-controller@56180000 { + compatible = "fsl,imx8qxp-dc"; + reg = <0x56180000 0x40000>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_4>; + power-domains = <&pd IMX_SC_R_DC_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + interrupt-controller@56180040 { + compatible = "fsl,imx8qxp-dc-intc"; + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; + + pixel-engine@56180800 { + compatible = "fsl,imx8qxp-dc-pixel-engine"; + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + + display-engine@5618b400 { + compatible = "fsl,imx8qxp-dc-display-engine"; + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + }; + }; From patchwork Wed Jul 24 09:29: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: 13740729 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010055.outbound.protection.outlook.com [52.101.69.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4661A155A25 for ; Wed, 24 Jul 2024 09:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812930; cv=fail; b=aOI/yDWYmNOrlqeFBgtg6n7Gh0MDM2Str8nBAFYF5ISCkhq0NrUporhsdqRStGd+NhcMhlj1Topvi84eH788MEXYs3Yg+wO1pDFA364HTNqlSb2HLWxxb8UbBczVi+1kD8vJUA6uDLk7Gdtbib6ajQrLnz3LxvnU5d62PPBSSs0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812930; c=relaxed/simple; bh=ht1vN7Um8zwrSt3FiK604LlSl16YJy3PcZkAVZvDQg4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=t5NkCZg732XFcf8A7uqe6DnoKFJpf3fuOovhqe1dWHIjtzf3+3oj1t8ZtUF5Pba4Q43oZ6SG0tSbRkNx+PkiOku/HPAr+fLYMJD42hdVL3CFXHVw70w79cjNXcVmNyIhrFwUHBmF343Bg4Q6EbtGXrHOZXNkYf4z4OVLEUwM7Zc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=VvcUjnUW; arc=fail smtp.client-ip=52.101.69.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="VvcUjnUW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IuUlJk/JjZwBPr3lNCjTChTxkh0h+u0/XXHmA3pqg+TkxFhoIdkq2KlMbNAWH6LZELMHemhUDBvJD4k/K6VwsUMBEavMKACgxLUXWqr0nRHsfcWU2D2blSzhhWWEwJ/POcjng6yUWC10V0P/9o+lIIMon7kqJsoAIPp7Q3wApWBFIx79/T5hpbdWm0dTDFSAHrCgh64LbCmi6ITSlUyNbzOtgixpN/mEIXN69L6PnI/FQ3i3HGCYlg8qcKF4GKcRSY5vO3kTlde3dkb25YOZfI+iDsefcc9/Bo/q3dAa/mZ7hECDiG7lE2T2qWAU/ZXtedGu/bbW22/k0o8dyIOAtA== 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=c1qhNSCnve1tBGyDGuXrK5o2+LJBSaGG8NeztKRVlEk=; b=G38m7uYQXojv7g9J1OTcFUl8rAT45BxYVM6M0GF2GHMMocA06emoQE1kUimJsSKmJTBT8ay2KoIBrBbCt6JVGTsHjbXD6ylGsFFiZ51NXp1CwHRDIu5i8xIo3L/2zRtbIpEmGwIcqireMgev9DKDejsg27nHjZVbS7y7b69xFpXFk+zvv1t+uoJCsVDRUnYqGMfc2jnkYCFXruWeBbpjjqH1GSRUquWXvD7FdsWWX3kNO+kbzM4RHsffW1mwlPQYrqX3PfCOv42r0UefuqemfFJnFgG7tC3Y3HKzA0NhQBy8n/xC7R+S7zTpNU9+4aRDHbbpYdwo/EgwoBc9AAf1vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c1qhNSCnve1tBGyDGuXrK5o2+LJBSaGG8NeztKRVlEk=; b=VvcUjnUWpRnbjKj6Jk7LgF16z7WCtQ9F/0OclUSK1qoZS/9wHYO6QL/ftyrvF7sY/LG6DrXoYOkFLZq5Cemgwj4vbppjnpxB5quc1/9IcpbQ0cDaQNM100a2jyMMAT863xwg9EY8jdZ1qefi+UxQVSifRU6g/kpXB0gsGr3ozkRNOrNMEC/4Birild1ydaPRIwcol3tweBrzMK0rcLUyxa/5ExrP38qvTFCUg9F/XX7m0Ba35mhOOtQI/Iu1B3e2JvQHYFcwf+WA09Nm6jlfyDS/WVTSs6KU2vHDCk/LflmwV6e9u6TIdIl7dXa1wtz4TAMaxj1tEiXYfqJAGX2I2Q== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22: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 v3 09/19] drm/imx: Add i.MX8qxp Display Controller display engine Date: Wed, 24 Jul 2024 17:29:40 +0800 Message-Id: <20240724092950.752536-10-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: a74ef385-4c01-494d-2ca2-08dcabc21544 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 2OtyO6IgpYvf6D0gwHRWh4hafI+kAfp0NWljGpinSg2XND1pLUA8u4fYLEvxfLv9MVCh45e4+iJd6zmb6STN6sIC/rGXOEYkW4P2naUB7vjJiAsJUygWffx1WXWP/yR9wPIPbqIoY/DspqTB+lSz2pA3pNyzUc3Ht5rXljwAg1eee7M6m1/QBq5HaOAhKirngq+9Q+96IlWXPg1DGVDACLT5jB7A4rYM2w9UP3FfICwRaIfzSqh4ndWq6QXtkJ3SxdHFUdM8fNJ2kvrJSfPFqqU95jowjfZ5l96ZX8TsapugGODonH8UI+z2EvPLFyfpF98Z7VBo9Q8ZIMNzbnGIcrjzImQyoVftQLnTuyg0qBS+yC4+ddnm2tGkHk0QN914P2+iptcVA3BLVsegzQbGW717SSZkRKAKfeEqV2YnYEy3LhzFvsB8KgZmRvxrnVYkozZpumXQ+wrTvjjdXWoba2pqP4O5sDm9jf/XeBHS8OnpvYu+BNkqgiuuECNEuiHh2taq5+ZUOj0msNODz7RRf6/FBlc+T61frii97Tep74OZ39qRL4cB/zEvI4ELE1Deg9BGopQsYCSIwcC2xdkxSsy17K2qDMzURazOasbayUKGZ+ton+gIu4tO6N5UPgyxcyf+t+S0hvY4JwG4dU+us76wh01X50C1Kls5Qo6sUfHsssyAjcmMjhT4bc1gPVKE9+9P/fQ7q07K4vBjaObXWk/tYZklvWdR1D5TkzPQ+kRxyQu21klXnjTuyAX8eQ4Q7yhlXKPga8GjO7sm+EA9hkGDlgDkbpn866j2cWkUg9Tojf+gq7Ae3YV9xiw/S0Yh+oDXxZwsWlDrZXm+02UFfGHw5IHW2WKV96c0zqa7I+7hIrXiWt2/w/FC8Mh+l8WKeQTVHlHoikQZxwi17+bS0DQsonnlA8LGYPCXiDlb35bOzDHoC4RcLARW9b7s92Ta+vl/2PZjMsrOxn7KXpCZ+kgHETUMhDVyS5pODdTraypf3vFWjZ1aEzQAfjm7gLXk8bMebi1Olt+r+x6I/o0QCdr9dWcfmnb1Gc2+y0Ci2RKbJlnI84hYtQCqRObIrmJ0dOVUM2a9f3K2nCwJqmTzlGm+5Hm8CmH4vrW2EdZepbtSa7A2tA6CZaHKfFPA+9eLBubfeTiO5W5V/MbVzOkbYWA1UBvEwr0WUeyq4MAn+6+u93+f3MZrP8J5BrZgwrOaiRZ9CKiOQ2A7fJsei0IzibQfMH3MAxtjcYk4iTidgMcJf6P2v+PtsraF/75l0Lw3vMbZ3ycc30+PgBvuqFcWPKabh19w6UUGtO9FmPouTruKGS48VLBAcQ6dn7eiRLiKokWHasSvN8ziU69ytUENIENZ6UV7ZOnxWN0QVazazawStVdhFYv1pxrvH8MSTypneflmepw98pGRLMCerw+etQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ouvy2tB4AB5p2taJB358yjbGxVKLVyqBja4z4gZMmYd3hT/ZK1bNxw03JVxyYVU+z93VOgYBOc6mUTKn0FiICzd2rn17JH/DzB1dLrAaBJCs+oYdaOSlSYlzLrNC3kgZJVXDdLCjctnsZZp/BtMRGJD+ueg5Lb2tBpwd1Ujt2TfyWEhQbBrWc5vqWMn7zmHrT65rOhqlees4pcq04c7peVY8jnf2TKm45SbYbmxi2GTpbTV3oD0cLGUFbeWq8/Tjq1DhRGt2SEIMYJ+YAs5cpHoEYRnytxgNkYrgIeVEQ5t9zAK7/pfSJNJOn4P9ttq7bK21UCUdKspt4J91juL9IqoWPFGUVIiDo0YvSFLQxSK4MIjGdXcYHGghMBI+zYBSAZG8YxlqM0ZTKEAUzL7nEmPcbxFHpGmijgf75AvJQLYJrrza9chs++Fj8i1r+g4NOQuX4H2GXDyY0wsrMd705ypR31Rch4Kg7LofnMT61kmY0+giYvuiby44NCXaWUCaPx5DbpWsL3ORE6zE7O95cBRAlgAFMKQVqTlIzxmRnh3YmSIP3Cf0guhtLlj6rVOgGDof7EnNceXuP/dGkfTuYu9j/go0zQqV7koTL9PwOlwTRPc/pTfD5LCA5rjw4HYO1dZNDm//O6YDvu3s20Q7lx3Ncwq+rBoUDdfgSRlByU7jXQFyvMc9VZIdte4X9FpU/Vshf7a0eS4rIN84+4ly4rrEwJYKPB3jLXMvGwxVDVWciUx7pmFRhKwnLYLe1H2FFVSzrPgrpGKo9kkv93O+fuxOGPgckZ60Q1I9r+gZA8DXcBbX4inU57tWJ1N/OGR8cIvmLfMk6fEzaE1corwtHe19lcSL43IFQDNKH7nR5flJ2qWnjVmv86m5dsGBWKdK7SzsW5XieRzFyVXmxu3HS95I3LWkxlt/1+XMN0/skm8xW9GZyX8IWN67J/JbuhKKQgUZSPUN0Qg8gDUcGIKyNqITNLOdZwfGRWk289KjHl2IrNZ+EzlLOQqi7ex4JpwHxh1KHvgc1njsLvAvBtK0FPnhaySpDswLk8UDMUY0P+0zDK6jGeWfcBGvOv8+zl17yiCEkAtIcPLtvMjaT18Ev/GrmQ6uhC+QfG46fM804DvLPZYUbH7LVwekVvugVUWT9pm3J/76gfSma26ZPD6C5qCZ8MB/C0j2lnwLuAWF7/hITndKNi81vFXRH16099mp+A5sxsxtzJ19ouTXj33B8BB2v9RcD83umRhPUzHSIHE1R5jT2lUePaaaPa8e2Zx531iwMDnzdlWXxxzkRGnyWTcdapoTaynh0oTL3PBGLNfUf1LAqRJ3gLWGnZRdzFy6PdCc3wiLAQOAZeOxRqDE+uKgFc6ngRzZ27bG4CsQty+fXL0Eyl53y0hzOHgAjMpGGyQVwZ//HOX8ucJcvuTQ7kP0maq8/zFBOYrEuu2pAgCTNkjfdKD6xM8L8xam+SFyDn6EGXKEfXo/Pz0vTo/7PbQH6UPZ+ddxeUZ6qJDYzVULUNV5uqoBjhAtvscjub0CgebVCAnh+iOd6PH5rBR9z7lxprlnKdnJed3kyI2MXk88f1n6MYlpJpgxCA4EJF5C X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a74ef385-4c01-494d-2ca2-08dcabc21544 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:05.1861 (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: nwEAgOlpX3B7sabUk0/1bJHaAoVf39Q7pwH/AY5n6qQOq1WeFn/UwPn9+PIv/U4OaKjZaUt5ojzl41/dMiMktw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * Use OF alias id to get instance id. * Add dev member to struct dc_tc. drivers/gpu/drm/imx/Kconfig | 1 + drivers/gpu/drm/imx/Makefile | 1 + drivers/gpu/drm/imx/dc/Kconfig | 5 + drivers/gpu/drm/imx/dc/Makefile | 5 + drivers/gpu/drm/imx/dc/dc-de.c | 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 Wed Jul 24 09:29: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: 13740730 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012029.outbound.protection.outlook.com [52.101.66.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09D49155303 for ; Wed, 24 Jul 2024 09:22:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.29 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812940; cv=fail; b=QSeSV6hnhPUxiqZ+FyNEaT3tvoK+2g3SnAnNLP43CsKAwJF7aWZLlHy1+JMtZU1WUVAdWkIYsvQ0MYVtMEGxWUWXjzIXaAOYEzk+i1Rc3F0NVHulPXdBJh8vpppw8DnFgXE3ZfREySPqRKjoAFEhYnowCgPOBiNuLdpHPvXAMkE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812940; c=relaxed/simple; bh=GzG8efUUcwr8nxyjIs37Qm6M3z+iwYIGFpre5AcjWEw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=cX59pXMH1FmLcjS8M9UDPlbZu1P8/YcIedHK/woE2OLkCXCH1Hi9KRibU2ruKh88w9nrZxr971YtttwcqrCVlfomsfGjm51/fU6r62+nkULSvxRj30+n64WgFSn84156KegQTfnoGLF6NEou+hDnq8yYGfE55amRG1vg1cMBTOo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=BbZoL5b4; arc=fail smtp.client-ip=52.101.66.29 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="BbZoL5b4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G+k6OCMBeiDaA4eTmt1WOnRSst4jBMMQTVaRL8WN/LmJZK0Byf/TNGJnlsdR8ktEjAhMZZVqKBf7hqXRAq0wZqO5MW2yQ36aBcUq8O8jfo3d9ALNDRWHjhZA6QlzmNIsX+dxSbx00I14sCg8U0Z5DZKqNBDNUtys4mH8Gfiw+tZtakBDCEtueD8XLfLkSuHTD8yL0qKIJucmCzgD4S59GflBSifvcqrgpoCQu1oz5vjfyBBVq1pty06bkS4ypkorwaGMb2qzD9kVYXzzGW/sipST6b/gpiwy2zkQ2It5IwUnwMwkOQJnTuo36jtFNpi8+Q7K/w8kpeA4mwJhIEykgw== 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=Znc3OIA45Ado6J5griPyXauuQHBofc0/3DflaN9matQ=; b=X5b81MFPT7vZdCaycL3Used0K/1vtgUtm5+gUIjH5FyUl5MtO7GO7mFz6DPmtdhnOM1YMulXDDJqkxzno7WpvNwvzcItVmgNVUL0CeUD+h/AIK3j/OPom0lDuuo7POl/oH4f0q5PjZQmr/YfnqIC9LoYvyumJ2lJzv5CKiX5OvB+KEwYvsoqvA/2oEsF+6HX6utILo2TLmHvE4mMPsHmbZxp46iuC7BdSjXE/gfPeHMgRwmBdTtapBTUp9n5Ngassq4LaduG4lS/a7IYPQiUe/wZzrJohwoCobY6GbLqqJU7+8RCC+adkDkgGDkPt67PK1DzQ9LIvg6iMHVzyfqDeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Znc3OIA45Ado6J5griPyXauuQHBofc0/3DflaN9matQ=; b=BbZoL5b4mzMpKjJhIUVm3EofqA5wxcoqZDXRiLmXVHT4iUUTCzLR8W5fMhyiezwxjZO561uKz7mlTOsev56VEOBTeRJ48xt/V/jqj76PjfnYA11S5KCdCnV+K6CRpZhk5XJLot80WRbo2lYN8Dku/qt+qDjlUMHkDl1BozB+ddmB08BfD37fhS17n+zSrcXNkFngqZZ1s9ittFShI4y1KrObWmUqzJEI1COvzoH94Cv1JMULcnyZaFbMLpAE+v9VAgHpwzHd8htQ7ZMDff9EdHQP8V25QrKCpKSC3snFRhvTDgZq3h70psOSPG4a3z54Ny3Ds7j5LnEakARZkIaxuQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22: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 v3 10/19] drm/imx: Add i.MX8qxp Display Controller pixel engine Date: Wed, 24 Jul 2024 17:29:41 +0800 Message-Id: <20240724092950.752536-11-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 74c56052-fac4-451c-22fd-08dcabc21985 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: E7wpGYN8CIgSCiYjXC9eaq8K5kawHh7V3E/GhaYvDhzBzHj4yOPQHhlsKFIJNFcMoMG5hP/Yr4uVBkqNkH9IHERFYSbzm5e7GMR7rcct8JQw1s53SS9nxR+UrenJB/MaKA+sJHvDG7vQkY4AWZlzBptySqcAehXnTTFhkdIBAUn5XHJEWVhZtc4iZbjNHjcDMWLNJ93ykqVRxm+NWsRT2IxfH5Dl517N/HIYCC7txLnujCnTZPPI0rcY2qv+iYpif3HSgkT5wqGSWrCZMXkAzK1ZM5rbB7ck01pJKZlepW0Eomx2QWBwSAZvx1eLcMzFmeFTA4k5nOQToDIHEGQSYadpisr84qASvtll9WOvNNK76HNupljjOwobkIk9UTdSHK8CNDsdYYEKIa6iq3u8tC06Qv04W8j62WqR/WZbOC54z8ozCGqqGwSJ4FpAuGNlUykxoHr/CtcYEaYLqxU3oz+mcNxZ1k4YC32EXcK1bOszqANO3IdFSE0o8ZeJjgKpvMTk9ZShIIGJEJthmIVKXXUzvG/gu4Qa+30lt3HDKdnVr96ozPnTC/uOHz3zMG1K2vT9+ULeC74LXzXi4DM69GGoD9aMEirtNjC3aIN9BbPTeuJxPE9GQtCTmKspf+dWFzPfqtDAAtwQQ8d8fBaGGRyP82ebnGm9BsoEERa0XZAlh6WwYmpSp/knD8AYjz1HyShuf2bg1NDkhxCvEnm/YNFcAwZL+lz6LZt1/7MdL3aln0eV/C4IJTQwX+7I5uoykJQJSIudod1uNk566tKvvUN1Quj+8Q3MvlYYgxdUk0gYNqzkJkt7x8ap5Pwq0jrYN+6pf0JeWQhmLhRJYDzs5foqp8fhvjFCqcEsCArSt0R/seXZhrc0E4iddmk0vsLAc4o00JWXqt/toibaSOivumcOqdmY4/8HiVkukHqMpZOt8vPW54mxlTNaMRlUqgYOfWju9HS+rTtMq/s/2GMFxA/axO80+pk3a7O+nhc7tde7wtzsic9qt+kEaaEtUR0nV/C4HUXFzCzhXW807Xi2dCWLfY3Rtkn161h42rKRbMIw7KnEqr5yUzJmR+mhiZpSiqRhf+RH9uF+aFqnxD6VcGVwtH16onBwY2IFAbrNzEcBFm2Jqzna+CkQ99hNu2+F6sXl1+jSfb0j0NBV90vnzVcUlafGOf61JgyZP7/XCKQjiB6OeAk8vb/nWvE5xVW1ZoTn/xdwc55peIGAYz5hcd/l/iyhcphfoo3Q1NTEBelpOcsspOvQNJpSJA3aMR3+vss7J5S2F6Vg7h20ECdIUh2XQ9cAyQCzfzzJz63/jaNXihKVSP5ciV6Bq/iHDifh5QcKasEaJGyI96tsobEErUW/o5SyG+InsUO2p3+7mdWutvp05MCwtLoMC6VOH+sso3pTVFYykIs/zWGkcrce2Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ABMF9izqA4RSgVayt/ChvLnzU+P4OpCNrO6Eb16JKCD2XB0OM5hWp39kR5Zx9ZR/t1v+uRH6sIB7vG4MRQqLHCZgaK9N3kkTU4xraD9tSo9PrMPP+skhCJ7odbXbSKsv+P4befiFhVlhq+/gLOPCtSKdirbllxuYujtmCQ1wI5QOvaYg1TlVqg4Yy4KW1SqQQ9RWesFV+I7ugLH/C0MXgwobhMqmaG282Tk8t9QcOLYLZmH34/sBIHgfOtGF2Wj63OVm2rYWoX6fRJ+yk2r8mnsaqkS15CkdXtyjAw5eRd1jFeJIAsITPvQwCI00qIzJm6PFnOrE56CFpcL8mB9u5K4M99pTSP1Mw+DcsWwqn34S8POkRytJfbFwwxZOpAGKGvIr+w4zDClLZXq93/PGe7pvg2YUMnKAqVbX+VCbrGGIEUsP3N6wwmsQEqZjwJJWs6gEtk9drl+9t3q4zKL7kV2InEdkJMfrQaoh3USRMHO/dJkk0Z+PhbdpdyKPqcZwvLbV9BZo9BsFt3B0wnvgaWAIr627+/xuFo1lInp7o/9gFZNHM5EsPldeBrOQV01Cv+ioGYIKtdUgqOaIUzb7uwEdlfWH8hT2UdMpjqWnNhYyvVqEMCdd6iv5EGQjmqUNN8Kb5c7btZobzzCMk9gtjNPZ1lLf4n6N9M/OLsL96EZLlJOCKiCLT4CAk4KAKSD2HCpgZsZwUb/W/D8lFeZMhF53xcGZreo9kSeaYa6diXi2q/DHExEpZ0Cj5ppG4Q7hdg5/N3B493ixOsDdd5K5GnWfvUzTasIvRUeOBGScs3ZeQJRYwmQ8Jw4rspz1MnGrACwZbJvMwH0ZmCZfjiuKsfaXzdbpTRQMWUr9QQKgnAT4bJEZ8htE87+yGP8LybcfNTRWOTOwA2qkc/oMbtiu9XJplOnBdIfZWKlLEMsBaq13SvoAd+JwzNcoZxnyczrYOeEwFUc2wR1IExDFjtxIxHYzvSCwQJzvtnRJN6FtCGbe4ii+Bs/dmsGATW6sNK1Vy5w3bvRn/3m5rReIRAtCgslZ3hVLnJF5Km69SayW0M2lLZ7BTowBlsvwG/qOUyPepCJ+zD7iujM0GHEIXsSTIwkHOn3n3lCHSwUPP9vTCVYBirfIb1hMcHgAaIL1NtKv6WG3rPnVi0IdL6GfYVVQoOLJzWAcdkOWubLrqmmhwandZ9Z7Wgw+0dFXJLfU1sFI7A4d6SUprTg5NWzeuQhD/yyCP06srTTRaF//Xhth+lAUcGOxB6mChYXRidjpesrN2es2BHr5dmdMwuwe790Vq4M+b5YyVziHD48wJK0mFupZmXJDIJjFKP0yFwq6NR8ffg26az2f04Y4Gl6tLg3vyvQ4u7bSzdTmedUEO75sh0p1txfIY+lh4D66Q/smddpAyIzoyZKGupOSAywWIWC7s5Os+IJRGFQYLiSb0+/qF17Vv4VXZ53JapW7KyD/OcOOgCYTuzeUgFuDxv3QZ2LgcZHMnfDv+BPXjtFxltJ0/2uIRC2+U9IRoAEF1yR0yI01eQIBJEJcaJxje/tlcTl71ujt06cQBNjzF4iw/miRecn0NIVtMn6Jx7j8uG6z5s1a X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74c56052-fac4-451c-22fd-08dcabc21985 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:12.3302 (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: 82OlTIzluC1R8eFI1rlES+owkQnruPOc6bOu8U3SXokiVbRcC95doXlHtNrq0EZFmYlD4ekKoM85mtxYMyvmXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * Use OF alias id to get instance id. drivers/gpu/drm/imx/dc/Makefile | 3 +- drivers/gpu/drm/imx/dc/dc-cf.c | 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 Wed Jul 24 09:29: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: 13740731 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011033.outbound.protection.outlook.com [52.101.70.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7AE6155321 for ; Wed, 24 Jul 2024 09:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.33 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812944; cv=fail; b=eXdtI1YI7X97YBJ56jy6RqGPfEU8iDjZPOy8m+R3DdHT4NfM9s724GVAAHxGxyfrCyYRtVi2X800lQ26lVr9pHHobN7dCrcjhHbd53HtqS8yvk6zG/dG2t25BxHoQTjvjLDhp1U1VACQAz2Z1ZPfciw2Fur5ILtwy8B0P78SVW0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812944; c=relaxed/simple; bh=5LpwBFM5UzlKNDVhRmjxXENKpJPwfPsBq5ozfyjUeyY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mGrW0bmvHPWLLTJ1VNhgA+tEImvIFfLGo3vbqQ3W2sAPnJ/n398j3MALU3u3Nw/pXT6pl47701x2wDTeGrWA+4S1F67ASskqKN78eVlStPuKyPDRgsSzN0Dvz1A8JBS82Bu8DSDv0z2CWQ3UxG0fimxbcSWqG6NOi7nBHp3m9VI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=HvwDnI05; arc=fail smtp.client-ip=52.101.70.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="HvwDnI05" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fY4KoVyVvWyt5SQ/Xtch+U0QKstwfJMZJLBycfm6xlnUCpNiLs4rf0/mxY6zZgS7UMaAStsbrNNhl+ORRw3iHuNxgG9uKKBzawj635ThXOhdhIyyJR+iiexNJBo7G3+IfGwYniosiGBJ7p4cT/m5AqZ0BO0RnFa3hLg/ng4sBGNOWBi//LBo6MnvwEkWn1Qcp3RFkFZyEKXb/dVJbs6njz3mI6C2I9PDxHu2TPEs+YnVFxfDlFv/v6dWuYNDIM2wJInmFvNIaVxvl24l7f2zAGTZtxt+wJuU6UJCIlZyN5C+HArFXhXsndMFI9W27j2vL/0CXvqNu9B+k06A7SKAwQ== 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=MC1EIw/pWmXaK2h2z24eJx0apVrVEAvWmONEqQyEEL8=; b=sujPQ/H0y79zqTlwC5H/GSLSLN2eo1kkpOQnhMr8yGeh4tjrIEJbHPrsRQ4kks1B6fHiPK30L41X7e61nuTd4l58V4zf4HJH1cXdaEEEtsOiiTfmL2QgKEOpzVtfSDIyAfuDiWIZ5bqQ6ANxnQNuN1wnu42b+rJztxX591PpUehO1I+3gSmMS+KFTPr6UYSkkQFPsREvHX2wD0n5RnGOyQ+jYX6x6kzmvZYjxOxyHqs3FqZtT6SPvAHW24P/9GBjIMs1sCvUzyv2KIa5fGP1y0iEk/ksZPKYybKT3yf00kWUqIL93pFuEZvGcYoN1pkek3PtnNjicYM/QroG72FEOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MC1EIw/pWmXaK2h2z24eJx0apVrVEAvWmONEqQyEEL8=; b=HvwDnI054wG/Ob4YdBwkSbo2Qmy9t5WOzs/b2jRaaaHSXm4ZE5NZMR1ZCcUUSbTEJ8eMl3LtVPjCK6Opbz/YqX9CxntJmpkdx1ddNgoQeJViW7t9C2qhcHlJ0swka1HyvdhIzPm6AX6vC6D76B5EV/8weEg55kPwVatGtC+tAdfgnJ80MA6wu3IrZ+5VSQEY/N2es1X6MvcfhR4xL1DuB1aCiu1FKZOWK2Xyj2Lma+mliHbAQZgJf7a0PKyNS2RFKQ7G/O8ZMqZBKK70YuIV1Y5Be0E8tGtFPo5+CK5DyAvl4HOMe9aal2OXRsaQ5J6qkMuhad13On6qEqYQAwPZ0g== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22:19 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:22:19 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, 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 v3 11/19] drm/imx: Add i.MX8qxp Display Controller interrupt controller Date: Wed, 24 Jul 2024 17:29:42 +0800 Message-Id: <20240724092950.752536-12-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d194fcd-0808-4d13-45f6-08dcabc21ddd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: FLfb0nmrbhsajXIPBq56FpltjjxFlWmwvp1yjJlY3zJ0VIXiVgO97+qKPqvi/ybG3gzHZ790o3MM3vF+a4LRWy3nMEuNPLghzHrWZJ4wcK9KVT3Af5mO9ipnp+1/lxOf5vu3Ug2WtsYhulQRYUOn4DV9pWfp7uLCwd93eoXlOvwDbVNukEmAS2NRAC6F4Ra/w7lo2989eP0I4f1YplN1wLJXkA8lDKQGXJAVlA8NDHLR4oAx70XI4xk+qCFBr37FjA4YwGaZDjEtXx4KvNO4AQkB1HL/QHso97RkqCA9AXdKhSlM7wvie9sPyEY4wbQuMhX1Q7afewOmnDhb2GGx9yMFtp7nQTDcq0CfXH0bHP1Mm+F7tiZjuHDBo2sUG7d4bbwvPP4hDz8WSThMMYb4F6LRNI7lFlzjC7t172MK7gNf/YdpfSknpU0C+avMe9Xvn+MVbi/IzXJoYoiornInl2NXpSoGMCZ0I9y1783qhnrODY9BTs38dhygfWVhmP8jBXyAx4ob6EFfZ/FR54IbryP4CxTzPNg7flp/piqVKh9QA3D7iZghlyOWj5zTSDhrEHNmx48am9EOAP28tqExh7eEmCVzc9NOF6egSliAUKF5+jTn1BzzMtuzuBkQHnUhapgJDXucUxqx8octWf3MgL20v3/Kif5jSGyz2/jmAbEAdIop2dkuUlCH6uKoSh/ndpMdx8hlS04dIydUDHdd8etf6UNzeC7jUQl8QR7z2LuqHZPydxiVqnmQSWu/q9ULa0tGAY4/VJEFDuiudiwRRikZRdbxhLREPtIVGfshd9GvKdZROQCBydWuYC0LMfdxJ6qajRtxWAp3/0BeaBlCb2s0iw5YAKUBUKPA8rTG2RG388LdmNCoeIAMZEJ2OWt9rGdYdfxin+ToC6BZwyv3pmc/qLp/6H0pBYt3Pn7U/xpZtdgRwb7seClOnAmNq0XBxg+g13EYHUvFosJnQV28UNZ5w83y/edcu9tIH9nmqjWOmOmk3OyPd29AmxX1SCRajgQO6SIjSPs+ZP0RjHd2tEeKn8rgThiKAmQSqFw8eDcbbPI9jctUmziu8YNqqQ+I325pD7OVZSdJWCkIr8s6/RO3mudR2bBOPtt0o7XcEs05L2je+wt8e3xe/xoA2f8jkZizwEF2YQgEgeLALUSEkrnF4M/ERJLaRHqz8jtv8Vaj2ie4tWGBXGDrss+RpWpZBWVJb7m8zvnLMlI5KSXbpQKsACL7mlCAGztgumlpEC4cJaP7YF1VkqfAsJCk2fV43r+oFXJODlbCCBfuj4b9s3GQhOb4ZJrMF68CoY3SuTagp2EkBy3gMl7iCWQCEyd0vq1GDDVQ9YFDml4tuG3dh2/w65J5AE6buZ9DrHfTa7ISlQr54KMDf7JbSpzPtYjmGGoT+b80k39HideJlJPIaw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wk3o16AmgKfNGfWBIwR5AV587p4S36n5niG4Ay+81zqKt4NCjx7TD8R2uByBbsHci1oO377YuMbyQOYjvUV5Vg02lDEKcLTKTfYbkbryL+/c9X+vvkA1kpLzmGSJcyQ5jpVWA4R17AAgoRnsxtwvDRc12RG7SCupo8uy/AmUeW0Ie8RhAl7uzjTSYYnWB62wfytyzYvFcJhT+VG/BNRqER8D3sNi6TWpA4sRk6RB1RXbury3iJ62HoScGsn26L5oOKciE3ACd3dqv7FsncwefGttiBPMZNvola0RAB9VaC8NAbKWpVt9wgCH0RTYX9DOFvvTUqilBeMxh1ysfHv5Clh4LctYC3VpwB8y+uwhdkcWCkBfewVcLfDTYnzSskRJ/Fw8gK1ZXWOYRXAo1Auo0hqJYGH1pGEOCZCSHSE8lzWdy+sDjqJeG3wrNJUdSJTA2Sqp+sMkkTa6VgFEeXsWPZPsY8W8+N8hUIgx3q7ye1ELml+ppu5mucesAQPlQSC5sSZHiwhEHHJSCYNMTEqI/J69W1p8v/nNvqOQd4G9itztHdkLeMmmCFBqQum/DEX2gbUQSbPFfeucHtAP5HYVCvOXb9XQMDo30/Fs2zQAeupWDtA+fZy0WlNmzvI5ngAtSRNzA1x2H2X+IowDVS2gensOc/7HR0NywIxPx0Sze5koPd4X9ETveFnNsD2Y33HkU5nChxpaFVh8NTQB7IOmWknldXOV1FrUJSc4Zx0P92KmQuilT5FhurvhjrB9sDEeJAuMmymyT+lQjB0pAE2EAhF5rAEbyp9JnatQoVjIzmKokvM0bXVz9tUM5GSFmCMn8deb70H3sLejVIfsUkPCaSWBBrvDgYmU78DIY+J6TbYQDc/EhhA+kWPmzi136Ti4LzyKmxQedKosyclEj3ufI3Q7lwwP9sGlSOMix78Hc/dB3BqI5MDr9Nca/D8w3WsDWCUK04siOCtviYVBVxBQNW/QVIIYv6cxpqCqX3vJc4nf7Zxrcma5VEBb/JIl//xy58hCiEQsyotvyjEAeRL1hwIRpPYAIa6CwbTVzT21PRHqC1JYc/mFpp7gM3mirBwktvpc0oYtIlXnrCEx+KefRr610F7E+G/9xTxvrp4afBQAidJD6wFQXlVKdRcCqfyw2851CCj5TT+w6kXqbkWXfAOmo9+KNReNUz2uDn29HU7S/bDGy3OPmi8Nt6Kpp4HO1wotBMikzxCOllZ7PxBoAj3jbTTaMBTFNxKTvPCbV/HZpeT1cMWZnTtKaHmw37whnxDUoDGJiiSJVRLsaPiMXFJARR0RoQW98U1Vrfbjk4QOXc+s/xQ9Xrm5zJdvCwkRbp2gKGBHpVmGVzNQ9JQQm/kYi0m5voNHgdNTXM6d9efezCBxO1KHFgWQQ6nwwZDQM7k7Onas68iH0pl3+seyRTZdTwXuFzEkou1VcQAF2vNvBT8AcQZNje8jkJVcDyFE8kOeS/Ot+xaU/eNM18eJ0GTvFduh8zN9ZRPVR3tPdqNX9cIuZRoQaNWVvf4kINafv78T/Bc72s155Rn+Me7wKuf3IkbCt6FKIh4AD3QgncygDpF7Nv3TfcMFoQSZGOOt X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d194fcd-0808-4d13-45f6-08dcabc21ddd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:19.4508 (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: hn2ZHA25HTRMULMhaRxZTsPYyqs5tcIkfqXUd2nDHWQRPjytp07iFel/2O88jXWqA8DddV+g61PvVICK/4v2cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * No change. drivers/gpu/drm/imx/dc/Kconfig | 1 + drivers/gpu/drm/imx/dc/Makefile | 2 +- drivers/gpu/drm/imx/dc/dc-drv.c | 1 + drivers/gpu/drm/imx/dc/dc-drv.h | 1 + drivers/gpu/drm/imx/dc/dc-ic.c | 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 Wed Jul 24 09:29: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: 13740761 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010001.outbound.protection.outlook.com [52.101.69.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AA68153835 for ; Wed, 24 Jul 2024 09:22:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.1 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812953; cv=fail; b=uWhw8U3PPhTab1iWy2cEGd++Kp5fU2vaOaQn7Qy3VlI36ojEQNchWM+RkXWzIwSOAT+JM6wIcLM7NEUbQ7SYkPRcMjWPihbj2ZwhKNT7Bjs6TiILpS3njuai8S1v11BB6aJP+LHqhFRK+IkdxsVI2QDz/jpfbMnKEAxGJebNU8s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812953; c=relaxed/simple; bh=/tNU6qFuudCTT9iutRr5Ho1Bm1AFe9h3jT7SWrQGZIo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=YRqCiEthTLOZaE6s8/CGyGuksTxrvOID00SzX/yCtbfP9B3lUyidIynMjF5QaGXOWnw53d6IiPkpB1EZIPuB+6EQHKbxRpLEDsXVY0OHHebJ2wbMuERHahM7bisOXPSNU1SsCcPS7kbfgJ1KhhoDdqkFDb4W7O6h0jxeHWMdnss= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=KWMIrt1m; arc=fail smtp.client-ip=52.101.69.1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="KWMIrt1m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MCl/7z2HmJ3UMBbUSDrd4mLTnHFaM+65J+YFIPxWhuY1q62yVZqk+gLQW7Z6WdsrVMa2CsjCnDkw9qGQnEe1Iq83QtQGQBFjOtPH8JIRL2xVXWvmdz7DFWrs706zXKvtzAWre3Lffuqpd54xtGLYYKekmvA9gsuOItOHts6yZi6njdBlnfNx2ux9KSh2PdLXjar7V+eRb4nOauxBHRuOBWIQ6VKgrP7aJB8yN5oNk7CTwYclONGJlElBtWV6hg6zULMW3deaDcOVmc3wiSrRpGn6iI+kOEKj02IYufEZgpubdJh1F1qTfObBkzyShX2f2emdJWxXfozNsqMzdQ0Yzg== 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=C9Cd69+wPPRp1ahnENmpR2QkDchGmMwrGKbwRJoh/M0=; b=INjLrrlJmqJ5CW2weofMqepCN9k3aTueKdWt/E+OtzGjCpXUQJwBlVisMuWnZJQ4DIDAbDvAHY/ETJtUz9MPwbsQQUSxeSv6Xq1XlxOEWII1zkPBo8QF1MmegFMOVjlsssooFKGpPeXd7JGDlbhdW0xLJqBvGoW8JlPyOEckF7PdIEB38TtsFXsp7xWUPGBQYqz+eWOv4pjER5XAWTT+MXjnNviPhuYa8wJo6zC6gmbGgarJYuDuB0Yerz9OnoTuSQC3+LFZN8xf2nbzhUVhVAujVe+2xet75fe0ikEK+owAcqmhInHz4/NibvQ9c2AQMZOnYUNGTTpm4nkDKsVHNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C9Cd69+wPPRp1ahnENmpR2QkDchGmMwrGKbwRJoh/M0=; b=KWMIrt1mxk9CRgFiFCCCkTnS+YXk/sBixx/qVf7DBPavQarZccYclOsfUVO+wa1rueKob/HgGgwa/ISy9rQwPA3fRUBG0RmSoWZ0de69KXuqAKnyWbyF4fPJa9j4wza0XHgFuTSAowrXSahLULdktI+yRvXd905PldPLtNPzc//o5xUnDCSr+CmpZ1NZqh6sd6sTRX8kJ8OkRQy5FS7D43/EnhHkM6tB2QVOfIFh+uVLf6QyZzBC89VktX9YP8199mBzc6JhzL5ROquiXwPx5uxqHj+0P9X9XriJpkkq22Zvmku4a9aPOv11WCDPXaZcwu2xc5ofctNygOCseG5H5w== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22:26 +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.7784.017; Wed, 24 Jul 2024 09:22:26 +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 v3 12/19] drm/imx: Add i.MX8qxp Display Controller KMS Date: Wed, 24 Jul 2024 17:29:43 +0800 Message-Id: <20240724092950.752536-13-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d369d98-e53f-4c9c-d952-08dcabc22223 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: LJ9fSVGr8esvEMy7tY01zlmGAR/DBnTTWi2mnc2sGUVFuJr6z/gN+gudSOCwuyRZkd+QE6O37e/Wvd2htD/bUG1w5tUqphA8eWdN0RpqJJB/DtEmaulsF4/6YY/0+gKHxDGGOPdRRspgxapR4r6/ctA4GaJfB8+3kqyHMDiYYVIR20ZfPY+fvZM2Ai/X0HtR8w4SO8jUEeuIeydx4OZ7Tev1JBEIv8p8AUhIrpDvMIyrjY5qdz3CQ08oS9nvZ921U0yG0liRwPx+xffZUva77QAgGGM/kRAN+s2kzl3hz9UFSMV2g3PHCcD2PaDpJrHkYjjY0nTwKGj6RywAwAyGUHIN7GPd5NuLb0unFG5Ea7vbuqYEa3403JH+EmbUgBpnMMz0cO94EnVjKyzjX/gShpVmePNMF1FYdnvSZsaZzcBLt+RdZHTaIyj1WxGD5UpX0uxpr8wzYa3aGadjdePJnQ0J3tnAbBQ6in/zW2/tgMyRyIHBHWzMC8rAzB3/xRW14DQUlRabcDT1GMXReguNEpOi+i3gAvnq75H5AKT9oiDc+YdvHtV/HoyesF7rPuMr1cnpjVfaQTn4G+dZPIpxAhyWU+TbWDrtg5ikbrOxxUl8Cqwt55DDyBBrkwWGEleE1bO2/6g+JnWpUQE1XNX+ysB5c/kHtswtxUghVt/MWyv0kUf9hBD4EyjbbaBRdL3RcmWJC+87mOgHq8qIPkG3EonU9rGkGBAbvPCTODR1Mz1axuyx+0fGQB6r1CY/ojUhNZlbae7t/37MYsV7nGxuoq+gcIGCc4OybYzrQclUs4E2ZI9NAX0KQNdswrq3GYY6xiYQybn3/FWnMA0m4l+TOZpeiM+krrQURboNCu+N/F2NGfTxPu+jP/GNpeMw4cfU/M7kPiphFlTu6nSZ9nzm0F2sIxcczSuEHT9esA8VLAHGNIV6uHPj4Uh494GisYjLycUoT33rQfQLKY1esmXuvSPwhWs5Chp9DvPZbetvCfxtUPMaI9HN06Drha9dpAG3vhNVYs+H2m4/w6tVRJmduKQ+ocnm5ccV9RCAVYqfRaoWGYrxZGPG1IG3Auha+QuFyDygisnYQeGScjXIUocftk2+MXelzimcgPxre5PllNprfqQ833palrUDOzyBuSyIKBFSjg3go18xG1HsXMmHwf3XJzWo2RBRvz9WQo4v24fr8+vfsWTAPz0RuPFDeUN44wb6+mf5Uh5XQR5t4C5WIMCaQjzwpZ5EGHODKBRSfL29WK6JbIhpvY+bGRYfPtUfx/e58BwU6ZandlALPwTcWsPJMCSL9AvhazFxJEQ96fsLrEF/9KaFUE2nv8cOZS6iQUBgz0sBbY8rC3pkzui0yxXzNCqJSPp/VTyK0pMYI6AwqOjZFIm6BITkbZQh3FLCuF9fm8nDpJIQHABVHhAuvQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hYb83EZ5J8uQSV8hEBNcxsLn6U668MDmGgpBEsOgOnyHQLyDabL7f4OEgVQo74jtSjIjASXS6AZWB4LNEjB8MsHJrOSZm3j/Oh/NjnA8NwpeS+sf/WVUrZ5HRgxvwuZk1I+pnZW1bB77o3RDHaTqF0U91kqzRYsnBENKDS4Q7cHbRyqJbKLkAs02b0KKGmkj37mGd6b7zlxGqOwHGkZDijz18+fTUepFFLOS34ukT90hbPOb1nl34Edn+xk/agFRwAv9uSL7wIwSDHyObNGgN2RkJHlt0B9OpRlr/S8sWFbzhG0o8UXVNrSHDjmCBTGjodu7ohGyAlWkGu9ZKqR3ht0dxry3gA2YyS5VAeTD7A7yr3TAxXwPGEqmYmnAqL7EnEKEPlHA25+hjc4yfH1jm1KRDWS9jP4QONOsnEXDIYHurvqPklD+cO9VF7yMusPEgi9aUqxc0fwzPsu/gsW5gHm/vIoQVAtxdoTfxOjbaYZAkth2GV3DB8+OrAA8RTFNG+NOD5ZdAaYwto/sOZgHjer9hYfyyv+wPJ1fUBaNnQprFgomxW8GRE0M+6SVulyr7Xim3PWMhyodV3rszXesR3aIpAjS3z/xvV8c/7N1c2P36jOBJdte2q58bVFjkbViARZ2ZqyGoo74dObFWummghZ5s9Ak8lwQVBGTYOcLQk2cuHG1js6Y4yd+SxQ8Oi6383Gp8/B5LH/unRu9l7JSsNqJ9CTvF+Hf+CF5YE8KLUttd4e2rYevq3Tpq0X4dL+dEu2S3wigtP7GFPLvIms79WFjIRA6mny2eTr7clFidVhY4iOTnHwjZdGmKOpm3blxKDMbb3O2uECC51zwEhk2AdLXj0IfHPOfxOrqhjHTosqUU8Mlh6xwDv9OzO/gnSjOX4GA/YTnWbmtHGaHBf3gwoVGKbyMXPWJw5jGpO/fuRBRb8gP+CoqsfYN23XonwIhZnRsM1asJ+CFAdicdbU1qzyTf+ebE556na8g+o1j12beY5QQd1z3y4HYYYnDUxzuw7ZyHSmwW5JQxbFBGZIxPdR+nfqJPWDjCh0u6UHVVFWHRgnJpbegZnoTvmdqZ1fzu+vgzhIxt0pQJEHYSOJuKtCx07zGA/tq9baep2LUpBDFvHDNIOcG1X5f2cmE/HqOM6QVECZncn9NMfx9YTsRhfTTnIitYfenbf4VGcQ11b7x9UQI8MCWg5Nur3xq4aJTGLybhHxCyFgWCRxaRanLLXMzorTUbmey8kxWMep7TtlgBWj/z3XCIl6bZgOymiUOXkDs+rP+2Etguev0N+WdFj0cF8kH9qCGqsXoYwHQD6uy58m5joVEHxU6obWi8lOU+oMJOocVElSA423CgkNeimmb/95KJ0oXO0LXO6jJ8F24fQrVbLhGxuaq7vctUMWyIF+caY2izNPyhw+j9pyR7cKGvpObOBiFCE5jDSrZY4vRqY09eKv/3jlJ5esHDz0H/fVCvVhgvvOj+hccvqKhBqPED/Iu6iOzMGCyNYaJ5/vzNCciymMZjaVwXMW91difWd8OUQlQZ5KiYwJaT7juxiNlw5w00vcRXpM+Ml38RUocM84XZGf2YHbMcciZt2NE X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4d369d98-e53f-4c9c-d952-08dcabc22223 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:26.7443 (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: 298IiwAjSva9E9VwOmWVPE2wdjy9rWGycNb8LW3kAzg7hisISPZoK++XqzjMDDTfQBj4GdK0WBDLEk8pr0gDCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * Find next bridge from TCon's port. * Drop drm/drm_module.h include from dc-drv.c. drivers/gpu/drm/imx/dc/Kconfig | 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 Wed Jul 24 09:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740762 Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013064.outbound.protection.outlook.com [52.101.67.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4ADC15533F for ; Wed, 24 Jul 2024 09:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812958; cv=fail; b=BCXGdfv2OQzwQnftGX/y3LkzBu1yXs9mbuzqVziRWOG2QzF0ZR6ohp5Ro+W8dVxJH6afnoBY/rlKav6XatDL/KSvxpz36zwHzQlDfvtHTHgQD9fw/yBR6duk7RAxrD1F+8q0kucXgoUg0PvJL1HkcsdjViEESGU1eT3jkRK+B0U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812958; c=relaxed/simple; bh=e+KwF/AgNb7ouRrshlRPBVfhLaltnfMXpfickcSIYtE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=TshNNZ9xNWTEorwiDcGBZZjqYoQwpfeiNaxA+1T+qlPXO7ix2asy+UjFsw8ItpzPPr8aQZt9uSGwt7TLtIWNUoYVH2zFs5Xzt50a7ZBc8SGjNqoOLqTHOFZkFTicq8ciPinbw8ili8TrIcxk9SZkhrCGTRflemNobPVJiVpvUp8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=SkND8KSR; arc=fail smtp.client-ip=52.101.67.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="SkND8KSR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WhtLyMBN7U/ce6gf4N8G0iNBza7fgNTLRnat6c2okfrH1J/i2IiXe4yASF0wD0/U8OI3+TbX/PEJcPnOQx0FPbnCvjM22vBQ1lQC3HC2LphVnbe4IhZcMN8EaqNz14RC/LMjpJMlc5QZ+VNrfQ/UDaxk+TzTM06DXK74iFLo1vdQ7zXjknsU/TI4I671TrqHwwcKkE+rI3G0enjwd7MoXU7W3uMK3zvafvf1OrCh3z9yKSFZMBQL0RmSKmAyebGDNCWRBRKA0Sg213iyHwSF6gz1xSQkKjq7Sbl7VXyRNbwjigQy8sRz4HchQEqsgaqPC2rUJKwCT4OYb121+q+u0Q== 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=Vp8V5ZO/fCGgzj20rRKm3TZRDHYG/x5FoWpPt2SERcE=; b=GAbok8zN5HDSucEr7ILVwCHdg1+Ks0gT1cjA7Nb6Sq+aOC/ZtyIVWxemn/v0/ZBCXnIMtryffJFeso7roKF2FIEZsN8kCzgtDqVqAorfXK5KzBhHRjo3H3x2Z4VjSdm95YnnswF22ZJyk/CYuMUZ+CVLAcMH2y0rBPDxjLUcoGafv5norX1pxusO8AQ5kqX9U/Pm+IFd382cLqSfbVl+fYPhM2TdJYnfDQW4pRQtupkJkA30GnBHrcggKu6T8K9lfHoisDPo+MNpEKLZM4w/6M+w3nA2+q3qtkyV7aLiF+YwiZDW9pyb0ZWuC2WpQ32o9fY4evGPaqp/WOSU0rkvzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vp8V5ZO/fCGgzj20rRKm3TZRDHYG/x5FoWpPt2SERcE=; b=SkND8KSRZss6sIv5c43N8EGNWmgF0UIzOegUblh+2rKxiXRdi7TaJa+HNKD/eNCcCRXBVsBO7R7EyVxiOxUfY3J9vivhjpIx8YrbnKO8LKZHXW+eI7y2ZPbjIiHwQL9EQITak7VRTYzvesrEdczg0WBmAIDNRXfMK7On9jhfRtrpj7NqrSVIDodT8TRWpdgRWdzixR3GNH2uf7Ah4HvdNTNVNpv2/wS3HleInaINpWJGut/qd0flrb2W4EkjIKA+bdvw11KRjLGvBlxnG07M+HWNAHrww1kVK+uE6aLVfv8ggCHg+GkRbUMVnlNNQG4Uy+D57cRo7kaQG0yQi1hNUA== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22:33 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, 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 v3 13/19] MAINTAINERS: Add maintainer for i.MX8qxp Display Controller Date: Wed, 24 Jul 2024 17:29:44 +0800 Message-Id: <20240724092950.752536-14-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: f72cf498-e43c-48f7-d21c-08dcabc2265f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Al7oiawGJf5trzV7zStpH+qBxDabW6TIFnNHg4G21aYWyjTMeqoiwEUPzeRvBZLMHGRQfc55o6PzFzRvPNatASXFG9aMWojclXttmsd1J8e4C6N7ygZxxItMKA5/sHXJHwuJZNHQdhbQMZeKMH8DG+NCHCMdR63UCM2BtDhtoEYM/ZtxySoPKz2c4CniJ9QSr3ROXbKO4vqc0kcQhfGW/kwVXWyQUW3H55m/5PfqtHeQDpwm04gYjLNjmFNMZa+8t9nZhTuSgOsAkiOfkCEKW5amDXzq+nrfbPAAeXZn/rPJxiTXwaXaEuTnW7YBYU2KjU+oXzeXhmV5uCNHwkF19+8HTzJhF5OZKxSSzUKTuzRI8C9Nne3IkOL+82k/TXgl/wORUcvDVpJI0kRG1W5zn4hETq1L7sVBHw8phdYnkMto3hq7ukgZg8ULN6DZK3bCXkecF6MVKPZ6UmU/tNaXXPVvRNnhn+OaBhVcl+k/ddUo90Vg2QuMrxrYX4WJsua3k55uJBQiMjcYuiYw7eR3GzGBJinYy04Au5sKrBt/bQ0uWFKu1Cp9S1jW2OwWEo5cnxm/SdWhRSWHT222zKROzftRW1fow8ZlSuSZYexzNkGCMBrqy4sBNKsWmFO990MyalBhK8ZgkR3EW72lJjpXHymmHtjIHGo/TpNpc/CcBKWaBJT/uCeVJQ3nzrqVOAjyobwY88RemffYF55OjQsmB7AaSF2TBjBD2Qju+nHXcGUe+GYjnnRX7uFiSK4hOJskOUy7DKyA23nwegFdYVccOLlLr1zRpimDfcs3Dm9ArPC+cGD5wmUqfyrRvTMDn2xIa4SoMK48svvzW/K4QJW5HTtuthGXubl6XIgojlW4XwO10uE8dOATRt6DmQpxzTRPhabi3NNiW62buuowBt5RWSaxm2N30jvitieOdE6Bu39PfH2iWby7v9DEgBQ4fz+uzQ5ZvPzJw+du/9a3QDaqCkC4/SRwYiPwM/mipHXSdFriP//oRVSp8RqD+gkQCmDe2MNHn+AtB+8JS86FSsL9/DkX0Hy3pHRQ9B5D2wNoUvZb/CFURjACUxy5KbhhofgvtE2eKUJZ+lZAeB7VDiv3Ept10gwFnsq+oMRpvIMEO3mXbSu/CFEXMes0gzkXVWLXbTrK2co4jVUJ0WLNaMDCe/ziGtM+84wcRISpJ2l4x3WgH3Zb9G3yqd4EBZc00NzE7K3daUypv6wW/4gAjq8ODPA6G2sRJ+ASCTl52YstSgaf09f1VpEVtQpq3RoWLDj83EGtz5T8TcAd2LKR1HZHDNTs3jkQNlUi9HGLovDuZHyTDh0vP1UNINmmqUE8LUH/JD43nieb3yneN8OR1EAZqSiqOOJpFcvi9TOg5E1eBFY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CPPUWeJhb8rDP1gF1Ovrvn0e3NyaNRQrILNRSonyP6O6ynqGr8mblMvVBC2EcwV3UiYR1lOlbC8e6rtKDiO9bjOlIYMUntLG6A0IsI/MN7+ajHXj9nLa58bhAhOMwQk+7KIZWbaYA/Wi2ErmZiBqDMu7FWArP7I2RYRKHjs9cs/YdxdN4B1F5xyQvhNSjBItJuFOdxCQzsG+v6wbikCDbfLUJpH7K/s14PY65T2zQtpocNb0pizAKQqTTs0Aby3a80TkXbU0oBuzVXk179DxSeaWHqGWF8VXC0Uil1FgF9UleNQ9AA4pMrtDBkKbsbh7Tv75fib1haWF5W8kPRLr6dax0jTx1+ulZQZOHCopprucaHNfR47XfL4GKWPKBjB4gX+Fr2V15QDlgVmO9U0136rNA5B2h4eUYhn8Wz2OVnOnxpPMQ20beTn1V/flkmgePAQCel6z2fYhpAw5/aTF3pdmfLulWV//aJJNfMWyowt+Q3Ndf6o4ZYhCrzpPWu9BcbOMNuVrvILj5lBVbhXRlrr/YatB0kN/XUVhNoRu2uLr+sHqU4PguvNKjYwv5XusKuZxF9/+FNp+hNeYx4pBCfUa98w/OgH3LtK9smzf4LCuKd6+DH0xaubpH9MXUga6aJirV1uMHHEYuxhj74PzSWR/PAZDcZOE+hVv9FTxKC2rsdZ4iO78lqlxaQEKEJHy2b5JQJkAPc6SgXkQQ53fNdM8+Z0wzZrYDvQpx9A3ROdxPT8F4Slr0jEz00zH/8F/oYxNLki2cb7jXK+IKds6n7PTbYazSOy97GVnIpqKzEDMfckWWSWwf9kJVSMvJyeJMyTh+E/42BR34g00LmZIxcynjZv3EL1xfAfil9F+VcuG2QM3D0idLd214tUlKFvO8u8Z+ndz38cb/8bKkQ4GR3v4EfAjsshdQYcL3JyGZdMEAAQ8eX1iev5aEek3IE+zECV8gPYigj4q5+JW+13p93ETeiipvPbqc1MSGOPH+VBXIkS80mJgxcQyfUzLsFFO0KwBhMwo1zWmXM3ZAeyBKNIYunh4n3hPLVfdek6D5ZUPC+bQDOIDXIMR5vnkmZm/5uWqkASosKQnGh7/qR0jfg5n1gsHOP9kvk1Ds5Daw6gWcvS3B/s+E9ZoneBQYOBFPkmuCKVworBD96PCYD3DgMfTR1Og0QxIiPHucoiYhsFebAtyQxON5pkzpHpvLxs4ZHiwlBUQ4OKh+KEJCSyyjcZ1x5f2m4q3bdeBUa1aARo9r7pbewntTj5CVEF7rwFl2xxf0wlTuO3THumzChrnXDaCDj1nfdS4SENv11Oob9cISO3mE8Ym/3GCUgY1VAdM9C/VUrBBjsyrYWtA4SQpxFStGU4hBerawIOcNc7CvVz1kZ9YT7Lvzg2bhNagQOm7SB95ANUgb99o9nBOwbX5QXWrf6OMNNnM3JfPSXdsCOvxitAuVdzltAZ38zju+6lxsIomwAx5iRIeYuy0ZnibM2iKQ+2+VqFw8MAFttUo1yDW6/OrwdY3Z2WrUIzVY5t6ARbWL4545dpu/6fPu3TOcCnjZd4NqNzB4YY05hTH0Jey67QzjvIvZkpw0ZaIJNIS X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f72cf498-e43c-48f7-d21c-08dcabc2265f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:33.8692 (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: wGcI+GM/HpL3OtkiMZiUo674xnkqwh2YCyeSGiJg8lNX9F8DwToiZfze2c6QKJZA5Ay4p9CR1RrkyxDqP4Cnkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 Add myself as the maintainer of i.MX8qxp Display Controller. Signed-off-by: Liu Ying --- v3: * No change. v2: * Improve file list. (Frank) MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 10bd3f40a2f1..fa82fdd9bfef 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7490,6 +7490,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 Wed Jul 24 09:29:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740763 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012035.outbound.protection.outlook.com [52.101.66.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8D0F153BF0 for ; Wed, 24 Jul 2024 09:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.35 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812965; cv=fail; b=Hkg9djhis1ngzsSmNu5EM+ATNG1tB0de+tcPziaWCExb2NwHzYbGo0jCK1wTPPtruDpyk3plqt1hnirdEfGNMRROIsTFkCBEK2P7zwEh/v57YZFNTBJiWZgCYZ4al6Zk9Sx9+BPlvbp26SS526oewMv0SKFKWe3fa7QhkpQaQbQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812965; c=relaxed/simple; bh=PoWWGW5HIad6B/+ub2aEqjG+uraARTVxanu5+t3leb0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=nVSngQgV7GTEaV+ij3vukcOivzqaIVyMievcNpyNyxYIFGStd01HGEQgTMXWWci6Jza+WmeUyuuX5k+Y4Xh40zhGbKvfpHmfGgERsxhVQIWHwJnFsgbyUn1VqQ6V69AGlkZ0Z3vuPYFQfzHEGjLnkcv+3VzcivbSkekc/KhzDyo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=HCJKzIzS; arc=fail smtp.client-ip=52.101.66.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="HCJKzIzS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RrpJTzxQl/zyTVSm6GThK5CBDIPdgo/n6B7rBMHYR72kKpwpsQMZACh4zTbhKibneIsoC0Tc173tkwt53y1ScB99ci60Fk6m7vcFVpeBmfHW77dBiDSuIAx9k55o0PvoXW4BUM3bEyctIj+KpfOEYDs//rcDlScXtPiz3Abfmkyb+sWbmyxyMBQc0DXifVFAtdFFaOICABqtlAcv0B9YZKBCNLlXfXuctC7hFOqyCO2VdRv5tnm8oZBaar7i0j1MRYOoe1AW3R7tUWQFp/g/67FhWA8BFO3Z4Ard4Wx/NU5guMnOpWnVYNOqRcZCo94JFKK9q4YinLFHv5jst2LmUg== 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=wqhYdcyuvC7c2x7ZIghnTKseC9t4Nxgh/TY2WoAxIz4=; b=YAqetqoVmzwsoowFJWGXLOFHESfeVGcXPVeE0McIlBbocCMAsmtverhAV2pOOxqtA/gygfVa6U6XPbvQeHBbuLAY/lmwOWVujyinKH3suoSlBszFaDWDZ/aO+xD8hoMDmyx06HMyVIMFWCylmQ+fgpa3ov2Rx0yKchpiDKGQyoFIw7A9A3XQtURz44TczKj4QllNm3sl6/ZBVfwX5QbrzArg0c6+EwX5NTq2KfGNXV5H9ew5w4kS02PKY2DT82MNdeV/0opwfZIdhIWw9GX0uVGsqxv+JbZWlFVEqehuiyGGWj4BRsxkO1Nd4K1bKMR3majcFMfwlWzSJYQwpRWQZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wqhYdcyuvC7c2x7ZIghnTKseC9t4Nxgh/TY2WoAxIz4=; b=HCJKzIzSYYKyUKK56efsaSw1gh2ELOxS2ReTaGJMdXA65FuupK2ltrr1aGjF4NBK9xCfh71y32ojPllTk8qMmw+nQh7uP55q+QRGlJR7aipCyc93n9sMwTpLtiF2RZXRZyeC4kr1upzVSaBh2Q2iX9MXpF7sC1hhw6TU/vjUZhFJemN+kSRAVeb9jZ7gGf8YsfA4GtW/C/luVaaOhhJzD9W+158KqN6TerWkFFOoqlklHFMj46i7Aksi7lVhEMgVWxFSpLDRV6LlG4tDdECVVwAPhnn6vdBKbL7WZkK6AccK+oWR1P2OUjiwsQMPNlqR4rdDg26hQ5Dmoq0EMekoXA== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22:40 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, 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 v3 14/19] dt-bindings: phy: mixel,mipi-dsi-phy: Allow assigned-clock* properties Date: Wed, 24 Jul 2024 17:29:45 +0800 Message-Id: <20240724092950.752536-15-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: afb5db40-65a6-433c-c44b-08dcabc22a94 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: ARlJErijn1Ds2Cz7Em5u5jY4jhsu3SqfHBlHaQDnAamOPluM97CX1XpbQZE/MGywKCBMqJAusiLHeGdBPH0WI9jkyEDNu7VsuiLXyNiqrqZduBzOvKrLVFMpU2P/jxJmqCOYvQH/AzrsvSkCIH+qaAzOB9FhFUT9JBR5uRjgIht0PNlDyiXoVYdDuo4BHQWU05zMxPatBY+7h79K7W9xiW3AOUan3ju5sCU0oeI31ZFTL1XRIeRY/6uxLJf9rkuW140PElQTd8YkJkIMKzp2gZRXsm+VrbdP90pm/z7PFhdhcSk2RhECJvo5779k9aTUZORBLa8IMEmE6KPQWnEdk7jH5dM/U3DCKJlIr63+hpHynIWHA6wUmyeW3rTsmUMko1tPU5q/+1wr+t1dUCeEufSP2XJ8wLN4+zCjHqnbJhMAFkElx+FkzGybhWt6fANvJ8KVsScPfzcpeWHxJYPueueiQh/J+a4dAVaDVRiVIHriiRzsfGZnc7QP4m9fb6+IDQTM7X39dsKLSJHZBPxV9S01XVm65h6WBE17RSynWSqxpa5wb8pHOGcSncVZBp8NQyWmQu2/DxaEAiUF8Q4kSaM0XR1I7/UjkIAhc4eNlfLlKf8EN3Fo6nWEuPSB/xfn+tq2SW+Mk4jERQyQ+6mz7NVxeYcsqUdy0giZsbD+lOZPRwdseyEnBEfgydsTrV07ZyRGQCGS7rtYREZ6uiIV1IFGCoaqUweHzU8eqCY9xrH0hzs0v4uH17fZh9Kv/LbQeg1mIQh41lE+ZLmJAME3bTbVbAhtwX68HoyUF+ebhd0b5V7M1zW0sz8/PgWd2NiK9shHttDc8XXDavOdoWDWoZy/afBEcKSu4B1bx6XCQZm52sY+72hR/1y0CB2wXWNVDgqrfRqkuS5FEqdT+/UWJaVOvlv9x0inY3dMmzxLDG04NIq11JIbaqzag9TRgIzEkacoSMjC9dKwIGs5gw/TqE3QgbU/ogWYDSdkRI/C8Nh9/LSlhve3uTRtCUtcxVlo1qDBsEjc1w8eK/G0CEBkIuY/BLg7Ae52Bd4W6rIfQyzJ4UG5M2As7Skn9UjP2Hft4S+0uOFHr7GV+MwJbBkrdDcVLx0mmGdcw6ghQd/9sOjRAbj4VSPhEAVtGonYFDpOrkgaNL1d+JQV/qBqrnR/WQP01ya3vIfxaW2KzbNLeO3csNfcJIme5fY/TuX6GuLi1qDGYrHDH7L/VKHu2SQ0WAXH50hwLa/oAeLlRfOF7ffvXhYMNb+BBIWDHbv6eM7RTzjCMxcQP2f3wdQ/THiQ8/RLsPnyWKakPsoN5pCGXGcd/uWUo3/vc/an2nwTx57Z8hi+ZD/jTUnR/a+T5KtXwbMM5f9ydC3O6LLM1PwEr2Y63nUdQH1pACpWzDoxyftoYA8k493b8mVCo4po+FvrcQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bwyTDcV0uDpKZdaVoPqnI83fnyi4h19ggj67UF8Bc7x67TXyVgV3/2ZpM0LLGljsA1Y8R7aX4cAn0RN9m90GckkHhhb0qF/Pw2ykqJ1/8h6XIotumVLgbyRG4kyY6AAlit//kGt5NkOlTqHPl/fC1vfXPqaDMf8G21JH1Nhmpe01QWpIXMac1hc5mpPxlRN3eXjssrZNYJn3W3ZUUlaE+T3aBGjSPkFEL8RTgzlc9MwADvNO0olS8zKJ+fv8g+egL2TpcYT45aBHX12wOpK9h1XMOb8BDpebK+0rbxOxtNH/bI+hSGlocLyjJZSbTKomZnjYzeNyzKXXezdb4mBfwiiQh5IpfSO5e9q+v4mpCjtXSxxJTy57Xo2pwDQaOJ06B84dot3+xm91a0UDDieehROw123b9FeDlWKJFanIyupL6xbWLmFZe+3kwtsU+FRfI7GZbi82sogqJqz5lOFCTnTfxpMHO9Gbz9LM2uSMVSLQ9rbZpwyEtOFo/vupM4CNrjHY1nauyfb/KgUBLenf98HcfqUKE7YqrGq3VA7XGNOCx5ROiWEX1OE5UwnrtYzHFgHR4IvE+8wNIjS9/w/BGJGzpvL7CjEO28R5aInXpu7zExCKw7EKX3BfWxugzxoH4pqGGkPs5dOOhIYnAI97+trv+G1IsdCCe5rX2Wo74sYZScONx1fblVtF8y/H/XJcs6tkSzbn9sn5GxDcoYLoxo6CcBFeAsJv5igsNuMCHTbkpN/xqYrcQCzLZ6jzsIyYqD48xW7I5jiVzRsLg3xNMy+eFCyYj41TeFyyNeNoY+zAmBKCCWlld2f0BQh9cNuVuIx5CSWWveFqqe17TV4drpwHwL5/768EtzU/pR6EaV152nbix6bI/D57ltBbRsL2bErqYyiKlU30VX9hUpXwfnXYLIKRh7VmzhY2GjhOMOAVipPT864K3jiTzxRqO2URhRhzhX5FPZR2WSRzlbf3ZHG/0rx3drYZarRS6ABUOGEKhLeu5X5bOuFZ55Wm9UpVT1hWp1/8x9KRlk4vqX2En5AT2GB7wKtClx5UK4l6aH+GsMB1zwiK8AZs/73sS4uLkQ6/q6EFiDDdT3QXBB1IcxDziLOhFdWVfvK2900sVcW0Xp39O6guwr+4kYGDMMqc9VG4EmuseCRGgE45QA92KWZ4t0MyBZP9RpGISEIiMYHh9G9cpDB5fd7NgSUZ74ccJnP91z7u7izkClvKuOefC8SslcEUR65OPjpakHwZtmkG/89jkRUWYegNJWmOJA7NGvhaRYgiToWG7aw3/OCJhlpNaCramzbZfql0po1MZQrR5ibhr/WCmoK0QYfhflUj2rVSTFfU+LbPqX+aCuFrmwMFFI1lyle4LmQaQhyXf+qP+wQ6y7H1/QcPMoYR5eSjtRtzoJgIJMApq9JKCq+MyOgrN6sQVcV/ymTwqHDPYOuFZDNH4zZW+2AWlSUZPqmWK7oUyZD+k3bqYoHA9IKVS4Z9YXqX/G6K6SH95N+V8qK7rtNDOT2TLiMph3HBQAqY+Ro5wkK7a/LRgugqK+cVt0qu/3wTRGy2IpzmuQDkHhbcF7IikkSfjvYVWvulV4Vz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: afb5db40-65a6-433c-c44b-08dcabc22a94 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:40.9119 (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: Q7cFq9uqWdOMScv4s0e9JazGUrYOHvHhcjVf8SfvpXO2jbXu7g+vTDyxlHsKFHHOM7vGDBjGQEWyo+J2UQN7Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 assigned-clock* properties can be used by default now, so allow them. Signed-off-by: Liu Ying --- v3: * No change. v2: * New patch as needed by MIPI/LVDS subsystems device tree. .../devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml index 3c28ec50f097..286a4fcc977d 100644 --- a/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml +++ b/Documentation/devicetree/bindings/phy/mixel,mipi-dsi-phy.yaml @@ -72,11 +72,6 @@ allOf: contains: const: fsl,imx8qxp-mipi-dphy then: - properties: - assigned-clocks: false - assigned-clock-parents: false - assigned-clock-rates: false - required: - fsl,syscon From patchwork Wed Jul 24 09:29:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740764 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011015.outbound.protection.outlook.com [52.101.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B350152178 for ; Wed, 24 Jul 2024 09:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.15 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812972; cv=fail; b=gGQYx3joWMMm486R3Q0FwbkCm/YM+wabiS7c4+cLEMJOdYgeP34JI10mPHOWnFkWZcmXkuonMlnzhsXfKwlzMePSiaMmMWlBsy70jglTiRiMeJ7dkvveIdNX7+s+WhHgwQ4HD0VgN/NmwPH2LaS/Y3JDhxzzqT6BpsgcoScM0cM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812972; c=relaxed/simple; bh=tc5ptDOMqnzdhwOrEW7YbZsJ0ZWLcgsxHDzTrAwcGu4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=c/XT0k5frV9LO9OYN6YvMrZHQoka11OSXcyylVJk0kXhovbi+DL5v2S6uu0pv576E5rGZ9NJKnDJSq8i0uOarfzRse3JnPNFz9PhGGAU3ABNhmmXKc+uXWz6kKiD6Rj2/LTObDF6z4LEq5dA0JjUQ4D4ZN/BU3qb9gFPMX5lRv4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Mi9hybj2; arc=fail smtp.client-ip=52.101.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Mi9hybj2" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZrBMdgfSUVmBtKHG+JUB4UQ6EXdKnQHCgOSXBG77fylujkO4XmtweKmMVr4Vld8jo9WOE7IRx02kOqIh9ordlzDP0IENk/kEx7+eMHcw+eezZhQSmcMyyLO5aeK+CxHihALIlcUjbPN9M0rrEQRyk7YlO8MwRi1GrJthe9H75GqMj8wP6cWKBdZ/c1e26O+IYQQo+LSr3w+wRdL2Tv0sZxQZya4AyDOyk3k53ttBal39oi3ZrLUUKV9Huqa6riiEtnyTggWDFQkQlZJxrcYuKu5BCQOJ9dtc7dIIidw6bmzARLDFIlMN9B3KAp4HjXu7ydDd26JILB9ywrswq7BbEQ== 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=K/K+t5RR+X6GdzNPUTk3l2JUKm4Dj2+/7R9Mu2d3sI0=; b=tlCkLoK/X7XgulsfifSy5kEDnyXJWL0iuXuZOGt+nobx7sOgqk6qq+ZJZubha4JDbP1Vyw5X8Njd4RocUADEUqcBID6jYv+lI4ZJzAn3w78w3zbE0sc3rA3VWllqSeKIOIb0icbUKJ2efZlflu2abE6PBpXKkzV3++pDTpOI4FH6NWfrxpQLyOIS+QwtXjdaVBgsAknuMDCLGzHmgSAkusgzQfBdkX/YDbFLFZhJBY6iG8xqzs8NHF2u5CxAIanjBlFDHMo9Xp0c6uB1SXaStBmKmZFfbVZ+n/2LNcaBP8Gu0iyPLdG8dCrZmefOv1lHib5D/hkjrqhgY6D0jZSZuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K/K+t5RR+X6GdzNPUTk3l2JUKm4Dj2+/7R9Mu2d3sI0=; b=Mi9hybj2SmBvyBSpU1Fpr3Uccz4cV+x9NMwU4OjPQCSYkcZ04qcsu7XamWaJE/d89bSp4xJKte+yue3Qu3JbJR9ie7xc4kuL3CaKnhF5uRLLYKA/ECP7wTJR9ILM+FdD+1dxelp34hxkcynwL7kMh3PPbjb3DNlayuLIuoLkMnQHKrtNvV8TEejC8HVn36hcdId1l6dda+cu1CdxhiqbF6pmKKKDO7QUbdn/FCjQzL6gQ1D9M4YgdVAuhMkD0YF7b/UpYdcP0qVlOonNGGOKOmmVvR4r22bk1oGYeA1i7Ki+t5ue7xNI2biHgmOGRp756l0BVdq6tKgtU1nKdXQocg== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22: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: [DO NOT MERGE PATCH v3 15/19] dt-bindings: firmware: imx: Add SCU controlled display pixel link nodes Date: Wed, 24 Jul 2024 17:29:46 +0800 Message-Id: <20240724092950.752536-16-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c28d687-b4c3-4a7d-4d0e-08dcabc22f03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: xjWf8UcKR7pIKeGLZeJI95eoA911+XYhfKL60M27exMYMzb5ILxSVt1bljG/W/47aq4B85eFw2/NeaUVoBrX/ILkZ7vqBDmUAJ6JFDUfcTHYFggr5zRwSG+W3mu4tT0bba2BIXpso26kJiUSf6a1xxxpDShN/0PVE/ToZtWKhXvDFGznOfykLv7sy8I9yGvkyudl8L4YkEgAxp+LXK/lUWV81lio8+m8/X0R4Xef+24qzc3SCXUSd854y0pEColIFfTq/C3faOtwCNXbocXKNtW/sJ9pRbAPJlHao/ab5MoIQRwBJ/DdRwnXO0xiPxaNedl8mriXk43AWQZQajYs+gMxNqLJaNLwEC497AYu6T3WXSiZuymZAq48vrRMIWaoRI326EXst0M96T3hIPsb+IALs/u2pqzGr1eAY0A/WXL0gD3b7MlCrgkzpPp5GDSFRP2dH4L/E0EHY2UzlhoL18leVgHJpv0PKRoILqfc5PWzfg9w7MEQJ5VuPxrFdkHui/h8TvsWyDjKy3mpT8/RvkizjWh3jdEqo7kjrMzUBl0iHyZ5bM+sngbGqYYgW7m0otDZ879XeOV3wZxc1YVfV088eMbvv+PZLbi6s2i+Pj1al7Js31AEG+A5qXQQwCLolH+R+cDgvCbba0FiCYl9N2T8A72Opey/rJMXknciFN/pbVvYjSVV+Mx4At/8lbvxFRGyFXolSSSYbVUNscdtn4cAQVz/YoTxtI6JjFZVvheeJIWoIA0nWRxufFJ8R7o6g8/ZYzXKJR2n38m6vgXG7gqlgOOpbOzdpN2Rvb8q2mJL+8kgTWabyX/7BpnA9yoXX0VEtEQu0btqjXztjwM3v1HRF6jJkxgvdafk2v7PW/DbMRWget3Y+mMOXY4womda7lCTuHPo7zjLCY/9ybfO5uj5Tg5HF+o6GsviHL9kWpjn0lR4qnf1CohelXLtJEFQZS4Pzv5rx5DhkP/7HwZr8u5+Mer7FAvhBQO0SiDfe04fqhMMa5RykkeSA9TDPzbW9aHS8l2OL5IPmc5nTKT2jWc7b7Jwg/4bGXm/aoWOTVyXEDEw4c6elevVpeuyz9efQYEcO7mwFAXznj5OlhsWMgjNLYkwwUDoR2kIQgGD/ha7yFH8SUq5ylqpUKuGQ69xxyaTNkwVlUvthQHq06GbDDm2sdi1pSAL1LDz1TWoT4KhBi5JzLQaEPVaObLhLSqcq0GynE+hStY+FzROzlrjmujHX8U1Kt/uh36VJASlZDOrn95Eg0zFtgZKsaRgBGx39jV+DXc8QTkpgxKeL3+wH2vM36DU0IB1QMUxpNPXhrIFJ0B0Dl0p0eugsBwOyHqME330csSevYgRhSCqvq9yNgklT3O+EUMnglv9mtq+OarQItqRTBIZKkey0MHqI+Wz6q8Rd+0qG3TrXAPN2Kl9Bw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 833ie3kc4P71aJTKJt/4MnIoHGFCKtkiGqfWOcNfJEF5k1e0s+0RJiEA+x//pNLy/1x5F29CPd1ea1ka3JSs291WzydHNC0gn3ZC8cKv8HaSfFCojrwr7XyfCQv/YvHG9nVeEA2G4SnRATicGl4vAojs+O9fvZCUDHegXJ93CAeZ2DNCzuemeUOPJom1icAc5hlRWL0pN1bkkTNJdu4hpag5Pyicv8FM6H1PLhEHp0MnPPteNrdWviA5h5X7DH34Tdrx7gBmLKZnBAeldjJLIOEoKDm0SKiCpOPdBjt3gq5blP96oPQ4Jzl4c6wgA6boJYnDSmIteGtQ74Lh4Jrr0lnFVNVk6LB+TLhwScdr16qe/9rm6AiYvrCmi9xzjCDWrLMtJf0bO67YZcpwP4Ss4NndO7shGLAJ0dtmY0U+J/IqmYe28D1cKXQe6lkTOIOSMCZe5/9DS1He8rgLtXsBk9/0a/B1lAJ+0WmXhMjcB44fzAMoMR64egn4TLgZMzG/Gs+rFiliXdM26cAKICg2PuI9VyHH7qGMucDvyKhMH4X2pPgDjmYvPyWU5DEHzeTggilQW4zxkG1holjXRnyTGiKVIUf1dma+EPX69BjnAp5RkOKOFOUfbMGYK61PkMYeqIhJWPQucUSErCksBSf+GFiDSVvBH4lWbbdHw56KlLHDx+VHm60WYuH/hNPEUxKH0pr6f2cJ2kutYIyVo4OFn+lBVAXxOPTjNRytyQTu9mOTH9EHY4UVVhKdNc8XNtN6YSp7aJLlDAjs4MLgHOKAfsQToaQRKa0bqrnX+nn4Yc+fgl/Xf7xodpIdxjAegEEBotuxxP6ghsOlpB8sPiNjjflu/uWyeKfY/g5H6AZ5lyesWcKy3fRDf3GBhc2a78WuJvQJ4VPsTOEAYd6+ZEfXcbgT3mPVVQHj8VLgWooSdVKuWkcBzSICNjd2jIt3VL7pe2lfJAfb2+vIkCQQbJ+XoTLiVwJtlRxAlq0jNYLtQfRVndWlXU5HYzRRdY+8fgxewHupA/rI4KbSZ9u+1Yj+fkDLuvael2Jxv+mzpsmP6MDkBGwHSyNHDQubaKRQr4wq6AhjNOQbZHL/GSUf3subpL36x6G+n9Ng9AuzE9eADiP1DdlDxjEYbqgJzjQJltzNNEvtZaK/GxMN0iMK2/Xj9+x7TeLfEpjOz/8duRTQRM7sgTwGOexXDDX8ZD4aq8PmKw3K7LixPTnCRnqiwcvTwcKWBJaIBl4ZMVtpz2oGmdhMmYvfkcNTXYNG5gS+ou5mWn1ul/PmFrQMmz5vGdc44JKHYs2nXUsyZddrie0+9bDVVLAvwuptR25zSmlI7qoutycuydva2tTiiFfCA4/JYJmmEGLA+IUIwmyxp/f3Jd2VQ4glO5x7h35krqfX8BOfF9uY4oPL6beu8OHbguoknsnQJHwFHNZ7r8vCtrknJMPpaI0DDw8EVy8WlFSXOAxtycQBBVB1vd0STEzrP5ft5E49LQrwZJTKxkw858YOqG27I2S7flL5ZEMpF49XbdZKbDDhlBvb5RbJ5cTZFdWyEE0O/hrTsR8bm+jiuo0UcE7RHBLIhnR+3fVtBGeH3CUP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c28d687-b4c3-4a7d-4d0e-08dcabc22f03 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:48.2117 (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: enCmGDDOOQoxMUXhG5H2CV/phSN8Ga1ZfBlpG5a12/YTVHqRzBsz2fLkHNJIDyQ4ntrhsHj6svI5+eea2FVRMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 Document SCU controlled display pixel link child nodes. Signed-off-by: Liu Ying --- v3: * No change. v2: * New patch as needed by display controller subsystem device tree. .../devicetree/bindings/firmware/fsl,scu.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml index 557e524786c2..1a920f013ad2 100644 --- a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml +++ b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml @@ -30,6 +30,26 @@ properties: Clock controller node that provides the clocks controlled by the SCU $ref: /schemas/clock/fsl,scu-clk.yaml + dc0-pixel-link0: + description: + Display pixel link0 in display controller subsystem0 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc0-pixel-link1: + description: + Display pixel link1 in display controller subsystem0 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc1-pixel-link0: + description: + Display pixel link0 in display controller subsystem1 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + + dc1-pixel-link1: + description: + Display pixel link1 in display controller subsystem1 controlled by the SCU + $ref: /schemas/display/bridge/fsl,imx8qxp-pixel-link.yaml + gpio: description: Control the GPIO PINs on SCU domain over the firmware APIs From patchwork Wed Jul 24 09:29:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740765 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011032.outbound.protection.outlook.com [52.101.70.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28F2315383D for ; Wed, 24 Jul 2024 09:22:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812980; cv=fail; b=WaFW4g5rzAIORipIjNABqUJBFeohUJTj57/plBMG+kQ+0D+ykPsQmDJx80+fAW3KS6Cu+/hafnlnLVKwCUu2pEcttSvLl60PyKdfPBIMOMuxe7DENDHgfzbcZ9sEAI+LCNDqWCuQpMH7/MM8gcsHr/wKgcel7qdm0MX2vkQitmA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812980; c=relaxed/simple; bh=q1wYybIDxoyhD2dingtetvBBmGIf8FFpbww62+pAZfY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=MwlUdkU13P9uZyQnkYLZvnIf2W3YzCH5vAhkUDoFQZNu55Z0WrZYAzYocdC68UTsvccQe47IYL78lLku9PS3tfP0kdbOkPCZ+lyyp4FutUHqwYmNjK8HkYknJPy743UPiRKjC6H7pwsoSF0LY2C3VeVkTXSEjhFGXxHXVC6c9Og= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=A1fqPNEz; arc=fail smtp.client-ip=52.101.70.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="A1fqPNEz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rGDQupRDfuLPSpJZFVtS33ALI1kXb9ipKbcqsmNbonSqAlxoeQlhOh9TKjQJmCpqT0VWgzgSbs1/iAK3ZI9hoL8PYKYu3H6IObak/ImyciK+97qWgUgWdgMOzAPY/w+NJhZkazrNnQVwRIrXIlzr5qXwmc4rNa6wl6mJGLjiObbbHRTdNwnkMWB8CDyNyMUVXGojQI/t/zBzIrF8EyhTx6P62wd+E1tXtEFPf5GvwdvgETuFCob6g7E8gxaUe0QlkWoXlwBBj44T7DVIULTuU/eemOw6nnolsAlt2HRClYhRj64s3Vk743GaV7QuSS/X0PBx4002AS9JVVF4FEPjNA== 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=y1zJ++lLLfnng3kJIC53jnI9Qwm6t5pxCXAjpWe6Ffw=; b=MneMsPHIFNYUBzOum1xC3nl99yQJGqN56fV1Jjn3pxi/APB8tRqvfjSllgy5vtIdrZx6t3aCYRdCEWp4Zn5HM7UHo6KlxTX4aLHKl0EMaqx1AMkgqGzIbdkC5MbdpIW1pcU9o+8pnx4a77F7Hm9E9jaMvj93S79cpNQsmAt4m+SgjFntTCfhCHAUqgnD9Raj/uXg1P/caR7M8JrXEkP/wzLvqyf00YN8VwMivBd7vbzV0b5mMrxbKIPiCWFGcm5H1zHhsnKoAldEYaYlpVhfucdmim/+z24KdyBT+sJeFG1JEGifWrSipLjTw/kVe/lFSx9+Hk6yPOQwCCB9+2xU1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y1zJ++lLLfnng3kJIC53jnI9Qwm6t5pxCXAjpWe6Ffw=; b=A1fqPNEz2slVgkhKQTjmcvpXEg7FW1LGcaiu4aUgSS2c0pumknw5LrdAMh9wc0Ki5+fpenqMmvReVHfpgBAf1fD6y2Dtd1oS8BL46TgK77mcLBU/51mabm/LH4MzC0l2aIjk2R564shX4fr9gh4KGTjAPmlTn2TlTKuA5v6Q0waKikrw/6jfcII8I3BCedB9oQfxI7oCny7TtaYYqBunGMp0YEJ2M22X7VWSux45Rs5qxV7zDENbhGKWydoJsIez1+ms3SzgL/ZpMmuqfMiTht5yhp+/TSYtP07x/E6A44eTdpJJNsckpKcvb+Xr5qK/73i6SQ56ymoI3VjHSn90rQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:22: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.7784.017; Wed, 24 Jul 2024 09:22: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 v3 16/19] arm64: dts: imx8qxp: Add display controller subsystem Date: Wed, 24 Jul 2024 17:29:47 +0800 Message-Id: <20240724092950.752536-17-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c46d992-f31a-4611-b108-08dcabc2332a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 3vOuVXqYIHMweI+C0KRYQk5qEmWJHXEWX0b3F3ngyyhjZT2Y2A7DLNfiBH2c4oEgW8GGS2UmngHkdF6YG4nggb+VfXSI/YX/f1sTwKKrEyrcB2ZNAt1ZKbtIiadIXIx+84Npphdvg11/Q215fiwbH93G3LpOcO3peGNUGwFglbSfrJJhcKLfAIS6XH/VTzD/RJ7MFr24LOI9tMcyQsKXuTIBx8bUOFoGi+rBkNI6s7CIGQm0w5kXfKy5yZYD0gVj7AD/lyGeTeDki1o8C4T6j3dbu8IUm1eGJX3wZLKLyoxcZMNxlWsTmky34FFHLkt+RFlVuklrLV2K14dJ/ybXIQTsDZEL4QpFCcebYWy3OqofEhXJbrX9gP6KvvgWB0ytVm4Cag7252c4bMe5S4TCw9WkMU/zFge7Y7TDzKwT698Oe1yqzWxx2ixAdHqazdVMTy4Ph8kYk47U21bVOMGxDmcuy6yPiCO+TIWZb6LEgAwn/H62+vLGQMPeCuB4Oh7ZWCveWqQjiMxJTWMo5driM/1ISY95n9JCqk9/vJlB0pMK0i5xz8MdOdaxWFEPcL5ly2gnm3BFs5ViT44FHkN71+L/Ams3P9n3Yo6lHCd001UZkaG9Aq6BvCqgk6YpyzKI1DPrE2Masz6VSNqiTCLqreLLljPwT/3mMGTEpGTvO437rddBapDbvd6o0njGjoPTtc2EHL2s0jdezDrm2o4ZoEjYfCs2MgbTdj5FcxlgQ3Ax0N6qJdtdZlrG1wtf57Y1k8YE2MCE9eH0andn3m5bud3aWfeyyONMZtv2I7q6OnWLqhJpzy2ClSVF3NS4m7sLOARCOTz46LCnBtHsHxH8qxeGtT80DzIz9euqTZj/7j4hxZblLtDft/fcoJyXhXOhxfZI8NQgcZ88z6C9UJ1dssndE9lvehXLKAX/xZoxAk7Ep3DhTO+k6oJzovG4a+GKmna88naP1vStEnyBHz2GNW7oV8BxolCILoj0xJ71fYg8MClC/Z3VplIoW69/KNfQ/a/9KQ9txZyNoid/qxaIBDy5rWtuc20IdP4gBfszEW1dBSzvtNrHWdWDhnC3CRMXpWYZMpCMnxedskTSS7RC2T+MMD6nsVyDyNhjyideMkq9C7xWsN0/ycep6sjvyB92Wjzick0kv5pzPxCYnDYCqNs+fo7ohDpx7cQ/xnBH03t4wiaSNILt8mcgNVf/cQz5Gt1990i4IhJiYscxNRG5SGclF9uj60qNJiTJUwqrKmta8UQ1cnBZBOAsfgIMLCRaMgrYZKchvYoQqElUyZuWrc3vMdhzIVN+vel6Lh4kzbLPWjxspl40H+f9CPK6CzK7a5za7dIsmjZYR36B6VhqX62arWUsj0AZDRQSzF7c7GONSQo7JhSDyCz3NLOUydVPWsbM9U4MXjIhZXQrHoUfSA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TFzGwV7G9QWJolmTpmIqSDj9QGv/rCs6BmjzzQTmQNzhmzxl+Lx0/XZPrNPiImSydGAlFc2UmdyiPm9KYiAyt6S6HEgXad1WMjeFKmGsYUFIVEV16Mg7cOPHwgAYL26+gJuuwP6YnBluKdvFFY6f7JVyomCfY/WnC6scJLKM1dPhTaDdeimU0MATrjVwU04NrXoVhhBEMf8AN26+GKoVslTiWmJMiFvElZDz7XgBdts8JKSRAmWAdyHfi/D2qnfHdA/d3Sq0AaOXFEs1bEZbXqZjwCOOJVtPZRY2mt7W5wNCjB7UWiSXNe78mtDRZg7JTwXcxdi10ax+clPlXrnQctd56csF7kel5eDGmW+TdtyvAGr9S68A7uYYMxhWyx2QwSKdFO34C8+UH0rijQBjy46sCbu1fBGTeC/F9UEdbeSyB6Fyj42Rx/QHCuwFh2it1JIP3dji+gnMy89Ht212f44rbayahrMju/SQrZY7rQ94y7EnKDWGNUAO853/Sj0+OlRoMd9uSvuhmJmKQwqXrIx/gP9bscQnVro6v7T3qdSaQaWA7/cVGOiRMNC0tcw9mGkPcIa7rRJN2nb+EE78OLBnTwQ2NZ0xrVImmRyMep162uTYwKhuT9zUFodinmuGwaerLH/eQxYY14nzPvfhch1Un2T9DJDhAqb/upQFa8zc6TiZc2xQ27IE4shTNDdM/mKeuknRLhnvsPfTsvW2LGa6D36gNwA5mXIWuzx8tBDr1WnoX29MT7CIFZ7Tehy1SRUs65QxSMrdz+KbWJfehhuUvuGPC9s0OaEnCoVkBPYdAsWUUtr0iGkkL4Q12rLd7fyUmhjtDOLOd7+WeGQIf+UcSKPBKMZ+JNU+gi4v1so5zpBgRtJxgqTpvfPJuaWiLqeOV9hMIeWgkxE/h8ra0nN8N1+JKGhFkgXNYcr8KUB3mr7JDOLZl5FKhgJ4u8DhU73HUh5w4hi1XlIJYRE3xYKjsnazBpPtLFyt1quCUebJ+GISYgYmGAcFErJyjb5Kb19rNO4DB8Kr/VG/fVkWhSGha1FooCnaN3f38v32Syu2R0t8Z27qW0a021jgfcq0y859f8w1YHO1JzhcBURmsuElgSwDG2mmX3pVsawr+SsVyszptroEbz3nlQOc/QjtRKHRQv/aaPABA32WcKhKBfAc2Z0C7lTSQXV8VJtckqRhXDV946du137FBZ3AI9KY3dS6mJH+Msuimjncm1MLOecE48J+wAOtzx8iOOsVP0Jx/JmMJQHnjLPMxYC7sTaAjMOMr0LsQeQ5jbt/MZy+C1zkhTPCxxRuuaydpxd4zhLq+Kzaeurj4u9F/8yN8OFVa/XOYwtBXv3jOiELRTfD00ipTF09PmaPI8YE/jVABQEk423TLaN3VdK6tV4UTR1Vbom1ZCM4P08+1eGGq8gcAfzdmnsIGhd++ZqxQWS6AzBpECM+dnW+4l6uO+KKGRW8MBNUsRCMvbvNG9DGQngsj7lb0Q3PkJcymfevDP9jBtR86pbt7+SOvs1hRHP9LZGp6roLjo+q9fmHxdNJ4wej+lUNTiliTR7jSKIKLsvgdzwaxkBGYtRsDHCsv3w5UG2O X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c46d992-f31a-4611-b108-08dcabc2332a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:22:55.3061 (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: wrAGr8qEGvUdT+uFV8VpBaDC2nMFmXW5kXic5tk46gTmV0DsuiHVTldRecYddAYz9re84Dfv00BE+Gj0ON8qhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 Add display controller subsystem in i.MX8qxp SoC. Signed-off-by: Liu Ying --- v3: * No change. v2: * New patch. (Krzysztof) .../arm64/boot/dts/freescale/imx8-ss-dc0.dtsi | 408 ++++++++++++++++++ .../boot/dts/freescale/imx8qxp-ss-dc.dtsi | 236 ++++++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 25 +- 3 files changed, 668 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi new file mode 100644 index 000000000000..0db345204b89 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8-ss-dc0.dtsi @@ -0,0 +1,408 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include +#include + +dc0_axi_ext_clk: clock-dc0-axi-ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <800000000>; + clock-output-names = "dc0_axi_ext_clk"; +}; + +dc0_axi_int_clk: clock-dc0-axi-int { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <400000000>; + clock-output-names = "dc0_axi_int_clk"; +}; + +dc0_cfg_clk: clock-dc0-cfg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "dc0_cfg_clk"; +}; + +dc0_subsys: bus@56000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x56000000 0x0 0x56000000 0x1000000>; + + dc0_irqsteer: interrupt-controller@56000000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56000000 0x1000>; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + interrupts = , + , + , + , + , + , + , + ; + clocks = <&dc0_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <512>; + }; + + dc0_disp_lpcg: clock-controller@56010000 { + reg = <0x56010000 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_DC_0 IMX_SC_PM_CLK_MISC0>, + <&clk IMX_SC_R_DC_0 IMX_SC_PM_CLK_MISC1>; + clock-indices = , ; + clock-output-names = "dc0_disp0_lpcg_clk", "dc0_disp1_lpcg_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_lis_lpcg: clock-controller@56010004 { + reg = <0x56010004 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_disp_ctrl_link_mst0_lpcg: clock-controller@56010008 { + reg = <0x56010008 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_disp_ctrl_link_mst0_lpcg_msi_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_pixel_combiner_lpcg: clock-controller@56010010 { + reg = <0x56010010 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>; + clock-indices = ; + clock-output-names = "dc0_pixel_combiner_lpcg_apb_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_lpcg: clock-controller@56010014 { + reg = <0x56010014 0x4>; + #clock-cells = <1>; + clocks = <&dc0_cfg_clk>, <&dc0_axi_int_clk>; + clock-indices = , ; + clock-output-names = "dc0_lpcg_cfg_clk", + "dc0_lpcg_axi_clk"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; + + dc0_pc: pixel-combiner@56020000 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x56020000 0x10000>; + clocks = <&dc0_pixel_combiner_lpcg IMX_LPCG_CLK_4>; + clock-names = "apb"; + power-domains = <&pd IMX_SC_R_DC_0>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + status = "disabled"; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch0_dc0_disp0: endpoint { + remote-endpoint = <&dc0_disp0_dc0_pixel_combiner_ch0>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch0_dc0_pixel_link0: endpoint { + remote-endpoint = <&dc0_pixel_link0_dc0_pixel_combiner_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + port@0 { + reg = <0>; + + dc0_pixel_combiner_ch1_dc0_disp1: endpoint { + remote-endpoint = <&dc0_disp1_dc0_pixel_combiner_ch1>; + }; + }; + + port@1 { + reg = <1>; + + dc0_pixel_combiner_ch1_dc0_pixel_link1: endpoint { + remote-endpoint = <&dc0_pixel_link1_dc0_pixel_combiner_ch1>; + }; + }; + }; + }; + + dc0: display-controller@56180000 { + reg = <0x56180000 0x40000>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_4>; + power-domains = <&pd IMX_SC_R_DC_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + dc0_intc: interrupt-controller@56180040 { + reg = <0x56180040 0x60>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + interrupt-controller; + interrupt-parent = <&dc0_irqsteer>; + #interrupt-cells = <1>; + interrupts = <448>, <449>, <450>, <64>, + <65>, <66>, <67>, <68>, + <69>, <70>, <193>, <194>, + <195>, <196>, <197>, <72>, + <73>, <74>, <75>, <76>, + <77>, <78>, <79>, <80>, + <81>, <199>, <200>, <201>, + <202>, <203>, <204>, <205>, + <206>, <207>, <208>, <5>, + <0>, <1>, <2>, <3>, + <4>, <82>, <83>, <84>, + <85>, <209>, <210>, <211>, + <212>; + interrupt-names = "store9_shdload", + "store9_framecomplete", + "store9_seqcomplete", + "extdst0_shdload", + "extdst0_framecomplete", + "extdst0_seqcomplete", + "extdst4_shdload", + "extdst4_framecomplete", + "extdst4_seqcomplete", + "extdst1_shdload", + "extdst1_framecomplete", + "extdst1_seqcomplete", + "extdst5_shdload", + "extdst5_framecomplete", + "extdst5_seqcomplete", + "disengcfg_shdload0", + "disengcfg_framecomplete0", + "disengcfg_seqcomplete0", + "framegen0_int0", + "framegen0_int1", + "framegen0_int2", + "framegen0_int3", + "sig0_shdload", + "sig0_valid", + "sig0_error", + "disengcfg_shdload1", + "disengcfg_framecomplete1", + "disengcfg_seqcomplete1", + "framegen1_int0", + "framegen1_int1", + "framegen1_int2", + "framegen1_int3", + "sig1_shdload", + "sig1_valid", + "sig1_error", + "reserved", + "cmdseq_error", + "comctrl_sw0", + "comctrl_sw1", + "comctrl_sw2", + "comctrl_sw3", + "framegen0_primsync_on", + "framegen0_primsync_off", + "framegen0_secsync_on", + "framegen0_secsync_off", + "framegen1_primsync_on", + "framegen1_primsync_off", + "framegen1_secsync_on", + "framegen1_secsync_off"; + }; + + dc0_pixel_engine: pixel-engine@56180800 { + reg = <0x56180800 0xac00>; + clocks = <&dc0_lpcg IMX_LPCG_CLK_5>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_constframe0: constframe@56180960 { + reg = <0x56180960 0xc>, <0x56184400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst0: extdst@56180980 { + reg = <0x56180980 0x1c>, <0x56184800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <3>, <4>, <5>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe4: constframe@561809a0 { + reg = <0x561809a0 0xc>, <0x56184c00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst4: extdst@561809c0 { + reg = <0x561809c0 0x1c>, <0x56185000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <6>, <7>, <8>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe1: constframe@561809e0 { + reg = <0x561809e0 0xc>, <0x56185400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst1: extdst@56180a00 { + reg = <0x56180a00 0x1c>, <0x56185800 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <9>, <10>, <11>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_constframe5: constframe@56180a20 { + reg = <0x56180a20 0xc>, <0x56185c00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_extdst5: extdst@56180a40 { + reg = <0x56180a40 0x1c>, <0x56186000 0x28>; + reg-names = "pec", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <12>, <13>, <14>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + }; + + dc0_fetchwarp2: fetchwarp@56180a60 { + reg = <0x56180a60 0x10>, <0x56186400 0x190>; + reg-names = "pec", "cfg"; + }; + + dc0_fetchlayer0: fetchlayer@56180ac0 { + reg = <0x56180ac0 0xc>, <0x56188400 0x404>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend0: layerblend@56180ba0 { + reg = <0x56180ba0 0x10>, <0x5618a400 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend1: layerblend@56180bc0 { + reg = <0x56180bc0 0x10>, <0x5618a800 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend2: layerblend@56180be0 { + reg = <0x56180be0 0x10>, <0x5618ac00 0x20>; + reg-names = "pec", "cfg"; + }; + + dc0_layerblend3: layerblend@56180c00 { + reg = <0x56180c00 0x10>, <0x5618b000 0x20>; + reg-names = "pec", "cfg"; + }; + }; + + dc0_display_engine0: display-engine@5618b400 { + reg = <0x5618b400 0x14>, <0x5618b800 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <15>, <16>, <17>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_0>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_framegen0: framegen@5618b800 { + reg = <0x5618b800 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_0>; + interrupt-parent = <&dc0_intc>; + interrupts = <18>, <19>, <20>, <21>, + <41>, <42>, <43>, <44>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + dc0_tcon0: tcon@5618c800 { + reg = <0x5618c800 0x588>; + + port { + dc0_disp0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_disp0>; + }; + }; + }; + }; + + dc0_display_engine1: display-engine@5618b420 { + reg = <0x5618b420 0x14>, <0x5618d400 0x1c00>; + reg-names = "top", "cfg"; + interrupt-parent = <&dc0_intc>; + interrupts = <25>, <26>, <27>; + interrupt-names = "shdload", "framecomplete", "seqcomplete"; + power-domains = <&pd IMX_SC_R_DC_0_PLL_1>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + dc0_framegen1: framegen@5618d400 { + reg = <0x5618d400 0x98>; + clocks = <&dc0_disp_lpcg IMX_LPCG_CLK_1>; + interrupt-parent = <&dc0_intc>; + interrupts = <28>, <29>, <30>, <31>, + <45>, <46>, <47>, <48>; + interrupt-names = "int0", "int1", "int2", "int3", + "primsync_on", "primsync_off", + "secsync_on", "secsync_off"; + }; + + dc0_tcon1: tcon@5618e400 { + reg = <0x5618e400 0x588>; + + port { + dc0_disp1_dc0_pixel_combiner_ch1: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch1_dc0_disp1>; + }; + }; + }; + }; + }; + + dc0_pl_msi_bus: bus@56200000 { + reg = <0x56200000 0x100000>; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&dc0_irqsteer>; + interrupts = <320>; + ranges; + clocks = <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>, + <&dc0_disp_ctrl_link_mst0_lpcg IMX_LPCG_CLK_4>; + clock-names = "msi", "ahb"; + power-domains = <&pd IMX_SC_R_DC_0>; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi new file mode 100644 index 000000000000..299720d8c99e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +&dc0 { + compatible = "fsl,imx8qxp-dc"; +}; + +&dc0_constframe0 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_constframe1 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_constframe4 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_constframe5 { + compatible = "fsl,imx8qxp-dc-constframe"; +}; + +&dc0_disp_ctrl_link_mst0_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_disp_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_display_engine0 { + compatible = "fsl,imx8qxp-dc-display-engine"; +}; + +&dc0_display_engine1 { + compatible = "fsl,imx8qxp-dc-display-engine"; +}; + +&dc0_extdst0 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst1 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst4 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_extdst5 { + compatible = "fsl,imx8qxp-dc-extdst"; +}; + +&dc0_fetchlayer0 { + compatible = "fsl,imx8qxp-dc-fetchlayer"; +}; + +&dc0_fetchwarp2 { + compatible = "fsl,imx8qxp-dc-fetchwarp"; +}; + +&dc0_framegen0 { + compatible = "fsl,imx8qxp-dc-framegen"; +}; + +&dc0_framegen1 { + compatible = "fsl,imx8qxp-dc-framegen"; +}; + +&dc0_intc { + compatible = "fsl,imx8qxp-dc-intc"; +}; + +&dc0_layerblend0 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend1 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend2 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_layerblend3 { + compatible = "fsl,imx8qxp-dc-layerblend"; +}; + +&dc0_lis_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_pc { + compatible = "fsl,imx8qxp-pixel-combiner"; +}; + +&dc0_pixel_combiner_lpcg { + compatible = "fsl,imx8qxp-lpcg"; +}; + +&dc0_pixel_engine { + compatible = "fsl,imx8qxp-dc-pixel-engine"; +}; + +&dc0_pl_msi_bus { + compatible = "fsl,imx8qxp-display-pixel-link-msi-bus", "simple-pm-bus"; +}; + +&dc0_tcon0 { + compatible = "fsl,imx8qxp-dc-tcon"; +}; + +&dc0_tcon1 { + compatible = "fsl,imx8qxp-dc-tcon"; +}; + +&scu { + dc0_pixel_link0: dc0-pixel-link0 { + compatible = "fsl,imx8qxp-dc-pixel-link"; + fsl,dc-id = /bits/ 8 <0>; + fsl,dc-stream-id = /bits/ 8 <0>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* from dc0 pixel combiner channel0 */ + port@0 { + reg = <0>; + + dc0_pixel_link0_dc0_pixel_combiner_ch0: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch0_dc0_pixel_link0>; + }; + }; + + /* to PXL2DPIs in MIPI/LVDS combo subsystems */ + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + dc0_pixel_link0_mipi_lvds_0_pxl2dpi: endpoint@0 { + reg = <0>; + }; + + dc0_pixel_link0_mipi_lvds_1_pxl2dpi: endpoint@1 { + reg = <1>; + }; + }; + + /* unused */ + port@2 { + reg = <2>; + status = "disabled"; + }; + + /* unused */ + port@3 { + reg = <3>; + status = "disabled"; + }; + + /* to imaging subsystem */ + port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; + + dc0_pixel_link1: dc0-pixel-link1 { + compatible = "fsl,imx8qxp-dc-pixel-link"; + fsl,dc-id = /bits/ 8 <0>; + fsl,dc-stream-id = /bits/ 8 <1>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* from dc0 pixel combiner channel1 */ + port@0 { + reg = <0>; + + dc0_pixel_link1_dc0_pixel_combiner_ch1: endpoint { + remote-endpoint = <&dc0_pixel_combiner_ch1_dc0_pixel_link1>; + }; + }; + + /* to PXL2DPIs in MIPI/LVDS combo subsystems */ + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + status = "disabled"; + + dc0_pixel_link1_mipi_lvds_1_pxl2dpi: endpoint@0 { + reg = <0>; + }; + + dc0_pixel_link1_mipi_lvds_0_pxl2dpi: endpoint@1 { + reg = <1>; + }; + }; + + /* to parallel display interface in ADMA subsystem */ + port@2 { + reg = <2>; + status = "disabled"; + }; + + /* unused */ + port@3 { + reg = <3>; + status = "disabled"; + }; + + /* unused */ + port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 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 Wed Jul 24 09:29:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740766 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010028.outbound.protection.outlook.com [52.101.69.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 982301553BD for ; Wed, 24 Jul 2024 09:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812988; cv=fail; b=ppXAMTnjv27YL2vV/pDA+gzsUe3Qs16li6LmVOCQ7ydOBYKTo7qvJz7h3yZkwEA5TIdZty4t6y6uZeD6ffvg+wOp+UcY72Z/69giLGT05Ky82NmCHwaCyhYTIKjvfOoWNq1fvzt1v0VPekzbeEYa8A6C0ySz0wifljj0PQuFb1c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812988; c=relaxed/simple; bh=m2aYcF+c7DavSyC3puVZp2epSGFQ1xvilnqxfAMafRg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=hM4+7nSQgwcure35twNh5sce8ADBRpG4smW+zftD+jzc9Mb2vs0HoFaiWazP3K67N1mKlP7qBYpPrcNnXtcyLdxZkrnL3Kjblhagw6HPZSHpkG6dYLnwP6MAxatatvHckY2A8xS9NhwiIVr5/NJYcWQx4nkc4jih0Vo658dkp5Q= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=RIOiPjEt; arc=fail smtp.client-ip=52.101.69.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="RIOiPjEt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oTyfqcofBoU9Cebz4aoykoPpkRwtk9kovMAAf51k9vf477O6n/mJ1/2Lvjf88oESEFxbkl6tYhaQDBX/A9xw1D6JRODOPWAohsLqJDeU389aKpqum/KpyDzMzSO00q5oeZMhJUt5YsXYenib+daOWhqY9eIIAmKOWZ9WfsJyQGJf9jvFso5EiLf0qFAy3FPEMoEk+VkTfa21XR4q9Vr6KWdU2fMNvYrDHpykzhRhQOE4CfxwPKEW0qQ6ZZ3BkBNPH9/62DSBXYJEqIh2qkF4608UppHAKF4IPKfUw+i/7HoAfZCAzQ8uObYIOSnOeidlS7adxQSenZlhsPSVH6HO7w== 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=1iO4KTdHRWS9Ncrq51Mrgoq7w/eG8pXC6LZcgSS6xFE=; b=FJamp/p7PZq4kV52Pz6gpSD5HxlFnIdCDx4SdBsWD6URxg3ZD3A0qyR/g1+pFsrlv2/dcGUIEzv3oaos8Y0gO8LToqJKwLGW2maF/bBQFswxXRifAvo3gVSADpLbAQTHGDPcmv6IEAjvCZuFC8W7mwf3kE6HrYtLt/fwgFJHQJ0FGoa2ePNyEFRH2xc1d3GB+WjcIgKOsNzRkABRZ6LLjIVo7hSQ7v0JaYUzqy8+ypL6DSil3AJiqMhqSUTl/fQTwbEWwseiOOdvilP5uH0mN/mp3QkV0pwBXu8uEN1mgdjAv9YLjOx+1VM9oUynlraZkl/43W5E9TgUZ7prEAyTjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1iO4KTdHRWS9Ncrq51Mrgoq7w/eG8pXC6LZcgSS6xFE=; b=RIOiPjEtP5ymxE4qzncWjDE5Y0mb4Bb7nbq0RbWjUit+Gf+Bkrlp40a6/1m1m4myc82FXOdyy8SPCaNOtYvwZ+aD4iIYLNjAYPzm+8mDK87nE8w2km4ZzD/01qRyNuOzRiy6NxUDVsNMlSt3UnrtERImvRhVatrdJ9Z1WWnT8WVowAtrBSLyGYuqWC5BGCxunpHSso8xOFjKo4FYu92Jwt1PXt9AJBYb24lQswVsyoIW3r4iclvv60SqzfH5KMIRXP2yRZVnvqSYu+tnBTxHzuvHM3eSDud2Qmd6AecOMQmPAjjTkCNC8Q7XYb5fW02jZr1VUaAiocvDgxH+ra2P+w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:23: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.7784.017; Wed, 24 Jul 2024 09:23: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 v3 17/19] arm64: dts: imx8qxp: Add MIPI-LVDS combo subsystems Date: Wed, 24 Jul 2024 17:29:48 +0800 Message-Id: <20240724092950.752536-18-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: cd29818e-ecd4-42c4-f423-08dcabc2376d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: HOX0vKBhMQiutUW0fzNddV+8PWWwDrxqiXM6kU+bBm47aiJWhDMDoIl/zJSptnGBphj7KFmyZo5nXxTgzx50loc6WmTiV1fjNYTZk4fECZOvpSPLOjK/Ik0FqaH/p7dspCBKlCGtdk4UndJEaK5nUwSNTuODpU1xFnl42/Zg3eImTJxwok5plNvrvO2sH3ObYtENavSnXSalfUdsSD8+OeQ3fF6n8w/p/TlAAYwDQiaYssu/QD4usFMYMuW53/uOq5/x3C8PJDVOoMfSeSyYDGBqMiBFJZUOp3iqwL5611b32Z7VhRovteD3WtIOPdt8tQJ4E0LFK1oCLgHyvYbSOnUgUjR0aqqNliw7vZpnlph1/0I7UZbpQV40CdG1tKOT+hFocNJwBt83LLD41QJTuJS3MQMJF9eN3JTLbCVX0O9Qnb9iSKX7Xm6sy7PGxeWc969BuTq90lSvHaLrxsc40V2JcMphpMWzWCy5m0EayXnbnXjEbfp7I9fnt2aJRQozX62AVb1Yz/4ZjoVT1WdI9cZwvYEKBf7YRn2m/GlpIHahx0RfaCvAn/wcNF3LyupB9thkmfuxnm9sEgR+d2q4V521fWzH08l2ZqKj7sl3Ekn79hdf73vliH7iRXIF+LOeI2ldqGQCermb43J0erLppR5WBmvTwELBZw64j7qL9YlTi0HiqO8HLSBWezMsBMVN2iqGoeClakkMX5Exf7xiH7+p0fwUyRNBTtkKtKFuAHWDBgFVogMaTreI4i9vwQB1muf+WIV8ToWf855V997mq+eRSKwEBLmM5FEG1ux40tnUGvvVxIbLsE0pMTLXJU1G9MezkHCXgR3RE8BVmlTfNBBG0UU9COTPeYQ9gR5YcefHvrR/9oArXllLbhfU9ZlwyJQtnB7jbnUpAJxwWRkYqo80NuQiWCHYCkAAvhRykx7c9WXNYadi+ihA6QGpF+9sz2055LACBGL8ISg3VheXej/PX/BKLJNnjMwqeE29ZJSWLNMF98ts6+12QC944bb3KJxNlNzNRoFRYtbPFSOI2kKErJSLD+/xpc+NJC7Tz7xNAV5lC8hJ8lHAKZzItLdgCQAhJTIUzunVdx3mOOoTOYFo4zziwM2asJu4ZdSG/4oKwcydAC91LziMCgj7fz+ajG6B2BrQs5cUOI3PUqKns1KjsiMN38buZO9ZqO43CpBvE7p9QIRwYpdFaOlFYrhWm/SEpzsaKcJ2maYaxKJp/U+5D6HK4uAaD1yvPbK64YFRvi/0xySMMBRhNeQGDiCYF+ykzYnYe9KHUSqqku05ovp+ytXhr4lN/ssudJ0ARN0NQNgNT8p9eQHtUjUU/bnI185X+iwtYnnp68ENpDEqzjqgufzRVZuUZkBZUPmPNEJAp/WGhngpbM+QJ+lPrCAkFU1URp/yDHGjnd5FIuGIsw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RWABvWmbZRQfSRDJgMpzhdMTtUvm7jbjJFh3KVo2SXMQS3rLcpwYmcZQ/tRkbIp9WLZXCBHt+bg9Rh/JpS1Ziv/+GtslNtK4fWLfRQZFtWrwe5Luw4ZRaAOIZRroXnmqAI/GtJwlbKAi+RZO4KKrLosFovSLDEjLXviIxocpbH20nwc0R/DnrJsfUYXwVn8x3aZ+tRC9OOmpDp1MMmjt5j3NFsvWU7GEjMoQS0stZlU4IEL3rVauJxxj/JebyAgNlsG9mm66VtrQu87EH5V4s7QYTteJbAGXV294GntiQIgG7Pc48foCWHQfyZA7LhWLAzVkmQoYx85bXrFVlnMb/QXzreiSl6U7RV7LlTDYqp+vJC/QeybhTsz9Hp9f2Y8MoWT434IGyvvd0sbD95HtwlIsoatgO9BsOh5Wircv4VpoPprF9Fh6HNHk4Tpb6CwNXZP+n6MHZZolfLLvNUnKwypAk8Aabu/rOTMJRKlvuZXSs26JzStq8Unz49fOVWwGKVbGjlB9A+GPpZzpFIOA0AjYePLAloeO0BHHWsM1LytDj3kqNdt0o/jtUvWsj5hfVAbO4sc1vJRQ+KD/pz+CvStXsDSyYRvwyiiyiJHcx9p9MNciT+DvPASG+ag55NZGmTaHAM2QIhSN2AdEv3C9rJilYzA2hfGP48ujChBvCMr+bvWQlu1rKoxWnNlAjTzQL2N/eHvYh69tlFnrCH5OWXis5T9koo8m22WEPK6A6brpKMRB54vD+cJgH4i/tX0nb7TnGewDT15zjBRf0VSXks/BpKLNH6+VwTnFEbpvCJ4ppf1W4xuobAqJsRz4vE5WzndnAxKO24WXiVOtSuFu2ljd63GZD9SaoWlK6hmnSdooWFxyMlFOE6p7GmO7cpGMScMJmqUnq0+/S/27BwPeMKC4/4O/DrzJP6AZXquZ46LFg3wrHVm3CXj7JmNFvMNdqtsE1u9SvFFZmv9TloRYSEr93H5zqj55lbOZxJhPDAobQDxdS9kgVlSiSxbmO+3QnZqDVhcCI0FHSHQJar5oSgEzPkQe2NR9H4zwz5A26Ig9nllKwqEvKLadRNU0yviMvo8EOKbFMBjIMO1eIC+miRUATmLCFpFfL7rd89u+2Nh7Xp/QoNyoqblVg4yqAMl7Lp+Bqfa7ymzz/Qzv+mt1+GsE3uC4Gn3Wd9qcEQ7MOtWIpcUaHjxxhmqSlikK4Vgzd1oG8sAYcqzJFmAkmEztGEQZia9kL5ThDV4Z12jMEvx+MK8CGigXi+oT/g5UDbxOhT1JfwQDklGD/11vhS0EPOfZmKLLXVDsJcrJCuSEIuIQR/KZWrrGLy+3O7cwIZpeVWsKA7Zo8VTpNP/f39quRkJ3BtVH2OQGd1kveefxHvdJdbU/ovg2QKoTS5M4yJzprGJZ5LXbEYWRjvSJndyHK7KDGejHHFECdABixd4aDEqQfkslbMzoAXIdTIygNBeO9FREiGIpZmVUh3+OsT6pzsdvlADJu49ar5AXajyXCcyS2P5QzgeP/fkP8SM1k3zShdoS/BbyUiR8WRAp7qcZf1tIKUmVpD+PKfE/z9Dh4DFZgnEOOndo6Ttz3fhSa/L1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd29818e-ecd4-42c4-f423-08dcabc2376d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:23:02.4956 (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: ffYsvP1afGf/rDH98Kf84UurMCPVmYo+rTKE2LN4zOQdQwI2vtuOLa3Fx2Chj9Qft5gfCmadL0WavxpaqakJPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * New patch. (Francesco) .../boot/dts/freescale/imx8qxp-ss-dc.dtsi | 4 + .../dts/freescale/imx8qxp-ss-mipi-lvds.dtsi | 437 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 3 + 3 files changed, 444 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi index 299720d8c99e..94c46a20597c 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-dc.dtsi @@ -152,10 +152,12 @@ port@1 { dc0_pixel_link0_mipi_lvds_0_pxl2dpi: endpoint@0 { reg = <0>; + remote-endpoint = <&mipi_lvds_0_pxl2dpi_dc0_pixel_link0>; }; dc0_pixel_link0_mipi_lvds_1_pxl2dpi: endpoint@1 { reg = <1>; + remote-endpoint = <&mipi_lvds_1_pxl2dpi_dc0_pixel_link0>; }; }; @@ -207,10 +209,12 @@ port@1 { dc0_pixel_link1_mipi_lvds_1_pxl2dpi: endpoint@0 { reg = <0>; + remote-endpoint = <&mipi_lvds_1_pxl2dpi_dc0_pixel_link1>; }; dc0_pixel_link1_mipi_lvds_0_pxl2dpi: endpoint@1 { reg = <1>; + remote-endpoint = <&mipi_lvds_0_pxl2dpi_dc0_pixel_link1>; }; }; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi new file mode 100644 index 000000000000..fa7e7c33518e --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-mipi-lvds.dtsi @@ -0,0 +1,437 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 NXP + */ + +#include +#include + +/ { + mipi_lvds_0_ipg_clk: clock-mipi-lvds0-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <120000000>; + clock-output-names = "mipi_lvds_0_ipg_clk"; + }; + + mipi_lvds_1_ipg_clk: clock-mipi-lvds1-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <120000000>; + clock-output-names = "mipi_lvds_1_ipg_clk"; + }; +}; + +&dc0_pl_msi_bus { + mipi_lvds_0_irqsteer: interrupt-controller@56220000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56220000 0x1000>; + interrupts = ; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + clocks = <&mipi_lvds_0_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <32>; + }; + + mipi_lvds_0_csr: syscon@56221000 { + compatible = "fsl,imx8qxp-mipi-lvds-csr", "syscon", "simple-mfd"; + reg = <0x56221000 0x1000>; + clocks = <&mipi_lvds_0_di_mipi_lvds_regs_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + + mipi_lvds_0_pxl2dpi: pxl2dpi { + compatible = "fsl,imx8qxp-pxl2dpi"; + fsl,sc-resource = ; + power-domains = <&pd IMX_SC_R_MIPI_0>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + mipi_lvds_0_pxl2dpi_dc0_pixel_link0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dc0_pixel_link0_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_0_pxl2dpi_dc0_pixel_link1: endpoint@1 { + reg = <1>; + remote-endpoint = <&dc0_pixel_link1_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi>; + status = "disabled"; + }; + }; + }; + }; + + mipi_lvds_0_ldb: ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + assigned-clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_MISC2>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + power-domains = <&pd IMX_SC_R_LVDS_0>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch0_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_0_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_0_ldb_ch1_mipi_lvds_0_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_0_pxl2dpi_mipi_lvds_0_ldb_ch1>; + }; + }; + }; + }; + }; + + mipi_lvds_0_lis_lpcg: clock-controller@56223000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223000 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_0_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_0_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0>; + }; + + mipi_lvds_0_di_mipi_lvds_regs_lpcg: clock-controller@56223004 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223004 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_0_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_0_di_mipi_lvds_regs_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0>; + }; + + mipi_lvds_0_pwm_lpcg: clock-controller@5622300c { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5622300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_0_PWM_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_0_ipg_clk>, + <&mipi_lvds_0_ipg_clk>; + clock-indices = , + , + ; + clock-output-names = "mipi_lvds_0_pwm_lpcg_clk", + "mipi_lvds_0_pwm_lpcg_ipg_clk", + "mipi_lvds_0_pwm_lpcg_32k_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0_PWM_0>; + }; + + mipi_lvds_0_i2c0_lpcg: clock-controller@56223010 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56223010 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_0_I2C_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_0_ipg_clk>; + clock-indices = , + ; + clock-output-names = "mipi_lvds_0_i2c0_lpcg_clk", + "mipi_lvds_0_i2c0_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_0_I2C_0>; + }; + + mipi_lvds_0_pwm: pwm@56224000 { + compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm"; + reg = <0x56224000 0x1000>; + interrupt-parent = <&mipi_lvds_0_irqsteer>; + interrupts = <12>; + clocks = <&mipi_lvds_0_pwm_lpcg IMX_LPCG_CLK_4>, + <&mipi_lvds_0_pwm_lpcg IMX_LPCG_CLK_0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_MIPI_0_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <3>; + power-domains = <&pd IMX_SC_R_MIPI_0_PWM_0>; + status = "disabled"; + }; + + mipi_lvds_0_i2c0: i2c@56226000 { + compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x56226000 0x1000>; + interrupt-parent = <&mipi_lvds_0_irqsteer>; + interrupts = <8>; + clocks = <&mipi_lvds_0_i2c0_lpcg IMX_LPCG_CLK_0>, + <&mipi_lvds_0_i2c0_lpcg IMX_LPCG_CLK_4>; + clock-names = "per", "ipg"; + assigned-clocks = <&clk IMX_SC_R_MIPI_0_I2C_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + power-domains = <&pd IMX_SC_R_MIPI_0_I2C_0>; + status = "disabled"; + }; + + mipi_lvds_0_phy: phy@56228300 { + compatible = "fsl,imx8qxp-mipi-dphy"; + reg = <0x56228300 0x100>; + clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_PHY>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_PHY>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_0 IMX_SC_PM_CLK_BYPASS>; + #phy-cells = <0>; + fsl,syscon = <&mipi_lvds_0_csr>; + power-domains = <&pd IMX_SC_R_MIPI_0>; + status = "disabled"; + }; + + mipi_lvds_1_irqsteer: interrupt-controller@56240000 { + compatible = "fsl,imx-irqsteer"; + reg = <0x56240000 0x1000>; + interrupts = ; + interrupt-controller; + interrupt-parent = <&gic>; + #interrupt-cells = <1>; + clocks = <&mipi_lvds_1_lis_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + fsl,channel = <0>; + fsl,num-irqs = <32>; + }; + + mipi_lvds_1_csr: syscon@56241000 { + compatible = "fsl,imx8qxp-mipi-lvds-csr", "syscon", "simple-mfd"; + reg = <0x56241000 0x1000>; + clocks = <&mipi_lvds_1_di_mipi_lvds_regs_lpcg IMX_LPCG_CLK_4>; + clock-names = "ipg"; + + mipi_lvds_1_pxl2dpi: pxl2dpi { + compatible = "fsl,imx8qxp-pxl2dpi"; + fsl,sc-resource = ; + power-domains = <&pd IMX_SC_R_MIPI_1>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + mipi_lvds_1_pxl2dpi_dc0_pixel_link1: endpoint@0 { + reg = <0>; + remote-endpoint = <&dc0_pixel_link1_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_1_pxl2dpi_dc0_pixel_link0: endpoint@1 { + reg = <1>; + remote-endpoint = <&dc0_pixel_link0_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds_1_ldb_ch0_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + + mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch1: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_lvds_1_ldb_ch1_mipi_lvds_1_pxl2dpi>; + status = "disabled"; + }; + }; + }; + }; + + mipi_lvds_1_ldb: ldb { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx8qxp-ldb"; + clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_MISC2>, + <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + clock-names = "pixel", "bypass"; + assigned-clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_MISC2>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + power-domains = <&pd IMX_SC_R_LVDS_1>; + status = "disabled"; + + channel@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + phys = <&mipi_lvds_1_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_1_ldb_ch0_mipi_lvds_1_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch0>; + }; + }; + }; + + channel@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + phys = <&mipi_lvds_1_phy>; + phy-names = "lvds_phy"; + status = "disabled"; + + port@0 { + reg = <0>; + + mipi_lvds_1_ldb_ch1_mipi_lvds_1_pxl2dpi: endpoint { + remote-endpoint = <&mipi_lvds_1_pxl2dpi_mipi_lvds_1_ldb_ch1>; + }; + }; + }; + }; + }; + + mipi_lvds_1_lis_lpcg: clock-controller@56243000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243000 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_1_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_1_lis_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1>; + }; + + mipi_lvds_1_di_mipi_lvds_regs_lpcg: clock-controller@56243004 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243004 0x4>; + #clock-cells = <1>; + clocks = <&mipi_lvds_1_ipg_clk>; + clock-indices = ; + clock-output-names = "mipi_lvds_1_di_mipi_lvds_regs_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1>; + }; + + mipi_lvds_1_pwm_lpcg: clock-controller@5624300c { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5624300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_1_PWM_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_1_ipg_clk>, + <&mipi_lvds_1_ipg_clk>; + clock-indices = , + , + ; + clock-output-names = "mipi_lvds_1_pwm_lpcg_clk", + "mipi_lvds_1_pwm_lpcg_ipg_clk", + "mipi_lvds_1_pwm_lpcg_32k_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1_PWM_0>; + }; + + mipi_lvds_1_i2c0_lpcg: clock-controller@56243010 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x56243010 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_MIPI_1_I2C_0 IMX_SC_PM_CLK_PER>, + <&mipi_lvds_1_ipg_clk>; + clock-indices = , + ; + clock-output-names = "mipi_lvds_1_i2c0_lpcg_clk", + "mipi_lvds_1_i2c0_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_MIPI_1_I2C_0>; + }; + + mipi_lvds_1_pwm: pwm@56244000 { + compatible = "fsl,imx8qxp-pwm", "fsl,imx27-pwm"; + reg = <0x56244000 0x1000>; + interrupt-parent = <&mipi_lvds_1_irqsteer>; + interrupts = <12>; + clocks = <&mipi_lvds_1_pwm_lpcg IMX_LPCG_CLK_4>, + <&mipi_lvds_1_pwm_lpcg IMX_LPCG_CLK_0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_MIPI_1_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <3>; + power-domains = <&pd IMX_SC_R_MIPI_1_PWM_0>; + status = "disabled"; + }; + + mipi_lvds_1_i2c0: i2c@56246000 { + compatible = "fsl,imx8qxp-lpi2c", "fsl,imx7ulp-lpi2c"; + reg = <0x56246000 0x1000>; + interrupt-parent = <&mipi_lvds_1_irqsteer>; + interrupts = <8>; + clocks = <&mipi_lvds_1_i2c0_lpcg IMX_LPCG_CLK_0>, + <&mipi_lvds_1_i2c0_lpcg IMX_LPCG_CLK_4>; + clock-names = "per", "ipg"; + assigned-clocks = <&clk IMX_SC_R_MIPI_1_I2C_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + power-domains = <&pd IMX_SC_R_MIPI_1_I2C_0>; + status = "disabled"; + }; + + mipi_lvds_1_phy: phy@56248300 { + compatible = "fsl,imx8qxp-mipi-dphy"; + reg = <0x56248300 0x100>; + clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_PHY>; + clock-names = "phy_ref"; + assigned-clocks = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_PHY>; + assigned-clock-parents = <&clk IMX_SC_R_LVDS_1 IMX_SC_PM_CLK_BYPASS>; + #phy-cells = <0>; + fsl,syscon = <&mipi_lvds_1_csr>; + power-domains = <&pd IMX_SC_R_MIPI_1>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi index 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 Wed Jul 24 09:29:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740767 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011051.outbound.protection.outlook.com [52.101.70.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47034156F3B for ; Wed, 24 Jul 2024 09:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812993; cv=fail; b=WO1osUuq6C5fCJJ8kx6PDYrK6ISCyXs49EQqu1uWQMwAxAqQQLOH1s0yl4NDTsDKdR/TYV1ew20oFxFmP3+47L6OG9LxITZUWd52yL6WO5gACgwSeenZqbrqPhucdsrAlbpKKLuDyqOzJuxFWkCO4Cr4jZ6sW7wUViDlOaoC2U0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721812993; c=relaxed/simple; bh=HwpX2H5/waT+v77FfPi6R67zpLkm2txcrlzz1kvOefs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uDeJVp4vYazXweIyBp2v0uWxdzW1u2higAm5d1fEGHlg/i0+WHZdeYmnfIYvrbKv2hgzlgzM4LYiofr3OyR3or3IIvNhSIDuFQLACyb+xw7yT2z1UPZ75tfNFntR2wPzhvwsj636y6S6yA4mV+X6zCXj9VvKFr9MWKl1ibpMsys= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=VrLKj3nD; arc=fail smtp.client-ip=52.101.70.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="VrLKj3nD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lypJpjZbu2v996Y1SoEvaOFF6DYRn0PxSgLvee4VJ17onlL0nuIGRprowCbwSxQXlfSbLcI6ugKnKKODZ8h65lFtsAY2Yi6U3dVv6NyzgVh3TVoUl9YGfzZ8dUtCQKX8g0Ohb+bIrIbc59NA1FcR69JPGuDcC6NSFR+FxtUOJ8M76tL8y0X63fyTHVU62NlsDrmpYK+GP7oqYyaYhlNbkV4XVtdasuQ9YxSr/yak+qsT/UHCAW/RE1NMBTKDahi+9CUw9JPGrYyJqvh9B0Gsjo0Q5ClrN0AflsHPpz+pZ/nxnlLQWXwnyM4ASUechupxncg9mj1b7ZoktstuBXZuhQ== 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=4g/3EQftbQ33UVUEwnG9ChHdXobRT2beBoGetzCS+8Y=; b=HUvPRbzRdsCz70sZEzOP3aIQQuNWcV5SYPI6I1n6Nd/yRwarpP8JWZ/X5ka4MDuJsfLMoLLWn1PeCbYmFYKdD78+TvJnVIw9yFNdheYp1tyxjmb9x47joMhP65ipvV48KbwuLSu+KgRP8nQgIMUbQ6zo7UdKM6owy9k9zlR9dpSFnYSeAg+zS93p4oiqFaXNY9FsShoHugsd01i5CDOgWi0EHNMOqPDOyNbcLIrX2tt9u1J0VgMp/wEMuyieykXtSJHyZCXIoA860lwi2fViJeTVyTnG2fJxyZqGHX7Y+uMWHeiXkHSmxs0SuBi5CO0oB0Le4HLqjor/jadIdfizlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4g/3EQftbQ33UVUEwnG9ChHdXobRT2beBoGetzCS+8Y=; b=VrLKj3nDa4Z4xo9PX/d/f8Iqdk1kPZTJysUM56gpuj1QUewHX9Djn/iCpvAD/2hC+ccCBnZz0so6XsF+IwOdT4Ijv+pGdLO2oi+BkhS5PlfctQZlyvwgmc3BYLXl8uXlNEl4Yar8zQhlKg/VdnvUs87DF1jdlZnJmkQMvo7qlsRrHSPO+l0oGfG+EPM+6mE2h84BB9ptPjEJuzb9/cCzbVWN9EfyXmAUR0Cj3jokLrCHqyX3s5X45bYQFIowdRhnn2bNn5I93f4JAfWITfGPemIKAN522q8BbTrEXFrZ4pRrcSlPCcjKTQXxyRJCTzjGG2VPxxYlcvjXkKnuMHnrOQ== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:23: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.7784.017; Wed, 24 Jul 2024 09:23: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 v3 18/19] arm64: dts: imx8qxp-mek: Enable display controller Date: Wed, 24 Jul 2024 17:29:49 +0800 Message-Id: <20240724092950.752536-19-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 461076e3-859f-4d28-0fd3-08dcabc23bb7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: ZDM6UTVcetQwC0mTPhv6g/peKFXyqI9rdw/vnLyYbtNzZfPbwFiVRpC49fSYn5AV4wFi9xrqcWLe1HZOhr1DxKpNVADbcMEPMD3VNTgXz7k6LIzkkL7KhiscHrf0CDa3sPn3erAw/vVKp6M6NR/apnaO4s1t/2SS5qv6vtAe3byJ14plJACO5kEhL4XXhaKcSvafGuIALK/uHXpmbc0bsiUJJvknHsdVMuBbfz+EHI9wFmFtq4r1ge5OpfIuBQhfcZxRMLk1AdhA9YcCoGzkvt/2uLfQzOJGj87dUqp8BK3v+elkkUCw6vmCnMDRJ8Ks7/MkJwVczeiWiWltexwjqXZenGeORHyWfZ9LK7ktLKJsFPSCc/CmQbJixZ3ZZaZYrQjRS1g3Z/aCvZrVmsJWmKCVPXwLM5OwlALweGZKjLqKexpZ/D8rJCdRkrEcSHHo01pwwJ5gZP/9Cbt7X7f25UOdrGCbA9XFbwq9Nbm1eFrQe3AjRJtoOWal+3uVoP0KBgo0NCl/NEeWCPQZ1hZzDC8WDCrx5AZTsjptcqzOuQXWfbX0pOTNU12PBGdPOFPxSMAyOz16mIvgS4NUkYuFp4mJwB4U8dxdDpeeizJOBJTubHnto5RFlqUs8NfnqBzJrsmqC6dCXu2nrGWakd46qYUs38T4sD11JiEd5mZqHvxFik8aMOwS0Sh/E6PeZo1CsaWG2zW0OQWbqHeWABrhLCh6Y7k44zZFXYvIoQ0aEjwnkIgvuCMtrGzqpLM0I9HtdMRqwILn+8dbxphzjw6tttkOWxgys9euGlUN4vGEyZNilg6mvTGUMzDbXIqCSeKZpJxKOEeBW3FmbOxRW09jXBbaik5alKYkOKjnUfnnKAI5wEhEJIh5T85tiWHJwBte2uBmbenDv+AqgkLAOTBrACRkS3/2Td2lRRC8EQ23tanrSkucVlF9xcsBg3mJdB7AvCebE+4jHn/dRLz9OjduOvZwYIcWUt2WMGrBQgERFLsgNt1O8ho1c8OJaoPNXoc6ISlqifqxtOyAdBefLOeoYvG6ghzBD1oQmMQEJt4eGOnOjQRpohApN0AU4KySQJkh8yZo1shFYJA/RtPsr5Fouh1EznysIbHVD4zicUMzbeVZan9dK4LeUUeD2tOntjn9V9pCYadxsC7DlSp07aLrH/iQS++9OZGjx+gjZnyzlMbo+9LL9WrZJNIyT9SYHA2WYUC+CI9AGMJhahuLvN88NnCTkKyguJD0n8KWSVFpF9ZMaGV35Yyldp2V9OdgyIfZGXVkwGDnrWWPZXiYwUFj4HE96+liSXAIn1ECsXmQ17hwMhQlzdp77hEssRXL5pxeHMZl1fBz3QzW9a493IucSm6ZLczxwIfBAJVnXOocM3no7KXpQgSG+EEcL/bZtnlFZdIVf31GEcJN6kjPDwUpVw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T9JcgaVqyajiZ7RodzYEhRiEJmI8PSI+/z6uJ/c5clY39CUK1rCI9W2ufuIcbqo7rNUXYQwAesxDlDJf0IV4AcDLe+mpdNTe0hcKb/9khUSpglaftOQWJ5RzflnD5WHOK2+J8HW2SjNMsRmdmh/BDpRwIZjDDmbJ77w5Lg1NE/hUa8jz2dtC569T9hXDrGTmURfXbAJuzByZHfOQ4X1XdaEXFWSIdzrtzDAw+9zHkyAQXbIuNY3m32BZ9IAVo9KvdZusL4sxIDaZaVS5tRRIm0XXuLhEPzlJ+NLcyUTGMgD8AoSbl+NRiVYZ6Xf+rk3BroMesJWuyhSIQCHpoZymDnn0nElC4eXiVy4cX1RmVDQ1LcCJOp5OdHmA3hQeCcFFqe5O2I1fRU5Z3N8rf0gk3ywPO2m+immmx1w7X+nBygIFvjxsfih3/PzsuXOLR7eECxTY2tCttuPonSc3aAOHhsAlywwY+r8lZqGPcw1mwWqh5D+0uLRCuTyxRkSKszNa75Zorw/WScmzzEP8F7xAOV5U9MRZ77HaSXgWLNpRy7uNr/lXDm+VOgrrIdEvn0mCldFuu9vEVDoO3HhG9d9BT5t2kwjQqwNPn7b5mlDEh4CQvUcyshjcHIxUM3cUENNlTQ1dqeZJR3XXO7tbQOLp7Nd1Fta3ss5tnGl6STlK/hchmNvqu/mOTqiBbCC/P1cnyT3WcxCB6+q2O2EcuL0eac001ibA3li0mUC3lNM7eInyY87mQw/M5CjTVSuz4su4tdMtQ9wfLWwwPoz1Ee1/whvl7+wgDJ0k8gb9ycZxkOGiMgB5VeWjUkxmMLaaeV0rwP/jeDjqYUmBCdVMSU3k8UQC5VztmOvp3RIqbxAx8mBhvLsVGWo9hxrknVFJ++jREw3Mlb5EQF0ihFFVuSHabNEgPUwVKJWZnfkvE/oxyku462VBdOO4vPK+PZJ27rAYfzVxGfqgBO3arPAa4vxTZYdfSKtEhFfZ04l2W5DWNwdvk2Vzwt+dZDiSq9Ns7rA1chYR0KBqUk0X9Oe4AGQH3WXGHbOIdf1NLGW8exAjY5lYWiFahhkmWHEykXpHmiyF314OvRK1rZcTd8fqQINGlgXCKttdaU/YH7AKgFnpKK29NaZvl0cqzBEztJIcwL3o4DNlaVHJJXKiMk66KqixSh7M/zfaYfU4v1cR6uM/s4P8FbGetNT9nCsf9vJP9457V19SenOoHEbJbzHAhOnMXodGva3rUXySe+5pvHFIk5zIWp9G9vWQOUjnouRuI6sr0klkpyki3+7v+1H4Hm+/lhObcL0JcL41ZGIh7cNpBZ5CcmQWMq9rg9YObT82ux3UHvDawb89vuwRBY4KWzJR4pSyv1FsP6pJ9CU4LpYrDr7rgKA3JO5p4kQCH85rEAAXn2eexKHjDBdS8gVOd93nHNwO/ZpGGqBj1NoTU9FfrDznlHtYHQgjA2OtM/oY49v169+YJiDyKQAGfiAp2O8N9DpmUKHWnncV2nNlspEbUO1FBeARapI920SGp14OAIcKk3HAzogd+qMsNj2mG8PUrFpY/yds/A/iLk0T13rm5KvuoM1D3o2W4gldgEcKZbQQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 461076e3-859f-4d28-0fd3-08dcabc23bb7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:23:09.6789 (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: Nmfuo74IzYDxfNh1giY1spniM9VyBK1YM0SCwD8LHKFXxiGHW+The7Zv+c0iyd8/LSd3kNzsiQUSdf9NBHH7mQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 Enable display controller for i.MX8qxp MEK. Signed-off-by: Liu Ying --- v3: * No change. v2: * New patch. (Francesco) arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts b/arch/arm64/boot/dts/freescale/imx8qxp-mek.dts index 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 Wed Jul 24 09:29:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13740768 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011033.outbound.protection.outlook.com [52.101.70.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99E0F154C0E for ; Wed, 24 Jul 2024 09:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.33 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721813001; cv=fail; b=s0PkHy5b+5KAelHVJex2vKCrM4zjhbTPxzRRRVJrhVk0VyxmE36YXWMqujMeL0bRZQtW6GVu4dNpUZHJyja3Dby9rAgizrgwQb9X1cy72FSGermwIPNr1dJLYyygYfMlg2Px88jbEcTZnGVud2nyz5BEUJ7eMcLQXEFturv6OMk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721813001; c=relaxed/simple; bh=vtDN4ATE3W0eaVEzoPx4mNJhvOeFK1i8w8AG1cNhGzw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=En2BiuKesR1reEno9eOfDhphDy6YcFKIWHsROuQJQKd+2jkQegoREI1H1eUnM2eZ9iCj/5m6wLWboCj49qKEEhpIZd1JdirjK90rZOLqiZbCs3slAemQttMJSgdPDtPbtmiV+OD0uGq3s5fi8xfzDy31YsQIy9RQkEthsBhIxvc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Xcxbay4k; arc=fail smtp.client-ip=52.101.70.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Xcxbay4k" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YR4tBpujTNLnFZDxCNpAzOvPTfhO8TUI7w9JT2n1F3khDFcA7R2gL5Kolw39e1AVluxQtlDAQlKooyju+5Jcg5FajhRiMfbhyPeKhNUp8vlTLQnSYTQvPHeZ0a4WvvKZJrLGC5E5YUUp+DZvYBOO70PWUo5HHSScIvjzBpvOLwTYVh1VvBDRncA19umemqUrDpse2IUKh8EOso15NGrSwa5c+N0cD9c21irKR/5EPGhifz3vLucIRr/7Y+tbBxXlwzWrJp3MoB7IukZGGxn8tH80qpKW2BwAwf4v7iBI8sH/Y30Pa43y+hdOhWvwjK0J/rNaatqptRCKnZ4BSbWixQ== 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=SBBa73iOEpeyYXnXYEl1ZLmI23gcgfRor45cy0BuGes=; b=BbxEKrDo1L5wRPAMgvasqt4XEIM5ssKOff669zmQ5JiivkAG8L3AJN70+EVl1TB0rvyc/gxAQ2cvcT/T25BL5WTKnFeZNMJLcmYleyGRulmzLtfLUsqigvMxMpAa9BnVaq/w+/faEgeA0vdFRpyEhp26rID9LknjjKjIAQimpyBK979Wp4vDd9cYnJT23mWjdACXiY5v5JS8y22mai6ZcV3ol2Yc1EKZ+vlsaaAp+FwqhEQBjDonEdN76IujsZt0VaxRiVLR0IhDdWAV8rjpnmXHp748SdM0Okd4Zpg5C33z9ip7gSekykbkX9eFU3UUc/yIYHCj2fuF5LDMu3Y5xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SBBa73iOEpeyYXnXYEl1ZLmI23gcgfRor45cy0BuGes=; b=Xcxbay4kcnbLc+NO4ZXmoqsDSFuMg1rox1Kc454zU+UmoFaIVfjFjk/+dxUdgvEg1cf96JYgdQXuzGRSUxfhuknJlkc15YongIeh5itlWl+lzjTFf2s//pOPb2JVJNCNpJOonoKNG1GeYFI9PC8DnpIZxlHHdn3CjoySYs1kzYLwNC9ptsBMXQM40CpuCRA41JPcXkCUe47Kj0OEwdayTDVbTb8YOCoEKFTUzNAA7r4en7wHnRNKmAAnSkxEeQEhtxuori/Nopi8DOgQb0My7gSvC4WefdN8UjQ2iMP5X2p4a/J1TdgWEqnrauuqPKfvQEURDwpUC6IPEYZItXM1rg== 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 AS8PR04MB8040.eurprd04.prod.outlook.com (2603:10a6:20b:2a9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Wed, 24 Jul 2024 09:23:17 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%2]) with mapi id 15.20.7784.017; Wed, 24 Jul 2024 09:23:17 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, 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 v3 19/19] arm64: dts: imx8qxp-mek: Add MX8-DLVDS-LCD1 display module support Date: Wed, 24 Jul 2024 17:29:50 +0800 Message-Id: <20240724092950.752536-20-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240724092950.752536-1-victor.liu@nxp.com> References: <20240724092950.752536-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR01CA0193.apcprd01.prod.exchangelabs.com (2603:1096:4:189::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB8040:EE_ X-MS-Office365-Filtering-Correlation-Id: 4116b097-9e64-48d3-5525-08dcabc24027 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Jg3N6ytkG3NQqT2uezZ2kxXeJktaSMSzLB6jd2djZzEfTuE817rT2O/zzfjvaRg1XhgBAD8vTVnHD4bZ3LEh1bhurDV+29i5+l22S64iBOgRLvHvjSFPndHY/nspIvsrZSMRBhF8zldQybBzSp68wZf2AqlsDQjM0IVHpoifEPjnSQMstoAQ0KpR3v4TEH+hE0LFYYzKzX75QbkeIMb/cP9GStZmZf1xxqflTjvAVGL9qPfbqE/AMz+Kz7aCfhbn46A9OBtIB9ZZ+GBzef5PtS660qmYJduWGkPOh4tv1OYFqBmEh1J4GZVTUpq8izy8yHO3jaWVEsl4JGjMY7GUu3qRPGPfXxUHaDkKarvzyuP+SZ6P7yFGb5u8lQVwVYIDq85EtYrv7CgRQcFy67huTl/+xHMIdqLoLO+vaSgMyw2CR8jHrTRynb/+Z2i9NMAYil0M0aKMmNJhrmz+tODci7b0UeguZkeBIaJWSBa1cluKnyXzFGnHMctou/96lHZJrNbE8DO/nbMLZIk8/Q44Qlu7Y/G01Uk4HOZ2sVdS/c02z1biY2/p/tZverCi7PGfIz9MOqk1tjdx8wAl3W+Cwf8RrA6fcuSdG/yemXddlSzfoEFHdUQegPQ1afl74eBIrycwNuSps8MSZ3vxyRTTGLHakQ3jskobs1ozxMcUsjvkUbLo/8sYUso80JHiTs59abxGkdIw/h78eIo02zlpD1rLcbv5+wgk778x+7+zJOz64mx5Ix85qnD2yG2mncrjCF8B7kEGr874jeRY1pAugmj/P2V/8yvpeMFKHUr5kuV8bwzU8QqYz2JeI9bHhOwymPxl+NFl9rLnaJ1eKyAJ/d29ytkJ3LOqW8MyBOX2O9RdMJ3M1nrFeCUrBuBdcCREg2lSd6TgjiacY3FocpxjrOzmldxSAGYuETuZn3eNPhHZvfwpA7lGx4pjnAD3z6GRTfcgKic2zldJpgaDjKJKwOBuYW//ELrMN1EsBNKAOTL5yX7WzncuBFOOaj1iX0BvaCHQ/HxgVcR4wN3pDxSqdHtv55Fq4Nxs2ubR2Hj9UFQcmMB+lwEkIcPfpCdTRpOlfNj62PUffnyry3ETtNxqJ5BhbnlUDEqk5lh6Br+rbo7WKkx6qb6Ya5Gcs15iSpTmMzae9Z8F481T2g+VAfdeGoV0bpeYbPKj3dnp34olJAyX16ZzNXnNbUg/EKMA4EBjRd5k40EWDh16AuOrp0E0e/l7jk5ggL829ffyYh1f6HtEc4OsxEv6jTho6bbqdbUXumwQ151wmwz3B5uXQ1FqYnT8dHhcHGMQe7nwrT1w4OpKfgI3pMKB6JHJ8cYL44yjP4gl6xVwhYc2f2s/2EDppvhdfYloaW1WosSzR/eml+SOgxecoq9+Ph5Gtl2Qzj/dSLmzNHUtpWqhuKfEDhhogQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8L0slc3pbunPIsgybdBtDodk/F32LvbDX0izoVyQTPf5gAriHf1TP39rpVbBjFeckCzHrWoKWhvEt/3CuzaeWDKGiJK4jSJTVqGFvrC5tm4WCTP4ilF2eZPpqXkKbS1fvwB3FsqX8+c0PxBDC2hTcBwxKBfEbjItxiwuIIeDz+OWqvG6vg2bP0oVQx9JfYkKwEOG7TnOe9gNkqbEKaezbz5DB+ew6pJriS4ugddxF6ZnsZJ1JUYxyuLwY4FYObPDLXDUmB6n55BLvnOhTeyzrAGWHQVSCfDO9085CiWAgO9h37qeiOvQcMO8CrwRJ+OExftXKXoeeIV1vJe8O+4+0oBmup56HgRYb3eLKcha5gPfhjfoL767PS8hSauzshUVjj0zR1W4o+TFLLDMSrHMBnUIjhLmAk1GIKq9Ff3cWDqT56Cgdxe2wIcPVSrKwSgwPFFSR6krogvmCnyIaKFvwol8dAlI3kTBZtsITbLa7x0z2GQIsw2xocbWYPk+Xv+IDkl9uvUFYPml+iBO6e8r3UODyIUoO3LNZoP8kegdQ+KVG8N/g7PG91YDGYR5cLSFovyVyyxGU5dGCyjRX/iHWbzssh4xAY0CZfOXCiFj5H7wjqKHd+XZ7DKU73KBgB3s0DW2zF6MrTsAeY+bFvnKitag165/sCnSG4bvgMXNZzCV+niXxtRhNlo9vXms1YKJWnCfjKYOhHfyu0KMnxsvGPi3rR1xA1n2TU6F9SU0Na2eiVKvijHRNlSLC5KR0D3MXFhDaBxzpPebEEvfyZqh16hF+bCqNrBRL/Psn852H6zfD+afkOEQjTJMKD1X+cgPkrn6JCnx/FnazOpx+lgwjtKJQptabUYlmyx18sHV/1aZTGBBzGV+5W9SKhvVpeedmQH6M4/pE01itq6bIV0aTYRc+oGnnolWsqKtecYpTdLg2uCVcbib0s24BqqReW8DVCn6/k5WXxVlsljlDxzZF48m4xH/ByQ7slhsWrfHqnnpvx9Qckx+JBDx3Z4SBIh4mENvBfpwojSd6Xi9okvZmI2rlDS3nafuYwg+a7MYrRD4J21GqFovx7fHZfQ6dfqdQa712CQZ+1A8QLZ703SP7W9wTCdAtJ+BTuuM6whBbSRi/bZINT2lV42TtoaayBxuQX+3IAqp3/GC/pAzDoIE8XT3xjGB0gg48QdOkGR3wGApkh78DfyMhepd+VOpv05GeDRm3EFUN0dKiWkSqqVvkmoNbUVwVdl0YCBCzIxOzmWvf+smUKtX7Zo9UXBAq+WViSjCemeLoKur6EMCgE2FioV4cA/Du98PcJeIx9NHKM5VoyLhq8HbVEZNDar+zAvBzYVjuHBxixM08ZyLkZL6FdwCjnzqinYAPhEM0z+0NG6+LTX3toz4D/LsGfUneBsVUrpvvLPuINTGSnTSbv4Kl1XOZs5bqnG1/nvntLLF9j41bnmixFCNfumCTguX6kiv+6yftkE1sEnQP+dQm4UAud+BJiZjMbYfTXO3HM9g6rY63vRup9f8jMbwdDXdt+hjF9KSnBeLny6hX81YGf9kbnSrlFaSoyUQNXKUqDpqeiLP6Xhzsixa673fMwWVWvZ4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4116b097-9e64-48d3-5525-08dcabc24027 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2024 09:23:16.9787 (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: iE2hLPq+uGvg0tfNRNPJXRwpEssF2nGbfXX/w6KQY7wODG+Dl9eA5gFc/FYD3NzJJV76mQgz0o3u2pggxUmAIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8040 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 --- v3: * No change. v2: * New patch. (Francesco) arch/arm64/boot/dts/freescale/Makefile | 4 + .../imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso | 183 ++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 30 +++ 3 files changed, 217 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-mek-mx8-dlvds-lcd1-lvds0-odd.dtso diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 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