devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Ezequiel Garcia <ezequiel@collabora.com>,
	linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: media: rockchip-vpu: Add RK3568 VEPU compatible
Date: Mon, 09 May 2022 11:24:50 +0200	[thread overview]
Message-ID: <3594222.Ivq9XVSPaC@archbook> (raw)
In-Reply-To: <422bf3bc-7787-97dd-6ab4-7570e5ce2ed8@linaro.org>

On Montag, 9. Mai 2022 09:25:23 CEST Krzysztof Kozlowski wrote:
> On 08/05/2022 22:25, Nicolas Frattaroli wrote:
> > The RK3568 and RK3566 have a Hantro VPU node solely dedicated to
> > encoding. This patch adds a compatible for it, and also allows
> > the bindings to only come with a vepu interrupt.
> > 
> > Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/media/rockchip-vpu.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > index bacb60a34989..4045f107ca4e 100644
> > --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > @@ -22,6 +22,7 @@ properties:
> >            - rockchip,rk3288-vpu
> >            - rockchip,rk3328-vpu
> >            - rockchip,rk3399-vpu
> > +          - rockchip,rk3568-vepu
> >            - rockchip,px30-vpu
> >        - items:
> >            - const: rockchip,rk3188-vpu
> > @@ -40,6 +41,7 @@ properties:
> >    interrupt-names:
> >      oneOf:
> >        - const: vdpu
> > +      - const: vepu
> 
> This should be enum (for both lines above) and you should add
> allOf:if:then with a constraints which variant can have which interrupts.
> 
> 
> Best regards,
> Krzysztof
> 

So something like this?

  interrupt-names:
    oneOf:
      - enum:
         - vdpu
         - vepu
      - items:
          - const: vepu
          - const: vdpu

What's the difference between a list of consts and an enum here?
I'm not very familiar with dt-schema, my apologies.

Also, since I don't know which of the other variants can have
the encoding interrupt and this wasn't brought up until now, I think
my solution will be to have a check for -vepu in the compatible and in
that case require that only the vepu interrupt is present, if that's
alright with you.

Regards,
Nicolas Frattaroli



  reply	other threads:[~2022-05-09  9:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-08 20:25 [PATCH v2 0/3] Enable JPEG Encoder on RK3566/RK3568 Nicolas Frattaroli
2022-05-08 20:25 ` [PATCH v2 1/3] dt-bindings: media: rockchip-vpu: Add RK3568 VEPU compatible Nicolas Frattaroli
2022-05-09  7:25   ` Krzysztof Kozlowski
2022-05-09  9:24     ` Nicolas Frattaroli [this message]
2022-05-09 10:41       ` Krzysztof Kozlowski
2022-05-08 20:25 ` [PATCH v2 3/3] arm64: dts: rockchip: Add Hantro encoder node to rk356x Nicolas Frattaroli
2022-05-09 14:17   ` Ezequiel Garcia
2022-05-10 15:27     ` Nicolas Frattaroli
2022-05-12 14:16       ` Ezequiel Garcia
2022-05-12 20:00         ` Nicolas Frattaroli
2022-05-12 21:33           ` Ezequiel Garcia
2022-05-13  6:23             ` Nicolas Frattaroli
2022-05-13 13:07               ` Ezequiel Garcia
2022-05-13 14:44                 ` Nicolas Frattaroli
2022-05-13 15:23                 ` Rob Herring
2022-05-13 16:36                   ` Nicolas Frattaroli

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=3594222.Ivq9XVSPaC@archbook \
    --to=frattaroli.nicolas@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.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).