USB device/gadget mode on iMX8MQ-EVK.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB device/gadget mode on iMX8MQ-EVK.

1,246 Views
nkulgod
Contributor II

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

0 Kudos
3 Replies

1,240 Views
weidong_sun
NXP TechSupport
NXP TechSupport

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:

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-US...

 

Hope this information is helpful to you.

Have a nice day!

B.R,

weidong

0 Kudos

1,237 Views
nkulgod
Contributor II

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

0 Kudos

1,207 Views
nkulgod
Contributor II

Hi,

Any update on this query?

Thanks in advance,
Nishant

0 Kudos