From: Mehmet Fide <[email protected]>

"usb start" on a Colibri VF50 or VF61 kills U-Boot with a data abort,
and even with that fixed the host port stays unpowered. This series
brings the two threads sent in August together on top of next, where
the regulator GPIO change they waited for has landed:

- patch 1 fixes the data abort: the controller index came from a
  sequence number that the usbphy aliases push past the driver's tables
- patches 2 to 5 drop the dead non-DM path and the empty bind hook,
  add ofnode_get_alias_seq() and take the PHY, usbmisc and anatop bases
  from the device tree instead of the tables
- patch 6 enables the vbus-supply of the port

Patches 2 to 5 are the follow-up Marek asked for in his review of
patch 1: the PHY and usbmisc tables are gone, and the port index that
is left, for board_ehci_hcd_init() and the anatop registers, comes
from the alias of the PHY node.

v4:
- rebased on next; the dm core change that moved of_to_plat() after
  pinctrl is gone, the regulator GPIO is now claimed at probe time
  upstream ("gpio: add a way to parse a GPIO now and request it later"
  and its users), which is what the vbus patch needed
- the data abort fix joins the series as patch 1, the register base
  patch depends on it
- the checkpatch warnings in patch 4 are in the body it moves, which is
  unchanged; its one check is the DM_TEST layout every test in
  test/dm/ofnode.c uses
- patch 6 enables VBUS in the reset hook only, as ehci-mx6 does; v3
  enabled it there and in the shared init, so the regulator counted two
  enables per probe and "usb stop" never switched VBUS off
- patch 4 gains a test and no longer documents -ENOENT for a missing
  alias, the live tree returns -ENODEV
- patch 5 drops two comments that repeated its commit message
- reworded the commit messages of patches 1, 5 and 6

v2 of the register base series:
https://lore.kernel.org/u-boot/[email protected]/
v3 of the vbus series:
https://lore.kernel.org/u-boot/[email protected]/
the data abort fix:
https://lore.kernel.org/u-boot/[email protected]/

Tested on a Colibri VF50 V1.2A on the Iris carrier, colibri_vf_defconfig
on next (ed869863c7e): "usb start" finds a USB stick behind the host
port at usb@400b4000 and reads the same data before and after
"usb reset", VBUS goes on at "usb start" and off at "usb stop", also
after repeated resets, and Linux takes the port over when U-Boot boots
it without "usb stop". An earlier build also brought up the host port
on a Colibri VF61 V1.2B. The five ARCH_VF610 boards build at every
patch, and "ut dm" on sandbox gives the same result as on next, plus
the new test on the live and the flat tree.

Mehmet Fide (6):
  usb: ehci-vf: take the controller index from the device tree
  usb: ehci-vf: remove the code path for a build without DM_USB
  usb: ehci-vf: drop the empty bind hook
  dm: core: add ofnode_get_alias_seq()
  usb: ehci-vf: take the register bases from the device tree
  usb: ehci-vf: enable the vbus supply of the port

 drivers/core/ofnode.c      |  20 ++++
 drivers/core/read.c        |  20 +---
 drivers/usb/host/ehci-vf.c | 187 +++++++++++++++++--------------------
 include/dm/ofnode.h        |  13 +++
 include/dm/read.h          |   8 +-
 test/dm/ofnode.c           |  20 ++++
 6 files changed, 144 insertions(+), 124 deletions(-)

-- 
2.55.0

Reply via email to