summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.usbc
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2021-11-05 16:30:29 +1100
committerCommit Bot <commit-bot@chromium.org>2021-11-10 02:35:34 +0000
commit9e02276344957c87ea9747f84aea260958ebf3f9 (patch)
treeaaed866964fea32ca0a4769157b8d55aaa30e3e8 /zephyr/Kconfig.usbc
parent910ceb134826d28e7e810131f01c3cf6ac31e054 (diff)
downloadchrome-ec-9e02276344957c87ea9747f84aea260958ebf3f9.tar.gz
zephyr: support shared PD interrupts
Some boards share an interrupt line between multiple PD ports by running pd_shared_alert_task in a task instead of individual per-port tasks. Add support for that by adding USB-C options for shared interrupts and using those to enable the shared interrupt task for the chosen ports. BUG=b:204860054 TEST=builds BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ice67a6a74b0a2f42982de6e19aa1a478c0a4e068 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3263604 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/Kconfig.usbc')
-rw-r--r--zephyr/Kconfig.usbc39
1 files changed, 39 insertions, 0 deletions
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 67f3fbcc33..343de8b4a7 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -250,6 +250,45 @@ menuconfig PLATFORM_EC_USB_POWER_DELIVERY
if PLATFORM_EC_USB_POWER_DELIVERY
+menuconfig PLATFORM_EC_USB_PD_INT_SHARED
+ bool "USB-C ports share PD interrupts"
+ select HAS_TASK_PD_INT_SHARED
+ help
+ This enables processing of shared interrupts where multiple ports
+ share a single IRQ on the EC. Only one shared IRQ is supported,
+ but any combination of ports can be serviced by that one IRQ.
+
+if PLATFORM_EC_USB_PD_INT_SHARED
+
+config PLATFORM_EC_USB_PD_PORT_0_SHARED
+ bool "Port 0 IRQ is shared"
+ help
+ Enable handling of port 0 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_1_SHARED
+ bool "Port 1 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 1
+ help
+ Enable handling of port 1 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_2_SHARED
+ bool "Port 2 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 2
+ help
+ Enable handling of port 2 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+config PLATFORM_EC_USB_PD_PORT_3_SHARED
+ bool "Port 3 IRQ is shared"
+ depends on PLATFORM_EC_USB_PD_PORT_MAX_COUNT > 3
+ help
+ Enable handling of port 3 PD interrupts signalled by an IRQ that is
+ shared by every other port enabled in this section.
+
+endif # PLATFORM_EC_USB_PD_INT_SHARED
+
config PLATFORM_EC_USB_PD_HOST_CMD
bool "Host commands related to USB Power Delivery"
default y