All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously
@ 2015-06-25 14:17 ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-06-25 14:17 UTC (permalink / raw)
  To: shawnguo
  Cc: kernel, eric.nelson, linux, linux-arm-kernel, Ying.liu,
	mturquette, linux-clk, Fabio Estevam

Currently it is not possible to have HDMI and LVDS working simultaneously,
because both ports try to use PLL5.

Move the LVDS clock parent to PLL3_USB_OTG, so that HDMI and LVDS can be
driven from independent sources.

With this change the LDB pixel clock goes to 68.57 MHz, which is still
within the valid range for the HSD100PXN1 LVDS panel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Move the clock assignment inside &clks as suggested by Philipp

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index a626e6d..cca847e 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -141,6 +141,13 @@
 	status = "okay";
 };
 
+&clks {
+	assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+			  <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+	assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+				 <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
 &ecspi1 {
 	fsl,spi-num-chipselects = <1>;
 	cs-gpios = <&gpio4 9 0>;
-- 
1.9.1

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

* [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously
@ 2015-06-25 14:17 ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-06-25 14:17 UTC (permalink / raw)
  To: linux-arm-kernel

Currently it is not possible to have HDMI and LVDS working simultaneously,
because both ports try to use PLL5.

Move the LVDS clock parent to PLL3_USB_OTG, so that HDMI and LVDS can be
driven from independent sources.

With this change the LDB pixel clock goes to 68.57 MHz, which is still
within the valid range for the HSD100PXN1 LVDS panel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Move the clock assignment inside &clks as suggested by Philipp

 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index a626e6d..cca847e 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -141,6 +141,13 @@
 	status = "okay";
 };
 
+&clks {
+	assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+			  <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+	assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+				 <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
 &ecspi1 {
 	fsl,spi-num-chipselects = <1>;
 	cs-gpios = <&gpio4 9 0>;
-- 
1.9.1

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

* [PATCH v2 2/2] clk: imx: clk-imx6q: Provide initial IPU clock settings for mx6dl
  2015-06-25 14:17 ` Fabio Estevam
@ 2015-06-25 14:17   ` Fabio Estevam
  -1 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-06-25 14:17 UTC (permalink / raw)
  To: shawnguo
  Cc: kernel, eric.nelson, linux, linux-arm-kernel, Ying.liu,
	mturquette, linux-clk, Fabio Estevam

Currently it is not possible to use HDMI and LVDS at the same time on a 
imx6dl-sabresd board.

Fix this usecase by setting IMX6QDL_CLK_PLL3_PFD1_540M to 540MHz and
also by setting it as the parent of IMX6QDL_CLK_IPU1_SEL.

Based on the configuration done in the FSL kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- None. Newly introduced.

 drivers/clk/imx/clk-imx6q.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index d046f8e..d735d8f 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -494,6 +494,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 		clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	}
 
+	if (clk_on_imx6dl()) {
+		clk_set_rate(clk[IMX6QDL_CLK_PLL3_PFD1_540M], 540000000);
+		clk_set_parent(clk[IMX6QDL_CLK_IPU1_SEL], clk[IMX6QDL_CLK_PLL3_PFD1_540M]);
+	}
+
 	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
-- 
1.9.1

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

* [PATCH v2 2/2] clk: imx: clk-imx6q: Provide initial IPU clock settings for mx6dl
@ 2015-06-25 14:17   ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2015-06-25 14:17 UTC (permalink / raw)
  To: linux-arm-kernel

Currently it is not possible to use HDMI and LVDS at the same time on a 
imx6dl-sabresd board.

Fix this usecase by setting IMX6QDL_CLK_PLL3_PFD1_540M to 540MHz and
also by setting it as the parent of IMX6QDL_CLK_IPU1_SEL.

Based on the configuration done in the FSL kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- None. Newly introduced.

 drivers/clk/imx/clk-imx6q.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index d046f8e..d735d8f 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -494,6 +494,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 		clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	}
 
+	if (clk_on_imx6dl()) {
+		clk_set_rate(clk[IMX6QDL_CLK_PLL3_PFD1_540M], 540000000);
+		clk_set_parent(clk[IMX6QDL_CLK_IPU1_SEL], clk[IMX6QDL_CLK_PLL3_PFD1_540M]);
+	}
+
 	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
 	clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
-- 
1.9.1

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

* Re: [PATCH v2 2/2] clk: imx: clk-imx6q: Provide initial IPU clock settings for mx6dl
  2015-06-25 14:17   ` Fabio Estevam
@ 2015-06-25 16:22     ` Vladimir Zapolskiy
  -1 siblings, 0 replies; 8+ messages in thread
From: Vladimir Zapolskiy @ 2015-06-25 16:22 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: kernel, eric.nelson, linux, linux-arm-kernel, Ying.liu,
	mturquette, linux-clk

Hi Fabio,

On 25.06.2015 17:17, Fabio Estevam wrote:
> Currently it is not possible to use HDMI and LVDS at the same time on a 
> imx6dl-sabresd board.
> 
> Fix this usecase by setting IMX6QDL_CLK_PLL3_PFD1_540M to 540MHz and
> also by setting it as the parent of IMX6QDL_CLK_IPU1_SEL.
> 
> Based on the configuration done in the FSL kernel.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - None. Newly introduced.
> 
>  drivers/clk/imx/clk-imx6q.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
> index d046f8e..d735d8f 100644
> --- a/drivers/clk/imx/clk-imx6q.c
> +++ b/drivers/clk/imx/clk-imx6q.c
> @@ -494,6 +494,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
>  		clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	}
>  
> +	if (clk_on_imx6dl()) {
> +		clk_set_rate(clk[IMX6QDL_CLK_PLL3_PFD1_540M], 540000000);

I believe here IMX6QDL_CLK_PLL3_PFD1_540M rate can be set independently
of SoC flavour.

> +		clk_set_parent(clk[IMX6QDL_CLK_IPU1_SEL], clk[IMX6QDL_CLK_PLL3_PFD1_540M]);
> +	}
> +
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
> 

--
With best wishes,
Vladimir

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

* [PATCH v2 2/2] clk: imx: clk-imx6q: Provide initial IPU clock settings for mx6dl
@ 2015-06-25 16:22     ` Vladimir Zapolskiy
  0 siblings, 0 replies; 8+ messages in thread
From: Vladimir Zapolskiy @ 2015-06-25 16:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabio,

On 25.06.2015 17:17, Fabio Estevam wrote:
> Currently it is not possible to use HDMI and LVDS at the same time on a 
> imx6dl-sabresd board.
> 
> Fix this usecase by setting IMX6QDL_CLK_PLL3_PFD1_540M to 540MHz and
> also by setting it as the parent of IMX6QDL_CLK_IPU1_SEL.
> 
> Based on the configuration done in the FSL kernel.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - None. Newly introduced.
> 
>  drivers/clk/imx/clk-imx6q.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
> index d046f8e..d735d8f 100644
> --- a/drivers/clk/imx/clk-imx6q.c
> +++ b/drivers/clk/imx/clk-imx6q.c
> @@ -494,6 +494,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
>  		clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	}
>  
> +	if (clk_on_imx6dl()) {
> +		clk_set_rate(clk[IMX6QDL_CLK_PLL3_PFD1_540M], 540000000);

I believe here IMX6QDL_CLK_PLL3_PFD1_540M rate can be set independently
of SoC flavour.

> +		clk_set_parent(clk[IMX6QDL_CLK_IPU1_SEL], clk[IMX6QDL_CLK_PLL3_PFD1_540M]);
> +	}
> +
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
>  	clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
> 

--
With best wishes,
Vladimir

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

* Re: [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously
  2015-06-25 14:17 ` Fabio Estevam
@ 2015-06-26 10:34   ` Philipp Zabel
  -1 siblings, 0 replies; 8+ messages in thread
From: Philipp Zabel @ 2015-06-26 10:34 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: shawnguo, linux, mturquette, eric.nelson, kernel, Ying.liu,
	linux-clk, linux-arm-kernel

Am Donnerstag, den 25.06.2015, 11:17 -0300 schrieb Fabio Estevam:
> Currently it is not possible to have HDMI and LVDS working simultaneously,
> because both ports try to use PLL5.
> 
> Move the LVDS clock parent to PLL3_USB_OTG, so that HDMI and LVDS can be
> driven from independent sources.
> 
> With this change the LDB pixel clock goes to 68.57 MHz, which is still
> within the valid range for the HSD100PXN1 LVDS panel.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously
@ 2015-06-26 10:34   ` Philipp Zabel
  0 siblings, 0 replies; 8+ messages in thread
From: Philipp Zabel @ 2015-06-26 10:34 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag, den 25.06.2015, 11:17 -0300 schrieb Fabio Estevam:
> Currently it is not possible to have HDMI and LVDS working simultaneously,
> because both ports try to use PLL5.
> 
> Move the LVDS clock parent to PLL3_USB_OTG, so that HDMI and LVDS can be
> driven from independent sources.
> 
> With this change the LDB pixel clock goes to 68.57 MHz, which is still
> within the valid range for the HSD100PXN1 LVDS panel.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

end of thread, other threads:[~2015-06-26 10:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 14:17 [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously Fabio Estevam
2015-06-25 14:17 ` Fabio Estevam
2015-06-25 14:17 ` [PATCH v2 2/2] clk: imx: clk-imx6q: Provide initial IPU clock settings for mx6dl Fabio Estevam
2015-06-25 14:17   ` Fabio Estevam
2015-06-25 16:22   ` Vladimir Zapolskiy
2015-06-25 16:22     ` Vladimir Zapolskiy
2015-06-26 10:34 ` [PATCH v2 1/2] ARM: dts: imx6qdl-sabresd: Allow HDMI and LVDS to work simultaneously Philipp Zabel
2015-06-26 10:34   ` Philipp Zabel

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.