From: Rob Herring <robh@kernel.org>
To: Dharma Balasubiramani <dharma.b@microchip.com>
Cc: devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
David Airlie <airlied@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] dt-bindings: display: atmel,lcdc: convert to dtschema
Date: Mon, 4 Mar 2024 16:01:54 -0600 [thread overview]
Message-ID: <20240304220154.GA1115739-robh@kernel.org> (raw)
In-Reply-To: <20240304-lcdc-fb-v3-1-8b616fbb0199@microchip.com>
On Mon, Mar 04, 2024 at 08:00:03PM +0530, Dharma Balasubiramani wrote:
> Convert the atmel,lcdc bindings to DT schema.
> Changes during conversion: add missing clocks and clock-names properties.
>
> Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
> ---
> This patch converts the existing lcdc display text binding to JSON schema.
> The binding is split into two namely
> lcdc.yaml
> - Holds the frame buffer properties
> lcdc-display.yaml
> - Holds the display panel properties which is a phandle to the display
> property in lcdc fb node.
>
> These bindings are tested using the following command.
> 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> ---
> Changes in v3:
> - Remove the generic property "bits-per-pixel"
> - Link to v2: https://lore.kernel.org/r/20240304-lcdc-fb-v2-1-a14b463c157a@microchip.com
>
> Changes in v2:
> - Run checkpatch and remove whitespace errors.
> - Add the standard interrupt flags.
> - Split the binding into two, namely lcdc.yaml and lcdc-display.yaml.
> - Link to v1: https://lore.kernel.org/r/20240223-lcdc-fb-v1-1-4c64cb6277df@microchip.com
> ---
> .../bindings/display/atmel,lcdc-display.yaml | 97 ++++++++++++++++++++++
> .../devicetree/bindings/display/atmel,lcdc.txt | 87 -------------------
> .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++
> 3 files changed, 167 insertions(+), 87 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml b/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml
> new file mode 100644
> index 000000000000..5e0b706d695d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml
> @@ -0,0 +1,97 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip's LCDC Display
> +
> +maintainers:
> + - Nicolas Ferre <nicolas.ferre@microchip.com>
> + - Dharma Balasubiramani <dharma.b@microchip.com>
> +
> +description:
> + The LCD Controller (LCDC) consists of logic for transferring LCD image data
> + from an external display buffer to a TFT LCD panel. The LCDC has one display
> + input buffer per layer that fetches pixels through the single bus host
> + interface and a look-up table to allow palletized display configurations. The
> + LCDC is programmable on a per layer basis, and supports different LCD
> + resolutions, window sizes, image formats and pixel depths.
> +
> +# We need a select here since this schema is applicable only for nodes with the
> +# following properties
> +
> +select:
> + anyOf:
> + - required: [ 'atmel,dmacon' ]
> + - required: [ 'atmel,lcdcon2' ]
> + - required: [ 'atmel,guard-time' ]
> +
> +properties:
> + atmel,dmacon:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: dma controller configuration
> +
> + atmel,lcdcon2:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd controller configuration
> +
> + atmel,guard-time:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd guard time (Delay in frame periods)
Is there a maximum?
> +
> + bits-per-pixel:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd panel bit-depth.
Constraints?
> +
> + atmel,lcdcon-backlight:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: enable backlight
> +
> + atmel,lcdcon-backlight-inverted:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: invert backlight PWM polarity
> +
> + atmel,lcd-wiring-mode:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
Isn't this just a single string rather than an array?
> + description: lcd wiring mode "RGB" or "BRG"
enum:
- RGB
- BRG
No BGR?
But wait, the example shows the value is '1'. That should fail testing.
It didn't, but I've now fixed that.
> +
> + atmel,power-control-gpio:
> + description: gpio to power on or off the LCD (as many as needed)
maxItems: 1
> +
> + display-timings:
> + $ref: panel/display-timings.yaml#
> +
> +required:
> + - atmel,dmacon
> + - atmel,lcdcon2
> + - atmel,guard-time
> + - bits-per-pixel
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + display: panel {
> + bits-per-pixel = <32>;
> + atmel,lcdcon-backlight;
> + atmel,dmacon = <0x1>;
> + atmel,lcdcon2 = <0x80008002>;
> + atmel,guard-time = <9>;
> + atmel,lcd-wiring-mode = <1>;
> +
> + display-timings {
> + native-mode = <&timing0>;
> + timing0: timing0 {
> + clock-frequency = <9000000>;
> + hactive = <480>;
> + vactive = <272>;
> + hback-porch = <1>;
> + hfront-porch = <1>;
> + vback-porch = <40>;
> + vfront-porch = <1>;
> + hsync-len = <45>;
> + vsync-len = <1>;
> + };
> + };
> + };
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Dharma Balasubiramani <dharma.b@microchip.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] dt-bindings: display: atmel,lcdc: convert to dtschema
Date: Mon, 4 Mar 2024 16:01:54 -0600 [thread overview]
Message-ID: <20240304220154.GA1115739-robh@kernel.org> (raw)
In-Reply-To: <20240304-lcdc-fb-v3-1-8b616fbb0199@microchip.com>
On Mon, Mar 04, 2024 at 08:00:03PM +0530, Dharma Balasubiramani wrote:
> Convert the atmel,lcdc bindings to DT schema.
> Changes during conversion: add missing clocks and clock-names properties.
>
> Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
> ---
> This patch converts the existing lcdc display text binding to JSON schema.
> The binding is split into two namely
> lcdc.yaml
> - Holds the frame buffer properties
> lcdc-display.yaml
> - Holds the display panel properties which is a phandle to the display
> property in lcdc fb node.
>
> These bindings are tested using the following command.
> 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> ---
> Changes in v3:
> - Remove the generic property "bits-per-pixel"
> - Link to v2: https://lore.kernel.org/r/20240304-lcdc-fb-v2-1-a14b463c157a@microchip.com
>
> Changes in v2:
> - Run checkpatch and remove whitespace errors.
> - Add the standard interrupt flags.
> - Split the binding into two, namely lcdc.yaml and lcdc-display.yaml.
> - Link to v1: https://lore.kernel.org/r/20240223-lcdc-fb-v1-1-4c64cb6277df@microchip.com
> ---
> .../bindings/display/atmel,lcdc-display.yaml | 97 ++++++++++++++++++++++
> .../devicetree/bindings/display/atmel,lcdc.txt | 87 -------------------
> .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++
> 3 files changed, 167 insertions(+), 87 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml b/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml
> new file mode 100644
> index 000000000000..5e0b706d695d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml
> @@ -0,0 +1,97 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip's LCDC Display
> +
> +maintainers:
> + - Nicolas Ferre <nicolas.ferre@microchip.com>
> + - Dharma Balasubiramani <dharma.b@microchip.com>
> +
> +description:
> + The LCD Controller (LCDC) consists of logic for transferring LCD image data
> + from an external display buffer to a TFT LCD panel. The LCDC has one display
> + input buffer per layer that fetches pixels through the single bus host
> + interface and a look-up table to allow palletized display configurations. The
> + LCDC is programmable on a per layer basis, and supports different LCD
> + resolutions, window sizes, image formats and pixel depths.
> +
> +# We need a select here since this schema is applicable only for nodes with the
> +# following properties
> +
> +select:
> + anyOf:
> + - required: [ 'atmel,dmacon' ]
> + - required: [ 'atmel,lcdcon2' ]
> + - required: [ 'atmel,guard-time' ]
> +
> +properties:
> + atmel,dmacon:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: dma controller configuration
> +
> + atmel,lcdcon2:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd controller configuration
> +
> + atmel,guard-time:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd guard time (Delay in frame periods)
Is there a maximum?
> +
> + bits-per-pixel:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: lcd panel bit-depth.
Constraints?
> +
> + atmel,lcdcon-backlight:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: enable backlight
> +
> + atmel,lcdcon-backlight-inverted:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: invert backlight PWM polarity
> +
> + atmel,lcd-wiring-mode:
> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
Isn't this just a single string rather than an array?
> + description: lcd wiring mode "RGB" or "BRG"
enum:
- RGB
- BRG
No BGR?
But wait, the example shows the value is '1'. That should fail testing.
It didn't, but I've now fixed that.
> +
> + atmel,power-control-gpio:
> + description: gpio to power on or off the LCD (as many as needed)
maxItems: 1
> +
> + display-timings:
> + $ref: panel/display-timings.yaml#
> +
> +required:
> + - atmel,dmacon
> + - atmel,lcdcon2
> + - atmel,guard-time
> + - bits-per-pixel
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + display: panel {
> + bits-per-pixel = <32>;
> + atmel,lcdcon-backlight;
> + atmel,dmacon = <0x1>;
> + atmel,lcdcon2 = <0x80008002>;
> + atmel,guard-time = <9>;
> + atmel,lcd-wiring-mode = <1>;
> +
> + display-timings {
> + native-mode = <&timing0>;
> + timing0: timing0 {
> + clock-frequency = <9000000>;
> + hactive = <480>;
> + vactive = <272>;
> + hback-porch = <1>;
> + hfront-porch = <1>;
> + vback-porch = <40>;
> + vfront-porch = <1>;
> + hsync-len = <45>;
> + vsync-len = <1>;
> + };
> + };
> + };
next prev parent reply other threads:[~2024-03-04 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 14:30 [PATCH v3] dt-bindings: display: atmel,lcdc: convert to dtschema Dharma Balasubiramani
2024-03-04 14:30 ` Dharma Balasubiramani
2024-03-04 22:01 ` Rob Herring [this message]
2024-03-04 22:01 ` Rob Herring
2024-03-06 14:35 ` Dharma.B
2024-03-06 14:35 ` Dharma.B
2024-03-06 16:46 ` Nicolas Ferre
2024-03-06 16:46 ` Nicolas Ferre
2024-03-07 5:50 ` Dharma.B
2024-03-07 5:50 ` Dharma.B
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=20240304220154.GA1115739-robh@kernel.org \
--to=robh@kernel.org \
--cc=airlied@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dharma.b@microchip.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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.