Hi,
We have an iMX8MQ-EVK board running android_Q10.0.0_2.3.0 default build. For some use cases, we need the board to act as a USB device after connecting to a USB host via the USB-A port.
We found one command for the iMX6Q Sabre and iMX8QM boards:
echo gadget > /sys/bus/platform/devices/ci_hdrc.0/role
Which platform dependent command can help us achieve this on our board (iMX8MQ-EVK)?
Thanks,
Nishant
Hi,
1. On i.MX8MQ-EVK
we can set it to be usb device role via device tree, like below:
&usb_dwc3_0 {
dr_mode = "peripheral"
hnp-disable;
srp-disable;
adp-disable;
/* usb-role-switch; */
snps,dis-u1-entry-quirk;
snps,dis-u2-entry-quirk;
status = "okay";
/*
port {
usb3_drd_sw: endpoint {
remote-endpoint = <&typec_dr_sw>;
};
};*/
};
2. On customized board without PD chip and only microUSB or USB type-A
Users can refer to the document:
Hope this information is helpful to you.
Have a nice day!
B.R,
weidong
Hi Weidong-Sun,
We have implemented the 1st step in device tree source file (imx8mq-evk.dts) and rebuilt+reflashed android. We want to know how to access the USB Device mode during runtime or is it always USB Device mode by default?
Thanks,
Nishant
Hi,
Any update on this query?
Thanks in advance,
Nishant