VIM1S Android 11 USB OTG Port as Host

Hi Team,

We wanted to make USB OTG port as USB Host Port in VIM1S, what are the changes required in DTB or kernel to do this and also how to do that ?

  1. What is the kernel menuconfig command from WORKING_DIRECTORY in Android 11 SDK ?
  2. Is there any command line option to change USB OTG port between Host and Device like /proc/ /sys FS commands

Regards,
YSN

@ysn_yaga
common/arch/arm64/boot/dts/amlogic/kvim1s.dts

&dwc2_a {
	status = "okay";
	/** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
-	controller-type = <2>;
+	controller-type = <1>;
};

@goenjoy We have attempted to compile with above suggestion, but still USB OTG port is not changed to HOST mode, still in device mode.
also getting this message in console.
[ 145.194396] <4>[ 145.194396@0] USB RESET
[ 416.821356] <4>[ 416.821356@0] USB RESET
Is there any other configuration missing in this case ?

Regards,
YSN

@ysn_yaga

--- a/arch/arm64/boot/dts/amlogic/kvim1s.dts
+++ b/arch/arm64/boot/dts/amlogic/kvim1s.dts
@@ -1185,7 +1185,7 @@
 };
 
 &dwc2_a {
-       status = "okay";
+       status = "disabled";

Hi @goenjoy Still not able get correct OTG as Host configuration ?
Can you suggest ?

@ysn_yaga My verification is OK. Are you using our board for verification?

Yes, Using Khadas VIM1S

@ysn_yaga Have you executed the compile kernel command? Also, record a video to see the process and phenomena of your verification. Can you tell me your purpose for this?