- make proper kernel and modules config with USB_GADGET support, rebuild kernel and install
- change dtb/dts for change usb mode from HOST to DEVICE
NOTE: vendor kernel 4.9.29 dts
&dwc2_a {
status = "okay";
/** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
controller-type = <3>;
};
NOTE: mainline kernel 5.4.xxx need some patches u can get workable kernel and dts with USB_GADGET there GitHub - hyphop/khadas-linux-kernel: linux kernel for khadas vim boards
NOTE: dont forget change kbi portmode from PCIE to USB !!!