Skip to content

Commit

Permalink
driver for STUSB4500
Browse files Browse the repository at this point in the history
right now it is only possible to change the delivered power on the fly
by
1. selecting PDO2 slot
2. write to POO2
3. renegotiate power delivery by sw reset command
  • Loading branch information
SimonFilgis authored and acassis committed Nov 30, 2024
1 parent 5fbf377 commit 6135892
Show file tree
Hide file tree
Showing 4 changed files with 794 additions and 0 deletions.
29 changes: 29 additions & 0 deletions drivers/usbmisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,33 @@ config FUSB303_NPOLLWAITERS

endif

config STUSB4500
bool "ST standalone USB PD sink controller"
default n
select I2C
---help---
Enable device driver for ST standalone USB PD (power delivery) sink
controller that addresses sink up to 100 W (20 V; 5 A).

if STUSB4500

config STUSB4500_I2C_FREQUENCY
int "STUSB4500 I2C frequency"
default 400000
range 1 400000

config DEBUG_STUSB4500
bool "Enable debug support for the STUSB4500"
default n
---help---
Enables debug support for the STUSB4500

config STUSB4500_NPOLLWAITERS
int "Number of waiters to poll"
default 2
---help---
Maximum number of threads that can be waiting on poll()

endif

endif # USBMISC
4 changes: 4 additions & 0 deletions drivers/usbmisc/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ ifeq ($(CONFIG_FUSB303),y)
CSRCS += fusb303.c
endif

ifeq ($(CONFIG_STUSB4500),y)
CSRCS += stusb4500.c
endif

# Include USB miscellaneous build support

DEPPATH += --dep-path usbmisc
Expand Down
Loading

0 comments on commit 6135892

Please sign in to comment.