diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2022-02-03 15:48:48 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-09 16:16:17 +0000 |
commit | 2cc1c7f6794b55b099d67e075d335b772f39fd2b (patch) | |
tree | dbd4f4fcf3009b9a0b4468629c4e95f1205059b3 /zephyr | |
parent | 14e117ee164a3c3165c2f62723750f9927618f14 (diff) | |
download | chrome-ec-2cc1c7f6794b55b099d67e075d335b772f39fd2b.tar.gz |
zephyr: update definition of WP pin
The WP pin for most boards is logically high when the pin is low -
WP is active when the pin is low. Add GPIO_ACTIVE_LOW flag to the WP_L
pins. It allows using Zephyr GPIO API to get the logical state without
checking CONFIG_WP_ACTIVE_HIGH define.
BUG=b:211779766
TEST=zmake testall
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I48594c5c7bc4deb452d6922d0b07f57055240d5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3437445
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Andrew McRae <amcrae@google.com>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts | 3 | ||||
-rw-r--r-- | zephyr/projects/brya/brya/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/corsola/gpio_kingler.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/corsola/gpio_krabby.dts | 3 | ||||
-rw-r--r-- | zephyr/projects/drawcia_riscv/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/herobrine/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/intelrvp/adlrvp/adlrvp_npcx/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx7/gpio.dts | 3 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/gpio.dts | 3 | ||||
-rw-r--r-- | zephyr/projects/skyrim/guybrush.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/skyrim/skyrim.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/trogdor/lazor/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/projects/volteer/volteer/gpio.dts | 2 | ||||
-rw-r--r-- | zephyr/test/drivers/overlay.dts | 3 |
14 files changed, 19 insertions, 14 deletions
diff --git a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts index 546333e805..514bfc50a0 100644 --- a/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts +++ b/zephyr/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts @@ -32,7 +32,8 @@ enum-name = "GPIO_LID_OPEN"; }; wp_l { - gpios = <&gpioi 4 GPIO_INPUT_PULL_UP>; + gpios = <&gpioi 4 (GPIO_INPUT_PULL_UP | + GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; pch_pltrst_l { diff --git a/zephyr/projects/brya/brya/gpio.dts b/zephyr/projects/brya/brya/gpio.dts index b3425a58d4..413d007c2e 100644 --- a/zephyr/projects/brya/brya/gpio.dts +++ b/zephyr/projects/brya/brya/gpio.dts @@ -16,7 +16,7 @@ enum-name = "GPIO_POWER_BUTTON_L"; }; gpio_ec_wp_l: ec_wp_odl { - gpios = <&gpioa 1 GPIO_INPUT>; + gpios = <&gpioa 1 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; charger_vap_otg_en { diff --git a/zephyr/projects/corsola/gpio_kingler.dts b/zephyr/projects/corsola/gpio_kingler.dts index 541c93cbda..e7fc9871ea 100644 --- a/zephyr/projects/corsola/gpio_kingler.dts +++ b/zephyr/projects/corsola/gpio_kingler.dts @@ -81,7 +81,7 @@ gpios = <&gpioe 4 GPIO_INPUT>; }; gpio_ec_wp_l: ec_wp_odl { - gpios = <&gpioe 3 GPIO_INPUT>; + gpios = <&gpioe 3 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; lid_accel_int_l { diff --git a/zephyr/projects/corsola/gpio_krabby.dts b/zephyr/projects/corsola/gpio_krabby.dts index 8ed7a08e6b..17c2e57bfd 100644 --- a/zephyr/projects/corsola/gpio_krabby.dts +++ b/zephyr/projects/corsola/gpio_krabby.dts @@ -54,7 +54,8 @@ enum-name = "GPIO_AC_PRESENT"; }; ec_flash_wp_odl: ec_flash_wp_odl { - gpios = <&gpioi 4 (GPIO_INPUT | GPIO_VOLTAGE_1P8)>; + gpios = <&gpioi 4 (GPIO_INPUT | GPIO_VOLTAGE_1P8 | + GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; spi0_cs: spi0_cs { diff --git a/zephyr/projects/drawcia_riscv/gpio.dts b/zephyr/projects/drawcia_riscv/gpio.dts index 2aeb4bdca7..2e184cd896 100644 --- a/zephyr/projects/drawcia_riscv/gpio.dts +++ b/zephyr/projects/drawcia_riscv/gpio.dts @@ -10,7 +10,7 @@ compatible = "named-gpios"; ec_wp_od { - gpios = <&gpioa 6 GPIO_INPUT>; + gpios = <&gpioa 6 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; ec_entering_rw { diff --git a/zephyr/projects/herobrine/gpio.dts b/zephyr/projects/herobrine/gpio.dts index 7bccdeeafc..966d056c9a 100644 --- a/zephyr/projects/herobrine/gpio.dts +++ b/zephyr/projects/herobrine/gpio.dts @@ -52,7 +52,7 @@ enum-name = "GPIO_VOLUME_UP_L"; }; gpio_ec_wp_odl: ec_wp_odl { - gpios = <&gpiod 3 GPIO_INPUT>; + gpios = <&gpiod 3 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_lid_open_ec: lid_open_ec { diff --git a/zephyr/projects/intelrvp/adlrvp/adlrvp_npcx/gpio.dts b/zephyr/projects/intelrvp/adlrvp/adlrvp_npcx/gpio.dts index 5b36a5d312..a2dc09c465 100644 --- a/zephyr/projects/intelrvp/adlrvp/adlrvp_npcx/gpio.dts +++ b/zephyr/projects/intelrvp/adlrvp/adlrvp_npcx/gpio.dts @@ -117,7 +117,7 @@ gpios = <&gpio9 5 GPIO_OUT_LOW>; }; ec_flash_wp_odl { - gpios = <&gpio9 4 GPIO_INPUT>; + gpios = <&gpio9 4 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; ec_h1_packet_mode { diff --git a/zephyr/projects/npcx_evb/npcx7/gpio.dts b/zephyr/projects/npcx_evb/npcx7/gpio.dts index 75d908cb0c..5912727041 100644 --- a/zephyr/projects/npcx_evb/npcx7/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx7/gpio.dts @@ -11,7 +11,8 @@ gpios = <&gpio0 3 GPIO_INPUT_PULL_UP>; }; wp_l { - gpios = <&gpio9 3 GPIO_INPUT_PULL_UP>; + gpios = <&gpio9 3 (GPIO_INPUT_PULL_UP | + GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_ac_present: ac_present { diff --git a/zephyr/projects/npcx_evb/npcx9/gpio.dts b/zephyr/projects/npcx_evb/npcx9/gpio.dts index 75d908cb0c..5912727041 100644 --- a/zephyr/projects/npcx_evb/npcx9/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx9/gpio.dts @@ -11,7 +11,8 @@ gpios = <&gpio0 3 GPIO_INPUT_PULL_UP>; }; wp_l { - gpios = <&gpio9 3 GPIO_INPUT_PULL_UP>; + gpios = <&gpio9 3 (GPIO_INPUT_PULL_UP | + GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_ac_present: ac_present { diff --git a/zephyr/projects/skyrim/guybrush.dts b/zephyr/projects/skyrim/guybrush.dts index 5317af33c9..3f35b017b8 100644 --- a/zephyr/projects/skyrim/guybrush.dts +++ b/zephyr/projects/skyrim/guybrush.dts @@ -7,7 +7,7 @@ named-gpios { /* Guybrush-specific GPIO customizations */ ec_wp_l { - gpios = <&gpio5 0 GPIO_INPUT>; + gpios = <&gpio5 0 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_ec_pwr_btn_odl: ec_pwr_btn_odl { diff --git a/zephyr/projects/skyrim/skyrim.dts b/zephyr/projects/skyrim/skyrim.dts index d423c4ece7..de256d2a11 100644 --- a/zephyr/projects/skyrim/skyrim.dts +++ b/zephyr/projects/skyrim/skyrim.dts @@ -72,7 +72,7 @@ enum-name = "GPIO_EC_CBI_WP"; }; ec_wp_l { - gpios = <&gpiod 7 GPIO_INPUT>; + gpios = <&gpiod 7 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_pg_lpddr5_s0_od: pg_lpddr5_s0_od { diff --git a/zephyr/projects/trogdor/lazor/gpio.dts b/zephyr/projects/trogdor/lazor/gpio.dts index 3c9ef2c718..9bacf4b5f3 100644 --- a/zephyr/projects/trogdor/lazor/gpio.dts +++ b/zephyr/projects/trogdor/lazor/gpio.dts @@ -58,7 +58,7 @@ enum-name = "GPIO_VOLUME_UP_L"; }; gpio_ec_wp_odl: ec_wp_odl { - gpios = <&gpioa 1 GPIO_INPUT>; + gpios = <&gpioa 1 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_lid_open_ec: lid_open_ec { diff --git a/zephyr/projects/volteer/volteer/gpio.dts b/zephyr/projects/volteer/volteer/gpio.dts index 63e50b37dc..29fa9114e2 100644 --- a/zephyr/projects/volteer/volteer/gpio.dts +++ b/zephyr/projects/volteer/volteer/gpio.dts @@ -16,7 +16,7 @@ enum-name = "GPIO_EC_WP_L"; }; wp_l { - gpios = <&gpioa 1 GPIO_INPUT>; + gpios = <&gpioa 1 (GPIO_INPUT | GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; gpio_h1_ec_pwr_btn_odl: h1_ec_pwr_btn_odl { diff --git a/zephyr/test/drivers/overlay.dts b/zephyr/test/drivers/overlay.dts index 38c7444ab2..59b774490a 100644 --- a/zephyr/test/drivers/overlay.dts +++ b/zephyr/test/drivers/overlay.dts @@ -36,7 +36,8 @@ * protection. */ gpio_wp_l: wp_l { - gpios = <&gpio0 3 (GPIO_INPUT | GPIO_OUTPUT)>; + gpios = <&gpio0 3 (GPIO_INPUT | GPIO_OUTPUT | + GPIO_ACTIVE_LOW)>; enum-name = "GPIO_WP_L"; }; pg_ec_dsw_pwrok { |