All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Hyun Kwon <hyun.kwon@xilinx.com>,
	Satish Kumar Nagireddy <SATISHNA@xilinx.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v9 1/4] dt-bindings: display: xlnx: Add ZynqMP DP subsystem bindings
Date: Fri, 8 Nov 2019 16:31:55 +0200	[thread overview]
Message-ID: <20191108143155.GA15731@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20191108141040.GK4866@pendragon.ideasonboard.com>

On Fri, Nov 08, 2019 at 04:10:40PM +0200, Laurent Pinchart wrote:
> On Fri, Nov 08, 2019 at 04:07:33PM +0200, Laurent Pinchart wrote:
> > On Thu, Sep 26, 2019 at 09:57:29AM -0500, Rob Herring wrote:
> > > On Thu, Sep 26, 2019 at 9:23 AM Laurent Pinchart wrote:
> > >> On Thu, Sep 26, 2019 at 09:15:01AM -0500, Rob Herring wrote:
> > >>> On Wed, Sep 25, 2019 at 6:56 PM Laurent Pinchart wrote:
> > >>>>
> > >>>> From: Hyun Kwon <hyun.kwon@xilinx.com>
> > >>>>
> > >>>> The bindings describe the ZynqMP DP subsystem. They don't support the
> > >>>> interface with the programmable logic (FPGA) or audio yet.
> > >>>>
> > >>>> Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
> > >>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >>>> ---
> > >>>> Changes since v8:
> > >>>>
> > >>>> - Convert to yaml
> > >>>> - Rename aclk to dp_apb_clk
> > >>>
> > >>> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml:
> > >>> display@fd4a0000: clock-names:2: 'dp_vtc_pixel_clk_in' was expected
> > >>
> > >> If you allow me to steal a bit of your brain time, could you help me
> > >> expressing the clocks constraint ?
> > >>
> > >>   clocks:
> > >>     description:
> > >>       The AXI clock and at least one video clock are mandatory, the audio clock
> > >>       optional.
> > >>     minItems: 2
> > >>     maxItems: 4
> > >>     items:
> > >>       - description: AXI clock
> > >>       - description: Audio clock
> > >>       - description: Non-live video clock (from Processing System)
> > >>       - description: Live video clock (from Programmable Logic)
> > >>   clock-names:
> > >>     minItems: 2
> > >>     maxItems: 4
> > >>     items:
> > >>       - const: dp_apb_clk
> > >>       - const: dp_aud_clk
> > >>       - const: dp_vtc_pixel_clk_in
> > >>       - const: dp_live_video_in_clk
> > >>
> > >> dp_apb_clk is required, dp_aud_clk is optional, and at least one of
> > >> dp_vtc_pixel_clk_in and dp_live_video_in_clk is required.
> > > 
> > > I'm hoping people's inability to express the schema will prevent
> > > complicated ones like this in the first place...
> > > 
> > > clock-names:
> > >   oneOf:
> > >     - minItems: 3
> > >       maxItems: 4
> > >       items:
> > >         - const: dp_apb_clk
> > >         - const: dp_aud_clk
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >     - minItems: 2
> > >       maxItems: 3
> > >       items:
> > >         - const: dp_apb_clk
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > 
> > The above would make
> > 
> > 	clock-names = "dp_apb_clk", "dp_vtc_pixel_clk_in", "dp_vtc_pixel_clk_in";
> > 
> > valid. I've investigated a little bit and found uniqueItems which solves
> > my issue.
> > 
> > Would the following simpler solution be acceptable ?
> > 
> > clock-names:
> >     minItems: 2
> >     maxItems: 4
> >     items:
> >       - const: dp_apb_clk
> >       - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> >       - const: dp_aud_clk
> >       - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> >     uniqueItems: true
> 
> To give more context,
> 
>   clocks:
>     description:
>       The AXI clock and at least one video clock are mandatory, the audio clock
>       is optional.
>     minItems: 2
>     maxItems: 4
>     items:
>       - description: dp_apb_clk is the AXI clock
>       - description: dp_aud_clk is the Audio clock
>       - description:
>           dp_vtc_pixel_clk_in is the non-live video clock (from Processing
>           System)
>       - description:
>           dp_live_video_in_clk is the live video clock (from Programmable
>           Logic)
>   clock-names:
>       minItems: 2
>       maxItems: 4
>       items:
>         - const: dp_apb_clk
>         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
>         - const: dp_aud_clk
>         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
>       uniqueItems: true

