Skip to content

usb: add Faraday EHCI & Gadget support

Kuo-Jung Su u-boot 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest5 patches 0 repliesNew
  2. v84 patches 0 repliesSuperseded
  3. v74 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v64 patches0 repliesSuperseded
v54 patches0 repliesSuperseded
v42 patches0 repliesSuperseded

Changes in v9 from the cover letter

- ehci-hcd: prevent bad PORTSC register access in ehci_submit_root()
- ehci-hcd: drop the quick fix to 'port=-1' from ehci_get_portsc_register().
- ehci-faraday: drop the quick fix to 'port=-1'

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5usb: ehci: prevent bad PORTSC register accessdrivers/usb/host/ehci-hcd.c+15 -51 reply
2/5usb: ehci: add weak-aliased function for PORTSCdrivers/usb/host/ehci-hcd.c+13 -40 replies
3/5usb: hub: make minimum power-on delay configurableREADME common/usb_hub.c+9 -20 replies
4/5usb: ehci: add Faraday USB 2.0 EHCI supportcommon/usb_hub.c drivers/usb/host/Makefile drivers/usb/host/ehci-faraday.c +3 more+585 -10 replies
5/5usb: gadget: add Faraday FOTG210 USB gadget supportdrivers/usb/gadget/Makefile drivers/usb/gadget/fotg210.c drivers/usb/gadget/gadget_chips.h+957 -01 reply
5/5usb: gadget: add Faraday FOTG210 USB gadget support+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [U-Boot] [PATCH v9 0/5] usb: add Faraday EHCI & Gadget support

From: Kuo-Jung Su <[email protected]>

This patch adds support to both Faraday FUSBH200 and FOTG210, the differences between Faraday EHCI and standard EHCI are listed bellow:

1. The PORTSC starts at 0x30 instead of 0x44.
2. The CONFIGFLAG(0x40) is not only un-implemented, and also has its address removed.
3. Faraday EHCI is a TDI design, but it doesn't compatible with the general TDI implementation found at both U-Boot and Linux.
4. The ISOC descriptors differs from standard EHCI in several ways. But since U-boot doesn't support ISOC, we don't have to worry about that.

The Faraday FOTG210 is an OTG chip which could operate as either an EHCI Host or a USB Device at a time.

Changes for v9:
- ehci-hcd: prevent bad PORTSC register access in ehci_submit_root()
- ehci-hcd: drop the quick fix to 'port=-1' from ehci_get_portsc_register().
- ehci-faraday: drop the quick fix to 'port=-1'

Changes for v8:
- ehci-faraday: ehci_get_portsc_register():
Bug fixed, only port=0 is accepted.

Changes for v7:
- Rebase to u-boot-bbd0f7e3ba66d288a2f146f1c7797801e04598ae, and also make sure it's compatible to u-boot-usb-dc69e46302a36e60e2417bba8c6ea78761a37ebf.
- Update TDI aliased functions, since there is another similar patch had been committed and acceptted.
- ehci-hcd: ehci_get_portsc_register(): make sure port is always >= 0

Changes for v6:
- usb_hub: Simplify CONFIG_USB_HUB_MIN_POWER_ON_DELAY default value setup.
- ehci-hcd: Simplify weak aliased function declaration
- ehci-hcd: Drop redundant line feed

Changes for v5:
- Split up EHCI changeset
- usb_hub: replace the Faraday EHCI ifdef for the long delay in usb_hub_configure() with the new configuration option:
USB_HUB_MIN_POWER_ON_DELAY, which is used in usb_hub_power_on() to control the minimum usb hub power-on delay.
- ehci-faraday: fix the invalid multi-line comment style.
- gadget-fotg210: coding style cleanup.
- gadget-fotg210: drop postfix '__iomem' from struct fotg210_regs
- gadget-fotg210: use permanent delay for hardware reset
- gadget-fotg210: drop '#ifndef CONFIG_SYS_DCACHE_OFF'
- gadget-fotg210: drop magic numbers

Changes for v4:
- Use only macro constants and named bit/mask
- Use weak-aliased functions for tdi implementation and also portsc registers to avoid poluting ehci.h with ifdefs

Changes for v3:
- Coding Style cleanup.
- Drop bit fields from c struct.
- Drop macros for wirtel()/readl(), call them directly.
- Always insert a blank line between declarations and code.
- Replace all the infinite wait loop with a timeout.
- Add '__iomem' to all the declaration of HW register pointers.

Changes for v2:
- Coding Style cleanup.
- Use readl(), writel(), clrsetbits_le32() to replace REG() macros.
- Use structure based hardware registers to replace the macro constants.
- Replace BIT() with BIT_MASK().
- echi-faraday: Remove debug codes.

Kuo-Jung Su (5):
usb: ehci: prevent bad PORTSC register access
usb: ehci: add weak-aliased function for PORTSC
usb: hub: make minimum power-on delay configurable
usb: ehci: add Faraday USB 2.0 EHCI support
usb: gadget: add Faraday FOTG210 USB gadget support

 README                            |    3 +
 common/usb_hub.c                  |   15 +-
 drivers/usb/gadget/Makefile       |    1 +
 drivers/usb/gadget/fotg210.c      |  948 +++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/gadget_chips.h |    8 +
 drivers/usb/host/Makefile         |    1 +
 drivers/usb/host/ehci-faraday.c   |  148 ++++++
 drivers/usb/host/ehci-hcd.c       |   34 +-
 include/usb/fotg210.h             |  364 ++++++++++++++
 include/usb/fusbh200.h            |   61 +++
 10 files changed, 1575 insertions(+), 8 deletions(-)
 create mode 100644 drivers/usb/gadget/fotg210.c
 create mode 100644 drivers/usb/host/ehci-faraday.c
 create mode 100644 include/usb/fotg210.h
 create mode 100644 include/usb/fusbh200.h

--
1.7.9.5