Skip to content

Commit

Permalink
draft 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 by sw reset command
  • Loading branch information
SimonFilgis committed Nov 21, 2024
1 parent 6cd4377 commit e035f45
Show file tree
Hide file tree
Showing 4 changed files with 786 additions and 0 deletions.
28 changes: 28 additions & 0 deletions drivers/usbmisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,32 @@ 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 sink controller

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 e035f45

Please sign in to comment.