This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: AM625 USB0当device只能枚举一次

Part Number: AM625

系统加载完成后,设置USB0为peripheral模式,当device只能枚举一次,插拔USB口不能再次枚举;

操作步骤:

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

然后拔插USB线,枚举一次后再无法枚举,需上下电后再加载ko才可以枚举;

dv1912_usb_host.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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:/ #
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
am625_usb_device.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX