Other Parts Discussed in Thread: TPS65988
Hi, USB Owner;
I encountered a problem. After the system is loaded, set USB0 to peripheral mode. the device can only be enumerated once, the USB port cannot be enumerated again.
steps as follows:
insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/libcomposite.ko
insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/function/usb_f_printer.ko
insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/legacy/g_printer.ko
When the device cannot be enumerated, it needs to be powered off and then loaded to enumerate;
25:39 [ 2461.258907] [0: kworker/0:0: 4780] usb 1-1.2: new high-speed USB device number 9 using xhci-hcd 25:39 [ 2461.376557] [0: kworker/0:0: 4780] usb 1-1.2: generic_probe: slot_id = 2, idVendor=0525, idProduct=a4a8 25:39 [ 2461.406625] [0: kworker/0:0: 4780] usblp 1-1.2:1.0: usblp0: USB Bidirectional printer dev 9 if 0 alt 0 proto 2 vid 0x0525 pid 0xA4A8 25:39 [ 2461.419147] [0: kworker/0:0: 4780] usb_notify: call_device_notify device 25:39 [ 2461.426358] [0: kworker/0:0: 4780] usb_notify: send_otg_notify event=device_connect(20) enable=1 25:39 [ 2461.435615] [0: kworker/0:0: 4780] usb_notify: extra_notifier_callback event=device_connect(20) 25:39 [ 2461.445244] [0: kworker/0:0: 4780] usb_notify: extra_notify_state+ event=device_connect(20), enable=on 25:39 [ 2461.454999] [0: kworker/0:0: 4780] usb_notify: extra_notify_state- event=device_connect(20), cable=none 25:39 [ 2461.464895] [0: kworker/0:0: 4780] usb_notify: check_gamepad_device : product=Printer Gadget 25:39 [ 2461.473815] [0: kworker/0:0: 4780] usb_notify: check_lanhub_device : product=Printer Gadget 25:39 [ 2461.482693] [0: kworker/0:0: 4780] usb_notify: call_battery_notify : VID : 0x525, PID : 0xa4a8, on=1, count=1 25:39 [ 2461.493516] [0: kworker/0:0: 4780] usb_notify: send_otg_notify event=smtd_ext_current(18) enable=1 25:39 [ 2461.502946] [0: kworker/0:0: 4780] usb_notify: extra_notifier_callback event=smtd_ext_current(18) 25:39 [ 2461.512318] [0: kworker/0:0: 4780] usb_notify: extra_notify_state+ event=smtd_ext_current(18), enable=on 25:39 [ 2461.522237] [0: kworker/0:0: 4780] usb_notify: No smart dock!!!!!! 25:39 [ 2461.528860] [0: kworker/0:0: 4780] usb_notify: extra_notify_state- event=smtd_ext_current(18), cable=none 25:39 [ 2461.539305] [0: kworker/0:0: 4780] usb_notify: check_device_speed : attached highspeed device 25:44 25:45 dv1912:/ # 25:45 dv1912:/ # 25:45 dv1912:/ # 25:45 dv1912:/ # 25:45 dv1912:/ # 25:45 dv1912:/ # 25:45 dv1912:/ # 26:09 dv1912:/ # [ 2490.989459] [0: kworker/0:0: 4780] usb 1-1.2: USB disconnect, device number 9 26:09 [ 2491.000492] [0: kworker/0:0: 4780] usblp0: removed 26:09 [ 2491.008565] [0: kworker/0:0: 4780] usb 1-1.2: generic_disconnect: slot_id = 2, idVendor=0525, idProduct=a4a8 26:09 [ 2491.019360] [0: kworker/0:0: 4780] usb_notify: call_battery_notify : VID : 0x525, PID : 0xa4a8, on=0, count=0 26:09 [ 2491.029749] [0: kworker/0:0: 4780] usb_notify: send_otg_notify event=smtd_ext_current(18) enable=0 26:09 [ 2491.039149] [0: kworker/0:0: 4780] usb_notify: extra_notifier_callback event=smtd_ext_current(18) 26:09 [ 2491.048513] [0: kworker/0:0: 4780] usb_notify: extra_notify_state+ event=smtd_ext_current(18), enable=off 26:09 [ 2491.058544] [0: kworker/0:0: 4780] usb_notify: No smart dock!!!!!! 26:09 [ 2491.065218] [0: kworker/0:0: 4780] usb_notify: extra_notify_state- event=smtd_ext_current(18), cable=none 26:14 26:14 dv1912:/ # 26:15 dv1912:/ #
20:24:38 20:24:38 _____ _____ _ _ 20:24:38| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_ 20:24:38| | _| .'| . | . | | __| _| . | | | -_| _| _| 20:24:38|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_| 20:24:38 |___| |___| 20:24:38 20:24:38Arago Project http://arago-project.org am62xx-evm ttyS2 20:24:38 20:24:38Arago 2021.09 am62xx-evm ttyS2 20:24:38 20:24:40am62xx-evm login: 20:24:42am62xx-evm login: root 20:24:43root@am62xx-evm:~# 20:24:43root@am62xx-evm:~# 20:24:43root@am62xx-evm:~# 20:24:43root@am62xx-evm:~# 20:24:57root@am62xx-evm:~# [ 33.862246] tlv71033: disabling 20:25:34 20:25:34root@am62xx-evm:~# 20:25:34root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:35root@am62xx-evm:~# 20:25:38root@am62xx-evm:~# insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/libcomposite.ko 20:25:38insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/function/usb_f_printer.ko 20:25:38insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/legacy/g_printer.koroot@am62xx-evm:~# insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/function/usb_f_printer.ko 20:25:39root@am62xx-evm:~# insmod /lib/modules/5.10.109-g9e58028f94/kernel/drivers/usb/gadget/legacy/g_printer.ko 20:25:39[ 75.463975] printer gadget: printer ready 20:25:39root@am62xx-evm:~# [ 75.823567] printer gadget: Using interface 0 20:25:39[ 75.832122] printer gadget: Using interface 0 20:25:40 20:25:40root@am62xx-evm:~# 20:25:41root@am62xx-evm:~# 20:26:05root@am62xx-evm:~# 20:26:32root@am62xx-evm:~# [ 128.546087] Initializing XFRM netlink socket