Hi,
I am trying to enable USB OTG port for use as a HID device for KVM.
Based on,
https://boot.libre.computer/ci/aml-s905x-cc.dts
usb = “/soc/usb@d0078080”;
dwc2 = “/soc/usb@d0078080/usb@c9100000”;
dwc3 = “/soc/usb@d0078080/usb@c9000000”;
I have added the following overlay for the USB OTG port highlighted above in BOLD.
/dts-v1/;
/plugin/;
/ {
compatible = “libretech,cc”, “amlogic,s905x”, “amlogic,meson-gxl-usb-ctrl”;
fragment@0 {
target = <&dwc2>;
__overlay__ {
dr_mode = "otg";
status = "okay";
};
};
};
The usb-gadget service starts successfully and creates the /dev/hidg0 and /dev/hidg1 devices.
dmesg shows the following log.
[ 2.591463] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator
[ 2.591672] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator
[ 2.591906] dwc2 c9100000.usb: Configuration mismatch. dr_mode forced to device
[ 2.591990] dwc2 c9100000.usb: EPs: 7, dedicated fifos, 712 entries in SPRAM
[ 14.898891] dwc2 c9100000.usb: dwc2_hsotg_init_fifo: timeout flushing fifos (GRSTCTL=80000430)
[ 14.910718] dwc2 c9100000.usb: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST
[ 14.910909] dwc2 c9100000.usb: bound driver configfs-gadget
[ 14.922404] dwc2 c9100000.usb: dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL_CSFTRST
But unable to write anything to the device. Error is as follows.
echo -ne “\x20\0\xb\0\0\0\0\0” > /dev/hidg0 && echo -ne “\0\0\xc\0\0\0\0\0” > /dev/hidg0 && echo -ne “\0\0\0\0\0\0\0\0” > /dev/hidg0
-bash: echo: write error: Cannot send after transport endpoint shutdown
Can anyone help please?