Skip to contentSkip to conversation

megachips-stdpxxxx-ge-b850v3-fw

PATCH Applied Peter Senna Tschudin 4 participants 10 messages Mar 3, 2017 – Mar 13, 2017

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v3 cover megachips-stdpxxxx-ge-b850v3-fw

The video processing pipeline on the second output on the GE B850v3:

Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output

Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3.

The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

Changes from V2:
- Added Acked-by: Rob Herring <[email protected]> on patch 1/4
- Fixed the driver to allow it to be compiled as a module

Changes from V1:
- Fix bindings documentation
- Fix white space issues on the driver
- Improved ge_b850v3_lvds_remove() to not rely on ge_b850v3_lvds_ptr->edid

Changes from V7(was GE B850v3 LVDS/DP++ Bridge):
- New devicetree binding with one node per bridge, and two ports per bridge
- Two i2c_devices, one per bridge
- Removed uneeded mutexes
- Moved documentation to bindings/display/bridge
- Included test for EDID extension blocks
- Renamed bridge pointer to ge_b850v3_lvds_ptr
- Removed the call to drm_helper_hpd_irq_event()
- Removed assignments to bridge.driver_private

Changes from V6:
- Removed check for pixel clock as the bridge supports up to 330Mhz while the host is limited to 264 MHz in very specific conditions.
- Added a second mutex to avoid concurrency issues while acking interrupts from threaded interrupt handlers.
- Renamed the edid mutex to be more descriptive.
- Added a .detach() function that disables the interrupts.
- Adopted i2c_new_secondary_device() and updated the dts and documentation to match the new method.
- Removed useless test to drm_bridge_add()
- Did some refactoring around devm_request_threaded_irq()
- Added a missing call to i2c_unregister_device() on the i2c_driver.remove() function.

Changes from V5:
- Change to MAINTAINERS in a separate patch
- Reworked interrupt handler initialization
- Removed useless calls to: drm_connector_register(), drm_helper_hpd_irq_event(), and drm_bridge_enable()

Changes from V4:
- Renamed the i2c_driver.name from "ge,b850v3-lvds-dp" to "b850v3-lvds-dp" to remove the comma from the driver name

Changes from V3:
- Removed the patch that was configuring the mapping between IPUs and external displays on the dts file

Peter Senna Tschudin (4):
dt-bindings: display: megachips-stdpxxxx-ge-b850v3-fw
MAINTAINERS: Add entry for megachips-stdpxxxx-ge-b850v3-fw drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++) dts/imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges

    (LVDS-DP++)
 .../bridge/megachips-stdpxxxx-ge-b850v3-fw.txt     |  94 +++++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 MAINTAINERS                                        |   8 +
 arch/arm/boot/dts/imx6q-b850v3.dts                 |  68 ++++
 drivers/gpu/drm/bridge/Kconfig                     |  11 +
 drivers/gpu/drm/bridge/Makefile                    |   1 +
 .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   | 428 +++++++++++++++++++++
 7 files changed, 611 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
 create mode 100644 drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
Signature · 1 line
2.9.3
#1 lore raw

PATCH v3 1/4 dt-bindings: display: megachips-stdpxxxx-ge-b850v3-fw

Devicetree binding documentation for the second video output of the GE B850v3:
STDP4028-ge-b850v3-fw bridges (LVDS-DP) STDP2690-ge-b850v3-fw bridges (DP-DP++)

Added entry for MegaChips at:
Documentation/devicetree/bindings/vendor-prefixes.txt

Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>

---
Changes from V3:
Added Acked-by: Rob Herring <[email protected]>

Changes from V1:
- New subject
- Moved binding documentation from bindings/video/ to bindings/display/bridge/
- Reworded to describe hardware instead of the driver
- Reformated the bindings to have one set of required properties per device
- Updated reg description
- Defined number of ports and what they are for

 .../bridge/megachips-stdpxxxx-ge-b850v3-fw.txt     | 94 ++++++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 2 files changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt new file +94 -0
