Hi ,
See below, please!
----------------------------------
>> I want to switch the USB mode from host to device manually.
No, it can't be set manually.
>>Is there any way to achieve this from user space or system level commands?
No, there is not. usb driver doesn't support the way.
[comment]
It can be configured in 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>;
};
};*/
};
Hope this information is helpful to you.
Have a nice day!
B.R,
weidong
Hi Weidong Sun,
Thanks for your reply.
I implemented the above change in the android kernel dts file and rebuilt android images. However, the behavior is still same as before (using USB A port). How can I access the board as a USB device by an external host during runtime?
Regards,
Nishant