All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Fabio Estevam <festevam@gmail.com>, Rob Herring <robh@kernel.org>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	devicetree <devicetree@vger.kernel.org>
Cc: Kevin Hilman <khilman@baylibre.com>,
	Carlo Caione <carlo@caione.org>,
	linux-amlogic@lists.infradead.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec
Date: Mon, 03 Sep 2018 11:57:25 +0200	[thread overview]
Message-ID: <b0efc5cf9cf4f7e05097fcd0ea6fd61ba8ff3476.camel@baylibre.com> (raw)
In-Reply-To: <CAOMZO5BOMOB6LaRs1fnmm-Ghu7pMkXW=sH_NOEWK3pqHAbUMCg@mail.gmail.com>

On Sat, 2018-09-01 at 18:24 -0300, Fabio Estevam wrote:
> Hi Jerome,
> 
> On Fri, Aug 31, 2018 at 12:02 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > There are 7 digital mics on the MIC daughter board attached
> > to the s400 board, so add the digital microphone codec to
> > its DTS
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > index ff64c429d432..f3e16cbbc61e 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > @@ -86,6 +86,15 @@
> >                 sound-name-prefix = "DIT";
> >         };
> > 
> > +       dmics: audio-codec@3 {
> 
> You pass @3 without a corresponding reg = <3>, which causes dtc
> warnings with W=1.

Hi Fabio,

Thanks for pointing this out.
Martin also raised concerns about this but, unfortunately, we did not get to the
bottom of it:

https://lkml.kernel.org/r/
90780f5a6b974ee9a4f9f9f2580fc83ef6bdd805.camel@baylibre.com

In a nutshell, I numbered nodes (w/o a reg prop) to keep generic names as
suggested in the DT spec.

The idea came after working on sound cards, if you check
Documentation/devicetree/bindings/sound/simple-card.txt, you'll see this kind of
numbering is even in documentation examples.

This is used by arch/arm/boot/dts/armada-370-db.dts. This is just an example I
picked randomly, I'm not trying to single out the marvell folks here (or ASoC
simple card). I'm actually doing exactly the same kind of multi link stuff on
the amlogic cards.

This looks to be a wide spread practice. Running `make dtbs W=1` on ARM and
ARM64 arch, I've seen dozen of 'node has a unit name, but no reg property'
examples, on things like clocks, buttons, leds, pinctrl, etc ...

that being said, section 2.2.1 of the DT specs says:

" If the node has no reg property, the @unit-address must be omitted and the
node-name alone differentiates the node from other nodes at the same level in
the tree "

So apparently, this is used but not ok ?
Maybe we should simply replace the '@' with a '-' everywhere this occurs ?

If possible, I'd like to get the opinion of the DT gurus about this issue.
Cheers

Jerome



WARNING: multiple messages have this Message-ID (diff)
From: jbrunet@baylibre.com (Jerome Brunet)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec
Date: Mon, 03 Sep 2018 11:57:25 +0200	[thread overview]
Message-ID: <b0efc5cf9cf4f7e05097fcd0ea6fd61ba8ff3476.camel@baylibre.com> (raw)
In-Reply-To: <CAOMZO5BOMOB6LaRs1fnmm-Ghu7pMkXW=sH_NOEWK3pqHAbUMCg@mail.gmail.com>

On Sat, 2018-09-01 at 18:24 -0300, Fabio Estevam wrote:
> Hi Jerome,
> 
> On Fri, Aug 31, 2018 at 12:02 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > There are 7 digital mics on the MIC daughter board attached
> > to the s400 board, so add the digital microphone codec to
> > its DTS
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > index ff64c429d432..f3e16cbbc61e 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > @@ -86,6 +86,15 @@
> >                 sound-name-prefix = "DIT";
> >         };
> > 
> > +       dmics: audio-codec at 3 {
> 
> You pass @3 without a corresponding reg = <3>, which causes dtc
> warnings with W=1.

Hi Fabio,

Thanks for pointing this out.
Martin also raised concerns about this but, unfortunately, we did not get to the
bottom of it:

https://lkml.kernel.org/r/
90780f5a6b974ee9a4f9f9f2580fc83ef6bdd805.camel at baylibre.com

In a nutshell, I numbered nodes (w/o a reg prop) to keep generic names as
suggested in the DT spec.

The idea came after working on sound cards, if you check
Documentation/devicetree/bindings/sound/simple-card.txt, you'll see this kind of
numbering is even in documentation examples.

This is used by arch/arm/boot/dts/armada-370-db.dts. This is just an example I
picked randomly, I'm not trying to single out the marvell folks here (or ASoC
simple card). I'm actually doing exactly the same kind of multi link stuff on
the amlogic cards.

