From patchwork Wed Feb 13 18:02:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 2138671 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id A313AE00D9 for ; Wed, 13 Feb 2013 18:11:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5gko-0001dW-3a; Wed, 13 Feb 2013 18:08:22 +0000 Received: from mail-ye0-f201.google.com ([209.85.213.201]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5gkl-0001cX-H5 for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2013 18:08:20 +0000 Received: by mail-ye0-f201.google.com with SMTP id r11so148120yen.2 for ; Wed, 13 Feb 2013 10:08:18 -0800 (PST) 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=0WWhIk+vZ1xd9V8DCFTXgzqkegesKvseQrFWEMBOM2w=; b=cH7/A0p4lADo9bvvDk3WJHdh8LRFekLv14Ian/pvle+iHFrcYQbBNA/z9RhVtIQw28 3cg+JvXtZmgCHeLd52f+DzPxGYTOhZPL8Mehe1cnAcw2nejTVANh+PS8RvH+413wseYj mH3S44tEmjgNiA6DKRrBDsS2/Zez2cN0+P40WAfgfWpEPXL55OV+BHDscBZLtDpvJmH9 /gQkQeQo2MVjtNFIb8RRpQzQfAKtLzJXdSQdyTEVWCBfmhvtONwQahOXYyDdjOGEEGqi LwnenVV1Nx9+vYVrqkc3yz5ZNSRuxNNekMLeccfacVixeysYIhCdXE/yDRZHZI4njxdo H7Kw== X-Received: by 10.236.171.103 with SMTP id q67mr9634966yhl.35.1360778550685; Wed, 13 Feb 2013 10:02:30 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id u28si2010262yhm.1.2013.02.13.10.02.30 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Wed, 13 Feb 2013 10:02:30 -0800 (PST) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.73.80]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 74DB131C2C6; Wed, 13 Feb 2013 10:02:30 -0800 (PST) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 25662800BA; Wed, 13 Feb 2013 10:02:30 -0800 (PST) From: Doug Anderson To: Wolfram Sang Subject: [PATCH v1 2/4] ARM: dts: Add i2c-arbitrator bus for exynos5250-snow Date: Wed, 13 Feb 2013 10:02:10 -0800 Message-Id: <1360778532-7480-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1360778532-7480-1-git-send-email-dianders@chromium.org> References: <1360778532-7480-1-git-send-email-dianders@chromium.org> X-Gm-Message-State: ALoCoQk+NBA3siH152l1XmNe4yJX+nBOGSq5VZH8hly3ghNpQvwmfa0XboE/6FKj2oHrBiAoGfjtaCyF1tupNkme5/N2bqUvsOGh/pluMu7D/dZU86ffid2x5TYdIXtQQVGMSHOwUlSCEyxs2bTIM+yTObA2VFab9NJ2E6qeFAAbxgFF6yNALyXyOfM1wRTVS9vToU9tqZDxF5GHSFtP9yB982eZPI1c6w== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130213_130819_718376_9BEB3892 X-CRM114-Status: GOOD ( 13.81 ) X-Spam-Score: -0.3 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.201 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -0.7 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: sreekumar.c@samsung.com, Kukjin Kim , Russell King , Grant Grundler , Prashanth G , Simon Glass , Mark Brown , Doug Anderson , Daniel Kurtz , linux-kernel@vger.kernel.org, Grant Likely , Olof Johansson , Ben Dooks , Yuvaraj Kumar , u.kleine-koenig@pengutronix.de, Girish Shivananjappa , Thomas Abraham , bhushan.r@samsung.com, Naveen Krishna Chatradhi , linux-arm-kernel@lists.infradead.org, Rahul Sharma X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org 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 v1: None arch/arm/boot/dts/cros5250-common.dtsi | 5 ++++- arch/arm/boot/dts/exynos5250-snow.dts | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi index 46c0980..f451375 100644 --- a/arch/arm/boot/dts/cros5250-common.dtsi +++ b/arch/arm/boot/dts/cros5250-common.dtsi @@ -58,7 +58,10 @@ }; i2c@12CA0000 { - status = "disabled"; + samsung,i2c-sda-delay = <100>; + samsung,i2c-max-bus-freq = <66000>; + gpios = <&gpa2 0 3 3 0>, + <&gpa2 1 3 3 0>; }; i2c@12CB0000 { diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts index 17dd951..69a87a0 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; + }; + gpio-keys { compatible = "gpio-keys"; @@ -29,6 +33,26 @@ }; }; + i2c-arbitrator { + compatible = "i2c-arbitrator"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&{/i2c@12CA0000}>; + + bus-arbitration-gpios = <&gpf0 3 1 0 0>, <&gpe0 4 0 3 0>; + bus-arbitration-slew-delay-us = <10>; + bus-arbitration-wait-retry-us = <3000>; + bus-arbitration-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.