2023-07-19 05:33:57

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes

Add Generic RPMh Power Domain indexes that can be used
for all the Qualcomm SoC henceforth.
The power domain indexes of these bindings are based on compatibility
with current targets like SM8[2345]50 targets.

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

diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
new file mode 100644
index 0000000..7c201a6
--- /dev/null
+++ b/include/dt-bindings/power/qcom,rpmhpd.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_POWER_QCOM_RPMHPD_H
+#define _DT_BINDINGS_POWER_QCOM_RPMHPD_H
+
+/* Generic RPMH Power Domain Indexes */
+#define RPMHPD_CX 0
+#define RPMHPD_CX_AO 1
+#define RPMHPD_EBI 2
+#define RPMHPD_GFX 3
+#define RPMHPD_LCX 4
+#define RPMHPD_LMX 5
+#define RPMHPD_MMCX 6
+#define RPMHPD_MMCX_AO 7
+#define RPMHPD_MX 8
+#define RPMHPD_MX_AO 9
+#define RPMHPD_MXC 10
+#define RPMHPD_MXC_AO 11
+#define RPMHPD_MSS 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
+
+#endif
--
2.7.4



2023-07-19 09:19:55

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes



On 7/19/2023 10:52 AM, Rohit Agarwal wrote:
> Add Generic RPMh Power Domain indexes that can be used
> for all the Qualcomm SoC henceforth.
> The power domain indexes of these bindings are based on compatibility
> with current targets like SM8[2345]50 targets.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> Suggested-by: Konrad Dybcio <[email protected]>

Signed-off-by should be followed by Suggested-by ?

-Mukesh

> ---
> include/dt-bindings/power/qcom,rpmhpd.h | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 include/dt-bindings/power/qcom,rpmhpd.h
>
> diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
> new file mode 100644
> index 0000000..7c201a6
> --- /dev/null
> +++ b/include/dt-bindings/power/qcom,rpmhpd.h
> @@ -0,0 +1,30 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef _DT_BINDINGS_POWER_QCOM_RPMHPD_H
> +#define _DT_BINDINGS_POWER_QCOM_RPMHPD_H
> +
> +/* Generic RPMH Power Domain Indexes */
> +#define RPMHPD_CX 0
> +#define RPMHPD_CX_AO 1
> +#define RPMHPD_EBI 2
> +#define RPMHPD_GFX 3
> +#define RPMHPD_LCX 4
> +#define RPMHPD_LMX 5
> +#define RPMHPD_MMCX 6
> +#define RPMHPD_MMCX_AO 7
> +#define RPMHPD_MX 8
> +#define RPMHPD_MX_AO 9
> +#define RPMHPD_MXC 10
> +#define RPMHPD_MXC_AO 11
> +#define RPMHPD_MSS 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
> +
> +#endif

2023-07-19 09:28:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes

On 19/07/2023 07:22, Rohit Agarwal wrote:
> Add Generic RPMh Power Domain indexes that can be used
> for all the Qualcomm SoC henceforth.
> The power domain indexes of these bindings are based on compatibility
> with current targets like SM8[2345]50 targets.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> Suggested-by: Konrad Dybcio <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-07-21 06:27:32

by Pavan Kondeti

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes

On Wed, Jul 19, 2023 at 10:52:41AM +0530, Rohit Agarwal wrote:
> Add Generic RPMh Power Domain indexes that can be used
> for all the Qualcomm SoC henceforth.
> The power domain indexes of these bindings are based on compatibility
> with current targets like SM8[2345]50 targets.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> Suggested-by: Konrad Dybcio <[email protected]>
> ---
> include/dt-bindings/power/qcom,rpmhpd.h | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 include/dt-bindings/power/qcom,rpmhpd.h
>
> diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
> new file mode 100644
> index 0000000..7c201a6
> --- /dev/null
> +++ b/include/dt-bindings/power/qcom,rpmhpd.h
> @@ -0,0 +1,30 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef _DT_BINDINGS_POWER_QCOM_RPMHPD_H
> +#define _DT_BINDINGS_POWER_QCOM_RPMHPD_H
> +
> +/* Generic RPMH Power Domain Indexes */
> +#define RPMHPD_CX 0
> +#define RPMHPD_CX_AO 1
> +#define RPMHPD_EBI 2
> +#define RPMHPD_GFX 3
> +#define RPMHPD_LCX 4
> +#define RPMHPD_LMX 5
> +#define RPMHPD_MMCX 6
> +#define RPMHPD_MMCX_AO 7
> +#define RPMHPD_MX 8
> +#define RPMHPD_MX_AO 9
> +#define RPMHPD_MXC 10
> +#define RPMHPD_MXC_AO 11
> +#define RPMHPD_MSS 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
> +
> +#endif
> --

I see the PD performance levels (RPMH_REGULATOR_LEVEL_xxx) are still
coming from qcom-rpmpd.h. Which means Socs with RPMh also need to
include the older header for these definitions along with this newly
created header. something to improve for the clarity sake?

Thanks,
Pavan

