mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ARM: dts: rockchip: set usb dr_mode to otg for rv1106 evb1 and evb2
Most of rv1106 evb1 and evb2 dts set the usbdrd_dwc3 dr_mode to peripheral, it aimed to avoid conflict when set vbus-supply for otg host mode, likes rv1106g-evb2 v10, the USB_PWREN gpio is shared with usb vbus-supply and emmc/spi, and set peripheral mode can also simplify the usb controller initialization process. However, peripheral mode causes two issues: 1. USB device can't be recognized in hot plug scenario. The dwc3 driver print err log: dwc3 ffb00000.usb: failed to enable ep0out 2. The dwc3 driver fails to stop controller in the function dwc3_gadget_run_stop() when do system reboot, and it will increase the reboot time because the stop timeout is set to usleep_range(1000, 2000) * 2000. If the CONFIG_HIGH_RES_TIMERS is disabled and the CONFIG_HZ_100 is enabled, the dwc3 stop timeout will take about 20 seconds. The root cause of the two issues is that the usb2 phy is set to suspend mode in phy driver if the usb in unconnected state, and the usb controller internal utmi clock provided by usb2 phy is also disabled. If the dwc3 driver access the registers of the dwc3 controller while the usb2 phy in suspend mode, the accessing operation is invalid. This patch sets the dr_mode to otg, then the dwc3 driver will enable the pm runtime and avoid accessing its registers while the usb2 phy in suspend mode. In otg mode, the dwc3 uses the extcon notifier from the usb2 phy to set peripheral or host mode. Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: I0e77771c2ef62ee6b86c5d7d6444ea7539e51833
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
|
||||
@@ -35,5 +35,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
&vdd_arm {
|
||||
|
||||
@@ -416,5 +416,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -286,5 +286,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -285,5 +285,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -591,7 +591,7 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
&vop {
|
||||
|
||||
@@ -130,5 +130,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -125,5 +125,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -130,5 +130,5 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
};
|
||||
|
||||
&usbdrd_dwc3 {
|
||||
dr_mode = "peripheral";
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
&acodec {
|
||||
|
||||
Reference in New Issue
Block a user