All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Vladimir Zapolskiy <vz@mleia.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sandeep Jain <Sandeep_Jain@mentor.com>,
	Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Subject: Re: [PATCH 1/7] dt-bindings: mfd: ds90ux9xx: add description of TI DS90Ux9xx ICs
Date: Fri, 12 Oct 2018 14:44:23 +0300	[thread overview]
Message-ID: <1884479.fINZhmP2Mi@avalon> (raw)
In-Reply-To: <20181008211205.2900-2-vz@mleia.com>

Hi Vladimir,

Thank you for the patch.

On Tuesday, 9 October 2018 00:11:59 EEST Vladimir Zapolskiy wrote:
> From: Sandeep Jain <Sandeep_Jain@mentor.com>
> 
> The change adds device tree binding description of TI DS90Ux9xx
> series of serializer and deserializer controllers which support video,
> audio and control data transmission over FPD-III Link connection.
> 
> Signed-off-by: Sandeep Jain <Sandeep_Jain@mentor.com>
> [vzapolskiy: various updates and corrections of secondary importance]
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
> ---
>  .../devicetree/bindings/mfd/ti,ds90ux9xx.txt  | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/ti,ds90ux9xx.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/ti,ds90ux9xx.txt
> b/Documentation/devicetree/bindings/mfd/ti,ds90ux9xx.txt new file mode
> 100644
> index 000000000000..0733da88f7ef
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ti,ds90ux9xx.txt
> @@ -0,0 +1,66 @@
> +Texas Instruments DS90Ux9xx de-/serializer controllers
> +
> +Required properties:
> +- compatible: Must contain a generic "ti,ds90ux9xx" value and
> +	may contain one more specific value from the list:

If it "may" contain one more specific value, when should that value be 
present, and when can it be absent ?

> +	"ti,ds90ub925q",
> +	"ti,ds90uh925q",
> +	"ti,ds90ub927q",
> +	"ti,ds90uh927q",
> +	"ti,ds90ub926q",
> +	"ti,ds90uh926q",
> +	"ti,ds90ub928q",
> +	"ti,ds90uh928q",
> +	"ti,ds90ub940q",
> +	"ti,ds90uh940q".
> +
> +Optional properties:
> +- reg : Specifies the I2C slave address of a local de-/serializer.

You should explain when the reg property is required and when it isn't. This 
will in my opinion require a more detailed explanation of the DT model for 
this device.

> +- power-gpios : GPIO line to control supplied power to the device.

As Marek mentioned, a regulator would be better. I would make it a mandatory 
property, as the device always needs to be powered.

> +- ti,backward-compatible-mode : Overrides backward compatibility mode.
> +	Possible values are "<1>" or "<0>".
> +	If "ti,backward-compatible-mode" is not mentioned, the backward
> +	compatibility mode is not touched and given by hardware pin strapping.

This doesn't seem to be a device description to me, it's a software 
configuration. You should handle it in drivers.

> +- ti,low-frequency-mode : Overrides low frequency mode.
> +	Possible values are "<1>" or "<0>".
> +	If "ti,low-frequency-mode" is not mentioned, the low frequency mode
> +	is not touched and given by hardware pin strapping.

This sounds the same. How about giving a real life example of a case where you 
need to set these two properties to override the pin strapping, for the 
purpose of discussing the DT bindings ?

> +- ti,video-map-select-msb: Sets video bridge pins to MSB mode, if it is set
> +	MAPSEL pin value is ignored.
> +- ti,video-map-select-lsb: Sets video bridge pins to LSB mode, if it is set
> +	MAPSEL pin value is ignored.

I assume those two are mutually exclusive, this should be documented, or you 
could merge the two properties into one. Same comment as above though, why do 
you need an override in DT ?

> +- ti,pixel-clock-edge : Selects Pixel Clock Edge.
> +	Possible values are "<1>" or "<0>".
> +	If "ti,pixel-clock-edge" is High <1>, output data is strobed on the
> +	Rising edge of the PCLK. If ti,pixel-clock-edge is Low <0>, data is
> +	strobed on the Falling edge of the PCLK.
> +	If "ti,pixel-clock-edge" is not mentioned, the pixel clock edge
> +	value is not touched and given by hardware pin strapping.

We have a standard property in Documentation/devicetree/bindings/media/video-
interfaces.txt for this, please use it.

> +- ti,spread-spectrum-clock-generation : Spread Sprectrum Clock Generation.
> +	Possible values are from "<0>" to "<7>". The same value will be
> +	written to SSC register. If "ti,spread-spectrum-clock-gen" is not
> +	found, then SSCG will be disabled.

This makes sense in DT in my opinion, as EMC is a system property. I wonder 
however if exposing the hardware register directly is the best option. Could 
you elaborate on how a system designer will select which value to use, in 
order to find the best DT description ?

> +TI DS90Ux9xx serializers and deserializer device nodes may contain a number
> +of children device nodes to describe and enable particular subcomponents
> +found on ICs.

As mentioned in my review of the cover letter I don't think this is necessary. 
You can make the serializer and deserializer I2C controllers without subnodes. 
Same goes for GPIO control.

> +Example:
> +
> +serializer: serializer@c {
> +	compatible = "ti,ds90ub927q", "ti,ds90ux9xx";
> +	reg = <0xc>;
> +	power-gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>;
> +	ti,backward-compatible-mode = <0>;
> +	ti,low-frequency-mode = <0>;
> +	ti,pixel-clock-edge = <0>;
> +	...
> +}
> +
> +deserializer: deserializer@3c {
> +	compatible = "ti,ds90ub940q", "ti,ds90ux9xx";
> +	reg = <0x3c>;
> +	power-gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
> +	...
> +}
> +

Extra blank line ?

