From patchwork Tue Jul 20 01:43:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12387263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E632FC07E95 for ; Tue, 20 Jul 2021 01:46:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3BAD610D2 for ; Tue, 20 Jul 2021 01:46:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3BAD610D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FX17YFlpEqgcLAUFevh2RZ56+VT5EGApTOFCbvIdhMs=; b=hqq59gIVVSTmqW OGWDABbLcy2qE4NM/iM8qFg2f97/wf6hX/zKG41AN9tdPa474KWtYebn00oahtPCSD2GuvWn+juRN 7BRgE7h+z6HSqeObUShXkWhYUtdayFm7pnXSzFrWzQcvNHbQieKxolX239Avb48DtloMjAg9yBJgV drnOqb4TqMSZ7/NgkDYdN2LcPjX/i9jhuddXPFb702bXlY43HnqWpyuslrSOq0+zTJya6/l1eN15M BLpa92KuefmefBftN+TsjysIGck7gXGyZHR52vc6XA0/OqJZaYG82eqXiQlrZN+Tiri+i0LFoUju4 8z92eFNPkiN4jtF+s3bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5eo4-00Babi-P2; Tue, 20 Jul 2021 01:44:25 +0000 Received: from mail-am6eur05on2075.outbound.protection.outlook.com ([40.107.22.75] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5eno-00BaWg-1q for linux-arm-kernel@lists.infradead.org; Tue, 20 Jul 2021 01:44:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grie0PPQd0u5+2cuEEJNomfafwAB9QG31/NaynFXRdi0DZR1gqVk+MKmqcqzn+lCenA3zveHPB9N3304Du/35wI2StKJv5Ez4jtGjLAgVMTgMUq/i6+4fyJvQlMHvJfpJAGZuQLBAEa5DCRZoMY3RvbK8bpOjDtT15OsFXwhJn/0opc+Jh0gmQFTphbQNV444iqfYnP63T2y++LzLl9Lae4dZwseMUg46v7f4TVabJpQdoYZewTLkwNVDm2AppIJdclp/pWj3rhWNq36rArZy1U4NoRX4RIBx6RLzlonYsHGpXcxrWl0DPMfj4Q46Ecph6GNsRopXPiTX0qM15lDnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AaRvTed0pYePY1JTRWBs7iJdPZA+VpJrhYoO9b08GGc=; b=KSKYoYgHYwx5L+3IK+g4EYNI9/T7gTs4yC/e+TMG/MDtH9l0Qz7Yvz+rM/xt3OT49cUr2BnTSBQ1J3X70fdT8H6Fw6CzI9btcAr71eojzhs/TR8mVFc7c70iT4QZw9kN/OkEnrn6kJrSzQuzjJG0xgLxyfZiceOhWxejKceY3pWsGvj9/gugFtkw64WUspTeiM96bKnyvPDUJqDX3djMoWkfO6+tQdzaJHSrWWqeBt4j2Zc/UPaKARErIpHtDEiFKKJxGc7y0HoieuxWwqgcSfh2GN+28ww/RGinPlxY/D3w4LzTvPd4BAgOonvhEOwZmdRrPJ9I6V2BusGDoGw7yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AaRvTed0pYePY1JTRWBs7iJdPZA+VpJrhYoO9b08GGc=; b=TRaxIwgWRvuF4QoxPMcCZAAMTfP6h8pG6Z3MyIf8pkENJ9Ib5mz9Wzx34rckGiTgxAq866y0cy59bzc0WcETot8vaENpmEpLeLJc8Ak4gnuxJkugJ5J2lOT7uyhMLyKvkuCmlw6/zBBk/f11S8Q3Bi5NzqFS3WwFq2Pv4MGt1jc= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by AM6PR0402MB3813.eurprd04.prod.outlook.com (2603:10a6:209:21::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Tue, 20 Jul 2021 01:44:00 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::81e3:1e06:83ee:5db8]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::81e3:1e06:83ee:5db8%3]) with mapi id 15.20.4331.034; Tue, 20 Jul 2021 01:44:00 +0000 From: Ming Qian To: mchehab@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de Cc: hverkuil-cisco@xs4all.nl, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 01/13] dt-bindings: media: imx8q: add imx video codec bindings Date: Tue, 20 Jul 2021 09:43:20 +0800 Message-Id: <5032168eca16a277cc8ba9e951073a37089c0eec.1626743758.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-ClientProxiedBy: SG2PR06CA0232.apcprd06.prod.outlook.com (2603:1096:4:ac::16) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv11149.swis.cn-sha01.nxp.com (119.31.174.70) by SG2PR06CA0232.apcprd06.prod.outlook.com (2603:1096:4:ac::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Tue, 20 Jul 2021 01:43:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ebb41e1-6279-4db3-3fc3-08d94b1fd8fd X-MS-TrafficTypeDiagnostic: AM6PR0402MB3813: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bPgWq5gL0le5pvEkgARrX+KEEbnxU+ekzNbldbTejSPBscYQL8SbrE1/t1cFNqYSxFZEdA9/jz9nn/LKhsoupNk+7wyVCXIr0ci7/zlaz19R5xZYpuuM3Kz0sIwaYozXuYHBTOatRlq+gkfnzoZ1W+G2gSy7v05iCMVWxhwP6w/gm+1bE5b2x3zgrijN8wsgvh/1X9uNwJnrDQHMkD41QKKgY7CEnqk+p1F15fWCl7I1Ox6bjoEOPLWmrZWIooQ1zde27gk2ah7e76BWrtqe26xuXSC5AARwumzWX3lYig5kL/yMM5E+d2yA3fbyqWAHHAU1R01W8GL2d7qjLpcDkO8dBDqMcgUb0xf0FERwF8QGho9UN+EmVh/7EGXRYnAP98GG+YjITFAroPEv+z4GJhJuRRoyaVw0IHfX1xMSNkdFXvyP1YN6nscFJbbNF8h3BHR/JpZejYzPWRuUA01oghtBZbhHwIhFT0rjsLvLCl3jLXQp+LM2fkZ/UYEwQAD/QidFYOdtZqczok+r8tHddwOb7BB8He5xXrkmUgfI4ZG6XPYkgNFkcv5BhGv8/cVyIzpKLpzS2UIAEdpyLsQS85Znb4dV+UB9SbjJlRvsUq5nwsGilLibdn0UVIKlSWGqllXcXHmHO+FuLgtv6omudKX/QO5MVFMwxuq5dLhC6eiUtbB8Fx8cHJQaIPEdudDKpRH28IV9CbkFulEZ/4JPGlRX7EDoNKOuHcjrmEDCDQwy6Tfi4ca2WKbtpyyf9QRRT9MtlCJujdnc9/RzeHs8iYr5HyWt6C9p7R1ipGgV1ymcu449MyuAit1b29nH2IQe5BrdGKmuIYRWqrP3Mifi4FNtxjKIMaHb+LGuIM80Y1o= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6341.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(36756003)(316002)(8676002)(7416002)(4326008)(86362001)(6666004)(186003)(66476007)(66946007)(66556008)(38100700002)(966005)(26005)(38350700002)(6486002)(83380400001)(508600001)(44832011)(5660300002)(956004)(2906002)(2616005)(8936002)(7696005)(52116002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rOuWIGDzmKOd376f5H9ZersSNhVthAzZ+H6Xz2NjtTYOJs5sm4QnGQ3c+j+ptQVY6c/UBZEmWyyaiIGSwoUXbw6V60NDlwCnFja+wjYjmDCtSIrKT4PpB6n0/wdMZ8fUnbXovuVVWn16XP+Ezlhb1VeuvIyw5aAuX0UTOzV5Mep1lYyBUDX1uWpa6GzawrUrd66ITgiamuIwW6PLKOHEQKJo3MonLBXSf0xiwb58CjrNX+O8M7nvKbH27i9Ko8dhW2qQA1czmc6IQCgaTTMYbWpn3XSqdqLOnzNXdNVrdaye68PQ1Oq6tYSb6/3ufBU8EXZYjrlf1A2ZQjk9wMWrQGDKfCtXQY+ihFWSsC+IkE+nCLcrCpU3SgfX1f7cXsr7MfpVZtaVdgheI900dHLS1QHuWFwa+BatyufqB2MtFm2ycpyamkSXBa6fcyIFN825ZQ0uOGJ6licRRG6KvAV4vNT7cKcKuFW36XTYNo+4X0nwOgY9riOCyPZbKRBeM0AK45CxU+yQuJLgHnzcvLEvR2PW42JTHywjKT4q2pzrIEpDr8p2g/6ZPFOUWEz6qu15W/C/++yqAJ7VreNt6a64m4LPVfDIBWjoIzU+1Lfn2ZDC6dWpuSnSZWu58nS2FM1ujD5qpjnhV+ypNf5XY40W+KMlcJOyaB+j6wj3fqdY97jReAehQvF14Hgov4aFtRMQfAm6WRXVfgf5wbuYjlKer5vSELVknjUdHuZYc6/WE8ZJOtg66q7MvxK/iYpgj8kaNfq5fmNDl9NxFGPlF6y9I/p3BDpqJ1iTX75zv68mEg0o8alkcZxo3+zj8LWVe5a9QVIHHzDKeVQeSk37MkQQ/SoQU8pGq5J0Ft9k5FYY+Gdq1ZLVq/NE4UeVuGx+aCXXJ4eUl+OR8zrHO2eA83Rib3AcOG4LG2oc3UA82zIBY70heoFmUBjiSgvY2U1rvIgBgA/gyGJtp3MYBvosolH/2HLq8brDmX10k41Bl4omBrCsb98q2V2NSbtACv5opCRC3pyBeROD4nJCpEiBOFaZ+36HlJw1W61oE9E6/SSclowpgUc6DmhKssRtaoNuLBLf2Ukmu1ljZ5xQ7916UvB7ZH3kLOHAV/KFCDzVWeI6tFTQXwLL4lGPa8uloDKGiFRxKWG4RfqctI40NLy4W4aOzOR0LRR2gHKPymkrXfHHBHsQMZ+YZM77Uajtw8IocVCGTD89tECmdXYnhvJH+APozlpk3GwS1z0+c1ie6nYJzfjlae8lwe3QbzSiug2qVhDXyXB0OdJeC7+W+0HI6D71WYyPr6vXnyBkYa3DhMMgOd2xPludiyKtegxpHZAR0vao X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ebb41e1-6279-4db3-3fc3-08d94b1fd8fd X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2021 01:44:00.8169 (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: LVM01SgF+yqpP3RTH4GgTyM0vLEjhZ6FzAA47owVBJnprX94USPG+fpHnRGVV2NHcGP+DuYI5DJa1iumXKhPLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3813 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_184408_109716_2DE783F8 X-CRM114-Status: GOOD ( 12.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add devicetree binding documentation for IMX8Q Video Processing Unit IP Signed-off-by: Ming Qian Signed-off-by: Shijie Qin Signed-off-by: Zhou Peng --- .../bindings/media/nxp,imx8q-vpu.yaml | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/nxp,imx8q-vpu.yaml diff --git a/Documentation/devicetree/bindings/media/nxp,imx8q-vpu.yaml b/Documentation/devicetree/bindings/media/nxp,imx8q-vpu.yaml new file mode 100644 index 000000000000..337c9bf2395f --- /dev/null +++ b/Documentation/devicetree/bindings/media/nxp,imx8q-vpu.yaml @@ -0,0 +1,178 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/nxp,imx8q-vpu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8Q video encode and decode accelerators + +maintainers: + - Ming Qian + - Shijie Qin + +description: |- + The Amphion MXC video encoder(Windsor) and decoder(Malone) accelerators present + on NXP i.MX8Q SoCs. + +properties: + $nodename: + pattern: "^vpu@[0-9a-f]+$" + + compatible: + oneOf: + - const: nxp,imx8qm-vpu + - const: nxp,imx8qxp-vpu + + reg: + maxItems: 1 + + power-domains: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^mailbox@[0-9a-f]+$": + description: + Each vpu encoder or decoder correspond a MU, which used for communication + between driver and firmware. Implement via mailbox on driver. + $ref: ../mailbox/fsl,mu.yaml# + + + "^vpu_core@[0-9a-f]+$": + description: + Each core correspond a decoder or encoder, need to configure them + separately. NXP i.MX8QM SoC has one decoder and two encoder, i.MX8QXP SoC + has one decoder and one encoder. + type: object + + properties: + compatible: + oneOf: + - const: nxp,imx8q-vpu-decoder + - const: nxp,imx8q-vpu-encoder + + reg: + maxItems: 1 + + power-domains: + maxItems: 1 + + mbox-names: + items: + - const: tx0 + - const: tx1 + - const: rx + + mboxes: + description: + List of phandle of 2 MU channels for tx, 1 MU channel for rx. + maxItems: 1 + + memory-region: + description: + Phandle to the reserved memory nodes to be associated with the + remoteproc device. The reserved memory nodes should be carveout nodes, + and should be defined as per the bindings in + Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt + items: + - description: region reserved for firmware image sections. + - description: region used for RPC shared memory between firmware and + driver. + + required: + - compatible + - reg + - power-domains + - mbox-names + - mboxes + - memory-region + + additionalProperties: false + +required: + - compatible + - reg + - power-domains + +additionalProperties: false + +examples: + # Device node example for i.MX8QM platform: + - | + #include + + vpu: vpu@2c000000 { + compatible = "nxp,imx8qm-vpu"; + ranges = <0x2c000000 0x2c000000 0x2000000>; + reg = <0x2c000000 0x1000000>; + #address-cells = <1>; + #size-cells = <1>; + power-domains = <&pd IMX_SC_R_VPU>; + + mu_m0: mailbox@2d000000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d000000 0x20000>; + interrupts = <0 472 4>; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_0>; + }; + + mu1_m0: mailbox@2d020000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d020000 0x20000>; + interrupts = <0 473 4>; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_1>; + }; + + mu2_m0: mailbox@2d040000 { + compatible = "fsl,imx6sx-mu"; + reg = <0x2d040000 0x20000>; + interrupts = <0 474 4>; + #mbox-cells = <2>; + power-domains = <&pd IMX_SC_R_VPU_MU_2>; + }; + + vpu_core0: vpu_core@2d080000 { + compatible = "nxp,imx8q-vpu-decoder"; + reg = <0x2d080000 0x10000>; + power-domains = <&pd IMX_SC_R_VPU_DEC_0>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu_m0 0 0 + &mu_m0 0 1 + &mu_m0 1 0>; + memory-region = <&decoder_boot>, <&decoder_rpc>; + }; + + vpu_core1: vpu_core@2d090000 { + compatible = "nxp,imx8q-vpu-encoder"; + reg = <0x2d090000 0x10000>; + power-domains = <&pd IMX_SC_R_VPU_ENC_0>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu1_m0 0 0 + &mu1_m0 0 1 + &mu1_m0 1 0>; + memory-region = <&encoder1_boot>, <&encoder1_rpc>; + }; + + vpu_core2: vpu_core@2d0a0000 { + reg = <0x2d0a0000 0x10000>; + compatible = "nxp,imx8q-vpu-encoder"; + power-domains = <&pd IMX_SC_R_VPU_ENC_1>; + mbox-names = "tx0", "tx1", "rx"; + mboxes = <&mu2_m0 0 0 + &mu2_m0 0 1 + &mu2_m0 1 0>; + memory-region = <&encoder2_boot>, <&encoder2_rpc>; + }; + }; + +...