Re: [PATCH 4/4] ARM: dts: qcom: msm8974: Start using rpmpd for power domains

2025-06-24 Thread Konrad Dybcio
On 6/23/25 6:44 PM, Luca Weiss wrote:
> On 23-06-2025 2:39 p.m., Konrad Dybcio wrote:
>> On 6/21/25 3:19 PM, Luca Weiss wrote:
>>> Due to historical reasons all msm8974 boards have used the CX power rail
>>> as regulator instead of going through the power domain framework.
>>>
>>> Since rpmpd has gained msm8974 support quite a bit ago, let's start
>>> using it and replace all usages of pm8841_s2 (CX), pm8841_s4 (GFX) and
>>> for the boards using pma8084 pma8084_s2 (CX), pma8084_s7 (GFX).
>>>
>>> For reference, downstream is using GFX power rail as parent-supply for
>>> mmcc's OXILI_GDSC GDSC which then is used for GPU, but nothing there is
>>> modelled upstream.
>>
>> if you use an opp table with described rpmpd levels and bind the GFX
>> domain to gpucc, it should propagate - check it out
> 
> I don't *really* understand what you mean here. I'd be happy if you provided 
> an example (or better yet, a patch) for this.

sm6115

> 
> Also msm8974 does not have gpucc, only gcc and mmcc.

*oh*... right

You would then have to somehow selectively bind the OXILI_GDSC to
VDD_GX, for which I don't know if we have a good interface today..

Konrad



Re: [PATCH 4/4] ARM: dts: qcom: msm8974: Start using rpmpd for power domains

2025-06-23 Thread Luca Weiss

On 23-06-2025 2:39 p.m., Konrad Dybcio wrote:

On 6/21/25 3:19 PM, Luca Weiss wrote:

Due to historical reasons all msm8974 boards have used the CX power rail
as regulator instead of going through the power domain framework.

Since rpmpd has gained msm8974 support quite a bit ago, let's start
using it and replace all usages of pm8841_s2 (CX), pm8841_s4 (GFX) and
for the boards using pma8084 pma8084_s2 (CX), pma8084_s7 (GFX).

For reference, downstream is using GFX power rail as parent-supply for
mmcc's OXILI_GDSC GDSC which then is used for GPU, but nothing there is
modelled upstream.


if you use an opp table with described rpmpd levels and bind the GFX
domain to gpucc, it should propagate - check it out


I don't *really* understand what you mean here. I'd be happy if you 
provided an example (or better yet, a patch) for this.


Also msm8974 does not have gpucc, only gcc and mmcc.





Signed-off-by: Luca Weiss 
---


Reviewed-by: Konrad Dybcio 


Thanks!

Regards
Luca



Konrad





Re: [PATCH 4/4] ARM: dts: qcom: msm8974: Start using rpmpd for power domains

2025-06-23 Thread Konrad Dybcio
On 6/21/25 3:19 PM, Luca Weiss wrote:
> Due to historical reasons all msm8974 boards have used the CX power rail
> as regulator instead of going through the power domain framework.
> 
> Since rpmpd has gained msm8974 support quite a bit ago, let's start
> using it and replace all usages of pm8841_s2 (CX), pm8841_s4 (GFX) and
> for the boards using pma8084 pma8084_s2 (CX), pma8084_s7 (GFX).
> 
> For reference, downstream is using GFX power rail as parent-supply for
> mmcc's OXILI_GDSC GDSC which then is used for GPU, but nothing there is
> modelled upstream.

if you use an opp table with described rpmpd levels and bind the GFX
domain to gpucc, it should propagate - check it out

> 
> Signed-off-by: Luca Weiss 
> ---

Reviewed-by: Konrad Dybcio 

Konrad



[PATCH 4/4] ARM: dts: qcom: msm8974: Start using rpmpd for power domains

2025-06-21 Thread Luca Weiss
Due to historical reasons all msm8974 boards have used the CX power rail
as regulator instead of going through the power domain framework.

Since rpmpd has gained msm8974 support quite a bit ago, let's start
using it and replace all usages of pm8841_s2 (CX), pm8841_s4 (GFX) and
for the boards using pma8084 pma8084_s2 (CX), pma8084_s7 (GFX).

For reference, downstream is using GFX power rail as parent-supply for
mmcc's OXILI_GDSC GDSC which then is used for GPU, but nothing there is
modelled upstream.

