[U-Boot] [PATCH v3 1/3] AM335x : Add USB support for AM335x in u-boot

Sohanpal, Harman harman_sohanpal at ti.com
Fri Jun 29 13:11:18 CEST 2012



> -----Original Message-----
> From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Rini, Tom
> Sent: Wednesday, June 27, 2012 10:50 PM
> To: Sohanpal, Harman
> Cc: u-boot at lists.denx.de; Gene Zarkhin
> Subject: Re: [U-Boot] [PATCH v3 1/3] AM335x : Add USB support for AM335x
> in u-boot
> 
> On Tue, Jun 26, 2012 at 03:08:01PM +0530, Harman Sohanpal wrote:
> 
> > From: Gene Zarkhin <gene_zarkhin at bose.com>
> >
> > Adds USB support in uboot for AM335x.
> > By default the USB 1 module is enabled.
> > The support for USB 0 can be enabled by changing the
> > USB base address and the phy control register address
> > in the header file am335x.h.
> > USB 1 has a full size connector so acts in host mode and
> > USB 0 has a mini connector so used in device mode.
> > By default, the support is added for host mode hence USB 1
> > has been enabled by default.
> >
> > Signed-off-by: Gene Zarkhin <gene_zarkhin at bose.com>
> > Signed-off-by: Harman Sohanpal <harman_sohanpal at ti.com>
> 
> What I was saying was that we want to make am335x.h do:
> #define AM335X_USB0_BASE 0x47401000
> #define AM335X_USB1_BASE 0x47401800
> 
> Then:
> #ifdef CONFIG_AM335X_USB0
> #define AM335X_USB_OTG_BASE AM335X_USB0_BASE
> #elif defined(CONFIG_AM335X_USB1)
> #define AM335X_USB_OTG_BASE AM335X_USB1_BASE
> #endif
> #define AM335X_USB_OTG_CORE_BASE (AM335X_USB_OTG_BASE + 0x400)
> 
> So that in boards.cfg we could add an entry for am335x_evm_usb1 and set
> CONFIG_AM335X_USB1 dynamically.  Then in am335x_evm.h set either
> MUSB_HCD or MUSB_UDC based on if CONFIG_AM335X_USB0 or
> CONFIG_AM335X_USB1 is set (and have boards.cfg set CONFIG_AM335X_USB0
> for 'am335x_evm).
> 
> Then you can test device mode on the evm :)  And how did you test device
> mode on the beaglebone?  I couldn't since I don't have the rest set of
> adapters here.
> 
> Also:
> 
> > +++ b/drivers/usb/musb/am335x.h
> [snip]
> > +/* Control Module Registers */
> > +#define CM_REGISTERS			CTRL_BASE
> > +#define USB_CTRL0_REG_OFFSET	(0x628)
> > +#define USB_CTRL1_REG_OFFSET	(0x680)
> 
> Please get all indentation out to a consistent level
> 
> > +#define PRCM_IDLEST                             0x30000
> > +#define DPLL_CLKDCOLDO_GATE_CTRL                0x300
> 
> And always use tabs :)
> 
Hi Tom,
Thanks for the review.
I will send the patches doing 
all the modifications you have mentioned.
Also there was some confusion regarding testing in the device mode.
A new node /dev/ttyUSB0 was seen when beagle bone was connected to 
a linux machine, but it is not using USB as serial using usbtty.
It was using the USB to serial chip in the beagle bone. Sorry for that.
So I am still to confirm whether the device mode works with usbtty.
But previously I have tested the device mode on both evm 
and beagle bone using some local DFU patches and it worked fine.
Thanks,
Harman
 


More information about the U-Boot mailing list