Re: [PATCH v1] dt-bindings: display: Convert fsl,imx-fb.txt to dt-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 17, 2022 at 06:49:02PM +0100, Krzysztof Kozlowski wrote:
> On 16/11/2022 18:49, Philipp Zabel wrote:
> > On Thu, Nov 10, 2022 at 10:49:45AM +0100, Uwe Kleine-König wrote:
> > [...]
> >> new file mode 100644
> >> index 000000000000..c3cf6f92a766
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/display/imx/fsl,imx-lcdc.yaml
> >> @@ -0,0 +1,110 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/display/imx/fsl,imx-lcdc.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: Freescale i.MX LCD Controller, found on i.MX1, i.MX21, i.MX25 and i.MX27
> >> +
> >> +maintainers:
> >> +  - Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> >> +  - Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>
> >> +
> >> +properties:
> >> +  compatible:
> >> +    oneOf:
> >> +      - items:
> >> +          - enum:
> >> +              - fsl,imx1-fb
> >> +              - fsl,imx21-fb
> > 
> > Are the items/enum keywords superfluous here? Couldn't this just be two
> > 
> >          - const: fsl,imx1-fb
> >          - const: fsl,imx21-fb
> > 
> > entries?
> 
> Only "items" is, so should be dropped.

Status quo are the following settings:

imx25.dtsi uses:
	compatible = "fsl,imx25-fb", "fsl,imx21-fb";
imx27.dtsi uses:
	compatible = "fsl,imx27-fb", "fsl,imx21-fb";

The fb driver (drivers/video/fbdev/imxfb.c) supports devices with
"fsl,imx1-fb" and "fsl,imx21-fb" in their comaptible list.

So my best guess is to assume an i.MX21 would use

	compatible = "fsl,imx21-fb";

and an i.MX1 would use:

	compatible = "fsl,imx1-fb";

. Looking at the driver it might be that it works in i.MX1 mode on an
i.MX2x. The latter has some additional registers, higher y-resolution
and supports 16, 18 and 24 bpp.

However my actual plan was to support the drm driver with the saner
binding on i.MX25 and not cleanup the driver and binding I want to
deprecate.

So I'd go for putting into the legacy binding what is currently done in
arch/arm/boot/dts and the driver allowing exactly:

	compatible = "fsl,imx27-fb", "fsl,imx21-fb";
	compatible = "fsl,imx25-fb", "fsl,imx21-fb";
	compatible = "fsl,imx21-fb";
	compatible = "fsl,imx1-fb";

I thinks this is accomplished using:

  compatible:
    oneOf:
      - enum:
          - fsl,imx1-fb
	  - fsl,imx21-fb
      - items
          - enum:
	      - fsl,imx25-fb
	      - fsl,imx27-fb
	  - const: fsl,imx21-fb

right?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux