Re: [PATCH 12/13] dt-bindings: power: mediatek: Add new MT8196 power domain

From: Krzysztof Kozlowski
Date: Fri Mar 07 2025 - 02:41:45 EST


On Fri, Mar 07, 2025 at 11:44:36AM +0800, Guangjie Song wrote:
> Add the binding documentation for power domain on MediaTek MT8196.
>
> Signed-off-by: Guangjie Song <guangjie.song@xxxxxxxxxxxx>
> ---
> .../mediatek,mt8196-power-controller.yaml | 74 +++++++++++++++++++
> include/dt-bindings/power/mt8196-power.h | 57 ++++++++++++++


You keep sending multiple patchsets and none of them are tested.


> 2 files changed, 131 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/power/mediatek,mt8196-power-controller.yaml
> create mode 100644 include/dt-bindings/power/mt8196-power.h

Comments from other patches apply.

>
> diff --git a/Documentation/devicetree/bindings/power/mediatek,mt8196-power-controller.yaml b/Documentation/devicetree/bindings/power/mediatek,mt8196-power-controller.yaml
> new file mode 100644
> index 000000000000..6c2867b25967
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/mediatek,mt8196-power-controller.yaml
> @@ -0,0 +1,74 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/mediatek,mt8196-power-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek MT8196 Power Domains Controller
> +
> +maintainers:
> + - Guangjie Song <guangjie.song@xxxxxxxxxxxx>
> +
> +description: |
> + Mediatek processors include support for multiple power domains which can be
> + powered up/down by software based on different application scenes to save power.
> +
> +properties:
> + $nodename:
> + pattern: '^power-controller(@[0-9a-f]+)?$'


How unit address can be optional?

> +
> + compatible:
> + enum:
> + - mediatek,mt8196-scpsys
> + - mediatek,mt8196-hfrpsys
> +
> + '#power-domain-cells':
> + const: 1
> +
> + reg:
> + description: Address range of the power controller.

No, look how other bindings do it.

> +
> + clocks:
> + description: |

Look at other bindings.

> + A number of phandles to clocks that need to be enabled during domain
> + power-up sequencing.

Look at other bindings.

> +
> + clock-names:
> + description: |
> + List of names of clock.
> +
> + domain-supply:
> + description: domain regulator supply.
> +
> + spm:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle to the device containing the spm register range.
> +
> + mmpc:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle to the device containing the mmpc register range.
> +
> + vote-regmap:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle to the device containing the vote register range.
> +
> + mm-vote-regmap:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: phandle to the device containing the mm-vote register range.

None of these are correct.

> +
> +required:
> + - compatible

That's just incomplete.

This binding is really incomplete and with multiple issues. Considering
this was never tested, please first consult some internal folks to do
proper internal review.

> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/power/mt8196-power.h>
> +
> + scpsys: power-controller@1c004000 {
> + compatible = "mediatek,mt8196-scpsys", "syscon";
> + reg = <0 0x1c004000 0 0x1000>;
> + #power-domain-cells = <1>;
> + spm = <&scpsys_bus>;
> + vote-regmap = <&vote>;
> + };
> diff --git a/include/dt-bindings/power/mt8196-power.h b/include/dt-bindings/power/mt8196-power.h
> new file mode 100644
> index 000000000000..b0db89cc435d
> --- /dev/null
> +++ b/include/dt-bindings/power/mt8196-power.h
> @@ -0,0 +1,57 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * Copyright (c) 2023 MediaTek Inc.

We have 2025.

Best regards,
Krzysztof