diff mbox series

[v1,1/3] dt-bindings: clock: qcom,dispcc: document power domain bindings

Message ID 20201005225914.315852-2-dmitry.baryshkov@linaro.org
State New
Headers show
Series [v1,1/3] dt-bindings: clock: qcom,dispcc: document power domain bindings | expand

Commit Message

Dmitry Baryshkov Oct. 5, 2020, 10:59 p.m. UTC
SM8250 requires special power domain for accessing MMDS_GDSC registers.
Add bindings for the MMCX power domain.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Reviewed-by: Rob Herring <robh@kernel.org>

---
 .../bindings/clock/qcom,sdm845-dispcc.yaml    | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

-- 
2.28.0

Comments

Stephen Boyd Oct. 14, 2020, 12:46 a.m. UTC | #1
Quoting Dmitry Baryshkov (2020-10-05 15:59:12)
> SM8250 requires special power domain for accessing MMDS_GDSC registers.


Heh, not sure it's special.

> Add bindings for the MMCX power domain.

> 

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> Reviewed-by: Rob Herring <robh@kernel.org>

> ---

>  .../bindings/clock/qcom,sdm845-dispcc.yaml    | 28 +++++++++++++++++++

>  1 file changed, 28 insertions(+)

> 

> diff --git a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

> index 4a3be733d042..ff0db55470ac 100644

> --- a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

> +++ b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

> @@ -97,5 +108,22 @@ examples:

>        #clock-cells = <1>;

>        #reset-cells = <1>;

>        #power-domain-cells = <1>;

> +      /* this is a part of sm8250 setup the power domain example */

> +      power-domains = <&rpmhpd SDM845_CX>;

> +      power-domain-names = "mmcx";

> +      required-opps = <&rpmhpd_opp_low_svs>;

> +    };

> +    rpmhpd: power-controller {


Do we need this node in the example? I think it isn't required but I
guess it's OK.

> +      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_low_svs: opp3 {
Stephen Boyd Oct. 14, 2020, 2:17 a.m. UTC | #2
Quoting Dmitry Baryshkov (2020-10-05 15:59:12)
> @@ -97,5 +108,22 @@ examples:

>        #clock-cells = <1>;

>        #reset-cells = <1>;

>        #power-domain-cells = <1>;

> +      /* this is a part of sm8250 setup the power domain example */


What does this comment mean?

> +      power-domains = <&rpmhpd SDM845_CX>;

> +      power-domain-names = "mmcx";

> +      required-opps = <&rpmhpd_opp_low_svs>;

> +    };
Dmitry Baryshkov Oct. 14, 2020, 9:36 a.m. UTC | #3
On 14/10/2020 03:46, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2020-10-05 15:59:12)

>> SM8250 requires special power domain for accessing MMDS_GDSC registers.

> 

> Heh, not sure it's special.

> 

>> Add bindings for the MMCX power domain.

>>

>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

>> Reviewed-by: Rob Herring <robh@kernel.org>

>> ---

>>   .../bindings/clock/qcom,sdm845-dispcc.yaml    | 28 +++++++++++++++++++

>>   1 file changed, 28 insertions(+)

>>

>> diff --git a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

>> index 4a3be733d042..ff0db55470ac 100644

>> --- a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

>> +++ b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml

>> @@ -97,5 +108,22 @@ examples:

>>         #clock-cells = <1>;

>>         #reset-cells = <1>;

>>         #power-domain-cells = <1>;

>> +      /* this is a part of sm8250 setup the power domain example */

>> +      power-domains = <&rpmhpd SDM845_CX>;

>> +      power-domain-names = "mmcx";

>> +      required-opps = <&rpmhpd_opp_low_svs>;

>> +    };

>> +    rpmhpd: power-controller {

> 

> Do we need this node in the example? I think it isn't required but I

> guess it's OK.


It is to be able to resolve "power-domains" and "required-opps" 
properties values.

>> +      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_low_svs: opp3 {



-- 
With best wishes
Dmitry
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
index 4a3be733d042..ff0db55470ac 100644
--- a/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
@@ -58,6 +58,16 @@  properties:
   reg:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
+  power-domain-names:
+    items:
+      - const: mmcx
+
+  required-opps:
+    maxItems: 1
+
 required:
   - compatible
   - reg
@@ -73,6 +83,7 @@  examples:
   - |
     #include <dt-bindings/clock/qcom,gcc-sdm845.h>
     #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/power/qcom-rpmpd.h>
     clock-controller@af00000 {
       compatible = "qcom,sdm845-dispcc";
       reg = <0x0af00000 0x10000>;
@@ -97,5 +108,22 @@  examples:
       #clock-cells = <1>;
       #reset-cells = <1>;
       #power-domain-cells = <1>;
+      /* this is a part of sm8250 setup the power domain example */
+      power-domains = <&rpmhpd SDM845_CX>;
+      power-domain-names = "mmcx";
+      required-opps = <&rpmhpd_opp_low_svs>;
+    };
+    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_low_svs: opp3 {
+          opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+        };
+      };
     };
 ...