Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5381473pxv; Wed, 21 Jul 2021 04:14:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsxt1jG6pnG6DVjbaHYVCpSu6W4XaGAkV0tyag/Dsa3G/pkfy2LupuiAEojDqr4E8n7feM X-Received: by 2002:a05:6602:342a:: with SMTP id n42mr17201511ioz.126.1626866086121; Wed, 21 Jul 2021 04:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626866086; cv=none; d=google.com; s=arc-20160816; b=0RQBHiaVrWVM1s+NWcWNCkZMrdHGguMJekhsKwgfY4kS5EgFGt76LKbr9ol9TLjAZb lg4m/fez10Wiz40temnZxamVZA+UIBpRK9dUzUNkwgdBIoP7+JlBlX+T1xNiTNzEL70o HyeGz23O9P+saEfEvRvf7XbT2qm+9gD2JPRimQMnUb2Vp+FDdS4oRM1omL2pG/qieSVL r1X7eZ1gwjDKckWYK2p8thEwgiAl8J+Ja/mVQcsqketK7XHqbejeO5BHttWX/+xKCQTk 6WSmXiFu+HY85MTUJ/uePpLvYOZZHoWZ1qk4FAoj4xAdUwDbNOpr72hf1zlI8I5ueYlc LBsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ExML9+fEBI10aSrxy/EHKvysF1ldKGsrQnkHGe2/3Hs=; b=rcwlaokuG49IGN4ZpSU/iivU2fYvQrrrxDuEeZB2lm1ndhG3c8YeJT7KcycKwmBOms 1kNoKOao7KUpt7ZNF6p4/ZF2cONei/kmsdMu7yH5exqyKUl2A3LY0WtVbBE4yMfPhVwG YDdf3TxDDZovTGEycwrq0Hyu3M2k9na+MRw/AE6s+SfAo9ywErt0L4esPDLLeC6qMaFr 3bfXvFfkV3QdYFIOXw8+sNrVkoe4XKIzX3dYUKLUuDZI45xMJR6caemJKA6ffyAzuGl/ BtgN+ItnzRjnn7fWO9IAo4zQ4m4E3b+Wr8uaPyLlXv3PjNO4X/J2D28TzMlavVtO82Ep 2EdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mcYDd7q4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si26623923ilv.84.2021.07.21.04.14.34; Wed, 21 Jul 2021 04:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mcYDd7q4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239457AbhGUKcY (ORCPT + 99 others); Wed, 21 Jul 2021 06:32:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236999AbhGUKUv (ORCPT ); Wed, 21 Jul 2021 06:20:51 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 899D4C061574; Wed, 21 Jul 2021 04:01:28 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id o72-20020a9d224e0000b02904bb9756274cso1675178ota.6; Wed, 21 Jul 2021 04:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ExML9+fEBI10aSrxy/EHKvysF1ldKGsrQnkHGe2/3Hs=; b=mcYDd7q4MPKRvhhUSEl6uBrfTY4+5MlBwKgJJwVt6iYT7RPdFxMHqpReLVZl2xZHok gEybm30aFnN3WzXfSKin93t3cga9RKh/ZXewJm/D5IXVcNPpnOxXmjSKN5wLeH6eoC30 XZ5vF7MZIcyhZPNbu/606Pw5cMv5T6QY/bs6u7/lZOnwTeNujpkreAQSynWeFFJdRrbp YAMyUI4f0NNq+JIdYQCXE/dpGtCQ+uCeHRq6fcBfKtGJgKWV08lYvEB3o/Wc2+8snj8a Cts+vejGz9enSy7VwFZYGgOaSYaj5lFGpNoEjMyYqA0THPIjyJ1H5PhOSPCNbD7/efW+ wSpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ExML9+fEBI10aSrxy/EHKvysF1ldKGsrQnkHGe2/3Hs=; b=BwBzIzTJlu4SETEcgm89oaspSX2IZRnG9n+cQPeDWu0NGIhZDg6ujLf/I118MROM20 cd4n8bJm0vNhANAW1Ix9RaXJLRq+nrM52tTjFZPCD6CRYRMcGLT7U5kzjxmKkPvW8MzL RcRzq1NbtmHV51O8mZYbZACA9+BbahgGzpOur3TynNIz+KOBPQlRrr7L+o/5L5rz2Wog EthNbTq4xvWuYh8GvEvi3h0Cd1IbPgYX3riLtR9DNqxZU2Z02ye/s4AztL6+u1XMbC/J tS1fETBA8dtBCrQvPV7OrIh53eAQo2PzIaueCjl2iSQnwSjCj93hp9KDFG3mkf4v0ba5 OKFA== X-Gm-Message-State: AOAM532QNG1eQZywIx94HJqiuuBASKekUjMQqNWMUkf84O7f4nb6cZDR OcaknEKSgflIiocgHjtklXljjInixhyReoOL8pk= X-Received: by 2002:a9d:27a4:: with SMTP id c33mr26420832otb.281.1626865287956; Wed, 21 Jul 2021 04:01:27 -0700 (PDT) MIME-Version: 1.0 References: <20210719074640.25058-1-moudy.ho@mediatek.com> <20210719074640.25058-2-moudy.ho@mediatek.com> In-Reply-To: <20210719074640.25058-2-moudy.ho@mediatek.com> From: Enric Balletbo Serra Date: Wed, 21 Jul 2021 13:01:16 +0200 Message-ID: Subject: Re: [PATCH v5 1/3] dt-binding: mt8183: Add Mediatek MDP3 dt-bindings To: Moudy Ho Cc: Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Hans Verkuil , Jernej Skrabec , Maoguang Meng , daoyuan huang , Ping-Hsun Wu , Geert Uytterhoeven , Rob Landley , Laurent Pinchart , Linux Media Mailing List , devicetree , Linux ARM , "moderated list:ARM/Mediatek SoC support" , linux-kernel , Tomasz Figa , Nicolas Boichat , Alexandre Courbot , Pi-Hsun Shih , menghui.lin@mediatek.com, sj.huang@mediatek.com, ben.lok@mediatek.com, randy.wu@mediatek.com, srv_heupstream Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Moudy, Thank you for your patch. Missatge de Moudy Ho del dia dl., 19 de jul. 2021 a les 9:47: > > 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: Ping-Hsun Wu > Signed-off-by: daoyuan huang > Signed-off-by: Moudy Ho > --- > .../bindings/media/mediatek-mdp3.yaml | 274 ++++++++++++++++++ > 1 file changed, 274 insertions(+) > create mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp3.yaml > > diff --git a/Documentation/devicetree/bindings/media/mediatek-mdp3.yaml b/Documentation/devicetree/bindings/media/mediatek-mdp3.yaml > new file mode 100644 > index 000000000000..e3e10f0544ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/mediatek-mdp3.yaml The name of the file should be in the format vendor,compatible. In this case is a bit complicated as there are different compatibles but at least i'd use a generic name, i.e "mediatek,mtk-mdp3" > @@ -0,0 +1,274 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/mediatek-mdp3.yaml# Remember to also change the name here. > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek Media Data Path 3 Device Tree Bindings > + > +maintainers: > + - Daoyuan Huang > + - Moudy Ho > + > +description: | > + Media Data Path 3 (MDP3) is used for scaling and color space conversion. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + # controller node > + - mediatek,mt8183-mdp3 > + - enum: > + - mediatek,mt8183-mdp3-rdma > + > + - items: > + - enum: > + # read DMA > + - mediatek,mt8183-mdp3-rdma > + # frame resizer > + - mediatek,mt8183-mdp3-rsz > + # write DMA > + - mediatek,mt8183-mdp3-wdma > + # write DMA with frame rotation > + - mediatek,mt8183-mdp3-wrot > + # color correction with 3X3 matrix > + - mediatek,mt8183-mdp3-ccorr > + > + 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: | > + HW index to distinguish same functionality modules. > + > + mdp3-comps: > + $ref: /schemas/types.yaml#/definitions/string-array > + description: | > + Subcomponent, the number aligns with > + mdp_sub_comp_dt_ids[] in mtk-mdp3-comp.c. > + > + mdp3-comp-ids: > + maxItems: 1 > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: | > + Index of the modules, the number list in > + mdp_comp_matches[] in mtk-mdp3-comp.c. > + > + 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 > + > + mediatek,gce-events: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: | > + In use event IDs list, all IDs are defined in > + 'dt-bindings/gce/mt8183-gce.h'. > + $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,gce-events > + - 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-dl", "mediatek,mt8183-mdp3-dl1", > + "mediatek,mt8183-mdp3-imgi", "mediatek,mt8183-mdp3-exto"; > + mdp3-comp-ids = <0 1 0 1>; > + reg = <0x14001000 0x1000>, > + <0x14000000 0x1000>, > + <0x15020000 0x1000>; > + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>, > + <&gce SUBSYS_1400XXXX 0 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>; > + mediatek,gce-events = , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + ; > + }; > + > + 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>; > + }; > + > + mdp3_wrot0: mdp3_wrot0@14005000 { > + compatible = "mediatek,mt8183-mdp3-wrot"; > + mediatek,mdp3-id = <0>; > + mdp3-comps = "mediatek,mt8183-mdp3-path"; > + mdp3-comp-ids = <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>; > + }; > + > + mdp3_wdma: mdp3_wdma@14006000 { > + compatible = "mediatek,mt8183-mdp3-wdma"; > + mediatek,mdp3-id = <0>; > + mdp3-comps = "mediatek,mt8183-mdp3-path"; > + mdp3-comp-ids = <1>; > + 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>; > + }; > + > + 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>; > + }; > + > -- > 2.18.0 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek