[3/3] arm64: dts: qcom: sm8550: Add missing RPMhPD OPP levels

Message ID 20230517-topic-kailua-rpmhpd-v1-3-cd3013d051a6@linaro.org
State New
Headers
Series More RPMhPD levels + sm8550 |

Commit Message

Konrad Dybcio May 17, 2023, 1:19 p.m. UTC
  We need more granularity for things like the GPU. Add the missing levels.

This unfortunately requires some re-indexing, resulting in an ugly diff.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8550.dtsi | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)
  

Comments

Dmitry Baryshkov May 17, 2023, 1:25 p.m. UTC | #1
On Wed, 17 May 2023 at 16:20, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> We need more granularity for things like the GPU. Add the missing levels.
>
> This unfortunately requires some re-indexing, resulting in an ugly diff.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8550.dtsi | 36 ++++++++++++++++++++++++++++--------
>  1 file changed, 28 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> index 6e9bad8f6f33..0c987dd4e4e5 100644
> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
> @@ -3616,35 +3616,55 @@ rpmhpd_opp_min_svs: opp2 {
>                                                 opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
>                                         };
>
> -                                       rpmhpd_opp_low_svs: opp3 {
> +                                       rpmhpd_opp_lov_svs_d2: opp3 {
> +                                               opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
> +                                       };
>

Maybe we should stop using the indices for OPP entries and switch to
encoding levels instead?
  
Konrad Dybcio May 17, 2023, 1:25 p.m. UTC | #2
On 17.05.2023 15:25, Dmitry Baryshkov wrote:
> On Wed, 17 May 2023 at 16:20, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> We need more granularity for things like the GPU. Add the missing levels.
>>
>> This unfortunately requires some re-indexing, resulting in an ugly diff.
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>>  arch/arm64/boot/dts/qcom/sm8550.dtsi | 36 ++++++++++++++++++++++++++++--------
>>  1 file changed, 28 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> index 6e9bad8f6f33..0c987dd4e4e5 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>> @@ -3616,35 +3616,55 @@ rpmhpd_opp_min_svs: opp2 {
>>                                                 opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
>>                                         };
>>
>> -                                       rpmhpd_opp_low_svs: opp3 {
>> +                                       rpmhpd_opp_lov_svs_d2: opp3 {
>> +                                               opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
>> +                                       };
>>
> 
> Maybe we should stop using the indices for OPP entries and switch to
> encoding levels instead?
I think we should just retire this and register a hardcoded OPP table
in the .c driver.

Konrad
>
  
Konrad Dybcio May 17, 2023, 1:28 p.m. UTC | #3
On 17.05.2023 15:25, Konrad Dybcio wrote:
> 
> 
> On 17.05.2023 15:25, Dmitry Baryshkov wrote:
>> On Wed, 17 May 2023 at 16:20, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>>
>>> We need more granularity for things like the GPU. Add the missing levels.
>>>
>>> This unfortunately requires some re-indexing, resulting in an ugly diff.
>>>
>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sm8550.dtsi | 36 ++++++++++++++++++++++++++++--------
>>>  1 file changed, 28 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>>> index 6e9bad8f6f33..0c987dd4e4e5 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
>>> @@ -3616,35 +3616,55 @@ rpmhpd_opp_min_svs: opp2 {
>>>                                                 opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
>>>                                         };
>>>
>>> -                                       rpmhpd_opp_low_svs: opp3 {
>>> +                                       rpmhpd_opp_lov_svs_d2: opp3 {
>>> +                                               opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
>>> +                                       };
>>>
>>
>> Maybe we should stop using the indices for OPP entries and switch to
>> encoding levels instead?
> I think we should just retire this and register a hardcoded OPP table
> in the .c driver.
But then we don't have any required-opps to reference... yeah the nodes
should probably be renamed to opp-<levelvalue>

Konrad
> 
> Konrad
>>
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 6e9bad8f6f33..0c987dd4e4e5 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -3616,35 +3616,55 @@  rpmhpd_opp_min_svs: opp2 {
 						opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
 					};
 
-					rpmhpd_opp_low_svs: opp3 {
+					rpmhpd_opp_lov_svs_d2: opp3 {
+						opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D2>;
+					};
+
+					rpmhpd_opp_lov_svs_d1: opp4 {
+						opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D1>;
+					};
+
+					rpmhpd_opp_lov_svs_d0: opp5 {
+						opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_D0>;
+					};
+
+					rpmhpd_opp_low_svs: opp6 {
 						opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
 					};
 
-					rpmhpd_opp_svs: opp4 {
+					rpmhpd_opp_low_svs_l1: opp7 {
+						opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS_L1>;
+					};
+
+					rpmhpd_opp_svs: opp8 {
 						opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
 					};
 
-					rpmhpd_opp_svs_l1: opp5 {
+					rpmhpd_opp_svs_l0: opp9 {
+						opp-level = <RPMH_REGULATOR_LEVEL_SVS_L0>;
+					};
+
+					rpmhpd_opp_svs_l1: opp10 {
 						opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
 					};
 
-					rpmhpd_opp_nom: opp6 {
+					rpmhpd_opp_nom: opp11 {
 						opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
 					};
 
-					rpmhpd_opp_nom_l1: opp7 {
+					rpmhpd_opp_nom_l1: opp12 {
 						opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
 					};
 
-					rpmhpd_opp_nom_l2: opp8 {
+					rpmhpd_opp_nom_l2: opp13 {
 						opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
 					};
 
-					rpmhpd_opp_turbo: opp9 {
+					rpmhpd_opp_turbo: opp14 {
 						opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
 					};
 
-					rpmhpd_opp_turbo_l1: opp10 {
+					rpmhpd_opp_turbo_l1: opp15 {
 						opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
 					};
 				};