There's something going on that I can't really understand...

clock-names:
  minItems: 2
  maxItems: 4
  items:
    - const: dp_apb_clk
    - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
    - const: dp_aud_clk
    - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
  uniqueItems: true

results in dt_mk_schema complaining about an invalid schema. However,
the following works:

clock-names:
  oneOf:
    - minItems: 2
      maxItems: 4
      items:
        - const: dp_apb_clk
        - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
        - const: dp_aud_clk
        - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
      uniqueItems: true

I assume this is due to clock-names being a string-array, which already
contains uniqueItems. However, if I leave uniqueItems out, an example
with a duplicated clock-names validates fine.

> > > Strictly speaking, that leaves items clocks wrong, but 'description'
> > > doesn't do anything. So I'd just leave it as is.
> > 
> > Speaking of which, there doesn't seem to be anything that validates the
> > size of clocks and clock-names being identical. Is that a known issue ?

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, Hyun Kwon <hyun.kwon@xilinx.com>,
	Michal Simek <michal.simek@xilinx.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Satish Kumar Nagireddy <SATISHNA@xilinx.com>
Subject: Re: [PATCH v9 1/4] dt-bindings: display: xlnx: Add ZynqMP DP subsystem bindings
Date: Fri, 8 Nov 2019 16:31:55 +0200	[thread overview]
Message-ID: <20191108143155.GA15731@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20191108141040.GK4866@pendragon.ideasonboard.com>

On Fri, Nov 08, 2019 at 04:10:40PM +0200, Laurent Pinchart wrote:
> On Fri, Nov 08, 2019 at 04:07:33PM +0200, Laurent Pinchart wrote:
> > On Thu, Sep 26, 2019 at 09:57:29AM -0500, Rob Herring wrote:
> > > On Thu, Sep 26, 2019 at 9:23 AM Laurent Pinchart wrote:
> > >> On Thu, Sep 26, 2019 at 09:15:01AM -0500, Rob Herring wrote:
> > >>> On Wed, Sep 25, 2019 at 6:56 PM Laurent Pinchart wrote:
> > >>>>
> > >>>> From: Hyun Kwon <hyun.kwon@xilinx.com>
> > >>>>
> > >>>> The bindings describe the ZynqMP DP subsystem. They don't support the
> > >>>> interface with the programmable logic (FPGA) or audio yet.
> > >>>>
> > >>>> Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
> > >>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >>>> ---
> > >>>> Changes since v8:
> > >>>>
> > >>>> - Convert to yaml
> > >>>> - Rename aclk to dp_apb_clk
> > >>>
> > >>> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml:
> > >>> display@fd4a0000: clock-names:2: 'dp_vtc_pixel_clk_in' was expected
> > >>
> > >> If you allow me to steal a bit of your brain time, could you help me
> > >> expressing the clocks constraint ?
> > >>
> > >>   clocks:
> > >>     description:
> > >>       The AXI clock and at least one video clock are mandatory, the audio clock
> > >>       optional.
> > >>     minItems: 2
> > >>     maxItems: 4
> > >>     items:
> > >>       - description: AXI clock
> > >>       - description: Audio clock
> > >>       - description: Non-live video clock (from Processing System)
> > >>       - description: Live video clock (from Programmable Logic)
> > >>   clock-names:
> > >>     minItems: 2
> > >>     maxItems: 4
> > >>     items:
> > >>       - const: dp_apb_clk
> > >>       - const: dp_aud_clk
> > >>       - const: dp_vtc_pixel_clk_in
> > >>       - const: dp_live_video_in_clk
> > >>
> > >> dp_apb_clk is required, dp_aud_clk is optional, and at least one of
> > >> dp_vtc_pixel_clk_in and dp_live_video_in_clk is required.
> > > 
> > > I'm hoping people's inability to express the schema will prevent
> > > complicated ones like this in the first place...
> > > 
> > > clock-names:
> > >   oneOf:
> > >     - minItems: 3
> > >       maxItems: 4
> > >       items:
> > >         - const: dp_apb_clk
> > >         - const: dp_aud_clk
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >     - minItems: 2
> > >       maxItems: 3
> > >       items:
> > >         - const: dp_apb_clk
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > >         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> > 
> > The above would make
> > 
> > 	clock-names = "dp_apb_clk", "dp_vtc_pixel_clk_in", "dp_vtc_pixel_clk_in";
> > 
> > valid. I've investigated a little bit and found uniqueItems which solves
> > my issue.
> > 
> > Would the following simpler solution be acceptable ?
> > 
> > clock-names:
> >     minItems: 2
> >     maxItems: 4
> >     items:
> >       - const: dp_apb_clk
> >       - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> >       - const: dp_aud_clk
> >       - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
> >     uniqueItems: true
> 
> To give more context,
> 
>   clocks:
>     description:
>       The AXI clock and at least one video clock are mandatory, the audio clock
>       is optional.
>     minItems: 2
>     maxItems: 4
>     items:
>       - description: dp_apb_clk is the AXI clock
>       - description: dp_aud_clk is the Audio clock
>       - description:
>           dp_vtc_pixel_clk_in is the non-live video clock (from Processing
>           System)
>       - description:
>           dp_live_video_in_clk is the live video clock (from Programmable
>           Logic)
>   clock-names:
>       minItems: 2
>       maxItems: 4
>       items:
>         - const: dp_apb_clk
>         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
>         - const: dp_aud_clk
>         - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
>       uniqueItems: true