Signed-off-by: Luca Weiss 
---
 .../arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts | 13 ---
 .../qcom/qcom-msm8974-lge-nexus5-hammerhead.dts| 12 --
 .../boot/dts/qcom/qcom-msm8974-samsung-hlte.dts| 12 --
 .../dts/qcom/qcom-msm8974-sony-xperia-rhine.dtsi   | 12 --
 arch/arm/boot/dts/qcom/qcom-msm8974.dtsi   | 44 ++
 .../dts/qcom/qcom-msm8974pro-fairphone-fp2.dts |  8 
 arch/arm/boot/dts/qcom/qcom-msm8974pro-htc-m8.dts  | 11 --
 .../dts/qcom/qcom-msm8974pro-oneplus-bacon.dts |  9 -
 .../qcom/qcom-msm8974pro-samsung-klte-common.dtsi  | 11 ++
 ...qcom-msm8974pro-sony-xperia-shinano-common.dtsi | 12 --
 10 files changed, 48 insertions(+), 96 deletions(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts 
b/arch/arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts
index 
34b0cf35fdac8b0bc34ffd27f70f900878a15ff7..d3ae6c6a6f83e2b77849eeeb0c348a8efd9464dd
 100644
--- a/arch/arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom/qcom-apq8074-dragonboard.dts
@@ -198,15 +198,12 @@ &pm8941_wled {
 };
 
 &remoteproc_adsp {
-   cx-supply = <&pm8841_s2>;
-
firmware-name = "qcom/apq8074/adsp.mbn";
 
status = "okay";
 };
 
 &remoteproc_mss {
-   cx-supply = <&pm8841_s2>;
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
@@ -225,20 +222,10 @@ pm8841_s1: s1 {
regulator-max-microvolt = <105>;
};
 
-   pm8841_s2: s2 {
-   regulator-min-microvolt = <50>;
-   regulator-max-microvolt = <105>;
-   };
-
pm8841_s3: s3 {
regulator-min-microvolt = <50>;
regulator-max-microvolt = <105>;
};
-
-   pm8841_s4: s4 {
-   regulator-min-microvolt = <50>;
-   regulator-max-microvolt = <105>;
-   };
};
 
regulators-1 {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts 
b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
index 
261044fdfee866449e9d9d62cef5aea10d88e874..b60a45f5c34193daffe982ecab132315e4b12865
 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974-lge-nexus5-hammerhead.dts
@@ -368,12 +368,10 @@ led@5 {
 };
 
 &remoteproc_adsp {
-   cx-supply = <&pm8841_s2>;
status = "okay";
 };
 
 &remoteproc_mss {
-   cx-supply = <&pm8841_s2>;
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
@@ -389,20 +387,10 @@ pm8841_s1: s1 {
regulator-max-microvolt = <105>;
};
 
-   pm8841_s2: s2 {
-   regulator-min-microvolt = <50>;
-   regulator-max-microvolt = <105>;
-   };
-
pm8841_s3: s3 {
regulator-min-microvolt = <105>;
regulator-max-microvolt = <105>;
};
-
-   pm8841_s4: s4 {
-   regulator-min-microvolt = <815000>;
-   regulator-max-microvolt = <90>;
-   };
};
 
regulators-1 {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974-samsung-hlte.dts 
b/arch/arm/boot/dts/qcom/qcom-msm8974-samsung-hlte.dts
index 
903bb4d125135771504281df50aa11c9b6576a28..214cbcbd21cd18554d83f3c8569cd788868c71b0
 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974-samsung-hlte.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974-samsung-hlte.dts
@@ -152,12 +152,10 @@ touch_ldo_pin: touchscreen-ldo-state {
 };
 
 &remoteproc_adsp {
-   cx-supply = <&pm8841_s2>;
status = "okay";
 };
 
 &remoteproc_mss {
-   cx-supply = <&pm8841_s2>;
mss-supply = <&pm8841_s3>;
mx-supply = <&pm8841_s1>;
pll-supply = <&pm8941_l12>;
@@ -173,20 +171,10 @@ pm8841_s1: s1 {
regulator-max-microvolt = <105>;
};
 
-   pm8841_s2: s2 {
-   regulator-min-microvolt = <50>;
-   regulator-max-microvolt = <105>;
-   };
-
pm8841_s3: s3 {
regulator-min-microvolt = <105>;