devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Fabio Estevam <festevam@gmail.com>,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	kernel@pengutronix.de, linux-imx@nxp.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 01/16] dt-bindings: media: fsl-pxp: convert to yaml
Date: Fri, 13 Jan 2023 16:09:43 +0100	[thread overview]
Message-ID: <20230113150943.GC20866@pengutronix.de> (raw)
In-Reply-To: <bba093d0-e648-61b3-f4d7-b48d43e35920@linaro.org>

On Fri, 13 Jan 2023 12:56:12 +0100, Krzysztof Kozlowski wrote:
> On 13/01/2023 10:54, Michael Tretter wrote:
> > Convert the bindings of the Freescale Pixel Pipeline to YAML.
> > 
> > The conversion drops the previously listed compatibles for several SoCs.
> > It is unclear, if the PXP on these SoCs is compatible to any of the PXPs
> > on the existing SoCs and would allow to reuse the already defined
> > compatibles. The missing compatibles should be brought back when the
> > support for the PXP on these SoCs is added.
> > 
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > ---
> > Changelog:
> > 
> > v2:
> > 
> > - add fsl,imx6sll-pxp and fsl,imx6sx-pxp compatibles
> > - restrict number of interrupts per variant
> > - cleanup syntax
> > ---
> >  .../devicetree/bindings/media/fsl,imx6ull-pxp.yaml | 82 ++++++++++++++++++++++
> >  .../devicetree/bindings/media/fsl-pxp.txt          | 26 -------
> >  2 files changed, 82 insertions(+), 26 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/fsl,imx6ull-pxp.yaml b/Documentation/devicetree/bindings/media/fsl,imx6ull-pxp.yaml
> > new file mode 100644
> > index 000000000000..c1232689a261
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/fsl,imx6ull-pxp.yaml
> > @@ -0,0 +1,82 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/fsl,imx6ull-pxp.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale Pixel Pipeline
> > +
> > +maintainers:
> > +  - Philipp Zabel <p.zabel@pengutronix.de>
> > +  - Michael Tretter <m.tretter@pengutronix.de>
> > +
> > +description:
> > +  The Pixel Pipeline (PXP) is a memory-to-memory graphics processing engine
> > +  that supports scaling, colorspace conversion, alpha blending, rotation, and
> > +  pixel conversion via lookup table. Different versions are present on various
> > +  i.MX SoCs from i.MX23 to i.MX7.
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - const: fsl,imx6ul-pxp
> > +      - const: fsl,imx6ull-pxp
> > +      - const: fsl,imx7d-pxp
> 
> These three are an enum.

These are alternatives to the 'items:' entry below.

Are you suggesting to use the following statement?

oneOf:
  - enum:
      - fsl,imx6ul-pxp
      - fsl,imx6ull-pxp
      - fsl,imx7d-pxp
  - items:
      - enum:
          - fsl,imx6sll-pxp
          - fsl,imx6sx-pxp

Why is this better than the one that I used?

> 
> > +      - items:
> > +          - enum:
> > +              - fsl,imx6sll-pxp
> > +              - fsl,imx6sx-pxp
> > +          - const: fsl,imx6ull-pxp
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    minItems: 1
> > +    maxItems: 2
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: axi
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - fsl,imx6sx-pxp
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          numItems: 1
> 
> That's not correct syntax... I am surprised that it works. Did you test
> the bindings?

I copied this syntax from renesas,wdt.yaml and ran

	make ARCH=arm dtbs_check DT_SCHEMA_FILES=fsl,imx6ull-pxp.yaml

with SOC_IMX7D=y, SOC_IMX6UL=y, SOC_IMX6SLL=y, and SOC_IMX6SX=y. The latter
two were not enabled in the v1, which is why it didn't catch the missing
compatibles.

On a closer look, I just saw that the checker ignored the schema due to the
incorrect syntax and didn't produce any further errors. With the syntax fixed,
the checker now produces also a few more errors about power-domains, which I
will fix in v3.

Is this syntax correct?

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - fsl,imx6sx-pxp
    then:
      properties:
        interrupts:
          minItems: 1
          maxItems: 1
    else:
      properties:
        interrupts:
          minItems: 2
          maxItems: 2

Michael

  reply	other threads:[~2023-01-13 15:19 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13  9:54 [PATCH v2 00/16] media: imx-pxp: add support for i.MX7D Michael Tretter
2023-01-13  9:54 ` [PATCH v2 01/16] dt-bindings: media: fsl-pxp: convert to yaml Michael Tretter
2023-01-13 10:41   ` Laurent Pinchart
2023-01-13 11:46   ` Philipp Zabel
2023-01-13 11:56   ` Krzysztof Kozlowski
2023-01-13 15:09     ` Michael Tretter [this message]
2023-01-13 16:51       ` Krzysztof Kozlowski
2023-01-13 15:26   ` Rob Herring
2023-01-16 11:38   ` [PATCH v2.1 02/17] " Michael Tretter
2023-01-16 11:59     ` Krzysztof Kozlowski
2023-01-16 16:11       ` Laurent Pinchart
2023-01-13  9:54 ` [PATCH v2 02/16] media: imx-pxp: detect PXP version Michael Tretter
2023-01-13 10:44   ` Laurent Pinchart
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 03/16] media: imx-pxp: extract helper function to setup data path Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 04/16] media: imx-pxp: explicitly disable unused blocks Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 05/16] media: imx-pxp: disable LUT block Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 06/16] media: imx-pxp: make data_path_ctrl0 platform dependent Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13 12:03   ` Laurent Pinchart
2023-01-13  9:54 ` [PATCH v2 07/16] media: imx-pxp: add support for i.MX7D Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 08/16] ARM: dts: imx7d: add node for PXP Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-16 16:26   ` Laurent Pinchart
2023-01-20  9:06     ` Michael Tretter
2023-01-20  9:20       ` Laurent Pinchart
2023-02-09 14:02         ` Michael Tretter
2023-03-06  1:19           ` Shawn Guo
2023-01-13  9:54 ` [PATCH v2 09/16] media: imx-pxp: Sort headers alphabetically Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 10/16] media: imx-pxp: Don't set bus_info manually in .querycap() Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 11/16] media: imx-pxp: Add media controller support Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 12/16] media: imx-pxp: Pass pixel format value to find_format() Michael Tretter
2023-01-13 11:46   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 13/16] media: imx-pxp: Implement frame size enumeration Michael Tretter
2023-01-13 11:49   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 14/16] media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers Michael Tretter
2023-01-13 11:50   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 15/16] media: imx-pxp: Use non-threaded IRQ Michael Tretter
2023-01-13 11:52   ` Philipp Zabel
2023-01-13  9:54 ` [PATCH v2 16/16] media: imx-pxp: convert to regmap Michael Tretter
2023-01-13 11:56   ` Philipp Zabel
2023-01-14 21:29 ` [PATCH v2 00/16] media: imx-pxp: add support for i.MX7D Laurent Pinchart

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=20230113150943.GC20866@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    /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).