devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Rob Herring <robh@kernel.org>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	bcousson@baylibre.com, tony@atomide.com,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: clock: add TWL6032 32K clocks
Date: Wed, 23 Aug 2023 17:38:07 +0200	[thread overview]
Message-ID: <20230823173807.0b80a70a@aktux> (raw)
In-Reply-To: <20230821205745.GA2270173-robh@kernel.org>

On Mon, 21 Aug 2023 15:57:45 -0500
Rob Herring <robh@kernel.org> wrote:

> On Sat, Aug 19, 2023 at 03:41:45PM +0200, Andreas Kemnade wrote:
> > To be able to be referenced from a future yaml-version of
> > mfd/twl-family.txt depending on toplevel compatible have a separate
> > file for the 6032  
> 
> Really, the parent needs to be done first...
> 
well, for some other subdevices, a yaml is already in the tree
and Krzysztof recently added a R-By to another one.

But if the clocks should not have a node, then it is obvious.
What would be the route to conversion here: Is a conversion
of mfd/twl-family.txt without specifying subnodes ok for the first step,
maybe with additionalProperties: yes?


> > Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
> > ---
> >  .../bindings/clock/ti,twl6032-clk.yaml        | 38
> > +++++++++++++++++++ 1 file changed, 38 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/clock/ti,twl6032-clk.yaml
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/clock/ti,twl6032-clk.yaml
> > b/Documentation/devicetree/bindings/clock/ti,twl6032-clk.yaml new
> > file mode 100644 index 0000000000000..aebd9f8d761a2 --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/ti,twl6032-clk.yaml
> > @@ -0,0 +1,38 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/ti,twl6032-clk.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Clocks of the TWL6032 PMIC
> > +
> > +maintainers:
> > +  - Andreas Kemnade <andreas@kemnade.info>
> > +
> > +description:
> > +  The TWL6032 has some 32Khz clock outputs which can be
> > controlled.  
> 
> outputs? Seems like only 1 with no clock cells to specify which one.
> 
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,twl6032-clk32kaudio
> > +      - ti,twl6032-clk32kg  
> 
> Or is it 1 output per compatible? I hope not.
> 
yes, it is. It was inspired by the clk-palmas driver:
$ grep palmas.*32 arch/arm/boot/dts/ti/omap/omap5-*
arch/arm/boot/dts/ti/omap/omap5-board-common.dtsi:
clk32kgaudio: palmas_clk32k@1 {
arch/arm/boot/dts/ti/omap/omap5-board-common.dtsi:
	compatible = "ti,palmas-clk32kgaudio";

Well, we have the CLK_IGNORE_UNUSED, so if we use #clock-cells = 1,
an unused clock will not be touched by the kernel, right?

> > +
> > +  '#clock-cells':
> > +    const: 0
> > +
> > +required:
> > +  - compatible
> > +  - '#clock-cells'
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    twl {
> > +        clk32kaudio {
> > +            compatible = "ti,twl6032-clk32kaudio";
> > +            #clock-cells = <0>;
> > +        };  
> 
> You don't need a child node to be a clock provider. Just add 
> #clock-cells to the parent node.
> 
hmm, we have child nodes there for every subdevice in that family,
even if I doubt it is totally technically required.
So why should the clk device be an exception? 

Regards,
Andreas

  reply	other threads:[~2023-08-23 15:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-19 13:41 [PATCH 0/3] ARM: omap: omap4-embt2ws: 32K clock for WLAN Andreas Kemnade
2023-08-19 13:41 ` [PATCH 1/3] dt-bindings: clock: add TWL6032 32K clocks Andreas Kemnade
2023-08-21 20:57   ` Rob Herring
2023-08-23 15:38     ` Andreas Kemnade [this message]
2023-08-24  7:09       ` Krzysztof Kozlowski
2023-08-19 13:41 ` [PATCH 2/3] clk: twl: add clock driver for TWL6032 Andreas Kemnade
2023-08-22 22:34   ` Stephen Boyd
2023-08-23 14:51     ` Andreas Kemnade
2023-08-24  7:04       ` Krzysztof Kozlowski
2023-08-28 16:24         ` Andreas Kemnade
2023-08-28 17:04           ` Krzysztof Kozlowski
2023-08-19 13:41 ` [PATCH 3/3] ARM: dts: omap4-embt2ws: enable 32K clock on WLAN Andreas Kemnade

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=20230823173807.0b80a70a@aktux \
    --to=andreas@kemnade.info \
    --cc=bcousson@baylibre.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tony@atomide.com \
    /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;
as well as URLs for NNTP newsgroup(s).