From patchwork Wed Feb 6 09:36:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vishwanathrao Badarkhe, Manish" X-Patchwork-Id: 2102891 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id 01D903FDF1 for ; Wed, 6 Feb 2013 09:39:14 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r169ZB84030538; Wed, 6 Feb 2013 03:35:11 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r169ZBiu003097; Wed, 6 Feb 2013 03:35:11 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Wed, 6 Feb 2013 03:35:11 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r169ZAj7020123; Wed, 6 Feb 2013 03:35:10 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 96D0A80627; Wed, 6 Feb 2013 03:35:10 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id 20E8D80626 for ; Wed, 6 Feb 2013 03:35:09 -0600 (CST) Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r169Z255027448; Wed, 6 Feb 2013 15:05:03 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Wed, 6 Feb 2013 15:05:02 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with SMTP id r169YvwJ022245; Wed, 6 Feb 2013 15:04:58 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 5CEE4158002; Wed, 6 Feb 2013 15:04:57 +0530 (IST) Received: from ubuntu-psp-linux.india.ext.ti.com (ubuntu-psp-linux [192.168.247.46]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r169YsR12538; Wed, 6 Feb 2013 15:04:54 +0530 (IST) From: "Vishwanathrao Badarkhe, Manish" To: , , , , Subject: [PATCH] ARM: davinci: da850: add DT node for I2C0 Date: Wed, 6 Feb 2013 15:06:22 +0530 Message-ID: <1360143382-24607-1-git-send-email-manishv.b@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 CC: , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Add I2C0 device tree and pin muxing information to da850-evm. Also, add OF_DEV_AUXDATA for I2C0 controller driver in da850 board dt file to use I2C0 clock. Verified i2c0 node gets created in sys class interface as "/sys/class/i2c-dev/i2c-0/subsystem/i2c-0". Signed-off-by: Vishwanathrao Badarkhe, Manish --- Applies on top of v3.8-rc6 of linus tree. Depends on - drivers/pinctrl: grab default handles from device core http://www.gossamer-threads.com/lists/linux/kernel/1665411 - ARM: davinci: da850: add interrupt-parent property in soc node https://patchwork.kernel.org/patch/2044101/ - ARM: davinci: da850: add pinctrl support http://comments.gmane.org/gmane.linux.davinci/25993 :100644 100644 433027f... 738d5d4... M arch/arm/boot/dts/da850-evm.dts :100644 100644 4b02167... a0072aa... M arch/arm/boot/dts/da850.dtsi :100644 100644 37c27af... 95ca4e9... M arch/arm/mach-davinci/da8xx-dt.c arch/arm/boot/dts/da850-evm.dts | 6 ++++++ arch/arm/boot/dts/da850.dtsi | 14 ++++++++++++++ arch/arm/mach-davinci/da8xx-dt.c | 8 +++++++- 3 files changed, 27 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 433027f..738d5d4 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -27,6 +27,12 @@ serial2: serial@1d0d000 { status = "okay"; }; + i2c0: i2c@1c22000 { + status = "okay"; + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + }; }; nand_cs3@62000000 { status = "okay"; diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 4b02167..a0072aa 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -56,6 +56,12 @@ 0x30 0x01100000 0x0ff00000 >; }; + i2c0_pins: pinmux_i2c0_pins { + pinctrl-single,bits = < + /* I2C0_SDA,I2C0_SCL */ + 0x10 0x00002200 0x0000ff00 + >; + }; }; serial0: serial@1c42000 { compatible = "ns16550a"; @@ -81,6 +87,14 @@ interrupts = <61>; status = "disabled"; }; + i2c0: i2c@1c22000 { + compatible = "ti,davinci-i2c"; + reg = <0x22000 0x1000>; + interrupts = <15>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; }; nand_cs3@62000000 { compatible = "ti,davinci-nand"; diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index 37c27af..95ca4e9 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -37,11 +37,17 @@ static void __init da8xx_init_irq(void) of_irq_init(da8xx_irq_match); } +struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { + OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL), + {} +}; + #ifdef CONFIG_ARCH_DAVINCI_DA850 static void __init da850_init_machine(void) { - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + of_platform_populate(NULL, of_default_bus_match_table, + da850_auxdata_lookup, NULL); da8xx_uart_clk_enable(); }