linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Wolfgang Grandegger" <wg@grandegger.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: FDT bindings for I2C devices
Date: Fri, 19 Oct 2007 08:38:09 -0600	[thread overview]
Message-ID: <fa686aa40710190738q1211a266lced10ac8767e5071@mail.gmail.com> (raw)
In-Reply-To: <4718BB40.2050901@grandegger.com>

On 10/19/07, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Hello,
>
> is it forseen to define and configure devices like RTC, temperature
> sensors or EEPROM on the I2C bus with the Flat Device Tree? If yes, how
> would the DTS entries look like?

booting-without-of.txt has some information about describing the controller.

Scott Wood made an attempt at defining a device binding for I2C
devices, but it has not been merged into booting-without-of.txt yet.
I've copied what he wrote below.  I would add to his definition the
following:
- If compatible is missing, driver should *not* fall back to the device name.
- 'compatible' list should include the exact device in the form "<mfg>,<part>"

Cheers,
g.

Here's the thread and an excerpt from Scott's original post:

http://patchwork.ozlabs.org/linuxppc/patch?id=11223

+   e2) I2C Devices
+
+   Required properties :
+
+    - reg : Unshifted 7-bit I2C address for the device
+
+   Recommended properties :
+
+    - compatible : The name of the Linux device driver that
+      handles this device.  If unspecified, the name of the
+      node will be used.
+    - interrupts : <a b> where a is the interrupt number and b is a
+      field that represents an encoding of the sense and level
+      information for the interrupt.  This should be encoded based on
+      the information in section 2) depending on the type of interrupt
+      controller you have.
+    - interrupt-parent : the phandle for the interrupt controller that
+      services interrupts for this device.
+
+   Example :
+
+       rtc@68 {
+               device_type = "rtc";
+               compatible = "ds1374";
+               reg = <68>;
+               interrupts = <13 8>;
+               interrupt-parent = <700>;
+       };

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-10-19 14:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 14:12 FDT bindings for I2C devices Wolfgang Grandegger
2007-10-19 14:38 ` Grant Likely [this message]
2007-10-19 19:56   ` Guennadi Liakhovetski
2007-10-21 12:19     ` Wolfgang Grandegger
2007-10-23 18:30   ` Scott Wood
2007-10-23 18:50     ` 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=fa686aa40710190738q1211a266lced10ac8767e5071@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=wg@grandegger.com \
    /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).