U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] vf610: make the USB host port usable
@ 2026-08-20  7:15 Mehmet Fide
  2026-08-20  7:15 ` [PATCH v2 1/2] dm: core: read the device tree into plat data after pinctrl Mehmet Fide
  2026-08-20  7:15 ` [PATCH v2 2/2] usb: ehci-vf: enable the vbus supply of the port Mehmet Fide
  0 siblings, 2 replies; 4+ messages in thread
From: Mehmet Fide @ 2026-08-20  7:15 UTC (permalink / raw)
  To: Simon Glass, Marek Vasut; +Cc: Tom Rini, u-boot, Mehmet Fide

From: Mehmet Fide <mehmet.fide@screeningeagle.com>

A device plugged into the host port of a Colibri VF50 or VF61 carrier is
never found, for two reasons.

The pin that switches VBUS never becomes an output: device_probe() reads
the device tree into plat data before it applies the pinctrl state, so
the fixed regulator asks for its GPIO first and the pinctrl state of the
same device then rewrites the pad. Harmless on most SoCs, where the
direction lives in the GPIO block, but on Vybrid the output buffer
enable is a bit of that pad. Patch 1 moves the call back below the
pinctrl step, where it was until 2019. Unchanged since v1.

Patch 2 makes the driver enable the vbus-supply of its port. In v1 it
guarded the regulator calls with CONFIG_IS_ENABLED(DM_REGULATOR) and a
NULL check; as Marek pointed out both are unnecessary, the calls return
-ENOSYS themselves, so it now looks like the adc-uclass example he gave.

Patch 2 applies on top of

  https://lore.kernel.org/u-boot/20260820071511.1036506-1-mehmet.fide@gmail.com/

Testing. test/py on sandbox, before and after patch 1: 11 failed, 414
passed, 210 skipped, 1 xfailed, 20 errors, the same failures both times.

On a Colibri VF50 V1.2A on an Iris carrier, U-Boot 2026.07 from NAND:
"usb start" finds a USB stick, its partition table and blocks read back,
the pad of the VBUS pin reads 0x22ef instead of 0x22ed, and Linux still
boots with Ethernet, SD card and USB working.

v1: https://lore.kernel.org/u-boot/20260819143543.427396-1-mehmet.fide@gmail.com/

Mehmet Fide (2):
  dm: core: read the device tree into plat data after pinctrl
  usb: ehci-vf: enable the vbus supply of the port

 drivers/core/device.c      |  8 ++++----
 drivers/usb/host/ehci-vf.c | 25 ++++++++++++++++++++++++-
 2 files changed, 28 insertions(+), 5 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-20  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20  7:15 [PATCH v2 0/2] vf610: make the USB host port usable Mehmet Fide
2026-08-20  7:15 ` [PATCH v2 1/2] dm: core: read the device tree into plat data after pinctrl Mehmet Fide
2026-08-20  7:15 ` [PATCH v2 2/2] usb: ehci-vf: enable the vbus supply of the port Mehmet Fide
2026-08-20  8:22   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox