usb: dwc3: adapt to use dr_mode device tree helper

This patch adapts the dwc3 to use the device tree helper
"of_usb_get_dr_mode" for the mode of operation of the dwc3 instance
being probed.

[ balbi@ti.com : make of_usb_get_dr_mode() conditional on
	dev->of_node and let pdata pass dr_mode too ]

Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
diff --git a/drivers/usb/dwc3/platform_data.h b/drivers/usb/dwc3/platform_data.h
index 16ffe19..7db34f0 100644
--- a/drivers/usb/dwc3/platform_data.h
+++ b/drivers/usb/dwc3/platform_data.h
@@ -18,8 +18,10 @@
  */
 
 #include <linux/usb/ch9.h>
+#include <linux/usb/otg.h>
 
 struct dwc3_platform_data {
 	enum usb_device_speed maximum_speed;
+	enum usb_dr_mode dr_mode;
 	bool tx_fifo_resize;
 };