2023-07-03 14:55:53

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 00/10] Add Power Domains and Regulators in SDX75

Hello,

This series adds driver and dt-bindings related changes
in SDX75 to add power domains and regulators.

Thanks,
Rohit.

Rohit Agarwal (10):
dt-bindings: regulator: Add PMX75 compatibles
dt-bindings: power: Add rpm power domains for SDX75
dt-bindings: mfd: Add compatible for pm7550ba
dt-bindings: pinctrl: qcom-pmic-gpio: Add pm7550ba support
dt-bindings: mfd: Add compatible for pmx75
dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx75 support
soc: qcom: rpmhpd: Add SDX75 power domains
regulator: qcom-rpmh: Add support for SDX75
pinctrl: qcom-pmic-gpio: Add support for pm7550ba
pinctrl: qcom-pmic-gpio: Add support for pmx75

.../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 2 ++
.../bindings/pinctrl/qcom,pmic-gpio.yaml | 6 ++++
.../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
.../bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++
drivers/regulator/qcom-rpmh-regulator.c | 38 ++++++++++++++++++++++
drivers/soc/qcom/rpmhpd.c | 16 +++++++++
include/dt-bindings/power/qcom-rpmpd.h | 8 +++++
8 files changed, 75 insertions(+)

--
2.7.4



2023-07-03 14:56:35

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 07/10] 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 f20e2a4..df9d22c 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[] = {
+ [SDX75_CX] = &cx,
+ [SDX75_CX_AO] = &cx_ao,
+ [SDX75_MSS] = &mss,
+ [SDX75_MX] = &mx,
+ [SDX75_MX_AO] = &mx_ao,
+ [SDX75_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,
@@ -529,6 +544,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-03 14:59:02

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75

Add RPM power domain bindings for the SDX75 SoC.

Signed-off-by: Rohit Agarwal <[email protected]>
---
Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
include/dt-bindings/power/qcom-rpmpd.h | 8 ++++++++
2 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
index afad313..58e1be8 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -40,6 +40,7 @@ properties:
- qcom,sdm845-rpmhpd
- qcom,sdx55-rpmhpd
- qcom,sdx65-rpmhpd
+ - qcom,sdx75-rpmhpd
- qcom,sm6115-rpmpd
- qcom,sm6125-rpmpd
- qcom,sm6350-rpmhpd
diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
index 1bf8e87..8092d0d 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -57,6 +57,14 @@
#define SDX65_CX_AO 4
#define SDX65_MXC 5

+/* SDX75 Power Domain Indexes */
+#define SDX75_CX 0
+#define SDX75_CX_AO 1
+#define SDX75_MSS 2
+#define SDX75_MX 3
+#define SDX75_MX_AO 4
+#define SDX75_MXC 5
+
/* SM6350 Power Domain Indexes */
#define SM6350_CX 0
#define SM6350_GFX 1
--
2.7.4


2023-07-03 14:59:03

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 01/10] dt-bindings: regulator: Add PMX75 compatibles

Add PMX75 compatibles for PMIC found in SDX75 platform.

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

diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
index b949850..cc72144 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
@@ -53,6 +53,7 @@ description: |
For PMR735A, smps1 - smps3, ldo1 - ldo7
For PMX55, smps1 - smps7, ldo1 - ldo16
For PMX65, smps1 - smps8, ldo1 - ldo21
+ For PMX75, smps1 - smps10, ldo1 - ldo21

properties:
compatible:
@@ -84,6 +85,7 @@ properties:
- qcom,pmr735a-rpmh-regulators
- qcom,pmx55-rpmh-regulators
- qcom,pmx65-rpmh-regulators
+ - qcom,pmx75-rpmh-regulators

qcom,pmic-id:
description: |
--
2.7.4


2023-07-03 15:00:15

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 10/10] pinctrl: qcom-pmic-gpio: Add support for pmx75

pmx75 pmic support gpio controller so add compatible in the driver.

Signed-off-by: Rohit Agarwal <[email protected]>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 5e8b42e..3d0b896 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1251,6 +1251,7 @@ static const struct of_device_id pmic_gpio_of_match[] = {
/* pmx55 has 11 GPIOs with holes on 3, 7, 10, 11 */
{ .compatible = "qcom,pmx55-gpio", .data = (void *) 11 },
{ .compatible = "qcom,pmx65-gpio", .data = (void *) 16 },
+ { .compatible = "qcom,pmx75-gpio", .data = (void *) 16 },
{ },
};

