linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "G, Manjunath Kondaiah" <manjugk@ti.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "G, Manjunath Kondaiah" <manjugk@linaro.org>,
	Thomas Abraham <thomas.abraham@linaro.org>,
	devicetree-discuss@lists.ozlabs.org,
	linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org,
	ben-linux@fluff.org, patches@linaro.org
Subject: Re: [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine
Date: Tue, 19 Jul 2011 22:35:01 +0530	[thread overview]
Message-ID: <CAC63_iQcia64iBq653S+3_Yj8mgfbGSfHdGXevFe8urj9RpF-w@mail.gmail.com> (raw)
In-Reply-To: <CACxGe6v+-H+W4H-5-gvEP+8j91NsGpVZkS595zSt8Lju74taWw@mail.gmail.com>

On Tue, Jul 19, 2011 at 2:00 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Mon, Jul 18, 2011 at 5:53 AM, G, Manjunath Kondaiah
> <manjugk@linaro.org> wrote:
>> Abraham,
>> Few comments on i2c child devices handling:
>>
>> On 18 July 2011 06:20, Thomas Abraham <thomas.abraham@linaro.org> wrote:
>>> Add device node for i2c instance 1 and list all its connected slave
>>> devices.
>>>
>>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>>> ---
>>>  arch/arm/boot/dts/exynos4-smdkv310.dts  |   19 ++++++++++++++++++-
>>>  arch/arm/mach-exynos4/Kconfig           |    1 +
>>>  arch/arm/mach-exynos4/mach-exynos4-dt.c |    9 +++++++++
>>>  3 files changed, 28 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/exynos4-smdkv310.dts b/arch/arm/boot/dts/exynos4-smdkv310.dts
>>> index d65c18c..29c40ed 100644
>>> --- a/arch/arm/boot/dts/exynos4-smdkv310.dts
>>> +++ b/arch/arm/boot/dts/exynos4-smdkv310.dts
>>> @@ -23,7 +23,7 @@
>>>        };
>>>
>>>        chosen {
>>> -               bootargs = "root=/dev/mmcblk0p1 rootfstype=ext3 rootwait console=ttySAC1,115200";
>>> +               bootargs = "root=/dev/mmcblk0p1 rootfstype=ext3 rootwait console=ttySAC1,115200 init=/linuxrc";
>>>        };
>>>
>>>        soc {
>>> @@ -64,5 +64,22 @@
>>>                        samsung,sdhci-cd-type = <0>;
>>>                        samsung,sdhci-clkdiv-external;
>>>                };
>>> +
>>> +               i2c@13870000 {
>>> +                       compatible = "samsung,s3c2440-i2c";
>>> +                       reg = <0x13870000 0x100>;
>>> +                       interrupts = <345>;
>>> +                       samsung,i2c-bus-number = <1>;
>>> +                       samsung,i2c-slave-addr = <16>;
>>> +                       samsung,i2c-sda-delay = <100>;
>>> +                       samsung,i2c-max-bus-freq = <100000>;
>>> +                       #address-cells = <1>;
>>> +                       #size-cells = <0>;
>>> +
>>> +                       wm8994@1a {
>>> +                               compatible = "wlf,wm8994";
>>> +                               reg = <0x1a>;
>>> +                       };
>>
>> The i2c child devices are board specific.
>> For ex: few boards such as smdkxxx based on exynos4 has wm8994 with
>> i2c1 controller
>> where as other boards based on exynos4 does not have any i2c1 devices.
>> Hence these child entries should go to board specific .dts file right?
>
> No, the i2c bus node should still appear in the SoC .dtsi file.  If a
> board doesn't use a particular i2c bus, then the board.dts file can
> add a status = "disabled"; property to the i2c bus node to disable it.

that's right. I am referring to I2C slave devices. For a given SoC,
two different
boards can have different i2c slave devices with different slave
address. In that case,
it is better to have i2c child/slave nodes in board .dts file.

-M

  reply	other threads:[~2011-07-19 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  0:50 [PATCH 0/2] Add device tree support for Samsung's I2C driver Thomas Abraham
     [not found] ` <1310950241-13602-1-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-18  0:50   ` [PATCH 1/2] i2c: s3c24xx: Add device tree support Thomas Abraham
     [not found]     ` <1310950241-13602-2-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-07-18  4:28       ` Grant Likely
2011-07-18  0:50   ` [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine Thomas Abraham
2011-07-18  4:30     ` Grant Likely
2011-07-18  9:45       ` Ben Dooks
     [not found]         ` <20110718094534.GN15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-07-18 20:28           ` Grant Likely
2011-07-18 11:53     ` G, Manjunath Kondaiah
2011-07-18 20:30       ` Grant Likely
2011-07-19 17:05         ` G, Manjunath Kondaiah [this message]
2011-07-22  7:12           ` Tony Lindgren

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=CAC63_iQcia64iBq653S+3_Yj8mgfbGSfHdGXevFe8urj9RpF-w@mail.gmail.com \
    --to=manjugk@ti.com \
    --cc=ben-linux@fluff.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=manjugk@linaro.org \
    --cc=patches@linaro.org \
    --cc=thomas.abraham@linaro.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).