[PATCH v2 0/5] Modernize the Faraday FOTG210 driver

Linus Walleij posted 5 patches 3 weeks, 3 days ago
There is a newer version of this series
drivers/usb/fotg210/Kconfig        |    2 +
drivers/usb/fotg210/fotg210-core.c |  274 +-
drivers/usb/fotg210/fotg210-hcd.c  | 5672 +-----------------------------------
drivers/usb/fotg210/fotg210-hcd.h  |  689 -----
drivers/usb/fotg210/fotg210-udc.c  |   97 +-
drivers/usb/fotg210/fotg210-udc.h  |    2 +-
drivers/usb/fotg210/fotg210.h      |   26 +-
drivers/usb/host/ehci-dbg.c        |    3 +-
drivers/usb/host/ehci-hcd.c        |   31 +-
drivers/usb/host/ehci-hub.c        |  100 +-
drivers/usb/host/ehci-timer.c      |    3 +-
drivers/usb/host/ehci.h            |   47 +-
12 files changed, 516 insertions(+), 6430 deletions(-)
[PATCH v2 0/5] Modernize the Faraday FOTG210 driver
Posted by Linus Walleij 3 weeks, 3 days ago
Replace the private FOTG210 EHCI fork with the common EHCI core and
quirks for its shifted or missing registers, integrated transaction
translator, speed reporting, and reset sequence.

This is a late reaction to a comment from Daniel Palmer in 2023:
https://lore.kernel.org/linux-usb/CAFr9PXmVXqAX73VUzAt_M2yPN93in9Y_LHyYcEA1Dfj_m_4ZHA@mail.gmail.com/

The fork was originally made from the v3.7 EHCI core driver. Arguably
this was a bad idea since it copied over 5000 lines of code. Correct the
mistake by using the maintained common implementation.

Also clean up fixed-role initialization, power and resource handling,
UDC lifecycle, and system sleep handling. The binding and Gemini board
updates are split into a separate series.

Tested on the D-Link DIR-685.

Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Changes in v2:
- Split the first v1 EHCI core patch into three patches covering port
  status registers, port reset and speed hooks, and other quirks.
- Call reset_control_reset() without a redundant optional-reset NULL
  check.
- Link to v1: https://patch.msgid.link/20260831-gemini-usb-fotg2-v1-0-8a8ee12c4b32@kernel.org

---
Linus Walleij (5):
      usb: ehci: support non-standard port status registers
      usb: ehci: add port reset and speed hooks
      usb: ehci: support additional controller quirks
      usb: fotg210: use the common EHCI core
      usb: fotg210-udc: fix endpoint and resource handling

 drivers/usb/fotg210/Kconfig        |    2 +
 drivers/usb/fotg210/fotg210-core.c |  274 +-
 drivers/usb/fotg210/fotg210-hcd.c  | 5672 +-----------------------------------
 drivers/usb/fotg210/fotg210-hcd.h  |  689 -----
 drivers/usb/fotg210/fotg210-udc.c  |   97 +-
 drivers/usb/fotg210/fotg210-udc.h  |    2 +-
 drivers/usb/fotg210/fotg210.h      |   26 +-
 drivers/usb/host/ehci-dbg.c        |    3 +-
 drivers/usb/host/ehci-hcd.c        |   31 +-
 drivers/usb/host/ehci-hub.c        |  100 +-
 drivers/usb/host/ehci-timer.c      |    3 +-
 drivers/usb/host/ehci.h            |   47 +-
 12 files changed, 516 insertions(+), 6430 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260203-gemini-usb-fotg2-3873e0d9288a

Best regards,
--  
Linus Walleij <linusw@kernel.org>
Re: [PATCH v2 0/5] Modernize the Faraday FOTG210 driver
Posted by Daniel Palmer 3 weeks, 1 day ago
Hi Linus,

On Wed, 2 Sept 2026 at 15:11, Linus Walleij <linusw@kernel.org> wrote:
>
> Replace the private FOTG210 EHCI fork with the common EHCI core and
> quirks for its shifted or missing registers, integrated transaction
> translator, speed reporting, and reset sequence.

Thanks for doing this! I didn't have the time to do this all in one go
so I sent an RFC patch for allowing overrides in the ehci driver as a
prerequisite a few weeks ago.
I will rebase my version of this on top of this series and test on my
hardware when I get some time.

Cheers,

Daniel
Re: [PATCH v2 0/5] Modernize the Faraday FOTG210 driver
Posted by Linus Walleij 3 weeks, 1 day ago
Hi Daniel,

On Thu, Sep 3, 2026 at 1:06 PM Daniel Palmer <daniel@thingy.jp> wrote:

> Thanks for doing this! I didn't have the time to do this all in one go
> so I sent an RFC patch for allowing overrides in the ehci driver as a
> prerequisite a few weeks ago.
> I will rebase my version of this on top of this series and test on my
> hardware when I get some time.

I should have worked on this sooner, the FOTG210 was in
sad shape and you told me exactly what needed to get done.

I have made some modifications in accordance with Alan's
feedback, I will send it out as v3 so you can check.

Yours,
Linus Walleij