From: Lee Jones <lee.jones@linaro.org>
To: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Cc: Rob Herring <robh@kernel.org>,
alsa-devel@alsa-project.org,
Ahmad Fatoum <a.fatoum@pengutronix.de>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Olivier MOYSAN <olivier.moysan@foss.st.com>,
alain.volmat@foss.st.com, arnaud.pouliquen@foss.st.com,
Fabrice GASNIER <fabrice.gasnier@st.com>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Linux-stm32] [PATCH v2 1/4] ASoC: dt-bindings: stm32: i2s: add audio-graph-card port
Date: Wed, 8 Dec 2021 12:08:41 +0000 [thread overview]
Message-ID: <YbCgSeA1++U82jtn@google.com> (raw)
In-Reply-To: <cb7f19c0-3826-fcc8-227c-982838acf599@foss.st.com>
On Wed, 08 Dec 2021, Alexandre TORGUE wrote:
> Hi Ahmad
>
> On 12/7/21 2:59 PM, Ahmad Fatoum wrote:
> > Hello Alex,
> >
> > On 07.12.21 14:52, Alexandre TORGUE wrote:
> > > Hi Rob
> > >
> > > On 12/1/21 11:34 PM, Rob Herring wrote:
> > > > On Fri, Nov 26, 2021 at 11:25:27AM +0100, Olivier MOYSAN wrote:
> > > > > Hi Rob,
> > > > >
> > > > > On 11/25/21 10:26 PM, Rob Herring wrote:
> > > > > > On Thu, 25 Nov 2021 15:40:50 +0100, Olivier Moysan wrote:
> > > > > > > The STM2 I2S DAI can be connected via the audio-graph-card.
> > > > > > > Add port entry into the bindings.
> > > > > > >
> > > > > > > Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> > > > > > > ---
> > > > > > > Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++++
> > > > > > > 1 file changed, 5 insertions(+)
> > > > > > >
> > > > > >
> > > > > > Running 'make dtbs_check' with the schema in this patch gives the
> > > > > > following warnings. Consider if they are expected or the schema is
> > > > > > incorrect. These may not be new warnings.
> > > > > >
> > > > > > Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> > > > > > This will change in the future.
> > > > > >
> > > > > > Full log is available here: https://patchwork.ozlabs.org/patch/1559750
> > > > > >
> > > > > >
> > > > > > audio-controller@4000b000: 'port' does not match any of the regexes: '^port@[0-9]', 'pinctrl-[0-9]+'
> > > > > > arch/arm/boot/dts/stm32mp157a-dk1.dt.yaml
> > > > > > arch/arm/boot/dts/stm32mp157c-dk2.dt.yaml
> > > > > >
> > > > >
> > > > > This warning is not a new one.
> > > > >
> > > > > The i2s2 node in stm32mp15xx-dkx.dtsi would require the following binding:
> > > > > port:
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > However the spi binding requires to introduce a unit address:
> > > > > patternProperties:
> > > > > '^port@[0-9]':
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > The warning can be removed by re-ordering the bindings patches in the serie,
> > > > > as "additionalProperties: true" makes the check more tolerant on extra
> > > > > properties.
> > > >
> > > > That's never right.
> > > >
> > > > > The patch "ASoC: dt-bindings: stm32: i2s: add audio-graph-card port" can
> > > > > even be merely dropped.
> > > > > So, I suggest to resend the serie without audio-graph-card patch.
> > > >
> > > > Only if you aren't using audio-graph-card.
> > > >
> > > > >
> > > > > Does it sound too permissive to you ?
> > > >
> > > > I think perhaps you need to combine the schemas into 1. Or you need to
> > > > restructure your dtsi files such that you only add spi specific
> > > > properties when spi mode is enabled and only add i2s specific properties
> > > > when i2s mode is enabled. Or use the /delete-property/ directive.
> > >
> > > Initially the aim of this series was to fix a "make W=1" warnings seen on spi and i2s nodes (duplicate unit-address). Moving both nodes in a common node + using a different compatible depending on SPI or I2S usage sounded good) but it is not enough. In this series the common node is named as following: "spi2s2: spi@4000b000". It is fine for a spi usage but if we want to use this "common node" with I2S compatible and specific bindings, the node name remains spi@... and then specific spi checks are done. For this with this series applied we got this issue reported by spi-controller.yaml:
> > >
> > > spi@4000b000: port@0: 'compatible' is a required property
> > >
> > > So, if we use two separates nodes we got W=1 warning and if we use a common node we got yaml check issue. One possibility would be to use a common node with a new node name (for example i2spi@...) but I think it is not acceptable.
> > >
> > > How to progress ?
> >
> > Atmel Flexcom can be configured to be either UART, SPI or i2c. Functions
> > are child nodes of the flexcom node and the MFD driver matching against it,
> > just configure the operating mode and then calls of_platform_populate.
> >
> > Would something along these lines fit here as well?
>
> Yes it could but in my mind it was not a MFD as both feature cannot be used
> at the same time: it is either SPI or I2S and choice is done "statically" in
> device tree depending board usage.
>
> Lee, what it is your feeling about that ? Will you accept to add a MFD
> driver for this SPI/I2S peripheral whose prurpose is only to populate child
> node (either SPI or I2S) ?
From your description, this doesn't sound like a good fit for MFD.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Olivier MOYSAN <olivier.moysan@foss.st.com>,
Fabrice GASNIER <fabrice.gasnier@st.com>,
devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
alain.volmat@foss.st.com, arnaud.pouliquen@foss.st.com,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Linux-stm32] [PATCH v2 1/4] ASoC: dt-bindings: stm32: i2s: add audio-graph-card port
Date: Wed, 8 Dec 2021 12:08:41 +0000 [thread overview]
Message-ID: <YbCgSeA1++U82jtn@google.com> (raw)
In-Reply-To: <cb7f19c0-3826-fcc8-227c-982838acf599@foss.st.com>
On Wed, 08 Dec 2021, Alexandre TORGUE wrote:
> Hi Ahmad
>
> On 12/7/21 2:59 PM, Ahmad Fatoum wrote:
> > Hello Alex,
> >
> > On 07.12.21 14:52, Alexandre TORGUE wrote:
> > > Hi Rob
> > >
> > > On 12/1/21 11:34 PM, Rob Herring wrote:
> > > > On Fri, Nov 26, 2021 at 11:25:27AM +0100, Olivier MOYSAN wrote:
> > > > > Hi Rob,
> > > > >
> > > > > On 11/25/21 10:26 PM, Rob Herring wrote:
> > > > > > On Thu, 25 Nov 2021 15:40:50 +0100, Olivier Moysan wrote:
> > > > > > > The STM2 I2S DAI can be connected via the audio-graph-card.
> > > > > > > Add port entry into the bindings.
> > > > > > >
> > > > > > > Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> > > > > > > ---
> > > > > > > Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++++
> > > > > > > 1 file changed, 5 insertions(+)
> > > > > > >
> > > > > >
> > > > > > Running 'make dtbs_check' with the schema in this patch gives the
> > > > > > following warnings. Consider if they are expected or the schema is
> > > > > > incorrect. These may not be new warnings.
> > > > > >
> > > > > > Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> > > > > > This will change in the future.
> > > > > >
> > > > > > Full log is available here: https://patchwork.ozlabs.org/patch/1559750
> > > > > >
> > > > > >
> > > > > > audio-controller@4000b000: 'port' does not match any of the regexes: '^port@[0-9]', 'pinctrl-[0-9]+'
> > > > > > arch/arm/boot/dts/stm32mp157a-dk1.dt.yaml
> > > > > > arch/arm/boot/dts/stm32mp157c-dk2.dt.yaml
> > > > > >
> > > > >
> > > > > This warning is not a new one.
> > > > >
> > > > > The i2s2 node in stm32mp15xx-dkx.dtsi would require the following binding:
> > > > > port:
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > However the spi binding requires to introduce a unit address:
> > > > > patternProperties:
> > > > > '^port@[0-9]':
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > The warning can be removed by re-ordering the bindings patches in the serie,
> > > > > as "additionalProperties: true" makes the check more tolerant on extra
> > > > > properties.
> > > >
> > > > That's never right.
> > > >
> > > > > The patch "ASoC: dt-bindings: stm32: i2s: add audio-graph-card port" can
> > > > > even be merely dropped.
> > > > > So, I suggest to resend the serie without audio-graph-card patch.
> > > >
> > > > Only if you aren't using audio-graph-card.
> > > >
> > > > >
> > > > > Does it sound too permissive to you ?
> > > >
> > > > I think perhaps you need to combine the schemas into 1. Or you need to
> > > > restructure your dtsi files such that you only add spi specific
> > > > properties when spi mode is enabled and only add i2s specific properties
> > > > when i2s mode is enabled. Or use the /delete-property/ directive.
> > >
> > > Initially the aim of this series was to fix a "make W=1" warnings seen on spi and i2s nodes (duplicate unit-address). Moving both nodes in a common node + using a different compatible depending on SPI or I2S usage sounded good) but it is not enough. In this series the common node is named as following: "spi2s2: spi@4000b000". It is fine for a spi usage but if we want to use this "common node" with I2S compatible and specific bindings, the node name remains spi@... and then specific spi checks are done. For this with this series applied we got this issue reported by spi-controller.yaml:
> > >
> > > spi@4000b000: port@0: 'compatible' is a required property
> > >
> > > So, if we use two separates nodes we got W=1 warning and if we use a common node we got yaml check issue. One possibility would be to use a common node with a new node name (for example i2spi@...) but I think it is not acceptable.
> > >
> > > How to progress ?
> >
> > Atmel Flexcom can be configured to be either UART, SPI or i2c. Functions
> > are child nodes of the flexcom node and the MFD driver matching against it,
> > just configure the operating mode and then calls of_platform_populate.
> >
> > Would something along these lines fit here as well?
>
> Yes it could but in my mind it was not a MFD as both feature cannot be used
> at the same time: it is either SPI or I2S and choice is done "statically" in
> device tree depending board usage.
>
> Lee, what it is your feeling about that ? Will you accept to add a MFD
> driver for this SPI/I2S peripheral whose prurpose is only to populate child
> node (either SPI or I2S) ?
From your description, this doesn't sound like a good fit for MFD.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Alexandre TORGUE <alexandre.torgue@foss.st.com>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Olivier MOYSAN <olivier.moysan@foss.st.com>,
Fabrice GASNIER <fabrice.gasnier@st.com>,
devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
alain.volmat@foss.st.com, arnaud.pouliquen@foss.st.com,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Linux-stm32] [PATCH v2 1/4] ASoC: dt-bindings: stm32: i2s: add audio-graph-card port
Date: Wed, 8 Dec 2021 12:08:41 +0000 [thread overview]
Message-ID: <YbCgSeA1++U82jtn@google.com> (raw)
In-Reply-To: <cb7f19c0-3826-fcc8-227c-982838acf599@foss.st.com>
On Wed, 08 Dec 2021, Alexandre TORGUE wrote:
> Hi Ahmad
>
> On 12/7/21 2:59 PM, Ahmad Fatoum wrote:
> > Hello Alex,
> >
> > On 07.12.21 14:52, Alexandre TORGUE wrote:
> > > Hi Rob
> > >
> > > On 12/1/21 11:34 PM, Rob Herring wrote:
> > > > On Fri, Nov 26, 2021 at 11:25:27AM +0100, Olivier MOYSAN wrote:
> > > > > Hi Rob,
> > > > >
> > > > > On 11/25/21 10:26 PM, Rob Herring wrote:
> > > > > > On Thu, 25 Nov 2021 15:40:50 +0100, Olivier Moysan wrote:
> > > > > > > The STM2 I2S DAI can be connected via the audio-graph-card.
> > > > > > > Add port entry into the bindings.
> > > > > > >
> > > > > > > Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> > > > > > > ---
> > > > > > > Documentation/devicetree/bindings/sound/st,stm32-i2s.yaml | 5 +++++
> > > > > > > 1 file changed, 5 insertions(+)
> > > > > > >
> > > > > >
> > > > > > Running 'make dtbs_check' with the schema in this patch gives the
> > > > > > following warnings. Consider if they are expected or the schema is
> > > > > > incorrect. These may not be new warnings.
> > > > > >
> > > > > > Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> > > > > > This will change in the future.
> > > > > >
> > > > > > Full log is available here: https://patchwork.ozlabs.org/patch/1559750
> > > > > >
> > > > > >
> > > > > > audio-controller@4000b000: 'port' does not match any of the regexes: '^port@[0-9]', 'pinctrl-[0-9]+'
> > > > > > arch/arm/boot/dts/stm32mp157a-dk1.dt.yaml
> > > > > > arch/arm/boot/dts/stm32mp157c-dk2.dt.yaml
> > > > > >
> > > > >
> > > > > This warning is not a new one.
> > > > >
> > > > > The i2s2 node in stm32mp15xx-dkx.dtsi would require the following binding:
> > > > > port:
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > However the spi binding requires to introduce a unit address:
> > > > > patternProperties:
> > > > > '^port@[0-9]':
> > > > > $ref: audio-graph-port.yaml#
> > > > > unevaluatedProperties: false
> > > > >
> > > > > The warning can be removed by re-ordering the bindings patches in the serie,
> > > > > as "additionalProperties: true" makes the check more tolerant on extra
> > > > > properties.
> > > >
> > > > That's never right.
> > > >
> > > > > The patch "ASoC: dt-bindings: stm32: i2s: add audio-graph-card port" can
> > > > > even be merely dropped.
> > > > > So, I suggest to resend the serie without audio-graph-card patch.
> > > >
> > > > Only if you aren't using audio-graph-card.
> > > >
> > > > >
> > > > > Does it sound too permissive to you ?
> > > >
> > > > I think perhaps you need to combine the schemas into 1. Or you need to
> > > > restructure your dtsi files such that you only add spi specific
> > > > properties when spi mode is enabled and only add i2s specific properties
> > > > when i2s mode is enabled. Or use the /delete-property/ directive.
> > >
> > > Initially the aim of this series was to fix a "make W=1" warnings seen on spi and i2s nodes (duplicate unit-address). Moving both nodes in a common node + using a different compatible depending on SPI or I2S usage sounded good) but it is not enough. In this series the common node is named as following: "spi2s2: spi@4000b000". It is fine for a spi usage but if we want to use this "common node" with I2S compatible and specific bindings, the node name remains spi@... and then specific spi checks are done. For this with this series applied we got this issue reported by spi-controller.yaml:
> > >
> > > spi@4000b000: port@0: 'compatible' is a required property
> > >
> > > So, if we use two separates nodes we got W=1 warning and if we use a common node we got yaml check issue. One possibility would be to use a common node with a new node name (for example i2spi@...) but I think it is not acceptable.
> > >
> > > How to progress ?
> >
> > Atmel Flexcom can be configured to be either UART, SPI or i2c. Functions
> > are child nodes of the flexcom node and the MFD driver matching against it,
> > just configure the operating mode and then calls of_platform_populate.
> >
> > Would something along these lines fit here as well?
>
> Yes it could but in my mind it was not a MFD as both feature cannot be used
> at the same time: it is either SPI or I2S and choice is done "statically" in
> device tree depending board usage.
>
> Lee, what it is your feeling about that ? Will you accept to add a MFD
> driver for this SPI/I2S peripheral whose prurpose is only to populate child
> node (either SPI or I2S) ?
From your description, this doesn't sound like a good fit for MFD.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2021-12-08 12:09 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-25 14:40 [PATCH v2 0/4] ARM: dts: stm32: merge spi and i2s nodes Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` [PATCH v2 1/4] ASoC: dt-bindings: stm32: i2s: add audio-graph-card port Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 21:26 ` Rob Herring
2021-11-25 21:26 ` Rob Herring
2021-11-25 21:26 ` Rob Herring
2021-11-26 10:25 ` Olivier MOYSAN
2021-11-26 10:25 ` Olivier MOYSAN
2021-11-26 10:25 ` Olivier MOYSAN
2021-12-01 22:34 ` Rob Herring
2021-12-01 22:34 ` Rob Herring
2021-12-01 22:34 ` Rob Herring
2021-12-07 13:52 ` Alexandre TORGUE
2021-12-07 13:52 ` Alexandre TORGUE
2021-12-07 13:59 ` [Linux-stm32] " Ahmad Fatoum
2021-12-07 13:59 ` Ahmad Fatoum
2021-12-08 9:55 ` Alexandre TORGUE
2021-12-08 9:55 ` Alexandre TORGUE
2021-12-08 9:55 ` Alexandre TORGUE
2021-12-08 12:08 ` Lee Jones [this message]
2021-12-08 12:08 ` Lee Jones
2021-12-08 12:08 ` Lee Jones
2021-12-08 13:34 ` Alexandre TORGUE
2021-12-08 13:34 ` Alexandre TORGUE
2021-12-08 13:34 ` Alexandre TORGUE
2021-12-11 20:05 ` Rob Herring
2021-12-11 20:05 ` Rob Herring
2021-12-11 20:05 ` Rob Herring
2021-12-13 16:26 ` Alexandre TORGUE
2021-12-13 16:26 ` Alexandre TORGUE
2021-12-13 16:26 ` Alexandre TORGUE
2021-11-25 14:40 ` [PATCH v2 2/4] ASoC: dt-bindings: stm32: i2s: allow additional properties Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-12-01 22:31 ` Rob Herring
2021-12-01 22:31 ` Rob Herring
2021-12-01 22:31 ` Rob Herring
2021-11-25 14:40 ` [PATCH v2 3/4] ASoC: dt-bindings: stm32: i2s: update example Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` [PATCH v2 4/4] ARM: dts: stm32: merge spi and i2s nodes Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
2021-11-25 14:40 ` Olivier Moysan
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=YbCgSeA1++U82jtn@google.com \
--to=lee.jones@linaro.org \
--cc=a.fatoum@pengutronix.de \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@st.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.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 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.