2023-04-08 13:49:11

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: clock: qcom,gcc-sm8250: add missing bi_tcxo_ao clock

Without actual explanation commit 76bd127e6ca5 ("arm64: dts: qcom:
sm8250: add bi_tcxo_ao to gcc clocks") added bi_tcxo_ao clock input to
the GCC clock controller, so update the bindings hoping this is really
needed. This fixes warnings like:

sm8250-xiaomi-elish-csot.dtb: clock-controller@100000: clock-names: ['bi_tcxo', 'bi_tcxo_ao', 'sleep_clk'] is too long

Fixes: 76bd127e6ca5 ("arm64: dts: qcom: sm8250: add bi_tcxo_ao to gcc clocks")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
index b752542ee20c..ead6665b9a45 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
@@ -23,11 +23,13 @@ properties:
clocks:
items:
- description: Board XO source
+ - description: Board active XO source
- description: Sleep clock source

clock-names:
items:
- const: bi_tcxo
+ - const: bi_tcxo_ao
- const: sleep_clk

required:
@@ -47,8 +49,9 @@ examples:
compatible = "qcom,gcc-sm8250";
reg = <0x00100000 0x1f0000>;
clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
- clock-names = "bi_tcxo", "sleep_clk";
+ clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1


2023-04-08 13:49:11

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain

The GCC clock controller needs CX power domain, at least according to
DTS:

sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,gcc-sc7180.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
index 06dce0c6b7d0..8bf9b6f49550 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
@@ -32,6 +32,10 @@ properties:
- const: bi_tcxo_ao
- const: sleep_clk

+ power-domains:
+ items:
+ - description: CX domain
+
required:
- compatible
- clocks
@@ -45,6 +49,8 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
clock-controller@100000 {
compatible = "qcom,gcc-sc7180";
reg = <0x00100000 0x1f0000>;
@@ -52,6 +58,7 @@ examples:
<&rpmhcc RPMH_CXO_CLK_A>,
<&sleep_clk>;
clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
+ power-domains = <&rpmhpd SC7180_CX>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1

2023-04-08 13:49:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 3/3] dt-bindings: clock: qcom,gcc-sc7280: document CX power domain

The GCC clock controller needs CX power domain, at least according to
DTS:

sc7280-herobrine-crd-pro.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/clock/qcom,gcc-sc7280.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
index 947b47168cec..ff0b18bbb0fc 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
@@ -43,6 +43,10 @@ properties:
- const: ufs_phy_tx_symbol_0_clk
- const: usb3_phy_wrapper_gcc_usb30_pipe_clk

+ power-domains:
+ items:
+ - description: CX domain
+
required:
- compatible
- clocks
@@ -56,6 +60,8 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,rpmh.h>
+ #include <dt-bindings/power/qcom-rpmpd.h>
+
clock-controller@100000 {
compatible = "qcom,gcc-sc7280";
reg = <0x00100000 0x1f0000>;
@@ -71,6 +77,7 @@ examples:
"pcie_1_pipe_clk", "ufs_phy_rx_symbol_0_clk",
"ufs_phy_rx_symbol_1_clk", "ufs_phy_tx_symbol_0_clk",
"usb3_phy_wrapper_gcc_usb30_pipe_clk";
+ power-domains = <&rpmhpd SC7280_CX>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
--
2.34.1

2023-04-08 14:03:13

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: clock: qcom,gcc-sm8250: add missing bi_tcxo_ao clock



On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
> Without actual explanation commit 76bd127e6ca5 ("arm64: dts: qcom:
> sm8250: add bi_tcxo_ao to gcc clocks") added bi_tcxo_ao clock input to
> the GCC clock controller, so update the bindings hoping this is really
> needed. This fixes warnings like:
The initial commit 3e5770921a88
("clk: qcom: gcc: Add global clock controller driver for SM8250")
already consumed it on the .c side, so the bindings were wrong..

>
> sm8250-xiaomi-elish-csot.dtb: clock-controller@100000: clock-names: ['bi_tcxo', 'bi_tcxo_ao', 'sleep_clk'] is too long
>
> Fixes: 76bd127e6ca5 ("arm64: dts: qcom: sm8250: add bi_tcxo_ao to gcc clocks")
s/this/98394efb48f5 ("dt-bindings: clock: Add SM8250 GCC clock bindings")

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
> index b752542ee20c..ead6665b9a45 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml
> @@ -23,11 +23,13 @@ properties:
> clocks:
> items:
> - description: Board XO source
> + - description: Board active XO source
> - description: Sleep clock source
>
> clock-names:
> items:
> - const: bi_tcxo
> + - const: bi_tcxo_ao
> - const: sleep_clk
>
> required:
> @@ -47,8 +49,9 @@ examples:
> compatible = "qcom,gcc-sm8250";
> reg = <0x00100000 0x1f0000>;
> clocks = <&rpmhcc RPMH_CXO_CLK>,
> + <&rpmhcc RPMH_CXO_CLK_A>,
> <&sleep_clk>;
> - clock-names = "bi_tcxo", "sleep_clk";
> + clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;

2023-04-08 14:05:19

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain



On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
> The GCC clock controller needs CX power domain, at least according to
> DTS:
>
> sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
+CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
sc7180: Add required-opps for USB"))

Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
is only there when AP is active? Are all GDSCs powered by CX?
If not, wouldn't this also need power-domain-names to
facilitate e.g. potential MX-powered ones?

Konrad
> .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
> index 06dce0c6b7d0..8bf9b6f49550 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
> @@ -32,6 +32,10 @@ properties:
> - const: bi_tcxo_ao
> - const: sleep_clk
>
> + power-domains:
> + items:
> + - description: CX domain
> +
> required:
> - compatible
> - clocks
> @@ -45,6 +49,8 @@ unevaluatedProperties: false
> examples:
> - |
> #include <dt-bindings/clock/qcom,rpmh.h>
> + #include <dt-bindings/power/qcom-rpmpd.h>
> +
> clock-controller@100000 {
> compatible = "qcom,gcc-sc7180";
> reg = <0x00100000 0x1f0000>;
> @@ -52,6 +58,7 @@ examples:
> <&rpmhcc RPMH_CXO_CLK_A>,
> <&sleep_clk>;
> clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
> + power-domains = <&rpmhpd SC7180_CX>;
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;

2023-04-08 14:07:09

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/3] dt-bindings: clock: qcom,gcc-sc7280: document CX power domain



On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
> The GCC clock controller needs CX power domain, at least according to
> DTS:
>
> sc7280-herobrine-crd-pro.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
+CC Rajendra

Same question as with 7180

Konrad
> .../devicetree/bindings/clock/qcom,gcc-sc7280.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
> index 947b47168cec..ff0b18bbb0fc 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7280.yaml
> @@ -43,6 +43,10 @@ properties:
> - const: ufs_phy_tx_symbol_0_clk
> - const: usb3_phy_wrapper_gcc_usb30_pipe_clk
>
> + power-domains:
> + items:
> + - description: CX domain
> +
> required:
> - compatible
> - clocks
> @@ -56,6 +60,8 @@ unevaluatedProperties: false
> examples:
> - |
> #include <dt-bindings/clock/qcom,rpmh.h>
> + #include <dt-bindings/power/qcom-rpmpd.h>
> +
> clock-controller@100000 {
> compatible = "qcom,gcc-sc7280";
> reg = <0x00100000 0x1f0000>;
> @@ -71,6 +77,7 @@ examples:
> "pcie_1_pipe_clk", "ufs_phy_rx_symbol_0_clk",
> "ufs_phy_rx_symbol_1_clk", "ufs_phy_tx_symbol_0_clk",
> "usb3_phy_wrapper_gcc_usb30_pipe_clk";
> + power-domains = <&rpmhpd SC7280_CX>;
> #clock-cells = <1>;
> #reset-cells = <1>;
> #power-domain-cells = <1>;

2023-04-10 19:35:14

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: clock: qcom,gcc-sm8250: add missing bi_tcxo_ao clock

Quoting Krzysztof Kozlowski (2023-04-08 06:48:18)
> Without actual explanation commit 76bd127e6ca5 ("arm64: dts: qcom:
> sm8250: add bi_tcxo_ao to gcc clocks") added bi_tcxo_ao clock input to
> the GCC clock controller, so update the bindings hoping this is really
> needed. This fixes warnings like:
>
> sm8250-xiaomi-elish-csot.dtb: clock-controller@100000: clock-names: ['bi_tcxo', 'bi_tcxo_ao', 'sleep_clk'] is too long
>
> Fixes: 76bd127e6ca5 ("arm64: dts: qcom: sm8250: add bi_tcxo_ao to gcc clocks")
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2023-04-11 05:01:04

by Rajendra Nayak

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain



On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>
>
> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>> The GCC clock controller needs CX power domain, at least according to
>> DTS:
>>
>> sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>
>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>> ---
> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
> sc7180: Add required-opps for USB"))
>
> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
> is only there when AP is active?

hmm, I am not quite sure why we would want the performance votes
from peripherals dropped when CPUs go down in idle?

> Are all GDSCs powered by CX?
> If not, wouldn't this also need power-domain-names to
> facilitate e.g. potential MX-powered ones?

For sc7180 GCC, yes.

>
> Konrad
>> .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>> index 06dce0c6b7d0..8bf9b6f49550 100644
>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>> @@ -32,6 +32,10 @@ properties:
>> - const: bi_tcxo_ao
>> - const: sleep_clk
>>
>> + power-domains:
>> + items:
>> + - description: CX domain
>> +
>> required:
>> - compatible
>> - clocks
>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>> examples:
>> - |
>> #include <dt-bindings/clock/qcom,rpmh.h>
>> + #include <dt-bindings/power/qcom-rpmpd.h>
>> +
>> clock-controller@100000 {
>> compatible = "qcom,gcc-sc7180";
>> reg = <0x00100000 0x1f0000>;
>> @@ -52,6 +58,7 @@ examples:
>> <&rpmhcc RPMH_CXO_CLK_A>,
>> <&sleep_clk>;
>> clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>> + power-domains = <&rpmhpd SC7180_CX>;
>> #clock-cells = <1>;
>> #reset-cells = <1>;
>> #power-domain-cells = <1>;

2023-04-11 11:35:12

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain



On 11.04.2023 06:56, Rajendra Nayak wrote:
>
>
> On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>>
>>
>> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>>> The GCC clock controller needs CX power domain, at least according to
>>> DTS:
>>>
>>>    sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>>
>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>> ---
>> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
>> sc7180: Add required-opps for USB"))
>>
>> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
>> is only there when AP is active?
So IIUC, CX is never supposed to be shut down?

Konrad
>
> hmm, I am not quite sure why we would want the performance votes
> from peripherals dropped when CPUs go down in idle?
>
>> Are all GDSCs powered by CX?
>> If not, wouldn't this also need power-domain-names to
>> facilitate e.g. potential MX-powered ones?
>
> For sc7180 GCC, yes.
>
>>
>> Konrad
>>>   .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml         | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>> index 06dce0c6b7d0..8bf9b6f49550 100644
>>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>> @@ -32,6 +32,10 @@ properties:
>>>         - const: bi_tcxo_ao
>>>         - const: sleep_clk
>>>   +  power-domains:
>>> +    items:
>>> +      - description: CX domain
>>> +
>>>   required:
>>>     - compatible
>>>     - clocks
>>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>>>   examples:
>>>     - |
>>>       #include <dt-bindings/clock/qcom,rpmh.h>
>>> +    #include <dt-bindings/power/qcom-rpmpd.h>
>>> +
>>>       clock-controller@100000 {
>>>         compatible = "qcom,gcc-sc7180";
>>>         reg = <0x00100000 0x1f0000>;
>>> @@ -52,6 +58,7 @@ examples:
>>>                  <&rpmhcc RPMH_CXO_CLK_A>,
>>>                  <&sleep_clk>;
>>>         clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>>> +      power-domains = <&rpmhpd SC7180_CX>;
>>>         #clock-cells = <1>;
>>>         #reset-cells = <1>;
>>>         #power-domain-cells = <1>;

2023-04-11 13:38:47

by Rajendra Nayak

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain


On 4/11/2023 4:57 PM, Konrad Dybcio wrote:
>
>
> On 11.04.2023 06:56, Rajendra Nayak wrote:
>>
>>
>> On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>>>
>>>
>>> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>>>> The GCC clock controller needs CX power domain, at least according to
>>>> DTS:
>>>>
>>>>    sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>>> ---
>>> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
>>> sc7180: Add required-opps for USB"))
>>>
>>> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
>>> is only there when AP is active?
> So IIUC, CX is never supposed to be shut down?

Atleast sc7180 and sc7280 do not support full CX shutdown (or power
collapse as its called), it only transitions to a Retention state
and even that in the system-wide suspend path only

>
> Konrad
>>
>> hmm, I am not quite sure why we would want the performance votes
>> from peripherals dropped when CPUs go down in idle?
>>
>>> Are all GDSCs powered by CX?
>>> If not, wouldn't this also need power-domain-names to
>>> facilitate e.g. potential MX-powered ones?
>>
>> For sc7180 GCC, yes.
>>
>>>
>>> Konrad
>>>>   .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml         | 7 +++++++
>>>>   1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>> index 06dce0c6b7d0..8bf9b6f49550 100644
>>>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>> @@ -32,6 +32,10 @@ properties:
>>>>         - const: bi_tcxo_ao
>>>>         - const: sleep_clk
>>>>   +  power-domains:
>>>> +    items:
>>>> +      - description: CX domain
>>>> +
>>>>   required:
>>>>     - compatible
>>>>     - clocks
>>>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>>>>   examples:
>>>>     - |
>>>>       #include <dt-bindings/clock/qcom,rpmh.h>
>>>> +    #include <dt-bindings/power/qcom-rpmpd.h>
>>>> +
>>>>       clock-controller@100000 {
>>>>         compatible = "qcom,gcc-sc7180";
>>>>         reg = <0x00100000 0x1f0000>;
>>>> @@ -52,6 +58,7 @@ examples:
>>>>                  <&rpmhcc RPMH_CXO_CLK_A>,
>>>>                  <&sleep_clk>;
>>>>         clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>>>> +      power-domains = <&rpmhpd SC7180_CX>;
>>>>         #clock-cells = <1>;
>>>>         #reset-cells = <1>;
>>>>         #power-domain-cells = <1>;

2023-04-11 13:46:45

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain



On 11.04.2023 15:31, Rajendra Nayak wrote:
>
> On 4/11/2023 4:57 PM, Konrad Dybcio wrote:
>>
>>
>> On 11.04.2023 06:56, Rajendra Nayak wrote:
>>>
>>>
>>> On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>>>>> The GCC clock controller needs CX power domain, at least according to
>>>>> DTS:
>>>>>
>>>>>     sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>>>>
>>>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>>>> ---
>>>> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
>>>> sc7180: Add required-opps for USB"))
>>>>
>>>> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
>>>> is only there when AP is active?
>> So IIUC, CX is never supposed to be shut down?
>
> Atleast sc7180 and sc7280 do not support full CX shutdown (or power
> collapse as its called), it only transitions to a Retention state
> and even that in the system-wide suspend path only
And won't outstanding votes on that resource prevent the system
from entering a system-wide low power state?

Konrad
>
>>
>> Konrad
>>>
>>> hmm, I am not quite sure why we would want the performance votes
>>> from peripherals dropped when CPUs go down in idle?
>>>
>>>> Are all GDSCs powered by CX?
>>>> If not, wouldn't this also need power-domain-names to
>>>> facilitate e.g. potential MX-powered ones?
>>>
>>> For sc7180 GCC, yes.
>>>
>>>>
>>>> Konrad
>>>>>    .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml         | 7 +++++++
>>>>>    1 file changed, 7 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>> index 06dce0c6b7d0..8bf9b6f49550 100644
>>>>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>> @@ -32,6 +32,10 @@ properties:
>>>>>          - const: bi_tcxo_ao
>>>>>          - const: sleep_clk
>>>>>    +  power-domains:
>>>>> +    items:
>>>>> +      - description: CX domain
>>>>> +
>>>>>    required:
>>>>>      - compatible
>>>>>      - clocks
>>>>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>>>>>    examples:
>>>>>      - |
>>>>>        #include <dt-bindings/clock/qcom,rpmh.h>
>>>>> +    #include <dt-bindings/power/qcom-rpmpd.h>
>>>>> +
>>>>>        clock-controller@100000 {
>>>>>          compatible = "qcom,gcc-sc7180";
>>>>>          reg = <0x00100000 0x1f0000>;
>>>>> @@ -52,6 +58,7 @@ examples:
>>>>>                   <&rpmhcc RPMH_CXO_CLK_A>,
>>>>>                   <&sleep_clk>;
>>>>>          clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>>>>> +      power-domains = <&rpmhpd SC7180_CX>;
>>>>>          #clock-cells = <1>;
>>>>>          #reset-cells = <1>;
>>>>>          #power-domain-cells = <1>;

2023-04-12 05:52:02

by Rajendra Nayak

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain


On 4/11/2023 7:15 PM, Konrad Dybcio wrote:
>
>
> On 11.04.2023 15:31, Rajendra Nayak wrote:
>>
>> On 4/11/2023 4:57 PM, Konrad Dybcio wrote:
>>>
>>>
>>> On 11.04.2023 06:56, Rajendra Nayak wrote:
>>>>
>>>>
>>>> On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>>>>>
>>>>>
>>>>> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>>>>>> The GCC clock controller needs CX power domain, at least according to
>>>>>> DTS:
>>>>>>
>>>>>>     sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>>>>>
>>>>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>>>>> ---
>>>>> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
>>>>> sc7180: Add required-opps for USB"))
>>>>>
>>>>> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
>>>>> is only there when AP is active?
>>> So IIUC, CX is never supposed to be shut down?
>>
>> Atleast sc7180 and sc7280 do not support full CX shutdown (or power
>> collapse as its called), it only transitions to a Retention state
>> and even that in the system-wide suspend path only
> And won't outstanding votes on that resource prevent the system
> from entering a system-wide low power state?

I think most of what you are asking was discussed at
https://lore.kernel.org/all/[email protected]/

Are we seeing something broken on sc7180/sc7280 platforms?
If there is an outstanding vote on CX it would prevent CX from
going down, but ideally we should not have an outstanding vote
from USB (atleast) since we now support RET for the USB GDSC.
If there is some other GDSC (within GCC) thats left turned ON,
yes, that would still prevent CX from going down.

>
> Konrad
>>
>>>
>>> Konrad
>>>>
>>>> hmm, I am not quite sure why we would want the performance votes
>>>> from peripherals dropped when CPUs go down in idle?
>>>>
>>>>> Are all GDSCs powered by CX?
>>>>> If not, wouldn't this also need power-domain-names to
>>>>> facilitate e.g. potential MX-powered ones?
>>>>
>>>> For sc7180 GCC, yes.
>>>>
>>>>>
>>>>> Konrad
>>>>>>    .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml         | 7 +++++++
>>>>>>    1 file changed, 7 insertions(+)
>>>>>>
>>>>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>> index 06dce0c6b7d0..8bf9b6f49550 100644
>>>>>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>> @@ -32,6 +32,10 @@ properties:
>>>>>>          - const: bi_tcxo_ao
>>>>>>          - const: sleep_clk
>>>>>>    +  power-domains:
>>>>>> +    items:
>>>>>> +      - description: CX domain
>>>>>> +
>>>>>>    required:
>>>>>>      - compatible
>>>>>>      - clocks
>>>>>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>>>>>>    examples:
>>>>>>      - |
>>>>>>        #include <dt-bindings/clock/qcom,rpmh.h>
>>>>>> +    #include <dt-bindings/power/qcom-rpmpd.h>
>>>>>> +
>>>>>>        clock-controller@100000 {
>>>>>>          compatible = "qcom,gcc-sc7180";
>>>>>>          reg = <0x00100000 0x1f0000>;
>>>>>> @@ -52,6 +58,7 @@ examples:
>>>>>>                   <&rpmhcc RPMH_CXO_CLK_A>,
>>>>>>                   <&sleep_clk>;
>>>>>>          clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>>>>>> +      power-domains = <&rpmhpd SC7180_CX>;
>>>>>>          #clock-cells = <1>;
>>>>>>          #reset-cells = <1>;
>>>>>>          #power-domain-cells = <1>;

2023-04-12 10:43:11

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain



On 12.04.2023 07:42, Rajendra Nayak wrote:
>
> On 4/11/2023 7:15 PM, Konrad Dybcio wrote:
>>
>>
>> On 11.04.2023 15:31, Rajendra Nayak wrote:
>>>
>>> On 4/11/2023 4:57 PM, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 11.04.2023 06:56, Rajendra Nayak wrote:
>>>>>
>>>>>
>>>>> On 4/8/2023 7:33 PM, Konrad Dybcio wrote:
>>>>>>
>>>>>>
>>>>>> On 8.04.2023 15:48, Krzysztof Kozlowski wrote:
>>>>>>> The GCC clock controller needs CX power domain, at least according to
>>>>>>> DTS:
>>>>>>>
>>>>>>>      sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>>>>>>>
>>>>>>> Signed-off-by: Krzysztof Kozlowski <[email protected]>
>>>>>>> ---
>>>>>> +CC Rajendra (author of 5d6fc6321db1 ("arm64: dts: qcom:
>>>>>> sc7180: Add required-opps for USB"))
>>>>>>
>>>>>> Rajendra, shouldn't SC7180 GCC have PM ops to make sure a vote
>>>>>> is only there when AP is active?
>>>> So IIUC, CX is never supposed to be shut down?
>>>
>>> Atleast sc7180 and sc7280 do not support full CX shutdown (or power
>>> collapse as its called), it only transitions to a Retention state
>>> and even that in the system-wide suspend path only
>> And won't outstanding votes on that resource prevent the system
>> from entering a system-wide low power state?
>
> I think most of what you are asking was discussed at https://lore.kernel.org/all/[email protected]/
>
OK so 7[12]80 never actually power off CX fully. Understood.

> Are we seeing something broken on sc7180/sc7280 platforms?
I don't know, I don't have any devices. I'm just asking questions
to make sure things weren't unintentionally broken.

> If there is an outstanding vote on CX it would prevent CX from
> going down, but ideally we should not have an outstanding vote
> from USB (atleast) since we now support RET for the USB GDSC.
> If there is some other GDSC (within GCC) thats left turned ON,
> yes, that would still prevent CX from going down.
Makes sense!

Konrad
>
>>
>> Konrad
>>>
>>>>
>>>> Konrad
>>>>>
>>>>> hmm, I am not quite sure why we would want the performance votes
>>>>> from peripherals dropped when CPUs go down in idle?
>>>>>
>>>>>> Are all GDSCs powered by CX?
>>>>>> If not, wouldn't this also need power-domain-names to
>>>>>> facilitate e.g. potential MX-powered ones?
>>>>>
>>>>> For sc7180 GCC, yes.
>>>>>
>>>>>>
>>>>>> Konrad
>>>>>>>     .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml         | 7 +++++++
>>>>>>>     1 file changed, 7 insertions(+)
>>>>>>>
>>>>>>> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>>> index 06dce0c6b7d0..8bf9b6f49550 100644
>>>>>>> --- a/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>>> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
>>>>>>> @@ -32,6 +32,10 @@ properties:
>>>>>>>           - const: bi_tcxo_ao
>>>>>>>           - const: sleep_clk
>>>>>>>     +  power-domains:
>>>>>>> +    items:
>>>>>>> +      - description: CX domain
>>>>>>> +
>>>>>>>     required:
>>>>>>>       - compatible
>>>>>>>       - clocks
>>>>>>> @@ -45,6 +49,8 @@ unevaluatedProperties: false
>>>>>>>     examples:
>>>>>>>       - |
>>>>>>>         #include <dt-bindings/clock/qcom,rpmh.h>
>>>>>>> +    #include <dt-bindings/power/qcom-rpmpd.h>
>>>>>>> +
>>>>>>>         clock-controller@100000 {
>>>>>>>           compatible = "qcom,gcc-sc7180";
>>>>>>>           reg = <0x00100000 0x1f0000>;
>>>>>>> @@ -52,6 +58,7 @@ examples:
>>>>>>>                    <&rpmhcc RPMH_CXO_CLK_A>,
>>>>>>>                    <&sleep_clk>;
>>>>>>>           clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk";
>>>>>>> +      power-domains = <&rpmhpd SC7180_CX>;
>>>>>>>           #clock-cells = <1>;
>>>>>>>           #reset-cells = <1>;
>>>>>>>           #power-domain-cells = <1>;

2023-04-12 15:18:55

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: clock: qcom,gcc-sm8250: add missing bi_tcxo_ao clock


On Sat, 08 Apr 2023 15:48:18 +0200, Krzysztof Kozlowski wrote:
> Without actual explanation commit 76bd127e6ca5 ("arm64: dts: qcom:
> sm8250: add bi_tcxo_ao to gcc clocks") added bi_tcxo_ao clock input to
> the GCC clock controller, so update the bindings hoping this is really
> needed. This fixes warnings like:
>
> sm8250-xiaomi-elish-csot.dtb: clock-controller@100000: clock-names: ['bi_tcxo', 'bi_tcxo_ao', 'sleep_clk'] is too long
>
> Fixes: 76bd127e6ca5 ("arm64: dts: qcom: sm8250: add bi_tcxo_ao to gcc clocks")
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> Documentation/devicetree/bindings/clock/qcom,gcc-sm8250.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>

2023-04-12 15:19:06

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: clock: qcom,gcc-sc7180: document CX power domain


On Sat, 08 Apr 2023 15:48:19 +0200, Krzysztof Kozlowski wrote:
> The GCC clock controller needs CX power domain, at least according to
> DTS:
>
> sc7180-trogdor-pompom-r3.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../devicetree/bindings/clock/qcom,gcc-sc7180.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>

Acked-by: Rob Herring <[email protected]>

2023-04-12 15:20:10

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 3/3] dt-bindings: clock: qcom,gcc-sc7280: document CX power domain


On Sat, 08 Apr 2023 15:48:20 +0200, Krzysztof Kozlowski wrote:
> The GCC clock controller needs CX power domain, at least according to
> DTS:
>
> sc7280-herobrine-crd-pro.dtb: clock-controller@100000: Unevaluated properties are not allowed ('power-domains' was unexpected)
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../devicetree/bindings/clock/qcom,gcc-sc7280.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>

Acked-by: Rob Herring <[email protected]>