From: Felix Radensky <felix@embedded-sol.com>
To: Ayman El-Khashab <AymanE@tanisys.com>
Cc: Linuxppc-embedded@ozlabs.org
Subject: Re: Device tree configuration for I2C eeprom
Date: Tue, 04 Nov 2008 18:45:58 +0200 [thread overview]
Message-ID: <49107C46.8060205@embedded-sol.com> (raw)
In-Reply-To: <16691A8B34B5D9458EA3A1C37A11555A0137F857@tanisys-ex2.Tanisys.Local>
Ayman El-Khashab wrote:
>
> Ok, here is what I used. I see the nodes created in /sys/bus/i2c/...
> but I see four of them at address 0x50,0x51,0x52,0x53. That surprised
> me since I only have 3 of them in the device tree. However, in any case
> I did not see a way to read or write them. In one case I was able to
> cat the file "eeprom", but it was only 256 bytes and did not exist for
> the other 3 devices. Here is the section of my device tree ... I do
> see the controller being initialized in dmesg, it is just the read and
> write that is eluding me.
>
> One question I did have was within another sample device tree, there was
> a comment that "this makes address 0x50 and 0x51"? Does that mean that
> large eeproms are spread over several nodes? I searched around but
> could
> not find an example of how to use this at24 to access my E2 from
> userspace.
>
> Thanks
> Ayman
>
>
> IIC0: i2c@ef600700 {
> compatible = "ibm,iic-460ex", "ibm,iic";
> reg = <0xef600700 0x00000014>;
> interrupt-parent = <&UIC0>;
> interrupts = <0x2 0x4>;
> #address-cells = <1>;
> #size-cells = <0>;
>
> at24@50 {
> compatible = "at24,at24c128";
> reg = <0x50>;
> };
> at24@52 {
> compatible = "at24,at24c128";
> reg = <0x52>;
> };
> at24@53 {
> compatible = "at24,at24c128";
> reg = <0x53>;
> };
> }
>
>
>
If you're using Denx kernel, you should add your at24 device to
i2c_devices[]
in drivers/i2c/busses/i2c-ibm_of.c This will pass your device tree data
to at24 driver.
Felix.
next prev parent reply other threads:[~2008-11-04 16:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-18 19:44 Device tree configuration for I2C eeprom Ayman El-Khashab
2008-09-18 22:13 ` Sebastian Siewior
2008-09-18 22:21 ` Jon Smirl
2008-09-19 5:04 ` Grant Likely
2008-09-19 7:12 ` Sebastian Siewior
2008-09-19 7:44 ` Grant Likely
2008-09-19 8:12 ` Sebastian Siewior
2008-11-04 16:28 ` Grant Likely
2008-11-04 16:29 ` Grant Likely
2008-11-04 17:17 ` Sebastian Andrzej Siewior
2008-11-04 16:07 ` Ayman El-Khashab
2008-11-04 16:45 ` Felix Radensky [this message]
2008-11-04 19:52 ` Ayman El-Khashab
2008-11-04 20:04 ` Felix Radensky
2008-11-04 21:00 ` Ayman El-Khashab
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=49107C46.8060205@embedded-sol.com \
--to=felix@embedded-sol.com \
--cc=AymanE@tanisys.com \
--cc=Linuxppc-embedded@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).