Skip to contentSkip to conversation

imx25: Fix LCD pixelclock configuration

PATCH In review Carlos Soto 2 participants 3 messages Dec 23, 2015 – Feb 7, 2016

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

PATCH 1/1 imx25: Fix LCD pixelclock configuration

Set LCDC base clock (per_7) parent clock to UPLL clock. This is needed to allow finer resolution in pixelclock

---
 drivers/clk/imx/clk-imx25.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/clk/imx/clk-imx25.c +6 -0
index c4c141c..656340e 100644
@@ -238,6 +238,12 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
 	clk_set_parent(clk[per5_sel], clk[ahb]);
 
 	/*
+	 * set LCDC base clock (per 7) to highest possible frequency (UPLL)
+	 * to get best resolution for pixel clock
+	 */
+	clk_set_parent(clk[per7_sel], clk[upll]);
+
+	/*
 	 * Let's initially set up CLKO parent as ipg, since this configuration
 	 * is used on some imx25 board designs to clock the audio codec.
 	 */
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 13 lines · Carlos Soto

Set LCDC base clock (per_7) parent clock to UPLL clock. This is needed to allow finer resolution in pixelclock

---
 drivers/clk/imx/clk-imx25.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/clk/imx/clk-imx25.c +0 -0
index c4c141c..656340e 100644

drivers/clk/imx/clk-imx25.c static int __init __mx25_clocks_init(unsigned long osc_rate, · line 244

Quoted 7 lines
drivers/clk/imx/clk-imx25.c +4 -0
@@ -238,6 +238,12 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
 	clk_set_parent(clk[per5_sel], clk[ahb]);
 
 	/*
+	 * set LCDC base clock (per 7) to highest possible frequency (UPLL)
+	 * to get best resolution for pixel clock
+	 */
+	clk_set_parent(clk[per7_sel], clk[upll]);

This can be done in device tree via assigned-clock-parents without the need of touching kernel.

Shawn

Quoted 9 lines
drivers/clk/imx/clk-imx25.c +2 -0
+
+	/*
 	 * Let's initially set up CLKO parent as ipg, since this configuration
 	 * is used on some imx25 board designs to clock the audio codec.
 	 */
Signature · 1 line
1.7.10.4
#2 lore raw

2016-01-28 7:32 GMT+01:00 Shawn Guo <[email protected]>:

Quoted 25 lines · Carlos Soto
Quoted 13 lines

Set LCDC base clock (per_7) parent clock to UPLL clock. This is needed to allow finer resolution in pixelclock

---
 drivers/clk/imx/clk-imx25.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/clk/imx/clk-imx25.c +0 -0
index c4c141c..656340e 100644

drivers/clk/imx/clk-imx25.c static int __init __mx25_clocks_init(unsigned long osc_rate, · line 244

Quoted 7 lines
drivers/clk/imx/clk-imx25.c +4 -0
@@ -238,6 +238,12 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
      clk_set_parent(clk[per5_sel], clk[ahb]);
 
      /*
+      * set LCDC base clock (per 7) to highest possible frequency (UPLL)
+      * to get best resolution for pixel clock
+      */
+     clk_set_parent(clk[per7_sel], clk[upll]);

This can be done in device tree via assigned-clock-parents without the need of touching kernel.

Quoted 2 lines

Shawn

Sorry, I was not aware of this feature. Already tested and it works fine via DT

Thanks for the help

Carlos