mfd: cros_ec: Add SCP Core-1 as a new CrOS EC MCU
authorTinghan Shen <tinghan.shen@mediatek.com>
Wed, 1 Jun 2022 11:22:01 +0000 (19:22 +0800)
committerLee Jones <lee@kernel.org>
Tue, 19 Jul 2022 09:54:39 +0000 (10:54 +0100)
MT8195 System Companion Processors(SCP) is a dual-core RISC-V MCU.
Add a new CrOS feature ID to represent the SCP's 2nd core.

The 1st core is referred to as 'core 0', and the 2nd core is referred
to as 'core 1'.

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220601112201.15510-16-tinghan.shen@mediatek.com
drivers/mfd/cros_ec_dev.c
include/linux/platform_data/cros_ec_commands.h
include/linux/platform_data/cros_ec_proto.h

index 596731caf4079f2d1a1d9d818de4362372cf7dc8..07cc31d92edc55b5bf9c98438645f99fc1b727eb 100644 (file)
@@ -64,6 +64,11 @@ static const struct cros_feature_to_name cros_mcu_devices[] = {
                .name   = CROS_EC_DEV_SCP_NAME,
                .desc   = "System Control Processor",
        },
+       {
+               .id     = EC_FEATURE_SCP_C1,
+               .name   = CROS_EC_DEV_SCP_C1_NAME,
+               .desc   = "System Control Processor 2nd Core",
+       },
        {
                .id     = EC_FEATURE_TOUCHPAD,
                .name   = CROS_EC_DEV_TP_NAME,
index 8cfa8cfca77ef42ebf41e7e773b62a9081000223..9fbf1c5eb8d3f85a2cee7d05f745ae26bcdbd15e 100644 (file)
@@ -1300,6 +1300,8 @@ enum ec_feature_code {
         * mux.
         */
        EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK = 43,
+       /* The MCU is a System Companion Processor (SCP) 2nd Core. */
+       EC_FEATURE_SCP_C1 = 45,
 };
 
 #define EC_FEATURE_MASK_0(event_code) BIT(event_code % 32)
index 138fd912c808e7f26fac3f6033b2cfc71d9b79c4..da06dc7cf1cb16e541985ecf9117b586283bd175 100644 (file)
@@ -19,6 +19,7 @@
 #define CROS_EC_DEV_ISH_NAME   "cros_ish"
 #define CROS_EC_DEV_PD_NAME    "cros_pd"
 #define CROS_EC_DEV_SCP_NAME   "cros_scp"
+#define CROS_EC_DEV_SCP_C1_NAME        "cros_scp_c1"
 #define CROS_EC_DEV_TP_NAME    "cros_tp"
 
 /*