From: Conor Dooley <conor@kernel.org>
To: Vyacheslav Yurkov <uvv.mail@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Rob Herring <robh@kernel.org>,
Vyacheslav Yurkov <V.Yurkov.EXT@bruker.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: Add clock guard DT description
Date: Tue, 7 Apr 2026 17:17:38 +0100 [thread overview]
Message-ID: <20260407-fling-scouring-dbe2141cc79b@spud> (raw)
In-Reply-To: <8129d377-8a63-4589-820b-930a2b43a2f7@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3533 bytes --]
On Sat, Mar 28, 2026 at 03:58:47AM +0100, Vyacheslav Yurkov wrote:
> On 26.03.2026 19:32, Conor Dooley wrote:
>
> > > I was not sure how to provide a diagram in the mailing list, so I posted in
> > > on Github https://github.com/OSS-Keepers/clock-controller-guard/issues/1
> > >
> > > It is a driver which models dependencies for other drivers. These are soft
> > > or "indirect" dependencies, because we cannot access the FPGA unless the
> > > FPGA_PLL_locked, and GPIO is telling us we are good to go.
> > >
> > > Conor, I think this should answer your question as well.
> >
> > Not really, but it gets part of the way there. I want to know what this
> > provider actually is. I now know it is a PLL, not an off-chip
> > oscillator, but I know nothing about the interface that you have to it
> > (or if you have one at all). What compatible string/kernel driver does
> > it use?
> >
> > Because SoC-FPGAs can route GPIOs from the SoC part to the FPGA fabric
> > and use them as if interacting with something off-chip, I'm not sure if
> > we are dealing with an separate FPGA or a SoC-FPGA. Which is it?
> > Effectively I want to understand why you cannot just read the lock bit
> > from the PLL directly. In my experience with *SoC*-FPGAs, things like
> > PLLs that must lock for the fabric to be usable have a register
> > interface from which the lock bit can be read, that is of course not
> > clocked by the PLL output clock and therefore accessible before the
> > PLL has locked.
> >
> > I think more info is needed here to guide you on where such a "helper
> > driver" should be located and what the dt represetation should be.
>
> I really appreciate your feedback on this. Here's an attempt to provide a
> better exlanation.
>
> We have various use cases. Most of the time it's a PLL in the FPGA but it
> can also be some signal from a custom FPGA IP used to indicate if some
> preconditions are met and the IP is ready to be used (some kind of inverted
> reset but exposed by the IP). For a PLL we typically get the signal
> connected either to a GPIO IP block (altr,pio-1.0) OR to a bit in a custom
> IP register.
> In addition, some of the IPs in our design do not have a proper split
> between registers and IP core, which means that if an external clock and/or
> PLL lock is missing and we access the registers we won’t ever get an answer
> and thus stall the CPU.
>
> We are using a SoC-FPGA and use some GPIO IP within the FPGA (altr,pio-1.0
> for example).
>
> The PLL itself doesn't have any registers but the signal indicating that it
> is locked is available and routed to such a GPIO.
>
> The point is that we will have several IPs/drivers that will depend on the
> same preconditions (clk, gpios being high or low) and we want to use this
> clk_guard driver as an aggregator for those pre-conditions. Define once,
> reuse a lot.
Apologies for the delay responding, been sick the last week.
I think what you have here is not unreasonable, but may never have users
other than yourself! It's effectively gated-fixed-clock but the gpio
direction is inverted. I'm not keen on the "guarded" wording, but I
think I would want you to become a fixed-clock variant w/ a prefix that
indicates what's different. Then you get locked-gpios instead of
enable-gpios that gated-fixed-clock has.
Or maybe you're a gpio-gate-clock variant instead, and represent the PLL
as a fixed-clock (but I think being a fixed-clock variant makes more
sense).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-04-07 16:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 17:43 [PATCH 0/2] A proposal to add a virtual clock controller guard Vyacheslav Yurkov via B4 Relay
2026-03-18 17:43 ` [PATCH 1/2] clk: Add " Vyacheslav Yurkov via B4 Relay
2026-03-19 8:15 ` kernel test robot
2026-03-18 17:43 ` [PATCH 2/2] dt-bindings: Add clock guard DT description Vyacheslav Yurkov via B4 Relay
2026-03-18 19:33 ` Rob Herring (Arm)
2026-03-18 22:55 ` Rob Herring
2026-03-19 5:50 ` Vyacheslav Yurkov
2026-03-19 16:50 ` Conor Dooley
2026-03-23 13:52 ` Vyacheslav Yurkov
2026-03-23 20:14 ` Conor Dooley
2026-03-26 9:54 ` Vyacheslav Yurkov
2026-03-26 10:08 ` Krzysztof Kozlowski
2026-03-26 13:39 ` Vyacheslav Yurkov
2026-03-26 13:49 ` Krzysztof Kozlowski
2026-03-26 18:32 ` Conor Dooley
2026-03-28 2:58 ` Vyacheslav Yurkov
2026-04-07 16:17 ` Conor Dooley [this message]
2026-03-26 10:44 ` Conor Dooley
2026-04-20 17:56 ` Vyacheslav Yurkov
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=20260407-fling-scouring-dbe2141cc79b@spud \
--to=conor@kernel.org \
--cc=V.Yurkov.EXT@bruker.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=uvv.mail@gmail.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