From patchwork Fri Apr 17 14:43:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Geyer X-Patchwork-Id: 6234311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 98594BF4A6 for ; Fri, 17 Apr 2015 14:46:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C245720306 for ; Fri, 17 Apr 2015 14:46:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A86C320225 for ; Fri, 17 Apr 2015 14:46:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yj7VN-0005nI-2q; Fri, 17 Apr 2015 14:44:29 +0000 Received: from mail.cosmopool.net ([2a01:4f8:160:20c1::10:107]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yj7V3-0005Ij-SC for linux-arm-kernel@lists.infradead.org; Fri, 17 Apr 2015 14:44:11 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.cosmopool.net (Postfix) with ESMTP id E8C43903CF4; Fri, 17 Apr 2015 16:43:46 +0200 (CEST) Received: from mail.cosmopool.net ([127.0.0.1]) by localhost (mail.your-server.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k0qQAIQmHXji; Fri, 17 Apr 2015 16:43:46 +0200 (CEST) Received: from huygens.ccbib.org (unknown [10.0.10.106]) by mail.cosmopool.net (Postfix) with SMTP id 1CBA5903AD9; Fri, 17 Apr 2015 16:43:45 +0200 (CEST) Received: by huygens.ccbib.org (sSMTP sendmail emulation); Fri, 17 Apr 2015 14:43:45 +0000 From: Harald Geyer To: Shawn Guo , Sascha Hauer , Fabio.Estevam@freescale.com, linux-arm-kernel@lists.infradead.org, stefan.wahren@i2se.com Subject: [PATCHv2 1/2] ARM: dts: imx23: Add i2c support Date: Fri, 17 Apr 2015 14:43:24 +0000 Message-Id: <1429281806-7934-1-git-send-email-harald@ccbib.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150417_074410_070565_66F55A58 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) Cc: Harald Geyer X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The imx23-olinuxino board has an i2c interface exposed on UEXT connector. This patch provides the generic devicetree infrastructure for a follow-up patch to add support to the actual board files. Tested all three possible pin groups with MOD-LCD1x9 from Olimex. This patch is based on work by Fadil Berisha with his permission. However all bugs are mine. Signed-off-by: Harald Geyer Acked-by: Stefan Wahren Acked-by: Marek Vasut --- changes since v1: split in generic and board specific patches arch/arm/boot/dts/imx23.dtsi | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index bbcfb5a..c892d58 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi @@ -308,6 +308,39 @@ fsl,voltage = ; fsl,pull-up = ; }; + + i2c_pins_a: i2c@0 { + reg = <0>; + fsl,pinmux-ids = < + MX23_PAD_I2C_SCL__I2C_SCL + MX23_PAD_I2C_SDA__I2C_SDA + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + i2c_pins_b: i2c@1 { + reg = <1>; + fsl,pinmux-ids = < + MX23_PAD_LCD_ENABLE__I2C_SCL + MX23_PAD_LCD_HSYNC__I2C_SDA + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + i2c_pins_c: i2c@2 { + reg = <2>; + fsl,pinmux-ids = < + MX23_PAD_SSP1_DATA1__I2C_SCL + MX23_PAD_SSP1_DATA2__I2C_SDA + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; }; digctl@8001c000 { @@ -444,8 +477,13 @@ status = "disabled"; }; - i2c@80058000 { + i2c: i2c@80058000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx23-i2c"; reg = <0x80058000 0x2000>; + interrupts = <27>; + clock-frequency = <100000>; dmas = <&dma_apbx 3>; dma-names = "rx-tx"; status = "disabled";