devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: 20220614094956 created <yelian.wang@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	yaya.chang@mediatek.com, teddy.chen@mediatek.com,
	hidenorik@chromium.org
Subject: Re: [PATCH 1/3] media: dt-bindings: add MT8188 AIE
Date: Wed, 17 Jul 2024 15:04:19 +0200	[thread overview]
Message-ID: <44aa4f77-1f9e-47ec-a955-0dc991d8f6d1@kernel.org> (raw)
In-Reply-To: <20240717125426.32660-2-yelian.wang@mediatek.com>

On 17/07/2024 14:41, 20220614094956 created wrote:
> From: Yelian Wang <yelian.wang@mediatek.com>
> 
> Add YAML device tree binding for MT8188 AIE.
> 
> Signed-off-by: Yelian Wang <yelian.wang@mediatek.com>
> ---
>  .../bindings/media/mediatek-aie.yaml          | 99 +++++++++++++++++++
>  1 file changed, 99 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/mediatek-aie.yaml

Filename matching compatible.

> 
> diff --git a/Documentation/devicetree/bindings/media/mediatek-aie.yaml b/Documentation/devicetree/bindings/media/mediatek-aie.yaml
> new file mode 100644
> index 000000000000..300aef43e02b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/mediatek-aie.yaml
> @@ -0,0 +1,99 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/mediatek-aie.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: The AIE Unit of MediaTek Camera System

What is AIE?

> +
> +maintainers:
> +  - Yelian Wang <yelian.wang@mediatek.com>
> +
> +description:
> +  MediaTek AIE is the ISP unit in MediaTek SoC.


AIE is ISP? Say something more, including unwinding of the acronym.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: mediatek,mt8188-aie
> +      - enum:
> +          - mediatek,aie-hw3.1
> +          - mediatek,aie-hw3.0

Nope, you cannot have flexible fallbacks. Anyway, drop hardware
versions. Do you see them anywhere in other bindings? Use only SoC
compatible.


> +
> +  "#address-cells":
> +    const: 2

Why?


> +
> +  "#size-cells":
> +    const: 2

Why?

> +
> +  reg:
> +    maxItems: 2

You must list and describe items.


> +
> +  interrupts:
> +    maxItems: 1
> +
> +  mediatek,larb:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      Must contain the local arbiters in the current SoCs, see
> +      Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.yaml
> +      for details.
> +
> +  iommus:
> +    maxItems: 4
> +    description:
> +      Points to the respective IOMMU block with master port as argument, see
> +      Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details.
> +      Ports are according to the HW.
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 4
> +    minItems: 4

Drop minItems.

List and describe the items instead.

> +
> +  clock-names:
> +    items:
> +      - const: IMG_IPE
> +      - const: IPE_FDVT
> +      - const: IPE_SMI_LARB12
> +      - const: IPE_TOP

Nope. Please use DTS coding style.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - iommus
> +  - power-domains
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>

You do not use anything from this header.

> +    #include <dt-bindings/memory/mediatek,mt8188-memory-port.h>
> +    #include <dt-bindings/power/mediatek,mt8188-power.h>
> +    #include <dt-bindings/clock/mediatek,mt8188-clk.h>
> +    aie: aie@15310000 {

Drop unused label.

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


Best regards,
Krzysztof


  reply	other threads:[~2024-07-17 13:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 12:41 [PATCH 0/3] media: mediatek: Add support MT8188 AIE 20220614094956 created
2024-07-17 12:41 ` [PATCH 1/3] media: dt-bindings: add " 20220614094956 created
2024-07-17 13:04   ` Krzysztof Kozlowski [this message]
2024-07-17 13:24   ` Krzysztof Kozlowski
2024-07-17 12:41 ` [PATCH 2/3] uapi: linux: " 20220614094956 created
2024-07-17 17:45   ` Nicolas Dufresne
2024-07-17 12:41 ` [PATCH 3/3] media: mediatek: add MT8188 AIE driver 20220614094956 created
2024-07-17 13:16   ` Krzysztof Kozlowski
2024-07-17 13:43 ` [PATCH 0/3] media: mediatek: Add support MT8188 AIE AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44aa4f77-1f9e-47ec-a955-0dc991d8f6d1@kernel.org \
    --to=krzk@kernel.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hidenorik@chromium.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=teddy.chen@mediatek.com \
    --cc=yaya.chang@mediatek.com \
    --cc=yelian.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).