* [PATCH 0/7] RPMPD cleanup + parent PD
@ 2023-01-25 3:27 Konrad Dybcio
2023-01-25 3:27 ` [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support Konrad Dybcio
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio
This series provides a big and necessary cleanup for RPMPD..
Lots of redefined objects were trimmed as well as some stylistic
and maintainability fixes have been made. Also, support for parent
PD is added and put to use on SM6375 where VDDMX should be scaled
together with VDDGX.
Tested on SM6375.
Konrad Dybcio (7):
soc: qcom: rpmpd: Add parent PD support
soc: qcom: rpmpd: Expand #defines into structs
soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX
soc: qcom: rpmpd: Remove SoC names from RPMPD names
soc: qcom: rpmpd: Remove useless comments
soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name
soc: qcom: rpmpd: Make bindings assignments consistent
drivers/soc/qcom/rpmpd.c | 790 ++++++++++++++++++++++++++-------------
1 file changed, 522 insertions(+), 268 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 3:27 ` [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Konrad Dybcio
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
In some cases (like with the GPU core clock on GMU-less SoCs) it's
required that we scale more than one voltage domain. This can be achieved
by linking them in a parent-child relationship. Add support for specifying
a parent PD, similarly to what has been done in the RPMhPD driver.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 337b1ad1cd3b..0c2d930ab38f 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -99,6 +99,7 @@ struct rpmpd_req {
struct rpmpd {
struct generic_pm_domain pd;
+ struct generic_pm_domain *parent;
struct rpmpd *peer;
const bool active_only;
unsigned int corner;
@@ -673,6 +674,15 @@ static int rpmpd_probe(struct platform_device *pdev)
data->domains[i] = &rpmpds[i]->pd;
}
+ /* Add subdomains */
+ for (i = 0; i < num; i++) {
+ if (!rpmpds[i])
+ continue;
+
+ if (rpmpds[i]->parent)
+ pm_genpd_add_subdomain(rpmpds[i]->parent, &rpmpds[i]->pd);
+ }
+
return of_genpd_add_provider_onecell(pdev->dev.of_node, data);
}
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
2023-01-25 3:27 ` [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 9:08 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Konrad Dybcio
` (5 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
Expand preprocessor macros into human-readable structs for easier
reference.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 839 +++++++++++++++++++++++++++++++++------
1 file changed, 722 insertions(+), 117 deletions(-)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 0c2d930ab38f..9a7da7cead9e 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -40,57 +40,6 @@
#define MAX_CORNER_RPMPD_STATE 6
-#define DEFINE_RPMPD_PAIR(_platform, _name, _active, r_type, r_key, \
- r_id) \
- static struct rpmpd _platform##_##_active; \
- static struct rpmpd _platform##_##_name = { \
- .pd = { .name = #_name, }, \
- .peer = &_platform##_##_active, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_##r_key, \
- }; \
- static struct rpmpd _platform##_##_active = { \
- .pd = { .name = #_active, }, \
- .peer = &_platform##_##_name, \
- .active_only = true, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_##r_key, \
- }
-
-#define DEFINE_RPMPD_CORNER(_platform, _name, r_type, r_id) \
- static struct rpmpd _platform##_##_name = { \
- .pd = { .name = #_name, }, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_CORNER, \
- }
-
-#define DEFINE_RPMPD_LEVEL(_platform, _name, r_type, r_id) \
- static struct rpmpd _platform##_##_name = { \
- .pd = { .name = #_name, }, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_LEVEL, \
- }
-
-#define DEFINE_RPMPD_VFC(_platform, _name, r_type, r_id) \
- static struct rpmpd _platform##_##_name = { \
- .pd = { .name = #_name, }, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_FLOOR_CORNER, \
- }
-
-#define DEFINE_RPMPD_VFL(_platform, _name, r_type, r_id) \
- static struct rpmpd _platform##_##_name = { \
- .pd = { .name = #_name, }, \
- .res_type = RPMPD_##r_type, \
- .res_id = r_id, \
- .key = KEY_FLOOR_LEVEL, \
- }
-
struct rpmpd_req {
__le32 key;
__le32 nbytes;
@@ -120,11 +69,56 @@ struct rpmpd_desc {
static DEFINE_MUTEX(rpmpd_lock);
/* mdm9607 RPM Power Domains */
-DEFINE_RPMPD_PAIR(mdm9607, vddcx, vddcx_ao, SMPA, LEVEL, 3);
-DEFINE_RPMPD_VFL(mdm9607, vddcx_vfl, SMPA, 3);
+static struct rpmpd mdm9607_vddcx_ao;
+static struct rpmpd mdm9607_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &mdm9607_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 3,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd mdm9607_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &mdm9607_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 3,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd mdm9607_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 3,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd mdm9607_vddmx_ao;
+static struct rpmpd mdm9607_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &mdm9607_vddmx_ao,
+ .res_type = RPMPD_LDOA,
+ .res_id = 12,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd mdm9607_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &mdm9607_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_LDOA,
+ .res_id = 12,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd mdm9607_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 12,
+ .key = KEY_FLOOR_LEVEL,
+};
-DEFINE_RPMPD_PAIR(mdm9607, vddmx, vddmx_ao, LDOA, LEVEL, 12);
-DEFINE_RPMPD_VFL(mdm9607, vddmx_vfl, LDOA, 12);
static struct rpmpd *mdm9607_rpmpds[] = {
[MDM9607_VDDCX] = &mdm9607_vddcx,
[MDM9607_VDDCX_AO] = &mdm9607_vddcx_ao,
@@ -141,8 +135,30 @@ static const struct rpmpd_desc mdm9607_desc = {
};
/* msm8226 RPM Power Domains */
-DEFINE_RPMPD_PAIR(msm8226, vddcx, vddcx_ao, SMPA, CORNER, 1);
-DEFINE_RPMPD_VFC(msm8226, vddcx_vfc, SMPA, 1);
+static struct rpmpd msm8226_vddcx_ao;
+static struct rpmpd msm8226_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8226_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8226_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8226_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8226_vddcx_vfc = {
+ .pd = { .name = "vddcx_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
+};
static struct rpmpd *msm8226_rpmpds[] = {
[MSM8226_VDDCX] = &msm8226_vddcx,
@@ -157,13 +173,73 @@ static const struct rpmpd_desc msm8226_desc = {
};
/* msm8939 RPM Power Domains */
-DEFINE_RPMPD_PAIR(msm8939, vddmd, vddmd_ao, SMPA, CORNER, 1);
-DEFINE_RPMPD_VFC(msm8939, vddmd_vfc, SMPA, 1);
+static struct rpmpd msm8939_vddmd_ao;
+static struct rpmpd msm8939_vddmd = {
+ .pd = { .name = "vddmd", },
+ .peer = &msm8939_vddmd_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8939_vddmd_ao = {
+ .pd = { .name = "vddmd_ao", },
+ .peer = &msm8939_vddmd,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8939_vddmd_vfc = {
+ .pd = { .name = "vddmd_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
+};
-DEFINE_RPMPD_PAIR(msm8939, vddcx, vddcx_ao, SMPA, CORNER, 2);
-DEFINE_RPMPD_VFC(msm8939, vddcx_vfc, SMPA, 2);
+static struct rpmpd msm8939_vddcx_ao;
+static struct rpmpd msm8939_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8939_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8939_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8939_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8939_vddcx_vfc = {
+ .pd = { .name = "vddcx_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_FLOOR_CORNER,
+};
-DEFINE_RPMPD_PAIR(msm8939, vddmx, vddmx_ao, LDOA, CORNER, 3);
+static struct rpmpd msm8939_vddmx_ao;
+static struct rpmpd msm8939_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8939_vddmx_ao,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8939_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8939_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
+};
static struct rpmpd *msm8939_rpmpds[] = {
[MSM8939_VDDMDCX] = &msm8939_vddmd,
@@ -183,10 +259,48 @@ static const struct rpmpd_desc msm8939_desc = {
};
/* msm8916 RPM Power Domains */
-DEFINE_RPMPD_PAIR(msm8916, vddcx, vddcx_ao, SMPA, CORNER, 1);
-DEFINE_RPMPD_PAIR(msm8916, vddmx, vddmx_ao, LDOA, CORNER, 3);
+static struct rpmpd msm8916_vddcx_ao;
+static struct rpmpd msm8916_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8916_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8916_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8916_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8916_vddmx_ao;
+static struct rpmpd msm8916_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8916_vddmx_ao,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
+};
-DEFINE_RPMPD_VFC(msm8916, vddcx_vfc, SMPA, 1);
+static struct rpmpd msm8916_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8916_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8916_vddcx_vfc = {
+ .pd = { .name = "vddcx_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
+};
static struct rpmpd *msm8916_rpmpds[] = {
[MSM8916_VDDCX] = &msm8916_vddcx,
@@ -203,11 +317,66 @@ static const struct rpmpd_desc msm8916_desc = {
};
/* msm8953 RPM Power Domains */
-DEFINE_RPMPD_PAIR(msm8953, vddmd, vddmd_ao, SMPA, LEVEL, 1);
-DEFINE_RPMPD_PAIR(msm8953, vddcx, vddcx_ao, SMPA, LEVEL, 2);
-DEFINE_RPMPD_PAIR(msm8953, vddmx, vddmx_ao, SMPA, LEVEL, 7);
+static struct rpmpd msm8953_vddmd_ao;
+static struct rpmpd msm8953_vddmd = {
+ .pd = { .name = "vddmd", },
+ .peer = &msm8953_vddmd_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_VFL(msm8953, vddcx_vfl, SMPA, 2);
+static struct rpmpd msm8953_vddmd_ao = {
+ .pd = { .name = "vddmd_ao", },
+ .peer = &msm8953_vddmd,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8953_vddcx_ao;
+static struct rpmpd msm8953_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8953_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8953_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8953_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8953_vddmx_ao;
+static struct rpmpd msm8953_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8953_vddmx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 7,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8953_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8953_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 7,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8953_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *msm8953_rpmpds[] = {
[MSM8953_VDDMD] = &msm8953_vddmd,
@@ -226,11 +395,55 @@ static const struct rpmpd_desc msm8953_desc = {
};
/* msm8976 RPM Power Domains */
-DEFINE_RPMPD_PAIR(msm8976, vddcx, vddcx_ao, SMPA, LEVEL, 2);
-DEFINE_RPMPD_PAIR(msm8976, vddmx, vddmx_ao, SMPA, LEVEL, 6);
+static struct rpmpd msm8976_vddcx_ao;
+static struct rpmpd msm8976_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8976_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_VFL(msm8976, vddcx_vfl, RWSC, 2);
-DEFINE_RPMPD_VFL(msm8976, vddmx_vfl, RWSM, 6);
+static struct rpmpd msm8976_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8976_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8976_vddmx_ao;
+static struct rpmpd msm8976_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8976_vddmx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 6,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8976_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8976_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 6,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8976_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_RWSC,
+ .res_id = 2,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd msm8976_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWSM,
+ .res_id = 6,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *msm8976_rpmpds[] = {
[MSM8976_VDDCX] = &msm8976_vddcx,
@@ -248,13 +461,63 @@ static const struct rpmpd_desc msm8976_desc = {
};
/* msm8994 RPM Power domains */
-DEFINE_RPMPD_PAIR(msm8994, vddcx, vddcx_ao, SMPA, CORNER, 1);
-DEFINE_RPMPD_PAIR(msm8994, vddmx, vddmx_ao, SMPA, CORNER, 2);
-/* Attention! *Some* 8994 boards with pm8004 may use SMPC here! */
-DEFINE_RPMPD_CORNER(msm8994, vddgfx, SMPB, 2);
+static struct rpmpd msm8994_vddcx_ao;
+static struct rpmpd msm8994_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8994_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8994_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8994_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
-DEFINE_RPMPD_VFC(msm8994, vddcx_vfc, SMPA, 1);
-DEFINE_RPMPD_VFC(msm8994, vddgfx_vfc, SMPB, 2);
+static struct rpmpd msm8994_vddmx_ao;
+static struct rpmpd msm8994_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8994_vddmx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8994_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8994_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8994_vddgfx = {
+ .pd = { .name = "vddgfx", },
+ /* SMPC if your board has a PM8004! */
+ .res_type = RPMPD_SMPB,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8994_vddcx_vfc = {
+ .pd = { .name = "vddcx_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
+};
+
+static struct rpmpd msm8994_vddgfx_vfc = {
+ .pd = { .name = "vddgfx_vfc", },
+ .res_type = RPMPD_SMPB,
+ .res_id = 2,
+ .key = KEY_FLOOR_CORNER,
+};
static struct rpmpd *msm8994_rpmpds[] = {
[MSM8994_VDDCX] = &msm8994_vddcx,
@@ -273,12 +536,62 @@ static const struct rpmpd_desc msm8994_desc = {
};
/* msm8996 RPM Power domains */
-DEFINE_RPMPD_PAIR(msm8996, vddcx, vddcx_ao, SMPA, CORNER, 1);
-DEFINE_RPMPD_PAIR(msm8996, vddmx, vddmx_ao, SMPA, CORNER, 2);
-DEFINE_RPMPD_CORNER(msm8996, vddsscx, LDOA, 26);
+static struct rpmpd msm8996_vddcx_ao;
+static struct rpmpd msm8996_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8996_vddcx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
-DEFINE_RPMPD_VFC(msm8996, vddcx_vfc, SMPA, 1);
-DEFINE_RPMPD_VFC(msm8996, vddsscx_vfc, LDOA, 26);
+static struct rpmpd msm8996_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8996_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8996_vddmx_ao;
+static struct rpmpd msm8996_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8996_vddmx_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8996_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8996_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 2,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8996_vddsscx = {
+ .pd = { .name = "vddsscx", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 26,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd msm8996_vddcx_vfc = {
+ .pd = { .name = "vddcx_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
+};
+
+static struct rpmpd msm8996_vddsscx_vfc = {
+ .pd = { .name = "vddsscx_vfc", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 26,
+ .key = KEY_FLOOR_CORNER,
+};
static struct rpmpd *msm8996_rpmpds[] = {
[MSM8996_VDDCX] = &msm8996_vddcx,
@@ -297,17 +610,83 @@ static const struct rpmpd_desc msm8996_desc = {
};
/* msm8998 RPM Power domains */
-DEFINE_RPMPD_PAIR(msm8998, vddcx, vddcx_ao, RWCX, LEVEL, 0);
-DEFINE_RPMPD_VFL(msm8998, vddcx_vfl, RWCX, 0);
+static struct rpmpd msm8998_vddcx_ao;
+static struct rpmpd msm8998_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &msm8998_vddcx_ao,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8998_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &msm8998_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8998_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
-DEFINE_RPMPD_PAIR(msm8998, vddmx, vddmx_ao, RWMX, LEVEL, 0);
-DEFINE_RPMPD_VFL(msm8998, vddmx_vfl, RWMX, 0);
+static struct rpmpd msm8998_vddmx_ao;
+static struct rpmpd msm8998_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &msm8998_vddmx_ao,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(msm8998, vdd_ssccx, RWSC, 0);
-DEFINE_RPMPD_VFL(msm8998, vdd_ssccx_vfl, RWSC, 0);
+static struct rpmpd msm8998_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &msm8998_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(msm8998, vdd_sscmx, RWSM, 0);
-DEFINE_RPMPD_VFL(msm8998, vdd_sscmx_vfl, RWSM, 0);
+static struct rpmpd msm8998_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd msm8998_vdd_ssccx = {
+ .pd = { .name = "vdd_ssccx", },
+ .res_type = RPMPD_RWSC,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8998_vdd_ssccx_vfl = {
+ .pd = { .name = "vdd_ssccx_vfl", },
+ .res_type = RPMPD_RWSC,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd msm8998_vdd_sscmx = {
+ .pd = { .name = "vdd_sscmx", },
+ .res_type = RPMPD_RWSM,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd msm8998_vdd_sscmx_vfl = {
+ .pd = { .name = "vdd_sscmx_vfl", },
+ .res_type = RPMPD_RWSM,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *msm8998_rpmpds[] = {
[MSM8998_VDDCX] = &msm8998_vddcx,
@@ -329,14 +708,58 @@ static const struct rpmpd_desc msm8998_desc = {
};
/* qcs404 RPM Power domains */
-DEFINE_RPMPD_PAIR(qcs404, vddmx, vddmx_ao, RWMX, LEVEL, 0);
-DEFINE_RPMPD_VFL(qcs404, vddmx_vfl, RWMX, 0);
+static struct rpmpd qcs404_vddmx_ao;
+static struct rpmpd qcs404_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &qcs404_vddmx_ao,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd qcs404_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &qcs404_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd qcs404_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd qcs404_vdd_lpicx = {
+ .pd = { .name = "vdd_lpicx", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd qcs404_vdd_lpicx_vfl = {
+ .pd = { .name = "vdd_lpicx_vfl", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(qcs404, vdd_lpicx, RWLC, 0);
-DEFINE_RPMPD_VFL(qcs404, vdd_lpicx_vfl, RWLC, 0);
+static struct rpmpd qcs404_vdd_lpimx = {
+ .pd = { .name = "vdd_lpimx", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(qcs404, vdd_lpimx, RWLM, 0);
-DEFINE_RPMPD_VFL(qcs404, vdd_lpimx_vfl, RWLM, 0);
+static struct rpmpd qcs404_vdd_lpimx_vfl = {
+ .pd = { .name = "vdd_lpimx_vfl", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *qcs404_rpmpds[] = {
[QCS404_VDDMX] = &qcs404_vddmx,
@@ -355,17 +778,83 @@ static const struct rpmpd_desc qcs404_desc = {
};
/* sdm660 RPM Power domains */
-DEFINE_RPMPD_PAIR(sdm660, vddcx, vddcx_ao, RWCX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sdm660, vddcx_vfl, RWCX, 0);
+static struct rpmpd sdm660_vddcx_ao;
+static struct rpmpd sdm660_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &sdm660_vddcx_ao,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_PAIR(sdm660, vddmx, vddmx_ao, RWMX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sdm660, vddmx_vfl, RWMX, 0);
+static struct rpmpd sdm660_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &sdm660_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(sdm660, vdd_ssccx, RWLC, 0);
-DEFINE_RPMPD_VFL(sdm660, vdd_ssccx_vfl, RWLC, 0);
+static struct rpmpd sdm660_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(sdm660, vdd_sscmx, RWLM, 0);
-DEFINE_RPMPD_VFL(sdm660, vdd_sscmx_vfl, RWLM, 0);
+static struct rpmpd sdm660_vddmx_ao;
+static struct rpmpd sdm660_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &sdm660_vddmx_ao,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sdm660_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &sdm660_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sdm660_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd sdm660_vdd_ssccx = {
+ .pd = { .name = "vdd_ssccx", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sdm660_vdd_ssccx_vfl = {
+ .pd = { .name = "vdd_ssccx_vfl", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd sdm660_vdd_sscmx = {
+ .pd = { .name = "vdd_sscmx", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sdm660_vdd_sscmx_vfl = {
+ .pd = { .name = "vdd_sscmx_vfl", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *sdm660_rpmpds[] = {
[SDM660_VDDCX] = &sdm660_vddcx,
@@ -387,14 +876,69 @@ static const struct rpmpd_desc sdm660_desc = {
};
/* sm4250/6115 RPM Power domains */
-DEFINE_RPMPD_PAIR(sm6115, vddcx, vddcx_ao, RWCX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sm6115, vddcx_vfl, RWCX, 0);
+static struct rpmpd sm6115_vddcx_ao;
+static struct rpmpd sm6115_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &sm6115_vddcx_ao,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6115_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &sm6115_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6115_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd sm6115_vddmx_ao;
+static struct rpmpd sm6115_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &sm6115_vddmx_ao,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_PAIR(sm6115, vddmx, vddmx_ao, RWMX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sm6115, vddmx_vfl, RWMX, 0);
+static struct rpmpd sm6115_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &sm6115_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6115_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd sm6115_vdd_lpi_cx = {
+ .pd = { .name = "vdd_lpi_cx", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_cx, RWLC, 0);
-DEFINE_RPMPD_LEVEL(sm6115, vdd_lpi_mx, RWLM, 0);
+static struct rpmpd sm6115_vdd_lpi_mx = {
+ .pd = { .name = "vdd_lpi_mx", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
static struct rpmpd *sm6115_rpmpds[] = {
[SM6115_VDDCX] = &sm6115_vddcx,
@@ -414,11 +958,55 @@ static const struct rpmpd_desc sm6115_desc = {
};
/* sm6125 RPM Power domains */
-DEFINE_RPMPD_PAIR(sm6125, vddcx, vddcx_ao, RWCX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sm6125, vddcx_vfl, RWCX, 0);
+static struct rpmpd sm6125_vddcx_ao;
+static struct rpmpd sm6125_vddcx = {
+ .pd = { .name = "vddcx", },
+ .peer = &sm6125_vddcx_ao,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6125_vddcx_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &sm6125_vddcx,
+ .active_only = true,
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6125_vddcx_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_RWCX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd sm6125_vddmx_ao;
+static struct rpmpd sm6125_vddmx = {
+ .pd = { .name = "vddmx", },
+ .peer = &sm6125_vddmx_ao,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6125_vddmx_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &sm6125_vddmx,
+ .active_only = true,
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
-DEFINE_RPMPD_PAIR(sm6125, vddmx, vddmx_ao, RWMX, LEVEL, 0);
-DEFINE_RPMPD_VFL(sm6125, vddmx_vfl, RWMX, 0);
+static struct rpmpd sm6125_vddmx_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_RWMX,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
static struct rpmpd *sm6125_rpmpds[] = {
[SM6125_VDDCX] = &sm6125_vddcx,
@@ -435,7 +1023,24 @@ static const struct rpmpd_desc sm6125_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-DEFINE_RPMPD_PAIR(sm6375, vddgx, vddgx_ao, RWGX, LEVEL, 0);
+static struct rpmpd sm6375_vddgx_ao;
+static struct rpmpd sm6375_vddgx = {
+ .pd = { .name = "vddgx", },
+ .peer = &sm6375_vddgx_ao,
+ .res_type = RPMPD_RWGX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd sm6375_vddgx_ao = {
+ .pd = { .name = "vddgx_ao", },
+ .peer = &sm6375_vddgx,
+ .active_only = true,
+ .res_type = RPMPD_RWGX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
static struct rpmpd *sm6375_rpmpds[] = {
[SM6375_VDDCX] = &sm6125_vddcx,
[SM6375_VDDCX_AO] = &sm6125_vddcx_ao,
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
2023-01-25 3:27 ` [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support Konrad Dybcio
2023-01-25 3:27 ` [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 9:07 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Konrad Dybcio
` (4 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
The GPU core clock requires that both VDDGX and VDDMX domains are scaled
at the same rate at the same time (well, MX just before GX but you get
the idea). Set MX as parent of GX to take care of that.
Suggested-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 9a7da7cead9e..a69182618b76 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -1027,6 +1027,7 @@ static struct rpmpd sm6375_vddgx_ao;
static struct rpmpd sm6375_vddgx = {
.pd = { .name = "vddgx", },
.peer = &sm6375_vddgx_ao,
+ .parent = &sm6125_vddmx.pd,
.res_type = RPMPD_RWGX,
.res_id = 0,
.key = KEY_LEVEL,
@@ -1035,6 +1036,7 @@ static struct rpmpd sm6375_vddgx = {
static struct rpmpd sm6375_vddgx_ao = {
.pd = { .name = "vddgx_ao", },
.peer = &sm6375_vddgx,
+ .parent = &sm6125_vddmx_ao.pd,
.active_only = true,
.res_type = RPMPD_RWGX,
.res_id = 0,
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
` (2 preceding siblings ...)
2023-01-25 3:27 ` [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 9:02 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments Konrad Dybcio
` (3 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
SoC names were used only to distinguish between defines. That made
reusing them messy and often times, the same RPM power domains were
defined multiple times. Assign descriptive, SoC-independent names to
each RPMPD description struct and remove duplicate definitions.
Bloat-o-meter results:
Total: Before=133713, After=74201, chg -44.51%
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 763 +++++++++++----------------------------
1 file changed, 205 insertions(+), 558 deletions(-)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index a69182618b76..9fff40527f9e 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -69,50 +69,50 @@ struct rpmpd_desc {
static DEFINE_MUTEX(rpmpd_lock);
/* mdm9607 RPM Power Domains */
-static struct rpmpd mdm9607_vddcx_ao;
-static struct rpmpd mdm9607_vddcx = {
+static struct rpmpd cx_s3a_lvl_ao;
+static struct rpmpd cx_s3a_lvl = {
.pd = { .name = "vddcx", },
- .peer = &mdm9607_vddcx_ao,
+ .peer = &cx_s3a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 3,
.key = KEY_LEVEL,
};
-static struct rpmpd mdm9607_vddcx_ao = {
+static struct rpmpd cx_s3a_lvl_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &mdm9607_vddcx,
+ .peer = &cx_s3a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 3,
.key = KEY_LEVEL,
};
-static struct rpmpd mdm9607_vddcx_vfl = {
+static struct rpmpd cx_s3a_lvl_vfl = {
.pd = { .name = "vddcx_vfl", },
.res_type = RPMPD_SMPA,
.res_id = 3,
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd mdm9607_vddmx_ao;
-static struct rpmpd mdm9607_vddmx = {
+static struct rpmpd mx_l12a_lvl_ao;
+static struct rpmpd mx_l12a_lvl = {
.pd = { .name = "vddmx", },
- .peer = &mdm9607_vddmx_ao,
+ .peer = &mx_l12a_lvl_ao,
.res_type = RPMPD_LDOA,
.res_id = 12,
.key = KEY_LEVEL,
};
-static struct rpmpd mdm9607_vddmx_ao = {
+static struct rpmpd mx_l12a_lvl_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &mdm9607_vddmx,
+ .peer = &mx_l12a_lvl,
.active_only = true,
.res_type = RPMPD_LDOA,
.res_id = 12,
.key = KEY_LEVEL,
};
-static struct rpmpd mdm9607_vddmx_vfl = {
+static struct rpmpd mx_l12a_lvl_vfl = {
.pd = { .name = "vddmx_vfl", },
.res_type = RPMPD_LDOA,
.res_id = 12,
@@ -120,12 +120,12 @@ static struct rpmpd mdm9607_vddmx_vfl = {
};
static struct rpmpd *mdm9607_rpmpds[] = {
- [MDM9607_VDDCX] = &mdm9607_vddcx,
- [MDM9607_VDDCX_AO] = &mdm9607_vddcx_ao,
- [MDM9607_VDDCX_VFL] = &mdm9607_vddcx_vfl,
- [MDM9607_VDDMX] = &mdm9607_vddmx,
- [MDM9607_VDDMX_AO] = &mdm9607_vddmx_ao,
- [MDM9607_VDDMX_VFL] = &mdm9607_vddmx_vfl,
+ [MDM9607_VDDCX] = &cx_s3a_lvl,
+ [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao,
+ [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl,
+ [MDM9607_VDDMX] = &mx_l12a_lvl,
+ [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao,
+ [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl,
};
static const struct rpmpd_desc mdm9607_desc = {
@@ -135,25 +135,25 @@ static const struct rpmpd_desc mdm9607_desc = {
};
/* msm8226 RPM Power Domains */
-static struct rpmpd msm8226_vddcx_ao;
-static struct rpmpd msm8226_vddcx = {
+static struct rpmpd cx_s1a_corner_ao;
+static struct rpmpd cx_s1a_corner = {
.pd = { .name = "vddcx", },
- .peer = &msm8226_vddcx_ao,
+ .peer = &cx_s1a_corner_ao,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_CORNER,
};
-static struct rpmpd msm8226_vddcx_ao = {
+static struct rpmpd cx_s1a_corner_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &msm8226_vddcx,
+ .peer = &cx_s1a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_CORNER,
};
-static struct rpmpd msm8226_vddcx_vfc = {
+static struct rpmpd cx_s1a_corner_vfc = {
.pd = { .name = "vddcx_vfc", },
.res_type = RPMPD_SMPA,
.res_id = 1,
@@ -161,9 +161,9 @@ static struct rpmpd msm8226_vddcx_vfc = {
};
static struct rpmpd *msm8226_rpmpds[] = {
- [MSM8226_VDDCX] = &msm8226_vddcx,
- [MSM8226_VDDCX_AO] = &msm8226_vddcx_ao,
- [MSM8226_VDDCX_VFC] = &msm8226_vddcx_vfc,
+ [MSM8226_VDDCX] = &cx_s1a_corner,
+ [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc,
};
static const struct rpmpd_desc msm8226_desc = {
@@ -173,68 +173,68 @@ static const struct rpmpd_desc msm8226_desc = {
};
/* msm8939 RPM Power Domains */
-static struct rpmpd msm8939_vddmd_ao;
-static struct rpmpd msm8939_vddmd = {
+static struct rpmpd md_s1a_corner_ao;
+static struct rpmpd md_s1a_corner = {
.pd = { .name = "vddmd", },
- .peer = &msm8939_vddmd_ao,
+ .peer = &md_s1a_corner_ao,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_CORNER,
};
-static struct rpmpd msm8939_vddmd_ao = {
+static struct rpmpd md_s1a_corner_ao = {
.pd = { .name = "vddmd_ao", },
- .peer = &msm8939_vddmd,
+ .peer = &md_s1a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_CORNER,
};
-static struct rpmpd msm8939_vddmd_vfc = {
+static struct rpmpd md_s1a_corner_vfc = {
.pd = { .name = "vddmd_vfc", },
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_FLOOR_CORNER,
};
-static struct rpmpd msm8939_vddcx_ao;
-static struct rpmpd msm8939_vddcx = {
+static struct rpmpd cx_s2a_corner_ao;
+static struct rpmpd cx_s2a_corner = {
.pd = { .name = "vddcx", },
- .peer = &msm8939_vddcx_ao,
+ .peer = &cx_s2a_corner_ao,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd msm8939_vddcx_ao = {
+static struct rpmpd cx_s2a_corner_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &msm8939_vddcx,
+ .peer = &cx_s2a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd msm8939_vddcx_vfc = {
+static struct rpmpd cx_s2a_corner_vfc = {
.pd = { .name = "vddcx_vfc", },
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_FLOOR_CORNER,
};
-static struct rpmpd msm8939_vddmx_ao;
-static struct rpmpd msm8939_vddmx = {
+static struct rpmpd mx_l3a_corner_ao;
+static struct rpmpd mx_l3a_corner = {
.pd = { .name = "vddmx", },
- .peer = &msm8939_vddmx_ao,
+ .peer = &mx_l3a_corner_ao,
.res_type = RPMPD_LDOA,
.res_id = 3,
.key = KEY_CORNER,
};
-static struct rpmpd msm8939_vddmx_ao = {
+static struct rpmpd mx_l3a_corner_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &msm8939_vddmx,
+ .peer = &mx_l3a_corner,
.active_only = true,
.res_type = RPMPD_LDOA,
.res_id = 3,
@@ -242,14 +242,14 @@ static struct rpmpd msm8939_vddmx_ao = {
};
static struct rpmpd *msm8939_rpmpds[] = {
- [MSM8939_VDDMDCX] = &msm8939_vddmd,
- [MSM8939_VDDMDCX_AO] = &msm8939_vddmd_ao,
- [MSM8939_VDDMDCX_VFC] = &msm8939_vddmd_vfc,
- [MSM8939_VDDCX] = &msm8939_vddcx,
- [MSM8939_VDDCX_AO] = &msm8939_vddcx_ao,
- [MSM8939_VDDCX_VFC] = &msm8939_vddcx_vfc,
- [MSM8939_VDDMX] = &msm8939_vddmx,
- [MSM8939_VDDMX_AO] = &msm8939_vddmx_ao,
+ [MSM8939_VDDMDCX] = &md_s1a_corner,
+ [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao,
+ [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc,
+ [MSM8939_VDDCX] = &cx_s2a_corner,
+ [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao,
+ [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc,
+ [MSM8939_VDDMX] = &mx_l3a_corner,
+ [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao,
};
static const struct rpmpd_desc msm8939_desc = {
@@ -259,55 +259,12 @@ static const struct rpmpd_desc msm8939_desc = {
};
/* msm8916 RPM Power Domains */
-static struct rpmpd msm8916_vddcx_ao;
-static struct rpmpd msm8916_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &msm8916_vddcx_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8916_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &msm8916_vddcx,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8916_vddmx_ao;
-static struct rpmpd msm8916_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &msm8916_vddmx_ao,
- .res_type = RPMPD_LDOA,
- .res_id = 3,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8916_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &msm8916_vddmx,
- .active_only = true,
- .res_type = RPMPD_LDOA,
- .res_id = 3,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8916_vddcx_vfc = {
- .pd = { .name = "vddcx_vfc", },
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_FLOOR_CORNER,
-};
-
static struct rpmpd *msm8916_rpmpds[] = {
- [MSM8916_VDDCX] = &msm8916_vddcx,
- [MSM8916_VDDCX_AO] = &msm8916_vddcx_ao,
- [MSM8916_VDDCX_VFC] = &msm8916_vddcx_vfc,
- [MSM8916_VDDMX] = &msm8916_vddmx,
- [MSM8916_VDDMX_AO] = &msm8916_vddmx_ao,
+ [MSM8916_VDDCX] = &cx_s1a_corner,
+ [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8916_VDDMX] = &mx_l3a_corner,
+ [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao,
};
static const struct rpmpd_desc msm8916_desc = {
@@ -317,61 +274,61 @@ static const struct rpmpd_desc msm8916_desc = {
};
/* msm8953 RPM Power Domains */
-static struct rpmpd msm8953_vddmd_ao;
-static struct rpmpd msm8953_vddmd = {
+static struct rpmpd md_s1a_lvl_ao;
+static struct rpmpd md_s1a_lvl = {
.pd = { .name = "vddmd", },
- .peer = &msm8953_vddmd_ao,
+ .peer = &md_s1a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddmd_ao = {
+static struct rpmpd md_s1a_lvl_ao = {
.pd = { .name = "vddmd_ao", },
- .peer = &msm8953_vddmd,
+ .peer = &md_s1a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 1,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddcx_ao;
-static struct rpmpd msm8953_vddcx = {
+static struct rpmpd cx_s2a_lvl_ao;
+static struct rpmpd cx_s2a_lvl = {
.pd = { .name = "vddcx", },
- .peer = &msm8953_vddcx_ao,
+ .peer = &cx_s2a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddcx_ao = {
+static struct rpmpd cx_s2a_lvl_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &msm8953_vddcx,
+ .peer = &cx_s2a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddmx_ao;
-static struct rpmpd msm8953_vddmx = {
+static struct rpmpd mx_s7a_lvl_ao;
+static struct rpmpd mx_s7a_lvl = {
.pd = { .name = "vddmx", },
- .peer = &msm8953_vddmx_ao,
+ .peer = &mx_s7a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 7,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddmx_ao = {
+static struct rpmpd mx_s7a_lvl_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &msm8953_vddmx,
+ .peer = &mx_s7a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 7,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8953_vddcx_vfl = {
+static struct rpmpd cx_s2a_lvl_vfl = {
.pd = { .name = "vddcx_vfl", },
.res_type = RPMPD_SMPA,
.res_id = 2,
@@ -379,13 +336,13 @@ static struct rpmpd msm8953_vddcx_vfl = {
};
static struct rpmpd *msm8953_rpmpds[] = {
- [MSM8953_VDDMD] = &msm8953_vddmd,
- [MSM8953_VDDMD_AO] = &msm8953_vddmd_ao,
- [MSM8953_VDDCX] = &msm8953_vddcx,
- [MSM8953_VDDCX_AO] = &msm8953_vddcx_ao,
- [MSM8953_VDDCX_VFL] = &msm8953_vddcx_vfl,
- [MSM8953_VDDMX] = &msm8953_vddmx,
- [MSM8953_VDDMX_AO] = &msm8953_vddmx_ao,
+ [MSM8953_VDDMD] = &md_s1a_lvl,
+ [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
+ [MSM8953_VDDCX] = &cx_s2a_lvl,
+ [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8953_VDDMX] = &mx_s7a_lvl,
+ [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao,
};
static const struct rpmpd_desc msm8953_desc = {
@@ -395,50 +352,25 @@ static const struct rpmpd_desc msm8953_desc = {
};
/* msm8976 RPM Power Domains */
-static struct rpmpd msm8976_vddcx_ao;
-static struct rpmpd msm8976_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &msm8976_vddcx_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd msm8976_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &msm8976_vddcx,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd msm8976_vddmx_ao;
-static struct rpmpd msm8976_vddmx = {
+static struct rpmpd mx_s6a_lvl_ao;
+static struct rpmpd mx_s6a_lvl = {
.pd = { .name = "vddmx", },
- .peer = &msm8976_vddmx_ao,
+ .peer = &mx_s6a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 6,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8976_vddmx_ao = {
+static struct rpmpd mx_s6a_lvl_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &msm8976_vddmx,
+ .peer = &mx_s6a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 6,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8976_vddcx_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_RWSC,
- .res_id = 2,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd msm8976_vddmx_vfl = {
+static struct rpmpd mx_s6a_lvl_vfl = {
.pd = { .name = "vddmx_vfl", },
.res_type = RPMPD_RWSM,
.res_id = 6,
@@ -446,12 +378,12 @@ static struct rpmpd msm8976_vddmx_vfl = {
};
static struct rpmpd *msm8976_rpmpds[] = {
- [MSM8976_VDDCX] = &msm8976_vddcx,
- [MSM8976_VDDCX_AO] = &msm8976_vddcx_ao,
- [MSM8976_VDDCX_VFL] = &msm8976_vddcx_vfl,
- [MSM8976_VDDMX] = &msm8976_vddmx,
- [MSM8976_VDDMX_AO] = &msm8976_vddmx_ao,
- [MSM8976_VDDMX_VFL] = &msm8976_vddmx_vfl,
+ [MSM8976_VDDCX] = &cx_s2a_lvl,
+ [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8976_VDDMX] = &mx_s6a_lvl,
+ [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao,
+ [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl,
};
static const struct rpmpd_desc msm8976_desc = {
@@ -461,43 +393,25 @@ static const struct rpmpd_desc msm8976_desc = {
};
/* msm8994 RPM Power domains */
-static struct rpmpd msm8994_vddcx_ao;
-static struct rpmpd msm8994_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &msm8994_vddcx_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8994_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &msm8994_vddcx,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8994_vddmx_ao;
-static struct rpmpd msm8994_vddmx = {
+static struct rpmpd mx_s2a_corner_ao;
+static struct rpmpd mx_s2a_corner = {
.pd = { .name = "vddmx", },
- .peer = &msm8994_vddmx_ao,
+ .peer = &mx_s2a_corner_ao,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd msm8994_vddmx_ao = {
+static struct rpmpd mx_s2a_corner_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &msm8994_vddmx,
+ .peer = &mx_s2a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd msm8994_vddgfx = {
+static struct rpmpd gfx_s2b_corner = {
.pd = { .name = "vddgfx", },
/* SMPC if your board has a PM8004! */
.res_type = RPMPD_SMPB,
@@ -505,14 +419,7 @@ static struct rpmpd msm8994_vddgfx = {
.key = KEY_CORNER,
};
-static struct rpmpd msm8994_vddcx_vfc = {
- .pd = { .name = "vddcx_vfc", },
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_FLOOR_CORNER,
-};
-
-static struct rpmpd msm8994_vddgfx_vfc = {
+static struct rpmpd gfx_s2b_corner_vfc = {
.pd = { .name = "vddgfx_vfc", },
.res_type = RPMPD_SMPB,
.res_id = 2,
@@ -520,13 +427,13 @@ static struct rpmpd msm8994_vddgfx_vfc = {
};
static struct rpmpd *msm8994_rpmpds[] = {
- [MSM8994_VDDCX] = &msm8994_vddcx,
- [MSM8994_VDDCX_AO] = &msm8994_vddcx_ao,
- [MSM8994_VDDCX_VFC] = &msm8994_vddcx_vfc,
- [MSM8994_VDDMX] = &msm8994_vddmx,
- [MSM8994_VDDMX_AO] = &msm8994_vddmx_ao,
- [MSM8994_VDDGFX] = &msm8994_vddgfx,
- [MSM8994_VDDGFX_VFC] = &msm8994_vddgfx_vfc,
+ [MSM8994_VDDCX] = &cx_s1a_corner,
+ [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8994_VDDMX] = &mx_s2a_corner,
+ [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8994_VDDGFX] = &gfx_s2b_corner,
+ [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc,
};
static const struct rpmpd_desc msm8994_desc = {
@@ -536,57 +443,14 @@ static const struct rpmpd_desc msm8994_desc = {
};
/* msm8996 RPM Power domains */
-static struct rpmpd msm8996_vddcx_ao;
-static struct rpmpd msm8996_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &msm8996_vddcx_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8996_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &msm8996_vddcx,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8996_vddmx_ao;
-static struct rpmpd msm8996_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &msm8996_vddmx_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8996_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &msm8996_vddmx,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd msm8996_vddsscx = {
+static struct rpmpd sscx_l26a_corner = {
.pd = { .name = "vddsscx", },
.res_type = RPMPD_LDOA,
.res_id = 26,
.key = KEY_CORNER,
};
-static struct rpmpd msm8996_vddcx_vfc = {
- .pd = { .name = "vddcx_vfc", },
- .res_type = RPMPD_SMPA,
- .res_id = 1,
- .key = KEY_FLOOR_CORNER,
-};
-
-static struct rpmpd msm8996_vddsscx_vfc = {
+static struct rpmpd sscx_l26a_corner_vfc = {
.pd = { .name = "vddsscx_vfc", },
.res_type = RPMPD_LDOA,
.res_id = 26,
@@ -594,13 +458,13 @@ static struct rpmpd msm8996_vddsscx_vfc = {
};
static struct rpmpd *msm8996_rpmpds[] = {
- [MSM8996_VDDCX] = &msm8996_vddcx,
- [MSM8996_VDDCX_AO] = &msm8996_vddcx_ao,
- [MSM8996_VDDCX_VFC] = &msm8996_vddcx_vfc,
- [MSM8996_VDDMX] = &msm8996_vddmx,
- [MSM8996_VDDMX_AO] = &msm8996_vddmx_ao,
- [MSM8996_VDDSSCX] = &msm8996_vddsscx,
- [MSM8996_VDDSSCX_VFC] = &msm8996_vddsscx_vfc,
+ [MSM8996_VDDCX] = &cx_s1a_corner,
+ [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8996_VDDMX] = &mx_s2a_corner,
+ [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8996_VDDSSCX] = &sscx_l26a_corner,
+ [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc,
};
static const struct rpmpd_desc msm8996_desc = {
@@ -610,78 +474,78 @@ static const struct rpmpd_desc msm8996_desc = {
};
/* msm8998 RPM Power domains */
-static struct rpmpd msm8998_vddcx_ao;
-static struct rpmpd msm8998_vddcx = {
+static struct rpmpd rwcx0_lvl_ao;
+static struct rpmpd rwcx0_lvl = {
.pd = { .name = "vddcx", },
- .peer = &msm8998_vddcx_ao,
+ .peer = &rwcx0_lvl_ao,
.res_type = RPMPD_RWCX,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vddcx_ao = {
+static struct rpmpd rwcx0_lvl_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &msm8998_vddcx,
+ .peer = &rwcx0_lvl,
.active_only = true,
.res_type = RPMPD_RWCX,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vddcx_vfl = {
+static struct rpmpd rwcx0_lvl_vfl = {
.pd = { .name = "vddcx_vfl", },
.res_type = RPMPD_RWCX,
.res_id = 0,
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd msm8998_vddmx_ao;
-static struct rpmpd msm8998_vddmx = {
+static struct rpmpd rwmx0_lvl_ao;
+static struct rpmpd rwmx0_lvl = {
.pd = { .name = "vddmx", },
- .peer = &msm8998_vddmx_ao,
+ .peer = &rwmx0_lvl_ao,
.res_type = RPMPD_RWMX,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vddmx_ao = {
+static struct rpmpd rwmx0_lvl_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &msm8998_vddmx,
+ .peer = &rwmx0_lvl,
.active_only = true,
.res_type = RPMPD_RWMX,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vddmx_vfl = {
+static struct rpmpd rwmx0_lvl_vfl = {
.pd = { .name = "vddmx_vfl", },
.res_type = RPMPD_RWMX,
.res_id = 0,
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd msm8998_vdd_ssccx = {
+static struct rpmpd rwsc0_lvl = {
.pd = { .name = "vdd_ssccx", },
.res_type = RPMPD_RWSC,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vdd_ssccx_vfl = {
+static struct rpmpd rwsc0_lvl_vfl = {
.pd = { .name = "vdd_ssccx_vfl", },
.res_type = RPMPD_RWSC,
.res_id = 0,
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd msm8998_vdd_sscmx = {
+static struct rpmpd rwsm0_lvl = {
.pd = { .name = "vdd_sscmx", },
.res_type = RPMPD_RWSM,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd msm8998_vdd_sscmx_vfl = {
+static struct rpmpd rwsm0_lvl_vfl = {
.pd = { .name = "vdd_sscmx_vfl", },
.res_type = RPMPD_RWSM,
.res_id = 0,
@@ -689,16 +553,16 @@ static struct rpmpd msm8998_vdd_sscmx_vfl = {
};
static struct rpmpd *msm8998_rpmpds[] = {
- [MSM8998_VDDCX] = &msm8998_vddcx,
- [MSM8998_VDDCX_AO] = &msm8998_vddcx_ao,
- [MSM8998_VDDCX_VFL] = &msm8998_vddcx_vfl,
- [MSM8998_VDDMX] = &msm8998_vddmx,
- [MSM8998_VDDMX_AO] = &msm8998_vddmx_ao,
- [MSM8998_VDDMX_VFL] = &msm8998_vddmx_vfl,
- [MSM8998_SSCCX] = &msm8998_vdd_ssccx,
- [MSM8998_SSCCX_VFL] = &msm8998_vdd_ssccx_vfl,
- [MSM8998_SSCMX] = &msm8998_vdd_sscmx,
- [MSM8998_SSCMX_VFL] = &msm8998_vdd_sscmx_vfl,
+ [MSM8998_VDDCX] = &rwcx0_lvl,
+ [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao,
+ [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [MSM8998_VDDMX] = &rwmx0_lvl,
+ [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao,
+ [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [MSM8998_SSCCX] = &rwsc0_lvl,
+ [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl,
+ [MSM8998_SSCMX] = &rwsm0_lvl,
+ [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl,
};
static const struct rpmpd_desc msm8998_desc = {
@@ -708,53 +572,28 @@ static const struct rpmpd_desc msm8998_desc = {
};
/* qcs404 RPM Power domains */
-static struct rpmpd qcs404_vddmx_ao;
-static struct rpmpd qcs404_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &qcs404_vddmx_ao,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd qcs404_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &qcs404_vddmx,
- .active_only = true,
- .res_type = RPMPD_RWMX,
+static struct rpmpd rwlc0_lvl = {
+ .pd = { .name = "vdd_lpi_cx", },
+ .res_type = RPMPD_RWLC,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd qcs404_vddmx_vfl = {
- .pd = { .name = "vddmx_vfl", },
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd qcs404_vdd_lpicx = {
- .pd = { .name = "vdd_lpicx", },
- .res_type = RPMPD_RWLC,
+static struct rpmpd rwlm0_lvl = {
+ .pd = { .name = "vdd_lpi_mx", },
+ .res_type = RPMPD_RWLM,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd qcs404_vdd_lpicx_vfl = {
+static struct rpmpd rwlc0_lvl_vfl = {
.pd = { .name = "vdd_lpicx_vfl", },
.res_type = RPMPD_RWLC,
.res_id = 0,
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd qcs404_vdd_lpimx = {
- .pd = { .name = "vdd_lpimx", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd qcs404_vdd_lpimx_vfl = {
+static struct rpmpd rwlm0_lvl_vfl = {
.pd = { .name = "vdd_lpimx_vfl", },
.res_type = RPMPD_RWLM,
.res_id = 0,
@@ -762,13 +601,13 @@ static struct rpmpd qcs404_vdd_lpimx_vfl = {
};
static struct rpmpd *qcs404_rpmpds[] = {
- [QCS404_VDDMX] = &qcs404_vddmx,
- [QCS404_VDDMX_AO] = &qcs404_vddmx_ao,
- [QCS404_VDDMX_VFL] = &qcs404_vddmx_vfl,
- [QCS404_LPICX] = &qcs404_vdd_lpicx,
- [QCS404_LPICX_VFL] = &qcs404_vdd_lpicx_vfl,
- [QCS404_LPIMX] = &qcs404_vdd_lpimx,
- [QCS404_LPIMX_VFL] = &qcs404_vdd_lpimx_vfl,
+ [QCS404_VDDMX] = &rwmx0_lvl,
+ [QCS404_VDDMX_AO] = &rwmx0_lvl_ao,
+ [QCS404_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [QCS404_LPICX] = &rwlc0_lvl,
+ [QCS404_LPICX_VFL] = &rwlc0_lvl_vfl,
+ [QCS404_LPIMX] = &rwlm0_lvl,
+ [QCS404_LPIMX_VFL] = &rwlm0_lvl_vfl,
};
static const struct rpmpd_desc qcs404_desc = {
@@ -778,95 +617,17 @@ static const struct rpmpd_desc qcs404_desc = {
};
/* sdm660 RPM Power domains */
-static struct rpmpd sdm660_vddcx_ao;
-static struct rpmpd sdm660_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &sdm660_vddcx_ao,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &sdm660_vddcx,
- .active_only = true,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vddcx_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sdm660_vddmx_ao;
-static struct rpmpd sdm660_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &sdm660_vddmx_ao,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &sdm660_vddmx,
- .active_only = true,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vddmx_vfl = {
- .pd = { .name = "vddmx_vfl", },
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sdm660_vdd_ssccx = {
- .pd = { .name = "vdd_ssccx", },
- .res_type = RPMPD_RWLC,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vdd_ssccx_vfl = {
- .pd = { .name = "vdd_ssccx_vfl", },
- .res_type = RPMPD_RWLC,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sdm660_vdd_sscmx = {
- .pd = { .name = "vdd_sscmx", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sdm660_vdd_sscmx_vfl = {
- .pd = { .name = "vdd_sscmx_vfl", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
static struct rpmpd *sdm660_rpmpds[] = {
- [SDM660_VDDCX] = &sdm660_vddcx,
- [SDM660_VDDCX_AO] = &sdm660_vddcx_ao,
- [SDM660_VDDCX_VFL] = &sdm660_vddcx_vfl,
- [SDM660_VDDMX] = &sdm660_vddmx,
- [SDM660_VDDMX_AO] = &sdm660_vddmx_ao,
- [SDM660_VDDMX_VFL] = &sdm660_vddmx_vfl,
- [SDM660_SSCCX] = &sdm660_vdd_ssccx,
- [SDM660_SSCCX_VFL] = &sdm660_vdd_ssccx_vfl,
- [SDM660_SSCMX] = &sdm660_vdd_sscmx,
- [SDM660_SSCMX_VFL] = &sdm660_vdd_sscmx_vfl,
+ [SDM660_VDDCX] = &rwcx0_lvl,
+ [SDM660_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SDM660_VDDMX] = &rwmx0_lvl,
+ [SDM660_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SDM660_SSCCX] = &rwlc0_lvl,
+ [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl,
+ [SDM660_SSCMX] = &rwlm0_lvl,
+ [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl,
};
static const struct rpmpd_desc sdm660_desc = {
@@ -876,79 +637,15 @@ static const struct rpmpd_desc sdm660_desc = {
};
/* sm4250/6115 RPM Power domains */
-static struct rpmpd sm6115_vddcx_ao;
-static struct rpmpd sm6115_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &sm6115_vddcx_ao,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6115_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &sm6115_vddcx,
- .active_only = true,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6115_vddcx_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sm6115_vddmx_ao;
-static struct rpmpd sm6115_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &sm6115_vddmx_ao,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6115_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &sm6115_vddmx,
- .active_only = true,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6115_vddmx_vfl = {
- .pd = { .name = "vddmx_vfl", },
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sm6115_vdd_lpi_cx = {
- .pd = { .name = "vdd_lpi_cx", },
- .res_type = RPMPD_RWLC,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6115_vdd_lpi_mx = {
- .pd = { .name = "vdd_lpi_mx", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
static struct rpmpd *sm6115_rpmpds[] = {
- [SM6115_VDDCX] = &sm6115_vddcx,
- [SM6115_VDDCX_AO] = &sm6115_vddcx_ao,
- [SM6115_VDDCX_VFL] = &sm6115_vddcx_vfl,
- [SM6115_VDDMX] = &sm6115_vddmx,
- [SM6115_VDDMX_AO] = &sm6115_vddmx_ao,
- [SM6115_VDDMX_VFL] = &sm6115_vddmx_vfl,
- [SM6115_VDD_LPI_CX] = &sm6115_vdd_lpi_cx,
- [SM6115_VDD_LPI_MX] = &sm6115_vdd_lpi_mx,
+ [SM6115_VDDCX] = &rwcx0_lvl,
+ [SM6115_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SM6115_VDDMX] = &rwmx0_lvl,
+ [SM6115_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SM6115_VDD_LPI_CX] = &rwlc0_lvl,
+ [SM6115_VDD_LPI_MX] = &rwlm0_lvl,
};
static const struct rpmpd_desc sm6115_desc = {
@@ -958,63 +655,13 @@ static const struct rpmpd_desc sm6115_desc = {
};
/* sm6125 RPM Power domains */
-static struct rpmpd sm6125_vddcx_ao;
-static struct rpmpd sm6125_vddcx = {
- .pd = { .name = "vddcx", },
- .peer = &sm6125_vddcx_ao,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6125_vddcx_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &sm6125_vddcx,
- .active_only = true,
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6125_vddcx_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_RWCX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd sm6125_vddmx_ao;
-static struct rpmpd sm6125_vddmx = {
- .pd = { .name = "vddmx", },
- .peer = &sm6125_vddmx_ao,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6125_vddmx_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &sm6125_vddmx,
- .active_only = true,
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd sm6125_vddmx_vfl = {
- .pd = { .name = "vddmx_vfl", },
- .res_type = RPMPD_RWMX,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
static struct rpmpd *sm6125_rpmpds[] = {
- [SM6125_VDDCX] = &sm6125_vddcx,
- [SM6125_VDDCX_AO] = &sm6125_vddcx_ao,
- [SM6125_VDDCX_VFL] = &sm6125_vddcx_vfl,
- [SM6125_VDDMX] = &sm6125_vddmx,
- [SM6125_VDDMX_AO] = &sm6125_vddmx_ao,
- [SM6125_VDDMX_VFL] = &sm6125_vddmx_vfl,
+ [SM6125_VDDCX] = &rwcx0_lvl,
+ [SM6125_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SM6125_VDDMX] = &rwmx0_lvl,
+ [SM6125_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl,
};
static const struct rpmpd_desc sm6125_desc = {
@@ -1023,20 +670,20 @@ static const struct rpmpd_desc sm6125_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-static struct rpmpd sm6375_vddgx_ao;
-static struct rpmpd sm6375_vddgx = {
+static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent;
+static struct rpmpd rwgx0_lvl_w_rwmx0_parent = {
.pd = { .name = "vddgx", },
- .peer = &sm6375_vddgx_ao,
- .parent = &sm6125_vddmx.pd,
+ .peer = &rwgx0_lvl_ao_w_rwmx0_parent,
+ .parent = &rwmx0_lvl.pd,
.res_type = RPMPD_RWGX,
.res_id = 0,
.key = KEY_LEVEL,
};
-static struct rpmpd sm6375_vddgx_ao = {
+static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = {
.pd = { .name = "vddgx_ao", },
- .peer = &sm6375_vddgx,
- .parent = &sm6125_vddmx_ao.pd,
+ .peer = &rwgx0_lvl_w_rwmx0_parent,
+ .parent = &rwmx0_lvl_ao.pd,
.active_only = true,
.res_type = RPMPD_RWGX,
.res_id = 0,
@@ -1044,16 +691,16 @@ static struct rpmpd sm6375_vddgx_ao = {
};
static struct rpmpd *sm6375_rpmpds[] = {
- [SM6375_VDDCX] = &sm6125_vddcx,
- [SM6375_VDDCX_AO] = &sm6125_vddcx_ao,
- [SM6375_VDDCX_VFL] = &sm6125_vddcx_vfl,
- [SM6375_VDDMX] = &sm6125_vddmx,
- [SM6375_VDDMX_AO] = &sm6125_vddmx_ao,
- [SM6375_VDDMX_VFL] = &sm6125_vddmx_vfl,
- [SM6375_VDDGX] = &sm6375_vddgx,
- [SM6375_VDDGX_AO] = &sm6375_vddgx_ao,
- [SM6375_VDD_LPI_CX] = &sm6115_vdd_lpi_cx,
- [SM6375_VDD_LPI_MX] = &sm6115_vdd_lpi_mx,
+ [SM6375_VDDCX] = &rwcx0_lvl,
+ [SM6375_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SM6375_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SM6375_VDDMX] = &rwmx0_lvl,
+ [SM6375_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SM6375_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SM6375_VDDGX] = &rwgx0_lvl_w_rwmx0_parent,
+ [SM6375_VDDGX_AO] = &rwgx0_lvl_ao_w_rwmx0_parent,
+ [SM6375_VDD_LPI_CX] = &rwlc0_lvl,
+ [SM6375_VDD_LPI_MX] = &rwlm0_lvl,
};
static const struct rpmpd_desc sm6375_desc = {
@@ -1063,14 +710,14 @@ static const struct rpmpd_desc sm6375_desc = {
};
static struct rpmpd *qcm2290_rpmpds[] = {
- [QCM2290_VDDCX] = &sm6115_vddcx,
- [QCM2290_VDDCX_AO] = &sm6115_vddcx_ao,
- [QCM2290_VDDCX_VFL] = &sm6115_vddcx_vfl,
- [QCM2290_VDDMX] = &sm6115_vddmx,
- [QCM2290_VDDMX_AO] = &sm6115_vddmx_ao,
- [QCM2290_VDDMX_VFL] = &sm6115_vddmx_vfl,
- [QCM2290_VDD_LPI_CX] = &sm6115_vdd_lpi_cx,
- [QCM2290_VDD_LPI_MX] = &sm6115_vdd_lpi_mx,
+ [QCM2290_VDDCX] = &rwcx0_lvl,
+ [QCM2290_VDDCX_AO] = &rwcx0_lvl_ao,
+ [QCM2290_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [QCM2290_VDDMX] = &rwmx0_lvl,
+ [QCM2290_VDDMX_AO] = &rwmx0_lvl_ao,
+ [QCM2290_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [QCM2290_VDD_LPI_CX] = &rwlc0_lvl,
+ [QCM2290_VDD_LPI_MX] = &rwlm0_lvl,
};
static const struct rpmpd_desc qcm2290_desc = {
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
` (3 preceding siblings ...)
2023-01-25 3:27 ` [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 3:27 ` [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name Konrad Dybcio
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
It goes without saying that socname_rpmpds[] is the array of the RPM
power domains associated with socname. Remove these comments.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 9fff40527f9e..38a85a07fa67 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -68,7 +68,6 @@ struct rpmpd_desc {
static DEFINE_MUTEX(rpmpd_lock);
-/* mdm9607 RPM Power Domains */
static struct rpmpd cx_s3a_lvl_ao;
static struct rpmpd cx_s3a_lvl = {
.pd = { .name = "vddcx", },
@@ -134,7 +133,6 @@ static const struct rpmpd_desc mdm9607_desc = {
.max_state = RPM_SMD_LEVEL_TURBO,
};
-/* msm8226 RPM Power Domains */
static struct rpmpd cx_s1a_corner_ao;
static struct rpmpd cx_s1a_corner = {
.pd = { .name = "vddcx", },
@@ -172,7 +170,6 @@ static const struct rpmpd_desc msm8226_desc = {
.max_state = MAX_CORNER_RPMPD_STATE,
};
-/* msm8939 RPM Power Domains */
static struct rpmpd md_s1a_corner_ao;
static struct rpmpd md_s1a_corner = {
.pd = { .name = "vddmd", },
@@ -258,7 +255,6 @@ static const struct rpmpd_desc msm8939_desc = {
.max_state = MAX_CORNER_RPMPD_STATE,
};
-/* msm8916 RPM Power Domains */
static struct rpmpd *msm8916_rpmpds[] = {
[MSM8916_VDDCX] = &cx_s1a_corner,
[MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
@@ -273,7 +269,6 @@ static const struct rpmpd_desc msm8916_desc = {
.max_state = MAX_CORNER_RPMPD_STATE,
};
-/* msm8953 RPM Power Domains */
static struct rpmpd md_s1a_lvl_ao;
static struct rpmpd md_s1a_lvl = {
.pd = { .name = "vddmd", },
@@ -351,7 +346,6 @@ static const struct rpmpd_desc msm8953_desc = {
.max_state = RPM_SMD_LEVEL_TURBO,
};
-/* msm8976 RPM Power Domains */
static struct rpmpd mx_s6a_lvl_ao;
static struct rpmpd mx_s6a_lvl = {
.pd = { .name = "vddmx", },
@@ -392,7 +386,6 @@ static const struct rpmpd_desc msm8976_desc = {
.max_state = RPM_SMD_LEVEL_TURBO_HIGH,
};
-/* msm8994 RPM Power domains */
static struct rpmpd mx_s2a_corner_ao;
static struct rpmpd mx_s2a_corner = {
.pd = { .name = "vddmx", },
@@ -442,7 +435,6 @@ static const struct rpmpd_desc msm8994_desc = {
.max_state = MAX_CORNER_RPMPD_STATE,
};
-/* msm8996 RPM Power domains */
static struct rpmpd sscx_l26a_corner = {
.pd = { .name = "vddsscx", },
.res_type = RPMPD_LDOA,
@@ -473,7 +465,6 @@ static const struct rpmpd_desc msm8996_desc = {
.max_state = MAX_CORNER_RPMPD_STATE,
};
-/* msm8998 RPM Power domains */
static struct rpmpd rwcx0_lvl_ao;
static struct rpmpd rwcx0_lvl = {
.pd = { .name = "vddcx", },
@@ -571,7 +562,6 @@ static const struct rpmpd_desc msm8998_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-/* qcs404 RPM Power domains */
static struct rpmpd rwlc0_lvl = {
.pd = { .name = "vdd_lpi_cx", },
.res_type = RPMPD_RWLC,
@@ -616,7 +606,6 @@ static const struct rpmpd_desc qcs404_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-/* sdm660 RPM Power domains */
static struct rpmpd *sdm660_rpmpds[] = {
[SDM660_VDDCX] = &rwcx0_lvl,
[SDM660_VDDCX_AO] = &rwcx0_lvl_ao,
@@ -636,7 +625,6 @@ static const struct rpmpd_desc sdm660_desc = {
.max_state = RPM_SMD_LEVEL_TURBO,
};
-/* sm4250/6115 RPM Power domains */
static struct rpmpd *sm6115_rpmpds[] = {
[SM6115_VDDCX] = &rwcx0_lvl,
[SM6115_VDDCX_AO] = &rwcx0_lvl_ao,
@@ -654,7 +642,6 @@ static const struct rpmpd_desc sm6115_desc = {
.max_state = RPM_SMD_LEVEL_TURBO_NO_CPR,
};
-/* sm6125 RPM Power domains */
static struct rpmpd *sm6125_rpmpds[] = {
[SM6125_VDDCX] = &rwcx0_lvl,
[SM6125_VDDCX_AO] = &rwcx0_lvl_ao,
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
` (4 preceding siblings ...)
2023-01-25 3:27 ` [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 3:27 ` [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent Konrad Dybcio
2023-01-25 8:57 ` [PATCH 0/7] RPMPD cleanup + parent PD Dmitry Baryshkov
7 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
Move all the RPMPD definitions to the top of the file and sort them
to improve maintainability and ease searching through them when
adding support for a new SoC.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 605 ++++++++++++++++++++-------------------
1 file changed, 304 insertions(+), 301 deletions(-)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 38a85a07fa67..ca4e18cb9e84 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -68,70 +68,6 @@ struct rpmpd_desc {
static DEFINE_MUTEX(rpmpd_lock);
-static struct rpmpd cx_s3a_lvl_ao;
-static struct rpmpd cx_s3a_lvl = {
- .pd = { .name = "vddcx", },
- .peer = &cx_s3a_lvl_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 3,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd cx_s3a_lvl_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &cx_s3a_lvl,
- .active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 3,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd cx_s3a_lvl_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_SMPA,
- .res_id = 3,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd mx_l12a_lvl_ao;
-static struct rpmpd mx_l12a_lvl = {
- .pd = { .name = "vddmx", },
- .peer = &mx_l12a_lvl_ao,
- .res_type = RPMPD_LDOA,
- .res_id = 12,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd mx_l12a_lvl_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &mx_l12a_lvl,
- .active_only = true,
- .res_type = RPMPD_LDOA,
- .res_id = 12,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd mx_l12a_lvl_vfl = {
- .pd = { .name = "vddmx_vfl", },
- .res_type = RPMPD_LDOA,
- .res_id = 12,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd *mdm9607_rpmpds[] = {
- [MDM9607_VDDCX] = &cx_s3a_lvl,
- [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao,
- [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl,
- [MDM9607_VDDMX] = &mx_l12a_lvl,
- [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao,
- [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl,
-};
-
-static const struct rpmpd_desc mdm9607_desc = {
- .rpmpds = mdm9607_rpmpds,
- .num_pds = ARRAY_SIZE(mdm9607_rpmpds),
- .max_state = RPM_SMD_LEVEL_TURBO,
-};
static struct rpmpd cx_s1a_corner_ao;
static struct rpmpd cx_s1a_corner = {
@@ -158,115 +94,119 @@ static struct rpmpd cx_s1a_corner_vfc = {
.key = KEY_FLOOR_CORNER,
};
-static struct rpmpd *msm8226_rpmpds[] = {
- [MSM8226_VDDCX] = &cx_s1a_corner,
- [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc,
-};
-
-static const struct rpmpd_desc msm8226_desc = {
- .rpmpds = msm8226_rpmpds,
- .num_pds = ARRAY_SIZE(msm8226_rpmpds),
- .max_state = MAX_CORNER_RPMPD_STATE,
-};
-
-static struct rpmpd md_s1a_corner_ao;
-static struct rpmpd md_s1a_corner = {
- .pd = { .name = "vddmd", },
- .peer = &md_s1a_corner_ao,
+static struct rpmpd cx_s2a_corner_ao;
+static struct rpmpd cx_s2a_corner = {
+ .pd = { .name = "vddcx", },
+ .peer = &cx_s2a_corner_ao,
.res_type = RPMPD_SMPA,
- .res_id = 1,
+ .res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd md_s1a_corner_ao = {
- .pd = { .name = "vddmd_ao", },
- .peer = &md_s1a_corner,
+static struct rpmpd cx_s2a_corner_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &cx_s2a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
- .res_id = 1,
+ .res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd md_s1a_corner_vfc = {
- .pd = { .name = "vddmd_vfc", },
+static struct rpmpd cx_s2a_corner_vfc = {
+ .pd = { .name = "vddcx_vfc", },
.res_type = RPMPD_SMPA,
- .res_id = 1,
+ .res_id = 2,
.key = KEY_FLOOR_CORNER,
};
-static struct rpmpd cx_s2a_corner_ao;
-static struct rpmpd cx_s2a_corner = {
+static struct rpmpd cx_s2a_lvl_ao;
+static struct rpmpd cx_s2a_lvl = {
.pd = { .name = "vddcx", },
- .peer = &cx_s2a_corner_ao,
+ .peer = &cx_s2a_lvl_ao,
.res_type = RPMPD_SMPA,
.res_id = 2,
- .key = KEY_CORNER,
+ .key = KEY_LEVEL,
};
-static struct rpmpd cx_s2a_corner_ao = {
+static struct rpmpd cx_s2a_lvl_ao = {
.pd = { .name = "vddcx_ao", },
- .peer = &cx_s2a_corner,
+ .peer = &cx_s2a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
.res_id = 2,
- .key = KEY_CORNER,
+ .key = KEY_LEVEL,
};
-static struct rpmpd cx_s2a_corner_vfc = {
- .pd = { .name = "vddcx_vfc", },
+static struct rpmpd cx_s2a_lvl_vfl = {
+ .pd = { .name = "vddcx_vfl", },
.res_type = RPMPD_SMPA,
.res_id = 2,
- .key = KEY_FLOOR_CORNER,
+ .key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd mx_l3a_corner_ao;
-static struct rpmpd mx_l3a_corner = {
- .pd = { .name = "vddmx", },
- .peer = &mx_l3a_corner_ao,
- .res_type = RPMPD_LDOA,
+static struct rpmpd cx_s3a_lvl_ao;
+static struct rpmpd cx_s3a_lvl = {
+ .pd = { .name = "vddcx", },
+ .peer = &cx_s3a_lvl_ao,
+ .res_type = RPMPD_SMPA,
.res_id = 3,
- .key = KEY_CORNER,
+ .key = KEY_LEVEL,
};
-static struct rpmpd mx_l3a_corner_ao = {
- .pd = { .name = "vddmx_ao", },
- .peer = &mx_l3a_corner,
+static struct rpmpd cx_s3a_lvl_ao = {
+ .pd = { .name = "vddcx_ao", },
+ .peer = &cx_s3a_lvl,
.active_only = true,
- .res_type = RPMPD_LDOA,
+ .res_type = RPMPD_SMPA,
+ .res_id = 3,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd cx_s3a_lvl_vfl = {
+ .pd = { .name = "vddcx_vfl", },
+ .res_type = RPMPD_SMPA,
.res_id = 3,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd gfx_s2b_corner = {
+ .pd = { .name = "vddgfx", },
+ /* SMPC if your board has a PM8004! */
+ .res_type = RPMPD_SMPB,
+ .res_id = 2,
.key = KEY_CORNER,
};
-static struct rpmpd *msm8939_rpmpds[] = {
- [MSM8939_VDDMDCX] = &md_s1a_corner,
- [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao,
- [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc,
- [MSM8939_VDDCX] = &cx_s2a_corner,
- [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao,
- [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc,
- [MSM8939_VDDMX] = &mx_l3a_corner,
- [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao,
+static struct rpmpd gfx_s2b_corner_vfc = {
+ .pd = { .name = "vddgfx_vfc", },
+ .res_type = RPMPD_SMPB,
+ .res_id = 2,
+ .key = KEY_FLOOR_CORNER,
};
-static const struct rpmpd_desc msm8939_desc = {
- .rpmpds = msm8939_rpmpds,
- .num_pds = ARRAY_SIZE(msm8939_rpmpds),
- .max_state = MAX_CORNER_RPMPD_STATE,
+static struct rpmpd md_s1a_corner_ao;
+static struct rpmpd md_s1a_corner = {
+ .pd = { .name = "vddmd", },
+ .peer = &md_s1a_corner_ao,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
};
-static struct rpmpd *msm8916_rpmpds[] = {
- [MSM8916_VDDCX] = &cx_s1a_corner,
- [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8916_VDDMX] = &mx_l3a_corner,
- [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao,
+static struct rpmpd md_s1a_corner_ao = {
+ .pd = { .name = "vddmd_ao", },
+ .peer = &md_s1a_corner,
+ .active_only = true,
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_CORNER,
};
-static const struct rpmpd_desc msm8916_desc = {
- .rpmpds = msm8916_rpmpds,
- .num_pds = ARRAY_SIZE(msm8916_rpmpds),
- .max_state = MAX_CORNER_RPMPD_STATE,
+static struct rpmpd md_s1a_corner_vfc = {
+ .pd = { .name = "vddmd_vfc", },
+ .res_type = RPMPD_SMPA,
+ .res_id = 1,
+ .key = KEY_FLOOR_CORNER,
};
static struct rpmpd md_s1a_lvl_ao;
@@ -287,63 +227,40 @@ static struct rpmpd md_s1a_lvl_ao = {
.key = KEY_LEVEL,
};
-static struct rpmpd cx_s2a_lvl_ao;
-static struct rpmpd cx_s2a_lvl = {
- .pd = { .name = "vddcx", },
- .peer = &cx_s2a_lvl_ao,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_LEVEL,
+static struct rpmpd mx_l3a_corner_ao;
+static struct rpmpd mx_l3a_corner = {
+ .pd = { .name = "vddmx", },
+ .peer = &mx_l3a_corner_ao,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
};
-static struct rpmpd cx_s2a_lvl_ao = {
- .pd = { .name = "vddcx_ao", },
- .peer = &cx_s2a_lvl,
+static struct rpmpd mx_l3a_corner_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &mx_l3a_corner,
.active_only = true,
- .res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_LEVEL,
+ .res_type = RPMPD_LDOA,
+ .res_id = 3,
+ .key = KEY_CORNER,
};
-static struct rpmpd mx_s7a_lvl_ao;
-static struct rpmpd mx_s7a_lvl = {
+static struct rpmpd mx_s2a_corner_ao;
+static struct rpmpd mx_s2a_corner = {
.pd = { .name = "vddmx", },
- .peer = &mx_s7a_lvl_ao,
+ .peer = &mx_s2a_corner_ao,
.res_type = RPMPD_SMPA,
- .res_id = 7,
- .key = KEY_LEVEL,
+ .res_id = 2,
+ .key = KEY_CORNER,
};
-static struct rpmpd mx_s7a_lvl_ao = {
+static struct rpmpd mx_s2a_corner_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &mx_s7a_lvl,
+ .peer = &mx_s2a_corner,
.active_only = true,
.res_type = RPMPD_SMPA,
- .res_id = 7,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd cx_s2a_lvl_vfl = {
- .pd = { .name = "vddcx_vfl", },
- .res_type = RPMPD_SMPA,
.res_id = 2,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd *msm8953_rpmpds[] = {
- [MSM8953_VDDMD] = &md_s1a_lvl,
- [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
- [MSM8953_VDDCX] = &cx_s2a_lvl,
- [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao,
- [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl,
- [MSM8953_VDDMX] = &mx_s7a_lvl,
- [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao,
-};
-
-static const struct rpmpd_desc msm8953_desc = {
- .rpmpds = msm8953_rpmpds,
- .num_pds = ARRAY_SIZE(msm8953_rpmpds),
- .max_state = RPM_SMD_LEVEL_TURBO,
+ .key = KEY_CORNER,
};
static struct rpmpd mx_s6a_lvl_ao;
@@ -371,98 +288,47 @@ static struct rpmpd mx_s6a_lvl_vfl = {
.key = KEY_FLOOR_LEVEL,
};
-static struct rpmpd *msm8976_rpmpds[] = {
- [MSM8976_VDDCX] = &cx_s2a_lvl,
- [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao,
- [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl,
- [MSM8976_VDDMX] = &mx_s6a_lvl,
- [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao,
- [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl,
-};
-
-static const struct rpmpd_desc msm8976_desc = {
- .rpmpds = msm8976_rpmpds,
- .num_pds = ARRAY_SIZE(msm8976_rpmpds),
- .max_state = RPM_SMD_LEVEL_TURBO_HIGH,
-};
-
-static struct rpmpd mx_s2a_corner_ao;
-static struct rpmpd mx_s2a_corner = {
+static struct rpmpd mx_s7a_lvl_ao;
+static struct rpmpd mx_s7a_lvl = {
.pd = { .name = "vddmx", },
- .peer = &mx_s2a_corner_ao,
+ .peer = &mx_s7a_lvl_ao,
.res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_CORNER,
+ .res_id = 7,
+ .key = KEY_LEVEL,
};
-static struct rpmpd mx_s2a_corner_ao = {
+static struct rpmpd mx_s7a_lvl_ao = {
.pd = { .name = "vddmx_ao", },
- .peer = &mx_s2a_corner,
+ .peer = &mx_s7a_lvl,
.active_only = true,
.res_type = RPMPD_SMPA,
- .res_id = 2,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd gfx_s2b_corner = {
- .pd = { .name = "vddgfx", },
- /* SMPC if your board has a PM8004! */
- .res_type = RPMPD_SMPB,
- .res_id = 2,
- .key = KEY_CORNER,
-};
-
-static struct rpmpd gfx_s2b_corner_vfc = {
- .pd = { .name = "vddgfx_vfc", },
- .res_type = RPMPD_SMPB,
- .res_id = 2,
- .key = KEY_FLOOR_CORNER,
-};
-
-static struct rpmpd *msm8994_rpmpds[] = {
- [MSM8994_VDDCX] = &cx_s1a_corner,
- [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8994_VDDMX] = &mx_s2a_corner,
- [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao,
- [MSM8994_VDDGFX] = &gfx_s2b_corner,
- [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc,
-};
-
-static const struct rpmpd_desc msm8994_desc = {
- .rpmpds = msm8994_rpmpds,
- .num_pds = ARRAY_SIZE(msm8994_rpmpds),
- .max_state = MAX_CORNER_RPMPD_STATE,
-};
-
-static struct rpmpd sscx_l26a_corner = {
- .pd = { .name = "vddsscx", },
- .res_type = RPMPD_LDOA,
- .res_id = 26,
- .key = KEY_CORNER,
+ .res_id = 7,
+ .key = KEY_LEVEL,
};
-static struct rpmpd sscx_l26a_corner_vfc = {
- .pd = { .name = "vddsscx_vfc", },
+static struct rpmpd mx_l12a_lvl_ao;
+static struct rpmpd mx_l12a_lvl = {
+ .pd = { .name = "vddmx", },
+ .peer = &mx_l12a_lvl_ao,
.res_type = RPMPD_LDOA,
- .res_id = 26,
- .key = KEY_FLOOR_CORNER,
+ .res_id = 12,
+ .key = KEY_LEVEL,
};
-static struct rpmpd *msm8996_rpmpds[] = {
- [MSM8996_VDDCX] = &cx_s1a_corner,
- [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8996_VDDMX] = &mx_s2a_corner,
- [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao,
- [MSM8996_VDDSSCX] = &sscx_l26a_corner,
- [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc,
+static struct rpmpd mx_l12a_lvl_ao = {
+ .pd = { .name = "vddmx_ao", },
+ .peer = &mx_l12a_lvl,
+ .active_only = true,
+ .res_type = RPMPD_LDOA,
+ .res_id = 12,
+ .key = KEY_LEVEL,
};
-static const struct rpmpd_desc msm8996_desc = {
- .rpmpds = msm8996_rpmpds,
- .num_pds = ARRAY_SIZE(msm8996_rpmpds),
- .max_state = MAX_CORNER_RPMPD_STATE,
+static struct rpmpd mx_l12a_lvl_vfl = {
+ .pd = { .name = "vddmx_vfl", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 12,
+ .key = KEY_FLOOR_LEVEL,
};
static struct rpmpd rwcx0_lvl_ao;
@@ -490,6 +356,56 @@ static struct rpmpd rwcx0_lvl_vfl = {
.key = KEY_FLOOR_LEVEL,
};
+static struct rpmpd rwmx0_lvl;
+static struct rpmpd rwmx0_lvl_ao;
+static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent;
+static struct rpmpd rwgx0_lvl_w_rwmx0_parent = {
+ .pd = { .name = "vddgx", },
+ .peer = &rwgx0_lvl_ao_w_rwmx0_parent,
+ .parent = &rwmx0_lvl.pd,
+ .res_type = RPMPD_RWGX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = {
+ .pd = { .name = "vddgx_ao", },
+ .peer = &rwgx0_lvl_w_rwmx0_parent,
+ .parent = &rwmx0_lvl_ao.pd,
+ .active_only = true,
+ .res_type = RPMPD_RWGX,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd rwlc0_lvl = {
+ .pd = { .name = "vdd_lpi_cx", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd rwlm0_lvl = {
+ .pd = { .name = "vdd_lpi_mx", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_LEVEL,
+};
+
+static struct rpmpd rwlc0_lvl_vfl = {
+ .pd = { .name = "vdd_lpicx_vfl", },
+ .res_type = RPMPD_RWLC,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
+static struct rpmpd rwlm0_lvl_vfl = {
+ .pd = { .name = "vdd_lpimx_vfl", },
+ .res_type = RPMPD_RWLM,
+ .res_id = 0,
+ .key = KEY_FLOOR_LEVEL,
+};
+
static struct rpmpd rwmx0_lvl_ao;
static struct rpmpd rwmx0_lvl = {
.pd = { .name = "vddmx", },
@@ -543,6 +459,141 @@ static struct rpmpd rwsm0_lvl_vfl = {
.key = KEY_FLOOR_LEVEL,
};
+static struct rpmpd sscx_l26a_corner = {
+ .pd = { .name = "vddsscx", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 26,
+ .key = KEY_CORNER,
+};
+
+static struct rpmpd sscx_l26a_corner_vfc = {
+ .pd = { .name = "vddsscx_vfc", },
+ .res_type = RPMPD_LDOA,
+ .res_id = 26,
+ .key = KEY_FLOOR_CORNER,
+};
+
+static struct rpmpd *mdm9607_rpmpds[] = {
+ [MDM9607_VDDCX] = &cx_s3a_lvl,
+ [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao,
+ [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl,
+ [MDM9607_VDDMX] = &mx_l12a_lvl,
+ [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao,
+ [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl,
+};
+
+static const struct rpmpd_desc mdm9607_desc = {
+ .rpmpds = mdm9607_rpmpds,
+ .num_pds = ARRAY_SIZE(mdm9607_rpmpds),
+ .max_state = RPM_SMD_LEVEL_TURBO,
+};
+
+static struct rpmpd *msm8226_rpmpds[] = {
+ [MSM8226_VDDCX] = &cx_s1a_corner,
+ [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc,
+};
+
+static const struct rpmpd_desc msm8226_desc = {
+ .rpmpds = msm8226_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8226_rpmpds),
+ .max_state = MAX_CORNER_RPMPD_STATE,
+};
+
+static struct rpmpd *msm8939_rpmpds[] = {
+ [MSM8939_VDDMDCX] = &md_s1a_corner,
+ [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao,
+ [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc,
+ [MSM8939_VDDCX] = &cx_s2a_corner,
+ [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao,
+ [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc,
+ [MSM8939_VDDMX] = &mx_l3a_corner,
+ [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao,
+};
+
+static const struct rpmpd_desc msm8939_desc = {
+ .rpmpds = msm8939_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8939_rpmpds),
+ .max_state = MAX_CORNER_RPMPD_STATE,
+};
+
+static struct rpmpd *msm8916_rpmpds[] = {
+ [MSM8916_VDDCX] = &cx_s1a_corner,
+ [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8916_VDDMX] = &mx_l3a_corner,
+ [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao,
+};
+
+static const struct rpmpd_desc msm8916_desc = {
+ .rpmpds = msm8916_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8916_rpmpds),
+ .max_state = MAX_CORNER_RPMPD_STATE,
+};
+
+static struct rpmpd *msm8953_rpmpds[] = {
+ [MSM8953_VDDMD] = &md_s1a_lvl,
+ [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
+ [MSM8953_VDDCX] = &cx_s2a_lvl,
+ [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8953_VDDMX] = &mx_s7a_lvl,
+ [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao,
+};
+
+static const struct rpmpd_desc msm8953_desc = {
+ .rpmpds = msm8953_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8953_rpmpds),
+ .max_state = RPM_SMD_LEVEL_TURBO,
+};
+
+static struct rpmpd *msm8976_rpmpds[] = {
+ [MSM8976_VDDCX] = &cx_s2a_lvl,
+ [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8976_VDDMX] = &mx_s6a_lvl,
+ [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao,
+ [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl,
+};
+
+static const struct rpmpd_desc msm8976_desc = {
+ .rpmpds = msm8976_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8976_rpmpds),
+ .max_state = RPM_SMD_LEVEL_TURBO_HIGH,
+};
+
+static struct rpmpd *msm8994_rpmpds[] = {
+ [MSM8994_VDDCX] = &cx_s1a_corner,
+ [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8994_VDDMX] = &mx_s2a_corner,
+ [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8994_VDDGFX] = &gfx_s2b_corner,
+ [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc,
+};
+
+static const struct rpmpd_desc msm8994_desc = {
+ .rpmpds = msm8994_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8994_rpmpds),
+ .max_state = MAX_CORNER_RPMPD_STATE,
+};
+
+static struct rpmpd *msm8996_rpmpds[] = {
+ [MSM8996_VDDCX] = &cx_s1a_corner,
+ [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8996_VDDMX] = &mx_s2a_corner,
+ [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8996_VDDSSCX] = &sscx_l26a_corner,
+ [MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc,
+};
+
+static const struct rpmpd_desc msm8996_desc = {
+ .rpmpds = msm8996_rpmpds,
+ .num_pds = ARRAY_SIZE(msm8996_rpmpds),
+ .max_state = MAX_CORNER_RPMPD_STATE,
+};
+
static struct rpmpd *msm8998_rpmpds[] = {
[MSM8998_VDDCX] = &rwcx0_lvl,
[MSM8998_VDDCX_AO] = &rwcx0_lvl_ao,
@@ -562,34 +613,6 @@ static const struct rpmpd_desc msm8998_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-static struct rpmpd rwlc0_lvl = {
- .pd = { .name = "vdd_lpi_cx", },
- .res_type = RPMPD_RWLC,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd rwlm0_lvl = {
- .pd = { .name = "vdd_lpi_mx", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd rwlc0_lvl_vfl = {
- .pd = { .name = "vdd_lpicx_vfl", },
- .res_type = RPMPD_RWLC,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
-static struct rpmpd rwlm0_lvl_vfl = {
- .pd = { .name = "vdd_lpimx_vfl", },
- .res_type = RPMPD_RWLM,
- .res_id = 0,
- .key = KEY_FLOOR_LEVEL,
-};
-
static struct rpmpd *qcs404_rpmpds[] = {
[QCS404_VDDMX] = &rwmx0_lvl,
[QCS404_VDDMX_AO] = &rwmx0_lvl_ao,
@@ -657,26 +680,6 @@ static const struct rpmpd_desc sm6125_desc = {
.max_state = RPM_SMD_LEVEL_BINNING,
};
-static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent;
-static struct rpmpd rwgx0_lvl_w_rwmx0_parent = {
- .pd = { .name = "vddgx", },
- .peer = &rwgx0_lvl_ao_w_rwmx0_parent,
- .parent = &rwmx0_lvl.pd,
- .res_type = RPMPD_RWGX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
-static struct rpmpd rwgx0_lvl_ao_w_rwmx0_parent = {
- .pd = { .name = "vddgx_ao", },
- .peer = &rwgx0_lvl_w_rwmx0_parent,
- .parent = &rwmx0_lvl_ao.pd,
- .active_only = true,
- .res_type = RPMPD_RWGX,
- .res_id = 0,
- .key = KEY_LEVEL,
-};
-
static struct rpmpd *sm6375_rpmpds[] = {
[SM6375_VDDCX] = &rwcx0_lvl,
[SM6375_VDDCX_AO] = &rwcx0_lvl_ao,
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
` (5 preceding siblings ...)
2023-01-25 3:27 ` [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name Konrad Dybcio
@ 2023-01-25 3:27 ` Konrad Dybcio
2023-01-25 8:57 ` [PATCH 0/7] RPMPD cleanup + parent PD Dmitry Baryshkov
7 siblings, 0 replies; 12+ messages in thread
From: Konrad Dybcio @ 2023-01-25 3:27 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: marijn.suijten, Konrad Dybcio, linux-kernel
Currently the whitespace between [DT_BINDING] = &struct is all over
the place.. some SoC structs have a space, others have a tab, others
have N tabs.. Make that a single space for everybody to keep things
coherent.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/soc/qcom/rpmpd.c | 164 +++++++++++++++++++--------------------
1 file changed, 82 insertions(+), 82 deletions(-)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index ca4e18cb9e84..8f34fd826cbb 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -474,12 +474,12 @@ static struct rpmpd sscx_l26a_corner_vfc = {
};
static struct rpmpd *mdm9607_rpmpds[] = {
- [MDM9607_VDDCX] = &cx_s3a_lvl,
- [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao,
- [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl,
- [MDM9607_VDDMX] = &mx_l12a_lvl,
- [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao,
- [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl,
+ [MDM9607_VDDCX] = &cx_s3a_lvl,
+ [MDM9607_VDDCX_AO] = &cx_s3a_lvl_ao,
+ [MDM9607_VDDCX_VFL] = &cx_s3a_lvl_vfl,
+ [MDM9607_VDDMX] = &mx_l12a_lvl,
+ [MDM9607_VDDMX_AO] = &mx_l12a_lvl_ao,
+ [MDM9607_VDDMX_VFL] = &mx_l12a_lvl_vfl,
};
static const struct rpmpd_desc mdm9607_desc = {
@@ -489,9 +489,9 @@ static const struct rpmpd_desc mdm9607_desc = {
};
static struct rpmpd *msm8226_rpmpds[] = {
- [MSM8226_VDDCX] = &cx_s1a_corner,
- [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8226_VDDCX] = &cx_s1a_corner,
+ [MSM8226_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8226_VDDCX_VFC] = &cx_s1a_corner_vfc,
};
static const struct rpmpd_desc msm8226_desc = {
@@ -501,14 +501,14 @@ static const struct rpmpd_desc msm8226_desc = {
};
static struct rpmpd *msm8939_rpmpds[] = {
- [MSM8939_VDDMDCX] = &md_s1a_corner,
- [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao,
- [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc,
- [MSM8939_VDDCX] = &cx_s2a_corner,
- [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao,
- [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc,
- [MSM8939_VDDMX] = &mx_l3a_corner,
- [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao,
+ [MSM8939_VDDMDCX] = &md_s1a_corner,
+ [MSM8939_VDDMDCX_AO] = &md_s1a_corner_ao,
+ [MSM8939_VDDMDCX_VFC] = &md_s1a_corner_vfc,
+ [MSM8939_VDDCX] = &cx_s2a_corner,
+ [MSM8939_VDDCX_AO] = &cx_s2a_corner_ao,
+ [MSM8939_VDDCX_VFC] = &cx_s2a_corner_vfc,
+ [MSM8939_VDDMX] = &mx_l3a_corner,
+ [MSM8939_VDDMX_AO] = &mx_l3a_corner_ao,
};
static const struct rpmpd_desc msm8939_desc = {
@@ -518,11 +518,11 @@ static const struct rpmpd_desc msm8939_desc = {
};
static struct rpmpd *msm8916_rpmpds[] = {
- [MSM8916_VDDCX] = &cx_s1a_corner,
- [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8916_VDDMX] = &mx_l3a_corner,
- [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao,
+ [MSM8916_VDDCX] = &cx_s1a_corner,
+ [MSM8916_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8916_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8916_VDDMX] = &mx_l3a_corner,
+ [MSM8916_VDDMX_AO] = &mx_l3a_corner_ao,
};
static const struct rpmpd_desc msm8916_desc = {
@@ -532,13 +532,13 @@ static const struct rpmpd_desc msm8916_desc = {
};
static struct rpmpd *msm8953_rpmpds[] = {
- [MSM8953_VDDMD] = &md_s1a_lvl,
- [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
- [MSM8953_VDDCX] = &cx_s2a_lvl,
- [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao,
- [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl,
- [MSM8953_VDDMX] = &mx_s7a_lvl,
- [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao,
+ [MSM8953_VDDMD] = &md_s1a_lvl,
+ [MSM8953_VDDMD_AO] = &md_s1a_lvl_ao,
+ [MSM8953_VDDCX] = &cx_s2a_lvl,
+ [MSM8953_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8953_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8953_VDDMX] = &mx_s7a_lvl,
+ [MSM8953_VDDMX_AO] = &mx_s7a_lvl_ao,
};
static const struct rpmpd_desc msm8953_desc = {
@@ -548,12 +548,12 @@ static const struct rpmpd_desc msm8953_desc = {
};
static struct rpmpd *msm8976_rpmpds[] = {
- [MSM8976_VDDCX] = &cx_s2a_lvl,
- [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao,
- [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl,
- [MSM8976_VDDMX] = &mx_s6a_lvl,
- [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao,
- [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl,
+ [MSM8976_VDDCX] = &cx_s2a_lvl,
+ [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao,
+ [MSM8976_VDDCX_VFL] = &cx_s2a_lvl_vfl,
+ [MSM8976_VDDMX] = &mx_s6a_lvl,
+ [MSM8976_VDDMX_AO] = &mx_s6a_lvl_ao,
+ [MSM8976_VDDMX_VFL] = &mx_s6a_lvl_vfl,
};
static const struct rpmpd_desc msm8976_desc = {
@@ -563,13 +563,13 @@ static const struct rpmpd_desc msm8976_desc = {
};
static struct rpmpd *msm8994_rpmpds[] = {
- [MSM8994_VDDCX] = &cx_s1a_corner,
- [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8994_VDDMX] = &mx_s2a_corner,
- [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao,
- [MSM8994_VDDGFX] = &gfx_s2b_corner,
- [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc,
+ [MSM8994_VDDCX] = &cx_s1a_corner,
+ [MSM8994_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8994_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8994_VDDMX] = &mx_s2a_corner,
+ [MSM8994_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8994_VDDGFX] = &gfx_s2b_corner,
+ [MSM8994_VDDGFX_VFC] = &gfx_s2b_corner_vfc,
};
static const struct rpmpd_desc msm8994_desc = {
@@ -579,12 +579,12 @@ static const struct rpmpd_desc msm8994_desc = {
};
static struct rpmpd *msm8996_rpmpds[] = {
- [MSM8996_VDDCX] = &cx_s1a_corner,
- [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao,
- [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc,
- [MSM8996_VDDMX] = &mx_s2a_corner,
- [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao,
- [MSM8996_VDDSSCX] = &sscx_l26a_corner,
+ [MSM8996_VDDCX] = &cx_s1a_corner,
+ [MSM8996_VDDCX_AO] = &cx_s1a_corner_ao,
+ [MSM8996_VDDCX_VFC] = &cx_s1a_corner_vfc,
+ [MSM8996_VDDMX] = &mx_s2a_corner,
+ [MSM8996_VDDMX_AO] = &mx_s2a_corner_ao,
+ [MSM8996_VDDSSCX] = &sscx_l26a_corner,
[MSM8996_VDDSSCX_VFC] = &sscx_l26a_corner_vfc,
};
@@ -595,16 +595,16 @@ static const struct rpmpd_desc msm8996_desc = {
};
static struct rpmpd *msm8998_rpmpds[] = {
- [MSM8998_VDDCX] = &rwcx0_lvl,
- [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao,
- [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl,
- [MSM8998_VDDMX] = &rwmx0_lvl,
- [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao,
- [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl,
- [MSM8998_SSCCX] = &rwsc0_lvl,
- [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl,
- [MSM8998_SSCMX] = &rwsm0_lvl,
- [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl,
+ [MSM8998_VDDCX] = &rwcx0_lvl,
+ [MSM8998_VDDCX_AO] = &rwcx0_lvl_ao,
+ [MSM8998_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [MSM8998_VDDMX] = &rwmx0_lvl,
+ [MSM8998_VDDMX_AO] = &rwmx0_lvl_ao,
+ [MSM8998_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [MSM8998_SSCCX] = &rwsc0_lvl,
+ [MSM8998_SSCCX_VFL] = &rwsc0_lvl_vfl,
+ [MSM8998_SSCMX] = &rwsm0_lvl,
+ [MSM8998_SSCMX_VFL] = &rwsm0_lvl_vfl,
};
static const struct rpmpd_desc msm8998_desc = {
@@ -630,16 +630,16 @@ static const struct rpmpd_desc qcs404_desc = {
};
static struct rpmpd *sdm660_rpmpds[] = {
- [SDM660_VDDCX] = &rwcx0_lvl,
- [SDM660_VDDCX_AO] = &rwcx0_lvl_ao,
- [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl,
- [SDM660_VDDMX] = &rwmx0_lvl,
- [SDM660_VDDMX_AO] = &rwmx0_lvl_ao,
- [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl,
- [SDM660_SSCCX] = &rwlc0_lvl,
- [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl,
- [SDM660_SSCMX] = &rwlm0_lvl,
- [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl,
+ [SDM660_VDDCX] = &rwcx0_lvl,
+ [SDM660_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SDM660_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SDM660_VDDMX] = &rwmx0_lvl,
+ [SDM660_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SDM660_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SDM660_SSCCX] = &rwlc0_lvl,
+ [SDM660_SSCCX_VFL] = &rwlc0_lvl_vfl,
+ [SDM660_SSCMX] = &rwlm0_lvl,
+ [SDM660_SSCMX_VFL] = &rwlm0_lvl_vfl,
};
static const struct rpmpd_desc sdm660_desc = {
@@ -649,14 +649,14 @@ static const struct rpmpd_desc sdm660_desc = {
};
static struct rpmpd *sm6115_rpmpds[] = {
- [SM6115_VDDCX] = &rwcx0_lvl,
- [SM6115_VDDCX_AO] = &rwcx0_lvl_ao,
- [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl,
- [SM6115_VDDMX] = &rwmx0_lvl,
- [SM6115_VDDMX_AO] = &rwmx0_lvl_ao,
- [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl,
- [SM6115_VDD_LPI_CX] = &rwlc0_lvl,
- [SM6115_VDD_LPI_MX] = &rwlm0_lvl,
+ [SM6115_VDDCX] = &rwcx0_lvl,
+ [SM6115_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SM6115_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SM6115_VDDMX] = &rwmx0_lvl,
+ [SM6115_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SM6115_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SM6115_VDD_LPI_CX] = &rwlc0_lvl,
+ [SM6115_VDD_LPI_MX] = &rwlm0_lvl,
};
static const struct rpmpd_desc sm6115_desc = {
@@ -666,12 +666,12 @@ static const struct rpmpd_desc sm6115_desc = {
};
static struct rpmpd *sm6125_rpmpds[] = {
- [SM6125_VDDCX] = &rwcx0_lvl,
- [SM6125_VDDCX_AO] = &rwcx0_lvl_ao,
- [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl,
- [SM6125_VDDMX] = &rwmx0_lvl,
- [SM6125_VDDMX_AO] = &rwmx0_lvl_ao,
- [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl,
+ [SM6125_VDDCX] = &rwcx0_lvl,
+ [SM6125_VDDCX_AO] = &rwcx0_lvl_ao,
+ [SM6125_VDDCX_VFL] = &rwcx0_lvl_vfl,
+ [SM6125_VDDMX] = &rwmx0_lvl,
+ [SM6125_VDDMX_AO] = &rwmx0_lvl_ao,
+ [SM6125_VDDMX_VFL] = &rwmx0_lvl_vfl,
};
static const struct rpmpd_desc sm6125_desc = {
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/7] RPMPD cleanup + parent PD
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
` (6 preceding siblings ...)
2023-01-25 3:27 ` [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent Konrad Dybcio
@ 2023-01-25 8:57 ` Dmitry Baryshkov
7 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2023-01-25 8:57 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross,
krzysztof.kozlowski
Cc: marijn.suijten
Hello Konrad,
On 25/01/2023 05:27, Konrad Dybcio wrote:
> This series provides a big and necessary cleanup for RPMPD..
> Lots of redefined objects were trimmed as well as some stylistic
> and maintainability fixes have been made. Also, support for parent
> PD is added and put to use on SM6375 where VDDMX should be scaled
> together with VDDGX.
The idea is great, however the order of patches makes it a bit hard to
review. Moving expanded macros causes git to match parts of the
structures, making one wonder why _corner_ is suddenly changed to _lvl_.
I hate to suggest this, but it might be better to reorder the patches
here (yes, I understand the pain it will cause).
I'd suggest the following order (based on my previous experience with
clocks and icc cleanup):
- remove SoC names from PD defines
- sort RPMPD definitions
- make SoC arrays consistent
- expand the macros
- add parent PD support
- hook up VDDMX as a parent
>
> Tested on SM6375.
>
> Konrad Dybcio (7):
> soc: qcom: rpmpd: Add parent PD support
> soc: qcom: rpmpd: Expand #defines into structs
> soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX
> soc: qcom: rpmpd: Remove SoC names from RPMPD names
> soc: qcom: rpmpd: Remove useless comments
> soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name
> soc: qcom: rpmpd: Make bindings assignments consistent
>
> drivers/soc/qcom/rpmpd.c | 790 ++++++++++++++++++++++++++-------------
> 1 file changed, 522 insertions(+), 268 deletions(-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names
2023-01-25 3:27 ` [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Konrad Dybcio
@ 2023-01-25 9:02 ` Dmitry Baryshkov
0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2023-01-25 9:02 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross,
krzysztof.kozlowski
Cc: marijn.suijten, linux-kernel
On 25/01/2023 05:27, Konrad Dybcio wrote:
> SoC names were used only to distinguish between defines. That made
> reusing them messy and often times, the same RPM power domains were
> defined multiple times. Assign descriptive, SoC-independent names to
> each RPMPD description struct and remove duplicate definitions.
>
> Bloat-o-meter results:
> Total: Before=133713, After=74201, chg -44.51%
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/soc/qcom/rpmpd.c | 763 +++++++++++----------------------------
> 1 file changed, 205 insertions(+), 558 deletions(-)
>
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index a69182618b76..9fff40527f9e 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -69,50 +69,50 @@ struct rpmpd_desc {
> static DEFINE_MUTEX(rpmpd_lock);
>
> /* mdm9607 RPM Power Domains */
> -static struct rpmpd mdm9607_vddcx_ao;
> -static struct rpmpd mdm9607_vddcx = {
> +static struct rpmpd cx_s3a_lvl_ao;
> +static struct rpmpd cx_s3a_lvl = {
> .pd = { .name = "vddcx", },
> - .peer = &mdm9607_vddcx_ao,
> + .peer = &cx_s3a_lvl_ao,
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_LEVEL,
> };
>
> -static struct rpmpd mdm9607_vddcx_ao = {
> +static struct rpmpd cx_s3a_lvl_ao = {
> .pd = { .name = "vddcx_ao", },
> - .peer = &mdm9607_vddcx,
> + .peer = &cx_s3a_lvl,
> .active_only = true,
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_LEVEL,
> };
>
> -static struct rpmpd mdm9607_vddcx_vfl = {
> +static struct rpmpd cx_s3a_lvl_vfl = {
As you are already adding _lvl to the name, _lvl_floor might be betther
than _lvl_vfl.
> .pd = { .name = "vddcx_vfl", },
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_FLOOR_LEVEL,
> };
[skipped]
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX
2023-01-25 3:27 ` [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Konrad Dybcio
@ 2023-01-25 9:07 ` Dmitry Baryshkov
0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2023-01-25 9:07 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross,
krzysztof.kozlowski
Cc: marijn.suijten, linux-kernel
On 25/01/2023 05:27, Konrad Dybcio wrote:
> The GPU core clock requires that both VDDGX and VDDMX domains are scaled
> at the same rate at the same time (well, MX just before GX but you get
> the idea). Set MX as parent of GX to take care of that.
>
> Suggested-by: Bjorn Andersson <andersson@kernel.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/soc/qcom/rpmpd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index 9a7da7cead9e..a69182618b76 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -1027,6 +1027,7 @@ static struct rpmpd sm6375_vddgx_ao;
> static struct rpmpd sm6375_vddgx = {
> .pd = { .name = "vddgx", },
> .peer = &sm6375_vddgx_ao,
> + .parent = &sm6125_vddmx.pd,
> .res_type = RPMPD_RWGX,
> .res_id = 0,
> .key = KEY_LEVEL,
> @@ -1035,6 +1036,7 @@ static struct rpmpd sm6375_vddgx = {
> static struct rpmpd sm6375_vddgx_ao = {
> .pd = { .name = "vddgx_ao", },
> .peer = &sm6375_vddgx,
> + .parent = &sm6125_vddmx_ao.pd,
> .active_only = true,
> .res_type = RPMPD_RWGX,
> .res_id = 0,
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs
2023-01-25 3:27 ` [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Konrad Dybcio
@ 2023-01-25 9:08 ` Dmitry Baryshkov
0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2023-01-25 9:08 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross,
krzysztof.kozlowski
Cc: marijn.suijten, linux-kernel
On 25/01/2023 05:27, Konrad Dybcio wrote:
> Expand preprocessor macros into human-readable structs for easier
> reference.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/soc/qcom/rpmpd.c | 839 +++++++++++++++++++++++++++++++++------
> 1 file changed, 722 insertions(+), 117 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-01-25 9:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 3:27 [PATCH 0/7] RPMPD cleanup + parent PD Konrad Dybcio
2023-01-25 3:27 ` [PATCH 1/7] soc: qcom: rpmpd: Add parent PD support Konrad Dybcio
2023-01-25 3:27 ` [PATCH 2/7] soc: qcom: rpmpd: Expand #defines into structs Konrad Dybcio
2023-01-25 9:08 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 3/7] soc: qcom: rpmpd: Hook up VDDMX as parent of SM6375 VDDGX Konrad Dybcio
2023-01-25 9:07 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names Konrad Dybcio
2023-01-25 9:02 ` Dmitry Baryshkov
2023-01-25 3:27 ` [PATCH 5/7] soc: qcom: rpmpd: Remove useless comments Konrad Dybcio
2023-01-25 3:27 ` [PATCH 6/7] soc: qcom: rpmpd: Move all RPMPD definitions up and sort them by name Konrad Dybcio
2023-01-25 3:27 ` [PATCH 7/7] soc: qcom: rpmpd: Make bindings assignments consistent Konrad Dybcio
2023-01-25 8:57 ` [PATCH 0/7] RPMPD cleanup + parent PD Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox