From 3f8b0b1f248dce2caee7b9a0562511f05546ba62 Mon Sep 17 00:00:00 2001 From: Andrew McRae Date: Fri, 28 Jan 2022 11:53:53 +1100 Subject: zephyr: Convert wake-pins to use interrupt config Convert the hibernate wake-pins to use the new interrupt config. BUG=b:214608987,b:216869126 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae Cq-Depend: chromium:3423294,chromium:3423295 Change-Id: Iaaf03da88ead8bce7b2b428c265434a5a17b4ab7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422856 Reviewed-by: Wai-Hong Tam --- zephyr/projects/asurada/hayato/gpio.dts | 6 +++--- zephyr/projects/brya/brya/gpio.dts | 8 ++++---- zephyr/projects/corsola/gpio_krabby.dts | 6 +++--- zephyr/projects/herobrine/gpio.dts | 13 ++++++++----- zephyr/projects/nissa/nereid_overlay.dts | 6 +++--- zephyr/projects/nissa/nivviks_overlay.dts | 6 +++--- zephyr/projects/npcx_evb/npcx7/gpio.dts | 8 ++++---- zephyr/projects/npcx_evb/npcx9/gpio.dts | 8 ++++---- zephyr/projects/trogdor/lazor/gpio.dts | 10 +++++----- zephyr/projects/trogdor/lazor/interrupts.dts | 5 +++++ zephyr/projects/trogdor/trogdor/gpio.dts | 10 +++++----- zephyr/projects/trogdor/trogdor/interrupts.dts | 5 +++++ 12 files changed, 52 insertions(+), 39 deletions(-) (limited to 'zephyr/projects') diff --git a/zephyr/projects/asurada/hayato/gpio.dts b/zephyr/projects/asurada/hayato/gpio.dts index a39bebe4d7..865eefaec2 100644 --- a/zephyr/projects/asurada/hayato/gpio.dts +++ b/zephyr/projects/asurada/hayato/gpio.dts @@ -277,9 +277,9 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = <&ac_present - &power_button_l - &lid_open>; + wakeup-irqs = <&int_ac_present + &int_power_button + &int_lid_open>; }; power_signal_list: power-signal-list { diff --git a/zephyr/projects/brya/brya/gpio.dts b/zephyr/projects/brya/brya/gpio.dts index a9138cc623..31e17c518b 100644 --- a/zephyr/projects/brya/brya/gpio.dts +++ b/zephyr/projects/brya/brya/gpio.dts @@ -330,10 +330,10 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &acok_od - &gsc_ec_pwr_btn_odl - &lid_open + wakeup-irqs = < + &int_ac_present + &int_power_button + &int_lid_open >; }; diff --git a/zephyr/projects/corsola/gpio_krabby.dts b/zephyr/projects/corsola/gpio_krabby.dts index b2df9bc453..705a08d753 100644 --- a/zephyr/projects/corsola/gpio_krabby.dts +++ b/zephyr/projects/corsola/gpio_krabby.dts @@ -241,9 +241,9 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = <&ac_present - &power_button_l - &lid_open>; + wakeup-irqs = <&int_ac_present + &int_power_button + &int_lid_open>; }; unused-pins { diff --git a/zephyr/projects/herobrine/gpio.dts b/zephyr/projects/herobrine/gpio.dts index cc6260b651..ff3340fdb0 100644 --- a/zephyr/projects/herobrine/gpio.dts +++ b/zephyr/projects/herobrine/gpio.dts @@ -275,11 +275,14 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_chg_acok_od - &gpio_ec_pwr_btn_odl - &gpio_lid_open_ec - &gpio_rtc_ec_wake_odl + wakeup-irqs = < + /* + * TODO(b/216893756): Resolve how + * hibernation is done. + */ + &int_ac_present + &int_power_button + &int_lid_open >; }; diff --git a/zephyr/projects/nissa/nereid_overlay.dts b/zephyr/projects/nissa/nereid_overlay.dts index 058dbfdf42..f513594b38 100644 --- a/zephyr/projects/nissa/nereid_overlay.dts +++ b/zephyr/projects/nissa/nereid_overlay.dts @@ -14,9 +14,9 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_gsc_ec_pwr_btn_odl - &gpio_lid_open + wakeup-irqs = < + &int_power_button + &int_lid_open >; }; diff --git a/zephyr/projects/nissa/nivviks_overlay.dts b/zephyr/projects/nissa/nivviks_overlay.dts index 1359025d9a..24b0f6ee03 100644 --- a/zephyr/projects/nissa/nivviks_overlay.dts +++ b/zephyr/projects/nissa/nivviks_overlay.dts @@ -14,9 +14,9 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_gsc_ec_pwr_btn_odl - &gpio_lid_open + wakeup-irqs = < + &int_power_button + &int_lid_open >; }; diff --git a/zephyr/projects/npcx_evb/npcx7/gpio.dts b/zephyr/projects/npcx_evb/npcx7/gpio.dts index 3bfc4f386a..fd9a195673 100644 --- a/zephyr/projects/npcx_evb/npcx7/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx7/gpio.dts @@ -60,10 +60,10 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_ac_present - &gpio_power_button_l - &gpio_lid_open + wakeup-irqs = < + &int_ac_present + &int_power_button + &int_lid_open >; }; }; diff --git a/zephyr/projects/npcx_evb/npcx9/gpio.dts b/zephyr/projects/npcx_evb/npcx9/gpio.dts index 3bfc4f386a..fd9a195673 100644 --- a/zephyr/projects/npcx_evb/npcx9/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx9/gpio.dts @@ -60,10 +60,10 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_ac_present - &gpio_power_button_l - &gpio_lid_open + wakeup-irqs = < + &int_ac_present + &int_power_button + &int_lid_open >; }; }; diff --git a/zephyr/projects/trogdor/lazor/gpio.dts b/zephyr/projects/trogdor/lazor/gpio.dts index b38fea23a5..9e12c97267 100644 --- a/zephyr/projects/trogdor/lazor/gpio.dts +++ b/zephyr/projects/trogdor/lazor/gpio.dts @@ -331,11 +331,11 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_acok_od - &gpio_ec_pwr_btn_odl - &gpio_lid_open_ec - &gpio_ec_rst_odl + wakeup-irqs = < + &int_ac_present + &int_power_button + &int_lid_open + &int_ec_rst >; }; diff --git a/zephyr/projects/trogdor/lazor/interrupts.dts b/zephyr/projects/trogdor/lazor/interrupts.dts index 8ba8f71078..823433e3bb 100644 --- a/zephyr/projects/trogdor/lazor/interrupts.dts +++ b/zephyr/projects/trogdor/lazor/interrupts.dts @@ -122,5 +122,10 @@ flags = ; handler = "gmr_tablet_switch_isr"; }; + int_ec_rst: ec_rst { + irq-pin = <&gpio_ec_rst_odl>; + flags = ; + handler = "wake_isr"; + }; }; }; diff --git a/zephyr/projects/trogdor/trogdor/gpio.dts b/zephyr/projects/trogdor/trogdor/gpio.dts index 0245ed20c2..16102943a2 100644 --- a/zephyr/projects/trogdor/trogdor/gpio.dts +++ b/zephyr/projects/trogdor/trogdor/gpio.dts @@ -289,11 +289,11 @@ hibernate-wake-pins { compatible = "cros-ec,hibernate-wake-pins"; - wakeup-pins = < - &gpio_chg_acok_od - &gpio_ec_pwr_btn_odl - &gpio_lid_open_ec - &gpio_ec_rst_odl + wakeup-irqs = < + &int_ac_present + &int_power_button + &int_lid_open + &int_ec_rst >; }; diff --git a/zephyr/projects/trogdor/trogdor/interrupts.dts b/zephyr/projects/trogdor/trogdor/interrupts.dts index d3514770a3..06f293101f 100644 --- a/zephyr/projects/trogdor/trogdor/interrupts.dts +++ b/zephyr/projects/trogdor/trogdor/interrupts.dts @@ -112,5 +112,10 @@ flags = ; handler = "gmr_tablet_switch_isr"; }; + int_ec_rst: ec_rst { + irq-pin = <&gpio_ec_rst_odl>; + flags = ; + handler = "wake_isr"; + }; }; }; -- cgit v1.2.1