From: Sam Ravnborg <sam@ravnborg.org>
To: Maxime Ripard <maxime@cerno.tech>
Cc: devicetree@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
dri-devel@lists.freedesktop.org,
Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH v1 1/4] dt-bindings: display: convert atmel-hlcdc to DT Schema
Date: Wed, 15 Apr 2020 18:39:56 +0200 [thread overview]
Message-ID: <20200415163956.GB7965@ravnborg.org> (raw)
In-Reply-To: <20200414082803.exblunwe7bufbiht@gilmour.lan>
Hi Maxime.
On Tue, Apr 14, 2020 at 10:28:03AM +0200, Maxime Ripard wrote:
> Hi Sam,
>
> On Sun, Apr 12, 2020 at 08:20:09PM +0200, Sam Ravnborg wrote:
> > diff --git a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml
> > new file mode 100644
> > index 000000000000..7eb6266a25a2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.yaml
> > @@ -0,0 +1,102 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/atmel/hlcdc-dc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Atmel HLCDC (High LCD Controller) display controller
> > +
> > +maintainers:
> > + - Sam Ravnborg <sam@ravnborg.org>
> > + - Boris Brezillon <bbrezillon@kernel.org>
> > +
> > +description: |
> > + The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device.
> > + See ../../mfd/atmel-hlcdc.yaml for more details.
> > +
> > +properties:
> > + compatible:
> > + const: atmel,hlcdc-display-controller
> > +
> > + "#address-cells":
> > + const: 1
> > + "#size-cells":
> > + const: 0
> > +
> > +required:
> > + - compatible
> > + - "#address-cells"
> > + - "#size-cells"
> > +
> > +patternProperties:
> > + "^port@[0-9]$":
> > + type: object
> > + description: |
> > + A port node with endpoint definitions as defined in
> > + ../../media/video-interfaces.txt
> > +
> > + properties:
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
> > +
> > + reg:
> > + maxItems: 1
> > + description: The virtual number of the port
> > +
> > + patternProperties:
> > + "^endpoint(@[0-9])$":
>
> I guess you meant ^endpoint(@[0-9])?$ instead?
I think "^endpoint@[0-9]$" will do the trick.
No need for endpoints with numbers higher than 9.
>
> > + type: object
> > +
> > + properties:
> > + reg:
> > + maxItems: 1
> > + description: The virtual number of the endpoint
> > +
> > + bus-width:
> > + enum: [12, 16, 18, 24]
> > + description:
> > + Any endpoint node may specify a desired video interface
> > + according to ../../media/video-interfaces.txt, specifically
> > + Recognized values are <12>, <16>, <18> and <24>, and
> > + override any output mode selection heuristic, forcing
> > + "rgb444", "rgb565", "rgb666" and "rgb888" respectively.
> > +
> > + remote-endpoint:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + phandle to the panel node
> > +
> > + required:
> > + - reg
>
> And if so, reg depends on whether the unit-address is set or not, so
> you can't really enforce that.
>
> > diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml
> > new file mode 100644
> > index 000000000000..cad14fa173a1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.yaml
> > @@ -0,0 +1,78 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mfd/atmel-hlcdc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Device-Tree bindings for Atmel's HLCDC (High LCD Controller)
> > +
> > +maintainers:
> > + - Sam Ravnborg <sam@ravnborg.org>
> > + - Boris Brezillon <bbrezillon@kernel.org>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - atmel,at91sam9n12-hlcdc
> > + - atmel,at91sam9x5-hlcdc
> > + - atmel,sama5d2-hlcdc
> > + - atmel,sama5d3-hlcdc
> > + - atmel,sama5d4-hlcdc
> > + - microchip,sam9x60-hlcdc
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 3
>
> Having descirptions of what those clocks are would be nice.
OK, will dig them up from the data sheet
>
> > + clock-names:
> > + maxItems: 3
> > + items:
> > + - const: periph_clk
> > + - const: sys_clk
> > + - const: slow_clk
> > +
> > + interrupts:
> > + description: The HLCDC interrupt line
> > + maxItems: 1
> > +
> > + hlcdc_pwm:
> > + type: object
> > + description: |
> > + PWM controller - used for backlight.
> > + See ../pwm/atmel-hlcdc-pwm.yaml for details
> > +
> > + hlcdc-display-controller:
> > + type: object
> > + description: |
> > + LCD display controller
> > + See ../display/atmel/hlcdc-dc.yaml for details
>
> I guess you could include those two schemas to make sure that it's
> valid? Otherwise, if you have an hlcdc-display-controller (or pwm)
> node without a compatible, it will not be checked here, and will not
> be checked by the hlcdc-dc.yaml schemas either since it matches on the
> compatible.
Good point - will fix in v2.
Thanks for the feedback.
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-15 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-12 18:20 [PATCH v1 0/4] dt-bindings: DT Schema variants of atmel lcdc, hlcdc Sam Ravnborg
2020-04-12 18:20 ` [PATCH v1 1/4] dt-bindings: display: convert atmel-hlcdc to DT Schema Sam Ravnborg
2020-04-14 8:28 ` Maxime Ripard
2020-04-15 16:39 ` Sam Ravnborg [this message]
2020-04-16 7:28 ` Maxime Ripard
2020-04-12 18:20 ` [PATCH v1 2/4] dt-bindings: display: convert atmel lcdc " Sam Ravnborg
2020-04-14 8:30 ` Maxime Ripard
2020-04-15 16:44 ` Sam Ravnborg
2020-04-16 7:31 ` Maxime Ripard
2020-04-12 18:20 ` [PATCH v1 3/4] dt-bindings: media: add wiring property to video-interfaces Sam Ravnborg
2020-04-14 19:40 ` Rob Herring
2020-04-15 16:45 ` Sam Ravnborg
2020-04-12 18:20 ` [PATCH v1 4/4] dt-bindings: display: add port support to atmel lcdc Sam Ravnborg
2020-04-14 19:10 ` Rob Herring
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=20200415163956.GB7965@ravnborg.org \
--to=sam@ravnborg.org \
--cc=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=mchehab@kernel.org \
--cc=nicolas.ferre@microchip.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).