Driver placement for a new STUSB4500 USB-C PD sink controller

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Aug 25 03:08:45 PDT 2026


Hello Giandomenico,

On 8/25/26 11:38 AM, Giandomenico Rossi wrote:
> Hi,
> 
> I'm writing a Barebox driver for the STMicroelectronics STUSB4500, an
> autonomous USB Type-C Power Delivery sink controller (I2C). 
> It can trigger a renegotiation, and reports the resulting contract.
> Target platform is an STM32MP151-based board.

Cool. What information should this driver make available?

> I'd like to agree on where the files should live, so I don't have to
> reshuffle everything later.
> 
> Driver source: at the moment I have the driver under drivers/usb/misc/,
> but since it's a USB Type-C PD sink controller it might fit better
> under drivers/usb/typec/ (which Barebox doesn't have yet, so it would
> mean creating it). Would you prefer that, or somewhere else?

We have had a drivers/usb/typec directory since v2023.07.0.
If you missed it you may also want to check the basic USB Type-C
framework that was added there and see how well it fits your driver.

> DT binding: I've written the binding as a YAML schema
> (st,stusb4500.yaml), matching the Linux dt-schema format and reusing
> the common usb-connector.yaml for the connector sub-node. 
> Where should it go in the Barebox tree?

I am unsure why you need a custom schema if there's already one
upstream? Anyways, barebox-specific schemas are collected in
Documentation/devicetree/bindings/. Upstream bindings are imported to
dts/Bindings/

Cheers,
Ahmad

> 
> Regards,
> Giandomenico Rossi
> Amel s.r.l.
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list