diff options
author | lschyi <lschyi@google.com> | 2023-05-03 16:37:11 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-05 08:42:54 +0000 |
commit | 3a3a4fc9058904312088c9d3daf7013098637456 (patch) | |
tree | 0e04959ae981ca589203a7218b579ba1eaea2443 /zephyr | |
parent | f60d347b57eb36b3c5b4c2f271847beed87c9387 (diff) | |
download | chrome-ec-3a3a4fc9058904312088c9d3daf7013098637456.tar.gz |
corsola: Improve XHCI interrupt naming and remove redundant KConfig
The `int_usba` interrupt configuration in dts is actually configuration
for XHCI init done interrupt, which is not equivalent to settings for
USB A port. Update the naming and the interrupt handler function name,
and remove the KConfig `VARIANT_CORSOLA_USBA` as this name does not
match to the actual effect and whether to have USBA related settings are
controlled by the usba.dtsi is imported or not.
BUG=b:274723043
TEST=`zmake build <all board> --clobber`, and the USB A port works on
Krabby proto 1 board.
Change-Id: I400990745804e059f22b02845a11d1367ea079f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4505770
Tested-by: Sung-Chi Li <lschyi@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/program/corsola/Kconfig | 8 | ||||
-rw-r--r-- | zephyr/program/corsola/ite_interrupts.dtsi | 4 | ||||
-rw-r--r-- | zephyr/program/corsola/npcx_interrupts.dtsi | 4 | ||||
-rw-r--r-- | zephyr/program/corsola/src/usbc.c | 7 | ||||
-rw-r--r-- | zephyr/test/kingler/src/fakes.c | 2 | ||||
-rw-r--r-- | zephyr/test/krabby/krabby.default.overlay | 2 | ||||
-rw-r--r-- | zephyr/test/krabby/src/fake.c | 2 |
7 files changed, 10 insertions, 19 deletions
diff --git a/zephyr/program/corsola/Kconfig b/zephyr/program/corsola/Kconfig index 1d03262bf4..7843eb23d5 100644 --- a/zephyr/program/corsola/Kconfig +++ b/zephyr/program/corsola/Kconfig @@ -53,12 +53,4 @@ config VARIANT_CORSOLA_DB_DETECTION includes pin configuration and driver loading. default y -config VARIANT_CORSOLA_USBA - bool "Corsola Platform USB-A support" - help - Support Corsola USB-A related functions. Enable this function if - it has USB-A ports. - depends on PLATFORM_EC_USBC - default y - source "Kconfig.zephyr" diff --git a/zephyr/program/corsola/ite_interrupts.dtsi b/zephyr/program/corsola/ite_interrupts.dtsi index d3f718ec8c..8dc6d4eab6 100644 --- a/zephyr/program/corsola/ite_interrupts.dtsi +++ b/zephyr/program/corsola/ite_interrupts.dtsi @@ -71,10 +71,10 @@ flags = <GPIO_INT_EDGE_BOTH>; handler = "extpower_interrupt"; }; - int_usba: usba { + int_xhci: xhci_init_done { irq-pin = <&gpio_ap_xhci_init_done>; flags = <GPIO_INT_EDGE_BOTH>; - handler = "usb_a0_interrupt"; + handler = "xhci_interrupt"; }; int_wp: wp { irq-pin = <&ec_flash_wp_odl>; diff --git a/zephyr/program/corsola/npcx_interrupts.dtsi b/zephyr/program/corsola/npcx_interrupts.dtsi index c59d4b257e..6262a373d9 100644 --- a/zephyr/program/corsola/npcx_interrupts.dtsi +++ b/zephyr/program/corsola/npcx_interrupts.dtsi @@ -60,10 +60,10 @@ flags = <GPIO_INT_EDGE_BOTH>; handler = "extpower_interrupt"; }; - int_usba: usba { + int_xhci: xhci_init_done { irq-pin = <&gpio_ap_xhci_init_done>; flags = <GPIO_INT_EDGE_BOTH>; - handler = "usb_a0_interrupt"; + handler = "xhci_interrupt"; }; int_wp: wp { irq-pin = <&gpio_ec_wp_l>; diff --git a/zephyr/program/corsola/src/usbc.c b/zephyr/program/corsola/src/usbc.c index b55b73e168..7b6cb92d4c 100644 --- a/zephyr/program/corsola/src/usbc.c +++ b/zephyr/program/corsola/src/usbc.c @@ -33,9 +33,8 @@ static bool tasks_inited; /* Baseboard */ static void baseboard_init(void) { -#ifdef CONFIG_VARIANT_CORSOLA_USBA - gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_usba)); -#endif + gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_xhci)); + /* If CCD mode has enabled before init, force the ccd_interrupt. */ if (!gpio_pin_get_dt(GPIO_DT_FROM_NODELABEL(gpio_ccd_mode_odl))) { ccd_interrupt(GPIO_CCD_MODE_ODL); @@ -74,7 +73,7 @@ uint8_t board_get_adjusted_usb_pd_port_count(void) } /* USB-A */ -void usb_a0_interrupt(enum gpio_signal signal) +void xhci_interrupt(enum gpio_signal signal) { const int xhci_stat = gpio_get_level(signal); diff --git a/zephyr/test/kingler/src/fakes.c b/zephyr/test/kingler/src/fakes.c index fd06ab2eb1..412e02fef9 100644 --- a/zephyr/test/kingler/src/fakes.c +++ b/zephyr/test/kingler/src/fakes.c @@ -14,7 +14,7 @@ FAKE_VOID_FUNC(chipset_reset_request_interrupt, enum gpio_signal); FAKE_VOID_FUNC(power_signal_interrupt, enum gpio_signal); FAKE_VOID_FUNC(chipset_watchdog_interrupt, enum gpio_signal); FAKE_VOID_FUNC(extpower_interrupt, enum gpio_signal); -FAKE_VOID_FUNC(usb_a0_interrupt, enum gpio_signal); +FAKE_VOID_FUNC(xhci_interrupt, enum gpio_signal); FAKE_VOID_FUNC(switch_interrupt, enum gpio_signal); FAKE_VOID_FUNC(tcpc_alert_event, enum gpio_signal); FAKE_VOID_FUNC(ppc_interrupt, enum gpio_signal); diff --git a/zephyr/test/krabby/krabby.default.overlay b/zephyr/test/krabby/krabby.default.overlay index 9893a5bcd2..f6892b8fc2 100644 --- a/zephyr/test/krabby/krabby.default.overlay +++ b/zephyr/test/krabby/krabby.default.overlay @@ -15,7 +15,7 @@ /delete-node/ &int_volume_up; /delete-node/ &int_volume_down; /delete-node/ &int_tablet_mode; -/delete-node/ &int_usba; +/delete-node/ &int_xhci; /delete-node/ &int_wp; /delete-node/ &int_spi0_cs; /delete-node/ &int_x_ec_gpio2; diff --git a/zephyr/test/krabby/src/fake.c b/zephyr/test/krabby/src/fake.c index 5c83e1cb88..5b2d34608c 100644 --- a/zephyr/test/krabby/src/fake.c +++ b/zephyr/test/krabby/src/fake.c @@ -15,7 +15,7 @@ FAKE_VOID_FUNC(power_signal_interrupt, enum gpio_signal); FAKE_VOID_FUNC(chipset_warm_reset_interrupt, enum gpio_signal); FAKE_VOID_FUNC(chipset_watchdog_interrupt, enum gpio_signal); FAKE_VOID_FUNC(extpower_interrupt, enum gpio_signal); -FAKE_VOID_FUNC(usb_a0_interrupt, enum gpio_signal); +FAKE_VOID_FUNC(xhci_interrupt, enum gpio_signal); FAKE_VOID_FUNC(switch_interrupt, enum gpio_signal); FAKE_VOID_FUNC(spi_event, enum gpio_signal); FAKE_VOID_FUNC(ccd_interrupt, enum gpio_signal); |