[PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode

Sascha Hauer s.hauer at pengutronix.de
Mon Feb 10 03:31:48 EST 2014


On Mon, Feb 10, 2014 at 09:28:54AM +0100, Eric Bénard wrote:
> Hi Sascha,
> 
> Le Mon, 10 Feb 2014 09:16:17 +0100,
> Sascha Hauer <s.hauer at pengutronix.de> a écrit :
> > On Sat, Feb 08, 2014 at 03:16:10PM +0100, Eric Bénard wrote:
> > >  &usbotg {
> > > -       status = "okay";
> > > +	phy_type = "utmi";
> > > +	dr_mode = "host";
> > > +	status = "okay";
> > >  };
> > 
> > Do we need a barebox specific option to specify dr_mode? I mean barebox
> > cannot do otg, so we need to specify dr_mode to host or device, but with
> > the above change Linux is limited to host mode aswell.
> > 
> in chipidea-imx.c there is :
> 
> 	mode = of_usb_get_dr_mode(ci->dev->device_node, NULL);
> 
> 	switch (mode) {
> 	case USB_DR_MODE_HOST:
> 	default:
> 		ci->mode = IMX_USB_MODE_HOST;
> 		break;
> 	case USB_DR_MODE_PERIPHERAL:
> 		ci->mode = IMX_USB_MODE_DEVICE;
> 		break;
> 	}
> 
> so we could omit the dr_mode=host as it will default to host.

Then let's do this. The default-to-host beahaviour in barebox may not
be desirable in all cases, but at least we do not propagate this
behaviour to the kernel.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list