summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2022-12-02 22:30:24 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-04 15:22:50 +0000
commit154327acd265e3c2242676301773f32e55c0c744 (patch)
tree719e59a85bf6fa84268cb755a08aa57afe58adb8
parent868032324fcc03c1e1b33a4eae619a053f688a62 (diff)
downloadchrome-ec-154327acd265e3c2242676301773f32e55c0c744.tar.gz
corsola: use ite_interrupts.dtsi
To avoid duplication, and follow the new project organization rule. BUG=b:254097516 TEST=tentacruel boots BRANCH=none Change-Id: Iea4a7b3ad0d5c5f5a91701de31eccd77be234fec Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4075845 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--zephyr/program/corsola/interrupts_magikarp.dtsi115
-rw-r--r--zephyr/program/corsola/interrupts_tentacruel.dtsi115
-rw-r--r--zephyr/program/corsola/magikarp/project.overlay24
-rw-r--r--zephyr/program/corsola/tentacruel/project.overlay24
-rw-r--r--zephyr/test/krabby/pinctrl.dts10
-rw-r--r--zephyr/test/krabby/testcase.yaml2
6 files changed, 57 insertions, 233 deletions
diff --git a/zephyr/program/corsola/interrupts_magikarp.dtsi b/zephyr/program/corsola/interrupts_magikarp.dtsi
deleted file mode 100644
index 4f4e0ba100..0000000000
--- a/zephyr/program/corsola/interrupts_magikarp.dtsi
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/ {
- aliases {
- int-wp = &int_wp;
- };
-
- gpio-interrupts {
- compatible = "cros-ec,gpio-interrupts";
-
- int_power_button: power_button {
- irq-pin = <&power_button_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_button_interrupt";
- };
- int_volume_up: volume_up {
- irq-pin = <&volume_up_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "button_interrupt";
- };
- int_volume_down: volume_down {
- irq-pin = <&volume_down_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "button_interrupt";
- };
- int_lid_open: lid_open {
- irq-pin = <&lid_open>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "lid_interrupt";
- };
- int_warm_rst: warm_rst {
- irq-pin = <&ap_ec_warm_rst_req>;
- flags = <GPIO_INT_EDGE_RISING>;
- handler = "chipset_reset_request_interrupt";
- };
- int_ap_in_sleep: ap_in_sleep {
- irq-pin = <&ap_in_sleep_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_signal_interrupt";
- };
- int_ap_in_rst: ap_in_rst {
- irq-pin = <&ap_sysrst_odl_r>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_signal_interrupt";
- };
- int_ap_wdtrst: ap_wdtrst {
- irq-pin = <&ap_ec_wdtrst_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "chipset_watchdog_interrupt";
- };
- int_tablet_mode: tablet_mode {
- irq-pin = <&tablet_mode_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "gmr_tablet_switch_isr";
- };
- int_base_imu: base_imu {
- irq-pin = <&base_imu_int_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "motion_interrupt";
- };
- int_lid_imu: lid_imu {
- irq-pin = <&lid_accel_int_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "lis2dw12_interrupt";
- };
- int_ac_present: ac_present {
- irq-pin = <&ac_present>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "extpower_interrupt";
- };
- int_usba: usba {
- irq-pin = <&gpio_ap_xhci_init_done>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "usb_a0_interrupt";
- };
- int_wp: wp {
- irq-pin = <&ec_flash_wp_odl>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "switch_interrupt";
- };
- int_spi0_cs: spi0_cs {
- irq-pin = <&spi0_cs>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "spi_event";
- };
- int_x_ec_gpio2: x_ec_gpio2 {
- irq-pin = <&gpio_x_ec_gpio2>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "x_ec_interrupt";
- };
- int_usb_c0_bc12: usb_c0_bc12 {
- irq-pin = <&usb_c0_bc12_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "bc12_interrupt";
- };
- int_usb_c0_ppc: usb_c0_ppc {
- irq-pin = <&usb_c0_ppc_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "ppc_interrupt";
- };
- int_usb_c1_bc12_charger: usb_c1_bc12_charger {
- irq-pin = <&usb_c1_bc12_charger_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "rt9490_bc12_dt_interrupt";
- };
- int_ccd_mode_odl: ccd-mode-odl {
- irq-pin = <&gpio_ccd_mode_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "ccd_interrupt";
- };
- };
-};
diff --git a/zephyr/program/corsola/interrupts_tentacruel.dtsi b/zephyr/program/corsola/interrupts_tentacruel.dtsi
deleted file mode 100644
index 11229daf36..0000000000
--- a/zephyr/program/corsola/interrupts_tentacruel.dtsi
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright 2022 The ChromiumOS Authors
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/ {
- aliases {
- int-wp = &int_wp;
- };
-
- gpio-interrupts {
- compatible = "cros-ec,gpio-interrupts";
-
- int_power_button: power_button {
- irq-pin = <&power_button_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_button_interrupt";
- };
- int_volume_up: volume_up {
- irq-pin = <&volume_up_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "button_interrupt";
- };
- int_volume_down: volume_down {
- irq-pin = <&volume_down_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "button_interrupt";
- };
- int_lid_open: lid_open {
- irq-pin = <&lid_open>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "lid_interrupt";
- };
- int_warm_rst: warm_rst {
- irq-pin = <&ap_ec_warm_rst_req>;
- flags = <GPIO_INT_EDGE_RISING>;
- handler = "chipset_reset_request_interrupt";
- };
- int_ap_in_sleep: ap_in_sleep {
- irq-pin = <&ap_in_sleep_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_signal_interrupt";
- };
- int_ap_in_rst: ap_in_rst {
- irq-pin = <&ap_sysrst_odl_r>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "power_signal_interrupt";
- };
- int_ap_wdtrst: ap_wdtrst {
- irq-pin = <&ap_ec_wdtrst_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "chipset_watchdog_interrupt";
- };
- int_tablet_mode: tablet_mode {
- irq-pin = <&tablet_mode_l>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "gmr_tablet_switch_isr";
- };
- int_base_imu: base_imu {
- irq-pin = <&base_imu_int_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "motion_interrupt";
- };
- int_lid_imu: lid_imu {
- irq-pin = <&lid_accel_int_l>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "lis2dw12_interrupt";
- };
- int_ac_present: ac_present {
- irq-pin = <&ac_present>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "extpower_interrupt";
- };
- int_usba: usba {
- irq-pin = <&gpio_ap_xhci_init_done>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "usb_a0_interrupt";
- };
- int_wp: wp {
- irq-pin = <&ec_flash_wp_odl>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "switch_interrupt";
- };
- int_spi0_cs: spi0_cs {
- irq-pin = <&spi0_cs>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "spi_event";
- };
- int_x_ec_gpio2: x_ec_gpio2 {
- irq-pin = <&gpio_x_ec_gpio2>;
- flags = <GPIO_INT_EDGE_BOTH>;
- handler = "x_ec_interrupt";
- };
- int_usb_c0_ppc: usb_c0_ppc {
- irq-pin = <&usb_c0_ppc_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "ppc_interrupt";
- };
- int_usb_c0_bc12: usb_c0_bc12 {
- irq-pin = <&usb_c0_bc12_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "bc12_interrupt";
- };
- int_usb_c1_bc12_charger: usb_c1_bc12_charger {
- irq-pin = <&usb_c1_bc12_charger_int_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "rt9490_bc12_dt_interrupt";
- };
- int_ccd_mode_odl: ccd-mode-odl {
- irq-pin = <&gpio_ccd_mode_odl>;
- flags = <GPIO_INT_EDGE_FALLING>;
- handler = "ccd_interrupt";
- };
- };
-};
diff --git a/zephyr/program/corsola/magikarp/project.overlay b/zephyr/program/corsola/magikarp/project.overlay
index f4ca85e375..6f69253c6d 100644
--- a/zephyr/program/corsola/magikarp/project.overlay
+++ b/zephyr/program/corsola/magikarp/project.overlay
@@ -14,7 +14,29 @@
#include "../gpio_magikarp.dtsi"
#include "../ite_keyboard.dtsi"
#include "../i2c_magikarp.dtsi"
-#include "../interrupts_magikarp.dtsi"
+#include "../ite_interrupts.dtsi"
#include "../led_magikarp.dtsi"
#include "../motionsense_magikarp.dtsi"
#include "../usbc_magikarp.dtsi"
+
+/ {
+ gpio-interrupts {
+ int_base_imu: base_imu {
+ handler = "motion_interrupt";
+ };
+
+ /delete-node/ usb_c0_ppc_bc12;
+
+ int_usb_c0_ppc: usb_c0_ppc {
+ irq-pin = <&usb_c0_ppc_int_odl>;
+ flags = <GPIO_INT_EDGE_FALLING>;
+ handler = "ppc_interrupt";
+ };
+
+ int_usb_c0_bc12: usb_c0_bc12 {
+ irq-pin = <&usb_c0_bc12_int_odl>;
+ flags = <GPIO_INT_EDGE_FALLING>;
+ handler = "bc12_interrupt";
+ };
+ };
+};
diff --git a/zephyr/program/corsola/tentacruel/project.overlay b/zephyr/program/corsola/tentacruel/project.overlay
index 79bf2baa3d..411f401a0e 100644
--- a/zephyr/program/corsola/tentacruel/project.overlay
+++ b/zephyr/program/corsola/tentacruel/project.overlay
@@ -14,8 +14,30 @@
#include "../gpio_tentacruel.dtsi"
#include "../ite_keyboard.dtsi"
#include "../i2c_tentacruel.dtsi"
-#include "../interrupts_tentacruel.dtsi"
+#include "../ite_interrupts.dtsi"
#include "../led_tentacruel.dtsi"
#include "../motionsense_tentacruel.dtsi"
#include "../usbc_tentacruel.dtsi"
#include "../thermistor_tentacruel.dtsi"
+
+/ {
+ gpio-interrupts {
+ int_base_imu: base_imu {
+ handler = "motion_interrupt";
+ };
+
+ /delete-node/ usb_c0_ppc_bc12;
+
+ int_usb_c0_ppc: usb_c0_ppc {
+ irq-pin = <&usb_c0_ppc_int_odl>;
+ flags = <GPIO_INT_EDGE_FALLING>;
+ handler = "ppc_interrupt";
+ };
+
+ int_usb_c0_bc12: usb_c0_bc12 {
+ irq-pin = <&usb_c0_bc12_int_odl>;
+ flags = <GPIO_INT_EDGE_FALLING>;
+ handler = "bc12_interrupt";
+ };
+ };
+};
diff --git a/zephyr/test/krabby/pinctrl.dts b/zephyr/test/krabby/pinctrl.dts
index ecc7b88538..fd3b66e419 100644
--- a/zephyr/test/krabby/pinctrl.dts
+++ b/zephyr/test/krabby/pinctrl.dts
@@ -7,3 +7,13 @@
/delete-node/ &pinctrl;
/delete-node/ &{/hibernate-wake-pins};
+
+/ {
+ gpio-interrupts {
+ int_base_imu: base_imu {
+ handler = "motion_interrupt";
+ };
+
+ /delete-node/ usb_c0_ppc_bc12;
+ };
+};
diff --git a/zephyr/test/krabby/testcase.yaml b/zephyr/test/krabby/testcase.yaml
index 781d82db4b..7839427646 100644
--- a/zephyr/test/krabby/testcase.yaml
+++ b/zephyr/test/krabby/testcase.yaml
@@ -11,7 +11,7 @@ tests:
- CONFIG_TEST_KRABBY=y
- CONFIG_MUX_INIT_ADC=y
krabby.tentacruel:
- extra_args: DTC_OVERLAY_FILE="common.dts;adc_temp.dts;../program/corsola/interrupts_tentacruel.dtsi;../program/corsola/gpio_tentacruel.dtsi;../program/corsola/thermistor_tentacruel.dtsi;pinctrl.dts"
+ extra_args: DTC_OVERLAY_FILE="common.dts;adc_temp.dts;../program/corsola/ite_interrupts.dtsi;../program/corsola/gpio_tentacruel.dtsi;../program/corsola/thermistor_tentacruel.dtsi;pinctrl.dts"
extra_configs:
- CONFIG_TEST_TENTACRUEL=y
- CONFIG_PLATFORM_EC_CHARGER_PROFILE_OVERRIDE=y