linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: "Németh Márton" <nm127@freemail.hu>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)
Date: Fri, 12 Mar 2010 05:14:56 -0700	[thread overview]
Message-ID: <fa686aa41003120414j48825e7cr952336703fe03b04@mail.gmail.com> (raw)
In-Reply-To: <4B99DE95.8010304@freemail.hu>

2010/3/11 N=E9meth M=E1rton <nm127@freemail.hu>:
> Hi,
>
> thank you for the comments, I reworked the Freescale MPC5554 device tree
> accordingly. I'm listening for comments on this draft.
>
> Regards,
>
> =A0 =A0 =A0 =A0M=E1rton N=E9meth
>
> ---
> From: M=E1rton N=E9meth <nm127@freemail.hu>
>
> Add device tree for Freescale MPC5554.
>
> Signed-off-by: M=E1rton N=E9meth <nm127@freemail.hu>
> ---
> diff -uprN linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts linux/arch=
/powerpc/boot/dts/mpc5554.dts
> --- linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 1970-01-01 01:00:=
00.000000000 +0100
> +++ linux/arch/powerpc/boot/dts/mpc5554.dts =A0 =A0 2010-03-12 07:22:37.0=
00000000 +0100
> @@ -0,0 +1,189 @@
> +/*
> + * Freescale MPC5554 Device Tree Source
> + *
> + * Based on MPC5553/5554 Microcontroller Reference Manual, Rev. 4.0, 04/=
2007
> + * http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_R=
M.pdf
> + *
> + * Copyright 2010 M=E1rton N=E9meth
> + * M=E1rton N=E9meth <nm127@freemail.hu>
> + *
> + * This program is free software; you can redistribute =A0it and/or modi=
fy it
> + * under =A0the terms of =A0the GNU General =A0Public License as publish=
ed by the
> + * Free Software Foundation; =A0either version 2 of the =A0License, or (=
at your
> + * option) any later version.
> + */
> +
> +/dts-v1/;
> +
> +/ {
> + =A0 =A0 =A0 model =3D "MPC5554";
> + =A0 =A0 =A0 compatible =3D "fsl,MPC5554EVB"; =A0 =A0 =A0 =A0 =A0// Free=
scale MPC5554 Evaluation Board
> + =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 #size-cells =3D <1>;

also need: interrupt-parent =3D <&intc>;

I describe why later...

> +
> + =A0 =A0 =A0 cpus {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <0>;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 cpu@0 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 device_type =3D "cpu";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "PowerPC,555=
4";

I'd rather see the same convention used here as for all the other
compatible values in this file.  ie:

compatible =3D "fsl,mpc5554-e200z6", "fsl,powerpc-e200z6";

Dave, what do you think?

> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 d-cache-line-size =3D <32>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i-cache-line-size =3D <32>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 d-cache-size =3D <0x8000>; =
=A0 =A0 =A0 =A0// L1, 32KiB
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i-cache-size =3D <0x8000>; =
=A0 =A0 =A0 =A0// L1, 32KiB
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 timebase-frequency =3D <0>;=
 =A0 =A0 =A0 // from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bus-frequency =3D <0>; =A0 =
=A0 =A0 =A0 =A0 =A0// from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 clock-frequency =3D <0>; =
=A0 =A0 =A0 =A0 =A0// from bootloader
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> + =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 memory@40000000 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 device_type =3D "memory";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x40000000 0x10000>; =A0 =A0 // 32=
KiB internal SRAM
> + =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 xbar@fff04000 { =A0 =A0 =A0 =A0 // System Bus Crossbar Swit=
ch (XBAR)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5554-xbar";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 // The full memory range is covered by XBAR
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <>;

An empty ranges property looks like this:

ranges;

> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bridge@fff00000 {
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc5554=
-pbridge-b";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <1>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ranges =3D <0 0xe0000000 0x=
20000000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0xfff00000 0x4000>=
;
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ecsm@fff40000 { =A0 =A0 =A0=
 =A0 // Error Correction Status Module (ECSM)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-ecsm";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff40000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 edma@fff44000 { =A0 =A0 =A0=
 =A0 // Enhanced DMA Controller (eDMA)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-edma";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff44000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };
> +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 intc@fff48000 { =A0 =A0 =A0=
 =A0 // Interrupt Controller (INTC)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =
=3D "fsl,mpc5554-intc";
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x=
fff48000 0x4000>;
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 };

Need a label on this node so that the rest of the tree can find it,
and it needs the interrupt-controller and #interrupt-cells properties:

                       intc: intc@fff48000 {         // Interrupt
Controller (INTC)
                               compatible =3D "fsl,mpc5554-intc";
                               interrupt-controller;
                               #interrupt-cells =3D <2>;
                               reg =3D <0xfff48000 0x4000>;
                       };

I've set #interrupt-cells to 2 which is fairly typical on fsl parts,
but that may or may not make sense.  You need to decide how each
device is going to specify it's interrupt line.  Often the first cell
is the hardware interrupt number, and the second cell encodes the
sense (high, low, edge).  Conversely, PCI interrupts only use
#interrupt-cells =3D <1> because all PCI irqs use the active low sense.

Then, each device in the tree should have an 'interrupts =3D < [hwirq#]
[sense]>;' property.

Otherwise, starting to look pretty good.

g.

  reply	other threads:[~2010-03-12 12:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-07  6:50 cross-compiling Linux for PowerPC e200 core? Németh Márton
2010-03-08 17:34 ` Grant Likely
2010-03-08 18:44   ` Németh Márton
2010-03-08 19:08     ` Grant Likely
2010-03-09  7:02       ` Németh Márton
2010-03-09  7:35         ` Grant Likely
2010-03-11  6:11           ` Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?) Németh Márton
2010-03-11  6:23             ` David Gibson
2010-03-12  6:26               ` Németh Márton
2010-03-12 12:14                 ` Grant Likely [this message]
2010-03-12 22:36                   ` David Gibson
2010-03-12 23:04                     ` Grant Likely
2010-03-13  3:22                       ` Segher Boessenkool
2010-03-13  3:21                     ` Segher Boessenkool
2010-03-13 11:59                   ` Németh Márton
2010-03-17 18:12                     ` Németh Márton
2010-03-17 19:02                     ` Grant Likely
2010-03-22  6:28                       ` Németh Márton
2010-03-22 14:59                         ` Grant Likely
2010-03-23  5:45                           ` Németh Márton
2010-03-30  6:54                       ` Németh Márton
2010-03-08 17:47 ` cross-compiling Linux for PowerPC e200 core? Segher Boessenkool
2010-03-08 18:49   ` Németh Márton
2010-03-08 20:41     ` Segher Boessenkool
     [not found]     ` <53452.84.105.60.153.1268080871.squirrel__48847.2990495667$1268080944$gmane$org@gate.crashing.org>
2010-03-09 14:24       ` Detlev Zundel

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=fa686aa41003120414j48825e7cr952336703fe03b04@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nm127@freemail.hu \
    /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).