All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
@ 2022-12-08  9:08 ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2022-12-08  9:08 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
Both need the same clock source (VIDEO_PLL1).

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
I opted to add both at the same time, so the remote-endpoints are already
connected.
blk-ctrl@32ec0000 needs the 'simple-bus' compatible so that bridge@5c is
actually probed.

 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 65 ++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 7a6e6221f4219..c1beff33c4981 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1098,10 +1098,35 @@ aips4: bus@32c00000 {
 			#size-cells = <1>;
 			ranges;
 
+			lcdif2: display-controller@32e90000 {
+				compatible = "fsl,imx8mp-lcdif";
+				reg = <0x32e90000 0x238>;
+				interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>,
+					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
+					 <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
+				clock-names = "pix", "axi", "disp_axi";
+				assigned-clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>,
+						  <&clk IMX8MP_VIDEO_PLL1>;
+				assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>,
+							 <&clk IMX8MP_VIDEO_PLL1_REF_SEL>;
+				assigned-clock-rates = <0>, <1039500000>;
+				power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_LCDIF_2>;
+				status = "disabled";
+
+				port {
+					lcdif2_to_ldb: endpoint {
+						remote-endpoint = <&ldb_from_lcdif2>;
+					};
+				};
+			};
+
 			media_blk_ctrl: blk-ctrl@32ec0000 {
 				compatible = "fsl,imx8mp-media-blk-ctrl",
-					     "syscon";
+					     "simple-bus", "syscon";
 				reg = <0x32ec0000 0x10000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
 				power-domains = <&pgc_mediamix>,
 						<&pgc_mipi_phy1>,
 						<&pgc_mipi_phy1>,
@@ -1146,6 +1171,44 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 				assigned-clock-rates = <500000000>, <200000000>;
 
 				#power-domain-cells = <1>;
+
+				lvds_bridge: bridge@5c {
+					compatible = "fsl,imx8mp-ldb";
+					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					clock-names = "ldb";
+					reg = <0x5c 0x4>, <0x128 0x4>;
+					reg-names = "ldb", "lvds";
+					assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
+					status = "disabled";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+
+							ldb_from_lcdif2: endpoint {
+								remote-endpoint = <&lcdif2_to_ldb>;
+							};
+						};
+
+						port@1 {
+							reg = <1>;
+
+							ldb_lvds_ch0: endpoint {
+							};
+						};
+
+						port@2 {
+							reg = <2>;
+
+							ldb_lvds_ch1: endpoint {
+							};
+						};
+					};
+				};
 			};
 
 			pcie_phy: pcie-phy@32f00000 {
-- 
2.34.1


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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
@ 2022-12-08  9:08 ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2022-12-08  9:08 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
Both need the same clock source (VIDEO_PLL1).

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
I opted to add both at the same time, so the remote-endpoints are already
connected.
blk-ctrl@32ec0000 needs the 'simple-bus' compatible so that bridge@5c is
actually probed.

 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 65 ++++++++++++++++++++++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 7a6e6221f4219..c1beff33c4981 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1098,10 +1098,35 @@ aips4: bus@32c00000 {
 			#size-cells = <1>;
 			ranges;
 
+			lcdif2: display-controller@32e90000 {
+				compatible = "fsl,imx8mp-lcdif";
+				reg = <0x32e90000 0x238>;
+				interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>,
+					 <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>,
+					 <&clk IMX8MP_CLK_MEDIA_APB_ROOT>;
+				clock-names = "pix", "axi", "disp_axi";
+				assigned-clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>,
+						  <&clk IMX8MP_VIDEO_PLL1>;
+				assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>,
+							 <&clk IMX8MP_VIDEO_PLL1_REF_SEL>;
+				assigned-clock-rates = <0>, <1039500000>;
+				power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_LCDIF_2>;
+				status = "disabled";
+
+				port {
+					lcdif2_to_ldb: endpoint {
+						remote-endpoint = <&ldb_from_lcdif2>;
+					};
+				};
+			};
+
 			media_blk_ctrl: blk-ctrl@32ec0000 {
 				compatible = "fsl,imx8mp-media-blk-ctrl",
-					     "syscon";
+					     "simple-bus", "syscon";
 				reg = <0x32ec0000 0x10000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
 				power-domains = <&pgc_mediamix>,
 						<&pgc_mipi_phy1>,
 						<&pgc_mipi_phy1>,
@@ -1146,6 +1171,44 @@ media_blk_ctrl: blk-ctrl@32ec0000 {
 				assigned-clock-rates = <500000000>, <200000000>;
 
 				#power-domain-cells = <1>;
+
+				lvds_bridge: bridge@5c {
+					compatible = "fsl,imx8mp-ldb";
+					clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					clock-names = "ldb";
+					reg = <0x5c 0x4>, <0x128 0x4>;
+					reg-names = "ldb", "lvds";
+					assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>;
+					assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>;
+					status = "disabled";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+
+							ldb_from_lcdif2: endpoint {
+								remote-endpoint = <&lcdif2_to_ldb>;
+							};
+						};
+
+						port@1 {
+							reg = <1>;
+
+							ldb_lvds_ch0: endpoint {
+							};
+						};
+
+						port@2 {
+							reg = <2>;
+
+							ldb_lvds_ch1: endpoint {
+							};
+						};
+					};
+				};
 			};
 
 			pcie_phy: pcie-phy@32f00000 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
  2022-12-08  9:08 ` Alexander Stein
@ 2022-12-08  9:08   ` Alexander Stein
  -1 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2022-12-08  9:08 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

This adds an overlay for the supported LVDS display tianma tm070jvhg33.
The display timings have to be specified explicitly. Using the typical pixel
clock, the LDB clock can not be configured as the 7-fold of that.
By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
519.75 MHz.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
To be hold I'm unsure where to list the overlays. I checked other overlays
and opted to added them at the end of imx8mp section.

 arch/arm64/boot/dts/freescale/Makefile        |  4 ++
 .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index ef6f364eaa183..9eedee68413b2 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -97,6 +97,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dev.dtb
+
+imx8mp-tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl-lvds.dtb
+
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-kontron-pitx-imx8m.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
new file mode 100644
index 0000000000000..ea44d605342ba
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
+};
+
+&backlight_lvds {
+	status = "okay";
+};
+
+&display {
+	compatible = "tianma,tm070jvhg33";
+	status = "okay";
+
+	panel-timing {
+		clock-frequency = <74250000>;
+		hactive = <1280>;
+		vactive = <800>;
+		hfront-porch = <64>;
+		hback-porch = <5>;
+		hsync-len = <1>;
+		vfront-porch = <40>;
+		vback-porch = <2>;
+		vsync-len = <1>;
+		de-active = <1>;
+	};
+
+	port {
+		panel_in_lvds0: endpoint {
+			remote-endpoint = <&ldb_lvds_ch0>;
+		};
+	};
+};
+
+&lcdif2 {
+	status = "okay";
+};
+
+&lvds_bridge {
+	status = "okay";
+
+	ports {
+		port@1 {
+			ldb_lvds_ch0: endpoint {
+				remote-endpoint = <&panel_in_lvds0>;
+			};
+		};
+	};
+};
+
+&pwm2 {
+	status = "okay";
+};
-- 
2.34.1


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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
@ 2022-12-08  9:08   ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2022-12-08  9:08 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

