From: Tom Rini Date: Wed, 27 Jun 2012 10:20:28 -0700 Subject: [U-Boot] [PATCH v3 1/3] AM335x : Add USB support for AM335x in u-boot In-Reply-To: <1340703483-27276-2-git-send-email-harman_sohanpal@ti.com> References: <1340703483-27276-1-git-send-email-harman_sohanpal@ti.com> <1340703483-27276-2-git-send-email-harman_sohanpal@ti.com> Message-ID: <20120627172028.GA28055@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jun 26, 2012 at 03:08:01PM +0530, Harman Sohanpal wrote: > From: Gene Zarkhin > > 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 > Signed-off-by: Harman Sohanpal 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 :) -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: