[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0089a5e5-4e16-4d30-8b56-3811a6d7af88@collabora.com>
Date: Thu, 17 Jul 2025 12:36:28 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, Arseniy Velikanov <me@...merle.pw>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v1 1/2] dt-bindings: clock: mediatek: Describe MT6789
clock controllers
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@...10000 {
>> + 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@...merle.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@...0000 {
>
> 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
Powered by blists - more mailing lists