2023-07-21 13:21:21

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes


On 7/21/2023 11:14 AM, Pavan Kondeti wrote:
> On Wed, Jul 19, 2023 at 10:52:41AM +0530, Rohit Agarwal wrote:
>> Add Generic RPMh Power Domain indexes that can be used
>> for all the Qualcomm SoC henceforth.
>> The power domain indexes of these bindings are based on compatibility
>> with current targets like SM8[2345]50 targets.
>>
>> Signed-off-by: Rohit Agarwal <[email protected]>
>> Suggested-by: Konrad Dybcio <[email protected]>
>> ---
>> include/dt-bindings/power/qcom,rpmhpd.h | 30 ++++++++++++++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>> create mode 100644 include/dt-bindings/power/qcom,rpmhpd.h
>>
>> diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
>> new file mode 100644
>> index 0000000..7c201a6
>> --- /dev/null
>> +++ b/include/dt-bindings/power/qcom,rpmhpd.h
>> @@ -0,0 +1,30 @@
>> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
>> +/*
>> + * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#ifndef _DT_BINDINGS_POWER_QCOM_RPMHPD_H
>> +#define _DT_BINDINGS_POWER_QCOM_RPMHPD_H
>> +
>> +/* Generic RPMH Power Domain Indexes */
>> +#define RPMHPD_CX 0
>> +#define RPMHPD_CX_AO 1
>> +#define RPMHPD_EBI 2
>> +#define RPMHPD_GFX 3
>> +#define RPMHPD_LCX 4
>> +#define RPMHPD_LMX 5
>> +#define RPMHPD_MMCX 6
>> +#define RPMHPD_MMCX_AO 7
>> +#define RPMHPD_MX 8
>> +#define RPMHPD_MX_AO 9
>> +#define RPMHPD_MXC 10
>> +#define RPMHPD_MXC_AO 11
>> +#define RPMHPD_MSS 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
>> +
>> +#endif
>> --
> I see the PD performance levels (RPMH_REGULATOR_LEVEL_xxx) are still
> coming from qcom-rpmpd.h. Which means Socs with RPMh also need to
> include the older header for these definitions along with this newly
> created header. something to improve for the clarity sake?
Agreed. I think we can move these to the new header so that the new SoC
with RPMH can completely
move to rpmhpd.h.
Ok. Will wait for anymore suggestions before updating this version.

Thanks,
Rohit.
>
> Thanks,
> Pavan

2023-07-22 03:37:44

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes

On Fri, Jul 21, 2023 at 06:47:42PM +0530, Rohit Agarwal wrote:
> On 7/21/2023 11:14 AM, Pavan Kondeti wrote:
> > On Wed, Jul 19, 2023 at 10:52:41AM +0530, Rohit Agarwal wrote:
> > > diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
[..]
> > > +
> > > +#endif
> > > --
> > I see the PD performance levels (RPMH_REGULATOR_LEVEL_xxx) are still
> > coming from qcom-rpmpd.h. Which means Socs with RPMh also need to
> > include the older header for these definitions along with this newly
> > created header. something to improve for the clarity sake?
> Agreed. I think we can move these to the new header so that the new SoC with
> RPMH can completely
> move to rpmhpd.h.

Sounds very reasonable, please do that in a follow up patch.
I'm picking this as is.

Thanks,
Bjorn

2023-07-25 08:42:25

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: power: qcom,rpmhpd: Add Generic RPMh PD indexes


On 7/22/2023 8:35 AM, Bjorn Andersson wrote:
> On Fri, Jul 21, 2023 at 06:47:42PM +0530, Rohit Agarwal wrote:
>> On 7/21/2023 11:14 AM, Pavan Kondeti wrote:
>>> On Wed, Jul 19, 2023 at 10:52:41AM +0530, Rohit Agarwal wrote:
>>>> diff --git a/include/dt-bindings/power/qcom,rpmhpd.h b/include/dt-bindings/power/qcom,rpmhpd.h
> [..]
>>>> +
>>>> +#endif
>>>> --
>>> I see the PD performance levels (RPMH_REGULATOR_LEVEL_xxx) are still
>>> coming from qcom-rpmpd.h. Which means Socs with RPMh also need to
>>> include the older header for these definitions along with this newly
>>> created header. something to improve for the clarity sake?
>> Agreed. I think we can move these to the new header so that the new SoC with
>> RPMH can completely
>> move to rpmhpd.h.
> Sounds very reasonable, please do that in a follow up patch.
> I'm picking this as is.
I have a doubt related to this about sending the patches.

Since I will be moving the regulators level into the same rpmhpd.h
header, we
would need to update all the qcom soc dtsi file changes as well. Also
there is a
remaining dt-bindings patch that update the older rpmhpd bindings to
these new
ones basically the cleanup is remaining.
Shall I create a unified series updating all these in one and tagging
all the the
related maintainers in the CC
OR
should I create separate series where the dt changes are updated first
then the
followup cleanup dt-bindings series?

Thanks,
Rohit.
> Thanks,
> Bjorn