linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: Linux PPC Development <linuxppc-dev@ozlabs.org>
Subject: Q: define i2c nodes in device tree?
Date: Thu, 26 Mar 2009 19:44:26 +0100	[thread overview]
Message-ID: <1238093075.5262.0@antares> (raw)

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

Hi all,

I have some probably dumb questions regarding the definition of i2c  
slaves in the of device tree file...

My test system is a lite5200b board to which I attached two pca8575 io  
expander chips at i2c addresses 0x20 and 0x21.  Using the stock kernel  
2.6.29, I added the driver from the GPIO section, but I couldn't figure  
out how to add them to the dts file.  I tried e.g.

<snip>
i2c@3d40 {
	[...]
         compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
         [...]

         gpio@20 {
                 compatible = "pcf857x";
                 device_type = "gpio";
                 reg = <0x20 1>;
	};
};
</snip>

and some other like "gpio-controller" instead of "gpio" but (surprise)  
it doesn't work - dmesg says that the driver is registered, but nothing  
else shows up.  Unfortunately, I couldn't find documentation about the  
naming conventions of the i2c child nodes.

As I actually want to use the chips as parallel io (not separate  
gpio's) and thus would need to write my own driver I wonder if I really  
have to declare it in the device tree?  Would the simple way -just load  
the kernel module as with arm/intel- also work?  Would it be possible  
to use additional resources like an interrupt pin on the '5200 without  
the device tree?

Any information about a proper approach would be really helpful!

Thanks in advance, Albrecht.

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

             reply	other threads:[~2009-03-26 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 18:44 Albrecht Dreß [this message]
2009-03-26 20:02 ` Q: define i2c nodes in device tree? Timur Tabi
  -- strict thread matches above, loose matches on Subject: below --
2009-03-27 13:05 Albrecht Dreß
2009-03-27 22:07 ` Timur Tabi
2009-03-27 23:06 ` David Gibson

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=1238093075.5262.0@antares \
    --to=albrecht.dress@arcor.de \
    --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).