Thread (7 messages) 7 messages, 6 authors, 2011-07-22

Re: [PATCH 2/2] arm: dt: Add device tree support for i2c instance 1 on exynos4 dt machine

From: G, Manjunath Kondaiah <hidden>
Date: 2011-07-19 17:05:01
Also in: linux-i2c, linux-samsung-soc

Possibly related (same subject, not in this thread)

On Tue, Jul 19, 2011 at 2:00 AM, Grant Likely [off-list ref] wrote:
On Mon, Jul 18, 2011 at 5:53 AM, G, Manjunath Kondaiah
[off-list ref] wrote:
quoted
Abraham,
Few comments on i2c child devices handling:

On 18 July 2011 06:20, Thomas Abraham [off-list ref] wrote:
quoted
Add device node for i2c instance 1 and list all its connected slave
devices.

Signed-off-by: Thomas Abraham <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help