This adds an overlay for the supported LVDS display tianma tm070jvhg33.
The display timings have to be specified explicitly. Using the typical pixel
clock, the LDB clock can not be configured as the 7-fold of that.
By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
519.75 MHz.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
To be hold I'm unsure where to list the overlays. I checked other overlays
and opted to added them at the end of imx8mp section.

 arch/arm64/boot/dts/freescale/Makefile        |  4 ++
 .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index ef6f364eaa183..9eedee68413b2 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -97,6 +97,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dahlia.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dev.dtb
+
+imx8mp-tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl-lvds.dtb
+
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx8mq-kontron-pitx-imx8m.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
new file mode 100644
index 0000000000000..ea44d605342ba
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
+ * D-82229 Seefeld, Germany.
+ * Author: Alexander Stein
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
+};
+
+&backlight_lvds {
+	status = "okay";
+};
+
+&display {
+	compatible = "tianma,tm070jvhg33";
+	status = "okay";
+
+	panel-timing {
+		clock-frequency = <74250000>;
+		hactive = <1280>;
+		vactive = <800>;
+		hfront-porch = <64>;
+		hback-porch = <5>;
+		hsync-len = <1>;
+		vfront-porch = <40>;
+		vback-porch = <2>;
+		vsync-len = <1>;
+		de-active = <1>;
+	};
+
+	port {
+		panel_in_lvds0: endpoint {
+			remote-endpoint = <&ldb_lvds_ch0>;
+		};
+	};
+};
+
+&lcdif2 {
+	status = "okay";
+};
+
+&lvds_bridge {
+	status = "okay";
+
+	ports {
+		port@1 {
+			ldb_lvds_ch0: endpoint {
+				remote-endpoint = <&panel_in_lvds0>;
+			};
+		};
+	};
+};
+
+&pwm2 {
+	status = "okay";
+};
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
  2022-12-08  9:08   ` Alexander Stein
@ 2022-12-20  8:48     ` Richard Leitner
  -1 siblings, 0 replies; 14+ messages in thread
