From patchwork Mon Sep 13 09:11:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12488397 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=-17.1 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=unavailable 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 BB03DC433EF for ; Mon, 13 Sep 2021 09:15:01 +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 7DD3560FC1 for ; Mon, 13 Sep 2021 09:15:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7DD3560FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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=cvVx1hD33WZ6MOd9YYK4WRQ1eqfot0N1a9ZxAWN+tJg=; b=I6PiBP9N07aFYA wO1JHiBJwy6zhslDBYJ1Q4ojdLLAHzEiesDq1MIxf4uBRIoNeIE2nH4EhCZFL2Mumd3xwUmWzTena lIzolnzVxPRjLRY7jD063UD4QutaRyc38R6QWHu989OkGC0kKsATO3362kMJhiibg0Qb+Lix3r6oy 9Y/f9/BH3lfW58EPPUhI7vtTx1LnaBvTmEVcwxiacphc9CEJ0kOS5ylEEYyGSrY1v2flDBQ8j92Tv x15/zUvSNqvmoeYFL/I3YD/CGwmoATOS9W3bWwdZkPHfyTfLRvZZeqNP0ajhCvzyqThigbSAe7rac XjCO2sQloO6rEMeYMnjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPi0X-000z1l-1v; Mon, 13 Sep 2021 09:12:09 +0000 Received: from mail-eopbgr50058.outbound.protection.outlook.com ([40.107.5.58] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPi0H-000yx6-Ld for linux-arm-kernel@lists.infradead.org; Mon, 13 Sep 2021 09:11:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j5LugU41N02lwvjm/Mmbz/m3qto32k8BwIyOQaWhCZNi8/2bWnmcVT/7vkzPfgk/RVVejLXaRCbzi37IS+T3p6BsMqviJENVwPVnn6+tPktY6sBiLKGim0SHGV/ztRIwSNZ8nOGhdjTUrhwK5og9f+L5q/fnKPTdOTUjq9jjK69qfkNsiI6sJx5EjqyDWG25+wcCvCRIFWiExL72SHNts+f836osPOafvRJi3ZFfECtEzTzuhwHZvSvSOpivBRHNQUQblAbrgIHrT03AO2BF2LNLK0R9ITWAVXWmhy7QxdkNTt2DlQMkZfyJiyjBeZC5qV3/b68/+Dy75o66W7hqaQ== 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; bh=lCsLyNx8KxNDa53eOKDWrQuPJ0XhRG1kLKTAdMUIF/4=; b=lDQ2LxW97VVnEYjaDJm1OP4Wt1IMseelbOBQrHFreU/aYP0f1TfOnVa9IqyAO1P4YK75EncFj/4c1l+JukauLzY5thL7oGCkk+AVjfdSn+rF/uVl0LbAJJg3OFlbAHBgFqqLCX52yHo0LsKVTv5Pevn2o/XMRdI/ckR05cmg3WnazoIIlCVF6Et5mYHje8vCw5mF7Z46VMG8Kn/zGRxrpE1NiBbIv6GmUe/CUcf1n1xxiYNFTqLqz63u9C9JPOcjGjQGO4m1QcplZFEuLcXWKTpSG/WzkHPw9eij7HdCTwxwvgoGazKYUMkroCtpD22HCENcsMTvFpEZR8ULjRkd3Q== 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=lCsLyNx8KxNDa53eOKDWrQuPJ0XhRG1kLKTAdMUIF/4=; b=lmulyp0O/MDj5dt9iaCC3RJn0iFp4B443l8JqojP7s2z1n7MuypAuO+dj7dza0ocDy3ybOJ9VxeyFdv735e83E9VTojSgwYPnOH+umQTMuJQV3hZ9EXbK2zWsIkD/LKKx5lv65uvN9U+lo9HmxvZZiWYFlIkRFPms9XgXI9+YBA= 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 AM6PR04MB6134.eurprd04.prod.outlook.com (2603:10a6:20b:b6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Mon, 13 Sep 2021 09:11:48 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::998c:7f25:6d75:d5f4]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::998c:7f25:6d75:d5f4%7]) with mapi id 15.20.4500.018; Mon, 13 Sep 2021 09:11:48 +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 v9 01/13] dt-bindings: media: amphion: add amphion video codec bindings Date: Mon, 13 Sep 2021 17:11:03 +0800 Message-Id: <40ecffa8bcb7197b7bf0212ccf04e0698345596f.1631521295.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-ClientProxiedBy: SG2PR01CA0101.apcprd01.prod.exchangelabs.com (2603:1096:3:15::27) 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 SG2PR01CA0101.apcprd01.prod.exchangelabs.com (2603:1096:3:15::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16 via Frontend Transport; Mon, 13 Sep 2021 09:11:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a6daed78-c085-45f8-9bbb-08d9769683d3 X-MS-TrafficTypeDiagnostic: AM6PR04MB6134: 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: 1fS03Wju/T5ibdE0wjYirSwmq2W/HXKVmnQ5uK0SfnofQN3lX0Rk/R7aR32sC0ub1Z7EeScrRq523XzipH/L3ArxhZ1TQamm83QgXYstI5xtgdmUA2XTE5lTIYXltV2+7E/yUExZsi1girP1SCXQo3HkUHelsKa2NUFPr9lD6hUO8ewzZCZioOL90rFFGA0KbaGHd7tcMSs81hzvnsSt6uUXJfzdRTiX+UYPllRfNlS5E/hk75elCELKZBMtSweHCQS+QXcznG0KJY6FZLQ8YK0G55rC66aZdK8MpV0hx0aeX8b0dCkbz7gLbWg0eSkq43idrmbEpBr5Vp9bieWUC0s8sZH9tkrOf46Ii50KCvV+T7bxBJ7RndZIdnFxYZLuz4dZT9QXfoZS0VWfmcvs3dyHsZrgXKXvRZfrnA43oG3IavUEncmddKwkbVPJw/vSLIkXXS5GBmF/H7aGsJCMTX4tu3VdV6WJwk310Ta4kimqSea31vXz1uGuIz69Ed/tbzXtRsvtKbZakN5H6FPdjylgBCP31pCIoYjFLgHtq4PkWg48au0CDQ8X9iRmYllq1fMhrqTIx9x998rRZuG1XEsXAodm4T0pQSEbb/rFSWtaHn+kuUxeF0qsM5yzacjrMhZGPm9X8++1R2ifwokOCEcFN9y4BRZ58OJ62Yc90ayUthjidOkX4lR8W4Hs9iQLTB2bF4iDshDiRPP+49DBYjAVF5p3NgV5ju0MaRxe6crkmGQqR6LAAtoWwgTPc5gOHtmx8wcbbzBFyXRkMsfRqEZNH9STZgoFyg0hOuADGeTIfSjyW/Cxl0PcJpR1kaODeGrDCfvP6gWgAGccy4wCkg== 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)(136003)(346002)(376002)(39860400002)(366004)(396003)(38350700002)(36756003)(7696005)(52116002)(44832011)(86362001)(66476007)(66946007)(2616005)(7416002)(186003)(2906002)(956004)(478600001)(4326008)(8676002)(26005)(8936002)(83380400001)(966005)(6486002)(5660300002)(66556008)(316002)(38100700002)(6666004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eZZB2Ti7PEwBW2OmGBLPS/SgOTk8KVrvNWNpGtObK3ryNnA72IDLgtoGQBfR06lruDbK/FfGoTpStuZQGJSsYlArS+6iRRQ/an1siGMU6NCSR6p6Q4aJ8BDSOmYVw/TpTvBx3bHYUUDdZVy5rPj+NR5A0tPbOvQMJUAmP8VQGl90wHERr/gry7Kg3HzYJCoXMpA/8cIJXZbbhK9dhdAXK29A7VmFgTSYnF96iZfUlfjwtwCR/vPHbWmOhqEwSrk21Llm/0uDXNpRUp8u+jPcnhAKd/+F4KeQUhG4jjnhVAXAsvT9fkBIbBgZ63zfpZd3S7Bbhi2cWX16bMtFPpbv00UxWf5IbsSVEUTzAMbewHPKCLQ4c5Zc7fV2IwVZNJ1+AOqNf8TZyCCIgKNeBJGO4kGbDemueMURZo9o85HlUT2ezWkF/X73xGJs0RDAruyDsClfqLLcuE+V2ndndKdGnNUVG+LBnh44NU01YaRPIKy5OyPZuzscAmav68ioib1VxjC8/jXEURFp3vaQfwtWgUt1+guOA3nWU5hb5WJtzEBEbLkhM7QZZ2xHGT1N3KrSyFrCnJZsMEjs1O0+Kg5EhynpKUtYvi2oAFDiSPaEntDmT0P635gzfSUGfMyVu279IvJNnR+xuIEWDD+ScWNMTYUOesVc2f2iqa2o70oUnQQke46qiI+JR+teDheUuf2umT4gWGaqkvtQZ953UjsdPW5h4REKbtH5iUH02K5EaG+VWiQzMhEntxhqwU7Ah8hy25Tmo18vMuIfWh5JjvYZCI2BaJTm7CJ9rmV1tiF9P1Arycyup8yLGEIPiQQj9qaZK53gyvuV1uvLhzFj5BXV89LNe8UbpWXyDCR5R2KqcDwkUDyP+Q1S+lUHbF9NHRFrELZRqDc7WNb/8pLRRM1rCFqNpvFCeK4BCOo23TRUOKbK6LwTybOS6E2tJCZHIIpyutsdPLElNy6ldj0QNWw5xla7p9jAQaTaXOq6XtBhAmfm53DKHMMKzvpGUMNhh24qOrlb4RTLFo870Fcxm3yWfCWz5yruiObdi9PxMxSfFag1D/JuTud/rnU3OEUbl4LsoRjqoATjrYCJaHIFfdoQM6/cZr//S9ciBsq3AMlGt6wy3oKh1E2FFxt138AktSSzJsPsXKYVwXOuO7Lle7O7cKwEkcSVtmBumfCHz9T8mmk/UM4Jr0NkR8K4UNe8C00kcuYMz++kw9lWnfyOCeYWFtTupOOPKTk0RJhcmLnOQ5Lg9GiD4WyQRIkoKGJ3bvpuahygffUY2lUzqo2AUZI+ATS0qOgQG/m4IAniEvVSFQklcNen2weU1aAm3OPgV1Lc X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6daed78-c085-45f8-9bbb-08d9769683d3 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 09:11:48.0569 (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: K6rxV1bGlsTt8BOWHNjyF6poVwqh3UWyIwnMnozmqu5QK9ww6UU4nCVxfBx6vl5Ge++F1Y2clwLhU0xPNPdy6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB6134 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210913_021153_722138_A05BD1E6 X-CRM114-Status: GOOD ( 12.67 ) 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 | 178 ++++++++++++++++++ 1 file changed, 178 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..6d06b945bc8a --- /dev/null +++ b/Documentation/devicetree/bindings/media/amphion,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/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: + 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: 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>; + }; + }; + +...