From patchwork Wed Jun 22 03:43:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9191869 X-Patchwork-Delegate: horms@verge.net.au 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 3FCD46075A for ; Wed, 22 Jun 2016 03:49:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F821283E0 for ; Wed, 22 Jun 2016 03:49:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 240CA283E6; Wed, 22 Jun 2016 03:49:45 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB707283E0 for ; Wed, 22 Jun 2016 03:49:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbcFVDto (ORCPT ); Tue, 21 Jun 2016 23:49:44 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:57320 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751523AbcFVDto (ORCPT ); Tue, 21 Jun 2016 23:49:44 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p6216-ipbfp1501kobeminato.hyogo.ocn.ne.jp [114.153.217.216]) by kirsty.vergenet.net (Postfix) with ESMTPSA id E20D425BEA1; Wed, 22 Jun 2016 13:44:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1466567050; bh=eeyWxRC+GGWttPmS9KJ0fXQyhwzA/43zCyPlDG5ukLw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q4GWcLBCa98nbhFjCdNfvp6UJitoMUVN3kYdVNRhXVopTUxB3ZW2vlz5b8uUzlMGS c7rr/mzMnDqsyIBLHRzrtIpsDXeT29LjnLn5jGVbZ1wEKARV/VgVoDWPNdR3ADdO76 aqRC7No0Me3JXxk0rTBAaXTwyamDY0HPnjVx/NgA= Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 7BE09EDE5BF; Wed, 22 Jun 2016 12:44:05 +0900 (JST) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Wolfram Sang , Simon Horman Subject: [PATCH v3 05/13] ARM: dts: koelsch: use demuxer for I2C1 Date: Wed, 22 Jun 2016 12:43:43 +0900 Message-Id: <1466567031-20381-6-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1466567031-20381-1-git-send-email-horms+renesas@verge.net.au> References: <1466567031-20381-1-git-send-email-horms+renesas@verge.net.au> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make it possible to fallback to GPIO for I2C1 on the EXIO-C connector. This is based on reference work for the I2C0 core of the lager/r8a7790 by Wolfram Sang. Cc: Wolfram Sang Signed-off-by: Simon Horman --- v3 * New Patch --- arch/arm/boot/dts/r8a7791-koelsch.dts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index f8a7d090fd01..744a6e2be2d2 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -50,6 +50,8 @@ aliases { serial0 = &scif0; serial1 = &scif1; + i2c9 = "gpioi2c1"; + i2c12 = "i2cexio1"; }; chosen { @@ -287,6 +289,29 @@ #clock-cells = <0>; clock-frequency = <148500000>; }; + + gpioi2c1: i2c-9 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + status = "disabled"; + gpios = <&gpio7 16 GPIO_ACTIVE_HIGH /* sda */ + &gpio7 15 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <5>; + }; + + /* + * I2C1 is routed to EXIO connector B, pins 64 (SCL) + 66 (SDA). + * A fallback to GPIO is provided. + */ + i2cexio1: i2c-12 { + compatible = "i2c-demux-pinctrl"; + i2c-parent = <&i2c1>, <&gpioi2c1>; + i2c-bus-name = "i2c-exio1"; + #address-cells = <1>; + #size-cells = <0>; + }; }; &du { @@ -322,6 +347,11 @@ pinctrl-0 = <&scif_clk_pins>; pinctrl-names = "default"; + i2c1_pins: i2c1 { + groups = "i2c1"; + function = "i2c1"; + }; + i2c2_pins: i2c2 { groups = "i2c2"; function = "i2c2"; @@ -538,6 +568,11 @@ }; }; +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "i2c-exio1"; +}; + &i2c2 { pinctrl-0 = <&i2c2_pins>; pinctrl-names = "default";