This looks to be a wide spread practice. Running `make dtbs W=1` on ARM and
ARM64 arch, I've seen dozen of 'node has a unit name, but no reg property'
examples, on things like clocks, buttons, leds, pinctrl, etc ...

that being said, section 2.2.1 of the DT specs says:

" If the node has no reg property, the @unit-address must be omitted and the
node-name alone differentiates the node from other nodes at the same level in
the tree "

So apparently, this is used but not ok ?
Maybe we should simply replace the '@' with a '-' everywhere this occurs ?

If possible, I'd like to get the opinion of the DT gurus about this issue.
Cheers

Jerome

WARNING: multiple messages have this Message-ID (diff)
From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec
Date: Mon, 03 Sep 2018 11:57:25 +0200	[thread overview]
Message-ID: <b0efc5cf9cf4f7e05097fcd0ea6fd61ba8ff3476.camel@baylibre.com> (raw)
In-Reply-To: <CAOMZO5BOMOB6LaRs1fnmm-Ghu7pMkXW=sH_NOEWK3pqHAbUMCg@mail.gmail.com>

On Sat, 2018-09-01 at 18:24 -0300, Fabio Estevam wrote:
> Hi Jerome,
> 
> On Fri, Aug 31, 2018 at 12:02 PM, Jerome Brunet <jbrunet@baylibre.com> wrote:
> > There are 7 digital mics on the MIC daughter board attached
> > to the s400 board, so add the digital microphone codec to
> > its DTS
> > 
> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> > ---
> >  arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > index ff64c429d432..f3e16cbbc61e 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > @@ -86,6 +86,15 @@
> >                 sound-name-prefix = "DIT";
> >         };
> > 
> > +       dmics: audio-codec at 3 {
> 
> You pass @3 without a corresponding reg = <3>, which causes dtc
> warnings with W=1.

Hi Fabio,

Thanks for pointing this out.
Martin also raised concerns about this but, unfortunately, we did not get to the
bottom of it:

https://lkml.kernel.org/r/
90780f5a6b974ee9a4f9f9f2580fc83ef6bdd805.camel at baylibre.com

In a nutshell, I numbered nodes (w/o a reg prop) to keep generic names as
suggested in the DT spec.

The idea came after working on sound cards, if you check
Documentation/devicetree/bindings/sound/simple-card.txt, you'll see this kind of
numbering is even in documentation examples.

This is used by arch/arm/boot/dts/armada-370-db.dts. This is just an example I
picked randomly, I'm not trying to single out the marvell folks here (or ASoC
simple card). I'm actually doing exactly the same kind of multi link stuff on
the amlogic cards.

This looks to be a wide spread practice. Running `make dtbs W=1` on ARM and
ARM64 arch, I've seen dozen of 'node has a unit name, but no reg property'
examples, on things like clocks, buttons, leds, pinctrl, etc ...

that being said, section 2.2.1 of the DT specs says:

" If the node has no reg property, the @unit-address must be omitted and the
node-name alone differentiates the node from other nodes at the same level in
the tree "

So apparently, this is used but not ok ?
Maybe we should simply replace the '@' with a '-' everywhere this occurs ?

If possible, I'd like to get the opinion of the DT gurus about this issue.
Cheers

Jerome

  reply	other threads:[~2018-09-03  9:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 15:02 [PATCH 0/3] arm64: dts: meson-axg: add pdm support Jerome Brunet
2018-08-31 15:02 ` Jerome Brunet
2018-08-31 15:02 ` Jerome Brunet
2018-08-31 15:02 ` [PATCH 1/3] arm64: dts: meson-axg: add pdm Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-08-31 15:02 ` [PATCH 2/3] arm64: dts: meson-axg: s400: add dmic codec Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-09-01 21:24   ` Fabio Estevam
2018-09-01 21:24     ` Fabio Estevam
2018-09-01 21:24     ` Fabio Estevam
2018-09-03  9:57     ` Jerome Brunet [this message]
2018-09-03  9:57       ` Jerome Brunet
2018-09-03  9:57       ` Jerome Brunet
2018-09-03  9:57       ` Jerome Brunet
2018-08-31 15:02 ` [PATCH 3/3] arm64: dts: meson-axg: s400: add pdm to the sound card Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-08-31 15:02   ` Jerome Brunet
2018-09-13  4:52 ` [PATCH 0/3] arm64: dts: meson-axg: add pdm support Kevin Hilman
2018-09-13  4:52   ` Kevin Hilman
2018-09-13  4:52   ` Kevin Hilman

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=b0efc5cf9cf4f7e05097fcd0ea6fd61ba8ff3476.camel@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=carlo@caione.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.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.