From patchwork Tue Apr 9 21:34:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 2417511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 902853FD8C for ; Tue, 9 Apr 2013 21:35:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPgC9-00016N-8t; Tue, 09 Apr 2013 21:35:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPgC3-0005ak-Rq; Tue, 09 Apr 2013 21:35:07 +0000 Received: from mail-ob0-x249.google.com ([2607:f8b0:4003:c01::249]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPgBr-0005ZD-87 for linux-arm-kernel@lists.infradead.org; Tue, 09 Apr 2013 21:34:56 +0000 Received: by mail-ob0-f201.google.com with SMTP id uz6so1881386obc.4 for ; Tue, 09 Apr 2013 14:34:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=v5H7xzVL1JsqT163zu+apC6tLLG2FjzvVPti0flHqWI=; b=Pab9M8ZKqZoFMtG4VIu9toTkAShIQqSTlRPuBRan85d9/fGrRqYFRfIYSj7/MqKuWA Xv5RYzN7rVTHbtNIuhe8JXcBa/m3SIjhritzAJEps99MXbeSODt641Qmnmf2wtBeShyD U1ciFqvz4qtot0IkBrqkCCzXegXOIK0PewyXxvYMcE0dsRUAGj6j+F0BJRycDNUJVeou S2+zoFHILI1uQuhpIVvFNsKo3KfUpUH7qR4UNOJB1dJN0mrkL61eLBmXqYTTdZX/mR2O HJPnP9kf7LduQHoxcbrJY/mTz9Op3jp61Wwf4V6E6Ipt2Lb32xiaxIdJPjSwrNEG73+v RX6g== X-Received: by 10.42.233.13 with SMTP id jw13mr2081460icb.14.1365543292881; Tue, 09 Apr 2013 14:34:52 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id j7si2334670igc.3.2013.04.09.14.34.52 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 09 Apr 2013 14:34:52 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.162.34]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 7BFD95A415E; Tue, 9 Apr 2013 14:34:51 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 1C21880217; Tue, 9 Apr 2013 14:34:51 -0700 (PDT) From: Doug Anderson To: Wolfram Sang , Kukjin Kim Subject: [PATCH v5 2/3] ARM: dts: Add i2c-arbitrator bus for exynos5250-snow Date: Tue, 9 Apr 2013 14:34:29 -0700 Message-Id: <1365543270-10736-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1365543270-10736-1-git-send-email-dianders@chromium.org> References: <1363192583-26363-1-git-send-email-dianders@chromium.org> <1365543270-10736-1-git-send-email-dianders@chromium.org> X-Gm-Message-State: ALoCoQkPjNpFBZXF/8XZXTogjsagitcfNU9zPDWKNAfNP4xA/eICBzJdRAeEaoI20nxrRyqWwazBfwqxlWksE81uRF4PtIhEi4kqqK0TqWQF79XROyZZBlvfI6HOABO6oTjOF5/I1o38i1fzUsqk1DwuQ9+xDxsTIi3BnBGfyCEv2bovspbUPeytXAdz9CdTjyyQdHYl0LlwhKp2DfkvG1gix/Cx62rafg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130409_173455_371779_CF93E5BF X-CRM114-Status: GOOD ( 13.18 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.7 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -2.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: djkurtz@chromium.org, linux-kernel@vger.kernel.org, grant.likely@secretlab.ca, Russell King , Jingoo Han , ben.dooks@codethink.co.uk, Thomas Abraham , u.kleine-koenig@pengutronix.de, linux@roeck-us.net, swarren@wwwdotorg.org, girish.shivananjappa@linaro.org, bhushan.r@samsung.com, Naveen Krishna Chatradhi , linux-arm-kernel@lists.infradead.org, Rahul Sharma , sreekumar.c@samsung.com, Simon Glass , broonie@opensource.wolfsonmicro.com, Doug Anderson , yuvaraj.cd@gmail.com, olof@lixom.net, prashanth.g@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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 We need to use the i2c-arbitrator to talk to any of the devices on i2c bus 4 on exynos5250-snow so that we don't confuse the embedded controller (EC). Add the i2c-arbitrator to the device tree. As we add future devices (keyboard, sbs, tps65090) we'll add them on top of this. The arbitrated bus is numbered 104 simply as a convenience to make it easier for people poking around to guess that it might have something to do with the physical bus 4. The addition is split between the cros5250-common and the snow device tree file since not all cros5250-class devices use arbitration. Signed-off-by: Doug Anderson --- Changes in v5: - Adjust bindings as per Wolfram Sang. Changes in v4: - Changed mux gpio syntax to work atop Thomas's "ARM: dts: add pin state information in client nodes for Exynos5 platforms"; avoid adding gpios property to i2c@12CA0000 for the same reason. Changes in v3: None Changes in v2: - Use new device tree property names / compatible string. - Include that the GPIOs for arbitration are active low. arch/arm/boot/dts/cros5250-common.dtsi | 3 ++- arch/arm/boot/dts/exynos5250-snow.dts | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 8a5b3a6..0a61bbb 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi @@ -193,7 +193,8 @@ }; i2c@12CA0000 { - status = "disabled"; + samsung,i2c-sda-delay = <100>; + samsung,i2c-max-bus-freq = <66000>; }; i2c@12CB0000 { diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 581ffae..fa85f58 100644 --- a/arch/arm/boot/dts/exynos5250-snow.dts +++ b/arch/arm/boot/dts/exynos5250-snow.dts @@ -16,6 +16,10 @@ model = "Google Snow"; compatible = "google,snow", "samsung,exynos5250"; + aliases { + i2c104 = &i2c_104; + }; + pinctrl@11400000 { sd3_clk: sd3-clk { samsung,pin-drv = <0>; @@ -44,6 +48,27 @@ }; }; + i2c-arbitrator { + compatible = "i2c-arb-gpio-challenge"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&{/i2c@12CA0000}>; + + our-claim-gpio = <&gpf0 3 1>; + their-claim-gpios = <&gpe0 4 1>; + slew-delay-us = <10>; + wait-retry-us = <3000>; + wait-free-us = <50000>; + + /* Use ID 104 as a hint that we're on physical bus 4 */ + i2c_104: i2c@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + /* * On Snow we've got SIP WiFi and so can keep drive strengths low to * reduce EMI.