-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2018-10-12 11:44 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 21:11 [PATCH 0/7] mfd/pinctrl: add initial support of TI DS90Ux9xx ICs Vladimir Zapolskiy
2018-10-08 21:11 ` [PATCH 1/7] dt-bindings: mfd: ds90ux9xx: add description " Vladimir Zapolskiy
2018-10-09  0:13   ` Marek Vasut
2018-10-09 11:11     ` Vladimir Zapolskiy
2018-10-09 20:55       ` Vladimir Zapolskiy
2018-10-09 21:03         ` Marek Vasut
2018-10-10  8:41   ` Linus Walleij
2018-10-10  8:41     ` Linus Walleij
2018-10-10  8:41     ` Linus Walleij
2018-10-12 11:44   ` Laurent Pinchart [this message]
2018-10-13 14:28     ` Vladimir Zapolskiy
2018-10-13 14:28       ` Vladimir Zapolskiy
2018-10-16 12:30       ` Laurent Pinchart
2018-10-30 16:43   ` Luca Ceresoli
2018-10-30 23:40     ` Vladimir Zapolskiy
2018-10-08 21:12 ` [PATCH 2/7] dt-bindings: mfd: ds90ux9xx: add description of TI DS90Ux9xx I2C bridge Vladimir Zapolskiy
2018-10-12 11:54   ` Laurent Pinchart
2018-10-12 11:54     ` Laurent Pinchart
2018-10-30 16:43   ` Luca Ceresoli
2018-10-31 20:12     ` Vladimir Zapolskiy
2018-11-03 21:00       ` Luca Ceresoli
2018-11-03 22:07         ` Vladimir Zapolskiy
2018-10-08 21:12 ` [PATCH 3/7] dt-bindings: pinctrl: ds90ux9xx: add description of TI DS90Ux9xx pinmux Vladimir Zapolskiy
2018-10-10  8:45   ` Linus Walleij
2018-10-10  8:45     ` Linus Walleij
2018-10-17 15:02     ` Rob Herring
2018-10-17 15:02       ` Rob Herring
2018-10-12 12:01   ` Laurent Pinchart
2018-10-13 13:47     ` Vladimir Zapolskiy
2018-10-13 13:47       ` Vladimir Zapolskiy
2018-10-16 12:48       ` Laurent Pinchart
2018-10-30 16:44         ` Luca Ceresoli
2018-10-31 20:31           ` Vladimir Zapolskiy
2018-10-08 21:12 ` [PATCH 4/7] mfd: ds90ux9xx: add TI DS90Ux9xx de-/serializer MFD driver Vladimir Zapolskiy
2018-10-09  4:08   ` kbuild test robot
2018-10-09 11:14     ` Vladimir Zapolskiy
2018-10-12  6:03   ` Lee Jones
2018-10-12  7:41     ` Vladimir Zapolskiy
2018-10-12  7:41       ` Vladimir Zapolskiy
2018-10-12  8:39       ` Lee Jones
2018-10-12  9:20         ` Kieran Bingham
2018-10-12 10:58           ` Vladimir Zapolskiy
2018-10-12 10:58             ` Vladimir Zapolskiy
2018-10-12 11:34             ` Lee Jones
2018-10-12 14:13               ` Vladimir Zapolskiy
2018-10-12 14:25                 ` Lee Jones
2018-10-12 11:47             ` Kieran Bingham
2018-10-12 13:01               ` Laurent Pinchart
2018-10-12 13:59                 ` Vladimir Zapolskiy
2018-10-16 13:08                   ` Laurent Pinchart
2018-10-23  8:16                   ` Vladimir Zapolskiy
2018-10-30 16:44                     ` Luca Ceresoli
2018-10-13 15:10                 ` Vladimir Zapolskiy
2018-10-13 15:10                   ` Vladimir Zapolskiy
2018-10-16 13:12                   ` Laurent Pinchart
2018-10-16 18:32                     ` Vladimir Zapolskiy
2018-10-13 12:33               ` Vladimir Zapolskiy
2018-10-13 12:33                 ` Vladimir Zapolskiy
2018-10-12 11:24         ` Vladimir Zapolskiy
2018-10-12 11:24           ` Vladimir Zapolskiy
2018-10-12 11:43           ` Lee Jones
2018-10-12 14:23             ` Vladimir Zapolskiy
2018-10-12 13:07           ` Laurent Pinchart
2018-10-08 21:12 ` [PATCH 5/7] mfd: ds90ux9xx: add I2C bridge/alias and link connection driver Vladimir Zapolskiy
2018-10-12  6:04   ` Lee Jones
2018-10-12  7:32     ` Vladimir Zapolskiy
2018-10-12  7:32       ` Vladimir Zapolskiy
2018-10-12  9:03       ` Lee Jones
2018-10-12 13:12       ` Laurent Pinchart
2018-10-12 13:12         ` Laurent Pinchart
2018-10-12 14:36         ` Vladimir Zapolskiy
2018-10-16 14:06           ` Laurent Pinchart
2018-10-08 21:12 ` [PATCH 6/7] pinctrl: ds90ux9xx: add TI DS90Ux9xx pinmux and GPIO controller driver Vladimir Zapolskiy
2018-10-10  9:04   ` Linus Walleij
2018-10-10  9:04     ` Linus Walleij
2018-10-08 21:12 ` [PATCH 7/7] MAINTAINERS: add entry for TI DS90Ux9xx FPD-Link III drivers Vladimir Zapolskiy
2018-10-12 11:34 ` [PATCH 0/7] mfd/pinctrl: add initial support of TI DS90Ux9xx ICs Laurent Pinchart

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=1884479.fINZhmP2Mi@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Sandeep_Jain@mentor.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marek.vasut@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=vladimir_zapolskiy@mentor.com \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.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.