dt-bindings: display: atmel,lcdc: convert to dtschema
PATCH v2 1/1 dt-bindings: display: atmel,lcdc: convert to dtschema
Convert the atmel,lcdc bindings to DT schema.
Changes during conversion: add missing clocks and clock-names properties.
---
This patch converts the existing lcdc display text binding to JSON schema. The binding is split into two namelylcdc.yaml
- Holds the frame buffer propertieslcdc-display.yaml
- Holds the display panel properties which is a phandle to the display property in lcdc fb node.
These bindings are tested against the existing at91 dts files using dtbs_check.
---
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/[email protected]
--- .../bindings/display/atmel,lcdc-display.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/display/atmel,lcdc.txt | 87 ------------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++ 3 files changed, 168 insertions(+), 87 deletions(-)
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +98 -0
@@ -0,0 +1,98 @@ +# 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 <[email protected]> + - Dharma Balasubiramani <[email protected]> + +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' ] + - required: [ bits-per-pixel ] + +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) + + bits-per-pixel: + $ref: /schemas/types.yaml#/definitions/uint32 + description: lcd panel bit-depth. + + 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 + description: lcd wiring mode "RGB" or "BRG" + + atmel,power-control-gpio: + description: gpio to power on or off the LCD (as many as needed) + + 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>; + }; + }; + };
Documentation/devicetree/bindings/display/atmel,lcdc.txt deleted +0 -87
87 lines not on this page · raw message
Documentation/devicetree/bindings/display/atmel,lcdc.yaml new file +70 -0
70 lines not on this page · raw message
---
base-commit: 90d35da658da8cff0d4ecbb5113f5fac9d00eb72
change-id: 20240223-lcdc-fb-b8d2e2f3c914
Best regards,
Signature · 1 line
Dharma Balasubiramani <[email protected]>
Rob Herring
maintainerQuoted 21 lines · Dharma Balasubiramani
Convert the atmel,lcdc bindings to DT schema.
Changes during conversion: add missing clocks and clock-names properties.Signed-off-by Dharma Balasubiramani <[email protected]>---
This patch converts the existing lcdc display text binding to JSON schema. The binding is split into two namelylcdc.yaml
- Holds the frame buffer propertieslcdc-display.yaml
- Holds the display panel properties which is a phandle to the display property in lcdc fb node.These bindings are tested against the existing at91 dts files using
dtbs_check.
---
Changes in v2:
- Run checkpatch and remove whitespace errors.
- Add the standard interrupt flags.
- Split the binding into two, namelylcdc.yamlandlcdc-display.yaml.
- Link to v1: https://lore.kernel.org/r/[email protected]
Quoted 6 lines
--- .../bindings/display/atmel,lcdc-display.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/display/atmel,lcdc.txt | 87 ------------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++ 3 files changed, 168 insertions(+), 87 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.example.dtb: display0: 'atmel,dmacon' is a required property
from schema $id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.example.dtb: display0: 'atmel,lcdcon2' is a required property
from schema $id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.example.dtb: display0: 'atmel,guard-time' is a required property
from schema $id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.example.dtb: display0: 'fsl,pcr', 'model' do not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/display/atmel,lcdc-display.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Quoted 52 lines · Dharma Balasubiramani
Convert the atmel,lcdc bindings to DT schema.
Changes during conversion: add missing clocks and clock-names properties.Signed-off-by Dharma Balasubiramani <[email protected]>---
This patch converts the existing lcdc display text binding to JSON schema. The binding is split into two namelylcdc.yaml
- Holds the frame buffer propertieslcdc-display.yaml
- Holds the display panel properties which is a phandle to the display property in lcdc fb node.These bindings are tested against the existing at91 dts files using
dtbs_check.
---
Changes in v2:
- Run checkpatch and remove whitespace errors.
- Add the standard interrupt flags.
- Split the binding into two, namelylcdc.yamlandlcdc-display.yaml.
- Link to v1: https://lore.kernel.org/r/[email protected]--- .../bindings/display/atmel,lcdc-display.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/display/atmel,lcdc.txt | 87 ------------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++ 3 files changed, 168 insertions(+), 87 deletions(-)Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +19
-0@@ -0,0 +1,98 @@ +# 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 <[email protected]> + - Dharma Balasubiramani <[email protected]> + +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.
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml line 29
Quoted 10 lines
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +10
-0+ +# 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' ] + - required: [ bits-per-pixel ]
Why quotes in other places? bits-per-pixel is generic property, so you are now selecting other bindings. Read carefully what Rob wrote.
Best regards,
Krzysztof
Quoted 59 lines · Krzysztof Kozlowski
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 56 lines · Dharma Balasubiramani
Convert the atmel,lcdc bindings to DT schema.
Changes during conversion: add missing clocks and clock-names properties.Signed-off-by Dharma Balasubiramani <[email protected]>---
This patch converts the existing lcdc display text binding to JSON schema. The binding is split into two namelylcdc.yaml
- Holds the frame buffer propertieslcdc-display.yaml
- Holds the display panel properties which is a phandle to the display property in lcdc fb node.These bindings are tested against the existing at91 dts files using
dtbs_check.
---
Changes in v2:
- Run checkpatch and remove whitespace errors.
- Add the standard interrupt flags.
- Split the binding into two, namelylcdc.yamlandlcdc-display.yaml.
- Link to v1: https://lore.kernel.org/r/[email protected]--- .../bindings/display/atmel,lcdc-display.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/display/atmel,lcdc.txt | 87 ------------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++ 3 files changed, 168 insertions(+), 87 deletions(-)Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +23
-0@@ -0,0 +1,98 @@ +# 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 <[email protected]> + - Dharma Balasubiramani <[email protected]> + +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 +
Quoted 8 lines
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml line 29
Quoted 6 lines
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +6
-0+select: + anyOf: + - required: [ 'atmel,dmacon' ] + - required: [ 'atmel,lcdcon2' ] + - required: [ 'atmel,guard-time' ] + - required: [ bits-per-pixel ]Why quotes in other places?
I got the following warnings when I tried to compile without adding the quotes for atmel,*
"[warning] too few spaces after comma (commas)"
and when I add quotes for "bits-per-pixel" it complained the following
"[error] string value is redundantly quoted with any quotes (quoted-strings)"
So I added quotes for properties with comma in them.
Quoted 2 lines
bits-per-pixel is generic property, so you
are now selecting other bindings. Read carefully what Rob wrote.
My bad, I should have inquired before arriving at any conclusion. Thanks for letting me know.
Shall I send v3 by removing "- required: [ bits-per-pixel ]" in select?
Quoted 5 lines
Best regards,
Krzysztof
Signature · 2 lines
With Best Regards, Dharma B.
Quoted 69 lines · On 04/03/2024 10:28, [email protected] wrote:
Quoted 59 lines · Krzysztof Kozlowski
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 56 lines · Dharma Balasubiramani
Convert the atmel,lcdc bindings to DT schema.
Changes during conversion: add missing clocks and clock-names properties.Signed-off-by Dharma Balasubiramani <[email protected]>---
This patch converts the existing lcdc display text binding to JSON schema. The binding is split into two namelylcdc.yaml
- Holds the frame buffer propertieslcdc-display.yaml
- Holds the display panel properties which is a phandle to the display property in lcdc fb node.These bindings are tested against the existing at91 dts files using
dtbs_check.
---
Changes in v2:
- Run checkpatch and remove whitespace errors.
- Add the standard interrupt flags.
- Split the binding into two, namelylcdc.yamlandlcdc-display.yaml.
- Link to v1: https://lore.kernel.org/r/[email protected]--- .../bindings/display/atmel,lcdc-display.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/display/atmel,lcdc.txt | 87 ------------------- .../devicetree/bindings/display/atmel,lcdc.yaml | 70 ++++++++++++++++ 3 files changed, 168 insertions(+), 87 deletions(-)Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +23
-0@@ -0,0 +1,98 @@ +# 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 <[email protected]> + - Dharma Balasubiramani <[email protected]> + +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 +Quoted 8 lines
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml line 29
Quoted 6 lines
Documentation/devicetree/bindings/display/atmel,lcdc-display.yaml new file +6
-0+select: + anyOf: + - required: [ 'atmel,dmacon' ] + - required: [ 'atmel,lcdcon2' ] + - required: [ 'atmel,guard-time' ] + - required: [ bits-per-pixel ]Why quotes in other places?
Quoted 4 lines
I got the following warnings when I tried to compile without adding the quotes for atmel,*
"[warning] too few spaces after comma (commas)"
Ah, right, because it is a list. Looks fine.
Quoted 5 lines
and when I add quotes for "bits-per-pixel" it complained the following
"[error] string value is redundantly quoted with any quotes (quoted-strings)"
Yep, right.
Quoted 10 lines
So I added quotes for properties with comma in them.
Quoted 2 lines
bits-per-pixel is generic property, so you
are now selecting other bindings. Read carefully what Rob wrote.My bad, I should have inquired before arriving at any conclusion. Thanks for letting me know.
Shall I send v3 by removing "- required: [ bits-per-pixel ]" in select?
Yes... and test entire bindings, not only your schema.
Best regards,
Krzysztof