2023-07-06 13:03:52

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 0/3] Add support of rpmhpd for SDX75

Hi,

This series adds the support of rpmhpd for sdx75 and also
adds the generic bindings for the PD to be used henceforth.

Thanks,
Rohit.

Rohit Agarwal (3):
dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes
dt-bindings: power: Add compatible for sdx75
soc: qcom: rpmhpd: Add SDX75 power domains

.../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
drivers/soc/qcom/rpmhpd.c | 16 +++++++
include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++
3 files changed, 66 insertions(+)

--
2.7.4



2023-07-06 13:10:11

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 3/3] soc: qcom: rpmhpd: Add SDX75 power domains

Add power domains found in Qualcomm SDX75 SoC.

Signed-off-by: Rohit Agarwal <[email protected]>
---
drivers/soc/qcom/rpmhpd.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
index 63c35a3..080f429 100644
--- a/drivers/soc/qcom/rpmhpd.c
+++ b/drivers/soc/qcom/rpmhpd.c
@@ -307,6 +307,21 @@ static const struct rpmhpd_desc sdx65_desc = {
.num_pds = ARRAY_SIZE(sdx65_rpmhpds),
};

+/* SDX75 RPMH powerdomains */
+static struct rpmhpd *sdx75_rpmhpds[] = {
+ [RPMHPD_CX] = &cx,
+ [RPMHPD_CX_AO] = &cx_ao,
+ [RPMHPD_MSS] = &mss,
+ [RPMHPD_MX] = &mx,
+ [RPMHPD_MX_AO] = &mx_ao,
+ [RPMHPD_MXC] = &mxc,
+};
+
+static const struct rpmhpd_desc sdx75_desc = {
+ .rpmhpds = sdx75_rpmhpds,
+ .num_pds = ARRAY_SIZE(sdx75_rpmhpds),
+};
+
/* SM6350 RPMH powerdomains */
static struct rpmhpd *sm6350_rpmhpds[] = {
[SM6350_CX] = &cx_w_mx_parent,
@@ -545,6 +560,7 @@ static const struct of_device_id rpmhpd_match_table[] = {
{ .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
{ .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
{ .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},
+ { .compatible = "qcom,sdx75-rpmhpd", .data = &sdx75_desc},
{ .compatible = "qcom,sm6350-rpmhpd", .data = &sm6350_desc },
{ .compatible = "qcom,sm8150-rpmhpd", .data = &sm8150_desc },
{ .compatible = "qcom,sm8250-rpmhpd", .data = &sm8250_desc },
--
2.7.4


2023-07-06 13:23:17

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: power: Add compatible for sdx75

Add a compatible string that can be used to list PDs for sdx75.

Signed-off-by: Rohit Agarwal <[email protected]>
---
Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
index f9c211a..9b03c41 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -41,6 +41,7 @@ properties:
- qcom,sdm845-rpmhpd
- qcom,sdx55-rpmhpd
- qcom,sdx65-rpmhpd
+ - qcom,sdx75-rpmhpd
- qcom,sm6115-rpmpd
- qcom,sm6125-rpmpd
- qcom,sm6350-rpmhpd
--
2.7.4


2023-07-06 13:24:19

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes

Add Generic RPM(h) Power Domain indexes that can be used
for all the Qualcomm SoC henceforth.

Signed-off-by: Rohit Agarwal <[email protected]>
Suggested-by: Konrad Dybcio <[email protected]>
---
include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index 83be996..6498251 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -4,6 +4,55 @@
#ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H
#define _DT_BINDINGS_POWER_QCOM_RPMPD_H

+/* Generic RPMH Power Domain Indexes */
+#define RPMHPD_CX 0
+#define RPMHPD_MX 1
+#define RPMHPD_CX_AO 2
+#define RPMHPD_MX_AO 3
+#define RPMHPD_GFX 4
+#define RPMHPD_MSS 5
+#define RPMHPD_EBI 6
+#define RPMHPD_LCX 7
+#define RPMHPD_LMX 8
+#define RPMHPD_MMCX 9
+#define RPMHPD_MMCX_AO 10
+#define RPMHPD_MXC 11
+#define RPMHPD_MXC_AO 12
+#define RPMHPD_NSP 13
+#define RPMHPD_NSP0 14
+#define RPMHPD_NSP1 15
+#define RPMHPD_QPHY 16
+#define RPMHPD_DDR 17
+#define RPMHPD_XO 18
+
+/* Generic RPM Power Domain Indexes */
+#define RPMPD_VDDCX 0
+#define RPMPD_VDDCX_AO 1
+#define RPMPD_VDDMX 2
+#define RPMPD_VDDMX_AO 3
+#define RPMPD_VDDCX_VFL 4
+#define RPMPD_VDDMX_VFL 5
+#define RPMPD_VDDCX_VFC 6
+#define RPMPD_LPI_CX 7
+#define RPMPD_LPI_MX 8
+#define RPMPD_SSCCX 9
+#define RPMPD_SSCCX_VFL 10
+#define RPMPD_SSCMX 11
+#define RPMPD_SSCMX_VFL 12
+#define RPMPD_VDDSSCX 13
+#define RPMPD_VDDSSCX_VFC 14
+#define RPMPD_VDDGFX 15
+#define RPMPD_VDDGFX_VFC 16
+#define RPMPD_VDDGX 17
+#define RPMPD_VDDGX_AO 18
+#define RPMPD_VDDMDCX 19
+#define RPMPD_VDDMDCX_AO 20
+#define RPMPD_VDDMDCX_VFC 21
+#define RPMPD_VDDMD 22
+#define RPMPD_VDDMD_AO 23
+#define RPMPD_LPICX_VFL 24
+#define RPMPD_LPIMX_VFL 25
+
/* SA8775P Power Domain Indexes */
#define SA8775P_CX 0
#define SA8775P_CX_AO 1
--
2.7.4


2023-07-06 14:48:19

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes


On 7/6/2023 8:06 PM, Krzysztof Kozlowski wrote:
> On 06/07/2023 14:49, Rohit Agarwal wrote:
>> Add Generic RPM(h) Power Domain indexes that can be used
>> for all the Qualcomm SoC henceforth.
>>
>> Signed-off-by: Rohit Agarwal <[email protected]>
>> Suggested-by: Konrad Dybcio <[email protected]>
>> ---
>> include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 49 insertions(+)
> Didn't you just send a patch doing similar? There is no changelog, no
> versioning, how can anyone figure out which patch is the latest or which
> one should be ignored?
No, that patch was removing all the other SoCs macro which was against
the ABI.
So dropping that series completely and this being new series didnt
include the versioning.
Since all the patches in that series needed to be dropped I thought to
start a new series.

Thanks,
Rohit.
> Best regards,
> Krzysztof
>

2023-07-06 15:01:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes

On 06/07/2023 14:49, Rohit Agarwal wrote:
> Add Generic RPM(h) Power Domain indexes that can be used
> for all the Qualcomm SoC henceforth.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> Suggested-by: Konrad Dybcio <[email protected]>
> ---
> include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)

Didn't you just send a patch doing similar? There is no changelog, no
versioning, how can anyone figure out which patch is the latest or which
one should be ignored?

Best regards,
Krzysztof


2023-07-06 15:06:11

by Pavan Kondeti

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes

On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
> Add Generic RPM(h) Power Domain indexes that can be used
> for all the Qualcomm SoC henceforth.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> Suggested-by: Konrad Dybcio <[email protected]>

Does it make sense to give this link [1] so that we know what is
Konrad's suggestion and the discussion around it?

[1]
https://lore.kernel.org/all/[email protected]/
> ---
> include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
> index 83be996..6498251 100644
> --- a/include/dt-bindings/power/qcom-rpmpd.h
> +++ b/include/dt-bindings/power/qcom-rpmpd.h
> @@ -4,6 +4,55 @@
> #ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H
> #define _DT_BINDINGS_POWER_QCOM_RPMPD_H
>
> +/* Generic RPMH Power Domain Indexes */
> +#define RPMHPD_CX 0
> +#define RPMHPD_MX 1
> +#define RPMHPD_CX_AO 2
> +#define RPMHPD_MX_AO 3
> +#define RPMHPD_GFX 4
> +#define RPMHPD_MSS 5
> +#define RPMHPD_EBI 6
> +#define RPMHPD_LCX 7
> +#define RPMHPD_LMX 8
> +#define RPMHPD_MMCX 9
> +#define RPMHPD_MMCX_AO 10
> +#define RPMHPD_MXC 11
> +#define RPMHPD_MXC_AO 12
> +#define RPMHPD_NSP 13
> +#define RPMHPD_NSP0 14
> +#define RPMHPD_NSP1 15
> +#define RPMHPD_QPHY 16
> +#define RPMHPD_DDR 17
> +#define RPMHPD_XO 18
> +
> +/* Generic RPM Power Domain Indexes */
> +#define RPMPD_VDDCX 0
> +#define RPMPD_VDDCX_AO 1
> +#define RPMPD_VDDMX 2
> +#define RPMPD_VDDMX_AO 3
> +#define RPMPD_VDDCX_VFL 4
> +#define RPMPD_VDDMX_VFL 5
> +#define RPMPD_VDDCX_VFC 6
> +#define RPMPD_LPI_CX 7
> +#define RPMPD_LPI_MX 8
> +#define RPMPD_SSCCX 9
> +#define RPMPD_SSCCX_VFL 10
> +#define RPMPD_SSCMX 11
> +#define RPMPD_SSCMX_VFL 12
> +#define RPMPD_VDDSSCX 13
> +#define RPMPD_VDDSSCX_VFC 14
> +#define RPMPD_VDDGFX 15
> +#define RPMPD_VDDGFX_VFC 16
> +#define RPMPD_VDDGX 17
> +#define RPMPD_VDDGX_AO 18
> +#define RPMPD_VDDMDCX 19
> +#define RPMPD_VDDMDCX_AO 20
> +#define RPMPD_VDDMDCX_VFC 21
> +#define RPMPD_VDDMD 22
> +#define RPMPD_VDDMD_AO 23
> +#define RPMPD_LPICX_VFL 24
> +#define RPMPD_LPIMX_VFL 25
> +

How did you come up with this list? A union of all SoCs supported by
RPMh driver?

> /* SA8775P Power Domain Indexes */
> #define SA8775P_CX 0
> #define SA8775P_CX_AO 1
> --
> 2.7.4
>

Thanks,
Pavan

2023-07-06 15:06:21

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes


On 7/6/2023 8:00 PM, Pavan Kondeti wrote:
> On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
>> Add Generic RPM(h) Power Domain indexes that can be used
>> for all the Qualcomm SoC henceforth.
>>
>> Signed-off-by: Rohit Agarwal <[email protected]>
>> Suggested-by: Konrad Dybcio <[email protected]>
> Does it make sense to give this link [1] so that we know what is
> Konrad's suggestion and the discussion around it?
>
> [1]
> https://lore.kernel.org/all/[email protected]/
Yes, could be given in the cover letter.
>> ---
>> include/dt-bindings/power/qcom-rpmpd.h | 49 ++++++++++++++++++++++++++++++++++
>> 1 file changed, 49 insertions(+)
>>
>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
>> index 83be996..6498251 100644
>> --- a/include/dt-bindings/power/qcom-rpmpd.h
>> +++ b/include/dt-bindings/power/qcom-rpmpd.h
>> @@ -4,6 +4,55 @@
>> #ifndef _DT_BINDINGS_POWER_QCOM_RPMPD_H
>> #define _DT_BINDINGS_POWER_QCOM_RPMPD_H
>>
>> +/* Generic RPMH Power Domain Indexes */
>> +#define RPMHPD_CX 0
>> +#define RPMHPD_MX 1
>> +#define RPMHPD_CX_AO 2
>> +#define RPMHPD_MX_AO 3
>> +#define RPMHPD_GFX 4
>> +#define RPMHPD_MSS 5
>> +#define RPMHPD_EBI 6
>> +#define RPMHPD_LCX 7
>> +#define RPMHPD_LMX 8
>> +#define RPMHPD_MMCX 9
>> +#define RPMHPD_MMCX_AO 10
>> +#define RPMHPD_MXC 11
>> +#define RPMHPD_MXC_AO 12
>> +#define RPMHPD_NSP 13
>> +#define RPMHPD_NSP0 14
>> +#define RPMHPD_NSP1 15
>> +#define RPMHPD_QPHY 16
>> +#define RPMHPD_DDR 17
>> +#define RPMHPD_XO 18
>> +
>> +/* Generic RPM Power Domain Indexes */
>> +#define RPMPD_VDDCX 0
>> +#define RPMPD_VDDCX_AO 1
>> +#define RPMPD_VDDMX 2
>> +#define RPMPD_VDDMX_AO 3
>> +#define RPMPD_VDDCX_VFL 4
>> +#define RPMPD_VDDMX_VFL 5
>> +#define RPMPD_VDDCX_VFC 6
>> +#define RPMPD_LPI_CX 7
>> +#define RPMPD_LPI_MX 8
>> +#define RPMPD_SSCCX 9
>> +#define RPMPD_SSCCX_VFL 10
>> +#define RPMPD_SSCMX 11
>> +#define RPMPD_SSCMX_VFL 12
>> +#define RPMPD_VDDSSCX 13
>> +#define RPMPD_VDDSSCX_VFC 14
>> +#define RPMPD_VDDGFX 15
>> +#define RPMPD_VDDGFX_VFC 16
>> +#define RPMPD_VDDGX 17
>> +#define RPMPD_VDDGX_AO 18
>> +#define RPMPD_VDDMDCX 19
>> +#define RPMPD_VDDMDCX_AO 20
>> +#define RPMPD_VDDMDCX_VFC 21
>> +#define RPMPD_VDDMD 22
>> +#define RPMPD_VDDMD_AO 23
>> +#define RPMPD_LPICX_VFL 24
>> +#define RPMPD_LPIMX_VFL 25
>> +
> How did you come up with this list? A union of all SoCs supported by
> RPMh driver?
Yes, union of all the SoCs and arranged based on frequencies of usage.

Thanks,
Rohit.
>> /* SA8775P Power Domain Indexes */
>> #define SA8775P_CX 0
>> #define SA8775P_CX_AO 1
>> --
>> 2.7.4
>>
> Thanks,
> Pavan

2023-07-06 15:37:08

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes


On 7/6/2023 8:30 PM, Konrad Dybcio wrote:
> On 6.07.2023 16:47, Rohit Agarwal wrote:
>> On 7/6/2023 8:00 PM, Pavan Kondeti wrote:
>>> On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
>>>> Add Generic RPM(h) Power Domain indexes that can be used
>>>> for all the Qualcomm SoC henceforth.
>>>>
>>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>>> Suggested-by: Konrad Dybcio <[email protected]>
>>> Does it make sense to give this link [1] so that we know what is
>>> Konrad's suggestion and the discussion around it?
>>>
>>> [1]
>>> https://lore.kernel.org/all/[email protected]/
>> Yes, could be given in the cover letter.
>>>> ---
> [...]
>
>>>> +#define RPMPD_VDDMD        22
>>>> +#define RPMPD_VDDMD_AO        23
>>>> +#define RPMPD_LPICX_VFL        24
>>>> +#define RPMPD_LPIMX_VFL        25
>>>> +
>>> How did you come up with this list? A union of all SoCs supported by
>>> RPMh driver?
>> Yes, union of all the SoCs and arranged based on frequencies of usage.
> The latter part is very thoughtful, thanks for taking that into account.
>
> That said (and I really don't wanna be picky here, I'm just coming up with
> ideas a bit later than I'd like to).. Perhaps this patch should be limited
> to RPMhPD [1] and the definitions could be moved to a new binding, so:
So should we not update anything in this old binding and completely move
to the new bindings?
rpmhpd.h?
Not even rpmpd_* bindings?

Thanks,
Rohit.
> include/dt-bindings/power/qcom,rpmhpd.h
> // this way we don't have to add RPMHPD_
> #define CX 0
Ok, will remove this as well.
> which would result in us being able to do:
>
> #include ....rpmhpd.h
> [...]
> power-domains = <&rpmhpd CX>;
>
> in the device tree
>
> which is even more concise!

Yes

Thanks,
Rohit.

>
> [1] The old RPM SMD platforms have some duplications in the names..
> No point in duplicating that. The oldest entries remember 2013 so
> it's easy to see how we had some dirt build up there.
>
> Konrad
>> Thanks,
>> Rohit.
>>>>   /* SA8775P Power Domain Indexes */
>>>>   #define SA8775P_CX    0
>>>>   #define SA8775P_CX_AO    1
>>>> --
>>>> 2.7.4
>>>>
>>> Thanks,
>>> Pavan

2023-07-06 15:40:33

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes

On 6.07.2023 17:15, Rohit Agarwal wrote:
>
> On 7/6/2023 8:30 PM, Konrad Dybcio wrote:
>> On 6.07.2023 16:47, Rohit Agarwal wrote:
>>> On 7/6/2023 8:00 PM, Pavan Kondeti wrote:
>>>> On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
>>>>> Add Generic RPM(h) Power Domain indexes that can be used
>>>>> for all the Qualcomm SoC henceforth.
>>>>>
>>>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>>>> Suggested-by: Konrad Dybcio <[email protected]>
>>>> Does it make sense to give this link [1] so that we know what is
>>>> Konrad's suggestion and the discussion around it?
>>>>
>>>> [1]
>>>> https://lore.kernel.org/all/[email protected]/
>>> Yes, could be given in the cover letter.
>>>>> ---
>> [...]
>>
>>>>> +#define RPMPD_VDDMD        22
>>>>> +#define RPMPD_VDDMD_AO        23
>>>>> +#define RPMPD_LPICX_VFL        24
>>>>> +#define RPMPD_LPIMX_VFL        25
>>>>> +
>>>> How did you come up with this list? A union of all SoCs supported by
>>>> RPMh driver?
>>> Yes, union of all the SoCs and arranged based on frequencies of usage.
>> The latter part is very thoughtful, thanks for taking that into account.
>>
>> That said (and I really don't wanna be picky here, I'm just coming up with
>> ideas a bit later than I'd like to).. Perhaps this patch should be limited
>> to RPMhPD [1] and the definitions could be moved to a new binding, so:
> So should we not update anything in this old binding and completely move to the new bindings?
Yes, create qcom,rpmhpd.h and add new common entries there and let this
ship sink

> rpmhpd.h?
> Not even rpmpd_* bindings?
Again, due to [1], let's not touch that for now. We'll worry about that
when somebody will try to add a new entry to that driver.

Konrad
>
> Thanks,
> Rohit.
>> include/dt-bindings/power/qcom,rpmhpd.h
>> // this way we don't have to add RPMHPD_
>> #define CX    0
> Ok, will remove this as well.
>> which would result in us being able to do:
>>
>> #include ....rpmhpd.h
>> [...]
>> power-domains = <&rpmhpd CX>;
>>
>> in the device tree
>>
>> which is even more concise!
>
> Yes
>
> Thanks,
> Rohit.
>
>>
>> [1] The old RPM SMD platforms have some duplications in the names..
>>      No point in duplicating that. The oldest entries remember 2013 so
>>      it's easy to see how we had some dirt build up there.
>>
>> Konrad
>>> Thanks,
>>> Rohit.
>>>>>    /* SA8775P Power Domain Indexes */
>>>>>    #define SA8775P_CX    0
>>>>>    #define SA8775P_CX_AO    1
>>>>> -- 
>>>>> 2.7.4
>>>>>
>>>> Thanks,
>>>> Pavan

2023-07-06 15:43:04

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes


On 7/6/2023 8:52 PM, Konrad Dybcio wrote:
> On 6.07.2023 17:15, Rohit Agarwal wrote:
>> On 7/6/2023 8:30 PM, Konrad Dybcio wrote:
>>> On 6.07.2023 16:47, Rohit Agarwal wrote:
>>>> On 7/6/2023 8:00 PM, Pavan Kondeti wrote:
>>>>> On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
>>>>>> Add Generic RPM(h) Power Domain indexes that can be used
>>>>>> for all the Qualcomm SoC henceforth.
>>>>>>
>>>>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>>>>> Suggested-by: Konrad Dybcio <[email protected]>
>>>>> Does it make sense to give this link [1] so that we know what is
>>>>> Konrad's suggestion and the discussion around it?
>>>>>
>>>>> [1]
>>>>> https://lore.kernel.org/all/[email protected]/
>>>> Yes, could be given in the cover letter.
>>>>>> ---
>>> [...]
>>>
>>>>>> +#define RPMPD_VDDMD        22
>>>>>> +#define RPMPD_VDDMD_AO        23
>>>>>> +#define RPMPD_LPICX_VFL        24
>>>>>> +#define RPMPD_LPIMX_VFL        25
>>>>>> +
>>>>> How did you come up with this list? A union of all SoCs supported by
>>>>> RPMh driver?
>>>> Yes, union of all the SoCs and arranged based on frequencies of usage.
>>> The latter part is very thoughtful, thanks for taking that into account.
>>>
>>> That said (and I really don't wanna be picky here, I'm just coming up with
>>> ideas a bit later than I'd like to).. Perhaps this patch should be limited
>>> to RPMhPD [1] and the definitions could be moved to a new binding, so:
>> So should we not update anything in this old binding and completely move to the new bindings?
> Yes, create qcom,rpmhpd.h and add new common entries there and let this
> ship sink
>
>> rpmhpd.h?
>> Not even rpmpd_* bindings?
> Again, due to [1], let's not touch that for now. We'll worry about that
> when somebody will try to add a new entry to that driver.
Yes.

Thanks,
Rohit.
>
> Konrad
>> Thanks,
>> Rohit.
>>> include/dt-bindings/power/qcom,rpmhpd.h
>>> // this way we don't have to add RPMHPD_
>>> #define CX    0
>> Ok, will remove this as well.
>>> which would result in us being able to do:
>>>
>>> #include ....rpmhpd.h
>>> [...]
>>> power-domains = <&rpmhpd CX>;
>>>
>>> in the device tree
>>>
>>> which is even more concise!
>> Yes
>>
>> Thanks,
>> Rohit.
>>
>>> [1] The old RPM SMD platforms have some duplications in the names..
>>>      No point in duplicating that. The oldest entries remember 2013 so
>>>      it's easy to see how we had some dirt build up there.
>>>
>>> Konrad
>>>> Thanks,
>>>> Rohit.
>>>>>>    /* SA8775P Power Domain Indexes */
>>>>>>    #define SA8775P_CX    0
>>>>>>    #define SA8775P_CX_AO    1
>>>>>> --
>>>>>> 2.7.4
>>>>>>
>>>>> Thanks,
>>>>> Pavan

2023-07-06 15:44:56

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: power: rpmpd: Add Generic RPM(h) PD indexes

On 6.07.2023 16:47, Rohit Agarwal wrote:
>
> On 7/6/2023 8:00 PM, Pavan Kondeti wrote:
>> On Thu, Jul 06, 2023 at 06:19:51PM +0530, Rohit Agarwal wrote:
>>> Add Generic RPM(h) Power Domain indexes that can be used
>>> for all the Qualcomm SoC henceforth.
>>>
>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>> Suggested-by: Konrad Dybcio <[email protected]>
>> Does it make sense to give this link [1] so that we know what is
>> Konrad's suggestion and the discussion around it?
>>
>> [1]
>> https://lore.kernel.org/all/[email protected]/
> Yes, could be given in the cover letter.
>>> ---
[...]

>>> +#define RPMPD_VDDMD        22
>>> +#define RPMPD_VDDMD_AO        23
>>> +#define RPMPD_LPICX_VFL        24
>>> +#define RPMPD_LPIMX_VFL        25
>>> +
>> How did you come up with this list? A union of all SoCs supported by
>> RPMh driver?
> Yes, union of all the SoCs and arranged based on frequencies of usage.
The latter part is very thoughtful, thanks for taking that into account.

That said (and I really don't wanna be picky here, I'm just coming up with
ideas a bit later than I'd like to).. Perhaps this patch should be limited
to RPMhPD [1] and the definitions could be moved to a new binding, so:

include/dt-bindings/power/qcom,rpmhpd.h
// this way we don't have to add RPMHPD_
#define CX 0

which would result in us being able to do:

#include ....rpmhpd.h
[...]
power-domains = <&rpmhpd CX>;

in the device tree

which is even more concise!


[1] The old RPM SMD platforms have some duplications in the names..
No point in duplicating that. The oldest entries remember 2013 so
it's easy to see how we had some dirt build up there.

Konrad
>
> Thanks,
> Rohit.
>>>   /* SA8775P Power Domain Indexes */
>>>   #define SA8775P_CX    0
>>>   #define SA8775P_CX_AO    1
>>> -- 
>>> 2.7.4
>>>
>> Thanks,
>> Pavan