Add the power domains exposed by RPMH in the Qualcomm Milos platform.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/pmdomain/qcom/rpmhpd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c
index 078323b85b5648e33dd89e08cf31bdc5ab76d553..e09552a469264f28952fc46c3ab8c125e87310da 100644
--- a/drivers/pmdomain/qcom/rpmhpd.c
+++ b/drivers/pmdomain/qcom/rpmhpd.c
@@ -217,6 +217,24 @@ static struct rpmhpd gmxc = {
.res_name = "gmxc.lvl",
};
+/* Milos RPMH powerdomains */
+static struct rpmhpd *milos_rpmhpds[] = {
+ [RPMHPD_CX] = &cx,
+ [RPMHPD_CX_AO] = &cx_ao,
+ [RPMHPD_EBI] = &ebi,
+ [RPMHPD_GFX] = &gfx,
+ [RPMHPD_LCX] = &lcx,
+ [RPMHPD_LMX] = &lmx,
+ [RPMHPD_MSS] = &mss,
+ [RPMHPD_MX] = &mx,
+ [RPMHPD_MX_AO] = &mx_ao,
+};
+
+static const struct rpmhpd_desc milos_desc = {
+ .rpmhpds = milos_rpmhpds,
+ .num_pds = ARRAY_SIZE(milos_rpmhpds),
+};
+
/* SA8540P RPMH powerdomains */
static struct rpmhpd *sa8540p_rpmhpds[] = {
[SC8280XP_CX] = &cx,
@@ -723,6 +741,7 @@ static const struct rpmhpd_desc qcs615_desc = {
};
static const struct of_device_id rpmhpd_match_table[] = {
+ { .compatible = "qcom,milos-rpmhpd", .data = &milos_desc },
{ .compatible = "qcom,qcs615-rpmhpd", .data = &qcs615_desc },
{ .compatible = "qcom,qcs8300-rpmhpd", .data = &qcs8300_desc },
{ .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc },
--
2.50.0
On 7/7/25 12:18, Luca Weiss wrote: > Add the power domains exposed by RPMH in the Qualcomm Milos platform. \o/ codenames! > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- > drivers/pmdomain/qcom/rpmhpd.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c > index 078323b85b5648e33dd89e08cf31bdc5ab76d553..e09552a469264f28952fc46c3ab8c125e87310da 100644 > --- a/drivers/pmdomain/qcom/rpmhpd.c > +++ b/drivers/pmdomain/qcom/rpmhpd.c > @@ -217,6 +217,24 @@ static struct rpmhpd gmxc = { > .res_name = "gmxc.lvl", > }; > > +/* Milos RPMH powerdomains */ I can't find any public docs telling us which SoC is Milos (the only relevant result is Bjorn's email asking you to use that name instead of SM7635). So for the sake of future generations could you reference both names in a comment somewhere? Or even the commit message would be enough tbh. Off-topic here, but maybe it would be a good idea to add some Qualcomm platform docs to the kernel with a table of all the publicly known names for each SoC? This would also be really helpful even ignoring codenames just to know that SM8550 is Snapdragon 8 Gen 2 for example. Kind regards, Casey (she/they) > +static struct rpmhpd *milos_rpmhpds[] = { > + [RPMHPD_CX] = &cx, > + [RPMHPD_CX_AO] = &cx_ao, > + [RPMHPD_EBI] = &ebi, > + [RPMHPD_GFX] = &gfx, > + [RPMHPD_LCX] = &lcx, > + [RPMHPD_LMX] = &lmx, > + [RPMHPD_MSS] = &mss, > + [RPMHPD_MX] = &mx, > + [RPMHPD_MX_AO] = &mx_ao, > +}; > + > +static const struct rpmhpd_desc milos_desc = { > + .rpmhpds = milos_rpmhpds, > + .num_pds = ARRAY_SIZE(milos_rpmhpds), > +}; > + > /* SA8540P RPMH powerdomains */ > static struct rpmhpd *sa8540p_rpmhpds[] = { > [SC8280XP_CX] = &cx, > @@ -723,6 +741,7 @@ static const struct rpmhpd_desc qcs615_desc = { > }; > > static const struct of_device_id rpmhpd_match_table[] = { > + { .compatible = "qcom,milos-rpmhpd", .data = &milos_desc }, > { .compatible = "qcom,qcs615-rpmhpd", .data = &qcs615_desc }, > { .compatible = "qcom,qcs8300-rpmhpd", .data = &qcs8300_desc }, > { .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc }, >
Hi Casey, On Mon Jul 7, 2025 at 3:23 PM CEST, Casey Connolly wrote: > > > On 7/7/25 12:18, Luca Weiss wrote: >> Add the power domains exposed by RPMH in the Qualcomm Milos platform. > > \o/ codenames! > >> >> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> >> --- >> drivers/pmdomain/qcom/rpmhpd.c | 19 +++++++++++++++++++ >> 1 file changed, 19 insertions(+) >> >> diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c >> index 078323b85b5648e33dd89e08cf31bdc5ab76d553..e09552a469264f28952fc46c3ab8c125e87310da 100644 >> --- a/drivers/pmdomain/qcom/rpmhpd.c >> +++ b/drivers/pmdomain/qcom/rpmhpd.c >> @@ -217,6 +217,24 @@ static struct rpmhpd gmxc = { >> .res_name = "gmxc.lvl", >> }; >> >> +/* Milos RPMH powerdomains */ > > I can't find any public docs telling us which SoC is Milos (the only > relevant result is Bjorn's email asking you to use that name instead of > SM7635). So for the sake of future generations could you reference both > names in a comment somewhere? Or even the commit message would be enough > tbh. I don't know the full list of model numbers for Milos. I assume it's SM7635, SM6650, SM6650P, QCM6690 and QCS6690 based on the info I could fine, but such info is hard to get. So this is not a definite list that all those are actually Milos, or that this is the full list of Milos chipsets. > Off-topic here, but maybe it would be a good idea to add some Qualcomm > platform docs to the kernel with a table of all the publicly known names > for each SoC? This would also be really helpful even ignoring codenames > just to know that SM8550 is Snapdragon 8 Gen 2 for example. So far my source for this has been the postmarketOS wiki, and this Google Doc, but the latter hasn't been updated for new chips since a year or so, and is also probably not very complete: https://docs.google.com/spreadsheets/d/1WrKHLj_oSoiykhSc6xqXAkT3nlD2hq-fzUPSGiq3Kbc/edit?gid=1270863184#gid=1270863184 And I've got some notes locally for a couple that I regularly need. But I'd love a more central place that isn't specific to postmarketOS for example. Not sure where though? Regards Luca > > Kind regards, > Casey (she/they) > >> +static struct rpmhpd *milos_rpmhpds[] = { >> + [RPMHPD_CX] = &cx, >> + [RPMHPD_CX_AO] = &cx_ao, >> + [RPMHPD_EBI] = &ebi, >> + [RPMHPD_GFX] = &gfx, >> + [RPMHPD_LCX] = &lcx, >> + [RPMHPD_LMX] = &lmx, >> + [RPMHPD_MSS] = &mss, >> + [RPMHPD_MX] = &mx, >> + [RPMHPD_MX_AO] = &mx_ao, >> +}; >> + >> +static const struct rpmhpd_desc milos_desc = { >> + .rpmhpds = milos_rpmhpds, >> + .num_pds = ARRAY_SIZE(milos_rpmhpds), >> +}; >> + >> /* SA8540P RPMH powerdomains */ >> static struct rpmhpd *sa8540p_rpmhpds[] = { >> [SC8280XP_CX] = &cx, >> @@ -723,6 +741,7 @@ static const struct rpmhpd_desc qcs615_desc = { >> }; >> >> static const struct of_device_id rpmhpd_match_table[] = { >> + { .compatible = "qcom,milos-rpmhpd", .data = &milos_desc }, >> { .compatible = "qcom,qcs615-rpmhpd", .data = &qcs615_desc }, >> { .compatible = "qcom,qcs8300-rpmhpd", .data = &qcs8300_desc }, >> { .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc }, >>
On 7/7/25 15:49, Luca Weiss wrote: > Hi Casey, > > On Mon Jul 7, 2025 at 3:23 PM CEST, Casey Connolly wrote: >> >> >> On 7/7/25 12:18, Luca Weiss wrote: >>> Add the power domains exposed by RPMH in the Qualcomm Milos platform. >> >> \o/ codenames! >> >>> >>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> >>> --- >>> drivers/pmdomain/qcom/rpmhpd.c | 19 +++++++++++++++++++ >>> 1 file changed, 19 insertions(+) >>> >>> diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c >>> index 078323b85b5648e33dd89e08cf31bdc5ab76d553..e09552a469264f28952fc46c3ab8c125e87310da 100644 >>> --- a/drivers/pmdomain/qcom/rpmhpd.c >>> +++ b/drivers/pmdomain/qcom/rpmhpd.c >>> @@ -217,6 +217,24 @@ static struct rpmhpd gmxc = { >>> .res_name = "gmxc.lvl", >>> }; >>> >>> +/* Milos RPMH powerdomains */ >> >> I can't find any public docs telling us which SoC is Milos (the only >> relevant result is Bjorn's email asking you to use that name instead of >> SM7635). So for the sake of future generations could you reference both >> names in a comment somewhere? Or even the commit message would be enough >> tbh. > > I don't know the full list of model numbers for Milos. I assume it's > SM7635, SM6650, SM6650P, QCM6690 and QCS6690 based on the info I could > fine, but such info is hard to get. So this is not a definite list that > all those are actually Milos, or that this is the full list of Milos > chipsets. oof, I see... that complicates things. It sure would be good if this list was documented in the kernel though imo. > >> Off-topic here, but maybe it would be a good idea to add some Qualcomm >> platform docs to the kernel with a table of all the publicly known names >> for each SoC? This would also be really helpful even ignoring codenames >> just to know that SM8550 is Snapdragon 8 Gen 2 for example. > > So far my source for this has been the postmarketOS wiki, and this > Google Doc, but the latter hasn't been updated for new chips since a > year or so, and is also probably not very complete: > https://docs.google.com/spreadsheets/d/1WrKHLj_oSoiykhSc6xqXAkT3nlD2hq-fzUPSGiq3Kbc/edit?gid=1270863184#gid=1270863184 > > And I've got some notes locally for a couple that I regularly need. > > But I'd love a more central place that isn't specific to postmarketOS > for example. Not sure where though? kernel docs seem sensible to me? Maybe a wiki on gh/linux-msm? > > Regards > Luca > >> >> Kind regards, >> Casey (she/they) >> >>> +static struct rpmhpd *milos_rpmhpds[] = { >>> + [RPMHPD_CX] = &cx, >>> + [RPMHPD_CX_AO] = &cx_ao, >>> + [RPMHPD_EBI] = &ebi, >>> + [RPMHPD_GFX] = &gfx, >>> + [RPMHPD_LCX] = &lcx, >>> + [RPMHPD_LMX] = &lmx, >>> + [RPMHPD_MSS] = &mss, >>> + [RPMHPD_MX] = &mx, >>> + [RPMHPD_MX_AO] = &mx_ao, >>> +}; >>> + >>> +static const struct rpmhpd_desc milos_desc = { >>> + .rpmhpds = milos_rpmhpds, >>> + .num_pds = ARRAY_SIZE(milos_rpmhpds), >>> +}; >>> + >>> /* SA8540P RPMH powerdomains */ >>> static struct rpmhpd *sa8540p_rpmhpds[] = { >>> [SC8280XP_CX] = &cx, >>> @@ -723,6 +741,7 @@ static const struct rpmhpd_desc qcs615_desc = { >>> }; >>> >>> static const struct of_device_id rpmhpd_match_table[] = { >>> + { .compatible = "qcom,milos-rpmhpd", .data = &milos_desc }, >>> { .compatible = "qcom,qcs615-rpmhpd", .data = &qcs615_desc }, >>> { .compatible = "qcom,qcs8300-rpmhpd", .data = &qcs8300_desc }, >>> { .compatible = "qcom,qdu1000-rpmhpd", .data = &qdu1000_desc }, >>> >
On Mon, Jul 07, 2025 at 04:42:13PM +0200, Casey Connolly wrote: > > > > diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c > > > > index 078323b85b5648e33dd89e08cf31bdc5ab76d553..e09552a469264f28952fc46c3ab8c125e87310da 100644 > > > > --- a/drivers/pmdomain/qcom/rpmhpd.c > > > > +++ b/drivers/pmdomain/qcom/rpmhpd.c > > > > @@ -217,6 +217,24 @@ static struct rpmhpd gmxc = { > > > > .res_name = "gmxc.lvl", > > > > }; > > > > +/* Milos RPMH powerdomains */ > > > > > > I can't find any public docs telling us which SoC is Milos (the only > > > relevant result is Bjorn's email asking you to use that name instead of > > > SM7635). So for the sake of future generations could you reference both > > > names in a comment somewhere? Or even the commit message would be enough > > > tbh. > > > > I don't know the full list of model numbers for Milos. I assume it's > > SM7635, SM6650, SM6650P, QCM6690 and QCS6690 based on the info I could > > fine, but such info is hard to get. So this is not a definite list that > > all those are actually Milos, or that this is the full list of Milos > > chipsets. > > oof, I see... that complicates things. It sure would be good if this list > was documented in the kernel though imo. Kernel is not the place to store mappings or descriptions of some random company products and their names, so no. Also it's not a task of contributor of a new SoC to decipher Qualcomm model numbering and document it anywhere. Best regards, Krzysztof
On 7/7/25 12:18 PM, Luca Weiss wrote: > Add the power domains exposed by RPMH in the Qualcomm Milos platform. > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
© 2016 - 2025 Red Hat, Inc.