There's something going on that I can't really understand...

clock-names:
  minItems: 2
  maxItems: 4
  items:
    - const: dp_apb_clk
    - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
    - const: dp_aud_clk
    - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
  uniqueItems: true

results in dt_mk_schema complaining about an invalid schema. However,
the following works:

clock-names:
  oneOf:
    - minItems: 2
      maxItems: 4
      items:
        - const: dp_apb_clk
        - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
        - const: dp_aud_clk
        - enum: [ dp_vtc_pixel_clk_in, dp_live_video_in_clk ]
      uniqueItems: true

I assume this is due to clock-names being a string-array, which already
contains uniqueItems. However, if I leave uniqueItems out, an example
with a duplicated clock-names validates fine.

> > > Strictly speaking, that leaves items clocks wrong, but 'description'
> > > doesn't do anything. So I'd just leave it as is.
> > 
> > Speaking of which, there doesn't seem to be anything that validates the
> > size of clocks and clock-names being identical. Is that a known issue ?

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-11-08 14:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 23:55 [PATCH v9 0/4] Xilinx ZynqMP DisplayPort Subsystem DRM/KMS driver Laurent Pinchart
2019-09-25 23:55 ` [PATCH v9 1/4] dt-bindings: display: xlnx: Add ZynqMP DP subsystem bindings Laurent Pinchart
2019-09-26 14:15   ` Rob Herring
2019-09-26 14:23     ` Laurent Pinchart
2019-09-26 14:57       ` Rob Herring
2019-11-08 14:07         ` Laurent Pinchart
2019-11-08 14:07           ` Laurent Pinchart
2019-11-08 14:10           ` Laurent Pinchart
2019-11-08 14:10             ` Laurent Pinchart
2019-11-08 14:31             ` Laurent Pinchart [this message]
2019-11-08 14:31               ` Laurent Pinchart
2019-11-08 15:57               ` Rob Herring
2019-11-08 15:57                 ` Rob Herring
2019-11-08 16:01                 ` Laurent Pinchart
2019-11-08 16:01                   ` Laurent Pinchart
2019-11-08 16:12                   ` Laurent Pinchart
2019-11-08 16:12                     ` Laurent Pinchart
2019-11-08 16:15                     ` Laurent Pinchart
2019-11-08 16:15                       ` Laurent Pinchart
2019-11-08 17:11                       ` Rob Herring
2019-11-08 17:11                         ` Rob Herring
2019-09-25 23:55 ` [PATCH v9 2/4] drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem Laurent Pinchart
2019-09-28  0:04   ` Hyun Kwon
2019-11-08 17:13     ` Laurent Pinchart
2019-11-08 23:52       ` Hyun Kwon
2019-09-25 23:55 ` [PATCH v9 3/4] arm64: dts: zynqmp: Add DisplayPort subsystem Laurent Pinchart
2019-09-25 23:55 ` [PATCH v9 4/4] arm64: dts: zynqmp: zcu106-revA: Wire up the " 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=20191108143155.GA15731@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=SATISHNA@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hyun.kwon@xilinx.com \
    --cc=michal.simek@xilinx.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.