From mboxrd@z Thu Jan 1 00:00:00 1970 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 1FD7CC433EF for ; Thu, 31 Mar 2022 21:20:04 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EL5ZQW9/5s2bmXx1P7cVcoc4Y9SNPORdUBEt/ugndj0=; b=vX6jcC0rnaUA9u s5BJqHcQrQs3oX9T8sIrwzmUgYVxK0y0GDktIMyVGhBDw24T3SZnsYP67BRVJc5G9phSd51WAtNwm TnqBW+486Wh1GkLSHTllqpEDNbKlfVNq6wOpKzUzV8Nswz3O9KCizn9vw2Xo64cbNBJvd5ENK0/AE dXX5hdvIaV4sgiqLBeIfntDwN4T5E8iWR3w5B99UIeXSur2XIeT/RQNPF7jNVlKqjY0/P6rXgwBHO Y86drGVkkhDRlRucHfKmrSUYV6tiopA6WfpUJKJk9JQUsDJT9h1MeVstBzIeu9K4AM4EkEeIEpMT8 v8X8K3t/viV0KeTERYXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1na2Cx-003hRb-SC; Thu, 31 Mar 2022 21:19:55 +0000 Received: from mail-ot1-f43.google.com ([209.85.210.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1na2Ck-003hNt-Le; Thu, 31 Mar 2022 21:19:44 +0000 Received: by mail-ot1-f43.google.com with SMTP id w17-20020a056830111100b005b22c584b93so761801otq.11; Thu, 31 Mar 2022 14:19:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Fm9j31QnqpewsYtYm5Zm4wpxz1kydRGT8NHr0rzkZyA=; b=GuIRX5kX5lu+lhFTtg9qs35uMz9qT33hytWKab8qkHYPiteMNlLLrJHEKOG2TuIj4o bHy3IogybISwrptSx1E+ycxpWmbpF19JweUy+UpIMZJoyUkvlGm643ZvZB8rA+eRccXb RhB0WbzI5cQizzn/t0HRlPG13PRxYRmxJZDGYsewNXZd3JnqvH/7CqPv3sJOioDlvjY9 5v9rfu4K2CVRAgww4+h321y+Podg2UP3fyIP64F13BAT4htSIEe+F51H4JUmxAfKuWkS vU5gU+bEKUyR9Xu286efeNHyc6C+0BCxlt8NoHeu6ZUTBgj3ceDvQqKyep5ErjRk2y1l huew== X-Gm-Message-State: AOAM5335PApwXUqc1oM5xQno56f2I6HXveXcAhpba9RqJ6t38HuzTmH9 HrAkuIu1X145Vnlz7UyB1Fc1Bbj5/Q== X-Google-Smtp-Source: ABdhPJw397a5OlH1Ki1AhiF2YtXSsu6dIfoUVKBLabv0jHczHCK4LuX47bWk2u/CovcpFMxoDFhDMg== X-Received: by 2002:a9d:69:0:b0:5c9:3456:f02f with SMTP id 96-20020a9d0069000000b005c93456f02fmr6544088ota.25.1648761580467; Thu, 31 Mar 2022 14:19:40 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id h83-20020aca3a56000000b002ece47dce52sm248016oia.26.2022.03.31.14.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 14:19:40 -0700 (PDT) Received: (nullmailer pid 1517924 invoked by uid 1000); Thu, 31 Mar 2022 21:19:38 -0000 Date: Thu, 31 Mar 2022 16:19:38 -0500 From: Rob Herring To: Moudy Ho Cc: Mauro Carvalho Chehab , Matthias Brugger , Hans Verkuil , Jernej Skrabec , Chun-Kuang Hu , Geert Uytterhoeven , Rob Landley , Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Courbot , tfiga@chromium.org, drinkcat@chromium.org, pihsun@chromium.org, hsinyi@google.com, AngeloGioacchino Del Regno , Maoguang Meng , daoyuan huang , Ping-Hsun Wu , menghui.lin@mediatek.com, sj.huang@mediatek.com, allen-kh.cheng@mediatek.com, randy.wu@mediatek.com, jason-jh.lin@mediatek.com, roy-cw.yeh@mediatek.com, river.cheng@mediatek.com, srv_heupstream@mediatek.com, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH v12 1/3] dt-binding: mt8183: add Mediatek MDP3 dt-bindings Message-ID: References: <20220317145605.25782-1-moudy.ho@mediatek.com> <20220317145605.25782-2-moudy.ho@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220317145605.25782-2-moudy.ho@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_141942_740950_E282BE58 X-CRM114-Status: GOOD ( 35.77 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Thu, Mar 17, 2022 at 10:56:03PM +0800, Moudy Ho wrote: > This patch adds DT binding documents for Media Data Path 3 (MDP3) > a unit in multimedia system combined with several components and > used for scaling and color format convert. > > It can create multiple paths with different functions by assigning > different components, a simple diagram is as follows: > > +------------+ +------------+ > | RDMA | | ISP[*1] | > +---+--+--+--+ +-----+--+---+ > A B C 2 1 > v v v v v > | | | | | > | | +---------+ | | > | | | | | > | +-------+ | | | > | | | | | > | +-------+----+---------+ | > | | | | | > | | | +---------+ | > v v | | | > A 2 | | | > ******** | | | > ** ** | | | > * PQ[*2] * | | | > ** ** | | | > ******** | | | > | | | | | > v v | v v > A 2 | C 1 > +---+--+---+ | +-----+--+--+ > | RSZ | | | RSZ | > +---+------+ | +-----+--+--+ > D | 3 4 > v | v v > | | | | > | +-------+ | | > | | | | > | | +-------------------+ | > | | | | > v v v v > D B 3 4 > +---+--+--+--+ +---------+--+ > | WROT | | WDMA | > +------------+ +------------+ Sure seems like you should be using the OF graph binding to describe these connections unless all the sub-blocks and their connections are fixed across different SoCs. > > [*1] Direct-link path for camera input > [*2] A series of picture quality adjustment > engines, composed of AAL, CCORR, TDSHP > and COLOR > > Signed-off-by: Moudy Ho > --- > .../bindings/media/mediatek,mdp3-rdma.yaml | 214 ++++++++++++++++++ > .../bindings/media/mediatek,mdp3-rsz.yaml | 54 +++++ > .../bindings/media/mediatek,mdp3-wrot.yaml | 57 +++++ > .../bindings/soc/mediatek/mediatek,ccorr.yaml | 47 ++++ > .../bindings/soc/mediatek/mediatek,wdma.yaml | 58 +++++ > 5 files changed, 430 insertions(+) > 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-wrot.yaml > create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,ccorr.yaml > create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,wdma.yaml > > 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..3bf59c3f521f > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml > @@ -0,0 +1,214 @@ > +# 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 Read Direct Memory Access > + > +maintainers: > + - Matthias Brugger > + > +description: | > + Mediatek Read Direct Memory Access(RDMA) component used to do read DMA. > + It contains one line buffer to store the sufficient pixel data, and > + must be siblings to the central MMSYS_CONFIG node. > + For a description of the MMSYS_CONFIG binding, see > + Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml > + for details. > + The 1st RDMA is also used to be a controller node in Media Data Path 3(MDP3) > + that containing MMSYS, MUTEX, GCE and SCP settings. > + > +properties: > + compatible: > + oneOf: > + - items: > + # MDP3 controller node > + - const: mediatek,mt8183-mdp3 > + - const: mediatek,mt8183-mdp3-rdma This does not make sense as a compatible entry. The first string should be more specific than the 2nd string. The controller node is a different instance of the RDMA block or some s/w designation? Looks like the latter to me... > + - items: > + # normal RDMA conponent > + - const: mediatek,mt8183-mdp3-rdma > + > + mediatek,scp: > + description: | > + The node of system control processor (SCP), using > + the remoteproc & rpmsg framework. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + maxItems: 1 > + > + mediatek,mdp3-comps: > + description: | > + MDP subsystem which has direct-link from Image Signal Processor(ISP). > + When using the camera, the DMA of ISP PASS (DIP) module will directly > + trigger MDP3 without other control (such as V4L2 M2M) to create > + corresponding HW path. > + The MDP3 controller must set up a series of registers at the beginning of > + path creation which covering MMSYS, IMGSYS, and MDP3's components, > + so that data flow can pass through MDP3. > + The entire path is briefly described as follows > + ISP --+ > + | > + +-> DIP --+ > + ................|.............................................. > + (MDP3) +->IMGI -+-> DL1 -> RSZ -+-> PATH1 -> WROT > + | ^ | > + | | | > + +-> DL2 -----+ +-> PATH2 -> WDMA > + | > + +---------------------------> EXTO > + $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 > + - mediatek,mt8183-mdp3-dl2 > + # MDP direct-link output path selection, create a > + # component for path connectedness of HW pipe control > + - mediatek,mt8183-mdp3-path1 > + - mediatek,mt8183-mdp3-path2 > + # Input DMA of ISP PASS2 (DIP) module for raw image input > + - mediatek,mt8183-mdp3-imgi > + # Output DMA of ISP PASS2 (DIP) module for YUV image output > + - mediatek,mt8183-mdp3-exto > + > + reg: > + items: > + - description: basic RDMA HW address > + - description: MDP direct-link 1st and 2nd input > + - description: MDP direct-link 1st output > + - description: MDP direct-link 2nd output > + - description: ISP input and output > + > + mediatek,gce-client-reg: > + $ref: '/schemas/types.yaml#/definitions/phandle-array' > + minItems: 1 > + items: > + - description: GCE client for RDMA > + - description: GCE client for dl1 and dl2 > + - description: GCE client for path1 > + - description: GCE client for path2 > + - description: GCE client for imgi and exto > + description: | > + The register of client driver can be configured by gce with > + 4 arguments defined in this property, such as phandle of gce, subsys id, > + register offset and size. Each GCE subsys id is mapping to a client > + defined in the header include/dt-bindings/gce/-gce.h. > + > + power-domains: > + maxItems: 1 > + > + clocks: > + items: > + - description: RDMA clock > + - description: RSZ clock > + - description: direck-link TX clock in MDP side > + - description: direck-link RX clock in MDP side > + - description: direck-link TX clock in ISP side > + - description: direck-link RX clock in ISP side > + > + iommus: > + maxItems: 1 > + > + mediatek,mmsys: > + description: The node of mux(multiplexer) controller for HW connections. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + > + mediatek,mm-mutex: > + description: | > + Mediatek mutex, namely MUTEX, is used to send the triggers signals called > + Start Of Frame(SOF) / End Of Frame(EOF) to each sub-modules on the data path. > + In some SoC, such as mt2701, MUTEX could be a hardware mutex which protects > + the shadow register. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + > + mediatek,mailbox-gce: > + description: | > + The node of global command engine (GCE), used to read/write > + registers with critical time limitation. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + > + mboxes: > + items: > + - description: used for 1st data pipe from RDMA > + - description: used for 2nd data pipe from RDMA > + - description: used for 3rd data pipe from Direct-Link > + - description: used for 4th data pipe from Direct-Link > + > + gce-subsys: Vendor prefix needed. > + description: | > + sub-system id corresponding to the global command engine (GCE) > + register address. > + $ref: '/schemas/types.yaml#/definitions/phandle-array' > + > +if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8183-mdp3 > + > +then: > + required: > + - mediatek,scp > + - mediatek,mmsys > + - mediatek,mm-mutex > + - mediatek,mailbox-gce Note that if there's only 1 instance of these blocks, you can just find them by compatible and don't need a property. > + - mboxes > + - gce-subsys > + > +required: > + - compatible > + - 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-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"; > + 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>, > + <&gce 21 CMDQ_THR_PRIO_LOWEST>, > + <&gce 22 CMDQ_THR_PRIO_LOWEST>, > + <&gce 23 CMDQ_THR_PRIO_LOWEST>; > + gce-subsys = <&gce 0x14000000 SUBSYS_1400XXXX>, > + <&gce 0x14010000 SUBSYS_1401XXXX>, > + <&gce 0x14020000 SUBSYS_1402XXXX>, > + <&gce 0x15020000 SUBSYS_1502XXXX>; > + }; _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek