summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2021-11-15 17:05:23 +0800
committerCommit Bot <commit-bot@chromium.org>2021-11-16 07:26:42 +0000
commita8197513f7043ead08d53ed144531fe4f5497206 (patch)
tree091527350d1a0bdb42362b934e60f550e38ee244 /zephyr
parent0aff0f866b93a8e74e397bbdd476c81414442b7b (diff)
downloadchrome-ec-a8197513f7043ead08d53ed144531fe4f5497206.tar.gz
zephyr: mtk power sequence code refactor
Minor refactor before landing mt8186 power seq: 1) remove PLATFORM_EC_POWERSEQ_IT8XXX2, we don't have common power code for it8xxx2 devices currently. 2) rename mediatek,power-signal-list dts binding to mt8192. Powerseq for MTK platform should infer from AP_ARM_MTK_MTxxxx, not from the EC chip. BUG=b:206338930 TEST=1) zmake -j32 configure -b zephyr/projects/asurada/hayato/ 2) zmake -j32 configure -b zephyr/projects/corsola/krabby/ BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I3ce8aeb6f2745b6aef9980a7cda5eadbafbfdcc4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3281631 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.powerseq15
-rw-r--r--zephyr/boards/riscv/asurada/asurada_defconfig1
-rw-r--r--zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig1
-rw-r--r--zephyr/dts/bindings/cros_pwr_signal/mt8192,power-signal-list.yaml (renamed from zephyr/dts/bindings/cros_pwr_signal/mediatek,power-signal-list.yaml)2
-rw-r--r--zephyr/projects/asurada/hayato/gpio.dts2
-rw-r--r--zephyr/projects/asurada/hayato/include/gpio_map.h5
-rw-r--r--zephyr/projects/corsola/krabby/gpio.dts2
-rw-r--r--zephyr/projects/corsola/krabby/include/gpio_map.h5
9 files changed, 6 insertions, 29 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 606500b05e..f76690be19 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -291,7 +291,7 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_INTEL
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP
"${PLATFORM_EC}/power/host_sleep.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_MT8192
- "${PLATFORM_EC}/power/mt8192.c")
+ "${PLATFORM_EC}/power/mt8192.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_SC7180
"${PLATFORM_EC}/power/qcom.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_SC7280
diff --git a/zephyr/Kconfig.powerseq b/zephyr/Kconfig.powerseq
index fc16b7b0a1..27abd68e7c 100644
--- a/zephyr/Kconfig.powerseq
+++ b/zephyr/Kconfig.powerseq
@@ -153,23 +153,12 @@ endif # PLATFORM_EC_POWERSEQ_ICELAKE
endif # PLATFORM_EC_POWERSEQ_INTEL
-menuconfig PLATFORM_EC_POWERSEQ_IT8XXX2
- bool "Enable shimming common ITE8xxx2 power sequencing code"
- depends on AP_ARM_MTK_MT8192
- default y
- help
- Enable shimming platform/ec AP power sequencing code for
- IT8xxx2.
-
-if PLATFORM_EC_POWERSEQ_IT8XXX2
-
config PLATFORM_EC_POWERSEQ_MT8192
bool "Use common MT8192 code for power sequencing"
default y
+ depends on AP_ARM_MTK_MT8192
help
- Use the Comet Lake code for power sequencing.
-
-endif # PLATFORM_EC_POWERSEQ_ITE8XXX2
+ Use the MT8192 code for power sequencing.
config PLATFORM_EC_POWERSEQ_SC7180
bool "SC7180 power sequencing"
diff --git a/zephyr/boards/riscv/asurada/asurada_defconfig b/zephyr/boards/riscv/asurada/asurada_defconfig
index dbcc83ad75..60c04020f7 100644
--- a/zephyr/boards/riscv/asurada/asurada_defconfig
+++ b/zephyr/boards/riscv/asurada/asurada_defconfig
@@ -67,7 +67,6 @@ CONFIG_PLATFORM_EC_POWER_BUTTON=y
# Power Sequencing
CONFIG_PLATFORM_EC_POWERSEQ=y
CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y
-CONFIG_PLATFORM_EC_POWERSEQ_IT8XXX2=y
CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL=n
CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
CONFIG_PLATFORM_EC_CHIPSET_RESET_HOOK=y
diff --git a/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig b/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig
index 2cb3650a7f..b0a2db9686 100644
--- a/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig
+++ b/zephyr/boards/riscv/it8xxx2/it8xxx2_defconfig
@@ -67,7 +67,6 @@ CONFIG_PLATFORM_EC_POWER_BUTTON=y
# Power Sequencing
CONFIG_PLATFORM_EC_POWERSEQ=y
CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP=y
-CONFIG_PLATFORM_EC_POWERSEQ_IT8XXX2=y
CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL=n
CONFIG_PLATFORM_EC_EXTPOWER_GPIO=y
CONFIG_PLATFORM_EC_CHIPSET_RESET_HOOK=y
diff --git a/zephyr/dts/bindings/cros_pwr_signal/mediatek,power-signal-list.yaml b/zephyr/dts/bindings/cros_pwr_signal/mt8192,power-signal-list.yaml
index 0fddc44b37..b1dedb76c8 100644
--- a/zephyr/dts/bindings/cros_pwr_signal/mediatek,power-signal-list.yaml
+++ b/zephyr/dts/bindings/cros_pwr_signal/mt8192,power-signal-list.yaml
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
description: MediaTek, Power Signal List
-compatible: "mediatek,power-signal-list"
+compatible: "mt8192,power-signal-list"
include: power-signal-list.yaml
diff --git a/zephyr/projects/asurada/hayato/gpio.dts b/zephyr/projects/asurada/hayato/gpio.dts
index a7c01656e7..380df3103d 100644
--- a/zephyr/projects/asurada/hayato/gpio.dts
+++ b/zephyr/projects/asurada/hayato/gpio.dts
@@ -329,7 +329,7 @@
};
power_signal_list: power-signal-list {
- compatible = "mediatek,power-signal-list";
+ compatible = "mt8192,power-signal-list";
pmic_pwr_good {
power-enum-name = "PMIC_PWR_GOOD";
power-gpio-pin = <&pmic_ec_pwrgd>;
diff --git a/zephyr/projects/asurada/hayato/include/gpio_map.h b/zephyr/projects/asurada/hayato/include/gpio_map.h
index 5f01f290d2..eb99aeb2dc 100644
--- a/zephyr/projects/asurada/hayato/include/gpio_map.h
+++ b/zephyr/projects/asurada/hayato/include/gpio_map.h
@@ -9,11 +9,6 @@
#include <devicetree.h>
#include <gpio_signal.h>
-/*
- * TODO(b:188674805) create a driver to pull this information from DeviceTree
- */
-#include "power/mt8192.h"
-
#define GPIO_ENTERING_RW GPIO_UNIMPLEMENTED
#define GPIO_WP_L GPIO_UNIMPLEMENTED
diff --git a/zephyr/projects/corsola/krabby/gpio.dts b/zephyr/projects/corsola/krabby/gpio.dts
index f02a7e5a14..29fc7dd879 100644
--- a/zephyr/projects/corsola/krabby/gpio.dts
+++ b/zephyr/projects/corsola/krabby/gpio.dts
@@ -287,7 +287,7 @@
};
power_signal_list: power-signal-list {
- compatible = "mediatek,power-signal-list";
+ compatible = "mt8192,power-signal-list";
pmic_pwr_good {
power-enum-name = "PMIC_PWR_GOOD";
power-gpio-pin = <&pmic_ec_pwrgd>;
diff --git a/zephyr/projects/corsola/krabby/include/gpio_map.h b/zephyr/projects/corsola/krabby/include/gpio_map.h
index 5122c1e42e..9122c85ffc 100644
--- a/zephyr/projects/corsola/krabby/include/gpio_map.h
+++ b/zephyr/projects/corsola/krabby/include/gpio_map.h
@@ -9,11 +9,6 @@
#include <devicetree.h>
#include <gpio_signal.h>
-/*
- * TODO(b:188674805) create a driver to pull this information from DeviceTree
- */
-#include "power/mt8192.h"
-
#define GPIO_ENTERING_RW GPIO_UNIMPLEMENTED
#define GPIO_WP_L GPIO_UNIMPLEMENTED