Linux USB
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name
@ 2026-11-22 19:20 Venkat Yadlapati via B4 Relay
  2026-11-22 19:31 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Venkat Yadlapati via B4 Relay @ 2026-11-22 19:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Felipe Balbi
  Cc: linux-usb, devicetree, linux-kernel, phone-devel,
	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.

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.
---
Changes in v2:
- Drop the Assisted-by trailers and the LLM notes from the commit
  messages, the LLM use is stated in this cover letter.
- Move usb-psy-name after phy-names, it split the phys/phy-names pair
  (Sashiko).
- Sashiko also asked whether a power supply name belongs in the binding
  rather than a phandle. The property is not new: dwc3 has read it since
  commit 6f0764b5adea ("usb: dwc3: add a power supply for current
  control") and this only documents it. A phandle based description
  would need a new dwc3 interface; I am happy to do that instead if it
  is preferred. Its other point, that qcom_battmgr cannot take the
  limit, no longer holds since commit be5e7367bceb ("power: supply:
  qcom_battmgr: Allow setting the USB input current limit").
- Link to v1: https://patch.msgid.link/20261116-vantage-dwc3-v1-1-6abb5a3277f0@yahoo.com
---
 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..41e8537b34d5 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
@@ -51,6 +51,13 @@ properties:
       - items:
           pattern: "^usb(2-([0-9]|1[0-4])|3-[0-3])$"
 
+  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.
+
   snps,usb2-lpm-disable:
     description: Indicate if we don't want to enable USB2 HW LPM for host
       mode.

---
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

end of thread, other threads:[~2026-11-22 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 19:20 [PATCH v2] dt-bindings: usb: snps,dwc3-common: Document usb-psy-name Venkat Yadlapati via B4 Relay
2026-11-22 19:31 ` sashiko-bot

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