From patchwork Tue Aug 24 10:00:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moudy Ho X-Patchwork-Id: 12454469 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.5 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,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, 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 A7004C4338F for ; Tue, 24 Aug 2021 10:01:58 +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 64F286023E for ; Tue, 24 Aug 2021 10:01:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 64F286023E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.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=h9gc8cX/BAb6Y0NPkclPZqoComTv2O0u5XRmw6gk2X0=; b=lxl6TtNmMQN1Fp 2bUOrUCioYU6rhM+MiQ6KOGwDWrAomvA/pYEJLSMGEA0b7oLl/w9XOODYAgvdsLm5JLttFOFJnqv3 XP4eyPZuQ89M8/0LWUXQL4swQzI3uY0IWHYMd6qgsPHqnIUOge7RoSR9fRlpPRQi1FC4uVUpe7o9D B9GPhvXMy1BPeXlqqfmgJRyYLLOmmyzKdIWqXqnSRV5FA+mvypr7GjcxisBEXaQWTbCat/x9YyFhz zBnhd1a4c+bsddL9oqXEIQS9fW+1C9QkFO1g83KHJIAtPGv6ta0XqEB3Pjh269WuxPwKo0yJ3GSRu sjGoxqIjLAm+YXgOt46g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mITFX-002PIa-4R; Tue, 24 Aug 2021 10:01:43 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mITEm-002OpB-GW; Tue, 24 Aug 2021 10:01:00 +0000 X-UUID: 7ff3f168a3ec45c9be85f328f60da558-20210824 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ioPdH9tq3e3OIxJUh6Yyvj1wXzUX977zg2+8HAnZay8=; b=Ys1DUJ0aJjPVKPIWAlYsQ4pMJYnaAAWyO98HQtcZNeDLahdrARg8bsqy+pkWrqPGk7KUf5mwMuhKhaDnbnHx5v0/++lOpkOSdKg/wUKmJTMsUPRHRuoInfgovdZ15JGuzS1St3zGt0kycfIrlMxl6h4dXQG5nyRF0Uyrtrl0vLI=; X-UUID: 7ff3f168a3ec45c9be85f328f60da558-20210824 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1977018413; Tue, 24 Aug 2021 03:00:32 -0700 Received: from mtkmbs05n2.mediatek.inc (172.21.101.140) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 24 Aug 2021 03:00:31 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 24 Aug 2021 18:00:29 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 24 Aug 2021 18:00:29 +0800 From: Moudy Ho To: , Mauro Carvalho Chehab , "Rob Herring" , Matthias Brugger , "Hans Verkuil" , Jernej Skrabec CC: Maoguang Meng , daoyuan huang , Ping-Hsun Wu , "Geert Uytterhoeven" , Rob Landley , Laurent Pinchart , , , , , , , , , , , , , , , Subject: [PATCH v7 3/5] dt-binding: mt8183: Add Mediatek MDP3 dt-bindings Date: Tue, 24 Aug 2021 18:00:25 +0800 Message-ID: <20210824100027.25989-4-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210824100027.25989-1-moudy.ho@mediatek.com> References: <20210824100027.25989-1-moudy.ho@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210824_030056_664893_2B222391 X-CRM114-Status: GOOD ( 18.96 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org This patch adds DT binding document for Media Data Path 3 (MDP3) a unit in multimedia system used for scaling and color format convert. Signed-off-by: Moudy Ho --- .../bindings/media/mediatek,mdp3-ccorr.yaml | 57 +++++ .../bindings/media/mediatek,mdp3-rdma.yaml | 207 ++++++++++++++++++ .../bindings/media/mediatek,mdp3-rsz.yaml | 65 ++++++ .../bindings/media/mediatek,mdp3-wdma.yaml | 71 ++++++ .../bindings/media/mediatek,mdp3-wrot.yaml | 71 ++++++ 5 files changed, 471 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml create mode 100644 Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml diff --git a/Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml b/Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml new file mode 100644 index 000000000000..59fd68b46022 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-ccorr.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-ccorr.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 CCORR Device Tree Bindings + +maintainers: + - Daoyuan Huang + - Moudy Ho + +description: | + One of Media Data Path 3 (MDP3) components used to do color correction with 3X3 matrix. + +properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3-ccorr + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + HW index to distinguish same functionality modules. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + clocks: + minItems: 1 + +additionalProperties: false + +examples: + - | + #include + #include + + mdp3_ccorr: mdp3_ccorr@1401c000 { + compatible = "mediatek,mt8183-mdp3-ccorr"; + mediatek,mdp3-id = <0>; + reg = <0x1401c000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1401XXXX 0xc000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_CCORR>; + }; diff --git a/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml b/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml new file mode 100644 index 000000000000..b355d7fe791e --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml @@ -0,0 +1,207 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-rdma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 Device Tree Bindings + +maintainers: + - Daoyuan Huang + - Moudy Ho + +description: | + One of Media Data Path 3 (MDP3) components used to do read DMA. + RDMA0 is also used to be a controller node containing MMSYS, + MUTEX, GCE and SCP settings. + +properties: + compatible: + oneOf: + - items: + - enum: + # controller node + - mediatek,mt8183-mdp3 + - enum: + - mediatek,mt8183-mdp3-rdma + + - items: + - enum: + # read DMA + - mediatek,mt8183-mdp3-rdma + + mediatek,scp: + $ref: /schemas/types.yaml#/definitions/phandle + maxItems: 1 + description: | + The node of system control processor (SCP), using + the remoteproc & rpmsg framework. + $ref: /schemas/remoteproc/mtk,scp.yaml + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + In MDP3, it can allocate multiple identical modules for + different data path selection or multi-pipeline execution. + This node is used to indicate the ID of each module. + + mdp3-comps: + $ref: /schemas/types.yaml#/definitions/string-array + items: + - enum: + # MDP direct-link input path selection, create a + # component for path connectedness of HW pipe control + - mediatek,mt8183-mdp3-dl1 + - enum: + - mediatek,mt8183-mdp3-dl2 + - enum: + # MDP direct-link output path selection, create a + # component for path connectedness of HW pipe control + - mediatek,mt8183-mdp3-path1 + - enum: + - mediatek,mt8183-mdp3-path2 + - enum: + # Input DMA of ISP PASS2 (DIP) module for raw image input + - mediatek,mt8183-mdp3-imgi + - enum: + # Output DMA of ISP PASS2 (DIP) module for YUV image output + - mediatek,mt8183-mdp3-exto + + mdp3-comp-ids: + maxItems: 1 + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + Pipeline ID of MDP direct-link or DIP. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + power-domains: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 6 + + iommus: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Should point to the respective IOMMU block with master + port as argument. + $ref: /schemas/iommu/mediatek,iommu.yaml + + mediatek,mmsys: + $ref: /schemas/types.yaml#/definitions/phandle + maxItems: 1 + description: | + The node of mux(multiplexer) controller for HW connections. + + mediatek,mm-mutex: + $ref: /schemas/types.yaml#/definitions/phandle + maxItems: 1 + description: | + The node of sof(start of frame) signal controller. + + mediatek,mailbox-gce: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + The node of global command engine (GCE), used to read/write + registers with critical time limitation. + $ref: /schemas/mailbox/mtk-gce.txt + + mboxes: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + $ref: /schemas/mailbox/mailbox.txt + + gce-subsys: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + +if: + properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3 + - enum: + - mediatek,mt8183-mdp3-rdma + +then: + required: + - mediatek,scp + - mediatek,mmsys + - mediatek,mm-mutex + - mediatek,mailbox-gce + - mboxes + - gce-subsys + +required: + - compatible + - mediatek,mdp3-id + - reg + - clocks + - mediatek,gce-client-reg + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + mdp3_rdma0: mdp3_rdma0@14001000 { + compatible = "mediatek,mt8183-mdp3", + "mediatek,mt8183-mdp3-rdma"; + mediatek,scp = <&scp>; + mediatek,mdp3-id = <0>; + mdp3-comps = "mediatek,mt8183-mdp3-dl1", "mediatek,mt8183-mdp3-dl2", + "mediatek,mt8183-mdp3-path1", "mediatek,mt8183-mdp3-path2", + "mediatek,mt8183-mdp3-imgi", "mediatek,mt8183-mdp3-exto"; + mdp3-comp-ids = <0 1 0 1 0 1>; + reg = <0x14001000 0x1000>, + <0x14000000 0x1000>, + <0x14005000 0x1000>, + <0x14006000 0x1000>, + <0x15020000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>, + <&gce SUBSYS_1400XXXX 0 0x1000>, + <&gce SUBSYS_1400XXXX 0x5000 0x1000>, + <&gce SUBSYS_1400XXXX 0x6000 0x1000>, + <&gce SUBSYS_1502XXXX 0 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_RDMA0>, + <&mmsys CLK_MM_MDP_RSZ1>, + <&mmsys CLK_MM_MDP_DL_TXCK>, + <&mmsys CLK_MM_MDP_DL_RX>, + <&mmsys CLK_MM_IPU_DL_TXCK>, + <&mmsys CLK_MM_IPU_DL_RX>; + iommus = <&iommu>; + mediatek,mmsys = <&mmsys>; + mediatek,mm-mutex = <&mutex>; + mediatek,mailbox-gce = <&gce>; + mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 21 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 22 CMDQ_THR_PRIO_LOWEST 0>, + <&gce 23 CMDQ_THR_PRIO_LOWEST 0>; + gce-subsys = <&gce 0x14000000 SUBSYS_1400XXXX>, + <&gce 0x14010000 SUBSYS_1401XXXX>, + <&gce 0x14020000 SUBSYS_1402XXXX>, + <&gce 0x15020000 SUBSYS_1502XXXX>; + }; \ No newline at end of file diff --git a/Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml b/Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml new file mode 100644 index 000000000000..c55a52cd32b7 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-rsz.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-rsz.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 Resizer Device Tree Bindings + +maintainers: + - Daoyuan Huang + - Moudy Ho + +description: | + One of Media Data Path 3 (MDP3) components used to do frame resizing. + +properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3-rsz + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + HW index to distinguish same functionality modules. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + clocks: + minItems: 1 + +additionalProperties: false + +examples: + - | + #include + #include + + mdp3_rsz0: mdp3_rsz0@14003000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <0>; + reg = <0x14003000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x3000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ0>; + }; + + mdp3_rsz1: mdp3_rsz1@14004000 { + compatible = "mediatek,mt8183-mdp3-rsz"; + mediatek,mdp3-id = <1>; + reg = <0x14004000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x4000 0x1000>; + clocks = <&mmsys CLK_MM_MDP_RSZ1>; + }; diff --git a/Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml b/Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml new file mode 100644 index 000000000000..93e6f331ada8 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-wdma.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-wdma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 Device Tree Bindings + +maintainers: + - Daoyuan Huang + - Moudy Ho + +description: | + One of Media Data Path 3 (MDP3) components used to write DMA. + +properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3-wdma + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + HW index to distinguish same functionality modules. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + power-domains: + maxItems: 1 + + clocks: + minItems: 1 + + iommus: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Should point to the respective IOMMU block with master + port as argument. + $ref: /schemas/iommu/mediatek,iommu.yaml + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + mdp3_wdma: mdp3_wdma@14006000 { + compatible = "mediatek,mt8183-mdp3-wdma"; + mediatek,mdp3-id = <0>; + reg = <0x14006000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x6000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WDMA0>; + iommus = <&iommu>; + }; diff --git a/Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml b/Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml new file mode 100644 index 000000000000..2993da04c562 --- /dev/null +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-wrot.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/mediatek,mdp3-wrot.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek Media Data Path 3 Device Tree Bindings + +maintainers: + - Daoyuan Huang + - Moudy Ho + +description: | + One of Media Data Path 3 (MDP3) components used to write DMA with frame rotation. + +properties: + compatible: + items: + - enum: + - mediatek,mt8183-mdp3-wrot + + mediatek,mdp3-id: + $ref: /schemas/types.yaml#/definitions/uint32 + maxItems: 1 + description: | + HW index to distinguish same functionality modules. + + reg: + description: | + Physical base address and length of the function block + register space, the number aligns with the component + and its own subcomponent. + + mediatek,gce-client-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: | + sub-system id corresponding to the global command engine (GCE) + register address. + $ref: /schemas/mailbox/mtk-gce.txt + + power-domains: + maxItems: 1 + + clocks: + minItems: 1 + + iommus: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Should point to the respective IOMMU block with master + port as argument. + $ref: /schemas/iommu/mediatek,iommu.yaml + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + mdp3_wrot0: mdp3_wrot0@14005000 { + compatible = "mediatek,mt8183-mdp3-wrot"; + mediatek,mdp3-id = <0>; + reg = <0x14005000 0x1000>; + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x5000 0x1000>; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; + clocks = <&mmsys CLK_MM_MDP_WROT0>; + iommus = <&iommu>; + };