From patchwork Tue Dec 7 08:24:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12695104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 515A6C433F5 for ; Tue, 7 Dec 2021 08:30:06 +0000 (UTC) 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=C/PbBKM1LFTqGKzJoVNthKQDTP2eLQ6Y9cJ38SjNWFs=; b=ig5BK27bX7YMn9 kVn7DdaZGSjhXBydy7OKHGqTQLyko39o6Yx+WL+QCCmMlfd3Bgo/PPnl5tr5RVwfuh+PV1wi4LF12 bZaDCgqjdiMQhUYHKIyw+kD4aoxBN8gw2f66Bs6dv4lf68pg3SVSdS2hNHLxAiEoPhwxKlrw55xxb 5TFR56+4xB/FOyt3hLJ9Uqr41voxd0h2Frgqd9JpUqdTJ04ESeJ5nVvl0DwD7E3HGXcgh3S3mm38I /0rvcC467PPhp5GAy5VV1JUpinC8j8j4JYUzfg4igtZkIxajW7MP3aqK9gqT6hmGV3kBSTUtgiIcP 4Dj+0tNaDnuAK3B7a/CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muVns-007V4P-GS; Tue, 07 Dec 2021 08:26:25 +0000 Received: from mail-eopbgr50088.outbound.protection.outlook.com ([40.107.5.88] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muVmi-007URD-3d for linux-arm-kernel@lists.infradead.org; Tue, 07 Dec 2021 08:25:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hcPvBIREa/H4ub6jmv2zSG6sJKmpEBtWchl0vYVP4slYOoMMeDybReqok8IzgC5Reu99mU1E1uXJGUlHN9D6yny/yCp2pTYlgbXs8d/pmNZoHhnlvVmidIY95Bneb8pZyPI99jeQD+SRCxFE0Ir17ftmgd8X3qkG4caeEqKW0hNX2pl0OU793zVoJAPtKxNL1myfliKVEAZpJgLGWcNbVvAnKGeo+z9Uaiv2zwlpHDg1zF9x6V8d9W0sdDjC6lzG0kvyne7J2EO7VS8ODTB8N/bgltRG6bRzElLmbINp0TEY/xbzrFX+o8ISk24nNr0tnU4i6Un47AyJkXRB2cJ/xg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hya/3bWzj54cTNXLhUWYF9C9ssgciYXjOVJTTdcei+0=; b=PxdxZFDL4hzgID/whCmkHl+CGaQbZWaprFWazNyr5KrRyeAZegqCKhSfUr2oCzicCnsbqu8mqIwCAUuZYxmfvMdrNRqmL1ElCIxGZMdbVDVMKLSojkJaxs4Rb8/o/C+7/L/WfwH5rCcBggktrLUYXusKxMgo+lX6XWvotBZKCA9acnExwvRsbzjdxK0kNw8jLpRd9vzjq9tc56UXA4nTP8sdsubmNnkB/YCtSrdDt3P+dLmryKH/P6lUQev8dCkrKdXOlBWbHzqNgFVN2R7AzR7CquZgAmMFt2PiBCZmq6DbE5ED5pP6jtpTxM6vw+gC99bbf9w4gRMuEwMZQFjcbg== 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=hya/3bWzj54cTNXLhUWYF9C9ssgciYXjOVJTTdcei+0=; b=TUejyQCaw8cpmS2/OGiENXlXJ30xX2lYNCN2jVOodEc+E/Z7ncDHIm2LutOfwv1coScKHiQ859HJr2cyqZjKwThIVhJ2J8zaBwi5TPldvHdyHQPuyM0koJz8DZimaHUd6/Uz3GOwvz0+XhdUGgKMP9rlGGXoYYMfzFzMUWNmVJI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by AM5PR04MB2978.eurprd04.prod.outlook.com (2603:10a6:206:5::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Tue, 7 Dec 2021 08:25:06 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::90c5:793:ee65:e316]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::90c5:793:ee65:e316%6]) with mapi id 15.20.4755.022; Tue, 7 Dec 2021 08:25:06 +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 v14 01/13] dt-bindings: media: amphion: add amphion video codec bindings Date: Tue, 7 Dec 2021 16:24:16 +0800 Message-Id: X-Mailer: git-send-email 2.33.0 In-Reply-To: References: X-ClientProxiedBy: SG2PR06CA0247.apcprd06.prod.outlook.com (2603:1096:4:ac::31) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 Received: from lsv11149.swis.cn-sha01.nxp.com (119.31.174.70) by SG2PR06CA0247.apcprd06.prod.outlook.com (2603:1096:4:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.17 via Frontend Transport; Tue, 7 Dec 2021 08:25:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64ef9cd2-cbce-4ec4-dacc-08d9b95b1344 X-MS-TrafficTypeDiagnostic: AM5PR04MB2978:EE_ 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: oA9pvMzXaXOpMIQMBObYAZnhtuAQ3POAwJlcllRyHWEfEiW7cfS3Vrib1nQTLTbqFW1/8p/w+CKVvU33pJtm6nCaMd8aryd5h7rMnrQdOWfVQOAaBqMWfai2rb06njU16nMd3L5UU9IqNhi9wlEOQXVnyj/pu4VZxjTVhFU0xKzhO6C8qSh2zPAMkQnLVx/bIQMv/eMqnvlrstfL+j2aBybzhrfNGTADL7D2Dp4lXbbiSKykY91cjh5Pczv/hzU+BDOnlnexpYbgr8D7gnAmGBhSeQsVSe6ZCs60a1rm4qHYEFGaE9wzLpnVOef4V5BsxKr9XK0M324fN0QlvEAoBck47WaUgt46iMTv5UNXptSCjaZ969hBzFG1VOd7y86cdocSTRtJRPPy+goSg45pgr5J5qUhqz1m0O5zjgxWn9ynIHF/V8vQG3ifvjnNGdgetDY1C9Jyp5WAy/vEpafP7CPZLEAOxKqjCD3GTqkcFdgYV27tOmzfudvBmZVLsWXeesLSga8TSHp5KCjPVCQIhktE6fT1EIFhhr6KCMGVMtJ3PMdDznB1/kOPmFB/ZK8aEvc9iLQhU1r8FbrMiC1sblOBnLLOvyfzdc1LrO2fDKFsgvcXa1y/TVllTV0L995S61wMI0fiM5N8LFoxCWUGY/vmc8GC2FIoK3s3SNxjoO4kqXL89wZmhC1kd0prvGArH5aMlNvPZ+MTQ0xAXxA/ugo3WzTLNQ21Wx7dXCCS8x1pcfRYbZvX73R0PXChhnhuyP59tnQKpZRS1ac+sjtOxUM0Fdm7j35iKtrfCa5zuUXBVbfD6ce7sYyRdlWzP3emoIgi5UZQxA1602gHQKiFkg== 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)(52116002)(7696005)(44832011)(6666004)(508600001)(966005)(316002)(5660300002)(7416002)(4326008)(8676002)(36756003)(956004)(38350700002)(38100700002)(186003)(2616005)(83380400001)(26005)(2906002)(66946007)(66476007)(8936002)(86362001)(6486002)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2Sng9Nt5goRuoH94TLlCnSGOnsglPg3npgfzPM83DgO13hnOjrUbDkNEVImkkpg4u9vxx00DmahO6IXdeiMz4xfWfLGEsB99oYiydmqo/S/T52EFA6m3pbchV8AcKHBhHgpwMhYbhMamzF/qA64yzrwDoas5mNj+9Dj4l+TgLViNHID4IMQHWxw9CSNb5Wln+b5vZpu4wrMbMh8jqt28yHaoraWiMoY1E89IsNI3LKnrHkV5PJdJrV0fH2jDn2Q+ist9ILtc7YLhOY2T2fz2eDy3GZjHjezLZGi/kgZWYCVjzu66JoWqRwnycTYE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giFjaqCAlj/Qm/8UV/jrGgCJsCMl5fzhLNEqcvu83CB1zm2vvFQf8n46hnU48g+yv4rNYp24liljWKktjYw6BGxJJNodX33eEsVKMocoU7X9tfvAo7lk2LcXoApo1tQtSTdLA3ms1Jio1tFs6pkj/MVqXw+4lyyPEmVFqWjUsb2xlbzpy2HeMVYUVVWUwYHLCnIy52y2Opgk+tbZB8c1x1gbSSLL6odDN9SyhmGbLxijLWmUlgrKY= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64ef9cd2-cbce-4ec4-dacc-08d9b95b1344 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2021 08:25:06.8109 (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: ambDjxhoqWGUR2ic3Ai/k81ngdM8L5fRWlJAPFNNAfe9uBzQgq/CUv13Z9FgKLpvAyPojXxdIQTZJpI5PRnXEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB2978 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_002512_195444_1F5A5960 X-CRM114-Status: GOOD ( 12.82 ) 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 amphion Video Processing Unit IP presents on NXP i.MX8Q Signed-off-by: Ming Qian Signed-off-by: Shijie Qin Signed-off-by: Zhou Peng Reviewed-by: Rob Herring --- .../bindings/media/amphion,vpu.yaml | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/amphion,vpu.yaml diff --git a/Documentation/devicetree/bindings/media/amphion,vpu.yaml b/Documentation/devicetree/bindings/media/amphion,vpu.yaml new file mode 100644 index 000000000000..a9d80eaeeeb6 --- /dev/null +++ b/Documentation/devicetree/bindings/media/amphion,vpu.yaml @@ -0,0 +1,180 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/amphion,vpu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amphion VPU codec IP + +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: + items: + - enum: + - nxp,imx8qm-vpu + - 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: + items: + - enum: + - nxp,imx8q-vpu-decoder + - 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: 3 + + 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>; + }; + }; + +...