--
2.7.4


2023-07-03 15:26:32

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75

On 3.07.2023 16:42, Rohit Agarwal wrote:
> Add RPM power domain bindings for the SDX75 SoC.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> ---
> Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
> include/dt-bindings/power/qcom-rpmpd.h | 8 ++++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> index afad313..58e1be8 100644
> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> @@ -40,6 +40,7 @@ properties:
> - qcom,sdm845-rpmhpd
> - qcom,sdx55-rpmhpd
> - qcom,sdx65-rpmhpd
> + - qcom,sdx75-rpmhpd
> - qcom,sm6115-rpmpd
> - qcom,sm6125-rpmpd
> - qcom,sm6350-rpmhpd
> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
> index 1bf8e87..8092d0d 100644
> --- a/include/dt-bindings/power/qcom-rpmpd.h
> +++ b/include/dt-bindings/power/qcom-rpmpd.h
> @@ -57,6 +57,14 @@
> #define SDX65_CX_AO 4
> #define SDX65_MXC 5
>
> +/* SDX75 Power Domain Indexes */
> +#define SDX75_CX 0
> +#define SDX75_CX_AO 1
> +#define SDX75_MSS 2
> +#define SDX75_MX 3
> +#define SDX75_MX_AO 4
> +#define SDX75_MXC 5
Please instead introduce a set of defines without the SoC prefix
(i.e. CX, CX_AO, MX etc.). We've been putting this off for too long
and you're the first unlucky guy that submitted new RPMhPD support after
we've concluded it'd be the way to go! :D Sadly, we can't replace the
existing ones retroactively..

Konrad
> +
> /* SM6350 Power Domain Indexes */
> #define SM6350_CX 0
> #define SM6350_GFX 1

2023-07-03 15:26:56

by Rohit Agarwal

[permalink] [raw]
Subject: [PATCH 06/10] dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx75 support

Add support for the pmx75 GPIO support to the Qualcomm PMIC GPIO
binding.

Signed-off-by: Rohit Agarwal <[email protected]>
---
Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
index 9470eb0..aa66784 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
@@ -68,6 +68,7 @@ properties:
- qcom,pms405-gpio
- qcom,pmx55-gpio
- qcom,pmx65-gpio
+ - qcom,pmx75-gpio

- enum:
- qcom,spmi-gpio
@@ -301,6 +302,7 @@ allOf:
contains:
enum:
- qcom,pmx65-gpio
+ - qcom,pmx75-gpio
then:
properties:
gpio-line-names:
@@ -456,6 +458,7 @@ $defs:
- gpio1-gpio11 for pmx55 (holes on gpio3, gpio7, gpio10
and gpio11)
- gpio1-gpio16 for pmx65
+ - gpio1-gpio16 for pmx75

items:
pattern: "^gpio([0-9]+)$"
--
2.7.4


2023-07-03 16:07:21

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 00/10] Add Power Domains and Regulators in SDX75

On Mon, Jul 03, 2023 at 08:12:16PM +0530, Rohit Agarwal wrote:
> Hello,
>
> This series adds driver and dt-bindings related changes
> in SDX75 to add power domains and regulators.
>

Thanks for your patches, Rohit. Really nice to see the SDX75 support
being upstreamed.

This series is to be merged by five (5) different maintainers, with no
dependencies between them, afaict. The likely outcome is confusion and
some of the patches being left behind on the list.

To reduce this risk of confusion and to get your patches looked at, and
merged, faster, please send independent series/patches separately in the
future.

Regards,
Bjorn

