AM6548: USB mode setting

Part Number: AM6548

Tool/software:

Hi Ti,

We are using AM654 with Linux RT SDK 7 and we have 2 usb ports. usb0 as peripheral and usb1 as host mode. Both mode works well.

usb20_host_pins_default: usb20_host_pins_default {
pinctrl-single,pins = <
AM65X_IOPAD(0x02c0, PIN_OUTPUT, 0) /* (AC8) GPIO1_72 */ /*USB1_DRVVBUS*/
>;
};

&usb0 {
pinctrl-names = "default";
dr_mode = "peripheral";
};

&usb1 {
pinctrl-names = "default";
pinctrl-0 = <&usb20_host_pins_default>;
dr_mode = "host";
};

However, we want to measure USB eye diagram of usb1, we change the dr_mode from host to peripheral. But nothing happened after connect with PC.

Is there anything lost or any limitation?

&usb1 {
pinctrl-names = "default";
pinctrl-0 = <&usb20_host_pins_default>;
dr_mode = "peripheral";
};

Thanks.

Eric

  • Hi Eric,

    our subject matter expert is currently out of the office (U.S. Holidays) and will return next week. Please allow for some additional time to get your concern addressed here.

    Regards, Andreas

  • Hi Eric,

    However, we want to measure USB eye diagram of usb1, we change the dr_mode from host to peripheral. But nothing happened after connect with PC.

    Did you load any USB gadget driver in Linux on AM65x? For the USB host to detect the USB device, a USB gadget driver has to be loaded on the USB device side.

  • Hi Bin,

    Sure, I use "modprobe g_serial" to load serial driver.

    But there is only one serial port works when I set both usb as peripheral.

    Eric

  • Hi Eric,

    If both AM65x USB ports dr_mode set to "peripheral", you would have to load two different gadget drivers, each will be bound to one port. Kernel doesn't allow to load the same gadget driver multiple times.

    If you want both USB ports to work as a USB serial device, you would have to use USB gadgetfs to create two different gadgets with the same serial gadget function.