how to specify an OMAP clock in device tree?

Roger Quadros rogerq at ti.com
Tue Feb 5 09:52:52 EST 2013


On 02/05/2013 04:36 PM, Rajendra Nayak wrote:
> On Tuesday 05 February 2013 07:59 PM, Roger Quadros wrote:
>> On 02/05/2013 04:21 PM, Rajendra Nayak wrote:
>>> On Tuesday 05 February 2013 07:48 PM, Roger Quadros wrote:
>>>> On 02/05/2013 04:13 PM, Rajendra Nayak wrote:
>>>>> On Tuesday 05 February 2013 07:16 PM, Roger Quadros wrote:
>>>>>> Fixing the device name doesn't really solve the problem.
>>>>>> Not all OMAP boards will use the same clock for the external device.
>>>>>
>>>>> Are you saying different OMAP boards will use different Internal clocks?
>>>>> Or different OMAP boards will use a single Internal clock or an
>>>>> external one.
>>>>>
>>>> All I was saying is that one board can use for example auxclk1 whereas another
>>>> one can use auxclk3, both generated by OMAP for the same PHY configuration.
>>>
>>> Ok, so lets keep DT aside for a while. How would something like this
>>> work in a non-DT world? Would the driver then be able to do a
>>> clk_get(dev, "main_clk"); and get say auxclk1 on one board and
>>> auxclk3 on another?
>>>
>>
>> Yes, all you need to do is specify an alias to the clock in the board file.
> 
> Can we then create a special board specific node for panda and do
> similar things from DT?
> See a similar discussion below on how to handle the gpio_request()
> we had as part of board files
> http://www.spinics.net/lists/linux-omap/msg85248.html

Doesn't look very elegant to me, but I wouldn't mind if there is no better option.
Even then, we can't rely on the device name as its index can change based on where it is
located in the dts file. e.g. in the beginning it may be named phy.8, and if a device
node is added before it, it will get changed to phy.9

> 
>>
>> e.g. in board 1 file
>>     clk_add_alias("main_clk", "phy.1", "auxclk1_ck", NULL);
>>
>> in board 2 file
>>     clk_add_alias("main_clk", "phy.1", "auxclk3_ck", NULL);
>>

cheers,
-roger




More information about the linux-arm-kernel mailing list