From patchwork Thu Nov 17 14:11:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9434311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3EB2C60238 for ; Thu, 17 Nov 2016 14:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 301B729547 for ; Thu, 17 Nov 2016 14:28:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24E4B2956D; Thu, 17 Nov 2016 14:28:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B3BAE29547 for ; Thu, 17 Nov 2016 14:28:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7NeA-0008MT-33; Thu, 17 Nov 2016 14:26:38 +0000 Received: from kirsty.vergenet.net ([202.4.237.240]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c7NTV-0001Sn-4i for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2016 14:15:39 +0000 Received: from penelope.kanocho.kobe.vergenet.net (52D9BC73.cm-11-1c.dynamic.ziggo.nl [82.217.188.115]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 6EF0325BF7A; Fri, 18 Nov 2016 01:11:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1479391917; bh=cBNAdMKocHhYFnpSUJAIGI/Q/HpXuL1h/TIydFarRxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lCC8rhl7jxAa/t1G4YGCd0Z9Gc48KrhGm++6vxLo+DVEpSGmhx2cvsZPCg7S8R17r 7LOhFlfghj2K2wuOYhv4xmdn/qrqw55YP0IjCJ0tMi7yqN9Kaq2BkjCtQ5vDL+AiP2 0rk0jyaMMdAwGaB3XCP8NhKIZV/KJc8hPrpQcUo8= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id B4D5660789; Thu, 17 Nov 2016 15:11:49 +0100 (CET) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Subject: [PATCH 07/31] ARM: dts: alt: use demuxer for I2C4 Date: Thu, 17 Nov 2016 15:11:24 +0100 Message-Id: <490aafde3cb3a7c183481e0fc9b38cba109691bf.1479391750.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161117_061537_713656_A7DD2881 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Horman , Magnus Damm , linux-arm-kernel@lists.infradead.org, Wolfram Sang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make it possible to fallback to GPIO for I2C4 on the EXIO-B connector. This is based on reference work for the I2C0 core of the lager/r8a7790 by Wolfram Sang. Signed-off-by: Simon Horman [wsa: rebased and fixed aliases] Signed-off-by: Wolfram Sang --- arch/arm/boot/dts/r8a7794-alt.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts index a3e74684289b..7270d4224b1a 100644 --- a/arch/arm/boot/dts/r8a7794-alt.dts +++ b/arch/arm/boot/dts/r8a7794-alt.dts @@ -18,6 +18,8 @@ aliases { serial0 = &scif2; + i2c10 = &gpioi2c4; + i2c12 = &i2cexio4; }; chosen { @@ -135,6 +137,29 @@ #clock-cells = <0>; clock-frequency = <148500000>; }; + + gpioi2c4: i2c-10 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + status = "disabled"; + gpios = <&gpio4 9 GPIO_ACTIVE_HIGH /* sda */ + &gpio4 8 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <5>; + }; + + /* + * I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (SDA). + * A fallback to GPIO is provided. + */ + i2cexio4: i2c-14 { + compatible = "i2c-demux-pinctrl"; + i2c-parent = <&i2c4>, <&gpioi2c4>; + i2c-bus-name = "i2c-exio4"; + #address-cells = <1>; + #size-cells = <0>; + }; }; &du { @@ -194,6 +219,11 @@ function = "i2c1"; }; + i2c4_pins: i2c4 { + groups = "i2c4"; + function = "i2c4"; + }; + vin0_pins: vin0 { groups = "vin0_data8", "vin0_clk"; function = "vin0"; @@ -314,6 +344,11 @@ }; }; +&i2c4 { + pinctrl-0 = <&i2c4_pins>; + pinctrl-names = "i2c-exio4"; +}; + &vin0 { status = "okay"; pinctrl-0 = <&vin0_pins>;