From patchwork Tue Jan 25 07:11:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 12723391 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 63EF3C433F5 for ; Tue, 25 Jan 2022 07:32:19 +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=XsE9/D/6GRpfvW T6v/iUneBZiYsAJJ3KPB1D4DJ/wdKGMRgMJH+y4qC8m6Ss6Z4QHGyUse+e7zU6rM5ZVGpETlNvOwV //qhNeEgQDenhTJGyIWF2dRRttOF8EY+nYUNH6MINyvxezAM308z51oe0zZN1krB4XBfXyWqkEv/K ukAiNK9edfREkOkPAZN49vlsiPHjzqJ9//NdQutRsPBaybkgG6GqGyuOXOH4yhXJ0KAzhWAyW8nt7 IcEQ88Jifc5D+iGlw1Ebv+aTQWAXXbD4C5zExehfeZYmqwJTusmrSpon3CfE25NiFpS/v5sXP4eMh d+s8geoV3Hx+V93OevOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCGGd-006jQg-CW; Tue, 25 Jan 2022 07:29:29 +0000 Received: from mail-eopbgr00052.outbound.protection.outlook.com ([40.107.0.52] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCGDY-006iUS-RF for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 07:26:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzGhLqEBskoWlmmKjMqFqcKAWMq4nZfvfvPrDDLTytb4LgwTNncHV/EPapKr/Ow4V0j+m1TspmwPhKCnAk7sLKeslSkBm3QdvcXCbgaEo45kJ5Md0xSqNksZYgHqK//EV1BIoUsJbxt5X0BHyzMXIoS7QuWwP7bfB8kNnd/wdZG7+YzJ8dXlgiupzI/oBE0dxuaKkG7Dov5rpA/+dZI0wI/VKq0FgLUgQsKeuArXDN/FcIauzPSb/S1TG2OT8ZTVdYO1wpfAbVvtha3s3AekzgSu8wvgRxdB+NltjG7WDUwPXLemb5IH/vV7jG722O/WGRTWYwHej/h0G7ZgNV6Emg== 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=crcl+n9AB3XCEa9wInCIHGdSsnWs8Zlc/0FOVtOnbKfeCzjd1hKJQ6FzCe7xQC2clPPRWDFkfK+jbg3k4R8lvWLQr9DL8aUq0Zd2/FAeo7BXYny37GelbBAhpzoWraqaTEqPYidpkh/gaeTTI9tcp5/mB6MXlLq5kc2eN3ml+X5vnIcaHLC0Pmnbgi5sHb5ywD1HbN2gRftHeAA81bAyTT5qSy1RfWVTZ5T7t3/IUohiE3qR9i9b75W/cvbz+u9PK8ot2cVMrJ+SXj9CzXFkn7VRqq9OFxIyNcQKUcs0eLux6HmiSIYQTa1DXTpvRoW4bhRHnQe+SHjwu7zdA2E47Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=aMQgX97Hwy5eR390fPcQCxpONxet+82pqqMe1jVWMMZ+xZFPNTGR0Q/b+mg/c3jOKCJKPveESKrjNtJNyk6zAJk+UcZZsZTtrV+e8qD1AnxcrwoJtRDGlGNncuJjQoQy+QVaGjOqcuUmVLotIabVFGK1YuVAZW7STqCFsm05oKQ= 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 VI1PR04MB4094.eurprd04.prod.outlook.com (2603:10a6:803:43::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Tue, 25 Jan 2022 07:11:55 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3d7e:6627:fdd0:9d13]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3d7e:6627:fdd0:9d13%4]) with mapi id 15.20.4909.017; Tue, 25 Jan 2022 07:11:55 +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 v15 01/13] dt-bindings: media: amphion: add amphion video codec bindings Date: Tue, 25 Jan 2022 15:11:17 +0800 Message-Id: <5dbf63cd1f73be49d45126393a88a1968de7d73e.1643077283.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: X-ClientProxiedBy: SG2PR04CA0172.apcprd04.prod.outlook.com (2603:1096:4::34) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54a28091-c2d9-496f-569f-08d9dfd1f7e8 X-MS-TrafficTypeDiagnostic: VI1PR04MB4094: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: N7rM1BBfCW8GWpqPno5sHLEA0FGoCf3cwEGExx3496V692tBGxnZXEF0umEhNTh7kA2AQewCk4rgcoDUedhKlCqMjK4duZPettqyTgrmUcYpROJISPE/VBLWxGc3ASeXHP20V0sl8N2jQBhbxJwyeIr4aNkG6u+TzZISAYhCLQisNdQ1lKGt1I1MeOBGyVgvtennhzFe+9YSuWUdfyVbCXegUpK4DwgLHLL/RMKLGh/oq2OoZaW2u24tLio6w0D1LS76O0v/0+JHtJEsh1+4cs3B3vnVsLATIUAPHP9efah28a9g6uuALwRVKByDVzGs9p7Np6fZUYYqdCWn4f0TSbXBJQNxW7N61faLqATV2t1ZrTW2GFXnn3LvGcwiJYUWu8w1DBrRUBXGVTEBKfffcC1jdDLwP1gS5nbuJCRzgFYqjrJYbx6X7bqavpxytTTOs+okolf2PuJ4NulPEsUmcHqLk09dcVr/Em3tzPwWze0ZIIJH29hulHW/mR6Lf3a3ShsFkW2D5M0PMwZ8GV1S6fOF8CbmXA77SQg3Q13+EXBZYuuj0em+tjgJRtRtXOQvqdTDJim0KA4eZU+DF1c34ddzIgFic+RpHV4Mn+xzkb3VfoQ4snavjvPeW2yC+AEF9fgpFzvceeRiirZrwkrdwmUA+4fTpTJy6iRPVeDquVR9c4ahAHPBf5lxvjns2WoDmonOjlzwGfgz+TuxWpfN6613nNy0X7S72N1gF6bZZJGGg7TTa5uJ3VSYDe/y2BHCnqGKElfU5xl77r7nWRF2lfu4IIIyMlr4LhJ/TqZxsP8RmJSgASe9yBvzZbHEB4iX 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)(8936002)(966005)(6666004)(5660300002)(2616005)(7416002)(8676002)(36756003)(44832011)(86362001)(316002)(4326008)(38350700002)(6512007)(38100700002)(66476007)(66556008)(83380400001)(52116002)(6486002)(66946007)(6506007)(2906002)(186003)(26005)(508600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qHi1/JCh66BaX8wdhkmDKIw0E/g1iAMOm+xzSirZuNt3YETV9E5yvgK0uw6Rvpw+UtTPhscDCCSYCyLhPY26B9vAbB9uTHIjLVP3OlHqUVAGyM5aLiAN5fVu8l6xHxuo9StkBqepwSDH8/iJJdY5paCIQEbSXBgWPb9XTbwe6Wij4ZeH0QYevoPoGVPl1f58K9QibA4UyTK1Ki9N1VpL9UGGIPh/1HwjZXvBW2Hp5LTbFNLHDQbaVuuRAwPbeUhSvhgo2Oscmmh94dNqyA+HFF13cdubMZldacVDssA7X2BO+pf7AxaWkxmfDYf3GLbHpX1Da8V0NAoA+DTda7/L1gFTxgdtPL4BMyqXkDEQrlHXbOmbSKRvpM2OeVZ45CawvLlH3OEZ1rYZ/yTKJy3Zx7OYXy/3M74+Ch8UA3VDiEWXd3lny6L7GimN/We8jRDcQFn1QLKP6w3zGjRKk0rTjbKqnlsHJZ8WLWo9nLFhRpsDCw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QyltpqMrnbXk9NT65r6HXpgL0XgAdSJBNOJYcCFq9HiG9rBcXGPrbOA9SeAijjEMXWrV336rQdQ8= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54a28091-c2d9-496f-569f-08d9dfd1f7e8 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 07:11:55.2024 (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: l5ZBPIbM89JlDsGpc7xfhZXV8OU+ASIfeLFp5ysn206H54YyTZKrkT5FvnIFlrNQbVPvp55UMdRcicZGNHkXFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4094 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_232616_918317_D7570895 X-CRM114-Status: GOOD ( 13.41 ) 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>; + }; + }; + +...