> Thanks,
> Rohit.
>
> Rohit Agarwal (10):
> dt-bindings: regulator: Add PMX75 compatibles
> dt-bindings: power: Add rpm power domains for SDX75
> dt-bindings: mfd: Add compatible for pm7550ba
> dt-bindings: pinctrl: qcom-pmic-gpio: Add pm7550ba support
> dt-bindings: mfd: Add compatible for pmx75
> dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx75 support
> soc: qcom: rpmhpd: Add SDX75 power domains
> regulator: qcom-rpmh: Add support for SDX75
> pinctrl: qcom-pmic-gpio: Add support for pm7550ba
> pinctrl: qcom-pmic-gpio: Add support for pmx75
>
> .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 2 ++
> .../bindings/pinctrl/qcom,pmic-gpio.yaml | 6 ++++
> .../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
> .../bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++
> drivers/regulator/qcom-rpmh-regulator.c | 38 ++++++++++++++++++++++
> drivers/soc/qcom/rpmhpd.c | 16 +++++++++
> include/dt-bindings/power/qcom-rpmpd.h | 8 +++++
> 8 files changed, 75 insertions(+)
>
> --
> 2.7.4
>

2023-07-04 06:24:30

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75


On 7/3/2023 8:29 PM, Konrad Dybcio wrote:
> On 3.07.2023 16:42, Rohit Agarwal wrote:
>> Add RPM power domain bindings for the SDX75 SoC.
>>
>> Signed-off-by: Rohit Agarwal <[email protected]>
>> ---
>> Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
>> include/dt-bindings/power/qcom-rpmpd.h | 8 ++++++++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> index afad313..58e1be8 100644
>> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> @@ -40,6 +40,7 @@ properties:
>> - qcom,sdm845-rpmhpd
>> - qcom,sdx55-rpmhpd
>> - qcom,sdx65-rpmhpd
>> + - qcom,sdx75-rpmhpd
>> - qcom,sm6115-rpmpd
>> - qcom,sm6125-rpmpd
>> - qcom,sm6350-rpmhpd
>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
>> index 1bf8e87..8092d0d 100644
>> --- a/include/dt-bindings/power/qcom-rpmpd.h
>> +++ b/include/dt-bindings/power/qcom-rpmpd.h
>> @@ -57,6 +57,14 @@
>> #define SDX65_CX_AO 4
>> #define SDX65_MXC 5
>>
>> +/* SDX75 Power Domain Indexes */
>> +#define SDX75_CX 0
>> +#define SDX75_CX_AO 1
>> +#define SDX75_MSS 2
>> +#define SDX75_MX 3
>> +#define SDX75_MX_AO 4
>> +#define SDX75_MXC 5
> Please instead introduce a set of defines without the SoC prefix
> (i.e. CX, CX_AO, MX etc.). We've been putting this off for too long
> and you're the first unlucky guy that submitted new RPMhPD support after
> we've concluded it'd be the way to go! :D Sadly, we can't replace the
> existing ones retroactively..
Surely No issues. Will update it.

Thanks,
Rohit.
> Konrad
>> +
>> /* SM6350 Power Domain Indexes */
>> #define SM6350_CX 0
>> #define SM6350_GFX 1

2023-07-04 06:29:12

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 01/10] dt-bindings: regulator: Add PMX75 compatibles

On 03/07/2023 16:42, Rohit Agarwal wrote:
> Add PMX75 compatibles for PMIC found in SDX75 platform.
>
> Signed-off-by: Rohit Agarwal <[email protected]>
> ---
> Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> index b949850..cc72144 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
> @@ -53,6 +53,7 @@ description: |
> For PMR735A, smps1 - smps3, ldo1 - ldo7
> For PMX55, smps1 - smps7, ldo1 - ldo16
> For PMX65, smps1 - smps8, ldo1 - ldo21
> + For PMX75, smps1 - smps10, ldo1 - ldo21
>
> properties:
> compatible:
> @@ -84,6 +85,7 @@ properties:
> - qcom,pmr735a-rpmh-regulators
> - qcom,pmx55-rpmh-regulators
> - qcom,pmx65-rpmh-regulators
> + - qcom,pmx75-rpmh-regulators

You miss the update to the if:then: parts.

Best regards,
Krzysztof


2023-07-04 06:29:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 06/10] dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx75 support

On 03/07/2023 16:42, Rohit Agarwal wrote:
> Add support for the pmx75 GPIO support to the Qualcomm PMIC GPIO
> binding.
>
> Signed-off-by: Rohit Agarwal <[email protected]>


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

Best regards,
Krzysztof


2023-07-04 06:30:50

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 00/10] Add Power Domains and Regulators in SDX75