From: Richard Leitner @ 2022-12-20  8:48 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

Hi Alexander,

thanks for the series.

On Thu, Dec 08, 2022 at 10:08:42AM +0100, Alexander Stein wrote:
> This adds an overlay for the supported LVDS display tianma tm070jvhg33.
> The display timings have to be specified explicitly. Using the typical pixel
> clock, the LDB clock can not be configured as the 7-fold of that.
> By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
> 519.75 MHz.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> To be hold I'm unsure where to list the overlays. I checked other overlays
> and opted to added them at the end of imx8mp section.
> 
>  arch/arm64/boot/dts/freescale/Makefile        |  4 ++
>  .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
>  2 files changed, 65 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso

...

> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> new file mode 100644
> index 0000000000000..ea44d605342ba
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> @@ -0,0 +1,61 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> +/*
> + * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
> + * D-82229 Seefeld, Germany.
> + * Author: Alexander Stein
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&{/} {
> +	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
> +};
> +
> +&backlight_lvds {
> +	status = "okay";
> +};
> +
> +&display {
> +	compatible = "tianma,tm070jvhg33";
> +	status = "okay";
> +
> +	panel-timing {
> +		clock-frequency = <74250000>;
> +		hactive = <1280>;
> +		vactive = <800>;
> +		hfront-porch = <64>;
> +		hback-porch = <5>;
> +		hsync-len = <1>;
> +		vfront-porch = <40>;
> +		vback-porch = <2>;
> +		vsync-len = <1>;
> +		de-active = <1>;
> +	};
> +
> +	port {
> +		panel_in_lvds0: endpoint {
> +			remote-endpoint = <&ldb_lvds_ch0>;
> +		};
> +	};
> +};
> +
> +&lcdif2 {
> +	status = "okay";
> +};
> +
> +&lvds_bridge {
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			ldb_lvds_ch0: endpoint {
> +				remote-endpoint = <&panel_in_lvds0>;
> +			};
> +		};
> +	};
> +};

Wouldn't it be possible and easier to read if this was &ldb_lvds_ch0
only instead of the "whole" &lvds_bridge?

&ldb_lvds_ch0 {
	remote-endpoint = <&panel_in_lvds0>;
};

> +
> +&pwm2 {
> +	status = "okay";
> +};
> -- 
> 2.34.1
> 

regards;rl

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
@ 2022-12-20  8:48     ` Richard Leitner
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Leitner @ 2022-12-20  8:48 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

Hi Alexander,

thanks for the series.

On Thu, Dec 08, 2022 at 10:08:42AM +0100, Alexander Stein wrote:
> This adds an overlay for the supported LVDS display tianma tm070jvhg33.
> The display timings have to be specified explicitly. Using the typical pixel
> clock, the LDB clock can not be configured as the 7-fold of that.
> By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
> 519.75 MHz.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> To be hold I'm unsure where to list the overlays. I checked other overlays
> and opted to added them at the end of imx8mp section.
> 
>  arch/arm64/boot/dts/freescale/Makefile        |  4 ++
>  .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
>  2 files changed, 65 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso

...

> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> new file mode 100644
> index 0000000000000..ea44d605342ba
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> @@ -0,0 +1,61 @@
> +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> +/*
> + * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
> + * D-82229 Seefeld, Germany.
> + * Author: Alexander Stein
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&{/} {
> +	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp";
> +};
> +
> +&backlight_lvds {
> +	status = "okay";
> +};
> +
> +&display {
> +	compatible = "tianma,tm070jvhg33";
> +	status = "okay";
> +
> +	panel-timing {
> +		clock-frequency = <74250000>;
> +		hactive = <1280>;
> +		vactive = <800>;
> +		hfront-porch = <64>;
> +		hback-porch = <5>;
> +		hsync-len = <1>;
> +		vfront-porch = <40>;
> +		vback-porch = <2>;
> +		vsync-len = <1>;
> +		de-active = <1>;
> +	};
> +
> +	port {
> +		panel_in_lvds0: endpoint {
> +			remote-endpoint = <&ldb_lvds_ch0>;
> +		};
> +	};
> +};
> +
> +&lcdif2 {
> +	status = "okay";
> +};
> +
> +&lvds_bridge {
> +	status = "okay";
> +
> +	ports {
> +		port@1 {
> +			ldb_lvds_ch0: endpoint {
> +				remote-endpoint = <&panel_in_lvds0>;
> +			};
> +		};
> +	};
> +};

Wouldn't it be possible and easier to read if this was &ldb_lvds_ch0
only instead of the "whole" &lvds_bridge?

&ldb_lvds_ch0 {
	remote-endpoint = <&panel_in_lvds0>;
};

> +
> +&pwm2 {
> +	status = "okay";
> +};
> -- 
> 2.34.1
> 

regards;rl

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
  2022-12-08  9:08 ` Alexander Stein
@ 2022-12-20 13:00   ` Richard Leitner
  -1 siblings, 0 replies; 14+ messages in thread
From: Richard Leitner @ 2022-12-20 13:00 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Successfully tested this patch on a custom i.MX8MP board. Therefore
please feel free to add

Tested-by: Richard Leitner <richard.leitner@linux.dev>

Thanks & regards;rl

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
@ 2022-12-20 13:00   ` Richard Leitner
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Leitner @ 2022-12-20 13:00 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Successfully tested this patch on a custom i.MX8MP board. Therefore
please feel free to add

Tested-by: Richard Leitner <richard.leitner@linux.dev>

Thanks & regards;rl

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
  2022-12-20  8:48     ` Richard Leitner
@ 2023-01-02  9:07       ` Alexander Stein
  -1 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2023-01-02  9:07 UTC (permalink / raw)
  To: Richard Leitner
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

Hello Richard,

Am Dienstag, 20. Dezember 2022, 09:48:45 CET schrieb Richard Leitner:
> Hi Alexander,
> 
> thanks for the series.
> 
> On Thu, Dec 08, 2022 at 10:08:42AM +0100, Alexander Stein wrote:
> > This adds an overlay for the supported LVDS display tianma tm070jvhg33.
> > The display timings have to be specified explicitly. Using the typical
> > pixel clock, the LDB clock can not be configured as the 7-fold of that.
> > By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
> > 519.75 MHz.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > To be hold I'm unsure where to list the overlays. I checked other overlays
> > and opted to added them at the end of imx8mp section.
> > 
> >  arch/arm64/boot/dts/freescale/Makefile        |  4 ++
> >  .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
> >  2 files changed, 65 insertions(+)
> >  create mode 100644
> >  arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> ...
> 
> > diff --git
> > a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> > b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso new
> > file mode 100644
> > index 0000000000000..ea44d605342ba
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> > @@ -0,0 +1,61 @@
> > +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> > +/*
> > + * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
> > + * D-82229 Seefeld, Germany.
> > + * Author: Alexander Stein
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +&{/} {
> > +	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql",
> > "fsl,imx8mp"; +};
> > +
> > +&backlight_lvds {
> > +	status = "okay";
> > +};
> > +
> > +&display {
> > +	compatible = "tianma,tm070jvhg33";
> > +	status = "okay";
> > +
> > +	panel-timing {
> > +		clock-frequency = <74250000>;
> > +		hactive = <1280>;
> > +		vactive = <800>;
> > +		hfront-porch = <64>;
> > +		hback-porch = <5>;
> > +		hsync-len = <1>;
> > +		vfront-porch = <40>;
> > +		vback-porch = <2>;
> > +		vsync-len = <1>;
> > +		de-active = <1>;
> > +	};
> > +
> > +	port {
> > +		panel_in_lvds0: endpoint {
> > +			remote-endpoint = <&ldb_lvds_ch0>;
> > +		};
> > +	};
> > +};
> > +
> > +&lcdif2 {
> > +	status = "okay";
> > +};
> > +
> > +&lvds_bridge {
> > +	status = "okay";
> > +
> > +	ports {
> > +		port@1 {
> > +			ldb_lvds_ch0: endpoint {
> > +				remote-endpoint = <&panel_in_lvds0>;
> > +			};
> > +		};
> > +	};
> > +};
> 
> Wouldn't it be possible and easier to read if this was &ldb_lvds_ch0
> only instead of the "whole" &lvds_bridge?
> 
> &ldb_lvds_ch0 {
> 	remote-endpoint = <&panel_in_lvds0>;
> };

Yes it is possible and easier to read. Unfortunately dtbs_check will raise the 
follwing warnings when doing so:
> arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo: Warning 
(graph_port): /fragment@4: graph port node name should be 'port'
> ../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso:
47.15-49.3: Warning (graph_endpoint): /fragment@4/__overlay__: graph endpoint 
node name should be 'endpoint'
> ../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso:
47.15-49.3: Warning (graph_endpoint): /fragment@4/__overlay__: graph 
connection to node '/fragment@2/__overlay__/port/endpoint' is not 
bidirectional

I'm not sure which way is the preferred/correct one or if this is just an 
issue in dtc, raising the warnings.

Best regards,
Alexander

> > +
> > +&pwm2 {
> > +	status = "okay";
> > +};
> 
> regards;rl





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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL
@ 2023-01-02  9:07       ` Alexander Stein
  0 siblings, 0 replies; 14+ messages in thread
From: Alexander Stein @ 2023-01-02  9:07 UTC (permalink / raw)
  To: Richard Leitner
  Cc: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Pengutronix Kernel Team, NXP Linux Team,
	devicetree, linux-arm-kernel

Hello Richard,

Am Dienstag, 20. Dezember 2022, 09:48:45 CET schrieb Richard Leitner:
> Hi Alexander,
> 
> thanks for the series.
> 
> On Thu, Dec 08, 2022 at 10:08:42AM +0100, Alexander Stein wrote:
> > This adds an overlay for the supported LVDS display tianma tm070jvhg33.
> > The display timings have to be specified explicitly. Using the typical
> > pixel clock, the LDB clock can not be configured as the 7-fold of that.
> > By setting pixel clock to 74.25 MHz, LDB can be configured to exactly
> > 519.75 MHz.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > To be hold I'm unsure where to list the overlays. I checked other overlays
> > and opted to added them at the end of imx8mp section.
> > 
> >  arch/arm64/boot/dts/freescale/Makefile        |  4 ++
> >  .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso       | 61 +++++++++++++++++++
> >  2 files changed, 65 insertions(+)
> >  create mode 100644
> >  arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> ...
> 
> > diff --git
> > a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> > b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso new
> > file mode 100644
> > index 0000000000000..ea44d605342ba
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso
> > @@ -0,0 +1,61 @@
> > +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
> > +/*
> > + * Copyright (c) 2022 TQ-Systems GmbH <linux@ew.tq-group.com>,
> > + * D-82229 Seefeld, Germany.
> > + * Author: Alexander Stein
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +&{/} {
> > +	compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql",
> > "fsl,imx8mp"; +};
> > +
> > +&backlight_lvds {
> > +	status = "okay";
> > +};
> > +
> > +&display {
> > +	compatible = "tianma,tm070jvhg33";
> > +	status = "okay";
> > +
> > +	panel-timing {
> > +		clock-frequency = <74250000>;
> > +		hactive = <1280>;
> > +		vactive = <800>;
> > +		hfront-porch = <64>;
> > +		hback-porch = <5>;
> > +		hsync-len = <1>;
> > +		vfront-porch = <40>;
> > +		vback-porch = <2>;
> > +		vsync-len = <1>;
> > +		de-active = <1>;
> > +	};
> > +
> > +	port {
> > +		panel_in_lvds0: endpoint {
> > +			remote-endpoint = <&ldb_lvds_ch0>;
> > +		};
> > +	};
> > +};
> > +
> > +&lcdif2 {
> > +	status = "okay";
> > +};
> > +
> > +&lvds_bridge {
> > +	status = "okay";
> > +
> > +	ports {
> > +		port@1 {
> > +			ldb_lvds_ch0: endpoint {
> > +				remote-endpoint = <&panel_in_lvds0>;
> > +			};
> > +		};
> > +	};
> > +};
> 
> Wouldn't it be possible and easier to read if this was &ldb_lvds_ch0
> only instead of the "whole" &lvds_bridge?
> 
> &ldb_lvds_ch0 {
> 	remote-endpoint = <&panel_in_lvds0>;
> };

Yes it is possible and easier to read. Unfortunately dtbs_check will raise the 
follwing warnings when doing so:
> arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo: Warning 
(graph_port): /fragment@4: graph port node name should be 'port'
> ../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso:
47.15-49.3: Warning (graph_endpoint): /fragment@4/__overlay__: graph endpoint 
node name should be 'endpoint'
> ../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso:
47.15-49.3: Warning (graph_endpoint): /fragment@4/__overlay__: graph 
connection to node '/fragment@2/__overlay__/port/endpoint' is not 
bidirectional

I'm not sure which way is the preferred/correct one or if this is just an 
issue in dtc, raising the warnings.

Best regards,
Alexander

> > +
> > +&pwm2 {
> > +	status = "okay";
> > +};
> 
> regards;rl





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
  2022-12-20 13:00   ` Richard Leitner
@ 2023-01-24 14:26     ` Rasmus Villemoes
  -1 siblings, 0 replies; 14+ messages in thread
From: Rasmus Villemoes @ 2023-01-24 14:26 UTC (permalink / raw)
  To: richard.leitner
  Cc: alexander.stein, devicetree, festevam, kernel,
	krzysztof.kozlowski+dt, linux-arm-kernel, linux-imx, robh+dt,
	s.hauer, shawnguo

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).

As Richard, I've tested this on a custom imx8mp board, so this is also

Tested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Can this be picked up and make way towards mainline please?

Rasmus

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
@ 2023-01-24 14:26     ` Rasmus Villemoes
  0 siblings, 0 replies; 14+ messages in thread
From: Rasmus Villemoes @ 2023-01-24 14:26 UTC (permalink / raw)
  To: richard.leitner
  Cc: alexander.stein, devicetree, festevam, kernel,
	krzysztof.kozlowski+dt, linux-arm-kernel, linux-imx, robh+dt,
	s.hauer, shawnguo

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).

As Richard, I've tested this on a custom imx8mp board, so this is also

Tested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Can this be picked up and make way towards mainline please?

Rasmus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
  2022-12-08  9:08 ` Alexander Stein
@ 2023-01-25 14:29   ` Shawn Guo
  -1 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2023-01-25 14:29 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Sascha Hauer, Fabio Estevam,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Applied both, thanks!

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes
@ 2023-01-25 14:29   ` Shawn Guo
  0 siblings, 0 replies; 14+ messages in thread
From: Shawn Guo @ 2023-01-25 14:29 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Rob Herring, Krzysztof Kozlowski, Sascha Hauer, Fabio Estevam,
	Pengutronix Kernel Team, NXP Linux Team, devicetree,
	linux-arm-kernel

On Thu, Dec 08, 2022 at 10:08:41AM +0100, Alexander Stein wrote:
> LCDIF2 is directly attached to the LVDS Display Bridge (LDB).
> Both need the same clock source (VIDEO_PLL1).
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Applied both, thanks!

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-01-25 14:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08  9:08 [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes Alexander Stein
2022-12-08  9:08 ` Alexander Stein
2022-12-08  9:08 ` [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL Alexander Stein
2022-12-08  9:08   ` Alexander Stein
2022-12-20  8:48   ` Richard Leitner
2022-12-20  8:48     ` Richard Leitner
2023-01-02  9:07     ` Alexander Stein
2023-01-02  9:07       ` Alexander Stein
2022-12-20 13:00 ` [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes Richard Leitner
2022-12-20 13:00   ` Richard Leitner
2023-01-24 14:26   ` Rasmus Villemoes
2023-01-24 14:26     ` Rasmus Villemoes
2023-01-25 14:29 ` Shawn Guo
2023-01-25 14:29   ` Shawn Guo

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.