All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Sven Peter <sven@svenpeter.dev>,
	devicetree@vger.kernel.org, linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hector Martin <marcan@marcan.st>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	Arnd Bergmann <arnd@kernel.org>
Subject: Re: [PATCH 0/3] Apple M1 clock gate driver
Date: Wed, 26 May 2021 10:18:10 +0300	[thread overview]
Message-ID: <YK32Mmiq9QXGkELF@atomide.com> (raw)
In-Reply-To: <CAL_JsqKqpSQbdj_Crc-LSc12700kyFFkMTU29BDY2bwGNLXn9A@mail.gmail.com>

Hi,

* Rob Herring <robh+dt@kernel.org> [210525 18:09]:
> I would do a single node per mmio region with the register offset (or
> offset / 4) being the clock id. This can still support new SoCs easily
> if you have a fallback compatible. If you want/need to get all the
> clocks, just walk the DT 'clocks' properties and extract all the IDs.

I mostly agree.. Except I'd also leave out the artificial clock ID and
just use real register offsets from the clock controller base instead.

So a single clock controller node for each MMIO range, then set
#clock=cells = <1>. Then the binding follows what we have for the
interrupts-extended binding for example.

If the clock controller optionally needs some data in the dts,
that can be added to the clock controller node. Or it can be driver
internal built-in data. If the data for dts can be described in a
generic way, even better :)

This would make the consumer interface look like below with a
clock controller node and register offset from it:

clocks = <&clock_controller1 0x1234>;

Regards,

Tony




WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Sven Peter <sven@svenpeter.dev>,
	devicetree@vger.kernel.org, linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Hector Martin <marcan@marcan.st>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	Arnd Bergmann <arnd@kernel.org>
Subject: Re: [PATCH 0/3] Apple M1 clock gate driver
Date: Wed, 26 May 2021 10:18:10 +0300	[thread overview]
Message-ID: <YK32Mmiq9QXGkELF@atomide.com> (raw)
In-Reply-To: <CAL_JsqKqpSQbdj_Crc-LSc12700kyFFkMTU29BDY2bwGNLXn9A@mail.gmail.com>

Hi,

* Rob Herring <robh+dt@kernel.org> [210525 18:09]:
> I would do a single node per mmio region with the register offset (or
> offset / 4) being the clock id. This can still support new SoCs easily
> if you have a fallback compatible. If you want/need to get all the
> clocks, just walk the DT 'clocks' properties and extract all the IDs.

I mostly agree.. Except I'd also leave out the artificial clock ID and
just use real register offsets from the clock controller base instead.

So a single clock controller node for each MMIO range, then set
#clock=cells = <1>. Then the binding follows what we have for the
interrupts-extended binding for example.

If the clock controller optionally needs some data in the dts,
that can be added to the clock controller node. Or it can be driver
internal built-in data. If the data for dts can be described in a
generic way, even better :)

This would make the consumer interface look like below with a
clock controller node and register offset from it:

clocks = <&clock_controller1 0x1234>;

Regards,

Tony




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-05-26  7:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 18:27 [PATCH 0/3] Apple M1 clock gate driver Sven Peter
2021-05-24 18:27 ` Sven Peter
2021-05-24 18:27 ` [PATCH 1/3] dt-bindings: clock: add DT bindings for apple,gate-clock Sven Peter
2021-05-24 18:27   ` Sven Peter
2021-05-24 18:27 ` [PATCH 2/3] clk: add support for gate clocks on Apple SoCs Sven Peter
2021-05-24 18:27   ` Sven Peter
2021-05-26  3:09   ` Stephen Boyd
2021-05-26  3:09     ` Stephen Boyd
2021-05-30 11:17     ` Sven Peter
2021-05-30 11:17       ` Sven Peter
2021-05-24 18:27 ` [PATCH 3/3] arm64: apple: add uart gate clocks Sven Peter
2021-05-24 18:27   ` Sven Peter
2021-05-26  3:10   ` Stephen Boyd
2021-05-26  3:10     ` Stephen Boyd
2021-05-30 11:11     ` Sven Peter
2021-05-30 11:11       ` Sven Peter
2021-05-25 17:41 ` [PATCH 0/3] Apple M1 clock gate driver Rob Herring
2021-05-25 17:41   ` Rob Herring
2021-05-26  7:18   ` Tony Lindgren [this message]
2021-05-26  7:18     ` Tony Lindgren
2021-05-30 11:08     ` Sven Peter
2021-05-30 11:08       ` Sven Peter
2021-06-02  9:26       ` Tony Lindgren
2021-06-02  9:26         ` Tony Lindgren
2021-06-03 12:55         ` Sven Peter
2021-06-03 12:55           ` Sven Peter
2021-06-04  7:43           ` Tony Lindgren
2021-06-04  7:43             ` Tony Lindgren
2021-06-05 12:12             ` Sven Peter
2021-06-05 12:12               ` Sven Peter
2021-06-06  5:59               ` Tony Lindgren
2021-06-06  5:59                 ` Tony Lindgren
2021-05-30 11:05   ` Sven Peter
2021-05-30 11:05     ` Sven Peter
2021-06-02  9:28     ` Tony Lindgren
2021-06-02  9:28       ` Tony Lindgren

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=YK32Mmiq9QXGkELF@atomide.com \
    --to=tony@atomide.com \
    --cc=arnd@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=mark.kettenis@xs4all.nl \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sven@svenpeter.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.