linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: 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, Jacob Chen <jacob-chen@iotwrt.com>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 3/5] dt-bindings: media: rockchip-vpu: Add PX30 compatible
Date: Mon, 11 Jan 2021 18:20:16 +0100	[thread overview]
Message-ID: <X/yI0BCrkrEI/K42@aptenodytes> (raw)
In-Reply-To: <a23ab40e50a761bd2127df6bc8b2a91e99a1617c.camel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2567 bytes --]

Hi Philipp,

On Thu 07 Jan 21, 15:55, Philipp Zabel wrote:
> Hi Paul,
> 
> On Thu, 2021-01-07 at 14:40 +0100, Paul Kocialkowski wrote:
> > The Rockchip PX30 SoC has a Hantro VPU that features a decoder (VDPU2)
> > and an encoder (VEPU2). It is similar to the RK3399's VPU but takes an
> > extra clock (SCLK).
> > 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> > ---
> >  .../bindings/media/rockchip-vpu.yaml          | 25 +++++++++++++------
> >  1 file changed, 17 insertions(+), 8 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > index c81dbc3e8960..c446b9ead21b 100644
> > --- a/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > +++ b/Documentation/devicetree/bindings/media/rockchip-vpu.yaml
> > @@ -15,10 +15,13 @@ description:
> >  
> >  properties:
> >    compatible:
> > -    enum:
> > -      - rockchip,rk3288-vpu
> > -      - rockchip,rk3328-vpu
> > -      - rockchip,rk3399-vpu
> > +    oneOf:
> > +      - const: rockchip,rk3288-vpu
> > +      - const: rockchip,rk3328-vpu
> > +      - const: rockchip,rk3399-vpu
> > +      - items:
> > +        - const: rockchip,px30-vpu
> > +        - const: rockchip,rk3399-vpu
> >  
> >    reg:
> >      maxItems: 1
> > @@ -35,12 +38,18 @@ properties:
> >            - const: vdpu
> >  
> >    clocks:
> > -    maxItems: 2
> > +    minItems: 2
> > +    maxItems: 3
> >  
> >    clock-names:
> > -    items:
> > -      - const: aclk
> > -      - const: hclk
> > +    oneOf:
> > +      - items:
> > +        - const: aclk
> > +        - const: hclk
> > +      - items:
> > +        - const: aclk
> > +        - const: hclk
> > +        - const: sclk
> 
> You could make this:
> 
>     clock-names:
>       minItems: 2
>       items:
>         - const: aclk
>         - const: hclk
>         - const: sclk
> 
> And then:
> 
> allOf:
>   - if:
>       properties:
>         compatible:
>           contains:
>             const: rockchip,px30-vpu
>     then:
>       properties:
>         clock-names:
>           minItems: 3
> 
> to make sure each variant has the correct clocks set.

Thanks for the suggestion! That's a finer grain that my proposal.

Rob, is there a preference for how this case should be handled?
Here, we want to specify an extra clock for the PX30 case.

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-01-11 17:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 13:40 [PATCH 0/5] Rockchip PX30 RGA and VPU support Paul Kocialkowski
2021-01-07 13:40 ` [PATCH 1/5] dt-bindings: media: rockchip-rga: Add PX30 compatible Paul Kocialkowski
2021-01-07 15:47   ` Rob Herring
2021-01-07 13:40 ` [PATCH 2/5] arm64: dts: rockchip: Add RGA support to the PX30 Paul Kocialkowski
2021-01-07 14:24   ` Paul Kocialkowski
2021-01-07 13:40 ` [PATCH 3/5] dt-bindings: media: rockchip-vpu: Add PX30 compatible Paul Kocialkowski
2021-01-07 14:55   ` Philipp Zabel
2021-01-11 17:20     ` Paul Kocialkowski [this message]
2021-01-07 15:47   ` Rob Herring
2021-01-07 13:41 ` [PATCH 4/5] arm64: dts: rockchip: Add VPU support for the PX30 Paul Kocialkowski
2021-01-07 13:41 ` [PATCH 5/5] media: hantro: Add support for the Rockchip PX30 Paul Kocialkowski
2021-01-07 19:08   ` Ezequiel Garcia
2021-01-08  9:05     ` Paul Kocialkowski
2021-01-08 10:48       ` Heiko Stübner
2021-01-08 10:49         ` Heiko Stübner
2021-01-08 13:13       ` Ezequiel Garcia
2021-01-11 17:23         ` Paul Kocialkowski
2021-06-21  2:57 ` [PATCH 0/5] Rockchip PX30 RGA and VPU support Ezequiel Garcia
2021-10-16 15:15   ` Michael Nazzareno Trimarchi

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=X/yI0BCrkrEI/K42@aptenodytes \
    --to=paul.kocialkowski@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=jacob-chen@iotwrt.com \
    --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 \
    --cc=thomas.petazzoni@bootlin.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).