diff mbox

[3/5] Documentation/devicetree/bindings: Add b850v3_lvds_dp

Message ID 1464626385-19253-4-git-send-email-peter.senna@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Senna Tschudin May 30, 2016, 4:39 p.m. UTC
Devicetree bindings documentation for the GE B850v3 LVDS/DP++
display bridge.

Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
---
 .../devicetree/bindings/ge/b850v3_lvds_dp.txt      | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt

Comments

Philipp Zabel June 2, 2016, 12:49 p.m. UTC | #1
Hi Peter,

Am Montag, den 30.05.2016, 18:39 +0200 schrieb Peter Senna Tschudin:
> Devicetree bindings documentation for the GE B850v3 LVDS/DP++
> display bridge.
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
> ---
>  .../devicetree/bindings/ge/b850v3_lvds_dp.txt      | 38 ++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> 
> diff --git a/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> new file mode 100644
> index 0000000..32e123a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> @@ -0,0 +1,38 @@
> +Driver for GE B850v3 LVDS/DP++ display bridge
> +
> +Required properties:
> +  - compatible : should be "ge,b850v3_lvds_dp".

In the cover mail you write that this is a combination of the STDP4028
DP transmitter and STDP2690 DP/DP++ converter. So shouldn't this binding
comprise two device tree nodes, one with compatible "st,stdp4028", one
with "st,stdp2690", then?
Is the stdp2690 connected to the stdp4028's i2c master?

regards
Philipp
Rob Herring June 2, 2016, 10:57 p.m. UTC | #2
On Mon, May 30, 2016 at 06:39:43PM +0200, Peter Senna Tschudin wrote:
> Devicetree bindings documentation for the GE B850v3 LVDS/DP++
> display bridge.
> 
> Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
> ---
>  .../devicetree/bindings/ge/b850v3_lvds_dp.txt      | 38 ++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> 
> diff --git a/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> new file mode 100644
> index 0000000..32e123a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> @@ -0,0 +1,38 @@
> +Driver for GE B850v3 LVDS/DP++ display bridge
> +
> +Required properties:
> +  - compatible : should be "ge,b850v3_lvds_dp".
> +  - reg : should contain the address used to ack the interrupts.
> +  - interrupt-parent : should link to the gpio used as interrupt
> +    source on the host.
> +  - interrupts : one interrupt should be described here, as in
> +    <0 IRQ_TYPE_LEVEL_HIGH>.
> +  - edid-reg : should contain the address used to read edid information

This should be known based on the bridge chip you are using.

> +  - port : should describe the vide signal connection between the host
> +    and the bridge.
> +
> +Example:
> +
> +&mux2_i2c2 {
> +	status = "okay";
> +	clock-frequency = <100000>;
> +
> +	b850v3_dp_bridge {

Don't use '_' in node or property names or compatible strings.

> +		compatible = "ge,b850v3_lvds_dp";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		reg = <0x73>;
> +		interrupt-parent = <&gpio2>;
> +		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
> +
> +		edid-reg = <0x72>;
> +
> +		port@0 {
> +			reg = <0>;
> +			b850v3_dp_bridge_in: endpoint {
> +				remote-endpoint = <&lvds0_out>;
> +			};
> +		};
> +	};
> +};
> -- 
> 2.5.5
>
Peter Senna June 2, 2016, 11:19 p.m. UTC | #3
Hi Philipp,

Thank you very much for the review! I'll send V2 soon, doing my best to avoid collisions with other patches that are under review.

On Thursday, June 2, 2016 14:49 CEST, Philipp Zabel <p.zabel@pengutronix.de> wrote: 
 
> Hi Peter,
> 
> Am Montag, den 30.05.2016, 18:39 +0200 schrieb Peter Senna Tschudin:

> > Devicetree bindings documentation for the GE B850v3 LVDS/DP++
> > display bridge.
> > 
> > Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com>
> > ---
> >  .../devicetree/bindings/ge/b850v3_lvds_dp.txt      | 38 ++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> > new file mode 100644
> > index 0000000..32e123a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
> > @@ -0,0 +1,38 @@
> > +Driver for GE B850v3 LVDS/DP++ display bridge
> > +
> > +Required properties:
> > +  - compatible : should be "ge,b850v3_lvds_dp".
> 
> In the cover mail you write that this is a combination of the STDP4028
> DP transmitter and STDP2690 DP/DP++ converter. So shouldn't this binding
> comprise two device tree nodes, one with compatible "st,stdp4028", one
> with "st,stdp2690", then?
> Is the stdp2690 connected to the stdp4028's i2c master?

The hardware and firmware made it complicated for this binding to comprise two device tree nodes. The hardware and firmware are designed to configure both bridges based on the LVDS signal. This part works very well, but it leave the driver powerless to control the video processing pipeline. The bridges sort of behave as a single bridge, the sort of part is the need of interacting with both bridges: EDID from the STDP2690 and HPD events from the STDP4028. So the driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

I would find it nicer to be author of two drivers instead of one, but as the behavior handled by the driver is specific of the B850v3, and do not reflect the standard behavior of each bridge, I find it unlikely that the driver could be useful to handle STDP4028 and STPD2690 with stock firmware, or in other designs. On the other hand, I made sure to use the chip name on the defines to maximize chances of reuse.

Peter
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
new file mode 100644
index 0000000..32e123a
--- /dev/null
+++ b/Documentation/devicetree/bindings/ge/b850v3_lvds_dp.txt
@@ -0,0 +1,38 @@ 
+Driver for GE B850v3 LVDS/DP++ display bridge
+
+Required properties:
+  - compatible : should be "ge,b850v3_lvds_dp".
+  - reg : should contain the address used to ack the interrupts.
+  - interrupt-parent : should link to the gpio used as interrupt
+    source on the host.
+  - interrupts : one interrupt should be described here, as in
+    <0 IRQ_TYPE_LEVEL_HIGH>.
+  - edid-reg : should contain the address used to read edid information
+  - port : should describe the vide signal connection between the host
+    and the bridge.
+
+Example:
+
+&mux2_i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	b850v3_dp_bridge {
+		compatible = "ge,b850v3_lvds_dp";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x73>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+		edid-reg = <0x72>;
+
+		port@0 {
+			reg = <0>;
+			b850v3_dp_bridge_in: endpoint {
+				remote-endpoint = <&lvds0_out>;
+			};
+		};
+	};
+};