From patchwork Mon Jul 18 00:50:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thomas.abraham@linaro.org X-Patchwork-Id: 2732 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E16CB23F3F for ; Mon, 18 Jul 2011 00:39:38 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id A9FFDA1823A for ; Mon, 18 Jul 2011 00:39:38 +0000 (UTC) Received: by mail-qy0-f173.google.com with SMTP id 10so1527658qyk.11 for ; Sun, 17 Jul 2011 17:39:38 -0700 (PDT) Received: by 10.229.90.14 with SMTP id g14mr647373qcm.0.1310949578428; Sun, 17 Jul 2011 17:39:38 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs41309qcb; Sun, 17 Jul 2011 17:39:37 -0700 (PDT) Received: by 10.68.17.138 with SMTP id o10mr2603986pbd.114.1310949577109; Sun, 17 Jul 2011 17:39:37 -0700 (PDT) Received: from mailout1.samsung.com ([203.254.224.24]) by mx.google.com with ESMTP id a7si10690795pbf.97.2011.07.17.17.39.36; Sun, 17 Jul 2011 17:39:37 -0700 (PDT) Received-SPF: error (google.com: error in processing during lookup of thomas.abraham@linaro.org: DNS timeout) client-ip=203.254.224.24; Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of thomas.abraham@linaro.org: DNS timeout) smtp.mail=thomas.abraham@linaro.org Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LOI008AH74DSH30@mailout1.samsung.com> for patches@linaro.org; Mon, 18 Jul 2011 09:39:00 +0900 (KST) X-AuditID: cbfee61b-b7c3dae000002cb8-89-4e2380a43bfa Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 8C.92.11448.4A0832E4; Mon, 18 Jul 2011 09:39:00 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LOI00B0V74SDA@mmp2.samsung.com> for patches@linaro.org; Mon, 18 Jul 2011 09:39:00 +0900 (KST) Date: Mon, 18 Jul 2011 06:20:41 +0530 From: Thomas Abraham Subject: [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine In-reply-to: <1310950241-13602-1-git-send-email-thomas.abraham@linaro.org> To: devicetree-discuss@lists.ozlabs.org Cc: linux-i2c@vger.kernel.org, ben-linux@fluff.org, linux-samsung-soc@vger.kernel.org, patches@linaro.org Message-id: <1310950241-13602-3-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 Content-transfer-encoding: 7BIT References: <1310950241-13602-1-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: AAAAAA== Add device node for i2c instance 1 and list all its connected slave devices. Signed-off-by: Thomas Abraham --- 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>; + }; + }; }; }; diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index bb97b7e..c7fce3e 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -193,6 +193,7 @@ config MACH_EXYNOS4_DT select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 select EXYNOS4_SETUP_SDHCI + select EXYNOS4_SETUP_I2C1 help Machine support for Samsung Exynos4 machine with device tree enabled. diff --git a/arch/arm/mach-exynos4/mach-exynos4-dt.c b/arch/arm/mach-exynos4/mach-exynos4-dt.c index 120665a..ef6b4cb 100644 --- a/arch/arm/mach-exynos4/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos4/mach-exynos4-dt.c @@ -23,7 +23,10 @@ #include #include #include +#include #include +#include +#include #include @@ -62,6 +65,10 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { }, }; +static struct s3c2410_platform_i2c exynos4_dt_i2c_data1 __initdata = { + .cfg_gpio = s3c_i2c1_cfg_gpio, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. Optionally, the platform data can also @@ -75,6 +82,8 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { "s3c-sdhci.2", &s3c_hsmmc2_def_platdata), OF_DEV_AUXDATA("samsung,s3c6410-sdhci", EXYNOS4_PA_HSMMC(0), "s3c-sdhci.0", &s3c_hsmmc0_def_platdata), + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(1), + "s3c2440-i2c.1", &exynos4_dt_i2c_data1), {}, };