drm/tilcdc: LCD panels clocks initialization and earlier backlight initialization
Hiremath, Vaibhav
hvaibhav at ti.com
Mon Apr 1 04:31:30 PDT 2013
> -----Original Message-----
> From: devicetree-discuss [mailto:devicetree-discuss-
> bounces+hvaibhav=ti.com at lists.ozlabs.org] On Behalf Of Michal Bachraty
> Sent: Thursday, March 28, 2013 11:02 PM
> To: dri-devel at lists.freedesktop.org; devicetree-
> discuss at lists.ozlabs.org
> Cc: robdclark at gmail.com; koen at dominion.thruhere.net
> Subject: drm/tilcdc: LCD panels clocks initialization and earlier
> backlight initialization
>
> Hi,
>
> I'm trying to use tilcdc driver for KWH050TG08 LCD panel connected to
> AM335x
> processor (3.9 rc1 kernel). I have prepared DT bindings for that
> (listed
> bellow). I see fb0 device but I have no clocks going from cpu to LCD.
> My
> clocks for LCD seems not properly to be set ...
>
> virt_25000000_ck 1 1 25000000
> sys_clkin_ck 8 19 25000000
> dpll_disp_ck 0 1 25000000
> dpll_disp_m2_ck 0 1 25000000
> lcd_gclk 0 1 25000000
>
> and tilcdc_crtc is not called. I also set lcd_gclk to 300MHz, but I got
> same
> result. The question is there any way how to properly set clocks for
> LCD?
>
Not sure about the LCDC DRM driver, but I just tested clk_set_rate()
For lcdc_gclk clock and it is working for me. I could able to set
300MHz freq on my BeagleBone platform, with below code -
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index e54a480..443fb26 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -11,6 +11,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#include <linux/clk-private.h>
#include <linux/io.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
@@ -37,6 +38,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = {
static void __init omap_generic_init(void)
{
+ struct clk *clk;
+
omap_sdrc_init(NULL, NULL);
of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
@@ -49,6 +52,15 @@ static void __init omap_generic_init(void)
omap4_panda_display_init_of();
else if (of_machine_is_compatible("ti,omap4-sdp"))
omap_4430sdp_display_init_of();
+
+ clk = clk_get(NULL, "lcd_gclk");
+ if (IS_ERR(clk))
+ printk("Can not get lcd_gclk clock\n");
+
+ printk("%s:%d gclk_rate - %lu\n", __func__, __LINE__, clk_get_rate(clk));
+ clk_set_rate(clk, 300000000);
+ printk("%s:%d clk_rate - %lu\n", __func__, __LINE__, clk_get_rate(clk));
+ clk_put(clk);
}
#ifdef CONFIG_SOC_OMAP2420
Thanks,
Vaibhav
More information about the dri-devel
mailing list