On 7/3/2023 8:57 PM, Bjorn Andersson wrote:
> On Mon, Jul 03, 2023 at 08:12:16PM +0530, Rohit Agarwal wrote:
>> Hello,
>>
>> This series adds driver and dt-bindings related changes
>> in SDX75 to add power domains and regulators.
>>
> Thanks for your patches, Rohit. Really nice to see the SDX75 support
> being upstreamed.
>
> This series is to be merged by five (5) different maintainers, with no
> dependencies between them, afaict. The likely outcome is confusion and
> some of the patches being left behind on the list.
>
> To reduce this risk of confusion and to get your patches looked at, and
> merged, faster, please send independent series/patches separately in the
> future.

Sure Bjorn, Thanks for the suggestion. Will surely work on this and keep
in mind
while sending patches in future.

Thanks,
Rohit.

> Regards,
> Bjorn
>
>> Thanks,
>> Rohit.
>>
>> Rohit Agarwal (10):
>> dt-bindings: regulator: Add PMX75 compatibles
>> dt-bindings: power: Add rpm power domains for SDX75
>> dt-bindings: mfd: Add compatible for pm7550ba
>> dt-bindings: pinctrl: qcom-pmic-gpio: Add pm7550ba support
>> dt-bindings: mfd: Add compatible for pmx75
>> dt-bindings: pinctrl: qcom-pmic-gpio: Add pmx75 support
>> soc: qcom: rpmhpd: Add SDX75 power domains
>> regulator: qcom-rpmh: Add support for SDX75
>> pinctrl: qcom-pmic-gpio: Add support for pm7550ba
>> pinctrl: qcom-pmic-gpio: Add support for pmx75
>>
>> .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 2 ++
>> .../bindings/pinctrl/qcom,pmic-gpio.yaml | 6 ++++
>> .../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
>> .../bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
>> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++
>> drivers/regulator/qcom-rpmh-regulator.c | 38 ++++++++++++++++++++++
>> drivers/soc/qcom/rpmhpd.c | 16 +++++++++
>> include/dt-bindings/power/qcom-rpmpd.h | 8 +++++
>> 8 files changed, 75 insertions(+)
>>
>> --
>> 2.7.4
>>

2023-07-04 07:03:45

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 01/10] dt-bindings: regulator: Add PMX75 compatibles


On 7/4/2023 11:51 AM, Krzysztof Kozlowski wrote:
> On 03/07/2023 16:42, Rohit Agarwal wrote:
>> Add PMX75 compatibles for PMIC found in SDX75 platform.
>>
>> Signed-off-by: Rohit Agarwal <[email protected]>
>> ---
>> Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
>> index b949850..cc72144 100644
>> --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
>> +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml
>> @@ -53,6 +53,7 @@ description: |
>> For PMR735A, smps1 - smps3, ldo1 - ldo7
>> For PMX55, smps1 - smps7, ldo1 - ldo16
>> For PMX65, smps1 - smps8, ldo1 - ldo21
>> + For PMX75, smps1 - smps10, ldo1 - ldo21
>>
>> properties:
>> compatible:
>> @@ -84,6 +85,7 @@ properties:
>> - qcom,pmr735a-rpmh-regulators
>> - qcom,pmx55-rpmh-regulators
>> - qcom,pmx65-rpmh-regulators
>> + - qcom,pmx75-rpmh-regulators
> You miss the update to the if:then: parts.
Thanks for your time. Will add that part as well.

Thanks,
Rohit.
>
> Best regards,
> Krzysztof
>

2023-07-05 09:17:28

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75


On 7/4/2023 11:47 AM, Rohit Agarwal wrote:
>
> On 7/3/2023 8:29 PM, Konrad Dybcio wrote:
>> On 3.07.2023 16:42, Rohit Agarwal wrote:
>>> Add RPM power domain bindings for the SDX75 SoC.
>>>
>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>> ---
>>>   Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
>>>   include/dt-bindings/power/qcom-rpmpd.h                  | 8 ++++++++
>>>   2 files changed, 9 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>> b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>> index afad313..58e1be8 100644
>>> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>> @@ -40,6 +40,7 @@ properties:
>>>         - qcom,sdm845-rpmhpd
>>>         - qcom,sdx55-rpmhpd
>>>         - qcom,sdx65-rpmhpd
>>> +      - qcom,sdx75-rpmhpd
>>>         - qcom,sm6115-rpmpd
>>>         - qcom,sm6125-rpmpd
>>>         - qcom,sm6350-rpmhpd
>>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h
>>> b/include/dt-bindings/power/qcom-rpmpd.h
>>> index 1bf8e87..8092d0d 100644
>>> --- a/include/dt-bindings/power/qcom-rpmpd.h
>>> +++ b/include/dt-bindings/power/qcom-rpmpd.h
>>> @@ -57,6 +57,14 @@
>>>   #define SDX65_CX_AO    4
>>>   #define SDX65_MXC    5
>>>   +/* SDX75 Power Domain Indexes */
>>> +#define SDX75_CX    0
>>> +#define SDX75_CX_AO    1
>>> +#define SDX75_MSS    2
>>> +#define SDX75_MX    3
>>> +#define SDX75_MX_AO    4
>>> +#define SDX75_MXC    5
>> Please instead introduce a set of defines without the SoC prefix
>> (i.e. CX, CX_AO, MX etc.). We've been putting this off for too long
>> and you're the first unlucky guy that submitted new RPMhPD support after
>> we've concluded it'd be the way to go! :D Sadly, we can't replace the
>> existing ones retroactively..
> Surely No issues. Will update it.

I have a doubt here. Cant we completely omit the #defines here and
directly index this as 0,1,...
because if the intention of this #defines is to understand the name of
the pd then we can get
it from the .name attribute in rpmhpd as well, right?

The problems with a common set of #define would be, lets say if we
define CX_AO as 1 and some platform
doesn't have CX_AO then wouldnt it leave a null entry in the driver
entry of that platform?

Thanks,
Rohit.

>
> Thanks,
> Rohit.
>> Konrad
>>> +
>>>   /* SM6350 Power Domain Indexes */
>>>   #define SM6350_CX    0
>>>   #define SM6350_GFX    1

2023-07-05 11:07:15

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75

On 5.07.2023 10:54, Rohit Agarwal wrote:
>
> On 7/4/2023 11:47 AM, Rohit Agarwal wrote:
>>
>> On 7/3/2023 8:29 PM, Konrad Dybcio wrote:
>>> On 3.07.2023 16:42, Rohit Agarwal wrote:
>>>> Add RPM power domain bindings for the SDX75 SoC.
>>>>
>>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>>> ---
>>>>   Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
>>>>   include/dt-bindings/power/qcom-rpmpd.h                  | 8 ++++++++
>>>>   2 files changed, 9 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>> index afad313..58e1be8 100644
>>>> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>> @@ -40,6 +40,7 @@ properties:
>>>>         - qcom,sdm845-rpmhpd
>>>>         - qcom,sdx55-rpmhpd
>>>>         - qcom,sdx65-rpmhpd
>>>> +      - qcom,sdx75-rpmhpd
>>>>         - qcom,sm6115-rpmpd
>>>>         - qcom,sm6125-rpmpd
>>>>         - qcom,sm6350-rpmhpd
>>>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
>>>> index 1bf8e87..8092d0d 100644
>>>> --- a/include/dt-bindings/power/qcom-rpmpd.h
>>>> +++ b/include/dt-bindings/power/qcom-rpmpd.h
>>>> @@ -57,6 +57,14 @@
>>>>   #define SDX65_CX_AO    4
>>>>   #define SDX65_MXC    5
>>>>   +/* SDX75 Power Domain Indexes */
>>>> +#define SDX75_CX    0
>>>> +#define SDX75_CX_AO    1
>>>> +#define SDX75_MSS    2
>>>> +#define SDX75_MX    3
>>>> +#define SDX75_MX_AO    4
>>>> +#define SDX75_MXC    5
>>> Please instead introduce a set of defines without the SoC prefix
>>> (i.e. CX, CX_AO, MX etc.). We've been putting this off for too long
>>> and you're the first unlucky guy that submitted new RPMhPD support after
>>> we've concluded it'd be the way to go! :D Sadly, we can't replace the
>>> existing ones retroactively..
>> Surely No issues. Will update it.
>
> I have a doubt here. Cant we completely omit the #defines here and directly index this as 0,1,...
> because if the intention of this #defines is to understand the name of the pd then we can get
> it from the .name attribute in rpmhpd as well, right?
>
> The problems with a common set of #define would be, lets say if we define CX_AO as 1 and some platform
> doesn't have CX_AO then wouldnt it leave a null entry in the driver entry of that platform?
Yes.

