From patchwork Mon Apr 1 11:31:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 2371741 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id F32363FDDA for ; Mon, 1 Apr 2013 16:44:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D98C2E60C9 for ; Mon, 1 Apr 2013 09:44:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F2A7E5C63 for ; Mon, 1 Apr 2013 04:31:38 -0700 (PDT) Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r31BVYai028280; Mon, 1 Apr 2013 06:31:35 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r31BVUmT008783; Mon, 1 Apr 2013 17:01:31 +0530 (IST) Received: from DBDE01.ent.ti.com ([fe80::d5df:c4b5:9919:4e10]) by DBDE71.ent.ti.com ([fe80::692c:15fd:9507:b54%21]) with mapi id 14.01.0323.003; Mon, 1 Apr 2013 17:01:31 +0530 From: "Hiremath, Vaibhav" To: Michal Bachraty , "dri-devel@lists.freedesktop.org" , "devicetree-discuss@lists.ozlabs.org" Subject: RE: drm/tilcdc: LCD panels clocks initialization and earlier backlight initialization Thread-Topic: drm/tilcdc: LCD panels clocks initialization and earlier backlight initialization Thread-Index: AQHOK9o8mi04cN//TU+dblusFPChv5jBPgpw Date: Mon, 1 Apr 2013 11:31:30 +0000 Message-ID: <79CD15C6BA57404B839C016229A409A83EC3E861@DBDE01.ent.ti.com> References: <1552838.0ugGbIv7sQ@ganymedes> In-Reply-To: <1552838.0ugGbIv7sQ@ganymedes> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.133.105] MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 01 Apr 2013 09:41:31 -0700 Cc: "koen@dominion.thruhere.net" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org > -----Original Message----- > From: devicetree-discuss [mailto:devicetree-discuss- > bounces+hvaibhav=ti.com@lists.ozlabs.org] On Behalf Of Michal Bachraty > Sent: Thursday, March 28, 2013 11:02 PM > To: dri-devel@lists.freedesktop.org; devicetree- > discuss@lists.ozlabs.org > Cc: robdclark@gmail.com; koen@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 - Thanks, Vaibhav 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 #include #include #include @@ -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