* [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name
@ 2026-11-15 20:20 Venkat Yadlapati via B4 Relay
2026-11-15 20:30 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-15 20:20 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Felipe Balbi
Cc: linux-usb, devicetree, linux-kernel, Venkat Yadlapati
From: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
The dwc3 driver reads usb-psy-name since commit 6f0764b5adea ("usb: dwc3:
add a power supply for current control") to tell a power supply the
current the USB host grants, but the property was never documented.
An LLM was used to help write this commit message.
Signed-off-by: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
---
The dwc3 driver has read usb-psy-name for a long time, but the property
was never documented. The Motorola Signature uses it to tell the
qcom_battmgr USB power supply the current the host grants.
Checked with dt_binding_check and with dtbs_check on the Motorola
Signature devicetree, which sets the property.
I used an LLM (Claude) to help write this patch and its commit message.
I reviewed it.
---
Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
index 6c0b8b653824..5d46db402f93 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
@@ -42,6 +42,13 @@ properties:
minItems: 1
maxItems: 19
+ usb-psy-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Name of the power supply that is told the current the USB host
+ grants to the device (e.g. after enumeration), so the charger can
+ draw it.
+
phy-names:
minItems: 1
maxItems: 19
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261116-vantage-dwc3-eccc2f123d3c
Best regards,
--
Venkat Yadlapati <venkat.yadlapati@yahoo.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name
2026-11-15 20:20 [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name Venkat Yadlapati via B4 Relay
@ 2026-11-15 20:30 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-15 20:30 UTC (permalink / raw)
To: Venkat Yadlapati; +Cc: linux-usb, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: usb: snps,dwc3-common: usb-psy-name exposes
Linux psy name
--
commit 4bb8a88bbaa8fbc9c3b1e6963f4478fd21569377
Author: Venkat Yadlapati <venkat.yadlapati@yahoo.com>
dt-bindings: usb: snps,dwc3-common: Document usb-psy-name
This commit documents the usb-psy-name string property in the common
Synopsys DWC3 Devicetree binding schema.
> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> index 6c0b8b6538246..5d46db402f935 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
> @@ -42,6 +42,13 @@ properties:
> minItems: 1
> maxItems: 19
>
> + usb-psy-name:
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Name of the power supply that is told the current the USB host
> + grants to the device (e.g. after enumeration), so the charger can
> + draw it.
> +
> phy-names:
> minItems: 1
> maxItems: 19
[Severity: Medium]
Should usb-psy-name be part of the Devicetree binding ABI rather than a
phandle reference?
In drivers/usb/dwc3/core.c, dwc3_get_usb_power_supply() passes
usb-psy-name to power_supply_get_by_name(), which matches against the
Linux-internal power_supply_desc.name string (such as "qcom-battmgr-usb").
Devicetree bindings describe hardware relationships between devices using
phandles (for example, power-supplies or a usb-connector graph link)
rather than Linux driver registration names, which are normally only used
by legacy board files or software_node glue.
In addition, the qcom_battmgr use case mentioned in the patch notes will
not work at runtime: dwc3_vbus_draw_work() calls
power_supply_set_property() with POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
but neither sm8350_usb_psy_desc nor sc8280xp_usb_psy_desc in
drivers/power/supply/qcom_battmgr.c defines a .set_property callback, so
power_supply_set_property() always returns -ENODEV.
Also, this places usb-psy-name in the middle of the paired phys and
phy-names properties.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-vantage-dwc3-v1-1-6abb5a3277f0@yahoo.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-15 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 20:20 [PATCH] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name Venkat Yadlapati via B4 Relay
2026-11-15 20:30 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox