Re: Set reference clock for onboard hub in DT

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

 



Hi Fabio,

On 25.10.18 15:20, Fabio Estevam wrote:
> Hi Frieder,
> 
> On Thu, Sep 20, 2018 at 10:52 AM Frieder Schrempf
> <frieder.schrempf@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> I have a question concerning the setup for a board with an onboard USB
>> hub. The SoC (i.MX6S) is expected to provide a 12 MHz clock on one of
>> the clock output pins as a reference for the USB hub.
>>
>> Now I was looking for a way to configure this in the DT, which works
>> fine up to the point, that there doesn't seem to be a way to set a
>> reference clock for a generic USB device.
>>
>> Would it make sense to implement the enabling/disabling of the clock in
>> the generic USB device driver?
>> It doesn't seem right to write a separate driver for the hub only to
>> turn the clock on and off.
>>
>> My intended DT setup would look something like this:
>>
>> &usbh1 {
>>          vbus-supply = <&reg_usb_h1_vbus>;
>>          pinctrl-names = "default";
>>          pinctrl-0 = <&pinctrl_usbh1>;
>>          dr_mode = "host";
>>          status = "okay";
>>          #address-cells = <1>;
>>          #size-cells = <0>;
>>
>>          hub@1 {
>>                  compatible = "usb4b4,6570";
>>                  reg = <1>;
>>                  clocks = <&clks IMX6QDL_CLK_CKO>;
>>                  assigned-clocks = <&clks IMX6QDL_CLK_CKO>,
>>                                    <&clks IMX6QDL_CLK_CKO2_SEL>,
>>                                    <&clks IMX6QDL_CLK_CKO2>;
>>                  assigned-clock-parents = <&clks IMX6QDL_CLK_CKO2>,
>>                                           <&clks IMX6QDL_CLK_OSC>,
>>                                           <&clks IMX6QDL_CLK_CKO2_PODF>;
>>                  assigned-clock-rates = <0 0 12000000>;
>>          }
>> };
> 
> Peter Chen has tried to implement such support:
> https://lkml.org/lkml/2017/6/21/88
> 
> However it still needs some work so that it can be accepted in mainline.

Thank you for pointing that out. This looks like a rather complex 
framework, trying to handle all kinds of generic clock and power setups.

For my use case it would be enough to add handling of a single reference 
clock to the USB device driver.

Thanks,
Frieder




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux