[PATCH v1 1/2] dt-bindings: clock: mediatek: Describe MT6789 clock controllers
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Thu Jul 17 03:36:28 PDT 2025
Il 16/07/25 09:04, Krzysztof Kozlowski ha scritto:
> On Wed, Jul 16, 2025 at 02:22:20AM +0400, Arseniy Velikanov wrote:
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - mediatek,mt6789-afe
>> + - mediatek,mt6789-camsys
>> + - mediatek,mt6789-camsys-rawa
>> + - mediatek,mt6789-camsys-rawb
>> + - mediatek,mt6789-imgsys
>> + - mediatek,mt6789-imp-iic-wrap-c
>> + - mediatek,mt6789-imp-iic-wrap-en
>> + - mediatek,mt6789-imp-iic-wrap-w
>> + - mediatek,mt6789-ipesys
>> + - mediatek,mt6789-mdpsys
>> + - mediatek,mt6789-mfgcfg
>> + - mediatek,mt6789-vdecsys
>> + - mediatek,mt6789-vencsys
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + '#clock-cells':
>> + const: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + afe: clock-controller at 11210000 {
>> + compatible = "mediatek,mt6789-afe";
>> + reg = <0x11210000 0x1000>;
>> + #clock-cells = <1>;
>> + };
>> +
>
> Drop the rest of nodes. One example is enough. They are ALL THE SAME.
>
> ...
>
>> diff --git a/Documentation/devicetree/bindings/clock/mediatek,mt6789-sys-clock.yaml b/Documentation/devicetree/bindings/clock/mediatek,mt6789-sys-clock.yaml
>> new file mode 100644
>> index 000000000000..d6f70ee918ad
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/mediatek,mt6789-sys-clock.yaml
>> @@ -0,0 +1,68 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/mediatek,mt6789-sys-clock.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: MediaTek System Clock Controller for MT6789
>> +
>> +maintainers:
>> + - Arseniy Velikanov <me at adomerle.pw>
>> +
>> +description:
>> + The Mediatek system clock controller provides various clocks and system configuration
>> + like reset and bus protection on MT6789.
>> +
>> +properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - mediatek,mt6789-apmixedsys
>
> Why this does not fit existing binding file? Or Mediatek maintainers
> preference was to switch to one-binding-per-SoC?
>
We have been using one binding per soc for sys-clock and multimedia clocks because
the sys-clock has multiple clock controllers in one macro-block, while all of the
multimedia (and peripheral, depending on the soc) are in different macro-blocks.
There are also some historical reasons which aren't really relevant anymore.
So, we do have mt{soc}-sys-clock.yaml, mt{soc}-clock.yaml - that's right.
>
>> + - mediatek,mt6789-topckgen
>> + - mediatek,mt6789-infracfg-ao
>> + - mediatek,mt6789-mcusys
>> + - const: syscon
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + '#clock-cells':
>> + const: 1
>> +
>> + '#reset-cells':
>> + const: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + mcusys: syscon at c530000 {
>
> Drop unused labels, everywhere.
>
> Also, node name is supposed to be clock or reset controller, not syscon.
>
MCUSYS is all three - but please use clock-controller.
Cheers,
Angelo
More information about the Linux-mediatek
mailing list