From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Fri, 7 Nov 2014 19:08:03 +0800 Subject: [U-Boot] [PATCH v3 3/3] imx:mx6slevk add board level support for usb In-Reply-To: <201411070926.09581.marex@denx.de> References: <1415322494-20415-1-git-send-email-Peng.Fan@freescale.com> <1415322494-20415-4-git-send-email-Peng.Fan@freescale.com> <201411070926.09581.marex@denx.de> Message-ID: <545CA813.3030007@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de ? 11/7/2014 4:26 PM, Marek Vasut ??: > On Friday, November 07, 2014 at 02:08:14 AM, Peng Fan wrote: >> Add pinmux settings, implement board_ehci_hcd_init, board_usb_phy_mode >> >> There are two usb port on mx6slevk board: >> 1. otg port >> 2. host port >> The following are the connection between usb controller and board usb >> interface, host port has not ID pin set: >> otg1 core <---> board otg port >> otg2 core <---> board host port >> In order to make host port work, board_usb_phy_mode return 0 to let >> ehci-mx6.c driver decide otg2 core to works in host mode. >> >> Signed-off-by: Peng Fan >> Signed-off-by: Ye Li >> --- > > [...] > >> @@ -150,6 +151,63 @@ static int setup_fec(void) >> } >> #endif >> >> +#ifdef CONFIG_USB_EHCI_MX6 >> +#define USB_OTHERREGS_OFFSET 0x800 >> +#define USBPHY_CTRL 0x30 >> +#define UCTRL_PWR_POL (1 << 9) >> +#define USBPHY_CTRL_OTG_ID 0x08000000 > > This looks like an duplication. Aren't those bits defined somewhere in > generic code already ? If this way 'int board_usb_phy_mode(int port, enum usb_init_type *type)' can be accpeted, these bits are not needed and I'll move these bits in the seperate PHY register struct access patch. Anyway, after the board level usb support patch. > [...] > Best regards, > Marek Vasut > Regards, Peng.