2023-01-13 15:27:51

by Devi Priya

[permalink] [raw]
Subject: [PATCH 0/6] Add regulator support for IPQ9574 SoC

IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator is used for
APSS voltage scaling.
This patch series adds the support for the same.
Also enables the RPM communication over the RPMSG framework

This series depends on the below patchset
https://lore.kernel.org/linux-arm-msm/[email protected]/

devi priya (6):
soc: qcom: smd-rpm: Add IPQ9574 compatible
dt-bindings: soc: qcom: smd-rpm: Add IPQ9574 compatible string
regulator: qcom_smd: Add MP5496 regulators
regulator: qcom_smd: Add PMIC compatible for IPQ9574
arm64: dts: qcom: ipq9574: Add cpufreq & RPM related nodes
regulator: qcom_smd: Add support to define the bootup voltage

.../regulator/qcom,smd-rpm-regulator.yaml | 3 +-
.../bindings/soc/qcom/qcom,smd-rpm.yaml | 1 +
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 80 +++++++++++++++++++
drivers/regulator/qcom_smd-regulator.c | 20 +++++
drivers/soc/qcom/smd-rpm.c | 1 +
5 files changed, 104 insertions(+), 1 deletion(-)


base-commit: 1fe4fd6f5cad346e598593af36caeadc4f5d4fa9
--
2.17.1


2023-01-13 15:27:53

by Devi Priya

[permalink] [raw]
Subject: [PATCH 4/6] regulator: qcom_smd: Add PMIC compatible for IPQ9574

Add mp5496 PMIC compatible string for IPQ9574 SoC

Co-developed-by: Praveenkumar I <[email protected]>
Signed-off-by: Praveenkumar I <[email protected]>
Signed-off-by: devi priya <[email protected]>
---
.../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
index 8c45f53212b1..7907d9385583 100644
--- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
@@ -22,7 +22,7 @@ description:
Each sub-node is identified using the node's name, with valid values listed
for each of the pmics below.

- For mp5496, s2
+ For mp5496, s1, s2

For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
@@ -84,6 +84,7 @@ properties:
compatible:
enum:
- qcom,rpm-mp5496-regulators
+ - qcom,rpm-ipq9574-mp5496-regulators
- qcom,rpm-pm2250-regulators
- qcom,rpm-pm6125-regulators
- qcom,rpm-pm660-regulators
--
2.17.1

2023-01-13 15:29:56

by Devi Priya

[permalink] [raw]
Subject: [PATCH 1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible

Adding compatible string to support RPM communication over SMD for
IPQ9574 SoC

Co-developed-by: Praveenkumar I <[email protected]>
Signed-off-by: Praveenkumar I <[email protected]>
Signed-off-by: devi priya <[email protected]>
---
drivers/soc/qcom/smd-rpm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
index 7e3b6a7ea34c..523627d5d398 100644
--- a/drivers/soc/qcom/smd-rpm.c
+++ b/drivers/soc/qcom/smd-rpm.c
@@ -233,6 +233,7 @@ static void qcom_smd_rpm_remove(struct rpmsg_device *rpdev)
static const struct of_device_id qcom_smd_rpm_of_match[] = {
{ .compatible = "qcom,rpm-apq8084" },
{ .compatible = "qcom,rpm-ipq6018" },
+ { .compatible = "qcom,rpm-ipq9574" },
{ .compatible = "qcom,rpm-msm8226" },
{ .compatible = "qcom,rpm-msm8909" },
{ .compatible = "qcom,rpm-msm8916" },
--
2.17.1

2023-01-13 15:30:36

by Devi Priya

[permalink] [raw]
Subject: [PATCH 3/6] regulator: qcom_smd: Add MP5496 regulators

Adding support for PMIC MP5496 on IPQ9574 SoC

Co-developed-by: Praveenkumar I <[email protected]>
Signed-off-by: Praveenkumar I <[email protected]>
Signed-off-by: devi priya <[email protected]>
---
drivers/regulator/qcom_smd-regulator.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index 9f2b58458841..1eb17d378897 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -767,6 +767,15 @@ static const struct regulator_desc mp5496_ldoa2 = {
.ops = &rpm_mp5496_ops,
};

+static const struct regulator_desc ipq9574_mp5496_smpa1 = {
+ .linear_ranges = (struct linear_range[]) {
+ REGULATOR_LINEAR_RANGE(600000, 0, 37, 12500),
+ },
+ .n_linear_ranges = 1,
+ .n_voltages = 38,
+ .ops = &rpm_mp5496_ops,
+};
+
static const struct regulator_desc pm2250_lvftsmps = {
.linear_ranges = (struct linear_range[]) {
REGULATOR_LINEAR_RANGE(320000, 0, 269, 4000),
@@ -799,6 +808,11 @@ static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
{}
};

+static const struct rpm_regulator_data rpm_ipq9574_mp5496_regulators[] = {
+ { "s1", QCOM_SMD_RPM_SMPA, 1, &ipq9574_mp5496_smpa1, "s1" },
+ {}
+};
+
static const struct rpm_regulator_data rpm_pm2250_regulators[] = {
{ "s1", QCOM_SMD_RPM_SMPA, 1, &pm2250_lvftsmps, "vdd_s1" },
{ "s2", QCOM_SMD_RPM_SMPA, 2, &pm2250_lvftsmps, "vdd_s2" },
@@ -1320,6 +1334,8 @@ static const struct rpm_regulator_data rpm_pms405_regulators[] = {
};

static const struct of_device_id rpm_of_match[] = {
+ { .compatible = "qcom,rpm-ipq9574-mp5496-regulators",
+ .data = &rpm_ipq9574_mp5496_regulators },
{ .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
{ .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
{ .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },
--
2.17.1

2023-01-13 15:31:06

by Devi Priya

[permalink] [raw]
Subject: [PATCH 5/6] arm64: dts: qcom: ipq9574: Add cpufreq & RPM related nodes

Add CPU Freq and RPM related nodes in the device tree

Co-developed-by: Praveenkumar I <[email protected]>
Signed-off-by: Praveenkumar I <[email protected]>
Signed-off-by: devi priya <[email protected]>
---
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 80 +++++++++++++++++++++++++++
1 file changed, 80 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 5a2244b437ed..79fa5d91882c 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-ipq9574.h>
#include <dt-bindings/reset/qcom,gcc-ipq9574.h>
+#include <dt-bindings/clock/qcom,apss-ipq.h>

/ {
interrupt-parent = <&intc>;
@@ -75,6 +76,10 @@
reg = <0x0>;
enable-method = "psci";
next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu_opp_table>;
+ cpu0-supply = <&ipq9574_s1>;
};

CPU1: cpu@1 {
@@ -83,6 +88,10 @@
reg = <0x1>;
enable-method = "psci";
next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu_opp_table>;
+ cpu-supply = <&ipq9574_s1>;
};

CPU2: cpu@2 {
@@ -91,6 +100,10 @@
reg = <0x2>;
enable-method = "psci";
next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu_opp_table>;
+ cpu-supply = <&ipq9574_s1>;
};

CPU3: cpu@3 {
@@ -99,6 +112,10 @@
reg = <0x3>;
enable-method = "psci";
next-level-cache = <&L2_0>;
+ clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu_opp_table>;
+ cpu-supply = <&ipq9574_s1>;
};

L2_0: l2-cache {
@@ -107,6 +124,42 @@
};
};

+ cpu_opp_table: opp-table-cpu {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-936000000 {
+ opp-hz = /bits/ 64 <936000000>;
+ opp-microvolt = <725000>;
+ clock-latency-ns = <200000>;
+ };
+ opp-1104000000 {
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-microvolt = <787500>;
+ clock-latency-ns = <200000>;
+ };
+ opp-1416000000 {
+ opp-hz = /bits/ 64 <1416000000>;
+ opp-microvolt = <862500>;
+ clock-latency-ns = <200000>;
+ };
+ opp-1488000000 {
+ opp-hz = /bits/ 64 <1488000000>;
+ opp-microvolt = <925000>;
+ clock-latency-ns = <200000>;
+ };
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <987500>;
+ clock-latency-ns = <200000>;
+ };
+ opp-2208000000 {
+ opp-hz = /bits/ 64 <2208000000>;
+ opp-microvolt = <1062500>;
+ clock-latency-ns = <200000>;
+ };
+ };
+
memory@40000000 {
device_type = "memory";
/* We expect the bootloader to fill in the size */
@@ -128,6 +181,11 @@
#size-cells = <2>;
ranges;

+ rpm_msg_ram: memory@60000 {
+ reg = <0x0 0x00060000 0x0 0x6000>;
+ no-map;
+ };
+
tz_region: memory@4a600000 {
reg = <0x0 0x4a600000 0x0 0x400000>;
no-map;
@@ -324,6 +382,28 @@
};
};

+ rpm-glink {
+ compatible = "qcom,glink-rpm";
+ interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+ qcom,rpm-msg-ram = <&rpm_msg_ram>;
+ mboxes = <&apcs_glb 0>;
+
+ rpm_requests: glink-channel {
+ compatible = "qcom,rpm-ipq9574";
+ qcom,glink-channels = "rpm_requests";
+
+ regulators {
+ compatible = "qcom,rpm-ipq9574-mp5496-regulators";
+
+ ipq9574_s1: s1 {
+ regulator-min-microvolt = <587500>;
+ regulator-max-microvolt = <1075000>;
+ regulator-always-on;
+ };
+ };
+ };
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
--
2.17.1

2023-01-13 16:16:12

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/6] regulator: qcom_smd: Add MP5496 regulators



On 13.01.2023 16:03, devi priya wrote:
> Adding support for PMIC MP5496 on IPQ9574 SoC
>
> Co-developed-by: Praveenkumar I <[email protected]>
> Signed-off-by: Praveenkumar I <[email protected]>
> Signed-off-by: devi priya <[email protected]>
> ---
Please simply extend the existing MP5496 support with this
S1 regulator. If you don't explicitly define and set voltages
for the other vregs, they will not be probed.

Konrad
> drivers/regulator/qcom_smd-regulator.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
> index 9f2b58458841..1eb17d378897 100644
> --- a/drivers/regulator/qcom_smd-regulator.c
> +++ b/drivers/regulator/qcom_smd-regulator.c
> @@ -767,6 +767,15 @@ static const struct regulator_desc mp5496_ldoa2 = {
> .ops = &rpm_mp5496_ops,
> };
>
> +static const struct regulator_desc ipq9574_mp5496_smpa1 = {
> + .linear_ranges = (struct linear_range[]) {
> + REGULATOR_LINEAR_RANGE(600000, 0, 37, 12500),
> + },
> + .n_linear_ranges = 1,
> + .n_voltages = 38,
> + .ops = &rpm_mp5496_ops,
> +};
> +
> static const struct regulator_desc pm2250_lvftsmps = {
> .linear_ranges = (struct linear_range[]) {
> REGULATOR_LINEAR_RANGE(320000, 0, 269, 4000),
> @@ -799,6 +808,11 @@ static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
> {}
> };
>
> +static const struct rpm_regulator_data rpm_ipq9574_mp5496_regulators[] = {
> + { "s1", QCOM_SMD_RPM_SMPA, 1, &ipq9574_mp5496_smpa1, "s1" },
> + {}
> +};
> +
> static const struct rpm_regulator_data rpm_pm2250_regulators[] = {
> { "s1", QCOM_SMD_RPM_SMPA, 1, &pm2250_lvftsmps, "vdd_s1" },
> { "s2", QCOM_SMD_RPM_SMPA, 2, &pm2250_lvftsmps, "vdd_s2" },
> @@ -1320,6 +1334,8 @@ static const struct rpm_regulator_data rpm_pms405_regulators[] = {
> };
>
> static const struct of_device_id rpm_of_match[] = {
> + { .compatible = "qcom,rpm-ipq9574-mp5496-regulators",
> + .data = &rpm_ipq9574_mp5496_regulators },
> { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
> { .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
> { .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },

2023-01-13 16:41:23

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 5/6] arm64: dts: qcom: ipq9574: Add cpufreq & RPM related nodes



On 13.01.2023 16:03, devi priya wrote:
> Add CPU Freq and RPM related nodes in the device tree
These two are wildly different things, barely related to one
another and can very well be introduced in separate patches.
Please do so.

>
> Co-developed-by: Praveenkumar I <[email protected]>
> Signed-off-by: Praveenkumar I <[email protected]>
> Signed-off-by: devi priya <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 80 +++++++++++++++++++++++++++
> 1 file changed, 80 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> index 5a2244b437ed..79fa5d91882c 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> @@ -9,6 +9,7 @@
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/qcom,gcc-ipq9574.h>
> #include <dt-bindings/reset/qcom,gcc-ipq9574.h>
> +#include <dt-bindings/clock/qcom,apss-ipq.h>
Please sort the includes alphabetically.

>
> / {
> interrupt-parent = <&intc>;
> @@ -75,6 +76,10 @@
> reg = <0x0>;
> enable-method = "psci";
> next-level-cache = <&L2_0>;
> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
> + clock-names = "cpu";
> + operating-points-v2 = <&cpu_opp_table>;
> + cpu0-supply = <&ipq9574_s1>;
Why is this cpu0-supply and the rest are cpu-supply? Neither of them
seem particularly documented, by the way..


> };
>
> CPU1: cpu@1 {
> @@ -83,6 +88,10 @@
> reg = <0x1>;
> enable-method = "psci";
> next-level-cache = <&L2_0>;
> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
> + clock-names = "cpu";
> + operating-points-v2 = <&cpu_opp_table>;
> + cpu-supply = <&ipq9574_s1>;
> };
>
> CPU2: cpu@2 {
> @@ -91,6 +100,10 @@
> reg = <0x2>;
> enable-method = "psci";
> next-level-cache = <&L2_0>;
> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
> + clock-names = "cpu";
> + operating-points-v2 = <&cpu_opp_table>;
> + cpu-supply = <&ipq9574_s1>;
> };
>
> CPU3: cpu@3 {
> @@ -99,6 +112,10 @@
> reg = <0x3>;
> enable-method = "psci";
> next-level-cache = <&L2_0>;
> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
> + clock-names = "cpu";
> + operating-points-v2 = <&cpu_opp_table>;
> + cpu-supply = <&ipq9574_s1>;
> };
>
> L2_0: l2-cache {
> @@ -107,6 +124,42 @@
> };
> };
>
> + cpu_opp_table: opp-table-cpu {
Alphabetically this goes after memory

> + compatible = "operating-points-v2";
> + opp-shared;
> +
> + opp-936000000 {
> + opp-hz = /bits/ 64 <936000000>;
> + opp-microvolt = <725000>;
> + clock-latency-ns = <200000>;
> + };
Please add a newline between each subnode.

> + opp-1104000000 {
> + opp-hz = /bits/ 64 <1104000000>;
> + opp-microvolt = <787500>;
> + clock-latency-ns = <200000>;
> + };
> + opp-1416000000 {
> + opp-hz = /bits/ 64 <1416000000>;
> + opp-microvolt = <862500>;
> + clock-latency-ns = <200000>;
> + };
> + opp-1488000000 {
> + opp-hz = /bits/ 64 <1488000000>;
> + opp-microvolt = <925000>;
> + clock-latency-ns = <200000>;
> + };
> + opp-1800000000 {
> + opp-hz = /bits/ 64 <1800000000>;
> + opp-microvolt = <987500>;
> + clock-latency-ns = <200000>;
> + };
> + opp-2208000000 {
> + opp-hz = /bits/ 64 <2208000000>;
> + opp-microvolt = <1062500>;
> + clock-latency-ns = <200000>;
> + };
> + };
> +
> memory@40000000 {
> device_type = "memory";
> /* We expect the bootloader to fill in the size */
> @@ -128,6 +181,11 @@
> #size-cells = <2>;
> ranges;
>
> + rpm_msg_ram: memory@60000 {
> + reg = <0x0 0x00060000 0x0 0x6000>;
> + no-map;
> + };
> +
> tz_region: memory@4a600000 {
> reg = <0x0 0x4a600000 0x0 0x400000>;
> no-map;
> @@ -324,6 +382,28 @@
> };
> };
>
> + rpm-glink {
> + compatible = "qcom,glink-rpm";
> + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
> + qcom,rpm-msg-ram = <&rpm_msg_ram>;
> + mboxes = <&apcs_glb 0>;
> +
> + rpm_requests: glink-channel {
> + compatible = "qcom,rpm-ipq9574";
> + qcom,glink-channels = "rpm_requests";
> +
> + regulators {
> + compatible = "qcom,rpm-ipq9574-mp5496-regulators";
The regulators are board-specific and should not be included in the
SoC DTSI. If this is a very common configuration, you may split that
into ipq9574-mp5496.dtsi, for example. Or ipq9574-pmics.dtsi if it's
coupled with more PMICs.

> +
> + ipq9574_s1: s1 {
> + regulator-min-microvolt = <587500>;
> + regulator-max-microvolt = <1075000>;
> + regulator-always-on;
Won't this break CPU retention?

You're holding a vote on it from the CPU devices, so it should be
always enabled when the CPUs are oneline (as far as Linux is
concerned).


Or maybe Linux will think it's enabled and RPM will quietly park
it when it decides it's good to do so.. but will it with an active
request.. not sure, really.. just something to consider..

Konrad
> + };
> + };
> + };
> + };
> +
> timer {
> compatible = "arm,armv8-timer";
> interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,

2023-01-13 17:02:55

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible

On 13/01/2023 16:03, devi priya wrote:
> Adding compatible string to support RPM communication over SMD for
> IPQ9574 SoC
>
> Co-developed-by: Praveenkumar I <[email protected]>
> Signed-off-by: Praveenkumar I <[email protected]>

What exactly was developed here but the other author?

> Signed-off-by: devi priya <[email protected]>
> ---
> drivers/soc/qcom/smd-rpm.c | 1 +
> 1 file changed, 1 insertion(+)
>

Best regards,
Krzysztof

2023-01-16 11:17:52

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible

On Fri, Jan 13, 2023 at 05:42:36PM +0100, Krzysztof Kozlowski wrote:
> On 13/01/2023 16:03, devi priya wrote:
> > Adding compatible string to support RPM communication over SMD for
> > IPQ9574 SoC
> >
> > Co-developed-by: Praveenkumar I <[email protected]>
> > Signed-off-by: Praveenkumar I <[email protected]>
>
> What exactly was developed here but the other author?

It's fairly clear looking at this in the context of the series
that the same tags have been applied to every patch in the
series. Probably a patch like this was actually written by just
one person but there's a decent chance that it's just been
forgotten who it was and fundamentally it just doesn't matter
that much.


Attachments:
(No filename) (721.00 B)
signature.asc (499.00 B)
Download all attachments

2023-01-17 20:45:49

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 4/6] regulator: qcom_smd: Add PMIC compatible for IPQ9574

On Fri, Jan 13, 2023 at 08:33:08PM +0530, devi priya wrote:
> Add mp5496 PMIC compatible string for IPQ9574 SoC
>
> Co-developed-by: Praveenkumar I <[email protected]>
> Signed-off-by: Praveenkumar I <[email protected]>
> Signed-off-by: devi priya <[email protected]>
> ---
> .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> index 8c45f53212b1..7907d9385583 100644
> --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> @@ -22,7 +22,7 @@ description:
> Each sub-node is identified using the node's name, with valid values listed
> for each of the pmics below.
>
> - For mp5496, s2
> + For mp5496, s1, s2
>
> For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
> l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
> @@ -84,6 +84,7 @@ properties:
> compatible:
> enum:
> - qcom,rpm-mp5496-regulators
> + - qcom,rpm-ipq9574-mp5496-regulators

Is this a different part than just mp5496? Or used in a different,
incompatible way?

> - qcom,rpm-pm2250-regulators
> - qcom,rpm-pm6125-regulators
> - qcom,rpm-pm660-regulators
> --
> 2.17.1
>

2023-01-27 15:54:46

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible



On 1/13/2023 10:12 PM, Krzysztof Kozlowski wrote:
> On 13/01/2023 16:03, devi priya wrote:
>> Adding compatible string to support RPM communication over SMD for
>> IPQ9574 SoC
>>
>> Co-developed-by: Praveenkumar I <[email protected]>
>> Signed-off-by: Praveenkumar I <[email protected]>
>
> What exactly was developed here but the other author?
>
The intention was to mention folks who supported with the patch series
development using the co-developed-by tag on the individual patches.
But yeah, for patches with minimal changes, will trim down the tag as
suggested.


>> Signed-off-by: devi priya <[email protected]>
>> ---
>> drivers/soc/qcom/smd-rpm.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>
> Best regards,
> Krzysztof
>
Best Regards,
Devi Priya

2023-01-27 15:57:55

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible



On 1/16/2023 4:42 PM, Mark Brown wrote:
> On Fri, Jan 13, 2023 at 05:42:36PM +0100, Krzysztof Kozlowski wrote:
>> On 13/01/2023 16:03, devi priya wrote:
>>> Adding compatible string to support RPM communication over SMD for
>>> IPQ9574 SoC
>>>
>>> Co-developed-by: Praveenkumar I <[email protected]>
>>> Signed-off-by: Praveenkumar I <[email protected]>
>>
>> What exactly was developed here but the other author?
>
> It's fairly clear looking at this in the context of the series
> that the same tags have been applied to every patch in the
> series. Probably a patch like this was actually written by just
> one person but there's a decent chance that it's just been
> forgotten who it was and fundamentally it just doesn't matter
> that much.

Yeah!
Will drop the tag


Best Regards,
Devi Priya

2023-01-27 16:02:57

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 3/6] regulator: qcom_smd: Add MP5496 regulators



On 1/13/2023 8:54 PM, Konrad Dybcio wrote:
>
>
> On 13.01.2023 16:03, devi priya wrote:
>> Adding support for PMIC MP5496 on IPQ9574 SoC
>>
>> Co-developed-by: Praveenkumar I <[email protected]>
>> Signed-off-by: Praveenkumar I <[email protected]>
>> Signed-off-by: devi priya <[email protected]>
>> ---
> Please simply extend the existing MP5496 support with this
> S1 regulator. If you don't explicitly define and set voltages
> for the other vregs, they will not be probed.
>
> Konrad
IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a
different power layout. IPQ9574 has S2 regulator which will be used for
NSS scaling but S2 in IPQ6018 serves a different purpose. Hence it would
not be possible to extend the existing MP5496 support for IPQ9574
>> drivers/regulator/qcom_smd-regulator.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
>> index 9f2b58458841..1eb17d378897 100644
>> --- a/drivers/regulator/qcom_smd-regulator.c
>> +++ b/drivers/regulator/qcom_smd-regulator.c
>> @@ -767,6 +767,15 @@ static const struct regulator_desc mp5496_ldoa2 = {
>> .ops = &rpm_mp5496_ops,
>> };
>>
>> +static const struct regulator_desc ipq9574_mp5496_smpa1 = {
>> + .linear_ranges = (struct linear_range[]) {
>> + REGULATOR_LINEAR_RANGE(600000, 0, 37, 12500),
>> + },
>> + .n_linear_ranges = 1,
>> + .n_voltages = 38,
>> + .ops = &rpm_mp5496_ops,
>> +};
>> +
>> static const struct regulator_desc pm2250_lvftsmps = {
>> .linear_ranges = (struct linear_range[]) {
>> REGULATOR_LINEAR_RANGE(320000, 0, 269, 4000),
>> @@ -799,6 +808,11 @@ static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
>> {}
>> };
>>
>> +static const struct rpm_regulator_data rpm_ipq9574_mp5496_regulators[] = {
>> + { "s1", QCOM_SMD_RPM_SMPA, 1, &ipq9574_mp5496_smpa1, "s1" },
>> + {}
>> +};
>> +
>> static const struct rpm_regulator_data rpm_pm2250_regulators[] = {
>> { "s1", QCOM_SMD_RPM_SMPA, 1, &pm2250_lvftsmps, "vdd_s1" },
>> { "s2", QCOM_SMD_RPM_SMPA, 2, &pm2250_lvftsmps, "vdd_s2" },
>> @@ -1320,6 +1334,8 @@ static const struct rpm_regulator_data rpm_pms405_regulators[] = {
>> };
>>
>> static const struct of_device_id rpm_of_match[] = {
>> + { .compatible = "qcom,rpm-ipq9574-mp5496-regulators",
>> + .data = &rpm_ipq9574_mp5496_regulators },
>> { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
>> { .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
>> { .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },
Best Regards,
Devi Priya

2023-01-27 16:04:20

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/6] regulator: qcom_smd: Add MP5496 regulators



On 27.01.2023 17:01, Devi Priya wrote:
>
>
> On 1/13/2023 8:54 PM, Konrad Dybcio wrote:
>>
>>
>> On 13.01.2023 16:03, devi priya wrote:
>>> Adding support for PMIC MP5496 on IPQ9574 SoC
>>>
>>> Co-developed-by: Praveenkumar I <[email protected]>
>>> Signed-off-by: Praveenkumar I <[email protected]>
>>> Signed-off-by: devi priya <[email protected]>
>>> ---
>> Please simply extend the existing MP5496 support with this
>> S1 regulator. If you don't explicitly define and set voltages
>> for the other vregs, they will not be probed.
>>
>> Konrad
> IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a different power layout. IPQ9574 has S2 regulator which will be used for NSS scaling but S2 in IPQ6018 serves a different purpose. Hence it would not be possible to extend the existing MP5496 support for IPQ9574
Does the s2 on IPQ9574 have a different voltage range than
the one on IPQ6018? No? Then there's nothing blocking you
from using the setup for both SoCs. As I've mentioned,
regulators that you don't add to the device tree will
not even be probed.

Konrad
>>>   drivers/regulator/qcom_smd-regulator.c | 16 ++++++++++++++++
>>>   1 file changed, 16 insertions(+)
>>>
>>> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
>>> index 9f2b58458841..1eb17d378897 100644
>>> --- a/drivers/regulator/qcom_smd-regulator.c
>>> +++ b/drivers/regulator/qcom_smd-regulator.c
>>> @@ -767,6 +767,15 @@ static const struct regulator_desc mp5496_ldoa2 = {
>>>       .ops = &rpm_mp5496_ops,
>>>   };
>>>   +static const struct regulator_desc ipq9574_mp5496_smpa1 = {
>>> +    .linear_ranges = (struct linear_range[]) {
>>> +        REGULATOR_LINEAR_RANGE(600000, 0, 37, 12500),
>>> +    },
>>> +    .n_linear_ranges = 1,
>>> +    .n_voltages = 38,
>>> +    .ops = &rpm_mp5496_ops,
>>> +};
>>> +
>>>   static const struct regulator_desc pm2250_lvftsmps = {
>>>       .linear_ranges = (struct linear_range[]) {
>>>           REGULATOR_LINEAR_RANGE(320000, 0, 269, 4000),
>>> @@ -799,6 +808,11 @@ static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
>>>       {}
>>>   };
>>>   +static const struct rpm_regulator_data rpm_ipq9574_mp5496_regulators[] = {
>>> +    { "s1", QCOM_SMD_RPM_SMPA, 1, &ipq9574_mp5496_smpa1, "s1" },
>>> +    {}
>>> +};
>>> +
>>>   static const struct rpm_regulator_data rpm_pm2250_regulators[] = {
>>>       { "s1", QCOM_SMD_RPM_SMPA, 1, &pm2250_lvftsmps, "vdd_s1" },
>>>       { "s2", QCOM_SMD_RPM_SMPA, 2, &pm2250_lvftsmps, "vdd_s2" },
>>> @@ -1320,6 +1334,8 @@ static const struct rpm_regulator_data rpm_pms405_regulators[] = {
>>>   };
>>>     static const struct of_device_id rpm_of_match[] = {
>>> +    { .compatible = "qcom,rpm-ipq9574-mp5496-regulators",
>>> +        .data = &rpm_ipq9574_mp5496_regulators },
>>>       { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
>>>       { .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
>>>       { .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },
> Best Regards,
> Devi Priya

2023-01-27 16:06:26

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 4/6] regulator: qcom_smd: Add PMIC compatible for IPQ9574



On 1/18/2023 12:08 AM, Rob Herring wrote:
> On Fri, Jan 13, 2023 at 08:33:08PM +0530, devi priya wrote:
>> Add mp5496 PMIC compatible string for IPQ9574 SoC
>>
>> Co-developed-by: Praveenkumar I <[email protected]>
>> Signed-off-by: Praveenkumar I <[email protected]>
>> Signed-off-by: devi priya <[email protected]>
>> ---
>> .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>> index 8c45f53212b1..7907d9385583 100644
>> --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>> +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>> @@ -22,7 +22,7 @@ description:
>> Each sub-node is identified using the node's name, with valid values listed
>> for each of the pmics below.
>>
>> - For mp5496, s2
>> + For mp5496, s1, s2
>>
>> For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
>> l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
>> @@ -84,6 +84,7 @@ properties:
>> compatible:
>> enum:
>> - qcom,rpm-mp5496-regulators
>> + - qcom,rpm-ipq9574-mp5496-regulators
>
> Is this a different part than just mp5496? Or used in a different,
> incompatible way?
IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a
different power layout.So, we plan to update the compatible:
qcom,rpm-mp5496-regulators to
qcom,rpm-ipq6018-mp5496-regulators(target-specific) in the next patchset
as the regulators serve different purposes
>
>> - qcom,rpm-pm2250-regulators
>> - qcom,rpm-pm6125-regulators
>> - qcom,rpm-pm660-regulators
>> --
>> 2.17.1
>>
Best Regards,
Devi Priya

2023-01-27 20:13:02

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 4/6] regulator: qcom_smd: Add PMIC compatible for IPQ9574

On Fri, Jan 27, 2023 at 10:05 AM Devi Priya <[email protected]> wrote:
>
>
>
> On 1/18/2023 12:08 AM, Rob Herring wrote:
> > On Fri, Jan 13, 2023 at 08:33:08PM +0530, devi priya wrote:
> >> Add mp5496 PMIC compatible string for IPQ9574 SoC
> >>
> >> Co-developed-by: Praveenkumar I <[email protected]>
> >> Signed-off-by: Praveenkumar I <[email protected]>
> >> Signed-off-by: devi priya <[email protected]>
> >> ---
> >> .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> >> index 8c45f53212b1..7907d9385583 100644
> >> --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> >> +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
> >> @@ -22,7 +22,7 @@ description:
> >> Each sub-node is identified using the node's name, with valid values listed
> >> for each of the pmics below.
> >>
> >> - For mp5496, s2
> >> + For mp5496, s1, s2
> >>
> >> For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
> >> l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
> >> @@ -84,6 +84,7 @@ properties:
> >> compatible:
> >> enum:
> >> - qcom,rpm-mp5496-regulators
> >> + - qcom,rpm-ipq9574-mp5496-regulators
> >
> > Is this a different part than just mp5496? Or used in a different,
> > incompatible way?
> IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a
> different power layout.So, we plan to update the compatible:
> qcom,rpm-mp5496-regulators to
> qcom,rpm-ipq6018-mp5496-regulators(target-specific) in the next patchset
> as the regulators serve different purposes

You can't just change compatibles. It is an ABI.

This still doesn't make sense to me. The PMIC hasn't changed, so the
binding shouldn't. It should be flexible enough to be hooked up to
different platforms. That's why we have all the per regulator
configuration. What are you missing?

Rob

2023-01-31 10:17:14

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 3/6] regulator: qcom_smd: Add MP5496 regulators



On 1/27/2023 9:33 PM, Konrad Dybcio wrote:
>
>
> On 27.01.2023 17:01, Devi Priya wrote:
>>
>>
>> On 1/13/2023 8:54 PM, Konrad Dybcio wrote:
>>>
>>>
>>> On 13.01.2023 16:03, devi priya wrote:
>>>> Adding support for PMIC MP5496 on IPQ9574 SoC
>>>>
>>>> Co-developed-by: Praveenkumar I <[email protected]>
>>>> Signed-off-by: Praveenkumar I <[email protected]>
>>>> Signed-off-by: devi priya <[email protected]>
>>>> ---
>>> Please simply extend the existing MP5496 support with this
>>> S1 regulator. If you don't explicitly define and set voltages
>>> for the other vregs, they will not be probed.
>>>
>>> Konrad
>> IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a different power layout. IPQ9574 has S2 regulator which will be used for NSS scaling but S2 in IPQ6018 serves a different purpose. Hence it would not be possible to extend the existing MP5496 support for IPQ9574
> Does the s2 on IPQ9574 have a different voltage range than
> the one on IPQ6018? No? Then there's nothing blocking you
> from using the setup for both SoCs. As I've mentioned,
> regulators that you don't add to the device tree will
> not even be probed.
>
Yeah, understood! will update this in V2
> Konrad
>>>>   drivers/regulator/qcom_smd-regulator.c | 16 ++++++++++++++++
>>>>   1 file changed, 16 insertions(+)
>>>>
>>>> diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
>>>> index 9f2b58458841..1eb17d378897 100644
>>>> --- a/drivers/regulator/qcom_smd-regulator.c
>>>> +++ b/drivers/regulator/qcom_smd-regulator.c
>>>> @@ -767,6 +767,15 @@ static const struct regulator_desc mp5496_ldoa2 = {
>>>>       .ops = &rpm_mp5496_ops,
>>>>   };
>>>>   +static const struct regulator_desc ipq9574_mp5496_smpa1 = {
>>>> +    .linear_ranges = (struct linear_range[]) {
>>>> +        REGULATOR_LINEAR_RANGE(600000, 0, 37, 12500),
>>>> +    },
>>>> +    .n_linear_ranges = 1,
>>>> +    .n_voltages = 38,
>>>> +    .ops = &rpm_mp5496_ops,
>>>> +};
>>>> +
>>>>   static const struct regulator_desc pm2250_lvftsmps = {
>>>>       .linear_ranges = (struct linear_range[]) {
>>>>           REGULATOR_LINEAR_RANGE(320000, 0, 269, 4000),
>>>> @@ -799,6 +808,11 @@ static const struct rpm_regulator_data rpm_mp5496_regulators[] = {
>>>>       {}
>>>>   };
>>>>   +static const struct rpm_regulator_data rpm_ipq9574_mp5496_regulators[] = {
>>>> +    { "s1", QCOM_SMD_RPM_SMPA, 1, &ipq9574_mp5496_smpa1, "s1" },
>>>> +    {}
>>>> +};
>>>> +
>>>>   static const struct rpm_regulator_data rpm_pm2250_regulators[] = {
>>>>       { "s1", QCOM_SMD_RPM_SMPA, 1, &pm2250_lvftsmps, "vdd_s1" },
>>>>       { "s2", QCOM_SMD_RPM_SMPA, 2, &pm2250_lvftsmps, "vdd_s2" },
>>>> @@ -1320,6 +1334,8 @@ static const struct rpm_regulator_data rpm_pms405_regulators[] = {
>>>>   };
>>>>     static const struct of_device_id rpm_of_match[] = {
>>>> +    { .compatible = "qcom,rpm-ipq9574-mp5496-regulators",
>>>> +        .data = &rpm_ipq9574_mp5496_regulators },
>>>>       { .compatible = "qcom,rpm-mp5496-regulators", .data = &rpm_mp5496_regulators },
>>>>       { .compatible = "qcom,rpm-pm2250-regulators", .data = &rpm_pm2250_regulators },
>>>>       { .compatible = "qcom,rpm-pm6125-regulators", .data = &rpm_pm6125_regulators },
>> Best Regards,
>> Devi Priya
Best Regards,
Devi Priya

2023-01-31 10:23:07

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 4/6] regulator: qcom_smd: Add PMIC compatible for IPQ9574



On 1/28/2023 1:42 AM, Rob Herring wrote:
> On Fri, Jan 27, 2023 at 10:05 AM Devi Priya <[email protected]> wrote:
>>
>>
>>
>> On 1/18/2023 12:08 AM, Rob Herring wrote:
>>> On Fri, Jan 13, 2023 at 08:33:08PM +0530, devi priya wrote:
>>>> Add mp5496 PMIC compatible string for IPQ9574 SoC
>>>>
>>>> Co-developed-by: Praveenkumar I <[email protected]>
>>>> Signed-off-by: Praveenkumar I <[email protected]>
>>>> Signed-off-by: devi priya <[email protected]>
>>>> ---
>>>> .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 3 ++-
>>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>>>> index 8c45f53212b1..7907d9385583 100644
>>>> --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>>>> +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml
>>>> @@ -22,7 +22,7 @@ description:
>>>> Each sub-node is identified using the node's name, with valid values listed
>>>> for each of the pmics below.
>>>>
>>>> - For mp5496, s2
>>>> + For mp5496, s1, s2
>>>>
>>>> For pm2250, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11,
>>>> l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22
>>>> @@ -84,6 +84,7 @@ properties:
>>>> compatible:
>>>> enum:
>>>> - qcom,rpm-mp5496-regulators
>>>> + - qcom,rpm-ipq9574-mp5496-regulators
>>>
>>> Is this a different part than just mp5496? Or used in a different,
>>> incompatible way?
>> IPQ6018 and IPQ9574 platforms use the same PMIC MP5496 but they have a
>> different power layout.So, we plan to update the compatible:
>> qcom,rpm-mp5496-regulators to
>> qcom,rpm-ipq6018-mp5496-regulators(target-specific) in the next patchset
>> as the regulators serve different purposes
>
> You can't just change compatibles. It is an ABI.
>
> This still doesn't make sense to me. The PMIC hasn't changed, so the
> binding shouldn't. It should be flexible enough to be hooked up to
> different platforms. That's why we have all the per regulator
> configuration. What are you missing?
>
> Rob
Sure got it!
It should be fine to use the existing mp5496 compatible for IPQ9574 too.
Will update this in V2

Best Regards,
Devi Priya

2023-02-02 09:55:02

by Devi Priya

[permalink] [raw]
Subject: Re: [PATCH 5/6] arm64: dts: qcom: ipq9574: Add cpufreq & RPM related nodes

Thanks konrad for taking time to review the patch!

On 1/13/2023 9:02 PM, Konrad Dybcio wrote:
>
>
> On 13.01.2023 16:03, devi priya wrote:
>> Add CPU Freq and RPM related nodes in the device tree
> These two are wildly different things, barely related to one
> another and can very well be introduced in separate patches.
> Please do so.
>
>>
>> Co-developed-by: Praveenkumar I <[email protected]>
>> Signed-off-by: Praveenkumar I <[email protected]>
>> Signed-off-by: devi priya <[email protected]>
>> ---
>> arch/arm64/boot/dts/qcom/ipq9574.dtsi | 80 +++++++++++++++++++++++++++
>> 1 file changed, 80 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> index 5a2244b437ed..79fa5d91882c 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
>> @@ -9,6 +9,7 @@
>> #include <dt-bindings/interrupt-controller/arm-gic.h>
>> #include <dt-bindings/clock/qcom,gcc-ipq9574.h>
>> #include <dt-bindings/reset/qcom,gcc-ipq9574.h>
>> +#include <dt-bindings/clock/qcom,apss-ipq.h>
> Please sort the includes alphabetically.
Sure, okay
>
>>
>> / {
>> interrupt-parent = <&intc>;
>> @@ -75,6 +76,10 @@
>> reg = <0x0>;
>> enable-method = "psci";
>> next-level-cache = <&L2_0>;
>> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
>> + clock-names = "cpu";
>> + operating-points-v2 = <&cpu_opp_table>;
>> + cpu0-supply = <&ipq9574_s1>;
> Why is this cpu0-supply and the rest are cpu-supply? Neither of them
> seem particularly documented, by the way..
Sure, will check and update this in V2
>
>
>> };
>>
>> CPU1: cpu@1 {
>> @@ -83,6 +88,10 @@
>> reg = <0x1>;
>> enable-method = "psci";
>> next-level-cache = <&L2_0>;
>> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
>> + clock-names = "cpu";
>> + operating-points-v2 = <&cpu_opp_table>;
>> + cpu-supply = <&ipq9574_s1>;
>> };
>>
>> CPU2: cpu@2 {
>> @@ -91,6 +100,10 @@
>> reg = <0x2>;
>> enable-method = "psci";
>> next-level-cache = <&L2_0>;
>> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
>> + clock-names = "cpu";
>> + operating-points-v2 = <&cpu_opp_table>;
>> + cpu-supply = <&ipq9574_s1>;
>> };
>>
>> CPU3: cpu@3 {
>> @@ -99,6 +112,10 @@
>> reg = <0x3>;
>> enable-method = "psci";
>> next-level-cache = <&L2_0>;
>> + clocks = <&apcs_glb APCS_ALIAS0_CORE_CLK>;
>> + clock-names = "cpu";
>> + operating-points-v2 = <&cpu_opp_table>;
>> + cpu-supply = <&ipq9574_s1>;
>> };
>>
>> L2_0: l2-cache {
>> @@ -107,6 +124,42 @@
>> };
>> };
>>
>> + cpu_opp_table: opp-table-cpu {
> Alphabetically this goes after memory
Okay
>
>> + compatible = "operating-points-v2";
>> + opp-shared;
>> +
>> + opp-936000000 {
>> + opp-hz = /bits/ 64 <936000000>;
>> + opp-microvolt = <725000>;
>> + clock-latency-ns = <200000>;
>> + };
> Please add a newline between each subnode.
Okay
>
>> + opp-1104000000 {
>> + opp-hz = /bits/ 64 <1104000000>;
>> + opp-microvolt = <787500>;
>> + clock-latency-ns = <200000>;
>> + };
>> + opp-1416000000 {
>> + opp-hz = /bits/ 64 <1416000000>;
>> + opp-microvolt = <862500>;
>> + clock-latency-ns = <200000>;
>> + };
>> + opp-1488000000 {
>> + opp-hz = /bits/ 64 <1488000000>;
>> + opp-microvolt = <925000>;
>> + clock-latency-ns = <200000>;
>> + };
>> + opp-1800000000 {
>> + opp-hz = /bits/ 64 <1800000000>;
>> + opp-microvolt = <987500>;
>> + clock-latency-ns = <200000>;
>> + };
>> + opp-2208000000 {
>> + opp-hz = /bits/ 64 <2208000000>;
>> + opp-microvolt = <1062500>;
>> + clock-latency-ns = <200000>;
>> + };
>> + };
>> +
>> memory@40000000 {
>> device_type = "memory";
>> /* We expect the bootloader to fill in the size */
>> @@ -128,6 +181,11 @@
>> #size-cells = <2>;
>> ranges;
>>
>> + rpm_msg_ram: memory@60000 {
>> + reg = <0x0 0x00060000 0x0 0x6000>;
>> + no-map;
>> + };
>> +
>> tz_region: memory@4a600000 {
>> reg = <0x0 0x4a600000 0x0 0x400000>;
>> no-map;
>> @@ -324,6 +382,28 @@
>> };
>> };
>>
>> + rpm-glink {
>> + compatible = "qcom,glink-rpm";
>> + interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
>> + qcom,rpm-msg-ram = <&rpm_msg_ram>;
>> + mboxes = <&apcs_glb 0>;
>> +
>> + rpm_requests: glink-channel {
>> + compatible = "qcom,rpm-ipq9574";
>> + qcom,glink-channels = "rpm_requests";
>> +
>> + regulators {
>> + compatible = "qcom,rpm-ipq9574-mp5496-regulators";
> The regulators are board-specific and should not be included in the
> SoC DTSI. If this is a very common configuration, you may split that
> into ipq9574-mp5496.dtsi, for example. Or ipq9574-pmics.dtsi if it's
> coupled with more PMICs.
Got it. Will move this to the board DT
>
>> +
>> + ipq9574_s1: s1 {
>> + regulator-min-microvolt = <587500>;
>> + regulator-max-microvolt = <1075000>;
>> + regulator-always-on;
> Won't this break CPU retention?
>
> You're holding a vote on it from the CPU devices, so it should be
> always enabled when the CPUs are oneline (as far as Linux is
> concerned).
>
>
> Or maybe Linux will think it's enabled and RPM will quietly park
> it when it decides it's good to do so.. but will it with an active
> request.. not sure, really.. just something to consider..
>
Sure, will check this and update accordingly in V2
> Konrad
>> + };
>> + };
>> + };
>> + };
>> +
>> timer {
>> compatible = "arm,armv8-timer";
>> interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
Best Regards,
Devi Priya

2023-02-06 22:28:56

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/6] Add regulator support for IPQ9574 SoC

On Fri, 13 Jan 2023 20:33:04 +0530, devi priya wrote:
> IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator is used for
> APSS voltage scaling.
> This patch series adds the support for the same.
> Also enables the RPM communication over the RPMSG framework
>
> This series depends on the below patchset
> https://lore.kernel.org/linux-arm-msm/[email protected]/
>
> [...]

Applied, thanks!

[1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible
commit: 64dc69f3f36a71a95bfed8054d49600a7872415e

Best regards,
--
Bjorn Andersson <[email protected]>

2023-02-08 06:09:25

by Devi Priya

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/6] Add regulator support for IPQ9574 SoC



On 2/7/2023 4:00 AM, Bjorn Andersson wrote:
> On Fri, 13 Jan 2023 20:33:04 +0530, devi priya wrote:
>> IPQ9574 SoC uses the PMIC MP5496 and SMPA1 regulator is used for
>> APSS voltage scaling.
>> This patch series adds the support for the same.
>> Also enables the RPM communication over the RPMSG framework
>>
>> This series depends on the below patchset
>> https://lore.kernel.org/linux-arm-msm/[email protected]/
>>
>> [...]
>
> Applied, thanks!
>
Thanks Bjorn!

> [1/6] soc: qcom: smd-rpm: Add IPQ9574 compatible
> commit: 64dc69f3f36a71a95bfed8054d49600a7872415e
>
> Best regards,
Regards,
Devi Priya