Revert "USB: chipidea: add vbus detect for udc"

vbus register is at otgsc, and vbus detect does not belong
to device function. Revert this patch, and will move
vbus detect function to drivers/usb/chipidea/udc.c

This reverts commit 8c4fc031954b4eb72daf13d3c907a985a3eee208.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: add otg file

Implement struct usb_otg, In that way, calling otg_set_peripheral
will not be failed at udc.c.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: add otg id switch and vbus connect/disconnect detect

The main design flow is the same with msm otg driver, that is the id and
vbus interrupt are handled at core driver, others are handled by
individual drivers.

- At former design, when switch usb role from device->host, it will call
udc_stop, it will remove the gadget driver, so when switch role
from host->device, it can't add gadget driver any more.
At new design, when role switch occurs, the gadget just calls
usb_gadget_vbus_disconnect/usb_gadget_vbus_connect as well as
reset controller, it will not free any device/gadget structure

- Add vbus connect and disconnect to core interrupt handler, it can
notify udc driver by calling usb_gadget_vbus_disconnect
/usb_gadget_vbus_connect.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: consolidate ci_role_driver's API for both roles

- Create init/destroy API for probe and remove
- start/stop API are only used otg id switch process
- Create the gadget at ci_hdrc_probe if the gadget is supported
for that port, the purpose for this is to simply file the ci_role_driver
's start API and avoid gadget module load fail at init.rc.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: udc: add pullup/pulldown dp at hw_device_state

- During the connect/disconnect host, we need to pullup
and pulldown dp
- Make sure the dp is not pullup until the vbus is on when
flag CI13XXX_PULLUP_ON_VBUS is set
- Using hw_device_state when set run/stop bit

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: udc: retire the flag CI13_PULLUP_ON_VBUS

(change CI13XXX to CI13 to avoid junk email check)
Now, we have handled vbus session in core driver when the
vbus interrupt occurs, so our pullup operations are all
according to vbus.
Of cource, the software can still call .pullup when device connects
to host if it wants to connect/disconnect with host.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: imx: add internal vbus regulator control

- For host, the vbus should always be on.
- For otg, the vbus is off defaultly, the vbus needs to be
turned on/off when usb role switches.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
pinctrl: mx6: temp solution for iomux register for gpr register

Just temp solution for usb otg pin

Signed-off-by: Peter Chen <peter.chen@freescale.com>
usb: chipidea: imx: select usb id pin using syscon interface

When the otg is supported, we need to select usb id pin.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Revert "pinctrl: mx6: temp solution for iomux register for gpr register"

Added the pinctrl patch

This reverts commit 777425d693885a5f921a4b0bca45653a06e360dc.