dwc3 usb debugfs(otg switch)

yooooooo發表於2024-08-15

1. driver

driver/usb/dwc3/debugfs.c

dwc3 probe ->dwc3 debugfs init()

2. enable debugfs

mount -t debugfs none /sys/kernel/debug

3. user space path

#Is /sys/kernel/debug/300000.dwc3/

link state mode regdump testmode

4. otg switch

  1. enable device mode

echo device >/sys/kernel/debug/300000.dwc3/mode

  1. enable host mode

echo host >/sys/kernel/debug/300000.dwc3/mode

相關文章