From patchwork Tue Aug 31 02:59:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12466319 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,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 A075AC432BE for ; Tue, 31 Aug 2021 03:03:52 +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 6398360FED for ; Tue, 31 Aug 2021 03:03:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6398360FED 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=C2giZgJn20ap8gqf8yoF16Civ69uEEocha4UB44vpMA=; b=0KdsUsEKbCnhfO S8d4txmXLnGn9nZsVeIZ1FO4V7EEZuqjjurWMhyOhMwX9uVvOApCiccxlTri/GuUDDlu+CdIfHnSf 7dr7fOBPPSxtDQKwgjrEF2RolRpgCQTKApCuszleRdiXHPQxNYyOWiLZq7QwkfKJxlCd2Jn0Q9aiD HcUlEfmK5KmvTR/lwKS/11V+i16zvr4kA2uLUBhJGerOnUj8t4kyR9R88HZ6D4JHnwdC5WZBjKtR2 rM3osa8QKzRSiSrrm7lJ27FpX1RaFv/wJVixnOW7AV1JpWfoJIhb+MW9GjEz4ioAAejtBgNQyVxhg WZCuV0BO6AMx2Hc6Y14w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKu0d-0012Pt-Vd; Tue, 31 Aug 2021 03:00:24 +0000 Received: from mail-eopbgr00067.outbound.protection.outlook.com ([40.107.0.67] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKu0O-0012Im-3q for linux-arm-kernel@lists.infradead.org; Tue, 31 Aug 2021 03:00:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQ4B4yBEq+jOpDfw8/HbdFZh/mwwH9mCeSVPKmJGXT7uH5x4DbI2yH7mn54WMFeCfyW0QfAYbXS5gPSvADzh9Ou2Z/cieMnLD4EYTV3fBeLb1FbtDlYH7X5haHiM8ChkKD9vZhDIjnzwb/A61wr8uiqL1rBXABv3KnSvs/jmj9imCdQzSIwjt+PCqCprcqJJqDpd4HrNsqY+POMCUMnc4tsjm8XPbbd8qpwm/BoT5VQmXvG4Pw0VV5j5N2+tGZhGYr/9coX++KPtKwlFsOuFzTfopTBeeXmb2pW0wIdIYKCy3XPe+ShQ3Y/zePnvlK5usr2aqwFaiEGmsvYDQUxbiA== 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=H3jpB7DdHmmFt71WplG37Ho65HeyNyanqan0uuBVEYg=; b=SQRlTiInpIpczRF3/RlTkZtSuM98Xb/6DbFlgB19siDJ678ZAnUmDLqzxy4HGDQT1ro8QKs+7c3PKN0tiaEJkMAEP7D+x+Ge32xlvw2+/4ZUAFv9hcI8pbr7fo0JVqkymvD0ebuhM1P85PZODVewJ9p6ZBLqIBde060lev+rqehrZ/TGd7XVoT7UtStild9GEQD6jUzTeoyI8eU6tuFqKlyWS56jb9jwZcTyiOiFpE46621yToSrUhSe1/YsTiXETW6osCuOMW+9TEjQLMR7rcSAxlvR6GM1YOPKxqMCsxdEh+g5nfF+YwS6Eh/GPWE1VXhc5bdk0REg+4nr/a0Zwg== 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=H3jpB7DdHmmFt71WplG37Ho65HeyNyanqan0uuBVEYg=; b=BZzt0kfxzlScg8eGCFMz1vS+iaJpJd54TOKRw8LJrjzijCKBuArClPZGkVTAGwvVtx0ApUAGEEw2fG9fVeY5a9hJ+QBN407sk7twzvTUxnqg1M/6YiHpNxnUx3foTpo078tyj2RfuSpsoY1NKPVBOuc+20TaAwQ3543qwNp9V4Q= 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 AM6PR04MB4888.eurprd04.prod.outlook.com (2603:10a6:20b:12::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Tue, 31 Aug 2021 03:00:00 +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.4457.024; Tue, 31 Aug 2021 03:00: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 v7 01/14] dt-bindings: media: imx8q: add imx video codec bindings Date: Tue, 31 Aug 2021 10:59:02 +0800 Message-Id: <74899fe01678641839be0eea7e3fd35214aad84c.1630377507.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-ClientProxiedBy: SG2PR06CA0203.apcprd06.prod.outlook.com (2603:1096:4:1::35) 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 SG2PR06CA0203.apcprd06.prod.outlook.com (2603:1096:4:1::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Tue, 31 Aug 2021 02:59:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1297c20-101f-46ab-e039-08d96c2b6be7 X-MS-TrafficTypeDiagnostic: AM6PR04MB4888: 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: JQZTwXPZcbjSAP6hmpHbeId869MNsfr5jv/3d07P38AccfrrtM3h/jWxuizupnLRNMc2tlDm8kG2iCjge1zbtxHKELCUtvv6wJOICz2ddpHZcoSiUXwSU34Rq764q0zjb4VawWTKS1tKdUpgAloxgfu40BoP82rPr+Q1T4ultS+K8PP25E/d9XduOva5Jszm4/dDKzqnd74+VOH7ZUp1MJR3ru8NQisYXxIJL65Lsza169EVTDSaA8wshnPx8ZQRSL/9LHGB6dMPfyLsuHn5ooLqsrT64VQ5Xlh4yvMkzsy6Jd5XfL5SehLbchzv11qiUKdbDJXFVTmD9wlSMkZN/54XMdr8PP9Vj6QZvh/pQsZRE/nf0Ox1YUqlljlWggg49NyOClK9Y86JGxEcABjtTHcGEA44KaIokKC6fFo3m46gLhxsqgXhrGcyjwGi9Qw8RV/SaSN2z+Lo44rxW9IeypIrYbu4zsYS+PvwAVxOGRtOvTJ/YKB4oKLcEEW1pUz31Ya3P0elTgzBNCuhvWN7VJZS3Jm/c3gz+xPrmxHcIgvB7vt+lr/2vHcJzN3lZ7CxQLRnYCda+Kf8g9X70h5xURp1bK0v+cX2zQuVuTLHkxD2GS0rBTccNNgIL12mmg24TNDFnk1zZxcV99ltNqpxB+uHdTPJLcD2NP0O41FuXitI4aNUC267vABvjjjDkl1Ip6why2+xo7mXawF00Cm8GkuJpnxb4eTN5CKGYnREWp1+kyQueOXV2Ca4+x6TCNYR9nIVVx1aeUnB6+l/9HigCh0rFTEnpP2swc/FVGdhYgFYjljICm8WKjRO0kdxmIZWnSt4ZFpQHodMk7iw6I/2+A== 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)(39860400002)(346002)(396003)(376002)(366004)(136003)(6486002)(36756003)(8676002)(2616005)(186003)(38350700002)(966005)(38100700002)(2906002)(5660300002)(8936002)(44832011)(6666004)(478600001)(956004)(26005)(7696005)(83380400001)(316002)(7416002)(66556008)(66476007)(66946007)(52116002)(86362001)(4326008)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yk9Wj1hoDzXZ9uLAtHIjqDFPhIWEDnqQj7b6xA9GM4sVkQ818BaXLH7ILhaOT6xro5q2fMI+jnCJubTGg3oKxKIf3C+O93ZzIaz2ddvkH+QDgX9f8dC1yPxCvV8kX61gSSVLJEQJ7a65eMRRw5c19vgPCoH2len9u1YIxy4AK4GCvsygmr/lKf6SeeGmrwAPEYibGQ9Odh1hlR6zeeGBPnSzasWxuVw6TjxPH8d9Qw418+xi/rlNe/1NdvkvzuMkCKbbg8G8z/9fysXnoKA4gjthI+hktCpxeH2lgWGU4DzUTlnL0Ut3gmEXq4MTNNRHEop0OQFdtnkJqAWf+sc00ViH8YcfMMFQEHN6PleRu0bXd6HR52Vjt7YpcNVuU7ncHDSAI1DrYQm6z7HjZtDA2pWBoWMDhYxYfy+P4EH7msAGnX7BQKjsfvBEFZOiPHIy+NSfKb/3c5nKc8ujq3cMM7wlbvuttboLCgRRBoCLncgaU5VT2+YNcFAavkf5ScfGoMAdj8QTiuwO4spyy7iPpYEaIEhRV3vBmOH/BwRLaC1SESsSoO7LK7A6bdSeoMbTGj5bFtzq5lAM+kSaeEqBeEMRss2ewxZKuG4sjgFb7Pargq1XtFbWXWoO/P3Rc1sS6AgYstNDV1f1wt15YkUmg2EBcaNFU3DcTkuNvJ625FDG9NApbk74VSxM7A5uLAr/6u76X8XHS8WhHmE1y/mhnUodNmmaxGKBr/+Z9+7GPh1SIqfY7XKKkYhUrZb70Ps6c763LRwwc24jaT6cL17TIYw2xU1Z0mVpWHXV7Z4xO2PwS9dAfSirkw5F4na8+LtwB7RbNvWQTMgLfEdoKuJD+pZEdp9Eoob9T20bCpjyKeMRb5T1rhUgH/eP5EgC9nZXQQUi2HMO8rzdOzidfqi4mXRe6jgzQVO1eZSzG3E4d5lvKlb8rTE1S32o9IHiXle3JYiZivWeVJQbMWPx+xZTK33WuwBiUwNRMPOj+e2QpDZl1Dly88bbt0vJGe2m9gbDCZEza3vf1StkxrT0UHrsw2EMLU1k4f6DY1B6lRtR3Ck+GYJgLJgdQc6U3Iu5pOB0jtSjFtiXm7Bq7/OBYTpePM5pWMBvW0IpWA3ZlcXwMJ51cfBPvidqXA+dhkAMJopC6FXU90giU1gGpbOqgN/t4hdlrvIG0uIpwhWs+EHWITOToaa9shB1QETXgbRir1KOhjzEXIPbXJix3Uk/k+VLE70yuAP1H4g9WhYQkj2ehv5Bo8MKrLtTPDH3uRENNDKbxltMuQyn1fcyLspjx/lyljr7F1Q/gpmXp+lyXFFF9vAHYjnyI8v5EHlVIvRk2FCH X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1297c20-101f-46ab-e039-08d96c2b6be7 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2021 03:00:00.1166 (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: ZsdoEifrK36gM1dldWSZQ/N1zykS0bM4g6yTnVPT7WlR+wI6gBnJVuafLgXL/ItivcuGtOHPdCjmLEUscAlAYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4888 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210830_200008_183304_B34DBAA1 X-CRM114-Status: GOOD ( 13.76 ) 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 Reviewed-by: Rob Herring --- .../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..04a040e5a9d1 --- /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: 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>; + }; + }; + +...