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>;
        }
};

Thanks,
Frieder

Reply via email to