new file mode 100644
index 0000000..7baa658
@@ -0,0 +1,94 @@
+Drivers for the second video output of the GE B850v3:
+   STDP4028-ge-b850v3-fw bridges (LVDS-DP)
+   STDP2690-ge-b850v3-fw bridges (DP-DP++)
+
+The video processing pipeline on the second output on the GE B850v3:
+
+   Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output
+
+Each bridge has a dedicated flash containing firmware for supporting the custom
+design. The result is that, in this design, neither the STDP4028 nor the
+STDP2690 behave as the stock bridges would. The compatible strings include the
+suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with
+the firmware specific for the GE B850v3.
+
+The hardware do not provide control over the video processing pipeline, as the
+two bridges behaves as a single one. The only interfaces exposed by the
+hardware are EDID, HPD, and interrupts.
+
+stdp4028-ge-b850v3-fw required properties:
+  - compatible : "megachips,stdp4028-ge-b850v3-fw"
+  - reg : I2C bus address
+  - interrupt-parent : phandle of the interrupt controller that services
+    interrupts to the device
+  - interrupts : one interrupt should be described here, as in
+    <0 IRQ_TYPE_LEVEL_HIGH>
+  - ports : One input port(reg = <0>) and one output port(reg = <1>)
+
+stdp2690-ge-b850v3-fw required properties:
+    compatible : "megachips,stdp2690-ge-b850v3-fw"
+  - reg : I2C bus address
+  - ports : One input port(reg = <0>) and one output port(reg = <1>)
+
+Example:
+
+&mux2_i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	stdp4028@73 {
+		compatible = "megachips,stdp4028-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x73>;
+
+		interrupt-parent = <&gpio2>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp4028_in: endpoint {
+					remote-endpoint = <&lvds0_out>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				stdp4028_out: endpoint {
+					remote-endpoint = <&stdp2690_in>;
+				};
+			};
+		};
+	};
+
+	stdp2690@72 {
+		compatible = "megachips,stdp2690-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x72>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp2690_in: endpoint {
+					remote-endpoint = <&stdp4028_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				stdp2690_out: endpoint {
+					/* Connector for external display */
+				};
+			};
+		};
+	};
+};
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
index ec0bfb9..4686f4b 100644
@@ -178,6 +178,7 @@ maxim	Maxim Integrated Products
 mcube	mCube
 meas	Measurement Specialties
 mediatek	MediaTek Inc.
+megachips	MegaChips
 melexis	Melexis N.V.
 melfas	MELFAS Inc.
 memsic	MEMSIC Inc.
Signature · 1 line
2.9.3
#2 lore raw

PATCH v3 2/4 MAINTAINERS: Add entry for megachips-stdpxxxx-ge-b850v3-fw

In reply to Peter Senna Tschudin

Add MAINTAINERS entry for the second video output of the GE B850v3:

       STDP4028-ge-b850v3-fw bridges (LVDS-DP)
       STDP2690-ge-b850v3-fw bridges (DP-DP++)
Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>
CC David Airlie <[email protected]>
CC Thierry Reding <[email protected]>
CC Thierry Reding <[email protected]>
CC Archit Taneja <[email protected]>

---
Unchanged since V1

 MAINTAINERS | 8 ++++++++
 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
index bc12716..d8c841a 100644
@@ -8127,6 +8127,14 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/net/wireless/mediatek/mt7601u/
 
+MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
+M:	Peter Senna Tschudin <[email protected]>
+M:	Martin Donnelly <[email protected]>
+M:	Martyn Welch <[email protected]>
+S:	Maintained
+F:	drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
+F:	Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
+
 MEGARAID SCSI/SAS DRIVERS
 M:	Kashyap Desai <[email protected]>
 M:	Sumit Saxena <[email protected]>
Signature · 1 line
2.9.3
#3 lore raw

PATCH v3 3/4 drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++)

In reply to Peter Senna Tschudin

The video processing pipeline on the second output on the GE B850v3:

Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output

Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3.

The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

This driver adds one i2c_device for each bridge, but only one drm_bridge. This design allows the creation of a functional connector that is capable of reading EDID from the STDP2690 while handling interrupts on the STDP4028.

Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc David Airlie <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Archit Taneja <[email protected]>
Cc Enric Balletbo <[email protected]>

---
Changes from V2:
- Fix the code to allow it be compiled as a module

Changes from V1:
- Updated copyright year
- Fixed blank line issues
- Updated ge_b850v3_lvds_remove() to not rely on ge_b850v3_lvds_ptr->edid and added a comment to explain the test.
- Fixed checkpatch strict warnings about continuation lines. In one case fixing the warning would cause the continuation line to be over 80 chars and that strict warning remains.

 drivers/gpu/drm/bridge/Kconfig                     |  11 +
 drivers/gpu/drm/bridge/Makefile                    |   1 +
 .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   | 428 +++++++++++++++++++++
 3 files changed, 440 insertions(+)
 create mode 100644 drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
drivers/gpu/drm/bridge/Kconfig +11 -0
index eb8688e..4a937f1 100644
@@ -48,6 +48,17 @@ config DRM_DW_HDMI_I2S_AUDIO
 	  Support the I2S Audio interface which is part of the Synopsis
 	  Designware HDMI block.
 
+config DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW
+	tristate "MegaChips stdp4028-ge-b850v3-fw and stdp2690-ge-b850v3-fw"
+	depends on OF
+	select DRM_KMS_HELPER
+	select DRM_PANEL
+	---help---
+          This is a driver for the display bridges of
+          GE B850v3 that convert dual channel LVDS
+          to DP++. This is used with the i.MX6 imx-ldb
+          driver. You are likely to say N here.
+
 config DRM_NXP_PTN3460
 	tristate "NXP PTN3460 DP/LVDS bridge"
 	depends on OF
drivers/gpu/drm/bridge/Makefile +1 -0
index 2e83a785..af0b7cc 100644
@@ -5,6 +5,7 @@ obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o
 obj-$(CONFIG_DRM_DW_HDMI) += dw-hdmi.o
 obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw-hdmi-ahb-audio.o
 obj-$(CONFIG_DRM_DW_HDMI_I2S_AUDIO) += dw-hdmi-i2s-audio.o
+obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o
 obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o
 obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o
 obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c new file +428 -0

428 lines not on this page · raw message

Signature · 1 line
2.9.3
#4 lore raw

PATCH v3 4/4 dts/imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges (LVDS-DP++)

In reply to Peter Senna Tschudin

Configures the megachips-stdpxxxx-ge-b850v3-fw bridges on the GE B850v3 dts file.

Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>

---
Unchanged since V1.

 arch/arm/boot/dts/imx6q-b850v3.dts | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
arch/arm/boot/dts/imx6q-b850v3.dts +68 -0
index b237429..3ec54da 100644
@@ -72,6 +72,13 @@
 		fsl,data-mapping = "spwg";
 		fsl,data-width = <24>;
 		status = "okay";
+
+		port@4 {
+			reg = <4>;
+			lvds0_out: endpoint {
+				remote-endpoint = <&stdp4028_in>;
+			};
+		};
 	};
 };
 
@@ -146,3 +153,64 @@
 &usdhc2 {
 	status = "disabled";
 };
+
+&mux2_i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	stdp4028@73 {
+		compatible = "megachips,stdp4028-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x73>;
+
+		interrupt-parent = <&gpio2>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp4028_in: endpoint {
+					remote-endpoint = <&lvds0_out>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				stdp4028_out: endpoint {
+					remote-endpoint = <&stdp2690_in>;
+				};
+			};
+		};
+	};
+
+	stdp2690@72 {
+		compatible = "megachips,stdp2690-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x72>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp2690_in: endpoint {
+					remote-endpoint = <&stdp4028_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				stdp2690_out: endpoint {
+					/* Connector for external display */
+				};
+			};
+		};
+	};
+};
Signature · 1 line
2.9.3
#5 lore raw

Re: [PATCH V3 4/4] dts/imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges (LVDS-DP++)

On Fri, Mar 03, 2017 at 04:57:10PM +0100, Peter Senna Tschudin wrote:

Hi Shawn Guo,

Now that the driver and binding are in, can you pick this up?

Thank you!

Quoted 104 lines

Configures the megachips-stdpxxxx-ge-b850v3-fw bridges on the GE B850v3 dts file.

Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>

---
Unchanged since V1.

 arch/arm/boot/dts/imx6q-b850v3.dts | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
arch/arm/boot/dts/imx6q-b850v3.dts +68 -0
index b237429..3ec54da 100644
@@ -72,6 +72,13 @@
 		fsl,data-mapping = "spwg";
 		fsl,data-width = <24>;
 		status = "okay";
+
+		port@4 {
+			reg = <4>;
+			lvds0_out: endpoint {
+				remote-endpoint = <&stdp4028_in>;
+			};
+		};
 	};
 };
 
@@ -146,3 +153,64 @@
 &usdhc2 {
 	status = "disabled";
 };
+
+&mux2_i2c2 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	stdp4028@73 {
+		compatible = "megachips,stdp4028-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x73>;
+
+		interrupt-parent = <&gpio2>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp4028_in: endpoint {
+					remote-endpoint = <&lvds0_out>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				stdp4028_out: endpoint {
+					remote-endpoint = <&stdp2690_in>;
+				};
+			};
+		};
+	};
+
+	stdp2690@72 {
+		compatible = "megachips,stdp2690-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x72>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp2690_in: endpoint {
+					remote-endpoint = <&stdp4028_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				stdp2690_out: endpoint {
+					/* Connector for external display */
+				};
+			};
+		};
+	};
+};
Signature · 1 line
2.9.3
#6 lore raw

