mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Arseniy Velikanov <me@adomerle.pw>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v1 1/2] dt-bindings: clock: mediatek: Describe MT6789 clock controllers
Date: Thu, 17 Jul 2025 12:36:28 +0200	[thread overview]
Message-ID: <0089a5e5-4e16-4d30-8b56-3811a6d7af88@collabora.com> (raw)
In-Reply-To: <20250716-manipulative-dormouse-of-current-9af4e6@krzk-bin>

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@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@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@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



      reply	other threads:[~2025-07-17 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 22:22 Arseniy Velikanov
2025-07-15 22:22 ` [PATCH v1 2/2] clk: mediatek: Add " Arseniy Velikanov
2025-07-16 13:15   ` kernel test robot
2025-07-17 10:49   ` AngeloGioacchino Del Regno
2025-07-15 23:28 ` [PATCH v1 1/2] dt-bindings: clock: mediatek: Describe " Rob Herring (Arm)
2025-07-16  7:04 ` Krzysztof Kozlowski
2025-07-17 10:36   ` AngeloGioacchino Del Regno [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0089a5e5-4e16-4d30-8b56-3811a6d7af88@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=me@adomerle.pw \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®