mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Olivier MOYSAN" <olivier.moysan@foss.st.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: iio: adc: add bindings for stm32 mdf filter
Date: Mon, 19 Oct 2026 19:55:06 +0100	[thread overview]
Message-ID: <20261019-puzzling-lyrically-8e28577ba301@spud> (raw)
In-Reply-To: <20261019023037.24674f30@jic23-hlaptop>

[-- Attachment #1: Type: text/plain, Size: 3650 bytes --]

On Mon, Oct 19, 2026 at 02:30:37AM +0100, Jonathan Cameron wrote:
> 
> > >> Yes, we can have two clocks gated independently but sharing the same rate.
> > >>
> > >> Using the clock framework apis seemed to me the right way to manage cck1 and
> > >> cck0 gating and divider computing. I think I would have to introduce
> > >> proprietary properties and have to implement code in the driver, that would
> > >> be handled natively by the framework otherwise.  
> > > 
> > > The CCF is still the right way to do it, especially since CCK0/1 can be
> > > exported to other devices. I don't believe you need to actually have a
> > > reference in DT to do this though, plenty of "real" clock controllers
> > > have only one input clock and hang a whole tree with multiple layers off
> > > that.
> > > Down below I mentioned this under "ouroboros devices", I think this kind
> > > of ability to chose which clock a channel uses is a fairly normal thing
> > > to do in IIO land, I just dunno what the preferred mechanism is - I just
> > > know that it is not referencing yourself (probably it's some sort of
> > > property that you put in a channel node that says 'blah-clock = "cck0"',
> > > but better that the IIO folks answer.
> > >   
> > 
> > The adc.yaml binding do not expose clock properties. But maybe IIO 
> > experts can answer about this.
> 
> Hmm.. For an 'conventional' ADC channel a clock is a novel thing to have
> on a per channel basis. What does it mean for an analog signal?

tbh, I don't think this has anything to do with adc.yaml or ADC
channels, the channel that I was talking about here was the channel on
the backend since in Figure 349 the serial interfaces can select between
the two clocks but also select to be clocked by the MDF_CKIx input. We
definitely have some properties about that are used by devices to change
between clock sources - I just dunno if any of them have that capability
on a per-channel basis.

> I think these are signals between the front end (which here typically
> has one channel only) and the backend. They are useful because they
> end up indicating (I think) whether we want to interleave or not?

If it was just about interleaving, I don't think you'd need two of them,
since only one set of interleaved channels is possible? There's also the
option I mentioned of having the MDF_CKIx be the clock. Maybe being a
clock controller is actually the right thing to do, just with the
frontend sdmodulator or w/e connected to the SITFx being the consumer?
In that case, you'd need to do something to actually represent the clock
mux in dt, one mux per SITFx, leaving us with N output clocks from
CLK_SITF0 to CLK_SITFx rather than two because we're thinking in terms
of programming model not physical outputs. Additionally, the number of
input clocks grows by N since MDF_CKIx are all parents of the muxes.
You'd then use assigned-clock-parents from the frontend node to set the
parent of the mux (I think anyway). I'd be a little afraid of creating a
loop there though, that needs to be broken, if the MDF_CKIx provider is
the sd-modulator - but idk if that's possible and cyclic dependencies
like that can always be dealt with anyway.

That's probably the most natural way to go about things from a DT point
of view, and makes some sense to me if the clock is being used to drive
communication with the sd-modulator - although it seems a little forced.
It's still better IMO than the MDF referencing itself as things are done
now.

> 
> Anyhow, right now I don't have this clear enough in my head to
> give a firm answer.
> 
> Jonathan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-10-19 18:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 14:56 [PATCH 0/3] iio: adc: stm32: add mdf support for stm32mp2 Olivier Moysan
2026-10-01 14:56 ` [PATCH 1/3] dt-bindings: iio: adc: add bindings for stm32 mdf filter Olivier Moysan
2026-10-01 16:25   ` Rob Herring (Arm)
2026-10-01 18:32   ` Conor Dooley
2026-10-07  9:01     ` Olivier MOYSAN
2026-10-07 13:47       ` Rob Herring
2026-10-07 16:02         ` Olivier MOYSAN
2026-10-08 10:11       ` Conor Dooley
2026-10-08 16:37         ` Olivier MOYSAN
2026-10-09 19:12           ` Conor Dooley
2026-10-12 12:56             ` Olivier MOYSAN
2026-10-14 15:15               ` Conor Dooley
2026-10-14 16:51                 ` Olivier MOYSAN
2026-10-14 22:49                   ` Conor Dooley
2026-10-15  9:19                     ` Olivier MOYSAN
2026-10-15 12:34                       ` Conor Dooley
2026-10-19  1:25                         ` Jonathan Cameron
2026-10-19 16:17                           ` Olivier MOYSAN
2026-10-19  1:30               ` Jonathan Cameron
2026-10-19 18:55                 ` Conor Dooley [this message]
2026-10-02  9:22   ` Krzysztof Kozlowski
2026-10-06 15:48     ` Olivier MOYSAN
2026-10-06 15:59       ` Krzysztof Kozlowski
2026-10-02  9:34   ` Krzysztof Kozlowski
2026-10-06 16:04     ` Olivier MOYSAN
2026-10-01 14:56 ` [PATCH 2/3] iio: adc: add stm32 mdf support Olivier Moysan
2026-10-01 19:13   ` Andy Shevchenko
2026-10-14 16:57     ` Olivier MOYSAN
2026-10-02  9:31   ` Krzysztof Kozlowski
2026-10-19  1:36   ` Jonathan Cameron
2026-10-01 14:56 ` [PATCH 3/3] ASoC: stm32: add mdf dai support Olivier Moysan
2026-10-02  9:24   ` Krzysztof Kozlowski

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=20261019-puzzling-lyrically-8e28577ba301@spud \
    --to=conor@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=robh@kernel.org \
    /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®