Bug 299345 - sys/arm/allwinner/aw_usbphy.c: lookup VBUS regulators when PHY is enabled
Summary: sys/arm/allwinner/aw_usbphy.c: lookup VBUS regulators when PHY is enabled
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: Unspecified
Hardware: arm64 Any
: --- Affects Many People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-10-12 21:05 UTC by Guillaume Ballet
Modified: 2026-10-12 21:05 UTC (History)
0 users

See Also:


Attachments
aw_usbphy.patch (1.25 KB, patch)
2026-10-12 21:05 UTC, Guillaume Ballet
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Ballet 2026-10-12 21:05:23 UTC
Created attachment 275637 [details]
aw_usbphy.patch

This is part of my work on adding support for the PineTab. This is necessary to power the USB keyboard.

`awusbphy_init` resolves the `usb%d_vbus-supply` regulators at attach
time. The PHY attaches in `BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE`,
the same pass as `rsb`/`iicbus`. When a VBUS supply is provided by the
PMIC behind that bus, the lookup runs before the regulator exists,
fails silently, and `awusbphy_phy_enable` later skips it as "optional" - as a result, the host never gets power.

The fix is to retry the lookup in `awusbphy_phy_enable`, which is invoked in the default pass.