* [PATCH 0/2] Add RPMH power-domain node for SC7180 SoCs
@ 2019-12-16 11:55 Sibi Sankar
2019-12-16 11:55 ` [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Sibi Sankar
2019-12-16 11:55 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node Sibi Sankar
0 siblings, 2 replies; 8+ messages in thread
From: Sibi Sankar @ 2019-12-16 11:55 UTC (permalink / raw)
To: bjorn.andersson, robh+dt, rnayak
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
swboyd, dianders, Sibi Sankar
This patch series converts the RPMH/RPM power-domain bindings to yaml and
adds the RPMH power-domain device node for SC7180 SoCs.
Sibi Sankar (2):
dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml
arm64: dts: qcom: sc7180: Add rpmh power-domain node
.../devicetree/bindings/power/qcom,rpmpd.txt | 150 ----------------
.../devicetree/bindings/power/qcom,rpmpd.yaml | 170 ++++++++++++++++++
arch/arm64/boot/dts/qcom/sc7180.dtsi | 55 ++++++
3 files changed, 225 insertions(+), 150 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.txt
create mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml
2019-12-16 11:55 [PATCH 0/2] Add RPMH power-domain node for SC7180 SoCs Sibi Sankar
@ 2019-12-16 11:55 ` Sibi Sankar
2019-12-16 19:35 ` Stephen Boyd
2019-12-17 10:31 ` Rajendra Nayak
2019-12-16 11:55 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node Sibi Sankar
1 sibling, 2 replies; 8+ messages in thread
From: Sibi Sankar @ 2019-12-16 11:55 UTC (permalink / raw)
To: bjorn.andersson, robh+dt, rnayak
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
swboyd, dianders, Sibi Sankar
Convert RPM/RPMH power-domain bindings to yaml.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
.../devicetree/bindings/power/qcom,rpmpd.txt | 150 ----------------
.../devicetree/bindings/power/qcom,rpmpd.yaml | 170 ++++++++++++++++++
2 files changed, 170 insertions(+), 150 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.txt
create mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
deleted file mode 100644
index 6346d00b1b400..0000000000000
--- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-Qualcomm RPM/RPMh Power domains
-
-For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
-which then translates it into a corresponding voltage on a rail
-
-Required Properties:
- - compatible: Should be one of the following
- * qcom,msm8976-rpmpd: RPM Power domain for the msm8976 family of SoC
- * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
- * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC
- * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
- * qcom,sc7180-rpmhpd: RPMh Power domain for the sc7180 family of SoC
- * qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC
- * qcom,sm8150-rpmhpd: RPMh Power domain for the sm8150 family of SoC
- - #power-domain-cells: number of cells in Power domain specifier
- must be 1.
- - operating-points-v2: Phandle to the OPP table for the Power domain.
- Refer to Documentation/devicetree/bindings/power/power_domain.txt
- and Documentation/devicetree/bindings/opp/opp.txt for more details
-
-Refer to <dt-bindings/power/qcom-rpmpd.h> for the level values for
-various OPPs for different platforms as well as Power domain indexes
-
-Example: rpmh power domain controller and OPP table
-
-#include <dt-bindings/power/qcom-rpmhpd.h>
-
-opp-level values specified in the OPP tables for RPMh power domains
-should use the RPMH_REGULATOR_LEVEL_* constants from
-<dt-bindings/power/qcom-rpmhpd.h>
-
- rpmhpd: power-controller {
- compatible = "qcom,sdm845-rpmhpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmhpd_opp_table>;
-
- rpmhpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmhpd_opp_ret: opp1 {
- opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
- };
-
- rpmhpd_opp_min_svs: opp2 {
- opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
- };
-
- rpmhpd_opp_low_svs: opp3 {
- opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
- };
-
- rpmhpd_opp_svs: opp4 {
- opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
- };
-
- rpmhpd_opp_svs_l1: opp5 {
- opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
- };
-
- rpmhpd_opp_nom: opp6 {
- opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
- };
-
- rpmhpd_opp_nom_l1: opp7 {
- opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
- };
-
- rpmhpd_opp_nom_l2: opp8 {
- opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
- };
-
- rpmhpd_opp_turbo: opp9 {
- opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
- };
-
- rpmhpd_opp_turbo_l1: opp10 {
- opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
- };
- };
- };
-
-Example: rpm power domain controller and OPP table
-
- rpmpd: power-controller {
- compatible = "qcom,msm8996-rpmpd";
- #power-domain-cells = <1>;
- operating-points-v2 = <&rpmpd_opp_table>;
-
- rpmpd_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- rpmpd_opp_low: opp1 {
- opp-level = <1>;
- };
-
- rpmpd_opp_ret: opp2 {
- opp-level = <2>;
- };
-
- rpmpd_opp_svs: opp3 {
- opp-level = <3>;
- };
-
- rpmpd_opp_normal: opp4 {
- opp-level = <4>;
- };
-
- rpmpd_opp_high: opp5 {
- opp-level = <5>;
- };
-
- rpmpd_opp_turbo: opp6 {
- opp-level = <6>;
- };
- };
- };
-
-Example: Client/Consumer device using OPP table
-
- leaky-device0@12350000 {
- compatible = "foo,i-leak-current";
- reg = <0x12350000 0x1000>;
- power-domains = <&rpmhpd SDM845_MX>;
- operating-points-v2 = <&leaky_opp_table>;
- };
-
-
- leaky_opp_table: opp-table {
- compatible = "operating-points-v2";
-
- opp1 {
- opp-hz = /bits/ 64 <144000>;
- required-opps = <&rpmhpd_opp_low>;
- };
-
- opp2 {
- opp-hz = /bits/ 64 <400000>;
- required-opps = <&rpmhpd_opp_ret>;
- };
-
- opp3 {
- opp-hz = /bits/ 64 <20000000>;
- required-opps = <&rpmpd_opp_svs>;
- };
-
- opp4 {
- opp-hz = /bits/ 64 <25000000>;
- required-opps = <&rpmpd_opp_normal>;
- };
- };
diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
new file mode 100644
index 0000000000000..4aebf024e4427
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
@@ -0,0 +1,170 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm RPM/RPMh Power domains
+
+maintainers:
+ - Rajendra Nayak <rnayak@codeaurora.org>
+
+description:
+ For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
+ which then translates it into a corresponding voltage on a rail
+
+properties:
+ compatible:
+ enum:
+ - qcom,msm8976-rpmpd
+ - qcom,msm8996-rpmpd
+ - qcom,msm8998-rpmpd
+ - qcom,qcs404-rpmpd
+ - qcom,sc7180-rpmhpd
+ - qcom,sdm845-rpmhpd
+ - qcom,sm8150-rpmhpd
+
+ '#power-domain-cells':
+ const: 1
+
+ operating-points-v2: true
+
+ opp-table:
+ type: object
+
+required:
+ - compatible
+ - '#power-domain-cells'
+ - operating-points-v2
+
+additionalProperties: false
+
+examples:
+ - |
+
+ // Example 1 (rpmh power domain controller and OPP table):
+
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
+ rpmhpd: power-controller {
+ compatible = "qcom,sdm845-rpmhpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmhpd_opp_table>;
+
+ rpmhpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmhpd_opp_ret: opp1 {
+ opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
+ };
+
+ rpmhpd_opp_min_svs: opp2 {
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+
+ rpmhpd_opp_low_svs: opp3 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ rpmhpd_opp_svs: opp4 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ rpmhpd_opp_svs_l1: opp5 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ rpmhpd_opp_nom: opp6 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ rpmhpd_opp_nom_l1: opp7 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ rpmhpd_opp_nom_l2: opp8 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
+ };
+
+ rpmhpd_opp_turbo: opp9 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ rpmhpd_opp_turbo_l1: opp10 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ };
+ };
+ };
+
+ - |
+
+ // Example 2 (rpm power domain controller and OPP table):
+
+ rpmpd: power-controller {
+ compatible = "qcom,msm8996-rpmpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmpd_opp_table>;
+
+ rpmpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmpd_opp_low: opp1 {
+ opp-level = <1>;
+ };
+
+ rpmpd_opp_ret: opp2 {
+ opp-level = <2>;
+ };
+
+ rpmpd_opp_svs: opp3 {
+ opp-level = <3>;
+ };
+
+ rpmpd_opp_normal: opp4 {
+ opp-level = <4>;
+ };
+
+ rpmpd_opp_high: opp5 {
+ opp-level = <5>;
+ };
+
+ rpmpd_opp_turbo: opp6 {
+ opp-level = <6>;
+ };
+ };
+ };
+
+ - |
+
+ // Example 3 (Client/Consumer device using OPP table):
+
+ leaky-device0@12350000 {
+ compatible = "foo,i-leak-current";
+ reg = <0x12350000 0x1000>;
+ power-domains = <&rpmhpd 0>;
+ operating-points-v2 = <&leaky_opp_table>;
+ };
+
+ leaky_opp_table: opp-table {
+ compatible = "operating-points-v2";
+ opp1 {
+ opp-hz = /bits/ 64 <144000>;
+ required-opps = <&rpmhpd_opp_low>;
+ };
+
+ opp2 {
+ opp-hz = /bits/ 64 <400000>;
+ required-opps = <&rpmhpd_opp_ret>;
+ };
+
+ opp3 {
+ opp-hz = /bits/ 64 <20000000>;
+ required-opps = <&rpmpd_opp_svs>;
+ };
+
+ opp4 {
+ opp-hz = /bits/ 64 <25000000>;
+ required-opps = <&rpmpd_opp_normal>;
+ };
+ };
+...
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node
2019-12-16 11:55 [PATCH 0/2] Add RPMH power-domain node for SC7180 SoCs Sibi Sankar
2019-12-16 11:55 ` [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Sibi Sankar
@ 2019-12-16 11:55 ` Sibi Sankar
2019-12-16 19:36 ` Stephen Boyd
2019-12-17 10:31 ` Rajendra Nayak
1 sibling, 2 replies; 8+ messages in thread
From: Sibi Sankar @ 2019-12-16 11:55 UTC (permalink / raw)
To: bjorn.andersson, robh+dt, rnayak
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
swboyd, dianders, Sibi Sankar
Add the DT node for the rpmhpd power controller on SC7180 SoCs.
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
arch/arm64/boot/dts/qcom/sc7180.dtsi | 55 ++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 01bbb58ae5160..fb17dc62d7ab1 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/phy/phy-qcom-qusb2.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
/ {
@@ -1284,6 +1285,60 @@
clock-names = "xo";
#clock-cells = <1>;
};
+
+ rpmhpd: power-controller {
+ compatible = "qcom,sc7180-rpmhpd";
+ #power-domain-cells = <1>;
+ operating-points-v2 = <&rpmhpd_opp_table>;
+
+ rpmhpd_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ rpmhpd_opp_ret: opp1 {
+ opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
+ };
+
+ rpmhpd_opp_min_svs: opp2 {
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+
+ rpmhpd_opp_low_svs: opp3 {
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ };
+
+ rpmhpd_opp_svs: opp4 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ };
+
+ rpmhpd_opp_svs_l1: opp5 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ };
+
+ rpmhpd_opp_svs_l2: opp6 {
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
+ };
+
+ rpmhpd_opp_nom: opp7 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ };
+
+ rpmhpd_opp_nom_l1: opp8 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ };
+
+ rpmhpd_opp_nom_l2: opp9 {
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
+ };
+
+ rpmhpd_opp_turbo: opp10 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ };
+
+ rpmhpd_opp_turbo_l1: opp11 {
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ };
+ };
+ };
};
cpufreq_hw: cpufreq@18323000 {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml
2019-12-16 11:55 ` [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Sibi Sankar
@ 2019-12-16 19:35 ` Stephen Boyd
2019-12-17 10:11 ` Sibi Sankar
2019-12-17 10:31 ` Rajendra Nayak
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Boyd @ 2019-12-16 19:35 UTC (permalink / raw)
To: Sibi Sankar, bjorn.andersson, rnayak, robh+dt
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
dianders, Sibi Sankar
Quoting Sibi Sankar (2019-12-16 03:55:30)
> Convert RPM/RPMH power-domain bindings to yaml.
>
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
One nitpick below!
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> new file mode 100644
> index 0000000000000..4aebf024e4427
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> @@ -0,0 +1,170 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm RPM/RPMh Power domains
> +
> +maintainers:
> + - Rajendra Nayak <rnayak@codeaurora.org>
> +
> +description:
> + For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
> + which then translates it into a corresponding voltage on a rail
Add a full-stop here to make it a true sentence?
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,msm8976-rpmpd
> + - qcom,msm8996-rpmpd
> + - qcom,msm8998-rpmpd
> + - qcom,qcs404-rpmpd
> + - qcom,sc7180-rpmhpd
> + - qcom,sdm845-rpmhpd
> + - qcom,sm8150-rpmhpd
> +
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node
2019-12-16 11:55 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node Sibi Sankar
@ 2019-12-16 19:36 ` Stephen Boyd
2019-12-17 10:31 ` Rajendra Nayak
1 sibling, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2019-12-16 19:36 UTC (permalink / raw)
To: Sibi Sankar, bjorn.andersson, rnayak, robh+dt
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
dianders, Sibi Sankar
Quoting Sibi Sankar (2019-12-16 03:55:31)
> Add the DT node for the rpmhpd power controller on SC7180 SoCs.
>
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml
2019-12-16 19:35 ` Stephen Boyd
@ 2019-12-17 10:11 ` Sibi Sankar
0 siblings, 0 replies; 8+ messages in thread
From: Sibi Sankar @ 2019-12-17 10:11 UTC (permalink / raw)
To: Stephen Boyd
Cc: bjorn.andersson, rnayak, robh+dt, agross, linux-kernel,
devicetree, linux-arm-msm, mark.rutland, dianders,
linux-kernel-owner
On 2019-12-17 01:05, Stephen Boyd wrote:
> Quoting Sibi Sankar (2019-12-16 03:55:30)
>> Convert RPM/RPMH power-domain bindings to yaml.
>>
>> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
>
> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
>
> One nitpick below!
>
>> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> new file mode 100644
>> index 0000000000000..4aebf024e4427
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>> @@ -0,0 +1,170 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Qualcomm RPM/RPMh Power domains
>> +
>> +maintainers:
>> + - Rajendra Nayak <rnayak@codeaurora.org>
>> +
>> +description:
>> + For RPM/RPMh Power domains, we communicate a performance state to
>> RPM/RPMh
>> + which then translates it into a corresponding voltage on a rail
>
> Add a full-stop here to make it a true sentence?
sure I'll re-spin it
>
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - qcom,msm8976-rpmpd
>> + - qcom,msm8996-rpmpd
>> + - qcom,msm8998-rpmpd
>> + - qcom,qcs404-rpmpd
>> + - qcom,sc7180-rpmhpd
>> + - qcom,sdm845-rpmhpd
>> + - qcom,sm8150-rpmhpd
>> +
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml
2019-12-16 11:55 ` [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Sibi Sankar
2019-12-16 19:35 ` Stephen Boyd
@ 2019-12-17 10:31 ` Rajendra Nayak
1 sibling, 0 replies; 8+ messages in thread
From: Rajendra Nayak @ 2019-12-17 10:31 UTC (permalink / raw)
To: Sibi Sankar, bjorn.andersson, robh+dt
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
swboyd, dianders
On 12/16/2019 5:25 PM, Sibi Sankar wrote:
> Convert RPM/RPMH power-domain bindings to yaml.
>
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>
> .../devicetree/bindings/power/qcom,rpmpd.txt | 150 ----------------
> .../devicetree/bindings/power/qcom,rpmpd.yaml | 170 ++++++++++++++++++
> 2 files changed, 170 insertions(+), 150 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> create mode 100644 Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
>
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> deleted file mode 100644
> index 6346d00b1b400..0000000000000
> --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt
> +++ /dev/null
> @@ -1,150 +0,0 @@
> -Qualcomm RPM/RPMh Power domains
> -
> -For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
> -which then translates it into a corresponding voltage on a rail
> -
> -Required Properties:
> - - compatible: Should be one of the following
> - * qcom,msm8976-rpmpd: RPM Power domain for the msm8976 family of SoC
> - * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
> - * qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC
> - * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
> - * qcom,sc7180-rpmhpd: RPMh Power domain for the sc7180 family of SoC
> - * qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC
> - * qcom,sm8150-rpmhpd: RPMh Power domain for the sm8150 family of SoC
> - - #power-domain-cells: number of cells in Power domain specifier
> - must be 1.
> - - operating-points-v2: Phandle to the OPP table for the Power domain.
> - Refer to Documentation/devicetree/bindings/power/power_domain.txt
> - and Documentation/devicetree/bindings/opp/opp.txt for more details
> -
> -Refer to <dt-bindings/power/qcom-rpmpd.h> for the level values for
> -various OPPs for different platforms as well as Power domain indexes
> -
> -Example: rpmh power domain controller and OPP table
> -
> -#include <dt-bindings/power/qcom-rpmhpd.h>
> -
> -opp-level values specified in the OPP tables for RPMh power domains
> -should use the RPMH_REGULATOR_LEVEL_* constants from
> -<dt-bindings/power/qcom-rpmhpd.h>
> -
> - rpmhpd: power-controller {
> - compatible = "qcom,sdm845-rpmhpd";
> - #power-domain-cells = <1>;
> - operating-points-v2 = <&rpmhpd_opp_table>;
> -
> - rpmhpd_opp_table: opp-table {
> - compatible = "operating-points-v2";
> -
> - rpmhpd_opp_ret: opp1 {
> - opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
> - };
> -
> - rpmhpd_opp_min_svs: opp2 {
> - opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
> - };
> -
> - rpmhpd_opp_low_svs: opp3 {
> - opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
> - };
> -
> - rpmhpd_opp_svs: opp4 {
> - opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
> - };
> -
> - rpmhpd_opp_svs_l1: opp5 {
> - opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
> - };
> -
> - rpmhpd_opp_nom: opp6 {
> - opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
> - };
> -
> - rpmhpd_opp_nom_l1: opp7 {
> - opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
> - };
> -
> - rpmhpd_opp_nom_l2: opp8 {
> - opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
> - };
> -
> - rpmhpd_opp_turbo: opp9 {
> - opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
> - };
> -
> - rpmhpd_opp_turbo_l1: opp10 {
> - opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
> - };
> - };
> - };
> -
> -Example: rpm power domain controller and OPP table
> -
> - rpmpd: power-controller {
> - compatible = "qcom,msm8996-rpmpd";
> - #power-domain-cells = <1>;
> - operating-points-v2 = <&rpmpd_opp_table>;
> -
> - rpmpd_opp_table: opp-table {
> - compatible = "operating-points-v2";
> -
> - rpmpd_opp_low: opp1 {
> - opp-level = <1>;
> - };
> -
> - rpmpd_opp_ret: opp2 {
> - opp-level = <2>;
> - };
> -
> - rpmpd_opp_svs: opp3 {
> - opp-level = <3>;
> - };
> -
> - rpmpd_opp_normal: opp4 {
> - opp-level = <4>;
> - };
> -
> - rpmpd_opp_high: opp5 {
> - opp-level = <5>;
> - };
> -
> - rpmpd_opp_turbo: opp6 {
> - opp-level = <6>;
> - };
> - };
> - };
> -
> -Example: Client/Consumer device using OPP table
> -
> - leaky-device0@12350000 {
> - compatible = "foo,i-leak-current";
> - reg = <0x12350000 0x1000>;
> - power-domains = <&rpmhpd SDM845_MX>;
> - operating-points-v2 = <&leaky_opp_table>;
> - };
> -
> -
> - leaky_opp_table: opp-table {
> - compatible = "operating-points-v2";
> -
> - opp1 {
> - opp-hz = /bits/ 64 <144000>;
> - required-opps = <&rpmhpd_opp_low>;
> - };
> -
> - opp2 {
> - opp-hz = /bits/ 64 <400000>;
> - required-opps = <&rpmhpd_opp_ret>;
> - };
> -
> - opp3 {
> - opp-hz = /bits/ 64 <20000000>;
> - required-opps = <&rpmpd_opp_svs>;
> - };
> -
> - opp4 {
> - opp-hz = /bits/ 64 <25000000>;
> - required-opps = <&rpmpd_opp_normal>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> new file mode 100644
> index 0000000000000..4aebf024e4427
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml
> @@ -0,0 +1,170 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm RPM/RPMh Power domains
> +
> +maintainers:
> + - Rajendra Nayak <rnayak@codeaurora.org>
> +
> +description:
> + For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
> + which then translates it into a corresponding voltage on a rail
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,msm8976-rpmpd
> + - qcom,msm8996-rpmpd
> + - qcom,msm8998-rpmpd
> + - qcom,qcs404-rpmpd
> + - qcom,sc7180-rpmhpd
> + - qcom,sdm845-rpmhpd
> + - qcom,sm8150-rpmhpd
> +
> + '#power-domain-cells':
> + const: 1
> +
> + operating-points-v2: true
> +
> + opp-table:
> + type: object
> +
> +required:
> + - compatible
> + - '#power-domain-cells'
> + - operating-points-v2
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +
> + // Example 1 (rpmh power domain controller and OPP table):
> +
> + #include <dt-bindings/power/qcom-rpmpd.h>
> +
> + rpmhpd: power-controller {
> + compatible = "qcom,sdm845-rpmhpd";
> + #power-domain-cells = <1>;
> + operating-points-v2 = <&rpmhpd_opp_table>;
> +
> + rpmhpd_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + rpmhpd_opp_ret: opp1 {
> + opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
> + };
> +
> + rpmhpd_opp_min_svs: opp2 {
> + opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
> + };
> +
> + rpmhpd_opp_low_svs: opp3 {
> + opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
> + };
> +
> + rpmhpd_opp_svs: opp4 {
> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
> + };
> +
> + rpmhpd_opp_svs_l1: opp5 {
> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
> + };
> +
> + rpmhpd_opp_nom: opp6 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
> + };
> +
> + rpmhpd_opp_nom_l1: opp7 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
> + };
> +
> + rpmhpd_opp_nom_l2: opp8 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
> + };
> +
> + rpmhpd_opp_turbo: opp9 {
> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
> + };
> +
> + rpmhpd_opp_turbo_l1: opp10 {
> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
> + };
> + };
> + };
> +
> + - |
> +
> + // Example 2 (rpm power domain controller and OPP table):
> +
> + rpmpd: power-controller {
> + compatible = "qcom,msm8996-rpmpd";
> + #power-domain-cells = <1>;
> + operating-points-v2 = <&rpmpd_opp_table>;
> +
> + rpmpd_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + rpmpd_opp_low: opp1 {
> + opp-level = <1>;
> + };
> +
> + rpmpd_opp_ret: opp2 {
> + opp-level = <2>;
> + };
> +
> + rpmpd_opp_svs: opp3 {
> + opp-level = <3>;
> + };
> +
> + rpmpd_opp_normal: opp4 {
> + opp-level = <4>;
> + };
> +
> + rpmpd_opp_high: opp5 {
> + opp-level = <5>;
> + };
> +
> + rpmpd_opp_turbo: opp6 {
> + opp-level = <6>;
> + };
> + };
> + };
> +
> + - |
> +
> + // Example 3 (Client/Consumer device using OPP table):
> +
> + leaky-device0@12350000 {
> + compatible = "foo,i-leak-current";
> + reg = <0x12350000 0x1000>;
> + power-domains = <&rpmhpd 0>;
> + operating-points-v2 = <&leaky_opp_table>;
> + };
> +
> + leaky_opp_table: opp-table {
> + compatible = "operating-points-v2";
> + opp1 {
> + opp-hz = /bits/ 64 <144000>;
> + required-opps = <&rpmhpd_opp_low>;
> + };
> +
> + opp2 {
> + opp-hz = /bits/ 64 <400000>;
> + required-opps = <&rpmhpd_opp_ret>;
> + };
> +
> + opp3 {
> + opp-hz = /bits/ 64 <20000000>;
> + required-opps = <&rpmpd_opp_svs>;
> + };
> +
> + opp4 {
> + opp-hz = /bits/ 64 <25000000>;
> + required-opps = <&rpmpd_opp_normal>;
> + };
> + };
> +...
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node
2019-12-16 11:55 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node Sibi Sankar
2019-12-16 19:36 ` Stephen Boyd
@ 2019-12-17 10:31 ` Rajendra Nayak
1 sibling, 0 replies; 8+ messages in thread
From: Rajendra Nayak @ 2019-12-17 10:31 UTC (permalink / raw)
To: Sibi Sankar, bjorn.andersson, robh+dt
Cc: agross, linux-kernel, devicetree, linux-arm-msm, mark.rutland,
swboyd, dianders
On 12/16/2019 5:25 PM, Sibi Sankar wrote:
> Add the DT node for the rpmhpd power controller on SC7180 SoCs.
>
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
Reviewed-by: Rajendra Nayak <rnayak@codeaurora.org>
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 55 ++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 01bbb58ae5160..fb17dc62d7ab1 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -9,6 +9,7 @@
> #include <dt-bindings/clock/qcom,rpmh.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/phy/phy-qcom-qusb2.h>
> +#include <dt-bindings/power/qcom-rpmpd.h>
> #include <dt-bindings/soc/qcom,rpmh-rsc.h>
>
> / {
> @@ -1284,6 +1285,60 @@
> clock-names = "xo";
> #clock-cells = <1>;
> };
> +
> + rpmhpd: power-controller {
> + compatible = "qcom,sc7180-rpmhpd";
> + #power-domain-cells = <1>;
> + operating-points-v2 = <&rpmhpd_opp_table>;
> +
> + rpmhpd_opp_table: opp-table {
> + compatible = "operating-points-v2";
> +
> + rpmhpd_opp_ret: opp1 {
> + opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
> + };
> +
> + rpmhpd_opp_min_svs: opp2 {
> + opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
> + };
> +
> + rpmhpd_opp_low_svs: opp3 {
> + opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
> + };
> +
> + rpmhpd_opp_svs: opp4 {
> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
> + };
> +
> + rpmhpd_opp_svs_l1: opp5 {
> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
> + };
> +
> + rpmhpd_opp_svs_l2: opp6 {
> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>;
> + };
> +
> + rpmhpd_opp_nom: opp7 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
> + };
> +
> + rpmhpd_opp_nom_l1: opp8 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
> + };
> +
> + rpmhpd_opp_nom_l2: opp9 {
> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
> + };
> +
> + rpmhpd_opp_turbo: opp10 {
> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
> + };
> +
> + rpmhpd_opp_turbo_l1: opp11 {
> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
> + };
> + };
> + };
> };
>
> cpufreq_hw: cpufreq@18323000 {
>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-17 10:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 11:55 [PATCH 0/2] Add RPMH power-domain node for SC7180 SoCs Sibi Sankar
2019-12-16 11:55 ` [PATCH 1/2] dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Sibi Sankar
2019-12-16 19:35 ` Stephen Boyd
2019-12-17 10:11 ` Sibi Sankar
2019-12-17 10:31 ` Rajendra Nayak
2019-12-16 11:55 ` [PATCH 2/2] arm64: dts: qcom: sc7180: Add rpmh power-domain node Sibi Sankar
2019-12-16 19:36 ` Stephen Boyd
2019-12-17 10:31 ` Rajendra Nayak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).