summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2021-05-13 10:04:01 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-18 18:39:13 +0000
commit59780263fcca42d1b411fddf48ebcba683d5f26b (patch)
treef46d6728ddf98b614ac42c82defb9ea6f0b90a8c
parent86205854684f98d7092e47e974961bb94697b410 (diff)
downloadchrome-ec-59780263fcca42d1b411fddf48ebcba683d5f26b.tar.gz
qcom: Create new configs for SC7280
Create new configs (Chromium EC namespace and Zephyr namespace) for SC7280. In this state, SC7280 power sequence has no difference from SC7180. BRANCH=None BUG=b:187980397 TEST=Built all the Chromium EC images and Zephyr EC images. TEST=Modify a board to use the new CONFIG. Change-Id: I178b8ffa5d79d3828baf222ac77906ab2262cf76 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2893069
-rw-r--r--include/config.h3
-rw-r--r--include/power/qcom.h2
-rw-r--r--power/build.mk1
-rw-r--r--util/config_allowed.txt1
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.powerseq8
-rw-r--r--zephyr/app/ec/soc/Kconfig7
-rw-r--r--zephyr/shim/include/config_chip.h4
8 files changed, 26 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h
index c43ea3845a..79bbce9c62 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1267,6 +1267,7 @@
#undef CONFIG_CHIPSET_RK3399 /* Rockchip rk3399 */
#undef CONFIG_CHIPSET_SKYLAKE /* Intel Skylake (x86) */
#undef CONFIG_CHIPSET_SC7180 /* Qualcomm SC7180 */
+#undef CONFIG_CHIPSET_SC7280 /* Qualcomm SC7280 */
#undef CONFIG_CHIPSET_SDM845 /* Qualcomm SDM845 */
#undef CONFIG_CHIPSET_STONEY /* AMD Stoney (x86)*/
#undef CONFIG_CHIPSET_TIGERLAKE /* Intel Tigerlake (x86) */
@@ -5937,7 +5938,7 @@
#error "Must enable CONFIG_POWER_TRACK_HOST_SLEEP_STATE for S0ix"
#endif
-#if defined(CONFIG_CHIPSET_SC7180)
+#if defined(CONFIG_CHIPSET_SC7180) || defined(CONFIG_CHIPSET_SC7280)
#if defined(CONFIG_POWER_SLEEP_FAILURE_DETECTION) && \
!defined(CONFIG_CHIPSET_RESUME_INIT_HOOK)
#error "Require resume init hook to enable sleep failure detection"
diff --git a/include/power/qcom.h b/include/power/qcom.h
index 5b52d63c06..2c071481fd 100644
--- a/include/power/qcom.h
+++ b/include/power/qcom.h
@@ -6,7 +6,7 @@
#ifndef __CROS_EC_POWER_QCOM_H_
#define __CROS_EC_POWER_QCOM_H_
-#ifdef CONFIG_CHIPSET_SC7180
+#if defined(CONFIG_CHIPSET_SC7180) || defined(CONFIG_CHIPSET_SC7280)
enum power_signal {
SC7X80_AP_RST_ASSERTED = 0,
SC7X80_PS_HOLD,
diff --git a/power/build.mk b/power/build.mk
index 86f4b8bc40..e2b86a055e 100644
--- a/power/build.mk
+++ b/power/build.mk
@@ -22,6 +22,7 @@ power-$(CONFIG_CHIPSET_CEZANNE)+=amd_x86.o
power-$(CONFIG_CHIPSET_RK3288)+=rk3288.o
power-$(CONFIG_CHIPSET_RK3399)+=rk3399.o
power-$(CONFIG_CHIPSET_SC7180)+=qcom.o
+power-$(CONFIG_CHIPSET_SC7280)+=qcom.o
power-$(CONFIG_CHIPSET_SDM845)+=sdm845.o
power-$(CONFIG_CHIPSET_SKYLAKE)+=skylake.o intel_x86.o
power-$(CONFIG_CHIPSET_STONEY)+=amd_x86.o
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index 55ab5b7b7f..95806b088d 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -222,6 +222,7 @@ CONFIG_CHIPSET_RESUME_INIT_HOOK
CONFIG_CHIPSET_RK3288
CONFIG_CHIPSET_RK3399
CONFIG_CHIPSET_SC7180
+CONFIG_CHIPSET_SC7280
CONFIG_CHIPSET_SDM845
CONFIG_CHIPSET_SKYLAKE
CONFIG_CHIPSET_SLP_S3_L_OVERRIDE
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 2ce9b6e4b6..b4e1b0475d 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -338,6 +338,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_HOST_SLEEP
"${PLATFORM_EC}/power/host_sleep.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_SC7180
"${PLATFORM_EC}/power/qcom.c")
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_POWERSEQ_SC7280
+ "${PLATFORM_EC}/power/qcom.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_PANIC
"${PLATFORM_EC}/common/panic_output.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_PWM
diff --git a/zephyr/Kconfig.powerseq b/zephyr/Kconfig.powerseq
index df83d0ae82..010ea0d1eb 100644
--- a/zephyr/Kconfig.powerseq
+++ b/zephyr/Kconfig.powerseq
@@ -133,4 +133,12 @@ config PLATFORM_EC_POWERSEQ_SC7180
Enable power sequencing for the Qualcomm Snapdragon SC7180
chipset.
+config PLATFORM_EC_POWERSEQ_SC7280
+ bool "SC7280 power sequencing"
+ depends on AP_ARM_QUALCOMM_SC7280
+ default y
+ help
+ Enable power sequencing for the Qualcomm Snapdragon SC7280
+ chipset.
+
endif # PLATFORM_EC_POWERSEQ
diff --git a/zephyr/app/ec/soc/Kconfig b/zephyr/app/ec/soc/Kconfig
index 47efe56d16..a77d7fda5a 100644
--- a/zephyr/app/ec/soc/Kconfig
+++ b/zephyr/app/ec/soc/Kconfig
@@ -41,6 +41,13 @@ config AP_ARM_QUALCOMM_SC7180
The application processor is a Qualcomm Snapdragon SC7180
ARMv8 processor.
+config AP_ARM_QUALCOMM_SC7280
+ bool "Qualcomm Snapdragon SC7280"
+ select AP_AARCH64
+ help
+ The application processor is a Qualcomm Snapdragon SC7280
+ ARMv8 processor.
+
endchoice
# Invisible meta-symbols generated by the selected chipset.
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 8549089d26..9ef652b6b1 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -107,6 +107,10 @@
#define CONFIG_CHIPSET_SC7180
#endif
+#ifdef CONFIG_AP_ARM_QUALCOMM_SC7280
+#define CONFIG_CHIPSET_SC7280
+#endif
+
#ifdef CONFIG_AP_X86_INTEL_CML
#define CONFIG_CHIPSET_COMETLAKE
#define CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK