All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: kernel@collabora.com, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, geert+renesas@glider.be,
	robh+dt@kernel.org, xuwei5@hisilicon.com
Subject: Re: [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml
Date: Thu, 14 May 2020 11:36:17 +0200	[thread overview]
Message-ID: <20200514093617.dwhmqaasc3z5ixy6@rcn-XPS-13-9360> (raw)
In-Reply-To: <20200514015412.GF7425@pendragon.ideasonboard.com>

Hi Laurent, thanks for the thorough review. Some comments below:

On jue 14-05-2020 04:54:12, Laurent Pinchart wrote:
> > +description: |
> > +  The ADV7511, ADV7511W and ADV7513 are HDMI audio and video
> > +  transmitters compatible with HDMI 1.4 and DVI 1.0. They support color
> > +  space conversion, S/PDIF, CEC and HDCP. They support RGB input
> > +  interface.
> 
> I would write the last sentence as "The transmitter input is parallel
> RGB or YUV data." as YUV is also supported.

Ok.

> > +  adi,input-colorspace:
> > +    description: Input color space.
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/string
> > +      - enum: [ rgb, yuv422, yuv444 ]
> 
> Isn't string implied ? Can't you write
> 
>   adi,input-colorspace:
>     description: Input color space.
>     enum: [ rgb, yuv422, yuv444 ]

example-schema.yaml says that

    Vendor specific properties have slightly different schema
    requirements than common properties. They must have at least a type
    definition and 'description'.

However, dt_binding_check doesn't seem to enforce this rule for string
properties, and I saw a couple of vendor-specific string properties in
other bindings that don't define the type either, so I'm going to follow
your suggestion but only for string properties, the rest need a type
definition.

I noticed I can remove the "allOf" keywords from these too.

> > +  adi,embedded-sync:
> > +    description:
> > +      The input uses synchronization signals embedded in the data
> > +      stream (similar to BT.656). Defaults to 0 (separate H/V
> > +      synchronization signals).
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/uint32
> > +      - enum: [ 0, 1 ]
> > +      - default: 0
> 
> This be a boolean property (it is read as a bool by the driver, the
> property being absent means false, the property being present means
> true).

You're completely right.

> > +  ports:
> > +    description:
> > +      The ADV7511(W)/13 has two video ports and one audio port. This node
> > +      models their connections as documented in
> > +      Documentation/devicetree/bindings/media/video-interfaces.txt
> > +      Documentation/devicetree/bindings/graph.txt
> > +    type: object
> > +    properties:
> > +      port@0:
> > +        description: Video port for the RGB, YUV or DSI input.
> 
> s/RGB, YUV or DSI/RGB or YUV/

Ok.

> > +if:
> > +  not:
> > +    properties:
> > +      adi,input-colorspace:
> > +        contains:
> > +          enum: [ rgb, yuv444 ]
> > +      adi,input-clock:
> > +        contains:
> > +          const: 1x
> 
> As both properties take a single value, I think you can omit
> "contains:".

I think it's required here, removing it makes the test fail.

> > +required:
> > +  - compatible
> > +  - reg
> > +  - ports
> > +  - adi,input-depth
> > +  - adi,input-colorspace
> > +  - adi,input-clock
> 
> Shouldn't the power supplies be required ?

Good question. The original binding is not completely clear on
this. There's a "Required properties" section at the top that doesn't
include the supplies, the supplies block for the ADV7511/11w/13 looks
like a gray area in that regard, while the same block for ADV7533/35 is
more explicit in that they are required, and they are not listed in the
"Optional properties" section.

However, most of the DTs that use this binding don't define any
supplies. And AFAICT from looking at the code, regulator_get() will use
a dummy regulator and show a warning for every expected regulator that's
not defined in the DT.

If we want to be more strict and require the definition of all the
supplies, there will be many more DTs changes in the series, and I'm not
sure I'll be able to do that in a reasonable amount of time. I'm looking
at them and it's not always clear which regulators to use or if they are
even defined.

> > +description: |
> > +  The ADV7533 and ADV7535 are HDMI audio and video transmitters
> > +  compatible with HDMI 1.4 and DVI 1.0. They support color space
> > +  conversion, S/PDIF, CEC and HDCP. They support DSI for input pixels.
> 
> I would write the last sentence as "The transmitter input is MIPI DSI.".
>
> ...
>
> > +      Disables the interal timing generator. The chip will rely on the
> 
> s/interal/internal/
> 
> > +      sync signals in the DSI data lanes, rather than generate its own
> 
> s/generate/generating/
>
> ...
>
> > +    properties:
> > +      port@0:
> > +        description:
> > +          Video port for the RGB, YUV or DSI input. The remote endpoint
> 
> s/RGB, YUV or //

Ok.

> > +        ports {
> > +            #address-cells = <1>;
> > +            #size-cells = <0>;
> > +
> > +            port@0 {
> > +                reg = <0>;
> > +                adv7511w_in: endpoint {
> > +                    remote-endpoint = <&dpi_out>;
> > +                };
> > +            };
> > +
> > +            port@1 {
> > +                reg = <1>;
> > +                adv7511_out: endpoint {
> > +                    remote-endpoint = <&hdmi_connector_in>;
> > +                };
> > +            };
> 
> The name of the two endpoints doesn't match the adv7533. The remote
> endpoint phandle for port 0 should have dsi in its name.

Oops, thanks for catching these.

Cheers,
Ricardo

WARNING: multiple messages have this Message-ID (diff)
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: devicetree@vger.kernel.org, geert+renesas@glider.be,
	xuwei5@hisilicon.com, robh+dt@kernel.org, kernel@collabora.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml
Date: Thu, 14 May 2020 11:36:17 +0200	[thread overview]
Message-ID: <20200514093617.dwhmqaasc3z5ixy6@rcn-XPS-13-9360> (raw)
In-Reply-To: <20200514015412.GF7425@pendragon.ideasonboard.com>

Hi Laurent, thanks for the thorough review. Some comments below:

On jue 14-05-2020 04:54:12, Laurent Pinchart wrote:
> > +description: |
> > +  The ADV7511, ADV7511W and ADV7513 are HDMI audio and video
> > +  transmitters compatible with HDMI 1.4 and DVI 1.0. They support color
> > +  space conversion, S/PDIF, CEC and HDCP. They support RGB input
> > +  interface.
> 
> I would write the last sentence as "The transmitter input is parallel
> RGB or YUV data." as YUV is also supported.

Ok.

> > +  adi,input-colorspace:
> > +    description: Input color space.
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/string
> > +      - enum: [ rgb, yuv422, yuv444 ]
> 
> Isn't string implied ? Can't you write
> 
>   adi,input-colorspace:
>     description: Input color space.
>     enum: [ rgb, yuv422, yuv444 ]

example-schema.yaml says that

    Vendor specific properties have slightly different schema
    requirements than common properties. They must have at least a type
    definition and 'description'.

However, dt_binding_check doesn't seem to enforce this rule for string
properties, and I saw a couple of vendor-specific string properties in
other bindings that don't define the type either, so I'm going to follow
your suggestion but only for string properties, the rest need a type
definition.

I noticed I can remove the "allOf" keywords from these too.

> > +  adi,embedded-sync:
> > +    description:
> > +      The input uses synchronization signals embedded in the data
> > +      stream (similar to BT.656). Defaults to 0 (separate H/V
> > +      synchronization signals).
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/uint32
> > +      - enum: [ 0, 1 ]
> > +      - default: 0
> 
> This be a boolean property (it is read as a bool by the driver, the
> property being absent means false, the property being present means
> true).

You're completely right.

> > +  ports:
> > +    description:
> > +      The ADV7511(W)/13 has two video ports and one audio port. This node
> > +      models their connections as documented in
> > +      Documentation/devicetree/bindings/media/video-interfaces.txt
> > +      Documentation/devicetree/bindings/graph.txt
> > +    type: object
> > +    properties:
> > +      port@0:
> > +        description: Video port for the RGB, YUV or DSI input.
> 
> s/RGB, YUV or DSI/RGB or YUV/

Ok.

> > +if:
> > +  not:
> > +    properties:
> > +      adi,input-colorspace:
> > +        contains:
> > +          enum: [ rgb, yuv444 ]
> > +      adi,input-clock:
> > +        contains:
> > +          const: 1x
> 
> As both properties take a single value, I think you can omit
> "contains:".

I think it's required here, removing it makes the test fail.

> > +required:
> > +  - compatible
> > +  - reg
> > +  - ports
> > +  - adi,input-depth
> > +  - adi,input-colorspace
> > +  - adi,input-clock
> 
> Shouldn't the power supplies be required ?

Good question. The original binding is not completely clear on
this. There's a "Required properties" section at the top that doesn't
include the supplies, the supplies block for the ADV7511/11w/13 looks
like a gray area in that regard, while the same block for ADV7533/35 is
more explicit in that they are required, and they are not listed in the
"Optional properties" section.

However, most of the DTs that use this binding don't define any
supplies. And AFAICT from looking at the code, regulator_get() will use
a dummy regulator and show a warning for every expected regulator that's
not defined in the DT.

If we want to be more strict and require the definition of all the
supplies, there will be many more DTs changes in the series, and I'm not
sure I'll be able to do that in a reasonable amount of time. I'm looking
at them and it's not always clear which regulators to use or if they are
even defined.

> > +description: |
> > +  The ADV7533 and ADV7535 are HDMI audio and video transmitters
> > +  compatible with HDMI 1.4 and DVI 1.0. They support color space
> > +  conversion, S/PDIF, CEC and HDCP. They support DSI for input pixels.
> 
> I would write the last sentence as "The transmitter input is MIPI DSI.".
>
> ...
>
> > +      Disables the interal timing generator. The chip will rely on the
> 
> s/interal/internal/
> 
> > +      sync signals in the DSI data lanes, rather than generate its own
> 
> s/generate/generating/
>
> ...
>
> > +    properties:
> > +      port@0:
> > +        description:
> > +          Video port for the RGB, YUV or DSI input. The remote endpoint
> 
> s/RGB, YUV or //

Ok.

> > +        ports {
> > +            #address-cells = <1>;
> > +            #size-cells = <0>;
> > +
> > +            port@0 {
> > +                reg = <0>;
> > +                adv7511w_in: endpoint {
> > +                    remote-endpoint = <&dpi_out>;
> > +                };
> > +            };
> > +
> > +            port@1 {
> > +                reg = <1>;
> > +                adv7511_out: endpoint {
> > +                    remote-endpoint = <&hdmi_connector_in>;
> > +                };
> > +            };
> 
> The name of the two endpoints doesn't match the adv7533. The remote
> endpoint phandle for port 0 should have dsi in its name.

Oops, thanks for catching these.

Cheers,
Ricardo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-14  9:36 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 11:06 [PATCH v2 0/6] Convert adi,adv7511.txt DT bindings to yaml Ricardo Cañuelo
2020-05-11 11:06 ` Ricardo Cañuelo
2020-05-11 11:06 ` [PATCH v2 1/6] arm64: dts: renesas: make hdmi encoder nodes compliant with DT bindings Ricardo Cañuelo
2020-05-11 11:06   ` Ricardo Cañuelo
2020-05-11 11:51   ` Geert Uytterhoeven
2020-05-11 11:51     ` Geert Uytterhoeven
2020-05-14  1:33   ` Laurent Pinchart
2020-05-14  1:33     ` Laurent Pinchart
2020-05-11 11:06 ` [PATCH v2 2/6] ARM: " Ricardo Cañuelo
2020-05-11 11:06   ` Ricardo Cañuelo
2020-05-11 11:51   ` Geert Uytterhoeven
2020-05-11 11:51     ` Geert Uytterhoeven
2020-05-14  1:34   ` Laurent Pinchart
2020-05-14  1:34     ` Laurent Pinchart
2020-05-11 11:06 ` [PATCH v2 3/6] ARM: dts: zynq: add port definitions to hdmi-tx@39 Ricardo Cañuelo
2020-05-11 11:06   ` Ricardo Cañuelo
2020-05-11 12:24   ` Ezequiel Garcia
2020-05-11 12:24     ` Ezequiel Garcia
2020-05-11 12:52     ` Michal Simek
2020-05-11 12:52       ` Michal Simek
2020-05-14  1:36       ` Laurent Pinchart
2020-05-14  1:36         ` Laurent Pinchart
2020-05-11 11:06 ` [PATCH v2 4/6] arm64: dts: hisilicon: hikey: fixes to comply with adi,adv7533 DT binding Ricardo Cañuelo
2020-05-11 11:06   ` [PATCH v2 4/6] arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 " Ricardo Cañuelo
2020-05-14  1:37   ` [PATCH v2 4/6] arm64: dts: hisilicon: hikey: fixes to comply with adi,adv7533 " Laurent Pinchart
2020-05-14  1:37     ` Laurent Pinchart
2020-08-04 20:57   ` [PATCH v2 4/6] arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 " John Stultz
2020-08-04 20:57     ` John Stultz
2020-08-04 21:24     ` John Stultz
2020-08-04 21:24       ` John Stultz
2020-05-11 11:06 ` [PATCH v2 5/6] ARM: dts: iwg20d-q7-dbcm-ca: remove unneeded properties in hdmi@39 Ricardo Cañuelo
2020-05-11 11:06   ` Ricardo Cañuelo
2020-05-11 11:52   ` Geert Uytterhoeven
2020-05-11 11:52     ` Geert Uytterhoeven
2020-05-14  1:37   ` Laurent Pinchart
2020-05-14  1:37     ` Laurent Pinchart
2020-05-11 11:06 ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: convert to yaml Ricardo Cañuelo
2020-05-11 11:06   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi, adv7511.txt: " Ricardo Cañuelo
2020-05-14  1:54   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: " Laurent Pinchart
2020-05-14  1:54     ` Laurent Pinchart
2020-05-14  9:36     ` Ricardo Cañuelo [this message]
2020-05-14  9:36       ` Ricardo Cañuelo
2020-05-14 15:22       ` Laurent Pinchart
2020-05-14 15:22         ` Laurent Pinchart
2020-05-18 21:27         ` Rob Herring
2020-05-18 21:27           ` Rob Herring
2020-05-25  7:43         ` Ricardo Cañuelo
2020-05-25  7:43           ` Ricardo Cañuelo
2020-05-26  1:44           ` Laurent Pinchart
2020-05-26  1:44             ` Laurent Pinchart
2020-05-26  7:03             ` Geert Uytterhoeven
2020-05-26  7:03               ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi, adv7511.txt: " Geert Uytterhoeven
2020-05-26 10:11               ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: " Laurent Pinchart
2020-05-26 10:11                 ` Laurent Pinchart
2020-05-26 10:39                 ` Geert Uytterhoeven
2020-05-26 10:39                   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi, adv7511.txt: " Geert Uytterhoeven
2020-05-26 19:45                   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: " Ezequiel Garcia
2020-05-26 19:45                     ` Ezequiel Garcia
2020-05-27 17:29               ` Rob Herring
2020-05-27 17:29                 ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi, adv7511.txt: " Rob Herring
2020-05-27 18:18                 ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: " Geert Uytterhoeven
2020-05-27 18:18                   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi, adv7511.txt: " Geert Uytterhoeven
2020-05-28  6:36                   ` [PATCH v2 6/6] dt-bindings: drm: bridge: adi,adv7511.txt: " Ricardo Cañuelo
2020-05-28  6:36                     ` Ricardo Cañuelo
2020-05-11 11:55 ` [PATCH v2 0/6] Convert adi,adv7511.txt DT bindings " Geert Uytterhoeven
2020-05-11 11:55   ` Geert Uytterhoeven

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=20200514093617.dwhmqaasc3z5ixy6@rcn-XPS-13-9360 \
    --to=ricardo.canuelo@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=xuwei5@hisilicon.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 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.