I have a imx8mm with type-C connector and Power Delivery chip. When I set up usbotg1 as a host, it works fine. I can connect mass storage device and it's working. Dts settings:
&usbotg1 {
dr_mode = "host";
hnp-disable;
srp-disable;
adp-disable;
disable-over-current;
status = "okay";
};
When I try to set it as a peripheral in dts, load some gadget module and then connect it to host PC there is complete silence on host PC. No usb detection, no error messages, nothing. Dts settings:
&usbotg1 {
dr_mode = "peripheral";
hnp-disable;
srp-disable;
adp-disable;
disable-over-current;
status = "okay";
};
It looks like gadget is configured.
# cat /sys/kernel/debug/usb/ci_hdrc.0/role
gadget
When I load g_ether I can see:
cat /sys/kernel/debug/usb/ci_hdrc.0/device
speed = 0
max_speed = 3
is_otg = 0
is_a_peripheral = 0
b_hnp_enable = 0
a_hnp_support = 0
a_alt_hnp_support = 0
name = 32e40000.usb
gadget function = g_ether
gadget max speed = 5
and usb0 interface is present, but still nothing on host PC.
Is there something more that must be configured to let imx8mm work as usb peripheral?