In imx35.dtsi there is:
usbotg: usb@53ff4000 {
compatible = "fsl,imx35-usb", "fsl,imx27-usb";
reg = <0x53ff4000 0x0200>;
interrupts = <37>;
clocks = <&clks 73>;
fsl,usbmisc = <&usbmisc 0>;
fsl,usbphy = <&usbphy0>;
status = "disabled";
};
And in our dts we have:
&usbotg {
compatible = "imx-udc-mx27";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
dr_mode = "peripheral";
phy_type = "utmi_wide";
status = "okay";
/* what to do with workaround = FLS_USB2_WORKAROUND_ENGCM09152 ??? */
};
In our config we have:
CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC=y
CONFIG_USB_GADGET=y
CONFIG_USB_FSL_USB2=y
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_ACM=m
CONFIG_USB_U_SERIAL=m
CONFIG_USB_F_SERIAL=m
CONFIG_USB_F_OBEX=m
CONFIG_USB_F_MASS_STORAGE=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
But modprobe g_serial returns -ENODEV because no UDC can be found in
usb_gadget_probe_driver().
So I assumed I have to add an UDC in the device tree. This seems to be wrong.
So, my question is: why is there no UDC found?
We are using fsl_udc_core.c and fsl_mxc_udc.c.
Greetings
Sebastian Priebe
==========================================
CADCON
Ingenieurgesellschaft mbH & Co. KG
Geschaeftsfuehrer: Robert Bauer, Andreas Gundel
Sitz der Gesellschaft: D-86368 Gersthofen
Registergericht: Amtsgericht Augsburg HRA 14521
==========================================
-----Ursprüngliche Nachricht-----
Von: Fabio Estevam [mailto:[email protected]]
Gesendet: Mittwoch, 6. August 2014 14:32
An: Priebe, Sebastian
Cc: [email protected]
Betreff: Re: where to add imx-udc-mx27 in device tree
On Wed, Aug 6, 2014 at 8:52 AM, Priebe, Sebastian <[email protected]>
wrote:
> Hello,
>
> I pulled linux-next, but still can't figure out where to add my udc.
> Can you please explain when fsl-udc is loaded?
Maybe I don't understand the question.
There is no 'fsl-udc' that needs to be loaded at all. The USB driver for imx is
the chipidea driver.
In the imx27.dtsi we have:
usbotg: usb@10024000 {
compatible = "fsl,imx27-usb";
reg = <0x10024000 0x200>;
interrupts = <56>;
clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
fsl,usbmisc = <&usbmisc 0>;
status = "disabled";
};
usbh1: usb@10024200 {
compatible = "fsl,imx27-usb";
reg = <0x10024200 0x200>;
interrupts = <54>;
clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
fsl,usbmisc = <&usbmisc 1>;
status = "disabled";
};
usbh2: usb@10024400 {
compatible = "fsl,imx27-usb";
reg = <0x10024400 0x200>;
interrupts = <55>;
clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
fsl,usbmisc = <&usbmisc 2>;
status = "disabled";
};
So the "compatible = "fsl,imx27-usb";" is all we need there.