From: Rob Herring <robh@kernel.org>
To: Olivier MOYSAN <olivier.moysan@foss.st.com>
Cc: "Conor Dooley" <conor@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@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: Wed, 7 Oct 2026 08:47:50 -0500 [thread overview]
Message-ID: <20261007134750.GC2792240-robh@kernel.org> (raw)
In-Reply-To: <bb8af256-5a77-4215-9eeb-fbcd0cae1829@foss.st.com>
On Wed, Oct 07, 2026 at 11:01:28AM +0200, Olivier MOYSAN wrote:
> Hi Conor,
>
> Thanks for the review
>
> On 10/1/26 20:32, Conor Dooley wrote:
> > On Thu, Oct 01, 2026 at 04:56:45PM +0200, Olivier Moysan wrote:
> > > Add bindings that describes STM32 MDF settings to support
> > > digital filtering for Pulse Density Modulation (PDM) microphones
> > > and analog sigma delta modulators.
> > >
> > > Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> > > ---
> > > .../bindings/iio/adc/st,stm32-mdf-adc.yaml | 383 ++++++++++++++++++
> > > 1 file changed, 383 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/iio/adc/st,stm32-mdf-adc.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-mdf-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-mdf-adc.yaml
> > > new file mode 100644
> > > index 000000000000..f2fbc3e150e8
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-mdf-adc.yaml
> > > @@ -0,0 +1,383 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/adc/st,stm32-mdf-adc.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: STMicroelectronics STM32 Multi-function Digital Filter (MDF) ADC
> > > +
> > > +maintainers:
> > > + - Olivier Moysan <olivier.moysan@foss.st.com>
> > > +
> > > +description: |
> > > + STM32 MDF ADC is a sigma delta analog-to-digital converter dedicated to
> > > + interface external sigma delta modulators to STM32 micro controllers.
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - st,stm32mp25-mdf
> > > + - st,stm32mp23-mdf
> > > +
> > > + reg:
> > > + minItems: 1
> > > + maxItems: 2
> >
> > This needs an items list here. The size of the regions seems like crap
> > to begin with...
> >
> > > +
> > > + clocks:
> > > + maxItems: 1
> > > +
> > > + clock-names:
> > > + description: Internal clock used for MDF digital processing.
> > > + items:
> > > + - const: ker_ck
> >
> > This is pointless when you only have one.
> >
>
> I agree that it could be dropped. However, it is useful for using
> devm_regmap_init_mmio_clk.
I don't know what that function is/does, but that's not justification
for bindings. Maybe you need a helper that handles a single clock. Or
that function could take a NULL string for single clock?
>
> > > +
> > > + "#clock-cells":
> > > + enum: [0, 1]
> >
> > Why is this not fixed? Also why are parts of your own device consuming
> > the clocks?
> >
> > > +
> > > + clock-output-names:
> > > + description: |
> > > + CCK0 and CCK1 are optional output clocks, which share the same clock frequency,
> > > + but can be gated independently to save power.
> > > + minItems: 1
> > > + maxItems: 2
> > > + oneOf:
> > > + - items:
> > > + - const: cck0
> > > + - items:
> > > + - const: cck1
> > > + - items:
> > > + - const: cck0
> > > + - const: cck1
> > > +
> > > + clock-frequency:
> > > + description: |
> > > + Common clock frequency (Hz) for CCK0 and CCK1 output clocks.
> > > + The frequency must be a multiple of the "ker_ck" clock frequency.
> > > + maximum: 25000000
> >
> > Should not be needed, the consumers request what they need.
> >
>
> The CCKx clock frequency depends on the maximum rate supported by the sigma
> delta converters (for instance a digital mic) and the expected decimation
> ratio on the bitstream. Typically this determines the frequency on the SPI
> bus.
> This rate is defined statically and shared by the CCKx clocks. So IMHO, as
> this rate is unique, it can look strange to let the consumer define it.
> Moreover, it seems to me that clock-frequency is already used to configure
> the frequency of a provider in some other bindings.
> For instance: Documentation/devicetree/bindings/clock/silabs,si570.yaml
> So, it's not clear for me, what is the restriction on clock-frequency
> property.
> > > +
> > > + ranges: true
> > > +
> > > + clock-ranges: true
> > > +
> > > + resets:
> > > + maxItems: 1
> > > +
> > > + reset-names:
> > > + items:
> > > + - const: mdf
> > > +
> > > + access-controllers:
> > > + $ref: /schemas/types.yaml#/definitions/phandle-array
> > > + description: |
> > > + Phandle to the rifsc device to check access right.
> > > +
> > > + power-domains:
> > > + maxItems: 1
> > > +
> > > + st,interleave:
> > > + description: |
> > > + List of phandles of interleaved filters. The indexes of interleaved filters must be
> > > + consecutives starting from 0 (i.e in range [0..N]). The samples from interleaved filters
> > > + are muxed in a single channel and retrieved through the device associated to the filter 0.
> > > + The filters 1..N have to be enabled, but inherit their configuration from filter 0.
> > > + $ref: /schemas/types.yaml#/definitions/phandle-array
> >
> > No idea what these even are, but this is probably not the right way to
> > represent the relationship between devices. They're apparently ADCs, but
> > this is also an ADC so I'm not sure what's going on here at all.
I don't under it either, but regardless phandle-array needs constraints
on the items. It's really a matrix with array of phandle+args arrays.
Rob
next prev parent reply other threads:[~2026-10-07 13:47 UTC|newest]
Thread overview: 20+ 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 [this message]
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-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-02 9:31 ` Krzysztof Kozlowski
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=20261007134750.GC2792240-robh@kernel.org \
--to=robh@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@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 \
/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®