- Notifications
You must be signed in to change notification settings - Fork 8.2k
Zephyr usbc subsystem #45601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zephyr usbc subsystem #45601
Conversation
0fa9d7a to 0ebb83f Compare d9db717 to 54cd82f Compare
jfischer-no left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to update includes, e.g. #include <kernel.h> -> #include <zephyr/kernel.h>
Please consider to place USBC subsystem in the subsys/usb/usbc, subsys/usb is no longer completely occupied by current device stack, which was moved to subsys/usb/device. What will be added else soon is subsys/usb/device_next and subsys/usb/host (see #42066)
Add pin control properties to the STM32 UCPD bindings file so that the pins can be configured in the device tree. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Assign the pins for the STM32G071b and STM32G081b STM32 UCPD peripherals so the UCPD driver can properly configure the device. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Use DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) to determine number of potential interrupt sources. This mitigates the wasting of memory on devices with mutliple UCPD ports but only one UCPD port is used. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
USB-C VBUS can be measured and controlled by different devices. For example, a TypeC Port Controller (TCPC) or an ADC and GPIO can be used. This driver is used to abstracts the underlying hardware used for USB VBUS measurement and control. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This commit adds a VBUS driver the uses an ADC connected to a voltage divider to measure VBUS. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Remove USB-C VBUS2 Discharge configuration node from device tree. USBC VBUS discharge is controlled by the vbus driver. See dts/bindings/usb-c/vbus-adc.yaml Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Update TCPC driver to use DT_HAS_<compat>_ENABLED Kconfig symbol to expose the driver and enable it by default based on devicetree. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
A USB-C VBUS driver will be used to measure VBUS instead of accessing the measurement hardware directly. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
These macros are needed to implement a USB-C Sink device Signed-off-by: Sam Hurst <sbh1187@gmail.com>
A USB TypeC connector has many peripherals associated with it and the DTS binding in this commit provides a way to group peripherals and properties in a device tree. This binding is used with the USB-C Subsytem. This is based on Linux, documentation: https://www.kernel.org/doc/Documentation/devicetree/bindings/connector/usb-connector.yaml Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This USB-C Subsystem enables an application to include USB-C Power Delivery Sink functionality. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Implementing USB-C Sink functionality can be difficult. This sample application serves as an example of how to create an application with Power Delivery Sink functionality. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Documents the USB-C Subsystem API. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This commit adds the USB-C driver API documentation in peripherals section of the reference guide. The USB-C VBUS API is declared experimental. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Add a new entry specifically for USB-C. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
This CL removes the board specific USB-C Sink sample in favor of the generic USB-C Sink sample. Signed-off-by: Sam Hurst <sbh1187@gmail.com>
Add myself as codeowner for the USB-C subsystem and sample Signed-off-by: Sam Hurst <sbh1187@gmail.com>
0c31d3f to e71c431 Compare
These pull requests are part of a larger effort to port the Google ChromeOS USB-C Stack to Zephyr. See issue #38371.
Currently the State Machine Framework #38088 and Type-C Port Controller Driver #41856 has merged.
This PR implements the USBC-C Subsystem from which Type-C / Power delivery application can be created. Once this PR merges, Power Delivery Sink only applications can be created.