From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757636AbbCDAhT (ORCPT ); Tue, 3 Mar 2015 19:37:19 -0500 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]:54558 "EHLO mail-gw1-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753486AbbCDAhQ (ORCPT ); Tue, 3 Mar 2015 19:37:16 -0500 X-IronPort-AV: E=Sophos;i="5.09,684,1418112000"; d="scan'208";a="58672678" Message-ID: <54F653B9.4010507@broadcom.com> Date: Tue, 3 Mar 2015 16:37:13 -0800 From: Arun Ramamurthy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pawel Moll CC: Rob Herring , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , Dmitry Torokhov , "Anatol Pomazau" , Jonathan Richardson , Scott Branden , Ray Jui , "bcm-kernel-feedback-list@broadcom.com" Subject: Re: [PATCH] video: ARM CLCD: Added dt support to set tim2 register References: <1424898082-1522-1-git-send-email-arun.ramamurthy@broadcom.com> <1425312688.3092.10.camel@arm.com> <54F4B583.4000005@broadcom.com> <1425376977.3092.26.camel@arm.com> <1425378127.3092.38.camel@arm.com> In-Reply-To: <1425378127.3092.38.camel@arm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-03-03 02:22 AM, Pawel Moll wrote: > On Tue, 2015-03-03 at 10:02 +0000, Pawel Moll wrote: >> On Mon, 2015-03-02 at 19:09 +0000, Arun Ramamurthy wrote: >>>> The existing bindings intentionally avoided quoting internal registers - >>>> they are supposed to describe how the hardware is wired up... >>>> >>>> So how about something like "arm,pl11x,tft-invert-clac"? Then the driver >>>> sets the bit or not, depending on the property existance? >>>> >>> Sure, I can change it to two properties called arm,pl11x,tft-invert-clac >>> and arm,pl11x,tft-clksel. Would that be acceptable? >> >> That would be fine by me :-) > > Or (after having a look at the TRM) I should rather say: the invert-clac > is fine by me :-) but the tft-clksel doesn't work, I afraid. > > If I'm not mistaken, there are two problems with it. > > Number one: it's not TFT-specific, is it? So it certainly should not > have the "tft-" bit. > > Number two: setting this bit says "do not use CLCDCLK for the logic; use > HCLK instead", correct? If so, have a look at the clock properties. They > say: > > - clock-names: should contain "clcdclk" and "apb_pclk" > > - clocks: contains phandle and clock specifier pairs for the entries > in the clock-names property. See > > So if your hardware has the reference clock wired to HCLK, and you > defining the clocks as "clcdclk", you are (no offence meant ;-) > lying :-) > No offense taken :) > So how about solving the problem by extending the clock-names definition > like this (feel free to use own wording): > > - clock-names: should contain two clocks, either "clcdclk" or "hclk" > (depending on which input is to be used as a reference > clock by the controller logic) and "apb_pclk" > > That way you're precisely describing the way the hardware is wired up. > And the driver simply tries to get clcdclk first, if it's defined - > cool, set clksel to 1, if not - try hclk and set clksel to 0. If neither > of them is present - bail out. > > Does this make any sense? > This makes sense to me, thank you for the suggestions. I will fix it all up in V2 > Pawel >