public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: dts: meson: Adding hwrev syscon node
Date: Thu, 18 Feb 2016 13:43:01 +0100	[thread overview]
Message-ID: <4158343.mkrTsd5B4G@wuerfel> (raw)
In-Reply-To: <CABgxDo+oGe47hvxiCOAUWz8zfSeVONf=3pFm+=PbNsCbr_jTpg@mail.gmail.com>

On Thursday 18 February 2016 13:33:04 Romain Perier wrote:
> 2016-02-17 21:36 GMT+01:00 Carlo Caione <carlo@caione.org>:
> > On Wed, Feb 17, 2016 at 6:28 PM, Romain Perier <romain.perier@gmail.com> wrote:
> >> These are the CBUS registers used to retrieve the revision and the
> >> identifier of the SoC on Meson8.
> >>
> >> Signed-off-by: Romain Perier <romain.perier@gmail.com>
> >> ---
> >>  arch/arm/boot/dts/meson8b.dtsi | 5 +++++
> >>  1 file changed, 5 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
> >> index 0477a81..71009dc 100644
> >> --- a/arch/arm/boot/dts/meson8b.dtsi
> >> +++ b/arch/arm/boot/dts/meson8b.dtsi
> >> @@ -99,6 +99,11 @@
> >>                 };
> >>         };
> >>
> >> +       hwrev at c1107d4c {
> >> +               compatible = "amlogic,meson8b-hwrev", "syscon";
> >> +               reg = <0xc1107d4c 0x460>;
> >
> > Interesting. Where did you get 0x460?
> 
> Carlo, Arnd.
> 
> Well, what I did is the following :
> - CBUS_PHY_BASE is 0xc1100000   (CBUS is a larger block of registers,
> like slcr on zynq)
> - the serial is at CBUS_PHY_BASE + 0x7d4c
> - the revision is at CBUS_PHY_BASE + 0x81a8
> 
> So I decided to create a device_node for hw revision at 0xc1107d4c, in
> this case the lenght is 0x460...
> Am I wrong ?

Yes, you should describe the device that is actually there, which would be
something like

	cbus at c1100000 {
		compatible = "amlogic,meson8b-cbus", "syscon";
		reg = <0xc1100000 0x10000>; /* no idea what the length is, fix it */
	};

Don't just make things up because you happen to access them in a particular
way, but try to stay as close as you can to describing the actual hardware.

Please also check that the register ranges don't overlap with something
that might already be there, in case someone else made the same mistake.

	Arnd

  reply	other threads:[~2016-02-18 12:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 17:28 [PATCH 0/2] Adding support to show SoC revision in /proc/cpuinfo Romain Perier
2016-02-17 17:28 ` [PATCH 1/2] ARM: meson: Adding support to retrieve serial and SoC revision Romain Perier
2016-02-17 20:34   ` Carlo Caione
2016-02-18 12:20     ` Romain Perier
2016-02-18 12:24       ` Carlo Caione
2016-02-17 17:28 ` [PATCH 2/2] ARM: dts: meson: Adding hwrev syscon node Romain Perier
2016-02-17 20:36   ` Carlo Caione
2016-02-18 12:33     ` Romain Perier
2016-02-18 12:43       ` Arnd Bergmann [this message]
2016-02-18 14:14         ` Carlo Caione
2016-02-18 14:22           ` Arnd Bergmann
2016-02-18 21:04             ` Carlo Caione
2016-02-18 21:24               ` Carlo Caione
2016-02-18 21:27               ` Daniel Drake
2016-02-19 11:53                 ` Arnd Bergmann
2016-02-19 12:54                 ` Arnd Bergmann
2016-02-19 13:25                   ` Carlo Caione
2016-02-24 20:42                     ` Carlo Caione
2016-02-26 15:34                   ` Carlo Caione
2016-02-26 16:00                     ` Arnd Bergmann
2016-02-26 16:43                       ` Carlo Caione
2016-02-26 17:00                         ` Arnd Bergmann
2016-02-26 17:40                           ` Carlo Caione
2016-02-17 20:50   ` Arnd Bergmann

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=4158343.mkrTsd5B4G@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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