linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: linuxppc-dev@ozlabs.org
Subject: How to describe FPGA-based devices in the device tree ?
Date: Mon, 18 Feb 2008 13:43:52 +0100	[thread overview]
Message-ID: <200802181343.54989.laurentp@cse-semaphore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2664 bytes --]

Hi everybody,

I'm (at last) trying to move from ARCH=ppc to ARCH=powerpc. After reading 
Documentation/powerpc/booting-without-of.txt and various device trees in 
arch/powerpc/boot/dts, I still don't know how to express some devices in the 
device tree.

The target board has several devices on the processor local bus, as described 
in the following device tree fragment.

        localbus@f0010100 {
                compatible = "fsl,mpc8260-localbus",
                             "fsl,pq2-localbus";
                #address-cells = <2>;
                #size-cells = <1>;
                reg = <f0010100 60>;

                ranges = <0 0 40000000 01000000
                          2 0 f2000000 00100000
                          3 0 f3000000 00100000
                          4 0 f4000000 00100000>;

                flash@0,0 {
                        compatible = "cfi-flash";
                        reg = <0 0 01000000>;
                        bank-width = <2>;
                };

                nvram@2,0 {
                        compatible = "mtd-ram";
                        reg = <2 0 00100000>;
                        bank-width = <2>;
                };

                bcsr@3,0 {
                        device_type = "board-control";
                        reg = <3 0 00000020>;
                };

                fpga@4,0 {
                        reg = <4 0 00010000>;
                };
        };

The fourth device is a FPGA that contains several IP cores such as an 
interrupt controller and a SD/MMC host controller. If I understand things 
correctly, each IP core should have its own node in the device tree to allow 
proper binding with device drivers. As booting-without-of.txt describes the 
localbus node ranges as corresponding to a single chipselect and covering the 
entire chipselect access window, I can't have nodes for each IP core as 
children of the localbus node.

Should I put IP core nodes as children of the FPGA node ? If so, how do I map 
addresses at the FPGA level ? A ranges property in the FPGA node would let me 
map addresses in the FPGA scope to the localbus scope. However, as the 
localbus scope use the chipselect number as its first address cell and 0 as 
its second address cell, I don't see how I could translate offsets in the 
FPGA into an address at the localbus scope.

Could anyone advice me regarding how to properly describe my hardware in the 
device tree ?

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 12:43 Laurent Pinchart [this message]
2008-02-18 17:47 ` How to describe FPGA-based devices in the device tree ? Scott Wood
2008-02-18 18:30   ` Grant Likely

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=200802181343.54989.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.com \
    --cc=linuxppc-dev@ozlabs.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).