From mboxrd@z Thu Jan 1 00:00:00 1970 From: "G, Manjunath Kondaiah" 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 Message-ID: References: <1310950241-13602-1-git-send-email-thomas.abraham@linaro.org> <1310950241-13602-3-git-send-email-thomas.abraham@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-samsung-soc-owner@vger.kernel.org To: Grant Likely Cc: "G, Manjunath Kondaiah" , Thomas Abraham , devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, ben-linux@fluff.org, patches@linaro.org List-Id: linux-i2c@vger.kernel.org On Tue, Jul 19, 2011 at 2:00 AM, Grant Likely wrote: > On Mon, Jul 18, 2011 at 5:53 AM, G, Manjunath Kondaiah > wrote: >> Abraham, >> Few comments on i2c child devices handling: >> >> On 18 July 2011 06:20, Thomas Abraham wr= ote: >>> Add device node for i2c instance 1 and list all its connected slave >>> devices. >>> >>> Signed-off-by: Thomas Abraham >>> --- >>> =A0arch/arm/boot/dts/exynos4-smdkv310.dts =A0| =A0 19 +++++++++++++= +++++- >>> =A0arch/arm/mach-exynos4/Kconfig =A0 =A0 =A0 =A0 =A0 | =A0 =A01 + >>> =A0arch/arm/mach-exynos4/mach-exynos4-dt.c | =A0 =A09 +++++++++ >>> =A03 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 @@ >>> =A0 =A0 =A0 =A0}; >>> >>> =A0 =A0 =A0 =A0chosen { >>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 bootargs =3D "root=3D/dev/mmcblk0p1 r= ootfstype=3Dext3 rootwait console=3DttySAC1,115200"; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bootargs =3D "root=3D/dev/mmcblk0p1 r= ootfstype=3Dext3 rootwait console=3DttySAC1,115200 init=3D/linuxrc"; >>> =A0 =A0 =A0 =A0}; >>> >>> =A0 =A0 =A0 =A0soc { >>> @@ -64,5 +64,22 @@ >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0samsung,sdhci-cd-typ= e =3D <0>; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0samsung,sdhci-clkdiv= -external; >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}; >>> + >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 i2c@13870000 { >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "samsu= ng,s3c2440-i2c"; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D <0x13870000 0= x100>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 interrupts =3D <345>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 samsung,i2c-bus-numbe= r =3D <1>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 samsung,i2c-slave-add= r =3D <16>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 samsung,i2c-sda-delay= =3D <100>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 samsung,i2c-max-bus-f= req =3D <100000>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #address-cells =3D <1= >; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #size-cells =3D <0>; >>> + >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wm8994@1a { >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 compa= tible =3D "wlf,wm8994"; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 reg =3D= <0x1a>; >>> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }; >> >> 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 device= s. >> Hence these child entries should go to board specific .dts file righ= t? > > No, the i2c bus node should still appear in the SoC .dtsi file. =A0If= a > board doesn't use a particular i2c bus, then the board.dts file can > add a status =3D "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