devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
To: Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver
Date: Wed, 16 Mar 2016 15:56:31 +0100	[thread overview]
Message-ID: <56E9741F.9070202@barix.com> (raw)
In-Reply-To: <56E30D43.9030508-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>



On 11.03.2016 19:24, Sergei Shtylyov wrote:
> On 03/11/2016 07:21 PM, Petr Kulhavy wrote:
>
>>> I am having 2nd thought on parsing the clock prop, Sergei's comment
>>> might be better. I will look more on this over this weekend. (DT is not
>>> in my expertise...)
>>>
>>> Regards,
>>> -Bin.
>>
>> I like Sergei's comment as well, but cannot see (yet) how the clock 
>> input
>> selection would be done.
>
>    The same way as now, of course. Only getting the clock frequency 
> would be different, via clk_get_rate()...
>
>> I mean, it makes sense to do the clock abstraction only if it can be 
>> done
>> properly and the clock input selection can be covered as well.
>
>    No, this item has never been covered by the clk layer IIRC. That's 
> what the device node props are for.

>> The DA8xx platform is missing the real clock framework and therefore the
>> different clocks cannot be referenced in DT.
>
>    You mean more than one clock per device?
>
>> There is a fake clock framework in arch/arm/mach-davinci/clock.c - I've
>> already been through that and then gave up.
>
>    I'm not sure why you call it "fake". It's a normal clk 
> implementation, just not converted to the common clk framework.
>

Hi Sergei,

what I mean is that the DA8xx platform does not use the common clock 
framework. It uses its own clock implementation instead which is 
incompatible with the common clock framework, since it uses the same 
function names. So the common clock framework cannot be even compiled 
with this architecture.

With common clock framework the USB 2.0 clock would be modelled as a 
multiplexer between AUXCLK and USB_REFCLKIN.
The AUXCLK would be a phandle to the respective internal clock. 
USB_REFCLKIN then a phandle to either fixed clock or another clock source.
Providing the right parent phandle, internally calling set_parent() 
would do the job and no extra property would be needed.
Or did I miss something?

If the common clock framework is not available for this platform then 
the only option I see is what I did in my patch -  to set the frequency 
via an integer property and control the multiplexer with another 
property. We cannot even do what you suggested as the fixed clock simply 
does not exist due to the lack of the common clock framework.
Or do you see another way?

Regards
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-03-16 14:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  8:29 [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver Petr Kulhavy
     [not found] ` <1457684989-13318-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-11  8:29   ` [PATCH 2/5 v10] usb: musb: core: added helper function for parsing DT Petr Kulhavy
2016-03-11  8:29   ` [PATCH 3/5 v10] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config Petr Kulhavy
     [not found]     ` <1457684989-13318-3-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-11 15:54       ` Bin Liu
2016-03-11  8:29   ` [PATCH 4/5 v10] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY Petr Kulhavy
2016-03-11  8:29   ` [PATCH 5/5 v10] usb: musb: da8xx: Add DT support for the DA8xx driver Petr Kulhavy
     [not found]     ` <1457684989-13318-5-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-11 11:22       ` Sergei Shtylyov
2016-03-11 11:24   ` [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver Sergei Shtylyov
2016-03-11 15:51   ` Bin Liu
2016-03-11 15:58     ` Petr Kulhavy
     [not found]       ` <56E2EB3C.6080602-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-11 16:06         ` Bin Liu
2016-03-11 16:21           ` Petr Kulhavy
     [not found]             ` <56E2F078.9020708-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-11 18:24               ` Sergei Shtylyov
     [not found]                 ` <56E30D43.9030508-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-03-16 14:56                   ` Petr Kulhavy [this message]
2016-03-11 18:27     ` Sergei Shtylyov
     [not found]       ` <56E30E0B.7020203-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-03-11 18:32         ` Bin Liu
2016-03-14  7:00   ` Felipe Balbi
     [not found]     ` <87fuvtbl26.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-03-15  2:07       ` David Lechner
     [not found]         ` <56E76E5A.5060801-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2016-03-15  7:52           ` Felipe Balbi
2016-04-04  8:45           ` Petr Kulhavy
     [not found]             ` <57022992.4060008-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-04-04 16:25               ` David Lechner
2016-03-18 19:14   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E9741F.9070202@barix.com \
    --to=petr-qh/3xlp0evwavxtiumwx3w@public.gmane.org \
    --cc=b-liu-l0cyMroinI0@public.gmane.org \
    --cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).