Re: [PATCH V3 4/4] dts/imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges (LVDS-DP++)

In reply to Peter Senna Tschudin
Quoted 23 lines · Peter Senna Tschudin

Configures the megachips-stdpxxxx-ge-b850v3-fw bridges on the GE B850v3 dts file.

Cc Laurent Pinchart <[email protected]>
Cc Martyn Welch <[email protected]>
Cc Martin Donnelly <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Enric Balletbo i Serra <[email protected]>
Cc Philipp Zabel <[email protected]>
Cc Rob Herring <[email protected]>
Cc Fabio Estevam <[email protected]>

---
Unchanged since V1.

 arch/arm/boot/dts/imx6q-b850v3.dts | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
arch/arm/boot/dts/imx6q-b850v3.dts +0 -0
index b237429..3ec54da 100644

arch/arm/boot/dts/imx6q-b850v3.dts line 77

Quoted 6 lines
arch/arm/boot/dts/imx6q-b850v3.dts +3 -0
@@ -72,6 +72,13 @@
 		fsl,data-mapping = "spwg";
 		fsl,data-width = <24>;
 		status = "okay";
+
+		port@4 {
+			reg = <4>;

Have a newline between property list and child node.

Quoted 8 lines
arch/arm/boot/dts/imx6q-b850v3.dts +4 -0
+			lvds0_out: endpoint {
+				remote-endpoint = <&stdp4028_in>;
+			};
+		};
 	};
 };
 

arch/arm/boot/dts/imx6q-b850v3.dts line 158

Quoted 6 lines
arch/arm/boot/dts/imx6q-b850v3.dts +3 -0
@@ -146,3 +153,64 @@
 &usdhc2 {
 	status = "disabled";
 };
+
+&mux2_i2c2 {
+	status = "okay";

This okay status doesn't seem really necessary to me. If it does, please put it at the end of property list.

arch/arm/boot/dts/imx6q-b850v3.dts line 165

Quoted 7 lines
arch/arm/boot/dts/imx6q-b850v3.dts +7 -0
+	clock-frequency = <100000>;
+
+	stdp4028@73 {
+		compatible = "megachips,stdp4028-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+

Drop this newline, as in general we do not add newline in middle of property list.

arch/arm/boot/dts/imx6q-b850v3.dts line 167

Quoted 2 lines
arch/arm/boot/dts/imx6q-b850v3.dts +2 -0
+		reg = <0x73>;
+

Ditto

arch/arm/boot/dts/imx6q-b850v3.dts line 180

Quoted 13 lines
arch/arm/boot/dts/imx6q-b850v3.dts +13 -0
+		interrupt-parent = <&gpio2>;
+		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp4028_in: endpoint {
+					remote-endpoint = <&lvds0_out>;
+				};
+			};

Have a newline between nodes.

arch/arm/boot/dts/imx6q-b850v3.dts line 190

Quoted 10 lines
arch/arm/boot/dts/imx6q-b850v3.dts +10 -0
+			port@1 {
+				reg = <1>;
+				stdp4028_out: endpoint {
+					remote-endpoint = <&stdp2690_in>;
+				};
+			};
+		};
+	};
+
+	stdp2690@72 {

Sort device nodes under bus in order of unit address. That said, stdp2690@72 should go before stdp4028@73.

Shawn

Quoted 29 lines
arch/arm/boot/dts/imx6q-b850v3.dts +26 -0
+		compatible = "megachips,stdp2690-ge-b850v3-fw";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		reg = <0x72>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				stdp2690_in: endpoint {
+					remote-endpoint = <&stdp4028_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+				stdp2690_out: endpoint {
+					/* Connector for external display */
+				};
+			};
+		};
+	};
+};
Signature · 1 line
2.9.3
#7 lore raw
In reply to Peter Senna Tschudin

Hi,

Quoted 11 lines · Peter Senna Tschudin

The video processing pipeline on the second output on the GE B850v3:

Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output

Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3.

Quoted 4 lines

The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

queued Patches 1,2 and 3 to drm-misc-next. Made stdp2690_get_edid static in Patch #3 to fix a sparse warning.

Thanks,
Archit

Quoted 66 lines

Changes from V2:
- Added Acked-by: Rob Herring <[email protected]> on patch 1/4
- Fixed the driver to allow it to be compiled as a module

Changes from V1:
- Fix bindings documentation
- Fix white space issues on the driver
- Improved ge_b850v3_lvds_remove() to not rely on ge_b850v3_lvds_ptr->edid

Changes from V7(was GE B850v3 LVDS/DP++ Bridge):
- New devicetree binding with one node per bridge, and two ports per bridge
- Two i2c_devices, one per bridge
- Removed uneeded mutexes
- Moved documentation to bindings/display/bridge
- Included test for EDID extension blocks
- Renamed bridge pointer to ge_b850v3_lvds_ptr
- Removed the call to drm_helper_hpd_irq_event()
- Removed assignments to bridge.driver_private

Changes from V6:
- Removed check for pixel clock as the bridge supports up to 330Mhz while the host is limited to 264 MHz in very specific conditions.
- Added a second mutex to avoid concurrency issues while acking interrupts from threaded interrupt handlers.
- Renamed the edid mutex to be more descriptive.
- Added a .detach() function that disables the interrupts.
- Adopted i2c_new_secondary_device() and updated the dts and documentation to match the new method.
- Removed useless test to drm_bridge_add()
- Did some refactoring around devm_request_threaded_irq()
- Added a missing call to i2c_unregister_device() on the i2c_driver.remove() function.

Changes from V5:
- Change to MAINTAINERS in a separate patch
- Reworked interrupt handler initialization
- Removed useless calls to: drm_connector_register(), drm_helper_hpd_irq_event(), and drm_bridge_enable()

Changes from V4:
- Renamed the i2c_driver.name from "ge,b850v3-lvds-dp" to "b850v3-lvds-dp" to remove the comma from the driver name

Changes from V3:
- Removed the patch that was configuring the mapping between IPUs and external displays on the dts file

Peter Senna Tschudin (4):
dt-bindings: display: megachips-stdpxxxx-ge-b850v3-fw
MAINTAINERS: Add entry for megachips-stdpxxxx-ge-b850v3-fw drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v3-fw (LVDS-DP++) dts/imx6q-b850v3: Use megachips-stdpxxxx-ge-b850v3-fw bridges

    (LVDS-DP++)
 .../bridge/megachips-stdpxxxx-ge-b850v3-fw.txt     |  94 +++++
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 MAINTAINERS                                        |   8 +
 arch/arm/boot/dts/imx6q-b850v3.dts                 |  68 ++++
 drivers/gpu/drm/bridge/Kconfig                     |  11 +
 drivers/gpu/drm/bridge/Makefile                    |   1 +
 .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   | 428 +++++++++++++++++++++
 7 files changed, 611 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
 create mode 100644 drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#8 lore raw

On Mon, Mar 06, 2017 at 03:27:16PM +0530, Archit Taneja wrote:
Hi Archit,

Quoted 14 lines

Hi,

Quoted 11 lines · Peter Senna Tschudin

The video processing pipeline on the second output on the GE B850v3:

Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output

Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3.

Quoted 7 lines
Quoted 4 lines

The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

queued Patches 1,2 and 3 to drm-misc-next. Made stdp2690_get_edid static in Patch #3 to fix a sparse warning.

What about 4/4, aka the dt change? Do I need an ack from Rob Herring?

Thanks a lot!

[...]

#9 lore raw

Am Mittwoch, den 08.03.2017, 10:42 +0100 schrieb Peter Senna Tschudin:

Quoted 22 lines · Archit Taneja

Hi Archit,

Quoted 19 lines

Hi,

Quoted 15 lines · Peter Senna Tschudin

The video processing pipeline on the second output on the GE B850v3:

Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output

Each bridge has a dedicated flash containing firmware for supporting the custom design. The result is that in this design neither the STDP4028 nor the STDP2690 behave as the stock bridges would. The compatible strings include the suffix "-ge-b850v3-fw" to make it clear that the driver is for the bridges with the firmware which is specific for the GE B850v3.

The driver is powerless to control the video processing pipeline, as the two bridges behaves as a single one. The driver is only needed for telling the host about EDID / HPD, and for giving the host powers to ack interrupts.

Quoted 6 lines
Quoted 2 lines

queued Patches 1,2 and 3 to drm-misc-next. Made stdp2690_get_edid static in Patch #3 to fix a sparse warning.

What about 4/4, aka the dt change? Do I need an ack from Rob Herring?

Thanks a lot!

This one needs to go through Shawn Guo. Now that the driver and binding are in it is probably best to ask him directly to pick it up.

Regards,
Lucas