Improve generic DT binding documentation for media devices
Subsystems (2)
cover Improve generic DT binding documentation for media devices
Hi folks,
This set improves the DT binding documentation for media devices where device specific documentation is lacking:
- Port and endpoint numbering
- lane numbering for the data-lanes property
Sakari Ailus (2):
dt: bindings: media: Document port and endpoint numbering
dt: bindings: media: Document data lane numbering without lane
reordering
.../devicetree/bindings/media/video-interfaces.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1505723105-16238-1-git-send-email-sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]
PATCH 1/2 dt: bindings: media: Document port and endpoint numbering
A lot of devices do not need and do not document port or endpoint numbering at all, e.g. in case where there's just a single port and a single endpoint. Whereas this is just common sense, document it to make it explicit.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +12 -0
@@ -55,6 +55,18 @@ divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width and data-shift properties can be used to assign physical data lines to each endpoint node (logical bus). +Port and endpoint numbering +--------------------------- + +While the port and endpoint numbers are ultimately specific to a device, +most devices have more limited scope than what the interface allows. They +may, for instance, only support a single endpoint on a port. Or there may +be only a single port on a device. + +Therefore, if ports are not explicitly documented for a device, only port +number zero shall be used. The same applies to endpoints: if endpoint +numbers are not explicitly documented, only endpoint number zero shall be +used. Required properties -------------------
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] dt: bindings: media: Document port and endpoint numbering
Quoted 9 lines · Sakari Ailus
A lot of devices do not need and do not document port or endpoint numbering at all, e.g. in case where there's just a single port and a single endpoint. Whereas this is just common sense, document it to make it explicit.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)
This is fine, but bindings should still be explicit. Otherwise, I'm wondering if it's a single port/endpoint or they just forgot to document it. And I shouldn't have to look at the example to infer that.
Re: [PATCH 1/2] dt: bindings: media: Document port and endpoint numbering
Hi Rob,
Thanks for the reply.
Quoted 11 lines · Rob Herring
Quoted 9 lines · Sakari Ailus
A lot of devices do not need and do not document port or endpoint numbering at all, e.g. in case where there's just a single port and a single endpoint. Whereas this is just common sense, document it to make it explicit.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Quoted 5 lines
This is fine, but bindings should still be explicit. Otherwise, I'm wondering if it's a single port/endpoint or they just forgot to document it. And I shouldn't have to look at the example to infer that.
Acked-by Rob Herring <[email protected]>
The purpose of the patch was to actually document port and endpoint numbering for devices for which it is not documented, not to suggest that this would be omitted in in binding documentation. The fact is that I couldn't find documentation for endpoint numbering for a single device under Documentation/devicetree/bindings/media/ . Yet I haven't come across DT source where other than zero would have been used. And the drivers (mostly?) have ignored endpoint numbers so far.
Some bindings have been omitted on the grounds that they're documented in video-interfaces.txt.
What would you think of the following? I'm not sure it'd really belong there, but it'd be a small piece of documentation one can easily refer to.
Quoted 1 line
From
e735979005244eb10597fe5333130b93e41d5a38Mon Sep 17 00:00:00 2001
From: Sakari Ailus <[email protected]>
Date: Mon, 18 Sep 2017 11:15:53 +0300
Subject: [PATCH 1/1] dt: bindings: media: Document practices for DT bindings,
ports, endpoints
Port and endpoint numbering has been omitted in DT binding documentation for a large number of devices. Also common properties the device uses have been missed in binding documentation. Make it explicit that these things need to be documented.
--- .../devicetree/bindings/media/video-interfaces.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
Documentation/devicetree/bindings/media/video-interfaces.txt +15 -0
@@ -55,6 +55,21 @@ divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width and data-shift properties can be used to assign physical data lines to each endpoint node (logical bus). +Documenting bindings for devices +-------------------------------- + +All required and optional bindings the device supports shall be explicitly +documented in device DT binding documentation. This also includes port and +endpoint numbering for the device. + +Port and endpoint numbering +--------------------------- + +Old binding documentation may have omitted explicitly specifying port and +endpoint numbers. This often applies to devices that have a single port and a +single endpoint in that port. In this case, the only valid port number for such +a device is zero. The same applies for devices for which bindings do not +document endpoint numbering: only zero is a valid endpoint. Required properties -------------------
Signature · 5 lines
2.7.4 -- Sakari Ailus [email protected]
A message that is not in the archive (sent off-list or not yet received): 20170921092516.yzjelpxka4firnwx-z7MJbOB4PBP+e+fPlCVrcFDQ4js95KgL@public.gmane.org
Re: [PATCH 1/2] dt: bindings: media: Document port and endpoint numbering
Quoted 22 lines · Sakari Ailus
Hi Rob,
Thanks for the reply.
Quoted 11 lines · Rob Herring
Quoted 9 lines · Sakari Ailus
A lot of devices do not need and do not document port or endpoint numbering at all, e.g. in case where there's just a single port and a single endpoint. Whereas this is just common sense, document it to make it explicit.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)Quoted 5 lines
This is fine, but bindings should still be explicit. Otherwise, I'm wondering if it's a single port/endpoint or they just forgot to document it. And I shouldn't have to look at the example to infer that.
Acked-by Rob Herring <[email protected]>
Quoted 7 lines
The purpose of the patch was to actually document port and endpoint numbering for devices for which it is not documented, not to suggest that this would be omitted in in binding documentation. The fact is that I couldn't find documentation for endpoint numbering for a single device under
Documentation/devicetree/bindings/media/. Yet I haven't come across DT source where other than zero would have been used. And the drivers (mostly?) have ignored endpoint numbers so far.
That's surprising. I know there are some for display controllers and it's a common review comment I give.
Quoted 6 lines
Some bindings have been omitted on the grounds that they're documented in video-interfaces.txt.
What would you think of the following? I'm not sure it'd really belong there, but it'd be a small piece of documentation one can easily refer to.
Looks good.
Quoted 47 lines
From
e735979005244eb10597fe5333130b93e41d5a38Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]>
Date: Mon, 18 Sep 2017 11:15:53 +0300
Subject: [PATCH 1/1] dt: bindings: media: Document practices for DT bindings,
ports, endpointsPort and endpoint numbering has been omitted in DT binding documentation for a large number of devices. Also common properties the device uses have been missed in binding documentation. Make it explicit that these things need to be documented.
--- .../devicetree/bindings/media/video-interfaces.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +15
-1@@ -55,6 +55,21 @@ divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width and data-shift properties can be used to assign physical data lines to each endpoint node (logical bus). +Documenting bindings for devices +-------------------------------- + +All required and optional bindings the device supports shall be explicitly +documented in device DT binding documentation. This also includes port and +endpoint numbering for the device. + +Port and endpoint numbering +--------------------------- + +Old binding documentation may have omitted explicitly specifying port and +endpoint numbers. This often applies to devices that have a single port and a +single endpoint in that port. In this case, the only valid port number for such +a device is zero. The same applies for devices for which bindings do not +document endpoint numbering: only zero is a valid endpoint. Required properties ------------------- --2.7.4
Quoted 3 lines
--
Sakari Ailus sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAL_JsqLX_cZv3_hwYjzFTcSkF+3bMoOeQw5qpFzT0W4agiXj1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 1/2] dt: bindings: media: Document port and endpoint numbering
Quoted 32 lines · Rob Herring
Quoted 22 lines · Sakari Ailus
Hi Rob,
Thanks for the reply.
Quoted 11 lines · Rob Herring
Quoted 9 lines · Sakari Ailus
A lot of devices do not need and do not document port or endpoint numbering at all, e.g. in case where there's just a single port and a single endpoint. Whereas this is just common sense, document it to make it explicit.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+)Quoted 5 lines
This is fine, but bindings should still be explicit. Otherwise, I'm wondering if it's a single port/endpoint or they just forgot to document it. And I shouldn't have to look at the example to infer that.
Acked-by Rob Herring <[email protected]>Quoted 7 lines
The purpose of the patch was to actually document port and endpoint numbering for devices for which it is not documented, not to suggest that this would be omitted in in binding documentation. The fact is that I couldn't find documentation for endpoint numbering for a single device under
Documentation/devicetree/bindings/media/. Yet I haven't come across DT source where other than zero would have been used. And the drivers (mostly?) have ignored endpoint numbers so far.
Quoted 2 lines
That's surprising. I know there are some for display controllers and it's a common review comment I give.
On V4L2 side we only have started paying attention recently. See e.g.
Documentation/devicetree/bindings/media/atmel-isc.txt Documentation/devicetree/bindings/media/ti,omap3isp.txt Documentation/devicetree/bindings/media/qcom,camss.txt
Quoted 9 lines
Quoted 7 lines
Some bindings have been omitted on the grounds that they're documented in video-interfaces.txt.
What would you think of the following? I'm not sure it'd really belong there, but it'd be a small piece of documentation one can easily refer to.
Looks good.
I'll resend the set, replacing the original patch.
Quoted 51 lines
Quoted 51 lines
From
e735979005244eb10597fe5333130b93e41d5a38Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]>
Date: Mon, 18 Sep 2017 11:15:53 +0300
Subject: [PATCH 1/1] dt: bindings: media: Document practices for DT bindings,
ports, endpointsPort and endpoint numbering has been omitted in DT binding documentation for a large number of devices. Also common properties the device uses have been missed in binding documentation. Make it explicit that these things need to be documented.
--- .../devicetree/bindings/media/video-interfaces.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)Documentation/devicetree/bindings/media/video-interfaces.txt +15
-1@@ -55,6 +55,21 @@ divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width and data-shift properties can be used to assign physical data lines to each endpoint node (logical bus). +Documenting bindings for devices +-------------------------------- + +All required and optional bindings the device supports shall be explicitly +documented in device DT binding documentation. This also includes port and +endpoint numbering for the device. + +Port and endpoint numbering +--------------------------- + +Old binding documentation may have omitted explicitly specifying port and +endpoint numbers. This often applies to devices that have a single port and a +single endpoint in that port. In this case, the only valid port number for such +a device is zero. The same applies for devices for which bindings do not +document endpoint numbering: only zero is a valid endpoint. Required properties ------------------- --2.7.4
--
Sakari Ailus sakari.ailus-VuQAYsv1563Yd54FQh9/[email protected]
Signature · 6 lines
Sakari Ailus e-mail: [email protected] -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 dt: bindings: media: Document data lane numbering without lane reordering
In reply to a message not in the archiveMost devices do not support lane reordering and in many cases the documentation of the data-lanes property is incomplete for such devices. Document that in case the lane reordering isn't supported, monotonically incremented values from 0 or 1 shall be used.
--- Documentation/devicetree/bindings/media/video-interfaces.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/video-interfaces.txt +4 -1
@@ -111,7 +111,10 @@ Optional endpoint properties determines the logical lane number, while the value of an entry indicates physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have "data-lanes = <1 2>;", assuming the clock lane is on hardware lane 0. - This property is valid for serial busses only (e.g. MIPI CSI-2). + If the hardware does not support lane reordering, monotonically + incremented values shall be used from 0 or 1 onwards, depending on + whether or not there is also a clock lane. This property is valid for + serial busses only (e.g. MIPI CSI-2). - clock-lanes: an array of physical clock lane indexes. Position of an entry determines the logical lane number, while the value of an entry indicates physical lane, e.g. for a MIPI CSI-2 bus we could have "clock-lanes = <0>;",
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] dt: bindings: media: Document data lane numbering without lane reordering
Quoted 9 lines · Sakari Ailus
Most devices do not support lane reordering and in many cases the documentation of the data-lanes property is incomplete for such devices. Document that in case the lane reordering isn't supported, monotonically incremented values from 0 or 1 shall be used.
Signed-off-by Sakari Ailus <[email protected]>--- Documentation/devicetree/bindings/media/video-interfaces.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)