Commit 538b77b
committed
usb: dwc2: add a watchdog timer for a reset on the USB
When I do continuously and quickly hotplug test on RK3308 EVB
OTG interface which is configured as uac1 function, I find
that the USB Host does not see that the device is connected
occasionally. In this case, it seems that the dwc2 controller
run into soft disconnect state, although the SftDiscon bit of
DCTL register is 0. We can't find the root cause for the time
being, fortunately, the dwc2 controller can detect the session
detected interrupt, so we can workaroud this issue depend on
this interrupt.
This patch adds a watchdog timer. When the dwc2 controller
detects the session detected interrupt for device mode, start
the watchdog timer to wait for a reset on USB. If wait for
reset timeout, do soft disconnect and soft connect in watchdog
timer function, and try to generate a device connect event to
the USB Host.
Change-Id: I9bd965b75ab3903d300302cf356cc1a843ad6e64
Signed-off-by: William Wu <william.wu@rock-chips.com>1 parent 88a3518 commit 538b77b
3 files changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
| |||
887 | 888 | | |
888 | 889 | | |
889 | 890 | | |
| 891 | + | |
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
| |||
999 | 1001 | | |
1000 | 1002 | | |
1001 | 1003 | | |
| 1004 | + | |
1002 | 1005 | | |
1003 | 1006 | | |
1004 | 1007 | | |
| 1008 | + | |
1005 | 1009 | | |
1006 | 1010 | | |
1007 | 1011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
335 | 343 | | |
336 | 344 | | |
337 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2464 | 2464 | | |
2465 | 2465 | | |
2466 | 2466 | | |
| 2467 | + | |
| 2468 | + | |
2467 | 2469 | | |
2468 | 2470 | | |
| 2471 | + | |
2469 | 2472 | | |
2470 | 2473 | | |
2471 | 2474 | | |
| |||
2807 | 2810 | | |
2808 | 2811 | | |
2809 | 2812 | | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
2810 | 2817 | | |
2811 | 2818 | | |
2812 | 2819 | | |
| |||
3805 | 3812 | | |
3806 | 3813 | | |
3807 | 3814 | | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
| 3829 | + | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
| 3833 | + | |
| 3834 | + | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
3808 | 3854 | | |
3809 | 3855 | | |
3810 | 3856 | | |
| |||
4002 | 4048 | | |
4003 | 4049 | | |
4004 | 4050 | | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
4005 | 4054 | | |
4006 | 4055 | | |
4007 | 4056 | | |
| |||
4021 | 4070 | | |
4022 | 4071 | | |
4023 | 4072 | | |
| 4073 | + | |
4024 | 4074 | | |
4025 | 4075 | | |
4026 | 4076 | | |
| |||
0 commit comments