From patchwork Tue Feb 17 18:52:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 5840941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC6349F380 for ; Tue, 17 Feb 2015 18:57:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D091201F2 for ; Tue, 17 Feb 2015 18:57:09 +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 2EEBB201DD for ; Tue, 17 Feb 2015 18:57:08 +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 1YNnI8-0005P4-ST; Tue, 17 Feb 2015 18:54:40 +0000 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNnGV-0004R8-8n for linux-arm-kernel@lists.infradead.org; Tue, 17 Feb 2015 18:53:03 +0000 Received: by mail-wg0-f53.google.com with SMTP id a1so21300003wgh.12 for ; Tue, 17 Feb 2015 10:52:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jXnCUm0Hsk/SayPOgEXljnxz2QGO2D5N+tvTSZBz0j4=; b=MPpOMMkTY6oGUXvuJzhT0hBNLNX2g4QsL+Ym7Q1q0/Hsnr28/7rGFojQgiveC+cTXB FH/A/QHvSN0dHBhCb2gZywH1z+TymJ692tMHxxzGOFkKglbEq+5hDfn2ejaHPPp0DhMc f1z4EnYnyA0q3l+je+DVMHjrDPmCPy/Cc35svuHrTv8YDPqcKzA7Ybzm1Y8KHhegmufQ bK2ls0FNdMZIJHy0qCQL2fQNuYyw+RfQKGh+DFwfVXuRW5b6sdJJSUyU+qZs/6X9T9Yt 8lRbcnTGhriHEB8LXPyS3JkV8sXeVBIbFZr8iD/bwOqWYcBcn+F+LnDQ1N0uaVOjMKsT Afog== X-Received: by 10.180.84.166 with SMTP id a6mr2919822wiz.4.1424199157173; Tue, 17 Feb 2015 10:52:37 -0800 (PST) Received: from topkick.lan (f051045211.adsl.alicedsl.de. [78.51.45.211]) by mx.google.com with ESMTPSA id er13sm28631945wjc.11.2015.02.17.10.52.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 10:52:36 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Subject: [PATCH 7/8] ARM: dts: dove: Add internal i2c multiplexer node Date: Tue, 17 Feb 2015 19:52:08 +0100 Message-Id: <1424199129-22099-8-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1424199129-22099-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1424199129-22099-1-git-send-email-sebastian.hesselbarth@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150217_105259_491649_42413847 X-CRM114-Status: GOOD ( 13.07 ) X-Spam-Score: -0.8 (/) Cc: Andrew Lunn , Jason Cooper , Stephen Warren , Wolfram Sang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Gabriel Dobato , linux-i2c@vger.kernel.org, Gregory Clement , linux-arm-kernel@lists.infradead.org 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 This adds a i2c-mux-pinctrl node to dove.dtsi for the internal i2c mux found on Dove SoCs. Up to now, we had no board using any of the two additional i2c busses, so make sure the change does not break any existing boards. Therefore, we rename the i2c-controller node label to "i2c" and enable it by default. Also, the dedicated sub-bus (now "i2c0") is enabled by default. The two optional sub-busses require additional external pin-muxing, so disable them by default. Signed-off-by: Sebastian Hesselbarth Acked-by: Gregory CLEMENT --- Wolfram, Actually, I was hoping that default pin hog mechanism (pinctrl-names = "default") could also be used from i2c mux nodes and devices. Anyway, I had a look at i2c-core/mux code and failed how to achieve that easily. Instead I decided, it would also be ok to put the pin hog into the i2c controller node where pins will be bound by standard platform device code. Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Gabriel Dobato Cc: Wolfram Sang Cc: Stephen Warren Cc: linux-i2c@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/boot/dts/dove.dtsi | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi index 9ad829523a13..b3340e862b0e 100644 --- a/arch/arm/boot/dts/dove.dtsi +++ b/arch/arm/boot/dts/dove.dtsi @@ -28,6 +28,42 @@ }; }; + i2c-mux { + compatible = "i2c-mux-pinctrl"; + #address-cells = <1>; + #size-cells = <0>; + + i2c-parent = <&i2c>; + + pinctrl-names = "i2c0", "i2c1", "i2c2"; + pinctrl-0 = <&pmx_i2cmux_0>; + pinctrl-1 = <&pmx_i2cmux_1>; + pinctrl-2 = <&pmx_i2cmux_2>; + + i2c0: i2c@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + }; + + i2c1: i2c@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + /* Requires pmx_i2c1 on i2c controller node */ + status = "disabled"; + }; + + i2c2: i2c@2 { + reg = <2>; + #address-cells = <1>; + #size-cells = <0>; + /* Requires pmx_i2c2 on i2c controller node */ + status = "disabled"; + }; + }; + l2: l2-cache { compatible = "marvell,tauros2-cache"; marvell,tauros2-cache-features = <0>; @@ -123,7 +159,7 @@ status = "disabled"; }; - i2c0: i2c-ctrl@11000 { + i2c: i2c-ctrl@11000 { compatible = "marvell,mv64xxx-i2c"; reg = <0x11000 0x20>; #address-cells = <1>; @@ -132,7 +168,7 @@ clock-frequency = <400000>; timeout-ms = <1000>; clocks = <&core_clk 0>; - status = "disabled"; + status = "okay"; }; uart0: serial@12000 {