devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
Cc: eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Haojian Zhuang
	<haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: Re: [PATCH 3/7] ARM: mmp: support DT on both dkb and brownstone
Date: Tue, 19 Jul 2011 13:49:44 -0600	[thread overview]
Message-ID: <20110719194944.GM6848@ponder.secretlab.ca> (raw)
In-Reply-To: <4E2589C8.8010604-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>

On Tue, Jul 19, 2011 at 09:42:32PM +0800, Mitch Bradley wrote:
> Thanks for doing this work.  I'm currently working on a One Laptop
> Per Child product that is based on the Armada 610, so this very
> timely for OLPC.
> 
> See my in-line comments on the specification of the soc top-level
> nodes, related to the addressing of their children, and on the
> presence of "#address-cells" and "#size-cells" in the intc nodes.
> 
> -- Mitch Bradley
> 
> On 7/19/2011 10:24 AM, Haojian Zhuang wrote:
> >Add new boards.c to support both TTC-DKB and MMP2-BROWNSTONE. While
> >CONFIG_MMP_USE_OF is selected, original ttc_dkb.c and brownstone.c won't be
> >compiled.
> >
> >While everything moving to DT in ARCH-MMP, original ttc_dkb.c and brownstone.c
> >will be abandoned.
> >
> >Signed-off-by: Haojian Zhuang<haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> >---
> >  .../devicetree/bindings/arm/marvell/boards.txt     |    7 +
> >  arch/arm/boot/dts/mmp2-brownstone.dts              |  242 ++++++++++++++++++++
> >  arch/arm/boot/dts/ttc-dkb.dts                      |   80 +++++++
> >  arch/arm/mach-mmp/Makefile                         |    4 +
> >  arch/arm/mach-mmp/boards.c                         |  159 +++++++++++++
> >  5 files changed, 492 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/arm/marvell/boards.txt
> >  create mode 100644 arch/arm/boot/dts/mmp2-brownstone.dts
> >  create mode 100644 arch/arm/boot/dts/ttc-dkb.dts
> >  create mode 100644 arch/arm/mach-mmp/boards.c
> >
> >diff --git a/Documentation/devicetree/bindings/arm/marvell/boards.txt b/Documentation/devicetree/bindings/arm/marvell/boards.txt
> >new file mode 100644
> >index 0000000..219e134
> >--- /dev/null
> >+++ b/Documentation/devicetree/bindings/arm/marvell/boards.txt
> >@@ -0,0 +1,7 @@
> >+TTC(pxa910) "DKB" evalutation board
> >+Required root node properties:
> >+	- compatible = "mrvl,ttc-dkb", "mrvl,pxa910-dkb";
> >+
> >+mmp2(armada610) "Brownstone" evalutation board
> >+Required root node properties:
> >+	- compatible = "mrvl,mmp2-brownstone", "mrvl,armada610-brownstone";
> >diff --git a/arch/arm/boot/dts/mmp2-brownstone.dts b/arch/arm/boot/dts/mmp2-brownstone.dts
> >new file mode 100644
> >index 0000000..4e14388
> >--- /dev/null
> >+++ b/arch/arm/boot/dts/mmp2-brownstone.dts
> >@@ -0,0 +1,242 @@
> >+/dts-v1/;
> >+
> >+/include/ "skeleton.dtsi"
> >+
> >+/ {
> >+	model = "Marvell MMP2 Brownstone";
> >+	compatible = "mrvl,mmp2-brownstone", "mrvl,armada610-brownstone";
> >+
> >+	memory {
> >+		reg =<0x00000000 0x20000000>;
> >+	};
> >+
> >+	chosen {
> >+		bootargs = "console=ttyS2,38400 root=/dev/nfs nfsroot=192.168.1.100:192.168.1.101::255.255.255.0::eth0:on";
> >+		linux,stdout-path =&uart2;
> >+	};
> >+
> >+	soc@d4000000 {
> >+		compatible = "mrvl,mmp2", "mrvl,armada610", "simple-bus";
> >+		device_type = "soc";
> 
> Can someone comment on the use of "device_type" here?  I thought
> that device_type was deprecated.  Is there some residual use for it
> in Linux?

It is, and device_type should be removed for .dts files.

> 
> >+		#address-cells =<1>;
> >+		#size-cells =<1>;
> >+		ranges;
> 
> This way of addressing of APB and AXI devices would work, in that
> the empty ranges property specifies no address translation across
> the "soc" node.  However, in a case like this, it is unclear to me
> why you need an "soc" node at all.  The "soc" node appears to have
> no semantics.  You could just move all the subordinate devices up a
> level, making them direct children of the root node.  As I
> understand it, the Linux kernel no longer has a problem with devices
> being directly attached to the root node.
> 
> If you want to have a bus node at this level, I think it's best to
> go all the way and define it as an AXI/APB bus, exposing some of the
> addressing semantics of that kind of bus.  See below for an
> exploration of how that might work, in the comments for the ttc-dkb
> "soc" node.
> 
> >+
> >+		mmp_intc: interrupt-controller@d4282000 {
> >+			compatible = "mrvl,mmp-intc";
> >+			#address-cells =<1>;
> >+			#size-cells =<1>;
> 
> I believe that this node should not have "#address-cells" and
> "#size-cells" properties.  Such properties apply to nodes that have
> child nodes, expressing how those children are addressed.  I think
> that the interrupt controller is not intended to have child nodes.

I agree

  parent reply	other threads:[~2011-07-19 19:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2011071901>
2011-07-19  2:24 ` [PATCH 0/7] support DT on ARCH-MMP Haojian Zhuang
     [not found]   ` <1311042290-20253-1-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24     ` [PATCH 1/7] ARM: mmp: parse irq from DT Haojian Zhuang
     [not found]       ` <1311042290-20253-2-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24         ` [PATCH 2/7] ARM: mmp: append MMP_USE_OF config Haojian Zhuang
     [not found]           ` <1311042290-20253-3-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24             ` [PATCH 3/7] ARM: mmp: support DT on both dkb and brownstone Haojian Zhuang
     [not found]               ` <1311042290-20253-4-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24                 ` [PATCH 4/7] tty: serial: support device tree in pxa Haojian Zhuang
     [not found]                   ` <1311042290-20253-5-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24                     ` [PATCH 5/7] tty: serial: check ops before registering console Haojian Zhuang
     [not found]                       ` <1311042290-20253-6-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24                         ` [PATCH 6/7] i2c: pxa: support i2c controller from DT Haojian Zhuang
     [not found]                           ` <1311042290-20253-7-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19  2:24                             ` [PATCH 7/7] i2c: pxa: support to parse property Haojian Zhuang
     [not found]                               ` <1311042290-20253-8-git-send-email-haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2011-07-19 10:17                                 ` Eric Miao
     [not found]                                   ` <CAMPhdO-qjR0LSjvMm7hbdqZyrFxa5S8JVa1FO8sDsxOdyUV9Ng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-19 19:47                                     ` Grant Likely
2011-07-19 19:45                                 ` Grant Likely
     [not found]                                   ` <20110719194550.GK6848-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-20  1:22                                     ` Eric Miao
2011-07-19 19:43                             ` [PATCH 6/7] i2c: pxa: support i2c controller from DT Grant Likely
2011-07-19 19:40                     ` [PATCH 4/7] tty: serial: support device tree in pxa Grant Likely
2011-07-19 19:48                       ` Arnd Bergmann
2011-07-19 19:53                         ` Grant Likely
     [not found]                           ` <CACxGe6u1Pq990opdt7irttuY1OvpZVNXSM11cLdqo5zN8YpYeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-19 20:05                             ` Russell King - ARM Linux
2011-07-19 20:17                               ` Arnd Bergmann
     [not found]                               ` <20110719200515.GB308-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-07-20  1:26                                 ` Eric Miao
2011-07-19 13:42                 ` [PATCH 3/7] ARM: mmp: support DT on both dkb and brownstone Mitch Bradley
     [not found]                   ` <4E2589C8.8010604-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2011-07-19 19:49                     ` Grant Likely [this message]
2011-07-19 19:36                 ` Grant Likely
2011-07-19 19:24             ` [PATCH 2/7] ARM: mmp: append MMP_USE_OF config Grant Likely
2011-07-19 17:39         ` [PATCH 1/7] ARM: mmp: parse irq from DT Grant Likely
2011-07-19  7:12   ` [PATCH 0/7] support DT on ARCH-MMP Jean Delvare

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=20110719194944.GM6848@ponder.secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=haojian.zhuang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).