linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2 v5] arm: kirkwood: add dreamplug (fdt) support.
Date: Thu, 23 Feb 2012 14:21:15 -0700	[thread overview]
Message-ID: <CACxGe6uMcOWC6ukTGF1soyfeTkT2fkmewhKUKA-AiK8hQDzCGQ@mail.gmail.com> (raw)
In-Reply-To: <20120223211138.GP23524@titan.lakedaemon.net>

On Thu, Feb 23, 2012 at 2:11 PM, Jason <jason@lakedaemon.net> wrote:
> On Thu, Feb 23, 2012 at 01:18:55PM -0700, Grant Likely wrote:
>> On Thu, Feb 23, 2012 at 12:52 PM, Jason Cooper <jason@lakedaemon.net> wrote:
>> > Initially, copied guruplug-setup.c and did s/guruplug/dreamplug/g.
>> > Then, switched to SPI based NOR flash.
>> >
>> > After talking to Arnd Bergman, chose an incremental approach to adding
>> > devicetree support. ?First, we use the dtb to tell us we are on the
>> > dreamplug, then we gradually port over drivers.
>> >
>> > Driver porting will start with the uart (see next patch), and progress
>> > from there. ?Possibly, spi/flash/partitions will be next.
>> >
>> > When done, board-dt.c will no longer be dreamplug specific, and dt's can
>> > be made for the other kirkwood boards.
>> >
>> > Signed-off-by: Jason Cooper <jason@lakedaemon.net>
>> > ---
>> > Changes from v1
>> >
>> > ? - attempting dts, looking for pointers.
>> >
>> > Changes from v2
>> >
>> > ? - resubmit as MACH_TYPE_DREAMPLUG (3550) is in arm/for-next, rebased
>> > ? ? against same.
>> > ? - removed lame fdt attempt, others are working on kirkwood fdt. ?Will
>> > ? ? convert once kirkwood fdt is mainline.
>> > ? - s/boot_params/atag_offset/
>> > ? - added kirkwood_reset
>> > ? - 1 checkpatch.pl warning (help in Kconfig), looks the same as all
>> > ? ? other kirkwood boards...
>> >
>> > Changes from v3
>> >
>> > ? - rebased against v3.3-rc3 (recommended by Arnd)
>> > ? - use devicetree to determine which board we are on
>> > ? - added patch to configure uart0 from devicetree
>> >
>> > Changes from v4
>> >
>> > ? - fixed Kconfig logic so user can always see 'Dreamplug' in menuconfig.
>> > ? - changed 'marvell,dreamplug' to 'globalscale,dreamplug' as suggested by
>> > ? ? Grant Likely.
>> > ? - fixed of_machine_is_compatible() logic for calling dreamplug specific
>> > ? ? init functions.
>> >
>> > ?arch/arm/boot/dts/kirkwood-dreamplug.dts | ? 18 +++
>> > ?arch/arm/boot/dts/kirkwood.dtsi ? ? ? ? ?| ? ?6 +
>> > ?arch/arm/mach-kirkwood/Kconfig ? ? ? ? ? | ? 14 +++
>> > ?arch/arm/mach-kirkwood/Makefile ? ? ? ? ?| ? ?1 +
>> > ?arch/arm/mach-kirkwood/Makefile.boot ? ? | ? ?2 +
>> > ?arch/arm/mach-kirkwood/board-dt.c ? ? ? ?| ?182 ++++++++++++++++++++++++++++++
>> > ?6 files changed, 223 insertions(+), 0 deletions(-)
>> > ?create mode 100644 arch/arm/boot/dts/kirkwood-dreamplug.dts
>> > ?create mode 100644 arch/arm/boot/dts/kirkwood.dtsi
>> > ?create mode 100644 arch/arm/mach-kirkwood/board-dt.c
>> >
>> > diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
>> > new file mode 100644
>> > index 0000000..765813f
>> > --- /dev/null
>> > +++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
>> > @@ -0,0 +1,18 @@
>> > +/dts-v1/;
>> > +
>> > +/include/ "kirkwood.dtsi"
>> > +
>> > +/ {
>> > + ? ? ? model = "Globalscale Technologies Dreamplug";
>> > + ? ? ? compatible = "globalscale,dreamplug", "globalscale,kirkwood";
>>
>> Hahaha... okay, more clarification is needed here.
>>
>> The compatible property is a list, and the first entry must always be
>> the exact device model. ?That is why the vendor of the hardware is in
>> the prefix. ?However, the following entries are a list of devices that
>> it is 'compatible' with. ?In the case of the top-level compatible
>> property, we've been using the convention of including a string for
>> the SoC, and in that case the manufacturer is indeed Marvell.
>>
>> Also, *be specific*. ?Kirkwood is a family of processors, not a single
>> SoC. ?The compatible string should reflect that. ?So, in your case,
>> compatible should look something like:
>>
>> compatible = "globalscale,dreamplug", "marvell,kirkwood-88f6281";
>
> ahhh... ok. ?So, my board-dt.c should have:
>
> static const char *kirkwood_dt_board_compat[] = {
> ? ? ? ?"marvell,kirkwood",
> ? ? ? ?NULL
> };
>
> And then the test to run the dreamplug specific init should be:
>
> ? ? ? ?if (of_machine_is_compatible("globalscale,dreamplug"))
> ? ? ? ? ? ? ? ?dreamplug_init();
>
> And then, kirkwood.dtsi:
>
> compatible = "marvell,kirkwood";
>
> and kirkwood-dreamplug.dts:
>
> compatible = "globalscale,dreamplug", "marvell,kirkwood-88f6281-a1";
>
>
> My only question is, should the kirkwood.dtsi have just
> "marvell,kirkwood", or "marvell,kirkwood","marvell,kirkwood-88f6281-a1"?

Fix the order.  The list is ordered from most specific to least.
Also, if the silicon revision can be read out of the SoC at runtime,
then including the -a1 revision is probably overkill.

So, something like the following is fine:

compatible = "globalscale,dreamplug", "marvell,kirkwood-88f6281",
"marvell,kirkwood";

BTW, does the dreamplug have a part number?

>
> I'm guessing kirkwood.dtsi is a generic devicetree, and should just be
> "marvell,kirkwood". ?If that's true, then *kirkwood_dt_board_compat
> should just be "marvell,kirkwood" since board-dt.c should be able to
> handle any kirkwood SoC.
>
> Sorry for being so dense.
>
> thx,
>
> Jason.



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2012-02-23 21:21 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-09 16:47 [PATCH 0/3 v2] RFC: marvell dreamplug dft support Jason Cooper
2011-08-09 16:47 ` [PATCH 1/3 v2] RFC: arm/kirkwood: TEMP hack till mach-types is updated Jason Cooper
2012-02-23  1:46   ` Grant Likely
2012-02-23  1:48   ` Grant Likely
2011-08-09 16:47 ` [PATCH 2/3 v2] RFC: arm/kirkwood: add dreamplug support Jason Cooper
2011-08-09 17:25   ` Arnaud Patard (Rtp)
2011-08-09 18:10     ` Jason
2011-08-10 14:31   ` Arnd Bergmann
2011-08-09 16:47 ` [PATCH 3/3 v2] RFC: arm: kirkwood: dreamplug fdt support Jason Cooper
2011-12-07 19:40 ` [PATCH V3] arm: kirkwood: add dreamplug support Jason Cooper
2012-02-22 19:18 ` [PATCH 0/3 v4] arm: kirkwood: add dreamplug/devicetree support Jason Cooper
2012-02-22 19:18   ` [PATCH 1/3] arm: ignore devicetree blobs Jason Cooper
2012-02-22 20:38     ` Arnd Bergmann
2012-02-22 22:26     ` Uwe Kleine-König
2012-02-23  9:16       ` Dave Martin
2012-02-23 15:56         ` Jason
2012-02-22 19:18   ` [PATCH 2/3 v4] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
2012-02-22 20:46     ` Arnd Bergmann
2012-02-22 21:17       ` Nicolas Pitre
2012-02-23  3:19     ` Rob Herring
2012-02-23  7:34       ` Arnd Bergmann
2012-02-23 16:12         ` Jason
2012-02-23 18:56           ` Grant Likely
2012-02-23 19:00             ` Jason
2012-02-22 19:18   ` [PATCH 3/3] arm: kirkwood: convert uart0 to devicetree Jason Cooper
2012-02-22 20:55     ` Arnd Bergmann
2012-02-22 21:09       ` Jason
2012-02-23 19:52 ` [PATCH 0/2 v5] arm: kirkwood: add dreamplug/devicetree support Jason Cooper
2012-02-23 19:52   ` [PATCH 1/2 v5] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
2012-02-23 20:18     ` Grant Likely
2012-02-23 21:11       ` Jason
2012-02-23 21:21         ` Grant Likely [this message]
2012-02-24 14:35           ` Jason
2012-02-24 19:36           ` Jason
2012-02-23 19:52   ` [PATCH 2/2 v2] arm: kirkwood: convert uart0 to devicetree Jason Cooper
2012-02-26 11:00   ` [PATCH 0/2 v5] arm: kirkwood: add dreamplug/devicetree support Ian Campbell
2012-02-27 14:57     ` Jason
2012-02-28  7:20       ` Ian Campbell
2012-02-27 16:07 ` [PATCH 0/2 v6] " Jason Cooper
2012-02-27 16:07   ` [PATCH 1/2 v6] arm: kirkwood: add dreamplug (fdt) support Jason Cooper
2012-02-27 16:07   ` [PATCH 2/2 v2] arm: kirkwood: convert uart0 to devicetree Jason Cooper
2012-02-27 16:29   ` [PATCH 0/2 v6] arm: kirkwood: add dreamplug/devicetree support Arnd Bergmann
2012-02-27 17:31     ` Jason

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=CACxGe6uMcOWC6ukTGF1soyfeTkT2fkmewhKUKA-AiK8hQDzCGQ@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --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;
as well as URLs for NNTP newsgroup(s).