Re: [PATCH 01/13] usb: phy: nop: Add device tree support and binding information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/11/2013 09:40 AM, Roger Quadros wrote:
> On 03/08/2013 05:45 PM, Marc Kleine-Budde wrote:
>> On 03/08/2013 11:46 AM, Marc Kleine-Budde wrote:
>>> On 02/04/2013 04:58 PM, Roger Quadros wrote:
>>>> The PHY clock, clock rate, VCC regulator and RESET regulator
>>>> can now be provided via device tree.
>>>>
>>>> Signed-off-by: Roger Quadros <rogerq@xxxxxx>
>>>> ---
>>>>  .../devicetree/bindings/usb/usb-nop-xceiv.txt      |   34 ++++++++++++++++++++
>>>>  drivers/usb/otg/nop-usb-xceiv.c                    |   31 ++++++++++++++++++
>>>>  2 files changed, 65 insertions(+), 0 deletions(-)
>>>>  create mode 100644 Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
>>>> new file mode 100644
>>>> index 0000000..d7e2726
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
>>>> @@ -0,0 +1,34 @@
>>>> +USB NOP PHY
>>>> +
>>>> +Required properties:
>>>> +- compatible: should be usb-nop-xceiv
>>>> +
>>>> +Optional properties:
>>>> +- clocks: phandle to the PHY clock. Use as per Documentation/devicetree
>>>> +  /bindings/clock/clock-bindings.txt
>>>> +  This property is required if clock-frequency is specified.
>>>> +
>>>> +- clock-names: Should be "main_clk"
>>>> +
>>>> +- clock-frequency: the clock frequency (in Hz) that the PHY clock must
>>>> +  be configured to.
>>>> +
>>>> +- vcc-supply: phandle to the regulator that provides RESET to the PHY.
>>>> +
>>>> +- reset-supply: phandle to the regulator that provides power to the PHY.
>>>> +
>>>> +Example:
>>>> +
>>>> +	hsusb1_phy {
>>>> +		compatible = "usb-nop-xceiv";
>>>> +		clock-frequency = <19200000>;
>>>
>>> Why do you hardcode the clock frequency here? You should use
>>> clk_get_rate() to get the frequency from the clock tree.
>>
>> What about declaring a "fixed-clock" node in the device tree? Then it
>> should be possible to keep the driver free of any omap specific code.
>>
> 
> The current implementation is not OMAP specific and is not limited to a
> fixed frequency clock. The PHY driver is using standard clock APIs to set
> the clock rate 'only' if the 'clock-frequency' property is present in the
> device tree node.
> 
> What is the benefit of declaring it as a "fixed-clock"?
> FYI. The clock may not necessarily be a fixed frequency clock and someone
> needs to program the rate.

Okay, now I got it.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux