Add RPM power domain support for SM4250.
Cc: Bjorn Andersson <[email protected]>
Cc: Rajendra Nayak <[email protected]>
Cc: Konrad Dybcio <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Bhupesh Sharma (2):
dt-bindings: power: rpmpd: Add SM4250 support
soc: qcom: rpmpd: Add SM4250 support
.../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
drivers/soc/qcom/rpmpd.c | 18 ++++++++++++++++++
include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++
3 files changed, 29 insertions(+)
--
2.38.1
Add compatible and constants for the power domains exposed by the
SM4250 RPM.
Cc: Bjorn Andersson <[email protected]>
Cc: Rajendra Nayak <[email protected]>
Cc: Konrad Dybcio <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Bhupesh Sharma <[email protected]>
---
.../devicetree/bindings/power/qcom,rpmpd.yaml | 1 +
include/dt-bindings/power/qcom-rpmpd.h | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
index 5b4eda919911..c99ffd39e704 100644
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -37,6 +37,7 @@ properties:
- qcom,sdm845-rpmhpd
- qcom,sdx55-rpmhpd
- qcom,sdx65-rpmhpd
+ - qcom,sm4250-rpmpd
- 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 f5f82dde7399..bbe3b29913af 100644
--- a/include/dt-bindings/power/qcom-rpmpd.h
+++ b/include/dt-bindings/power/qcom-rpmpd.h
@@ -274,6 +274,16 @@
#define SDM660_SSCMX 8
#define SDM660_SSCMX_VFL 9
+/* SM4250 Power Domains */
+#define SM4250_VDDCX 0
+#define SM4250_VDDCX_AO 1
+#define SM4250_VDDCX_VFL 2
+#define SM4250_VDDMX 3
+#define SM4250_VDDMX_AO 4
+#define SM4250_VDDMX_VFL 5
+#define SM4250_VDD_LPI_CX 6
+#define SM4250_VDD_LPI_MX 7
+
/* SM6115 Power Domains */
#define SM6115_VDDCX 0
#define SM6115_VDDCX_AO 1
--
2.38.1
SM4250 has the same RPM power domains as SM6115. Add SM4250
support by reusing SM6115 power domains.
Cc: Bjorn Andersson <[email protected]>
Cc: Rajendra Nayak <[email protected]>
Cc: Konrad Dybcio <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Bhupesh Sharma <[email protected]>
---
drivers/soc/qcom/rpmpd.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
index 337b1ad1cd3b..f0db6a10cf4e 100644
--- a/drivers/soc/qcom/rpmpd.c
+++ b/drivers/soc/qcom/rpmpd.c
@@ -471,6 +471,23 @@ static const struct rpmpd_desc qcm2290_desc = {
.max_state = RPM_SMD_LEVEL_TURBO_NO_CPR,
};
+static struct rpmpd *sm4250_rpmpds[] = {
+ [SM4250_VDDCX] = &sm6115_vddcx,
+ [SM4250_VDDCX_AO] = &sm6115_vddcx_ao,
+ [SM4250_VDDCX_VFL] = &sm6115_vddcx_vfl,
+ [SM4250_VDDMX] = &sm6115_vddmx,
+ [SM4250_VDDMX_AO] = &sm6115_vddmx_ao,
+ [SM4250_VDDMX_VFL] = &sm6115_vddmx_vfl,
+ [SM4250_VDD_LPI_CX] = &sm6115_vdd_lpi_cx,
+ [SM4250_VDD_LPI_MX] = &sm6115_vdd_lpi_mx,
+};
+
+static const struct rpmpd_desc sm4250_desc = {
+ .rpmpds = sm4250_rpmpds,
+ .num_pds = ARRAY_SIZE(sm4250_rpmpds),
+ .max_state = RPM_SMD_LEVEL_TURBO_NO_CPR,
+};
+
static const struct of_device_id rpmpd_match_table[] = {
{ .compatible = "qcom,mdm9607-rpmpd", .data = &mdm9607_desc },
{ .compatible = "qcom,msm8226-rpmpd", .data = &msm8226_desc },
@@ -485,6 +502,7 @@ static const struct of_device_id rpmpd_match_table[] = {
{ .compatible = "qcom,qcm2290-rpmpd", .data = &qcm2290_desc },
{ .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc },
{ .compatible = "qcom,sdm660-rpmpd", .data = &sdm660_desc },
+ { .compatible = "qcom,sm4250-rpmpd", .data = &sm4250_desc },
{ .compatible = "qcom,sm6115-rpmpd", .data = &sm6115_desc },
{ .compatible = "qcom,sm6125-rpmpd", .data = &sm6125_desc },
{ .compatible = "qcom,sm6375-rpmpd", .data = &sm6375_desc },
--
2.38.1
On 27/11/2022 12:22, Bhupesh Sharma wrote:
> Add compatible and constants for the power domains exposed by the
> SM4250 RPM.
>
> Cc: Bjorn Andersson <[email protected]>
> Cc: Rajendra Nayak <[email protected]>
> Cc: Konrad Dybcio <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
> Signed-off-by: Bhupesh Sharma <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On Sun, 27 Nov 2022 16:52:02 +0530, Bhupesh Sharma wrote:
> Add RPM power domain support for SM4250.
>
> Cc: Bjorn Andersson <[email protected]>
> Cc: Rajendra Nayak <[email protected]>
> Cc: Konrad Dybcio <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
>
> [...]
Applied, thanks!
[1/2] dt-bindings: power: rpmpd: Add SM4250 support
commit: 45ac44ed10e58cf9b510e6552317ed7d2602346f
[2/2] soc: qcom: rpmpd: Add SM4250 support
commit: 5b617b1b10c1c6a4365d8f956032e95c53b8e388
Best regards,
--
Bjorn Andersson <[email protected]>
On Wed, 7 Dec 2022 at 01:05, Konrad Dybcio <[email protected]> wrote:
>
>
>
> On 06/12/2022 19:18, Bjorn Andersson wrote:
> > On Sun, 27 Nov 2022 16:52:02 +0530, Bhupesh Sharma wrote:
> >> Add RPM power domain support for SM4250.
> >>
> >> Cc: Bjorn Andersson <[email protected]>
> >> Cc: Rajendra Nayak <[email protected]>
> >> Cc: Konrad Dybcio <[email protected]>
> >> Cc: Rob Herring <[email protected]>
> >> Cc: Krzysztof Kozlowski <[email protected]>
> >>
> >> [...]
> >
> > Applied, thanks!
> >
> > [1/2] dt-bindings: power: rpmpd: Add SM4250 support
> > commit: 45ac44ed10e58cf9b510e6552317ed7d2602346f
> > [2/2] soc: qcom: rpmpd: Add SM4250 support
> > commit: 5b617b1b10c1c6a4365d8f956032e95c53b8e388
> >
> > Best regards,
> This may deserve a revert.. it's a 1:1 copy of 6115, which, well..
> is the same SoC, lower binned. And they share a common dts.
I agree with Konrad here. Sorry, I was waiting for official
confirmation from Qualcomm, but these are indeed similar SoCs which
should share the common dts.
Thanks,
Bhupesh
On 06/12/2022 19:18, Bjorn Andersson wrote:
> On Sun, 27 Nov 2022 16:52:02 +0530, Bhupesh Sharma wrote:
>> Add RPM power domain support for SM4250.
>>
>> Cc: Bjorn Andersson <[email protected]>
>> Cc: Rajendra Nayak <[email protected]>
>> Cc: Konrad Dybcio <[email protected]>
>> Cc: Rob Herring <[email protected]>
>> Cc: Krzysztof Kozlowski <[email protected]>
>>
>> [...]
>
> Applied, thanks!
>
> [1/2] dt-bindings: power: rpmpd: Add SM4250 support
> commit: 45ac44ed10e58cf9b510e6552317ed7d2602346f
> [2/2] soc: qcom: rpmpd: Add SM4250 support
> commit: 5b617b1b10c1c6a4365d8f956032e95c53b8e388
>
> Best regards,
This may deserve a revert.. it's a 1:1 copy of 6115, which, well..
is the same SoC, lower binned. And they share a common dts.
Konrad