[PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller

Luca Weiss posted 3 patches 1 month ago
There is a newer version of this series
[PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller
Posted by Luca Weiss 1 month ago
Qualcomm GX(graphics) is a clock controller which has PLLs, clocks and
Power domains (GDSC), but the requirement from the SW driver is to use
the GDSC power domain from the clock controller to recover the GPU
firmware in case of any failure/hangs. The rest of the resources of the
clock controller are being used by the firmware of GPU. This module
exposes the GDSC power domains which helps the recovery of Graphics
subsystem.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 .../bindings/clock/qcom,milos-gxclkctl.yaml        | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/qcom,milos-gxclkctl.yaml b/Documentation/devicetree/bindings/clock/qcom,milos-gxclkctl.yaml
new file mode 100644
index 000000000000..47dc6bb66120
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,milos-gxclkctl.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,milos-gxclkctl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Graphics power domain Controller on Milos
+
+maintainers:
+  - Luca Weiss <luca.weiss@fairphone.com>
+
+description: |
+  Qualcomm GX(graphics) is a clock controller which has PLLs, clocks and
+  Power domains (GDSC). This module provides the power domains control
+  of gxclkctl on Qualcomm SoCs which helps the recovery of Graphics subsystem.
+
+  See also:
+    include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,milos-gxclkctl
+
+  power-domains:
+    description:
+      Power domains required for the clock controller to operate
+    items:
+      - description: GFX power domain
+      - description: GPUCC(CX) power domain
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - power-domains
+  - '#power-domain-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/power/qcom,rpmhpd.h>
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        clock-controller@3d64000 {
+            compatible = "qcom,milos-gxclkctl";
+            reg = <0x0 0x03d64000 0x0 0x6000>;
+            power-domains = <&rpmhpd RPMHPD_GFX>,
+                            <&gpucc 0>;
+            #power-domain-cells = <1>;
+        };
+    };
+...

-- 
2.53.0
Re: [PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller
Posted by Krzysztof Kozlowski 1 month ago
On Fri, Mar 06, 2026 at 02:48:37PM +0100, Luca Weiss wrote:
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/qcom,milos-gxclkctl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm Graphics power domain Controller on Milos

Power Domain


> +
> +maintainers:
> +  - Luca Weiss <luca.weiss@fairphone.com>
> +
> +description: |
> +  Qualcomm GX(graphics) is a clock controller which has PLLs, clocks and
> +  Power domains (GDSC). This module provides the power domains control
> +  of gxclkctl on Qualcomm SoCs which helps the recovery of Graphics subsystem.
> +
> +  See also:
> +    include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h

Milos

> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,milos-gxclkctl
> +
> +  power-domains:
> +    description:
> +      Power domains required for the clock controller to operate
> +    items:
> +      - description: GFX power domain
> +      - description: GPUCC(CX) power domain
> +
> +  '#power-domain-cells':
> +    const: 1
> +
> +  reg:
> +    maxItems: 1

reg should be the second property, like you have it in "required" part.
I guess you copied it from kaanapali-gxclkctl.yaml, so lesson - qcom
bindings have acceptable quality, but not good enough to take as correct
starting point.

Best regards,
Krzysztof
Re: [PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller
Posted by Krzysztof Kozlowski 1 week ago
On 07/03/2026 16:30, Krzysztof Kozlowski wrote:
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - qcom,milos-gxclkctl
>> +
>> +  power-domains:
>> +    description:
>> +      Power domains required for the clock controller to operate
>> +    items:
>> +      - description: GFX power domain
>> +      - description: GPUCC(CX) power domain
>> +
>> +  '#power-domain-cells':
>> +    const: 1
>> +
>> +  reg:
>> +    maxItems: 1
> 
> reg should be the second property, like you have it in "required" part.
> I guess you copied it from kaanapali-gxclkctl.yaml, so lesson - qcom
> bindings have acceptable quality, but not good enough to take as correct
> starting point.
> 

OTOH, why this entire binding cannot be squashed in Kaanapali one?
What's the difference?

Best regards,
Krzysztof
Re: [PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller
Posted by Luca Weiss 1 week ago
On Thu Apr 2, 2026 at 10:23 AM CEST, Krzysztof Kozlowski wrote:
> On 07/03/2026 16:30, Krzysztof Kozlowski wrote:
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - qcom,milos-gxclkctl
>>> +
>>> +  power-domains:
>>> +    description:
>>> +      Power domains required for the clock controller to operate
>>> +    items:
>>> +      - description: GFX power domain
>>> +      - description: GPUCC(CX) power domain
>>> +
>>> +  '#power-domain-cells':
>>> +    const: 1
>>> +
>>> +  reg:
>>> +    maxItems: 1
>> 
>> reg should be the second property, like you have it in "required" part.
>> I guess you copied it from kaanapali-gxclkctl.yaml, so lesson - qcom
>> bindings have acceptable quality, but not good enough to take as correct
>> starting point.
>> 
>
> OTOH, why this entire binding cannot be squashed in Kaanapali one?
> What's the difference?

There's no GMXC power domain on Milos. Apart from that they're
compatible from a bindings perspective.

However it can re-use include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h
because the GX_CLKCTL_GX_GDSC definition would be identical.

And also the driver (which can be used as-is) would be identical. In
that driver qcom,kaanapali-gxclkctl.h is used so it makes sense to keep
with the kaanapali header, or not? Making a qcom,milos-gxclkctl.h with
the same definition is not wanted?

Regards
Luca
Re: [PATCH 1/3] dt-bindings: clock: qcom: document the Milos GX clock controller
Posted by Krzysztof Kozlowski 1 week ago
On 02/04/2026 14:24, Luca Weiss wrote:
>>>> +  '#power-domain-cells':
>>>> +    const: 1
>>>> +
>>>> +  reg:
>>>> +    maxItems: 1
>>>
>>> reg should be the second property, like you have it in "required" part.
>>> I guess you copied it from kaanapali-gxclkctl.yaml, so lesson - qcom
>>> bindings have acceptable quality, but not good enough to take as correct
>>> starting point.
>>>
>>
>> OTOH, why this entire binding cannot be squashed in Kaanapali one?
>> What's the difference?
> 
> There's no GMXC power domain on Milos. Apart from that they're
> compatible from a bindings perspective.

Ah, right, I missed only two items here.

> 
> However it can re-use include/dt-bindings/clock/qcom,kaanapali-gxclkctl.h
> because the GX_CLKCTL_GX_GDSC definition would be identical.

Indeed and you use the same driver, so the header can be re-used. This
should be explained in the commit msg.

> 
> And also the driver (which can be used as-is) would be identical. In
> that driver qcom,kaanapali-gxclkctl.h is used so it makes sense to keep
> with the kaanapali header, or not? Making a qcom,milos-gxclkctl.h with
> the same definition is not wanted?
> 
Best regards,
Krzysztof