We already do this in the rpmh clock driver, as:

1. there are domains that all chips share (like CX etc.)
2. wasting a couple of bytes lets us massively save on convolution

Konrad
>
> Thanks,
> Rohit.
>
>>
>> Thanks,
>> Rohit.
>>> Konrad
>>>> +
>>>>   /* SM6350 Power Domain Indexes */
>>>>   #define SM6350_CX    0
>>>>   #define SM6350_GFX    1

2023-07-05 11:59:09

by Rohit Agarwal

[permalink] [raw]
Subject: Re: [PATCH 02/10] dt-bindings: power: Add rpm power domains for SDX75


On 7/5/2023 4:13 PM, Konrad Dybcio wrote:
> On 5.07.2023 10:54, Rohit Agarwal wrote:
>> On 7/4/2023 11:47 AM, Rohit Agarwal wrote:
>>> On 7/3/2023 8:29 PM, Konrad Dybcio wrote:
>>>> On 3.07.2023 16:42, Rohit Agarwal wrote:
>>>>> Add RPM power domain bindings for the SDX75 SoC.
>>>>>
>>>>> Signed-off-by: Rohit Agarwal <[email protected]>
>>>>> ---
>>>>>   Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
>>>>>   include/dt-bindings/power/qcom-rpmpd.h                  | 8 ++++++++
>>>>>   2 files changed, 9 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>>> index afad313..58e1be8 100644
>>>>> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>>>>> @@ -40,6 +40,7 @@ properties:
>>>>>         - qcom,sdm845-rpmhpd
>>>>>         - qcom,sdx55-rpmhpd
>>>>>         - qcom,sdx65-rpmhpd
>>>>> +      - qcom,sdx75-rpmhpd
>>>>>         - qcom,sm6115-rpmpd
>>>>>         - qcom,sm6125-rpmpd
>>>>>         - qcom,sm6350-rpmhpd
>>>>> diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h
>>>>> index 1bf8e87..8092d0d 100644
>>>>> --- a/include/dt-bindings/power/qcom-rpmpd.h
>>>>> +++ b/include/dt-bindings/power/qcom-rpmpd.h
>>>>> @@ -57,6 +57,14 @@
>>>>>   #define SDX65_CX_AO    4
>>>>>   #define SDX65_MXC    5
>>>>>   +/* SDX75 Power Domain Indexes */
>>>>> +#define SDX75_CX    0
>>>>> +#define SDX75_CX_AO    1
>>>>> +#define SDX75_MSS    2
>>>>> +#define SDX75_MX    3
>>>>> +#define SDX75_MX_AO    4
>>>>> +#define SDX75_MXC    5
>>>> Please instead introduce a set of defines without the SoC prefix
>>>> (i.e. CX, CX_AO, MX etc.). We've been putting this off for too long
>>>> and you're the first unlucky guy that submitted new RPMhPD support after
>>>> we've concluded it'd be the way to go! :D Sadly, we can't replace the
>>>> existing ones retroactively..
>>> Surely No issues. Will update it.
>> I have a doubt here. Cant we completely omit the #defines here and directly index this as 0,1,...
>> because if the intention of this #defines is to understand the name of the pd then we can get
>> it from the .name attribute in rpmhpd as well, right?
>>
>> The problems with a common set of #define would be, lets say if we define CX_AO as 1 and some platform
>> doesn't have CX_AO then wouldnt it leave a null entry in the driver entry of that platform?
> Yes.
>
> We already do this in the rpmh clock driver, as:
>
> 1. there are domains that all chips share (like CX etc.)
> 2. wasting a couple of bytes lets us massively save on convolution
Ok, got it. Looks cleaner.

Thanks,
Rohit.
>
> Konrad
>> Thanks,
>> Rohit.
>>
>>> Thanks,
>>> Rohit.
>>>> Konrad
>>>>> +
>>>>>   /* SM6350 Power Domain Indexes */
>>>>>   #define SM6350_CX    0
>>>>>   #define SM6350_GFX    1