devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: "Mr. Robert G Palmer Jr."
	<robert.palmer-yOrjPonjKN58UrSeD/g0lQ@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: Testing a OF Device Tree driver on a kernel using a board file.
Date: Thu, 27 Jun 2013 23:07:35 +0100	[thread overview]
Message-ID: <CACxGe6tUgUaKtfgGpD4He++mZ5WxGmPDL-SoF5gJKLOtCpACFA@mail.gmail.com> (raw)
In-Reply-To: <F14D68B9-D4F3-4185-BF5A-833780FFCEFC-yOrjPonjKN58UrSeD/g0lQ@public.gmane.org>

On Thu, Jun 27, 2013 at 9:22 PM, Mr. Robert G Palmer Jr.
<robert.palmer-yOrjPonjKN58UrSeD/g0lQ@public.gmane.org> wrote:
> I apologize up front if this is the wrong place for these questions.  I'm
> relatively new to the OF Device Tree.  If this is the wrong place, would
> someone point me to the correct discussion location.
>
> 1. Is it possible to take an existing kernel build that uses a board file
> move only a small portion into a Device Tree.  I am working on converting a
> driver from supporting only the board file to supporting both the board file
> and the OF Device Tree.  Unfortunately, the only test platform I have with
> the appropriate hardware is a Nexus7 and I'm using the Cyanogenmod build.
> This uses (or at least appears to use) a board file for the Nexus7.  Is it
> possible to write a small Device Tree description for only the driver I am
> working on?  Where would this device tree file be placed? How would I
> include it in the build? Any assistance and/or pointers would be
> appreciated.

Yes. Enable CONFIG_OF and add a dt_compat pointer to the existing
nexus7 MACHINE_START() stanze. Then a trivial device tree with a
top-level compatible property that matches something in the dt_compat
table can be used to boot the platform.

arch/arm/mach-versatile/versatile_dt.c shows an example.

> 2. Are there any suggestions or hints for searching for OF Device Tree
> information.  The term "device tree" is used pervasively in the linux code
> and various projects to refer to source branches of a particular device type
> rather than the OF Device Tree.  This makes it extremely difficult to
> isolate applicable answers.

This link is useful:
http://devicetree.org/Device_Tree_Usage

Also, look at the files in Documentation/devicetree in the Linux kernel.

g.

      parent reply	other threads:[~2013-06-27 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 20:22 Testing a OF Device Tree driver on a kernel using a board file Mr. Robert G Palmer Jr.
     [not found] ` <F14D68B9-D4F3-4185-BF5A-833780FFCEFC-yOrjPonjKN58UrSeD/g0lQ@public.gmane.org>
2013-06-27 22:07   ` Grant Likely [this message]

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=CACxGe6tUgUaKtfgGpD4He++mZ5WxGmPDL-SoF5gJKLOtCpACFA@mail.gmail.com \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=robert.palmer-yOrjPonjKN58UrSeD/g0lQ@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).