From: Thomas Abraham <thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine
Date: Mon, 18 Jul 2011 06:20:41 +0530 [thread overview]
Message-ID: <1310950241-13602-3-git-send-email-thomas.abraham@linaro.org> (raw)
In-Reply-To: <1310950241-13602-1-git-send-email-thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Add device node for i2c instance 1 and list all its connected slave
devices.
Signed-off-by: Thomas Abraham <thomas.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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>;
+ };
+ };
};
};
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 <plat/regs-serial.h>
#include <plat/exynos4.h>
#include <plat/cpu.h>
+#include <plat/devs.h>
#include <plat/sdhci.h>
+#include <plat/iic.h>
+#include <plat/iic-core.h>
#include <mach/map.h>
@@ -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),
{},
};
--
1.7.1
next prev parent reply other threads:[~2011-07-18 0:50 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 ` Thomas Abraham [this message]
2011-07-18 4:30 ` [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine 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
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=1310950241-13602-3-git-send-email-thomas.abraham@linaro.org \
--to=thomas.abraham-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).