mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] usb: typec: add STUSB4500 USB-C PD sink support
@ 2026-11-14 16:19 Giandomenico Rossi
  2026-11-14 16:19 ` [PATCH 1/4] usb: typec: add typec_port_from_device() Giandomenico Rossi
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Giandomenico Rossi @ 2026-11-14 16:19 UTC (permalink / raw)
  To: barebox; +Cc: Giandomenico Rossi

Hello,
this series adds support for the STMicroelectronics STUSB4500
autonomous USB-C Power Delivery sink controller.

The STUSB4500 negotiates a PD contract in hardware from a set of
sink PDOs configured via the Device Tree, without host firmware
involvement after probe. The series adds:

 - a small addition to the typec core (typec_port_from_device())
   needed to look up a registered port from its struct device
 - the driver itself: configuring sink PDOs from the "connector"
   sub-node and exposing voltage/current as read-only parameters
 - the Device Tree binding for the controller
 - an optional shell command ('stusb4500') for bring-up: dumping
   sink/source PDOs, editing sink PDOs, forcing renegotiation and
   reading back the negotiated contract

Tested on an STM32MP151A-based board against multiple USB-C PD
chargers: an XP Power PGD100PS20C2-8, a Lenovo ADLX65YLC3D (65W)
and an EDACPOWER EUM110A2A, verifying contract negotiation,
PDO updates and renegotiation.

This series has been reviewed internally by Nicola Fontana.


Giandomenico Rossi (4):
  usb: typec: add typec_port_from_device()
  usb: typec: stusb4500: add USB PD fixed supply driver
  dt-bindings: usb: add STUSB4500 USB PD sink controller binding
  commands: stusb4500: add USB-C PD control command

 .../bindings/misc/st,stusb4500.yaml           |  102 ++
 commands/Kconfig                              |   23 +
 commands/Makefile                             |    1 +
 commands/stusb4500.c                          |  274 +++++
 drivers/usb/typec/Kconfig                     |   11 +
 drivers/usb/typec/Makefile                    |    1 +
 drivers/usb/typec/class.c                     |   21 +
 drivers/usb/typec/stusb4500.c                 | 1040 +++++++++++++++++
 include/linux/usb/typec.h                     |    2 +
 include/usb/stusb4500.h                       |   59 +
 10 files changed, 1534 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/st,stusb4500.yaml
 create mode 100644 commands/stusb4500.c
 create mode 100644 drivers/usb/typec/stusb4500.c
 create mode 100644 include/usb/stusb4500.h

-- 
2.34.1




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

end of thread, other threads:[~2026-11-17 13:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 16:19 [PATCH 0/4] usb: typec: add STUSB4500 USB-C PD sink support Giandomenico Rossi
2026-11-14 16:19 ` [PATCH 1/4] usb: typec: add typec_port_from_device() Giandomenico Rossi
2026-11-14 16:19 ` [PATCH 2/4] usb: typec: stusb4500: add USB PD fixed supply driver Giandomenico Rossi
2026-11-17 11:27   ` Sascha Hauer
2026-11-14 16:19 ` [PATCH 3/4] dt-bindings: usb: add STUSB4500 USB PD sink controller binding Giandomenico Rossi
2026-11-14 16:19 ` [PATCH 4/4] commands: stusb4500: add USB-C PD control command Giandomenico Rossi
2026-11-17 11:46   ` Sascha Hauer
2026-11-17 13:12     ` Giandomenico Rossi

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