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 B4348CAC58C for ; Mon, 8 Sep 2025 23:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=naMSKwdItJDOVEut1clldy6rzfJ23gNVWfzo/NG/EPk=; b=NJDpVBd2I2Yg3R9CnGQPw6hWKs UcG5g/YYmdIxuJIa4QK7q+i/ZPseIiUz6XfWl1Ig0E204OZExcptLr36GdrDn42vjIpX+a3NpGd/l j3SjKv5lu9Dm9ousKASwuvNi0/EPCQJhCc3F40TxrHZwT1UDYCK5GlU25tZKQRDA/anaI+x0mgVFT g6lwzAvS3fnWB5MBj/i+swPWPaYraj8h/ib5/IXa4VQsb1o0SQtBGn2JjeFVPuRYKyep3rlZEcWw2 kAMCEYySqW7BSwqdUtMUagai4030eAwaatH/H4HIGUO4R4uTBOgg4riZ8ECPTvBFxG0drod00HlGU PQ1PNa3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uvlen-000000033I6-0Vd8; Mon, 08 Sep 2025 23:52:21 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uvg3c-00000001Kya-2bnM; Mon, 08 Sep 2025 17:53:37 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1757353964; cv=none; d=zohomail.com; s=zohoarc; b=B4Mf6hX3bTYR3a7xiqiYtVcengOCYMtJ4uJlkCgsH8CHDfIpfPDn9QFXXw2JTXPIXbPjoVEoqmDlJ6+//kQSKYrl74uNirNimliuVIRmMSaqO/i326YtwRB2KLadoFMiMx/dZb9nrPGLCt0tlj96LCoXSGBmxLY/tHo2jPRkQ7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757353964; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=naMSKwdItJDOVEut1clldy6rzfJ23gNVWfzo/NG/EPk=; b=mKNy732zMOeES4VFouY2+RdFC7btgwlztF00TDru9mn+yIv54ZdfAz8e39jQq4oiLF3IRxkBk0qG800GVy3RMMg6HIi+SOu16q91R8tjFTDKRMMEYw8qpMBfCCXqnL97P/1Xj46QZu3zXFHh2SqXEGGh//Hs+ErONriwiN8purw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=ariel.dalessandro@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1757353963; s=zohomail; d=collabora.com; i=ariel.dalessandro@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=naMSKwdItJDOVEut1clldy6rzfJ23gNVWfzo/NG/EPk=; b=eVpN7XxaqwQUND+7FTzrATUGruIrEV/dnqxKdmazR6+iYVeul/IphtNTHtGsv/+L kSzW1wYYT7hhzaaRz6IIPqgwHQp/4hshW+ePcAIsT0Bbv+tXe5d9KCs4aIW4JcYdeo4 yCZAuQEIoq/b/D9UUwXMI99G0aw05EuN8qyh0Jzo= Received: by mx.zohomail.com with SMTPS id 1757353961706173.12105076966714; Mon, 8 Sep 2025 10:52:41 -0700 (PDT) Message-ID: Date: Mon, 8 Sep 2025 14:52:23 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 01/14] media: dt-bindings: Convert MediaTek mt8173-mdp bindings to YAML To: Krzysztof Kozlowski Cc: airlied@gmail.com, amergnat@baylibre.com, andrew+netdev@lunn.ch, andrew-ct.chen@mediatek.com, angelogioacchino.delregno@collabora.com, broonie@kernel.org, chunkuang.hu@kernel.org, ck.hu@mediatek.com, conor+dt@kernel.org, davem@davemloft.net, dmitry.torokhov@gmail.com, edumazet@google.com, flora.fu@mediatek.com, houlong.wei@mediatek.com, jeesw@melfas.com, jmassot@collabora.com, kernel@collabora.com, krzk+dt@kernel.org, kuba@kernel.org, kyrie.wu@mediatek.corp-partner.google.com, lgirdwood@gmail.com, linus.walleij@linaro.org, louisalexis.eyraud@collabora.com, maarten.lankhorst@linux.intel.com, matthias.bgg@gmail.com, mchehab@kernel.org, minghsiu.tsai@mediatek.com, mripard@kernel.org, p.zabel@pengutronix.de, pabeni@redhat.com, robh@kernel.org, sean.wang@kernel.org, simona@ffwll.ch, support.opensource@diasemi.com, tiffany.lin@mediatek.com, tzimmermann@suse.de, yunfei.dong@mediatek.com, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-sound@vger.kernel.org, netdev@vger.kernel.org References: <20250820171302.324142-1-ariel.dalessandro@collabora.com> <20250820171302.324142-2-ariel.dalessandro@collabora.com> <20250821-silky-slug-of-novelty-e4bb64@kuoka> Content-Language: en-US From: Ariel D'Alessandro In-Reply-To: <20250821-silky-slug-of-novelty-e4bb64@kuoka> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250908_105336_719008_8385D87B X-CRM114-Status: GOOD ( 24.56 ) 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 Krzysztof, On 8/21/25 3:46 AM, Krzysztof Kozlowski wrote: > On Wed, Aug 20, 2025 at 02:12:49PM -0300, Ariel D'Alessandro wrote: >> Convert the existing text-based DT bindings for MediaTek MT8173 Media Data Path >> to a YAML schema. > > Please wrap commit message according to Linux coding style / submission > process (neither too early nor over the limit): > https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597 Thanks. Looks like my editor was misconfigured, sorry. Will fix in v2. > >> >> Signed-off-by: Ariel D'Alessandro >> --- >> .../bindings/media/mediatek,mt8173-mdp.yaml | 174 ++++++++++++++++++ >> .../bindings/media/mediatek-mdp.txt | 95 ---------- >> 2 files changed, 174 insertions(+), 95 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> delete mode 100644 Documentation/devicetree/bindings/media/mediatek-mdp.txt >> >> diff --git a/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> new file mode 100644 >> index 0000000000000..f3a08afc305b1 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/media/mediatek,mt8173-mdp.yaml >> @@ -0,0 +1,174 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/media/mediatek,mt8173-mdp.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: MediaTek MT8173 Media Data Path >> + >> +maintainers: >> + - Ariel D'Alessandro >> + >> +description: >> + Media Data Path is used for scaling and color space conversion. >> + >> +properties: >> + compatible: >> + oneOf: >> + - items: > > Just enum, no items here See below. > > >> + - enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-rsz >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + - items: >> + - enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-rsz >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + - const: mediatek,mt8173-mdp > > This makes no sense. How devices can be compatible and can not be > compatible. According to the driver source code (and the previous txt mt8173-mdp bindings), there must be a "controller node" with compatible `mediatek,mt8173-mdp`. Then its sibling nodes (including itself) should be one of the component node ids, listed in `struct of_device_id mtk_mdp_comp_dt_ids[]`. Is there a proper/different way to describe this compatible binding in the yaml? Or you're saying the driver doesn't make sense here? [0] drivers/media/platform/mediatek/mdp/mtk_mdp_core.c > >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: true > > No, there's no such syntax. Look at other bindings. Ack. > > >> + >> + power-domains: >> + maxItems: 1 >> + >> + iommus: >> + description: | > > Drop | Ack. > >> + This property should point to the respective IOMMU block with master port as argument, >> + see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. > > Drop entire description, completely redundant. I don't know why my patch > fixing this was not applied, so you keep repeating same mistakes... Ack. > >> + maxItems: 1 >> + >> + mediatek,vpu: >> + $ref: /schemas/types.yaml#/definitions/phandle >> + description: >> + Describes point to vpu. > > Useless description. We see that from the property name. Explain the > purpose in the hardware. Ack. > >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - power-domains >> + >> +allOf: >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: mediatek,mt8173-mdp-rdma >> + then: >> + properties: >> + clocks: >> + items: >> + - description: Main clock >> + - description: Mutex clock >> + else: >> + properties: >> + clocks: >> + items: >> + - description: Main clock >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - mediatek,mt8173-mdp-rdma >> + - mediatek,mt8173-mdp-wdma >> + - mediatek,mt8173-mdp-wrot >> + then: >> + required: >> + - iommus >> + >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: mediatek,mt8173-mdp > > This makes no sense either. Same question above about compatibles. > >> + then: >> + required: >> + - mediatek,vpu >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + #include >> + #include >> + >> + soc { >> + #address-cells = <2>; >> + #size-cells = <2>; >> + >> + mdp_rdma0: rdma@14001000 { > > One example is enough. Two could be fine if they differ significantly. Sounds good. Will keep just a single example, including a node for the controller node and one for each of the components. Thanks a lot for the feedback! -- Ariel D'Alessandro Software Engineer Collabora Ltd. Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK Registered in England & Wales, no. 5513718