summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mx6.c
Commit message (Collapse)AuthorAgeFilesLines
* ehci: mx7: fix otg id detectionPeng Fan2016-06-251-2/+5
| | | | | | | | | | The USBNC_PHYCFG2_ACAENB bit should be cleared to enable the OTG ID detection, not set it. When the bit is set, the ACA Resistance Detection is enabled, which disables the OTG ID detection, because the internal pull up is off. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* ehci: mx7: fix usbnc_regsPeng Fan2016-06-251-1/+2
| | | | | | | | There is a 4 bytes hole between phy_cfg2 and phy_status, fix the usbnc_regs structure to include the hole. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* usb: ehci-mx6: allow board_ehci_hcd_init to failStefan Agner2016-05-061-2/+5
| | | | | | | | | | | There could be runtime determined board specific reason why a EHCI initialization fails (e.g. ENODEV if a Port is not available). In this case, properly return the error code. While at it, that function (board_ehci_hcd_init) has actually two documentation blocks... Use the correct function name for the documentation block of board_usb_phy_mode. Signed-off-by: Stefan Agner <stefan@agner.ch>
* usb: Rename ehci-fsl.h to ehci-ci.hMateusz Kulikowski2016-04-011-1/+1
| | | | | | | | | | | | | Most of ehci-fsl header describe USB controller designed by Chipidea and used by various SoC vendors. This patch renames it to a generic header: ehci-ci.h Contents of file are not changed (so it contains several references to freescale SoCs). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Simon Glass <sjg@chromium.org>
* usb: ehci-mx6: Use shared wait_for_bitMateusz Kulikowski2016-01-251-28/+4
| | | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* imx: usb: ehci-mx6: wait_for_bit to check reg statusAdrian Alonso2015-08-191-4/+33
| | | | | | | Add wait_for_bit to check reg bit status and replace unbounded loops to check usb command status Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* imx: usb: ehci-mx6: add usb support for imx7d socAdrian Alonso2015-08-191-19/+81
| | | | | | Extend ehci-mx6 usb driver to support imx7d usb Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* imx: usb: ehci-mx6: document board specific functionsAdrian Alonso2015-08-191-0/+31
| | | | | | | | | | Document target board specific functions board_ehci_hcd_init - override usb phy mode board_ehci_hcd_init - set usb vbus voltage board_ehci_power - enables/disables usb vbus voltage Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* imx: usb: ehci-mx6: reg accessor cleanupsAdrian Alonso2015-08-191-33/+18
| | | | | | Cleanup read/write register access, use clr/set bits_le32 Signed-off-by: Adrian Alonso <aalonso@freescale.com>
* usb:ehci-mx6 add phy mode query functionPeng Fan2014-11-141-2/+25
| | | | | | | | | | | | | | | | usb_phy_enable should return status bit, but not phy mode bit, thus add a new function usb_phy_mode to query the PHY for it's mode and make usb_phy_enable just return 0 but not 'phy_ctrl & USBPHY_CTRL_OTG_ID'. Include a new board weak function board_usb_phy_mode. If board code does not reimplement this function, it just call usb_phy_mode and return usb_phy_mode's return value. The reason to include such a weak function is: " SOC OTG core <--connect--> board HOST port, but no pin id for the board host port, so board can not use usb_phy_mode to return the phy mode, but define it's own rule." Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Ye Li <B37916@freescale.com>
* usb: ehci-mx6: Rename the USB register base addressYe.Li2014-09-291-2/+2
| | | | | | | | | | | | The mx6sl/mx6sx has 2 OTG and 1 host. So they have name "USBO2H_USB_BASE_ADDR" in imx-regs.h. The driver hard codes the USB base address name to "USBOH3", which causes the driver failed to build for mx6sl/mx6sx. This patch uniform the address name to "USB_BASE_ADDR" for all mx6 series. Signed-off-by: Ye.Li <B37916@freescale.com>
* usb: ehci-mx6: add support for otg portTroy Kisky2013-10-201-40/+91
| | | | | | | | | | | | | | | | | | Previously, only host1 was supported using an index of 0. Now, otg has index 0, host1 is 1, host2 is 2, host3 is 3. Since OTG requires usbmode to be set after reset, I added CONFIG_EHCI_HCD_INIT_AFTER_RESET to nitrogen6x.h and mx6qsabreauto.h. I also added a weak function board_ehci_power to handle turning power on/off for otg. Type is type of device connected (USB stick vs Host.) Init is type of device desired. Only power up port if type == init == USB_INIT_HOST. Only return error if type != init. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* usb: ehci-hcd: add enum usb_init_type parameter to ehci_hcd_init.Troy Kisky2013-10-201-1/+2
| | | | | | | This paramter will later be used to initialize OTG ports in host or device mode. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-9/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* USB: drop unneeded header in ehci-mx6Stefano Babic2013-03-071-1/+0
| | | | | | | | | | | Including header for pads is not needed and breaks board after renaming pin definitions. Series-to: u-boot Series-cc: marex@denx.de,fabio.estevam@freescale.com,eric.nelson@boundarydevices.com Signed-off-by: Stefano Babic <sbabic@denx.de>
* ehci-mx5/6: Make board_ehci_hcd_init() optionalBenoît Thébaudeau2012-11-161-0/+5
| | | | | | | | | | | | A custom board_ehci_hcd_init() may be unneeded, so add a weak default implementation doing nothing. By the way, use simple __weak from linux/compiler.h for board_ehci_hcd_postinit() instead of weak alias with full attribute. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
* usb: ehci: rework to take advantage of new lowlevel interfaceLucas Stach2012-10-151-6/+5
| | | | | | | | | | | | | | Kill off ehci-core.h It was used to specify some static controller data. To support more than one controller being active at any time we have to carry the controller data ourselfes. Change the ehci interface accordingly. NOTE: OMAP implemented the ehci stuff a bit backwards and should be fixed to do the same thing as other platforms. But the change for now is at least compile clean. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* i.mx: iomux-v3.h: move to imx-common include directoryTroy Kisky2012-07-311-1/+1
| | | | Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* USB: ehci-mx6: Fix broken IO accessWolfgang Grandegger2012-05-151-2/+3
| | | | | | | | | | To get USB working again on the i.MX6, this patch fixes a bug introduced with commit 522b2a0 "Add proper IO accessors for mx6 usb registers.". At that occasion, I also added the missing __iomem directive. Cc: Marek Vasut <marex@denx.de> CC: Fabio Estevam <festevam@gmail.com> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
* USB: ehci-mx6: Add proper IO accessorsFabio Estevam2012-03-271-9/+4
| | | | | | | | | Add proper IO accessors for mx6 usb registers. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Jason Liu <r64343@freescale.com>
* usb/ehci: Add USB support for the MX6QWolfgang Grandegger2012-03-261-0/+205
Currently, only USB Host 1 is supported. Cc: Remy Bohmer <linux@bohmer.net> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
OpenPOWER on IntegriCloud